vendor: 4,263 bytes, lines 1-165
1/** 2 * @licstart The following is the entire license notice for the 3 * JavaScript code in this page 4 * 5 * Copyright 2024 Mozilla Foundation 6 * 7 * Licensed under the Apache License, Version 2.0 (the "License"); 8 * you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, software 14 * distributed under the License is distributed on an "AS IS" BASIS, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the License for the specific language governing permissions and 17 * limitations under the License. 18 * 19 * @licend The above is the entire license notice for the 20 * JavaScript code in this page 21 */ 22 23/******/ // The require scope 24/******/ var __webpack_require__ = {}; 25/******/ 26/************************************************************************/ 27/******/ /* webpack/runtime/define property getters */ 28/******/ (() => { 29/******/ // define getter functions for harmony exports 30/******/ __webpack_require__.d = (exports, definition) => { 31/******/ for(var key in definition) { 32/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 33/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 34/******/ } 35/******/ } 36/******/ }; 37/******/ })(); 38/******/ 39/******/ /* webpack/runtime/hasOwnProperty shorthand */ 40/******/ (() => { 41/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 42/******/ })(); 43/******/ 44/************************************************************************/ 45var __webpack_exports__ = globalThis.pdfjsWorker = {}; 46 47// EXPORTS 48__webpack_require__.d(__webpack_exports__, { 49 WorkerMessageHandler: () => (/* reexport */ WorkerMessageHandler) 50}); 51 52;// ./src/shared/util.js 53const isNodeJS = typeof process === "object" && process + "" === "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser"); 54const IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0]; 55const FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0]; 56const MAX_IMAGE_SIZE_TO_CACHE = 10e6; 57const LINE_FACTOR = 1.35; 58const LINE_DESCENT_FACTOR = 0.35; 59const BASELINE_FACTOR = LINE_DESCENT_FACTOR / LINE_FACTOR; 60const RenderingIntentFlag = { 61 ANY: 0x01, 62 DISPLAY: 0x02, 63 PRINT: 0x04, 64 SAVE: 0x08, 65 ANNOTATIONS_FORMS: 0x10, 66 ANNOTATIONS_STORAGE: 0x20, 67 ANNOTATIONS_DISABLE: 0x40, 68 IS_EDITING: 0x80, 69 OPLIST: 0x100 70}; 71const AnnotationMode = { 72 DISABLE: 0, 73 ENABLE: 1, 74 ENABLE_FORMS: 2, 75 ENABLE_STORAGE: 3 76}; 77const AnnotationEditorPrefix = "pdfjs_internal_editor_"; 78const AnnotationEditorType = { 79 DISABLE: -1, 80 NONE: 0, 81 FREETEXT: 3, 82 HIGHLIGHT: 9, 83 STAMP: 13, 84 INK: 15 85}; 86const AnnotationEditorParamsType = { 87 RESIZE: 1, 88 CREATE: 2, 89 FREETEXT_SIZE: 11, 90 FREETEXT_COLOR: 12, 91 FREETEXT_OPACITY: 13, 92 INK_COLOR: 21, 93 INK_THICKNESS: 22, 94 INK_OPACITY: 23, 95 HIGHLIGHT_COLOR: 31, 96 HIGHLIGHT_DEFAULT_COLOR: 32, 97 HIGHLIGHT_THICKNESS: 33, 98 HIGHLIGHT_FREE: 34, 99 HIGHLIGHT_SHOW_ALL: 35, 100 DRAW_STEP: 41 101}; 102const PermissionFlag = { 103 PRINT: 0x04, 104 MODIFY_CONTENTS: 0x08, 105 COPY: 0x10, 106 MODIFY_ANNOTATIONS: 0x20, 107 FILL_INTERACTIVE_FORMS: 0x100, 108 COPY_FOR_ACCESSIBILITY: 0x200, 109 ASSEMBLE: 0x400, 110 PRINT_HIGH_QUALITY: 0x800 111}; 112const TextRenderingMode = { 113 FILL: 0, 114 STROKE: 1, 115 FILL_STROKE: 2, 116 INVISIBLE: 3, 117 FILL_ADD_TO_PATH: 4, 118 STROKE_ADD_TO_PATH: 5, 119 FILL_STROKE_ADD_TO_PATH: 6, 120 ADD_TO_PATH: 7, 121 FILL_STROKE_MASK: 3, 122 ADD_TO_PATH_FLAG: 4 123}; 124const ImageKind = { 125 GRAYSCALE_1BPP: 1, 126 RGB_24BPP: 2, 127 RGBA_32BPP: 3 128}; 129const AnnotationType = { 130 TEXT: 1, 131 LINK: 2, 132 FREETEXT: 3, 133 LINE: 4, 134 SQUARE: 5, 135 CIRCLE: 6, 136 POLYGON: 7, 137 POLYLINE: 8, 138 HIGHLIGHT: 9, 139 UNDERLINE: 10, 140 SQUIGGLY: 11, 141 STRIKEOUT: 12, 142 STAMP: 13, 143 CARET: 14, 144 INK: 15, 145 POPUP: 16, 146 FILEATTACHMENT: 17, 147 SOUND: 18, 148 MOVIE: 19, 149 WIDGET: 20, 150 SCREEN: 21, 151 PRINTERMARK: 22, 152 TRAPNET: 23, 153 WATERMARK: 24, 154 THREED: 25, 155 REDACT: 26 156}; 157const AnnotationReplyType = { 158 GROUP: "Group", 159 REPLY: "R" 160}; 161const AnnotationFlag = { 162 INVISIBLE: 0x01, 163 HIDDEN: 0x02, 164 PRINT: 0x04, 165 NOZOOM: 0x08,
166 NOROTATE: 0x10, 167 NOVIEW: 0x20, 168 READONLY: 0x40, 169 LOCKED: 0x80, 170 TOGGLENOVIEW: 0x100, 171 LOCKEDCONTENTS: 0x200 172}; 173const AnnotationFieldFlag = { 174 READONLY: 0x0000001, 175 REQUIRED: 0x0000002, 176 NOEXPORT: 0x0000004, 177 MULTILINE: 0x0001000, 178 PASSWORD: 0x0002000, 179 NOTOGGLETOOFF: 0x0004000, 180 RADIO: 0x0008000, 181 PUSHBUTTON: 0x0010000, 182 COMBO: 0x0020000, 183 EDIT: 0x0040000, 184 SORT: 0x0080000, 185 FILESELECT: 0x0100000, 186 MULTISELECT: 0x0200000, 187 DONOTSPELLCHECK: 0x0400000, 188 DONOTSCROLL: 0x0800000, 189 COMB: 0x1000000, 190 RICHTEXT: 0x2000000, 191 RADIOSINUNISON: 0x2000000, 192 COMMITONSELCHANGE: 0x4000000 193}; 194const AnnotationBorderStyleType = { 195 SOLID: 1, 196 DASHED: 2, 197 BEVELED: 3, 198 INSET: 4, 199 UNDERLINE: 5 200}; 201const AnnotationActionEventType = { 202 E: "Mouse Enter", 203 X: "Mouse Exit", 204 D: "Mouse Down", 205 U: "Mouse Up", 206 Fo: "Focus", 207 Bl: "Blur", 208 PO: "PageOpen", 209 PC: "PageClose", 210 PV: "PageVisible", 211 PI: "PageInvisible", 212 K: "Keystroke", 213 F: "Format", 214 V: "Validate", 215 C: "Calculate" 216}; 217const DocumentActionEventType = { 218 WC: "WillClose", 219 WS: "WillSave", 220 DS: "DidSave", 221 WP: "WillPrint", 222 DP: "DidPrint" 223}; 224const PageActionEventType = { 225 O: "PageOpen", 226 C: "PageClose" 227}; 228const VerbosityLevel = { 229 ERRORS: 0, 230 WARNINGS: 1, 231 INFOS: 5 232}; 233const OPS = { 234 dependency: 1, 235 setLineWidth: 2, 236 setLineCap: 3, 237 setLineJoin: 4, 238 setMiterLimit: 5, 239 setDash: 6, 240 setRenderingIntent: 7, 241 setFlatness: 8, 242 setGState: 9, 243 save: 10, 244 restore: 11, 245 transform: 12, 246 moveTo: 13, 247 lineTo: 14, 248 curveTo: 15, 249 curveTo2: 16,
vendor: 5,342 bytes, lines 250-473
250 curveTo3: 17, 251 closePath: 18, 252 rectangle: 19, 253 stroke: 20, 254 closeStroke: 21, 255 fill: 22, 256 eoFill: 23, 257 fillStroke: 24, 258 eoFillStroke: 25, 259 closeFillStroke: 26, 260 closeEOFillStroke: 27, 261 endPath: 28, 262 clip: 29, 263 eoClip: 30, 264 beginText: 31, 265 endText: 32, 266 setCharSpacing: 33, 267 setWordSpacing: 34, 268 setHScale: 35, 269 setLeading: 36, 270 setFont: 37, 271 setTextRenderingMode: 38, 272 setTextRise: 39, 273 moveText: 40, 274 setLeadingMoveText: 41, 275 setTextMatrix: 42, 276 nextLine: 43, 277 showText: 44, 278 showSpacedText: 45, 279 nextLineShowText: 46, 280 nextLineSetSpacingShowText: 47, 281 setCharWidth: 48, 282 setCharWidthAndBounds: 49, 283 setStrokeColorSpace: 50, 284 setFillColorSpace: 51, 285 setStrokeColor: 52, 286 setStrokeColorN: 53, 287 setFillColor: 54, 288 setFillColorN: 55, 289 setStrokeGray: 56, 290 setFillGray: 57, 291 setStrokeRGBColor: 58, 292 setFillRGBColor: 59, 293 setStrokeCMYKColor: 60, 294 setFillCMYKColor: 61, 295 shadingFill: 62, 296 beginInlineImage: 63, 297 beginImageData: 64, 298 endInlineImage: 65, 299 paintXObject: 66, 300 markPoint: 67, 301 markPointProps: 68, 302 beginMarkedContent: 69, 303 beginMarkedContentProps: 70, 304 endMarkedContent: 71, 305 beginCompat: 72, 306 endCompat: 73, 307 paintFormXObjectBegin: 74, 308 paintFormXObjectEnd: 75, 309 beginGroup: 76, 310 endGroup: 77, 311 beginAnnotation: 80, 312 endAnnotation: 81, 313 paintImageMaskXObject: 83, 314 paintImageMaskXObjectGroup: 84, 315 paintImageXObject: 85, 316 paintInlineImageXObject: 86, 317 paintInlineImageXObjectGroup: 87, 318 paintImageXObjectRepeat: 88, 319 paintImageMaskXObjectRepeat: 89, 320 paintSolidColorImageMask: 90, 321 constructPath: 91, 322 setStrokeTransparent: 92, 323 setFillTransparent: 93 324}; 325const PasswordResponses = { 326 NEED_PASSWORD: 1, 327 INCORRECT_PASSWORD: 2 328}; 329let verbosity = VerbosityLevel.WARNINGS; 330function setVerbosityLevel(level) { 331 if (Number.isInteger(level)) { 332 verbosity = level; 333 } 334} 335function getVerbosityLevel() { 336 return verbosity; 337} 338function info(msg) { 339 if (verbosity >= VerbosityLevel.INFOS) { 340 console.log(`Info: ${msg}`); 341 } 342} 343function warn(msg) { 344 if (verbosity >= VerbosityLevel.WARNINGS) { 345 console.log(`Warning: ${msg}`); 346 } 347} 348function unreachable(msg) { 349 throw new Error(msg); 350} 351function assert(cond, msg) { 352 if (!cond) { 353 unreachable(msg); 354 } 355} 356function _isValidProtocol(url) { 357 switch (url?.protocol) { 358 case "http:": 359 case "https:": 360 case "ftp:": 361 case "mailto:": 362 case "tel:": 363 return true; 364 default: 365 return false; 366 } 367} 368function createValidAbsoluteUrl(url, baseUrl = null, options = null) { 369 if (!url) { 370 return null; 371 } 372 try { 373 if (options && typeof url === "string") { 374 if (options.addDefaultProtocol && url.startsWith("www.")) { 375 const dots = url.match(/\./g); 376 if (dots?.length >= 2) { 377 url = `http://${url}`; 378 } 379 } 380 if (options.tryConvertEncoding) { 381 try { 382 url = stringToUTF8String(url); 383 } catch {} 384 } 385 } 386 const absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url); 387 if (_isValidProtocol(absoluteUrl)) { 388 return absoluteUrl; 389 } 390 } catch {} 391 return null; 392} 393function shadow(obj, prop, value, nonSerializable = false) { 394 Object.defineProperty(obj, prop, { 395 value, 396 enumerable: !nonSerializable, 397 configurable: true, 398 writable: false 399 }); 400 return value; 401} 402const BaseException = function BaseExceptionClosure() { 403 function BaseException(message, name) { 404 this.message = message; 405 this.name = name; 406 } 407 BaseException.prototype = new Error(); 408 BaseException.constructor = BaseException; 409 return BaseException; 410}(); 411class PasswordException extends BaseException { 412 constructor(msg, code) { 413 super(msg, "PasswordException"); 414 this.code = code; 415 } 416} 417class UnknownErrorException extends BaseException { 418 constructor(msg, details) { 419 super(msg, "UnknownErrorException"); 420 this.details = details; 421 } 422} 423class InvalidPDFException extends BaseException { 424 constructor(msg) { 425 super(msg, "InvalidPDFException"); 426 } 427} 428class MissingPDFException extends BaseException { 429 constructor(msg) { 430 super(msg, "MissingPDFException"); 431 } 432} 433class UnexpectedResponseException extends BaseException { 434 constructor(msg, status) { 435 super(msg, "UnexpectedResponseException"); 436 this.status = status; 437 } 438} 439class FormatError extends BaseException { 440 constructor(msg) { 441 super(msg, "FormatError"); 442 } 443} 444class AbortException extends BaseException { 445 constructor(msg) { 446 super(msg, "AbortException"); 447 } 448} 449function bytesToString(bytes) { 450 if (typeof bytes !== "object" || bytes?.length === undefined) { 451 unreachable("Invalid argument for bytesToString"); 452 } 453 const length = bytes.length; 454 const MAX_ARGUMENT_COUNT = 8192; 455 if (length < MAX_ARGUMENT_COUNT) { 456 return String.fromCharCode.apply(null, bytes); 457 } 458 const strBuf = []; 459 for (let i = 0; i < length; i += MAX_ARGUMENT_COUNT) { 460 const chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length); 461 const chunk = bytes.subarray(i, chunkEnd); 462 strBuf.push(String.fromCharCode.apply(null, chunk)); 463 } 464 return strBuf.join(""); 465} 466function stringToBytes(str) { 467 if (typeof str !== "string") { 468 unreachable("Invalid argument for stringToBytes"); 469 } 470 const length = str.length; 471 const bytes = new Uint8Array(length); 472 for (let i = 0; i < length; ++i) { 473 bytes[i] = str.charCodeAt(i) & 0xff;
474 } 475 return bytes; 476} 477function string32(value) { 478 return String.fromCharCode(value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff); 479} 480function objectSize(obj) { 481 return Object.keys(obj).length; 482} 483function objectFromMap(map) { 484 const obj = Object.create(null); 485 for (const [key, value] of map) { 486 obj[key] = value; 487 } 488 return obj; 489} 490function isLittleEndian() { 491 const buffer8 = new Uint8Array(4); 492 buffer8[0] = 1; 493 const view32 = new Uint32Array(buffer8.buffer, 0, 1); 494 return view32[0] === 1; 495} 496function isEvalSupported() { 497 try { 498 new Function(""); 499 return true; 500 } catch { 501 return false; 502 } 503} 504class FeatureTest { 505 static get isLittleEndian() { 506 return shadow(this, "isLittleEndian", isLittleEndian()); 507 } 508 static get isEvalSupported() { 509 return shadow(this, "isEvalSupported", isEvalSupported()); 510 } 511 static get isOffscreenCanvasSupported() { 512 return shadow(this, "isOffscreenCanvasSupported", typeof OffscreenCanvas !== "undefined"); 513 } 514 static get isImageDecoderSupported() { 515 return shadow(this, "isImageDecoderSupported", typeof ImageDecoder !== "undefined"); 516 } 517 static get platform() { 518 if (typeof navigator !== "undefined" && typeof navigator?.platform === "string") { 519 return shadow(this, "platform", { 520 isMac: navigator.platform.includes("Mac"), 521 isWindows: navigator.platform.includes("Win"), 522 isFirefox: typeof navigator?.userAgent === "string" && navigator.userAgent.includes("Firefox") 523 }); 524 } 525 return shadow(this, "platform", { 526 isMac: false, 527 isWindows: false, 528 isFirefox: false 529 }); 530 } 531 static get isCSSRoundSupported() { 532 return shadow(this, "isCSSRoundSupported", globalThis.CSS?.supports?.("width: round(1.5px, 1px)")); 533 } 534} 535const hexNumbers = Array.from(Array(256).keys(), n => n.toString(16).padStart(2, "0")); 536class Util { 537 static makeHexColor(r, g, b) { 538 return `#${hexNumbers[r]}${hexNumbers[g]}${hexNumbers[b]}`; 539 } 540 static scaleMinMax(transform, minMax) { 541 let temp; 542 if (transform[0]) { 543 if (transform[0] < 0) { 544 temp = minMax[0]; 545 minMax[0] = minMax[2]; 546 minMax[2] = temp; 547 } 548 minMax[0] *= transform[0]; 549 minMax[2] *= transform[0]; 550 if (transform[3] < 0) { 551 temp = minMax[1]; 552 minMax[1] = minMax[3]; 553 minMax[3] = temp; 554 } 555 minMax[1] *= transform[3]; 556 minMax[3] *= transform[3]; 557 } else { 558 temp = minMax[0]; 559 minMax[0] = minMax[1]; 560 minMax[1] = temp; 561 temp = minMax[2]; 562 minMax[2] = minMax[3]; 563 minMax[3] = temp; 564 if (transform[1] < 0) { 565 temp = minMax[1]; 566 minMax[1] = minMax[3]; 567 minMax[3] = temp; 568 } 569 minMax[1] *= transform[1]; 570 minMax[3] *= transform[1]; 571 if (transform[2] < 0) { 572 temp = minMax[0]; 573 minMax[0] = minMax[2]; 574 minMax[2] = temp; 575 } 576 minMax[0] *= transform[2]; 577 minMax[2] *= transform[2]; 578 } 579 minMax[0] += transform[4]; 580 minMax[1] += transform[5]; 581 minMax[2] += transform[4]; 582 minMax[3] += transform[5]; 583 } 584 static transform(m1, m2) { 585 return [m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5]]; 586 } 587 static applyTransform(p, m) { 588 const xt = p[0] * m[0] + p[1] * m[2] + m[4]; 589 const yt = p[0] * m[1] + p[1] * m[3] + m[5]; 590 return [xt, yt]; 591 } 592 static applyInverseTransform(p, m) { 593 const d = m[0] * m[3] - m[1] * m[2]; 594 const xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d; 595 const yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d; 596 return [xt, yt]; 597 } 598 static getAxialAlignedBoundingBox(r, m) { 599 const p1 = this.applyTransform(r, m); 600 const p2 = this.applyTransform(r.slice(2, 4), m); 601 const p3 = this.applyTransform([r[0], r[3]], m); 602 const p4 = this.applyTransform([r[2], r[1]], m); 603 return [Math.min(p1[0], p2[0], p3[0], p4[0]), Math.min(p1[1], p2[1], p3[1], p4[1]), Math.max(p1[0], p2[0], p3[0], p4[0]), Math.max(p1[1], p2[1], p3[1], p4[1])]; 604 } 605 static inverseTransform(m) { 606 const d = m[0] * m[3] - m[1] * m[2]; 607 return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d, (m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d]; 608 } 609 static singularValueDecompose2dScale(m) { 610 const transpose = [m[0], m[2], m[1], m[3]]; 611 const a = m[0] * transpose[0] + m[1] * transpose[2]; 612 const b = m[0] * transpose[1] + m[1] * transpose[3]; 613 const c = m[2] * transpose[0] + m[3] * transpose[2]; 614 const d = m[2] * transpose[1] + m[3] * transpose[3]; 615 const first = (a + d) / 2; 616 const second = Math.sqrt((a + d) ** 2 - 4 * (a * d - c * b)) / 2; 617 const sx = first + second || 1; 618 const sy = first - second || 1; 619 return [Math.sqrt(sx), Math.sqrt(sy)]; 620 } 621 static normalizeRect(rect) { 622 const r = rect.slice(0); 623 if (rect[0] > rect[2]) { 624 r[0] = rect[2]; 625 r[2] = rect[0]; 626 } 627 if (rect[1] > rect[3]) { 628 r[1] = rect[3]; 629 r[3] = rect[1]; 630 } 631 return r; 632 } 633 static intersect(rect1, rect2) { 634 const xLow = Math.max(Math.min(rect1[0], rect1[2]), Math.min(rect2[0], rect2[2])); 635 const xHigh = Math.min(Math.max(rect1[0], rect1[2]), Math.max(rect2[0], rect2[2])); 636 if (xLow > xHigh) { 637 return null; 638 } 639 const yLow = Math.max(Math.min(rect1[1], rect1[3]), Math.min(rect2[1], rect2[3])); 640 const yHigh = Math.min(Math.max(rect1[1], rect1[3]), Math.max(rect2[1], rect2[3])); 641 if (yLow > yHigh) { 642 return null; 643 } 644 return [xLow, yLow, xHigh, yHigh]; 645 } 646 static #getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, t, minMax) { 647 if (t <= 0 || t >= 1) { 648 return; 649 } 650 const mt = 1 - t; 651 const tt = t * t; 652 const ttt = tt * t; 653 const x = mt * (mt * (mt * x0 + 3 * t * x1) + 3 * tt * x2) + ttt * x3; 654 const y = mt * (mt * (mt * y0 + 3 * t * y1) + 3 * tt * y2) + ttt * y3; 655 minMax[0] = Math.min(minMax[0], x); 656 minMax[1] = Math.min(minMax[1], y); 657 minMax[2] = Math.max(minMax[2], x); 658 minMax[3] = Math.max(minMax[3], y); 659 } 660 static #getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, a, b, c, minMax) { 661 if (Math.abs(a) < 1e-12) { 662 if (Math.abs(b) >= 1e-12) { 663 this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, -c / b, minMax); 664 } 665 return; 666 } 667 const delta = b ** 2 - 4 * c * a; 668 if (delta < 0) { 669 return; 670 } 671 const sqrtDelta = Math.sqrt(delta); 672 const a2 = 2 * a; 673 this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b + sqrtDelta) / a2, minMax); 674 this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b - sqrtDelta) / a2, minMax); 675 } 676 static bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3, minMax) { 677 if (minMax) { 678 minMax[0] = Math.min(minMax[0], x0, x3); 679 minMax[1] = Math.min(minMax[1], y0, y3); 680 minMax[2] = Math.max(minMax[2], x0, x3); 681 minMax[3] = Math.max(minMax[3], y0, y3); 682 } else { 683 minMax = [Math.min(x0, x3), Math.min(y0, y3), Math.max(x0, x3), Math.max(y0, y3)]; 684 } 685 this.#getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, 3 * (-x0 + 3 * (x1 - x2) + x3), 6 * (x0 - 2 * x1 + x2), 3 * (x1 - x0), minMax); 686 this.#getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, 3 * (-y0 + 3 * (y1 - y2) + y3), 6 * (y0 - 2 * y1 + y2), 3 * (y1 - y0), minMax); 687 return minMax; 688 } 689} 690const PDFStringTranslateTable = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2d8, 0x2c7, 0x2c6, 0x2d9, 0x2dd, 0x2db, 0x2da, 0x2dc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x192, 0x2044, 0x2039, 0x203a, 0x2212, 0x2030, 0x201e, 0x201c, 0x201d, 0x2018, 0x2019, 0x201a, 0x2122, 0xfb01, 0xfb02, 0x141, 0x152, 0x160, 0x178, 0x17d, 0x131, 0x142, 0x153, 0x161, 0x17e, 0, 0x20ac]; 691function stringToPDFString(str) { 692 if (str[0] >= "\xEF") { 693 let encoding; 694 if (str[0] === "\xFE" && str[1] === "\xFF") { 695 encoding = "utf-16be"; 696 if (str.length % 2 === 1) { 697 str = str.slice(0, -1); 698 } 699 } else if (str[0] === "\xFF" && str[1] === "\xFE") { 700 encoding = "utf-16le"; 701 if (str.length % 2 === 1) { 702 str = str.slice(0, -1); 703 } 704 } else if (str[0] === "\xEF" && str[1] === "\xBB" && str[2] === "\xBF") { 705 encoding = "utf-8"; 706 } 707 if (encoding) {
vendor: 25,384 bytes, lines 708-1660
708 try { 709 const decoder = new TextDecoder(encoding, { 710 fatal: true 711 }); 712 const buffer = stringToBytes(str); 713 const decoded = decoder.decode(buffer); 714 if (!decoded.includes("\x1b")) { 715 return decoded; 716 } 717 return decoded.replaceAll(/\x1b[^\x1b]*(?:\x1b|$)/g, ""); 718 } catch (ex) { 719 warn(`stringToPDFString: "${ex}".`); 720 } 721 } 722 } 723 const strBuf = []; 724 for (let i = 0, ii = str.length; i < ii; i++) { 725 const charCode = str.charCodeAt(i); 726 if (charCode === 0x1b) { 727 while (++i < ii && str.charCodeAt(i) !== 0x1b) {} 728 continue; 729 } 730 const code = PDFStringTranslateTable[charCode]; 731 strBuf.push(code ? String.fromCharCode(code) : str.charAt(i)); 732 } 733 return strBuf.join(""); 734} 735function stringToUTF8String(str) { 736 return decodeURIComponent(escape(str)); 737} 738function utf8StringToString(str) { 739 return unescape(encodeURIComponent(str)); 740} 741function isArrayEqual(arr1, arr2) { 742 if (arr1.length !== arr2.length) { 743 return false; 744 } 745 for (let i = 0, ii = arr1.length; i < ii; i++) { 746 if (arr1[i] !== arr2[i]) { 747 return false; 748 } 749 } 750 return true; 751} 752function getModificationDate(date = new Date()) { 753 const buffer = [date.getUTCFullYear().toString(), (date.getUTCMonth() + 1).toString().padStart(2, "0"), date.getUTCDate().toString().padStart(2, "0"), date.getUTCHours().toString().padStart(2, "0"), date.getUTCMinutes().toString().padStart(2, "0"), date.getUTCSeconds().toString().padStart(2, "0")]; 754 return buffer.join(""); 755} 756let NormalizeRegex = null; 757let NormalizationMap = null; 758function normalizeUnicode(str) { 759 if (!NormalizeRegex) { 760 NormalizeRegex = /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu; 761 NormalizationMap = new Map([["ſt", "ſt"]]); 762 } 763 return str.replaceAll(NormalizeRegex, (_, p1, p2) => p1 ? p1.normalize("NFKC") : NormalizationMap.get(p2)); 764} 765function getUuid() { 766 if (typeof crypto.randomUUID === "function") { 767 return crypto.randomUUID(); 768 } 769 const buf = new Uint8Array(32); 770 crypto.getRandomValues(buf); 771 return bytesToString(buf); 772} 773const AnnotationPrefix = "pdfjs_internal_id_"; 774function toHexUtil(arr) { 775 if (Uint8Array.prototype.toHex) { 776 return arr.toHex(); 777 } 778 return Array.from(arr, num => hexNumbers[num]).join(""); 779} 780function toBase64Util(arr) { 781 if (Uint8Array.prototype.toBase64) { 782 return arr.toBase64(); 783 } 784 return btoa(bytesToString(arr)); 785} 786function fromBase64Util(str) { 787 if (Uint8Array.fromBase64) { 788 return Uint8Array.fromBase64(str); 789 } 790 return stringToBytes(atob(str)); 791} 792if (typeof Promise.try !== "function") { 793 Promise.try = function (fn, ...args) { 794 return new Promise(resolve => { 795 resolve(fn(...args)); 796 }); 797 }; 798} 799 800;// ./src/core/primitives.js 801 802const CIRCULAR_REF = Symbol("CIRCULAR_REF"); 803const EOF = Symbol("EOF"); 804let CmdCache = Object.create(null); 805let NameCache = Object.create(null); 806let RefCache = Object.create(null); 807function clearPrimitiveCaches() { 808 CmdCache = Object.create(null); 809 NameCache = Object.create(null); 810 RefCache = Object.create(null); 811} 812class Name { 813 constructor(name) { 814 this.name = name; 815 } 816 static get(name) { 817 return NameCache[name] ||= new Name(name); 818 } 819} 820class Cmd { 821 constructor(cmd) { 822 this.cmd = cmd; 823 } 824 static get(cmd) { 825 return CmdCache[cmd] ||= new Cmd(cmd); 826 } 827} 828const nonSerializable = function nonSerializableClosure() { 829 return nonSerializable; 830}; 831class Dict { 832 constructor(xref = null) { 833 this._map = new Map(); 834 this.xref = xref; 835 this.objId = null; 836 this.suppressEncryption = false; 837 this.__nonSerializable__ = nonSerializable; 838 } 839 assignXref(newXref) { 840 this.xref = newXref; 841 } 842 get size() { 843 return this._map.size; 844 } 845 get(key1, key2, key3) { 846 let value = this._map.get(key1); 847 if (value === undefined && key2 !== undefined) { 848 value = this._map.get(key2); 849 if (value === undefined && key3 !== undefined) { 850 value = this._map.get(key3); 851 } 852 } 853 if (value instanceof Ref && this.xref) { 854 return this.xref.fetch(value, this.suppressEncryption); 855 } 856 return value; 857 } 858 async getAsync(key1, key2, key3) { 859 let value = this._map.get(key1); 860 if (value === undefined && key2 !== undefined) { 861 value = this._map.get(key2); 862 if (value === undefined && key3 !== undefined) { 863 value = this._map.get(key3); 864 } 865 } 866 if (value instanceof Ref && this.xref) { 867 return this.xref.fetchAsync(value, this.suppressEncryption); 868 } 869 return value; 870 } 871 getArray(key1, key2, key3) { 872 let value = this._map.get(key1); 873 if (value === undefined && key2 !== undefined) { 874 value = this._map.get(key2); 875 if (value === undefined && key3 !== undefined) { 876 value = this._map.get(key3); 877 } 878 } 879 if (value instanceof Ref && this.xref) { 880 value = this.xref.fetch(value, this.suppressEncryption); 881 } 882 if (Array.isArray(value)) { 883 value = value.slice(); 884 for (let i = 0, ii = value.length; i < ii; i++) { 885 if (value[i] instanceof Ref && this.xref) { 886 value[i] = this.xref.fetch(value[i], this.suppressEncryption); 887 } 888 } 889 } 890 return value; 891 } 892 getRaw(key) { 893 return this._map.get(key); 894 } 895 getKeys() { 896 return [...this._map.keys()]; 897 } 898 getRawValues() { 899 return [...this._map.values()]; 900 } 901 set(key, value) { 902 this._map.set(key, value); 903 } 904 has(key) { 905 return this._map.has(key); 906 } 907 *[Symbol.iterator]() { 908 for (const [key, value] of this._map) { 909 yield [key, value instanceof Ref && this.xref ? this.xref.fetch(value, this.suppressEncryption) : value]; 910 } 911 } 912 static get empty() { 913 const emptyDict = new Dict(null); 914 emptyDict.set = (key, value) => { 915 unreachable("Should not call `set` on the empty dictionary."); 916 }; 917 return shadow(this, "empty", emptyDict); 918 } 919 static merge({ 920 xref, 921 dictArray, 922 mergeSubDicts = false 923 }) { 924 const mergedDict = new Dict(xref), 925 properties = new Map(); 926 for (const dict of dictArray) { 927 if (!(dict instanceof Dict)) { 928 continue; 929 } 930 for (const [key, value] of dict._map) { 931 let property = properties.get(key); 932 if (property === undefined) { 933 property = []; 934 properties.set(key, property); 935 } else if (!mergeSubDicts || !(value instanceof Dict)) { 936 continue; 937 } 938 property.push(value); 939 } 940 } 941 for (const [name, values] of properties) { 942 if (values.length === 1 || !(values[0] instanceof Dict)) { 943 mergedDict._map.set(name, values[0]); 944 continue; 945 } 946 const subDict = new Dict(xref); 947 for (const dict of values) { 948 for (const [key, value] of dict._map) { 949 if (!subDict._map.has(key)) { 950 subDict._map.set(key, value); 951 } 952 } 953 } 954 if (subDict.size > 0) { 955 mergedDict._map.set(name, subDict); 956 } 957 } 958 properties.clear(); 959 return mergedDict.size > 0 ? mergedDict : Dict.empty; 960 } 961 clone() { 962 const dict = new Dict(this.xref); 963 for (const key of this.getKeys()) { 964 dict.set(key, this.getRaw(key)); 965 } 966 return dict; 967 } 968 delete(key) { 969 delete this._map[key]; 970 } 971} 972class Ref { 973 constructor(num, gen) { 974 this.num = num; 975 this.gen = gen; 976 } 977 toString() { 978 if (this.gen === 0) { 979 return `${this.num}R`; 980 } 981 return `${this.num}R${this.gen}`; 982 } 983 static fromString(str) { 984 const ref = RefCache[str]; 985 if (ref) { 986 return ref; 987 } 988 const m = /^(\d+)R(\d*)$/.exec(str); 989 if (!m || m[1] === "0") { 990 return null; 991 } 992 return RefCache[str] = new Ref(parseInt(m[1]), !m[2] ? 0 : parseInt(m[2])); 993 } 994 static get(num, gen) { 995 const key = gen === 0 ? `${num}R` : `${num}R${gen}`; 996 return RefCache[key] ||= new Ref(num, gen); 997 } 998} 999class RefSet { 1000 constructor(parent = null) { 1001 this._set = new Set(parent?._set); 1002 } 1003 has(ref) { 1004 return this._set.has(ref.toString()); 1005 } 1006 put(ref) { 1007 this._set.add(ref.toString()); 1008 } 1009 remove(ref) { 1010 this._set.delete(ref.toString()); 1011 } 1012 [Symbol.iterator]() { 1013 return this._set.values(); 1014 } 1015 clear() { 1016 this._set.clear(); 1017 } 1018} 1019class RefSetCache { 1020 constructor() { 1021 this._map = new Map(); 1022 } 1023 get size() { 1024 return this._map.size; 1025 } 1026 get(ref) { 1027 return this._map.get(ref.toString()); 1028 } 1029 has(ref) { 1030 return this._map.has(ref.toString()); 1031 } 1032 put(ref, obj) { 1033 this._map.set(ref.toString(), obj); 1034 } 1035 putAlias(ref, aliasRef) { 1036 this._map.set(ref.toString(), this.get(aliasRef)); 1037 } 1038 [Symbol.iterator]() { 1039 return this._map.values(); 1040 } 1041 clear() { 1042 this._map.clear(); 1043 } 1044 *values() { 1045 yield* this._map.values(); 1046 } 1047 *items() { 1048 for (const [ref, value] of this._map) { 1049 yield [Ref.fromString(ref), value]; 1050 } 1051 } 1052} 1053function isName(v, name) { 1054 return v instanceof Name && (name === undefined || v.name === name); 1055} 1056function isCmd(v, cmd) { 1057 return v instanceof Cmd && (cmd === undefined || v.cmd === cmd); 1058} 1059function isDict(v, type) { 1060 return v instanceof Dict && (type === undefined || isName(v.get("Type"), type)); 1061} 1062function isRefsEqual(v1, v2) { 1063 return v1.num === v2.num && v1.gen === v2.gen; 1064} 1065 1066;// ./src/core/base_stream.js 1067 1068class BaseStream { 1069 get length() { 1070 unreachable("Abstract getter `length` accessed"); 1071 } 1072 get isEmpty() { 1073 unreachable("Abstract getter `isEmpty` accessed"); 1074 } 1075 get isDataLoaded() { 1076 return shadow(this, "isDataLoaded", true); 1077 } 1078 getByte() { 1079 unreachable("Abstract method `getByte` called"); 1080 } 1081 getBytes(length) { 1082 unreachable("Abstract method `getBytes` called"); 1083 } 1084 async getImageData(length, decoderOptions) { 1085 return this.getBytes(length, decoderOptions); 1086 } 1087 async asyncGetBytes() { 1088 unreachable("Abstract method `asyncGetBytes` called"); 1089 } 1090 get isAsync() { 1091 return false; 1092 } 1093 get canAsyncDecodeImageFromBuffer() { 1094 return false; 1095 } 1096 async getTransferableImage() { 1097 return null; 1098 } 1099 peekByte() { 1100 const peekedByte = this.getByte(); 1101 if (peekedByte !== -1) { 1102 this.pos--; 1103 } 1104 return peekedByte; 1105 } 1106 peekBytes(length) { 1107 const bytes = this.getBytes(length); 1108 this.pos -= bytes.length; 1109 return bytes; 1110 } 1111 getUint16() { 1112 const b0 = this.getByte(); 1113 const b1 = this.getByte(); 1114 if (b0 === -1 || b1 === -1) { 1115 return -1; 1116 } 1117 return (b0 << 8) + b1; 1118 } 1119 getInt32() { 1120 const b0 = this.getByte(); 1121 const b1 = this.getByte(); 1122 const b2 = this.getByte(); 1123 const b3 = this.getByte(); 1124 return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; 1125 } 1126 getByteRange(begin, end) { 1127 unreachable("Abstract method `getByteRange` called"); 1128 } 1129 getString(length) { 1130 return bytesToString(this.getBytes(length)); 1131 } 1132 skip(n) { 1133 this.pos += n || 1; 1134 } 1135 reset() { 1136 unreachable("Abstract method `reset` called"); 1137 } 1138 moveStart() { 1139 unreachable("Abstract method `moveStart` called"); 1140 } 1141 makeSubStream(start, length, dict = null) { 1142 unreachable("Abstract method `makeSubStream` called"); 1143 } 1144 getBaseStreams() { 1145 return null; 1146 } 1147} 1148 1149;// ./src/core/core_utils.js 1150 1151 1152 1153const PDF_VERSION_REGEXP = /^[1-9]\.\d$/; 1154const MAX_INT_32 = 2 ** 31 - 1; 1155const MIN_INT_32 = -(2 ** 31); 1156function getLookupTableFactory(initializer) { 1157 let lookup; 1158 return function () { 1159 if (initializer) { 1160 lookup = Object.create(null); 1161 initializer(lookup); 1162 initializer = null; 1163 } 1164 return lookup; 1165 }; 1166} 1167class MissingDataException extends BaseException { 1168 constructor(begin, end) { 1169 super(`Missing data [${begin}, ${end})`, "MissingDataException"); 1170 this.begin = begin; 1171 this.end = end; 1172 } 1173} 1174class ParserEOFException extends BaseException { 1175 constructor(msg) { 1176 super(msg, "ParserEOFException"); 1177 } 1178} 1179class XRefEntryException extends BaseException { 1180 constructor(msg) { 1181 super(msg, "XRefEntryException"); 1182 } 1183} 1184class XRefParseException extends BaseException { 1185 constructor(msg) { 1186 super(msg, "XRefParseException"); 1187 } 1188} 1189function arrayBuffersToBytes(arr) { 1190 const length = arr.length; 1191 if (length === 0) { 1192 return new Uint8Array(0); 1193 } 1194 if (length === 1) { 1195 return new Uint8Array(arr[0]); 1196 } 1197 let dataLength = 0; 1198 for (let i = 0; i < length; i++) { 1199 dataLength += arr[i].byteLength; 1200 } 1201 const data = new Uint8Array(dataLength); 1202 let pos = 0; 1203 for (let i = 0; i < length; i++) { 1204 const item = new Uint8Array(arr[i]); 1205 data.set(item, pos); 1206 pos += item.byteLength; 1207 } 1208 return data; 1209} 1210function getInheritableProperty({ 1211 dict, 1212 key, 1213 getArray = false, 1214 stopWhenFound = true 1215}) { 1216 let values; 1217 const visited = new RefSet(); 1218 while (dict instanceof Dict && !(dict.objId && visited.has(dict.objId))) { 1219 if (dict.objId) { 1220 visited.put(dict.objId); 1221 } 1222 const value = getArray ? dict.getArray(key) : dict.get(key); 1223 if (value !== undefined) { 1224 if (stopWhenFound) { 1225 return value; 1226 } 1227 (values ||= []).push(value); 1228 } 1229 dict = dict.get("Parent"); 1230 } 1231 return values; 1232} 1233function getParentToUpdate(dict, ref, xref) { 1234 const visited = new RefSet(); 1235 const firstDict = dict; 1236 const result = { 1237 dict: null, 1238 ref: null 1239 }; 1240 while (dict instanceof Dict && !visited.has(ref)) { 1241 visited.put(ref); 1242 if (dict.has("T")) { 1243 break; 1244 } 1245 ref = dict.getRaw("Parent"); 1246 if (!(ref instanceof Ref)) { 1247 return result; 1248 } 1249 dict = xref.fetch(ref); 1250 } 1251 if (dict instanceof Dict && dict !== firstDict) { 1252 result.dict = dict; 1253 result.ref = ref; 1254 } 1255 return result; 1256} 1257const ROMAN_NUMBER_MAP = ["", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM", "", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC", "", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"]; 1258function toRomanNumerals(number, lowerCase = false) { 1259 assert(Number.isInteger(number) && number > 0, "The number should be a positive integer."); 1260 const roman = "M".repeat(number / 1000 | 0) + ROMAN_NUMBER_MAP[number % 1000 / 100 | 0] + ROMAN_NUMBER_MAP[10 + (number % 100 / 10 | 0)] + ROMAN_NUMBER_MAP[20 + number % 10]; 1261 return lowerCase ? roman.toLowerCase() : roman; 1262} 1263function log2(x) { 1264 return x > 0 ? Math.ceil(Math.log2(x)) : 0; 1265} 1266function readInt8(data, offset) { 1267 return data[offset] << 24 >> 24; 1268} 1269function readUint16(data, offset) { 1270 return data[offset] << 8 | data[offset + 1]; 1271} 1272function readUint32(data, offset) { 1273 return (data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]) >>> 0; 1274} 1275function isWhiteSpace(ch) { 1276 return ch === 0x20 || ch === 0x09 || ch === 0x0d || ch === 0x0a; 1277} 1278function isBooleanArray(arr, len) { 1279 return Array.isArray(arr) && (len === null || arr.length === len) && arr.every(x => typeof x === "boolean"); 1280} 1281function isNumberArray(arr, len) { 1282 if (Array.isArray(arr)) { 1283 return (len === null || arr.length === len) && arr.every(x => typeof x === "number"); 1284 } 1285 return ArrayBuffer.isView(arr) && (arr.length === 0 || typeof arr[0] === "number") && (len === null || arr.length === len); 1286} 1287function lookupMatrix(arr, fallback) { 1288 return isNumberArray(arr, 6) ? arr : fallback; 1289} 1290function lookupRect(arr, fallback) { 1291 return isNumberArray(arr, 4) ? arr : fallback; 1292} 1293function lookupNormalRect(arr, fallback) { 1294 return isNumberArray(arr, 4) ? Util.normalizeRect(arr) : fallback; 1295} 1296function parseXFAPath(path) { 1297 const positionPattern = /(.+)\[(\d+)\]$/; 1298 return path.split(".").map(component => { 1299 const m = component.match(positionPattern); 1300 if (m) { 1301 return { 1302 name: m[1], 1303 pos: parseInt(m[2], 10) 1304 }; 1305 } 1306 return { 1307 name: component, 1308 pos: 0 1309 }; 1310 }); 1311} 1312function escapePDFName(str) { 1313 const buffer = []; 1314 let start = 0; 1315 for (let i = 0, ii = str.length; i < ii; i++) { 1316 const char = str.charCodeAt(i); 1317 if (char < 0x21 || char > 0x7e || char === 0x23 || char === 0x28 || char === 0x29 || char === 0x3c || char === 0x3e || char === 0x5b || char === 0x5d || char === 0x7b || char === 0x7d || char === 0x2f || char === 0x25) { 1318 if (start < i) { 1319 buffer.push(str.substring(start, i)); 1320 } 1321 buffer.push(`#${char.toString(16)}`); 1322 start = i + 1; 1323 } 1324 } 1325 if (buffer.length === 0) { 1326 return str; 1327 } 1328 if (start < str.length) { 1329 buffer.push(str.substring(start, str.length)); 1330 } 1331 return buffer.join(""); 1332} 1333function escapeString(str) { 1334 return str.replaceAll(/([()\\\n\r])/g, match => { 1335 if (match === "\n") { 1336 return "\\n"; 1337 } else if (match === "\r") { 1338 return "\\r"; 1339 } 1340 return `\\${match}`; 1341 }); 1342} 1343function _collectJS(entry, xref, list, parents) { 1344 if (!entry) { 1345 return; 1346 } 1347 let parent = null; 1348 if (entry instanceof Ref) { 1349 if (parents.has(entry)) { 1350 return; 1351 } 1352 parent = entry; 1353 parents.put(parent); 1354 entry = xref.fetch(entry); 1355 } 1356 if (Array.isArray(entry)) { 1357 for (const element of entry) { 1358 _collectJS(element, xref, list, parents); 1359 } 1360 } else if (entry instanceof Dict) { 1361 if (isName(entry.get("S"), "JavaScript")) { 1362 const js = entry.get("JS"); 1363 let code; 1364 if (js instanceof BaseStream) { 1365 code = js.getString(); 1366 } else if (typeof js === "string") { 1367 code = js; 1368 } 1369 code &&= stringToPDFString(code).replaceAll("\x00", ""); 1370 if (code) { 1371 list.push(code); 1372 } 1373 } 1374 _collectJS(entry.getRaw("Next"), xref, list, parents); 1375 } 1376 if (parent) { 1377 parents.remove(parent); 1378 } 1379} 1380function collectActions(xref, dict, eventType) { 1381 const actions = Object.create(null); 1382 const additionalActionsDicts = getInheritableProperty({ 1383 dict, 1384 key: "AA", 1385 stopWhenFound: false 1386 }); 1387 if (additionalActionsDicts) { 1388 for (let i = additionalActionsDicts.length - 1; i >= 0; i--) { 1389 const additionalActions = additionalActionsDicts[i]; 1390 if (!(additionalActions instanceof Dict)) { 1391 continue; 1392 } 1393 for (const key of additionalActions.getKeys()) { 1394 const action = eventType[key]; 1395 if (!action) { 1396 continue; 1397 } 1398 const actionDict = additionalActions.getRaw(key); 1399 const parents = new RefSet(); 1400 const list = []; 1401 _collectJS(actionDict, xref, list, parents); 1402 if (list.length > 0) { 1403 actions[action] = list; 1404 } 1405 } 1406 } 1407 } 1408 if (dict.has("A")) { 1409 const actionDict = dict.get("A"); 1410 const parents = new RefSet(); 1411 const list = []; 1412 _collectJS(actionDict, xref, list, parents); 1413 if (list.length > 0) { 1414 actions.Action = list; 1415 } 1416 } 1417 return objectSize(actions) > 0 ? actions : null; 1418} 1419const XMLEntities = { 1420 0x3c: "<", 1421 0x3e: ">", 1422 0x26: "&", 1423 0x22: """, 1424 0x27: "'" 1425}; 1426function* codePointIter(str) { 1427 for (let i = 0, ii = str.length; i < ii; i++) { 1428 const char = str.codePointAt(i); 1429 if (char > 0xd7ff && (char < 0xe000 || char > 0xfffd)) { 1430 i++; 1431 } 1432 yield char; 1433 } 1434} 1435function encodeToXmlString(str) { 1436 const buffer = []; 1437 let start = 0; 1438 for (let i = 0, ii = str.length; i < ii; i++) { 1439 const char = str.codePointAt(i); 1440 if (0x20 <= char && char <= 0x7e) { 1441 const entity = XMLEntities[char]; 1442 if (entity) { 1443 if (start < i) { 1444 buffer.push(str.substring(start, i)); 1445 } 1446 buffer.push(entity); 1447 start = i + 1; 1448 } 1449 } else { 1450 if (start < i) { 1451 buffer.push(str.substring(start, i)); 1452 } 1453 buffer.push(`&#x${char.toString(16).toUpperCase()};`); 1454 if (char > 0xd7ff && (char < 0xe000 || char > 0xfffd)) { 1455 i++; 1456 } 1457 start = i + 1; 1458 } 1459 } 1460 if (buffer.length === 0) { 1461 return str; 1462 } 1463 if (start < str.length) { 1464 buffer.push(str.substring(start, str.length)); 1465 } 1466 return buffer.join(""); 1467} 1468function validateFontName(fontFamily, mustWarn = false) { 1469 const m = /^("|').*("|')$/.exec(fontFamily); 1470 if (m && m[1] === m[2]) { 1471 const re = new RegExp(`[^\\\\]${m[1]}`); 1472 if (re.test(fontFamily.slice(1, -1))) { 1473 if (mustWarn) { 1474 warn(`FontFamily contains unescaped ${m[1]}: ${fontFamily}.`); 1475 } 1476 return false; 1477 } 1478 } else { 1479 for (const ident of fontFamily.split(/[ \t]+/)) { 1480 if (/^(\d|(-(\d|-)))/.test(ident) || !/^[\w-\\]+$/.test(ident)) { 1481 if (mustWarn) { 1482 warn(`FontFamily contains invalid <custom-ident>: ${fontFamily}.`); 1483 } 1484 return false; 1485 } 1486 } 1487 } 1488 return true; 1489} 1490function validateCSSFont(cssFontInfo) { 1491 const DEFAULT_CSS_FONT_OBLIQUE = "14"; 1492 const DEFAULT_CSS_FONT_WEIGHT = "400"; 1493 const CSS_FONT_WEIGHT_VALUES = new Set(["100", "200", "300", "400", "500", "600", "700", "800", "900", "1000", "normal", "bold", "bolder", "lighter"]); 1494 const { 1495 fontFamily, 1496 fontWeight, 1497 italicAngle 1498 } = cssFontInfo; 1499 if (!validateFontName(fontFamily, true)) { 1500 return false; 1501 } 1502 const weight = fontWeight ? fontWeight.toString() : ""; 1503 cssFontInfo.fontWeight = CSS_FONT_WEIGHT_VALUES.has(weight) ? weight : DEFAULT_CSS_FONT_WEIGHT; 1504 const angle = parseFloat(italicAngle); 1505 cssFontInfo.italicAngle = isNaN(angle) || angle < -90 || angle > 90 ? DEFAULT_CSS_FONT_OBLIQUE : italicAngle.toString(); 1506 return true; 1507} 1508function recoverJsURL(str) { 1509 const URL_OPEN_METHODS = ["app.launchURL", "window.open", "xfa.host.gotoURL"]; 1510 const regex = new RegExp("^\\s*(" + URL_OPEN_METHODS.join("|").replaceAll(".", "\\.") + ")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))", "i"); 1511 const jsUrl = regex.exec(str); 1512 if (jsUrl?.[2]) { 1513 return { 1514 url: jsUrl[2], 1515 newWindow: jsUrl[1] === "app.launchURL" && jsUrl[3] === "true" 1516 }; 1517 } 1518 return null; 1519} 1520function numberToString(value) { 1521 if (Number.isInteger(value)) { 1522 return value.toString(); 1523 } 1524 const roundedValue = Math.round(value * 100); 1525 if (roundedValue % 100 === 0) { 1526 return (roundedValue / 100).toString(); 1527 } 1528 if (roundedValue % 10 === 0) { 1529 return value.toFixed(1); 1530 } 1531 return value.toFixed(2); 1532} 1533function getNewAnnotationsMap(annotationStorage) { 1534 if (!annotationStorage) { 1535 return null; 1536 } 1537 const newAnnotationsByPage = new Map(); 1538 for (const [key, value] of annotationStorage) { 1539 if (!key.startsWith(AnnotationEditorPrefix)) { 1540 continue; 1541 } 1542 let annotations = newAnnotationsByPage.get(value.pageIndex); 1543 if (!annotations) { 1544 annotations = []; 1545 newAnnotationsByPage.set(value.pageIndex, annotations); 1546 } 1547 annotations.push(value); 1548 } 1549 return newAnnotationsByPage.size > 0 ? newAnnotationsByPage : null; 1550} 1551function stringToAsciiOrUTF16BE(str) { 1552 return isAscii(str) ? str : stringToUTF16String(str, true); 1553} 1554function isAscii(str) { 1555 return /^[\x00-\x7F]*$/.test(str); 1556} 1557function stringToUTF16HexString(str) { 1558 const buf = []; 1559 for (let i = 0, ii = str.length; i < ii; i++) { 1560 const char = str.charCodeAt(i); 1561 buf.push(hexNumbers[char >> 8 & 0xff], hexNumbers[char & 0xff]); 1562 } 1563 return buf.join(""); 1564} 1565function stringToUTF16String(str, bigEndian = false) { 1566 const buf = []; 1567 if (bigEndian) { 1568 buf.push("\xFE\xFF"); 1569 } 1570 for (let i = 0, ii = str.length; i < ii; i++) { 1571 const char = str.charCodeAt(i); 1572 buf.push(String.fromCharCode(char >> 8 & 0xff), String.fromCharCode(char & 0xff)); 1573 } 1574 return buf.join(""); 1575} 1576function getRotationMatrix(rotation, width, height) { 1577 switch (rotation) { 1578 case 90: 1579 return [0, 1, -1, 0, width, 0]; 1580 case 180: 1581 return [-1, 0, 0, -1, width, height]; 1582 case 270: 1583 return [0, -1, 1, 0, 0, height]; 1584 default: 1585 throw new Error("Invalid rotation"); 1586 } 1587} 1588function getSizeInBytes(x) { 1589 return Math.ceil(Math.ceil(Math.log2(1 + x)) / 8); 1590} 1591 1592;// ./src/core/stream.js 1593 1594 1595class Stream extends BaseStream { 1596 constructor(arrayBuffer, start, length, dict) { 1597 super(); 1598 this.bytes = arrayBuffer instanceof Uint8Array ? arrayBuffer : new Uint8Array(arrayBuffer); 1599 this.start = start || 0; 1600 this.pos = this.start; 1601 this.end = start + length || this.bytes.length; 1602 this.dict = dict; 1603 } 1604 get length() { 1605 return this.end - this.start; 1606 } 1607 get isEmpty() { 1608 return this.length === 0; 1609 } 1610 getByte() { 1611 if (this.pos >= this.end) { 1612 return -1; 1613 } 1614 return this.bytes[this.pos++]; 1615 } 1616 getBytes(length) { 1617 const bytes = this.bytes; 1618 const pos = this.pos; 1619 const strEnd = this.end; 1620 if (!length) { 1621 return bytes.subarray(pos, strEnd); 1622 } 1623 let end = pos + length; 1624 if (end > strEnd) { 1625 end = strEnd; 1626 } 1627 this.pos = end; 1628 return bytes.subarray(pos, end); 1629 } 1630 getByteRange(begin, end) { 1631 if (begin < 0) { 1632 begin = 0; 1633 } 1634 if (end > this.end) { 1635 end = this.end; 1636 } 1637 return this.bytes.subarray(begin, end); 1638 } 1639 reset() { 1640 this.pos = this.start; 1641 } 1642 moveStart() { 1643 this.start = this.pos; 1644 } 1645 makeSubStream(start, length, dict = null) { 1646 return new Stream(this.bytes.buffer, start, length, dict); 1647 } 1648} 1649class StringStream extends Stream { 1650 constructor(str) { 1651 super(stringToBytes(str)); 1652 } 1653} 1654class NullStream extends Stream { 1655 constructor() { 1656 super(new Uint8Array(0)); 1657 } 1658} 1659 1660;// ./src/core/chunked_stream.js
vendor: 9,426 bytes, lines 1660-1974
1660 1661 1662 1663 1664class ChunkedStream extends Stream { 1665 constructor(length, chunkSize, manager) { 1666 super(new Uint8Array(length), 0, length, null); 1667 this.chunkSize = chunkSize; 1668 this._loadedChunks = new Set(); 1669 this.numChunks = Math.ceil(length / chunkSize); 1670 this.manager = manager; 1671 this.progressiveDataLength = 0; 1672 this.lastSuccessfulEnsureByteChunk = -1; 1673 } 1674 getMissingChunks() { 1675 const chunks = []; 1676 for (let chunk = 0, n = this.numChunks; chunk < n; ++chunk) { 1677 if (!this._loadedChunks.has(chunk)) { 1678 chunks.push(chunk); 1679 } 1680 } 1681 return chunks; 1682 } 1683 get numChunksLoaded() { 1684 return this._loadedChunks.size; 1685 } 1686 get isDataLoaded() { 1687 return this.numChunksLoaded === this.numChunks; 1688 } 1689 onReceiveData(begin, chunk) { 1690 const chunkSize = this.chunkSize; 1691 if (begin % chunkSize !== 0) { 1692 throw new Error(`Bad begin offset: ${begin}`); 1693 } 1694 const end = begin + chunk.byteLength; 1695 if (end % chunkSize !== 0 && end !== this.bytes.length) { 1696 throw new Error(`Bad end offset: ${end}`); 1697 } 1698 this.bytes.set(new Uint8Array(chunk), begin); 1699 const beginChunk = Math.floor(begin / chunkSize); 1700 const endChunk = Math.floor((end - 1) / chunkSize) + 1; 1701 for (let curChunk = beginChunk; curChunk < endChunk; ++curChunk) { 1702 this._loadedChunks.add(curChunk); 1703 } 1704 } 1705 onReceiveProgressiveData(data) { 1706 let position = this.progressiveDataLength; 1707 const beginChunk = Math.floor(position / this.chunkSize); 1708 this.bytes.set(new Uint8Array(data), position); 1709 position += data.byteLength; 1710 this.progressiveDataLength = position; 1711 const endChunk = position >= this.end ? this.numChunks : Math.floor(position / this.chunkSize); 1712 for (let curChunk = beginChunk; curChunk < endChunk; ++curChunk) { 1713 this._loadedChunks.add(curChunk); 1714 } 1715 } 1716 ensureByte(pos) { 1717 if (pos < this.progressiveDataLength) { 1718 return; 1719 } 1720 const chunk = Math.floor(pos / this.chunkSize); 1721 if (chunk > this.numChunks) { 1722 return; 1723 } 1724 if (chunk === this.lastSuccessfulEnsureByteChunk) { 1725 return; 1726 } 1727 if (!this._loadedChunks.has(chunk)) { 1728 throw new MissingDataException(pos, pos + 1); 1729 } 1730 this.lastSuccessfulEnsureByteChunk = chunk; 1731 } 1732 ensureRange(begin, end) { 1733 if (begin >= end) { 1734 return; 1735 } 1736 if (end <= this.progressiveDataLength) { 1737 return; 1738 } 1739 const beginChunk = Math.floor(begin / this.chunkSize); 1740 if (beginChunk > this.numChunks) { 1741 return; 1742 } 1743 const endChunk = Math.min(Math.floor((end - 1) / this.chunkSize) + 1, this.numChunks); 1744 for (let chunk = beginChunk; chunk < endChunk; ++chunk) { 1745 if (!this._loadedChunks.has(chunk)) { 1746 throw new MissingDataException(begin, end); 1747 } 1748 } 1749 } 1750 nextEmptyChunk(beginChunk) { 1751 const numChunks = this.numChunks; 1752 for (let i = 0; i < numChunks; ++i) { 1753 const chunk = (beginChunk + i) % numChunks; 1754 if (!this._loadedChunks.has(chunk)) { 1755 return chunk; 1756 } 1757 } 1758 return null; 1759 } 1760 hasChunk(chunk) { 1761 return this._loadedChunks.has(chunk); 1762 } 1763 getByte() { 1764 const pos = this.pos; 1765 if (pos >= this.end) { 1766 return -1; 1767 } 1768 if (pos >= this.progressiveDataLength) { 1769 this.ensureByte(pos); 1770 } 1771 return this.bytes[this.pos++]; 1772 } 1773 getBytes(length) { 1774 const bytes = this.bytes; 1775 const pos = this.pos; 1776 const strEnd = this.end; 1777 if (!length) { 1778 if (strEnd > this.progressiveDataLength) { 1779 this.ensureRange(pos, strEnd); 1780 } 1781 return bytes.subarray(pos, strEnd); 1782 } 1783 let end = pos + length; 1784 if (end > strEnd) { 1785 end = strEnd; 1786 } 1787 if (end > this.progressiveDataLength) { 1788 this.ensureRange(pos, end); 1789 } 1790 this.pos = end; 1791 return bytes.subarray(pos, end); 1792 } 1793 getByteRange(begin, end) { 1794 if (begin < 0) { 1795 begin = 0; 1796 } 1797 if (end > this.end) { 1798 end = this.end; 1799 } 1800 if (end > this.progressiveDataLength) { 1801 this.ensureRange(begin, end); 1802 } 1803 return this.bytes.subarray(begin, end); 1804 } 1805 makeSubStream(start, length, dict = null) { 1806 if (length) { 1807 if (start + length > this.progressiveDataLength) { 1808 this.ensureRange(start, start + length); 1809 } 1810 } else if (start >= this.progressiveDataLength) { 1811 this.ensureByte(start); 1812 } 1813 function ChunkedStreamSubstream() {} 1814 ChunkedStreamSubstream.prototype = Object.create(this); 1815 ChunkedStreamSubstream.prototype.getMissingChunks = function () { 1816 const chunkSize = this.chunkSize; 1817 const beginChunk = Math.floor(this.start / chunkSize); 1818 const endChunk = Math.floor((this.end - 1) / chunkSize) + 1; 1819 const missingChunks = []; 1820 for (let chunk = beginChunk; chunk < endChunk; ++chunk) { 1821 if (!this._loadedChunks.has(chunk)) { 1822 missingChunks.push(chunk); 1823 } 1824 } 1825 return missingChunks; 1826 }; 1827 Object.defineProperty(ChunkedStreamSubstream.prototype, "isDataLoaded", { 1828 get() { 1829 if (this.numChunksLoaded === this.numChunks) { 1830 return true; 1831 } 1832 return this.getMissingChunks().length === 0; 1833 }, 1834 configurable: true 1835 }); 1836 const subStream = new ChunkedStreamSubstream(); 1837 subStream.pos = subStream.start = start; 1838 subStream.end = start + length || this.end; 1839 subStream.dict = dict; 1840 return subStream; 1841 } 1842 getBaseStreams() { 1843 return [this]; 1844 } 1845} 1846class ChunkedStreamManager { 1847 constructor(pdfNetworkStream, args) { 1848 this.length = args.length; 1849 this.chunkSize = args.rangeChunkSize; 1850 this.stream = new ChunkedStream(this.length, this.chunkSize, this); 1851 this.pdfNetworkStream = pdfNetworkStream; 1852 this.disableAutoFetch = args.disableAutoFetch; 1853 this.msgHandler = args.msgHandler; 1854 this.currRequestId = 0; 1855 this._chunksNeededByRequest = new Map(); 1856 this._requestsByChunk = new Map(); 1857 this._promisesByRequest = new Map(); 1858 this.progressiveDataLength = 0; 1859 this.aborted = false; 1860 this._loadedStreamCapability = Promise.withResolvers(); 1861 } 1862 sendRequest(begin, end) { 1863 const rangeReader = this.pdfNetworkStream.getRangeReader(begin, end); 1864 if (!rangeReader.isStreamingSupported) { 1865 rangeReader.onProgress = this.onProgress.bind(this); 1866 } 1867 let chunks = [], 1868 loaded = 0; 1869 return new Promise((resolve, reject) => { 1870 const readChunk = ({ 1871 value, 1872 done 1873 }) => { 1874 try { 1875 if (done) { 1876 const chunkData = arrayBuffersToBytes(chunks); 1877 chunks = null; 1878 resolve(chunkData); 1879 return; 1880 } 1881 loaded += value.byteLength; 1882 if (rangeReader.isStreamingSupported) { 1883 this.onProgress({ 1884 loaded 1885 }); 1886 } 1887 chunks.push(value); 1888 rangeReader.read().then(readChunk, reject); 1889 } catch (e) { 1890 reject(e); 1891 } 1892 }; 1893 rangeReader.read().then(readChunk, reject); 1894 }).then(data => { 1895 if (this.aborted) { 1896 return; 1897 } 1898 this.onReceiveData({ 1899 chunk: data, 1900 begin 1901 }); 1902 }); 1903 } 1904 requestAllChunks(noFetch = false) { 1905 if (!noFetch) { 1906 const missingChunks = this.stream.getMissingChunks(); 1907 this._requestChunks(missingChunks); 1908 } 1909 return this._loadedStreamCapability.promise; 1910 } 1911 _requestChunks(chunks) { 1912 const requestId = this.currRequestId++; 1913 const chunksNeeded = new Set(); 1914 this._chunksNeededByRequest.set(requestId, chunksNeeded); 1915 for (const chunk of chunks) { 1916 if (!this.stream.hasChunk(chunk)) { 1917 chunksNeeded.add(chunk); 1918 } 1919 } 1920 if (chunksNeeded.size === 0) { 1921 return Promise.resolve(); 1922 } 1923 const capability = Promise.withResolvers(); 1924 this._promisesByRequest.set(requestId, capability); 1925 const chunksToRequest = []; 1926 for (const chunk of chunksNeeded) { 1927 let requestIds = this._requestsByChunk.get(chunk); 1928 if (!requestIds) { 1929 requestIds = []; 1930 this._requestsByChunk.set(chunk, requestIds); 1931 chunksToRequest.push(chunk); 1932 } 1933 requestIds.push(requestId); 1934 } 1935 if (chunksToRequest.length > 0) { 1936 const groupedChunksToRequest = this.groupChunks(chunksToRequest); 1937 for (const groupedChunk of groupedChunksToRequest) { 1938 const begin = groupedChunk.beginChunk * this.chunkSize; 1939 const end = Math.min(groupedChunk.endChunk * this.chunkSize, this.length); 1940 this.sendRequest(begin, end).catch(capability.reject); 1941 } 1942 } 1943 return capability.promise.catch(reason => { 1944 if (this.aborted) { 1945 return; 1946 } 1947 throw reason; 1948 }); 1949 } 1950 getStream() { 1951 return this.stream; 1952 } 1953 requestRange(begin, end) { 1954 end = Math.min(end, this.length); 1955 const beginChunk = this.getBeginChunk(begin); 1956 const endChunk = this.getEndChunk(end); 1957 const chunks = []; 1958 for (let chunk = beginChunk; chunk < endChunk; ++chunk) { 1959 chunks.push(chunk); 1960 } 1961 return this._requestChunks(chunks); 1962 } 1963 requestRanges(ranges = []) { 1964 const chunksToRequest = []; 1965 for (const range of ranges) { 1966 const beginChunk = this.getBeginChunk(range.begin); 1967 const endChunk = this.getEndChunk(range.end); 1968 for (let chunk = beginChunk; chunk < endChunk; ++chunk) { 1969 if (!chunksToRequest.includes(chunk)) { 1970 chunksToRequest.push(chunk); 1971 } 1972 } 1973 } 1974 chunksToRequest.sort(
vendor: 7,843 bytes, lines 1974-2218
1974function (a, b) { 1975 return a - b; 1976 }); 1977 return this._requestChunks(chunksToRequest); 1978 } 1979 groupChunks(chunks) { 1980 const groupedChunks = []; 1981 let beginChunk = -1; 1982 let prevChunk = -1; 1983 for (let i = 0, ii = chunks.length; i < ii; ++i) { 1984 const chunk = chunks[i]; 1985 if (beginChunk < 0) { 1986 beginChunk = chunk; 1987 } 1988 if (prevChunk >= 0 && prevChunk + 1 !== chunk) { 1989 groupedChunks.push({ 1990 beginChunk, 1991 endChunk: prevChunk + 1 1992 }); 1993 beginChunk = chunk; 1994 } 1995 if (i + 1 === chunks.length) { 1996 groupedChunks.push({ 1997 beginChunk, 1998 endChunk: chunk + 1 1999 }); 2000 } 2001 prevChunk = chunk; 2002 } 2003 return groupedChunks; 2004 } 2005 onProgress(args) { 2006 this.msgHandler.send("DocProgress", { 2007 loaded: this.stream.numChunksLoaded * this.chunkSize + args.loaded, 2008 total: this.length 2009 }); 2010 } 2011 onReceiveData(args) { 2012 const chunk = args.chunk; 2013 const isProgressive = args.begin === undefined; 2014 const begin = isProgressive ? this.progressiveDataLength : args.begin; 2015 const end = begin + chunk.byteLength; 2016 const beginChunk = Math.floor(begin / this.chunkSize); 2017 const endChunk = end < this.length ? Math.floor(end / this.chunkSize) : Math.ceil(end / this.chunkSize); 2018 if (isProgressive) { 2019 this.stream.onReceiveProgressiveData(chunk); 2020 this.progressiveDataLength = end; 2021 } else { 2022 this.stream.onReceiveData(begin, chunk); 2023 } 2024 if (this.stream.isDataLoaded) { 2025 this._loadedStreamCapability.resolve(this.stream); 2026 } 2027 const loadedRequests = []; 2028 for (let curChunk = beginChunk; curChunk < endChunk; ++curChunk) { 2029 const requestIds = this._requestsByChunk.get(curChunk); 2030 if (!requestIds) { 2031 continue; 2032 } 2033 this._requestsByChunk.delete(curChunk); 2034 for (const requestId of requestIds) { 2035 const chunksNeeded = this._chunksNeededByRequest.get(requestId); 2036 if (chunksNeeded.has(curChunk)) { 2037 chunksNeeded.delete(curChunk); 2038 } 2039 if (chunksNeeded.size > 0) { 2040 continue; 2041 } 2042 loadedRequests.push(requestId); 2043 } 2044 } 2045 if (!this.disableAutoFetch && this._requestsByChunk.size === 0) { 2046 let nextEmptyChunk; 2047 if (this.stream.numChunksLoaded === 1) { 2048 const lastChunk = this.stream.numChunks - 1; 2049 if (!this.stream.hasChunk(lastChunk)) { 2050 nextEmptyChunk = lastChunk; 2051 } 2052 } else { 2053 nextEmptyChunk = this.stream.nextEmptyChunk(endChunk); 2054 } 2055 if (Number.isInteger(nextEmptyChunk)) { 2056 this._requestChunks([nextEmptyChunk]); 2057 } 2058 } 2059 for (const requestId of loadedRequests) { 2060 const capability = this._promisesByRequest.get(requestId); 2061 this._promisesByRequest.delete(requestId); 2062 capability.resolve(); 2063 } 2064 this.msgHandler.send("DocProgress", { 2065 loaded: this.stream.numChunksLoaded * this.chunkSize, 2066 total: this.length 2067 }); 2068 } 2069 onError(err) { 2070 this._loadedStreamCapability.reject(err); 2071 } 2072 getBeginChunk(begin) { 2073 return Math.floor(begin / this.chunkSize); 2074 } 2075 getEndChunk(end) { 2076 return Math.floor((end - 1) / this.chunkSize) + 1; 2077 } 2078 abort(reason) { 2079 this.aborted = true; 2080 this.pdfNetworkStream?.cancelAllRequests(reason); 2081 for (const capability of this._promisesByRequest.values()) { 2082 capability.reject(reason); 2083 } 2084 } 2085} 2086 2087;// ./src/core/colorspace.js 2088 2089 2090 2091 2092function resizeRgbImage(src, dest, w1, h1, w2, h2, alpha01) { 2093 const COMPONENTS = 3; 2094 alpha01 = alpha01 !== 1 ? 0 : alpha01; 2095 const xRatio = w1 / w2; 2096 const yRatio = h1 / h2; 2097 let newIndex = 0, 2098 oldIndex; 2099 const xScaled = new Uint16Array(w2); 2100 const w1Scanline = w1 * COMPONENTS; 2101 for (let i = 0; i < w2; i++) { 2102 xScaled[i] = Math.floor(i * xRatio) * COMPONENTS; 2103 } 2104 for (let i = 0; i < h2; i++) { 2105 const py = Math.floor(i * yRatio) * w1Scanline; 2106 for (let j = 0; j < w2; j++) { 2107 oldIndex = py + xScaled[j]; 2108 dest[newIndex++] = src[oldIndex++]; 2109 dest[newIndex++] = src[oldIndex++]; 2110 dest[newIndex++] = src[oldIndex++]; 2111 newIndex += alpha01; 2112 } 2113 } 2114} 2115function resizeRgbaImage(src, dest, w1, h1, w2, h2, alpha01) { 2116 const xRatio = w1 / w2; 2117 const yRatio = h1 / h2; 2118 let newIndex = 0; 2119 const xScaled = new Uint16Array(w2); 2120 if (alpha01 === 1) { 2121 for (let i = 0; i < w2; i++) { 2122 xScaled[i] = Math.floor(i * xRatio); 2123 } 2124 const src32 = new Uint32Array(src.buffer); 2125 const dest32 = new Uint32Array(dest.buffer); 2126 const rgbMask = FeatureTest.isLittleEndian ? 0x00ffffff : 0xffffff00; 2127 for (let i = 0; i < h2; i++) { 2128 const buf = src32.subarray(Math.floor(i * yRatio) * w1); 2129 for (let j = 0; j < w2; j++) { 2130 dest32[newIndex++] |= buf[xScaled[j]] & rgbMask; 2131 } 2132 } 2133 } else { 2134 const COMPONENTS = 4; 2135 const w1Scanline = w1 * COMPONENTS; 2136 for (let i = 0; i < w2; i++) { 2137 xScaled[i] = Math.floor(i * xRatio) * COMPONENTS; 2138 } 2139 for (let i = 0; i < h2; i++) { 2140 const buf = src.subarray(Math.floor(i * yRatio) * w1Scanline); 2141 for (let j = 0; j < w2; j++) { 2142 const oldIndex = xScaled[j]; 2143 dest[newIndex++] = buf[oldIndex]; 2144 dest[newIndex++] = buf[oldIndex + 1]; 2145 dest[newIndex++] = buf[oldIndex + 2]; 2146 } 2147 } 2148 } 2149} 2150function copyRgbaImage(src, dest, alpha01) { 2151 if (alpha01 === 1) { 2152 const src32 = new Uint32Array(src.buffer); 2153 const dest32 = new Uint32Array(dest.buffer); 2154 const rgbMask = FeatureTest.isLittleEndian ? 0x00ffffff : 0xffffff00; 2155 for (let i = 0, ii = src32.length; i < ii; i++) { 2156 dest32[i] |= src32[i] & rgbMask; 2157 } 2158 } else { 2159 let j = 0; 2160 for (let i = 0, ii = src.length; i < ii; i += 4) { 2161 dest[j++] = src[i]; 2162 dest[j++] = src[i + 1]; 2163 dest[j++] = src[i + 2]; 2164 } 2165 } 2166} 2167class ColorSpace { 2168 constructor(name, numComps) { 2169 this.name = name; 2170 this.numComps = numComps; 2171 } 2172 getRgb(src, srcOffset) { 2173 const rgb = new Uint8ClampedArray(3); 2174 this.getRgbItem(src, srcOffset, rgb, 0); 2175 return rgb; 2176 } 2177 getRgbItem(src, srcOffset, dest, destOffset) { 2178 unreachable("Should not call ColorSpace.getRgbItem"); 2179 } 2180 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2181 unreachable("Should not call ColorSpace.getRgbBuffer"); 2182 } 2183 getOutputLength(inputLength, alpha01) { 2184 unreachable("Should not call ColorSpace.getOutputLength"); 2185 } 2186 isPassthrough(bits) { 2187 return false; 2188 } 2189 isDefaultDecode(decodeMap, bpc) { 2190 return ColorSpace.isDefaultDecode(decodeMap, this.numComps); 2191 } 2192 fillRgb(dest, originalWidth, originalHeight, width, height, actualHeight, bpc, comps, alpha01) { 2193 const count = originalWidth * originalHeight; 2194 let rgbBuf = null; 2195 const numComponentColors = 1 << bpc; 2196 const needsResizing = originalHeight !== height || originalWidth !== width; 2197 if (this.isPassthrough(bpc)) { 2198 rgbBuf = comps; 2199 } else if (this.numComps === 1 && count > numComponentColors && this.name !== "DeviceGray" && this.name !== "DeviceRGB") { 2200 const allColors = bpc <= 8 ? new Uint8Array(numComponentColors) : new Uint16Array(numComponentColors); 2201 for (let i = 0; i < numComponentColors; i++) { 2202 allColors[i] = i; 2203 } 2204 const colorMap = new Uint8ClampedArray(numComponentColors * 3); 2205 this.getRgbBuffer(allColors, 0, numComponentColors, colorMap, 0, bpc, 0); 2206 if (!needsResizing) { 2207 let destPos = 0; 2208 for (let i = 0; i < count; ++i) { 2209 const key = comps[i] * 3; 2210 dest[destPos++] = colorMap[key]; 2211 dest[destPos++] = colorMap[key + 1]; 2212 dest[destPos++] = colorMap[key + 2]; 2213 destPos += alpha01; 2214 } 2215 } else { 2216 rgbBuf = new Uint8Array(count * 3); 2217 let rgbPos = 0; 2218 for (let i = 0; i < count; ++i) {
2219 const key = comps[i] * 3; 2220 rgbBuf[rgbPos++] = colorMap[key]; 2221 rgbBuf[rgbPos++] = colorMap[key + 1]; 2222 rgbBuf[rgbPos++] = colorMap[key + 2]; 2223 } 2224 } 2225 } else if (!needsResizing) { 2226 this.getRgbBuffer(comps, 0, width * actualHeight, dest, 0, bpc, alpha01); 2227 } else { 2228 rgbBuf = new Uint8ClampedArray(count * 3); 2229 this.getRgbBuffer(comps, 0, count, rgbBuf, 0, bpc, 0); 2230 } 2231 if (rgbBuf) { 2232 if (needsResizing) { 2233 resizeRgbImage(rgbBuf, dest, originalWidth, originalHeight, width, height, alpha01); 2234 } else { 2235 let destPos = 0, 2236 rgbPos = 0; 2237 for (let i = 0, ii = width * actualHeight; i < ii; i++) { 2238 dest[destPos++] = rgbBuf[rgbPos++]; 2239 dest[destPos++] = rgbBuf[rgbPos++]; 2240 dest[destPos++] = rgbBuf[rgbPos++]; 2241 destPos += alpha01; 2242 } 2243 } 2244 } 2245 } 2246 get usesZeroToOneRange() { 2247 return shadow(this, "usesZeroToOneRange", true); 2248 } 2249 static _cache(cacheKey, xref, localColorSpaceCache, parsedColorSpace) { 2250 if (!localColorSpaceCache) { 2251 throw new Error('ColorSpace._cache - expected "localColorSpaceCache" argument.'); 2252 } 2253 if (!parsedColorSpace) { 2254 throw new Error('ColorSpace._cache - expected "parsedColorSpace" argument.'); 2255 } 2256 let csName, csRef; 2257 if (cacheKey instanceof Ref) { 2258 csRef = cacheKey; 2259 cacheKey = xref.fetch(cacheKey); 2260 } 2261 if (cacheKey instanceof Name) { 2262 csName = cacheKey.name; 2263 } 2264 if (csName || csRef) { 2265 localColorSpaceCache.set(csName, csRef, parsedColorSpace); 2266 } 2267 } 2268 static getCached(cacheKey, xref, localColorSpaceCache) { 2269 if (!localColorSpaceCache) { 2270 throw new Error('ColorSpace.getCached - expected "localColorSpaceCache" argument.'); 2271 } 2272 if (cacheKey instanceof Ref) { 2273 const localColorSpace = localColorSpaceCache.getByRef(cacheKey); 2274 if (localColorSpace) { 2275 return localColorSpace; 2276 } 2277 try { 2278 cacheKey = xref.fetch(cacheKey); 2279 } catch (ex) { 2280 if (ex instanceof MissingDataException) { 2281 throw ex; 2282 } 2283 } 2284 } 2285 if (cacheKey instanceof Name) { 2286 const localColorSpace = localColorSpaceCache.getByName(cacheKey.name); 2287 if (localColorSpace) { 2288 return localColorSpace; 2289 } 2290 } 2291 return null; 2292 } 2293 static async parseAsync({ 2294 cs, 2295 xref, 2296 resources = null, 2297 pdfFunctionFactory, 2298 localColorSpaceCache 2299 }) { 2300 const parsedColorSpace = this._parse(cs, xref, resources, pdfFunctionFactory); 2301 this._cache(cs, xref, localColorSpaceCache, parsedColorSpace); 2302 return parsedColorSpace; 2303 } 2304 static parse({ 2305 cs, 2306 xref, 2307 resources = null, 2308 pdfFunctionFactory, 2309 localColorSpaceCache 2310 }) { 2311 const cachedColorSpace = this.getCached(cs, xref, localColorSpaceCache); 2312 if (cachedColorSpace) { 2313 return cachedColorSpace; 2314 } 2315 const parsedColorSpace = this._parse(cs, xref, resources, pdfFunctionFactory); 2316 this._cache(cs, xref, localColorSpaceCache, parsedColorSpace); 2317 return parsedColorSpace; 2318 } 2319 static _parse(cs, xref, resources = null, pdfFunctionFactory) { 2320 cs = xref.fetchIfRef(cs); 2321 if (cs instanceof Name) { 2322 switch (cs.name) { 2323 case "G": 2324 case "DeviceGray": 2325 return this.singletons.gray; 2326 case "RGB": 2327 case "DeviceRGB": 2328 return this.singletons.rgb; 2329 case "DeviceRGBA": 2330 return this.singletons.rgba; 2331 case "CMYK": 2332 case "DeviceCMYK": 2333 return this.singletons.cmyk; 2334 case "Pattern": 2335 return new PatternCS(null); 2336 default: 2337 if (resources instanceof Dict) { 2338 const colorSpaces = resources.get("ColorSpace"); 2339 if (colorSpaces instanceof Dict) { 2340 const resourcesCS = colorSpaces.get(cs.name); 2341 if (resourcesCS) { 2342 if (resourcesCS instanceof Name) { 2343 return this._parse(resourcesCS, xref, resources, pdfFunctionFactory); 2344 } 2345 cs = resourcesCS; 2346 break; 2347 } 2348 } 2349 } 2350 warn(`Unrecognized ColorSpace: ${cs.name}`); 2351 return this.singletons.gray; 2352 } 2353 } 2354 if (Array.isArray(cs)) { 2355 const mode = xref.fetchIfRef(cs[0]).name; 2356 let params, numComps, baseCS, whitePoint, blackPoint, gamma; 2357 switch (mode) { 2358 case "G": 2359 case "DeviceGray": 2360 return this.singletons.gray; 2361 case "RGB": 2362 case "DeviceRGB": 2363 return this.singletons.rgb; 2364 case "CMYK": 2365 case "DeviceCMYK": 2366 return this.singletons.cmyk; 2367 case "CalGray": 2368 params = xref.fetchIfRef(cs[1]); 2369 whitePoint = params.getArray("WhitePoint"); 2370 blackPoint = params.getArray("BlackPoint"); 2371 gamma = params.get("Gamma"); 2372 return new CalGrayCS(whitePoint, blackPoint, gamma); 2373 case "CalRGB": 2374 params = xref.fetchIfRef(cs[1]); 2375 whitePoint = params.getArray("WhitePoint"); 2376 blackPoint = params.getArray("BlackPoint"); 2377 gamma = params.getArray("Gamma"); 2378 const matrix = params.getArray("Matrix"); 2379 return new CalRGBCS(whitePoint, blackPoint, gamma, matrix); 2380 case "ICCBased": 2381 const stream = xref.fetchIfRef(cs[1]); 2382 const dict = stream.dict; 2383 numComps = dict.get("N"); 2384 const alt = dict.get("Alternate"); 2385 if (alt) { 2386 const altCS = this._parse(alt, xref, resources, pdfFunctionFactory); 2387 if (altCS.numComps === numComps) { 2388 return altCS; 2389 } 2390 warn("ICCBased color space: Ignoring incorrect /Alternate entry."); 2391 } 2392 if (numComps === 1) { 2393 return this.singletons.gray; 2394 } else if (numComps === 3) { 2395 return this.singletons.rgb; 2396 } else if (numComps === 4) { 2397 return this.singletons.cmyk; 2398 } 2399 break; 2400 case "Pattern": 2401 baseCS = cs[1] || null; 2402 if (baseCS) { 2403 baseCS = this._parse(baseCS, xref, resources, pdfFunctionFactory); 2404 } 2405 return new PatternCS(baseCS); 2406 case "I": 2407 case "Indexed": 2408 baseCS = this._parse(cs[1], xref, resources, pdfFunctionFactory); 2409 const hiVal = Math.max(0, Math.min(xref.fetchIfRef(cs[2]), 255)); 2410 const lookup = xref.fetchIfRef(cs[3]); 2411 return new IndexedCS(baseCS, hiVal, lookup); 2412 case "Separation": 2413 case "DeviceN": 2414 const name = xref.fetchIfRef(cs[1]); 2415 numComps = Array.isArray(name) ? name.length : 1; 2416 baseCS = this._parse(cs[2], xref, resources, pdfFunctionFactory); 2417 const tintFn = pdfFunctionFactory.create(cs[3]); 2418 return new AlternateCS(numComps, baseCS, tintFn); 2419 case "Lab": 2420 params = xref.fetchIfRef(cs[1]); 2421 whitePoint = params.getArray("WhitePoint"); 2422 blackPoint = params.getArray("BlackPoint"); 2423 const range = params.getArray("Range");
vendor: 34,902 bytes, lines 2424-3484
2424 return new LabCS(whitePoint, blackPoint, range); 2425 default: 2426 warn(`Unimplemented ColorSpace object: ${mode}`); 2427 return this.singletons.gray; 2428 } 2429 } 2430 warn(`Unrecognized ColorSpace object: ${cs}`); 2431 return this.singletons.gray; 2432 } 2433 static isDefaultDecode(decode, numComps) { 2434 if (!Array.isArray(decode)) { 2435 return true; 2436 } 2437 if (numComps * 2 !== decode.length) { 2438 warn("The decode map is not the correct length"); 2439 return true; 2440 } 2441 for (let i = 0, ii = decode.length; i < ii; i += 2) { 2442 if (decode[i] !== 0 || decode[i + 1] !== 1) { 2443 return false; 2444 } 2445 } 2446 return true; 2447 } 2448 static get singletons() { 2449 return shadow(this, "singletons", { 2450 get gray() { 2451 return shadow(this, "gray", new DeviceGrayCS()); 2452 }, 2453 get rgb() { 2454 return shadow(this, "rgb", new DeviceRgbCS()); 2455 }, 2456 get rgba() { 2457 return shadow(this, "rgba", new DeviceRgbaCS()); 2458 }, 2459 get cmyk() { 2460 return shadow(this, "cmyk", new DeviceCmykCS()); 2461 } 2462 }); 2463 } 2464} 2465class AlternateCS extends ColorSpace { 2466 constructor(numComps, base, tintFn) { 2467 super("Alternate", numComps); 2468 this.base = base; 2469 this.tintFn = tintFn; 2470 this.tmpBuf = new Float32Array(base.numComps); 2471 } 2472 getRgbItem(src, srcOffset, dest, destOffset) { 2473 const tmpBuf = this.tmpBuf; 2474 this.tintFn(src, srcOffset, tmpBuf, 0); 2475 this.base.getRgbItem(tmpBuf, 0, dest, destOffset); 2476 } 2477 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2478 const tintFn = this.tintFn; 2479 const base = this.base; 2480 const scale = 1 / ((1 << bits) - 1); 2481 const baseNumComps = base.numComps; 2482 const usesZeroToOneRange = base.usesZeroToOneRange; 2483 const isPassthrough = (base.isPassthrough(8) || !usesZeroToOneRange) && alpha01 === 0; 2484 let pos = isPassthrough ? destOffset : 0; 2485 const baseBuf = isPassthrough ? dest : new Uint8ClampedArray(baseNumComps * count); 2486 const numComps = this.numComps; 2487 const scaled = new Float32Array(numComps); 2488 const tinted = new Float32Array(baseNumComps); 2489 let i, j; 2490 for (i = 0; i < count; i++) { 2491 for (j = 0; j < numComps; j++) { 2492 scaled[j] = src[srcOffset++] * scale; 2493 } 2494 tintFn(scaled, 0, tinted, 0); 2495 if (usesZeroToOneRange) { 2496 for (j = 0; j < baseNumComps; j++) { 2497 baseBuf[pos++] = tinted[j] * 255; 2498 } 2499 } else { 2500 base.getRgbItem(tinted, 0, baseBuf, pos); 2501 pos += baseNumComps; 2502 } 2503 } 2504 if (!isPassthrough) { 2505 base.getRgbBuffer(baseBuf, 0, count, dest, destOffset, 8, alpha01); 2506 } 2507 } 2508 getOutputLength(inputLength, alpha01) { 2509 return this.base.getOutputLength(inputLength * this.base.numComps / this.numComps, alpha01); 2510 } 2511} 2512class PatternCS extends ColorSpace { 2513 constructor(baseCS) { 2514 super("Pattern", null); 2515 this.base = baseCS; 2516 } 2517 isDefaultDecode(decodeMap, bpc) { 2518 unreachable("Should not call PatternCS.isDefaultDecode"); 2519 } 2520} 2521class IndexedCS extends ColorSpace { 2522 constructor(base, highVal, lookup) { 2523 super("Indexed", 1); 2524 this.base = base; 2525 const length = base.numComps * (highVal + 1); 2526 this.lookup = new Uint8Array(length); 2527 if (lookup instanceof BaseStream) { 2528 const bytes = lookup.getBytes(length); 2529 this.lookup.set(bytes); 2530 } else if (typeof lookup === "string") { 2531 for (let i = 0; i < length; ++i) { 2532 this.lookup[i] = lookup.charCodeAt(i) & 0xff; 2533 } 2534 } else { 2535 throw new FormatError(`IndexedCS - unrecognized lookup table: ${lookup}`); 2536 } 2537 } 2538 getRgbItem(src, srcOffset, dest, destOffset) { 2539 const numComps = this.base.numComps; 2540 const start = src[srcOffset] * numComps; 2541 this.base.getRgbBuffer(this.lookup, start, 1, dest, destOffset, 8, 0); 2542 } 2543 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2544 const base = this.base; 2545 const numComps = base.numComps; 2546 const outputDelta = base.getOutputLength(numComps, alpha01); 2547 const lookup = this.lookup; 2548 for (let i = 0; i < count; ++i) { 2549 const lookupPos = src[srcOffset++] * numComps; 2550 base.getRgbBuffer(lookup, lookupPos, 1, dest, destOffset, 8, alpha01); 2551 destOffset += outputDelta; 2552 } 2553 } 2554 getOutputLength(inputLength, alpha01) { 2555 return this.base.getOutputLength(inputLength * this.base.numComps, alpha01); 2556 } 2557 isDefaultDecode(decodeMap, bpc) { 2558 if (!Array.isArray(decodeMap)) { 2559 return true; 2560 } 2561 if (decodeMap.length !== 2) { 2562 warn("Decode map length is not correct"); 2563 return true; 2564 } 2565 if (!Number.isInteger(bpc) || bpc < 1) { 2566 warn("Bits per component is not correct"); 2567 return true; 2568 } 2569 return decodeMap[0] === 0 && decodeMap[1] === (1 << bpc) - 1; 2570 } 2571} 2572class DeviceGrayCS extends ColorSpace { 2573 constructor() { 2574 super("DeviceGray", 1); 2575 } 2576 getRgbItem(src, srcOffset, dest, destOffset) { 2577 const c = src[srcOffset] * 255; 2578 dest[destOffset] = dest[destOffset + 1] = dest[destOffset + 2] = c; 2579 } 2580 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2581 const scale = 255 / ((1 << bits) - 1); 2582 let j = srcOffset, 2583 q = destOffset; 2584 for (let i = 0; i < count; ++i) { 2585 const c = scale * src[j++]; 2586 dest[q++] = c; 2587 dest[q++] = c; 2588 dest[q++] = c; 2589 q += alpha01; 2590 } 2591 } 2592 getOutputLength(inputLength, alpha01) { 2593 return inputLength * (3 + alpha01); 2594 } 2595} 2596class DeviceRgbCS extends ColorSpace { 2597 constructor() { 2598 super("DeviceRGB", 3); 2599 } 2600 getRgbItem(src, srcOffset, dest, destOffset) { 2601 dest[destOffset] = src[srcOffset] * 255; 2602 dest[destOffset + 1] = src[srcOffset + 1] * 255; 2603 dest[destOffset + 2] = src[srcOffset + 2] * 255; 2604 } 2605 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2606 if (bits === 8 && alpha01 === 0) { 2607 dest.set(src.subarray(srcOffset, srcOffset + count * 3), destOffset); 2608 return; 2609 } 2610 const scale = 255 / ((1 << bits) - 1); 2611 let j = srcOffset, 2612 q = destOffset; 2613 for (let i = 0; i < count; ++i) { 2614 dest[q++] = scale * src[j++]; 2615 dest[q++] = scale * src[j++]; 2616 dest[q++] = scale * src[j++]; 2617 q += alpha01; 2618 } 2619 } 2620 getOutputLength(inputLength, alpha01) { 2621 return inputLength * (3 + alpha01) / 3 | 0; 2622 } 2623 isPassthrough(bits) { 2624 return bits === 8; 2625 } 2626} 2627class DeviceRgbaCS extends ColorSpace { 2628 constructor() { 2629 super("DeviceRGBA", 4); 2630 } 2631 getOutputLength(inputLength, _alpha01) { 2632 return inputLength * 4; 2633 } 2634 isPassthrough(bits) { 2635 return bits === 8; 2636 } 2637 fillRgb(dest, originalWidth, originalHeight, width, height, actualHeight, bpc, comps, alpha01) { 2638 if (originalHeight !== height || originalWidth !== width) { 2639 resizeRgbaImage(comps, dest, originalWidth, originalHeight, width, height, alpha01); 2640 } else { 2641 copyRgbaImage(comps, dest, alpha01); 2642 } 2643 } 2644} 2645class DeviceCmykCS extends ColorSpace { 2646 constructor() { 2647 super("DeviceCMYK", 4); 2648 } 2649 #toRgb(src, srcOffset, srcScale, dest, destOffset) { 2650 const c = src[srcOffset] * srcScale; 2651 const m = src[srcOffset + 1] * srcScale; 2652 const y = src[srcOffset + 2] * srcScale; 2653 const k = src[srcOffset + 3] * srcScale; 2654 dest[destOffset] = 255 + c * (-4.387332384609988 * c + 54.48615194189176 * m + 18.82290502165302 * y + 212.25662451639585 * k + -285.2331026137004) + m * (1.7149763477362134 * m - 5.6096736904047315 * y + -17.873870861415444 * k - 5.497006427196366) + y * (-2.5217340131683033 * y - 21.248923337353073 * k + 17.5119270841813) + k * (-21.86122147463605 * k - 189.48180835922747); 2655 dest[destOffset + 1] = 255 + c * (8.841041422036149 * c + 60.118027045597366 * m + 6.871425592049007 * y + 31.159100130055922 * k + -79.2970844816548) + m * (-15.310361306967817 * m + 17.575251261109482 * y + 131.35250912493976 * k - 190.9453302588951) + y * (4.444339102852739 * y + 9.8632861493405 * k - 24.86741582555878) + k * (-20.737325471181034 * k - 187.80453709719578); 2656 dest[destOffset + 2] = 255 + c * (0.8842522430003296 * c + 8.078677503112928 * m + 30.89978309703729 * y - 0.23883238689178934 * k + -14.183576799673286) + m * (10.49593273432072 * m + 63.02378494754052 * y + 50.606957656360734 * k - 112.23884253719248) + y * (0.03296041114873217 * y + 115.60384449646641 * k + -193.58209356861505) + k * (-22.33816807309886 * k - 180.12613974708367); 2657 } 2658 getRgbItem(src, srcOffset, dest, destOffset) { 2659 this.#toRgb(src, srcOffset, 1, dest, destOffset); 2660 } 2661 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2662 const scale = 1 / ((1 << bits) - 1); 2663 for (let i = 0; i < count; i++) { 2664 this.#toRgb(src, srcOffset, scale, dest, destOffset); 2665 srcOffset += 4; 2666 destOffset += 3 + alpha01; 2667 } 2668 } 2669 getOutputLength(inputLength, alpha01) { 2670 return inputLength / 4 * (3 + alpha01) | 0; 2671 } 2672} 2673class CalGrayCS extends ColorSpace { 2674 constructor(whitePoint, blackPoint, gamma) { 2675 super("CalGray", 1); 2676 if (!whitePoint) { 2677 throw new FormatError("WhitePoint missing - required for color space CalGray"); 2678 } 2679 [this.XW, this.YW, this.ZW] = whitePoint; 2680 [this.XB, this.YB, this.ZB] = blackPoint || [0, 0, 0]; 2681 this.G = gamma || 1; 2682 if (this.XW < 0 || this.ZW < 0 || this.YW !== 1) { 2683 throw new FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`); 2684 } 2685 if (this.XB < 0 || this.YB < 0 || this.ZB < 0) { 2686 info(`Invalid BlackPoint for ${this.name}, falling back to default.`); 2687 this.XB = this.YB = this.ZB = 0; 2688 } 2689 if (this.XB !== 0 || this.YB !== 0 || this.ZB !== 0) { 2690 warn(`${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ` + `ZB: ${this.ZB}, only default values are supported.`); 2691 } 2692 if (this.G < 1) { 2693 info(`Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`); 2694 this.G = 1; 2695 } 2696 } 2697 #toRgb(src, srcOffset, dest, destOffset, scale) { 2698 const A = src[srcOffset] * scale; 2699 const AG = A ** this.G; 2700 const L = this.YW * AG; 2701 const val = Math.max(295.8 * L ** 0.3333333333333333 - 40.8, 0); 2702 dest[destOffset] = val; 2703 dest[destOffset + 1] = val; 2704 dest[destOffset + 2] = val; 2705 } 2706 getRgbItem(src, srcOffset, dest, destOffset) { 2707 this.#toRgb(src, srcOffset, dest, destOffset, 1); 2708 } 2709 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2710 const scale = 1 / ((1 << bits) - 1); 2711 for (let i = 0; i < count; ++i) { 2712 this.#toRgb(src, srcOffset, dest, destOffset, scale); 2713 srcOffset += 1; 2714 destOffset += 3 + alpha01; 2715 } 2716 } 2717 getOutputLength(inputLength, alpha01) { 2718 return inputLength * (3 + alpha01); 2719 } 2720} 2721class CalRGBCS extends ColorSpace { 2722 static #BRADFORD_SCALE_MATRIX = new Float32Array([0.8951, 0.2664, -0.1614, -0.7502, 1.7135, 0.0367, 0.0389, -0.0685, 1.0296]); 2723 static #BRADFORD_SCALE_INVERSE_MATRIX = new Float32Array([0.9869929, -0.1470543, 0.1599627, 0.4323053, 0.5183603, 0.0492912, -0.0085287, 0.0400428, 0.9684867]); 2724 static #SRGB_D65_XYZ_TO_RGB_MATRIX = new Float32Array([3.2404542, -1.5371385, -0.4985314, -0.9692660, 1.8760108, 0.0415560, 0.0556434, -0.2040259, 1.0572252]); 2725 static #FLAT_WHITEPOINT_MATRIX = new Float32Array([1, 1, 1]); 2726 static #tempNormalizeMatrix = new Float32Array(3); 2727 static #tempConvertMatrix1 = new Float32Array(3); 2728 static #tempConvertMatrix2 = new Float32Array(3); 2729 static #DECODE_L_CONSTANT = ((8 + 16) / 116) ** 3 / 8.0; 2730 constructor(whitePoint, blackPoint, gamma, matrix) { 2731 super("CalRGB", 3); 2732 if (!whitePoint) { 2733 throw new FormatError("WhitePoint missing - required for color space CalRGB"); 2734 } 2735 const [XW, YW, ZW] = this.whitePoint = whitePoint; 2736 const [XB, YB, ZB] = this.blackPoint = blackPoint || new Float32Array(3); 2737 [this.GR, this.GG, this.GB] = gamma || new Float32Array([1, 1, 1]); 2738 [this.MXA, this.MYA, this.MZA, this.MXB, this.MYB, this.MZB, this.MXC, this.MYC, this.MZC] = matrix || new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]); 2739 if (XW < 0 || ZW < 0 || YW !== 1) { 2740 throw new FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`); 2741 } 2742 if (XB < 0 || YB < 0 || ZB < 0) { 2743 info(`Invalid BlackPoint for ${this.name} [${XB}, ${YB}, ${ZB}], ` + "falling back to default."); 2744 this.blackPoint = new Float32Array(3); 2745 } 2746 if (this.GR < 0 || this.GG < 0 || this.GB < 0) { 2747 info(`Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ` + `${this.name}, falling back to default.`); 2748 this.GR = this.GG = this.GB = 1; 2749 } 2750 } 2751 #matrixProduct(a, b, result) { 2752 result[0] = a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; 2753 result[1] = a[3] * b[0] + a[4] * b[1] + a[5] * b[2]; 2754 result[2] = a[6] * b[0] + a[7] * b[1] + a[8] * b[2]; 2755 } 2756 #toFlat(sourceWhitePoint, LMS, result) { 2757 result[0] = LMS[0] * 1 / sourceWhitePoint[0]; 2758 result[1] = LMS[1] * 1 / sourceWhitePoint[1]; 2759 result[2] = LMS[2] * 1 / sourceWhitePoint[2]; 2760 } 2761 #toD65(sourceWhitePoint, LMS, result) { 2762 const D65X = 0.95047; 2763 const D65Y = 1; 2764 const D65Z = 1.08883; 2765 result[0] = LMS[0] * D65X / sourceWhitePoint[0]; 2766 result[1] = LMS[1] * D65Y / sourceWhitePoint[1]; 2767 result[2] = LMS[2] * D65Z / sourceWhitePoint[2]; 2768 } 2769 #sRGBTransferFunction(color) { 2770 if (color <= 0.0031308) { 2771 return this.#adjustToRange(0, 1, 12.92 * color); 2772 } 2773 if (color >= 0.99554525) { 2774 return 1; 2775 } 2776 return this.#adjustToRange(0, 1, (1 + 0.055) * color ** (1 / 2.4) - 0.055); 2777 } 2778 #adjustToRange(min, max, value) { 2779 return Math.max(min, Math.min(max, value)); 2780 } 2781 #decodeL(L) { 2782 if (L < 0) { 2783 return -this.#decodeL(-L); 2784 } 2785 if (L > 8.0) { 2786 return ((L + 16) / 116) ** 3; 2787 } 2788 return L * CalRGBCS.#DECODE_L_CONSTANT; 2789 } 2790 #compensateBlackPoint(sourceBlackPoint, XYZ_Flat, result) { 2791 if (sourceBlackPoint[0] === 0 && sourceBlackPoint[1] === 0 && sourceBlackPoint[2] === 0) { 2792 result[0] = XYZ_Flat[0]; 2793 result[1] = XYZ_Flat[1]; 2794 result[2] = XYZ_Flat[2]; 2795 return; 2796 } 2797 const zeroDecodeL = this.#decodeL(0); 2798 const X_DST = zeroDecodeL; 2799 const X_SRC = this.#decodeL(sourceBlackPoint[0]); 2800 const Y_DST = zeroDecodeL; 2801 const Y_SRC = this.#decodeL(sourceBlackPoint[1]); 2802 const Z_DST = zeroDecodeL; 2803 const Z_SRC = this.#decodeL(sourceBlackPoint[2]); 2804 const X_Scale = (1 - X_DST) / (1 - X_SRC); 2805 const X_Offset = 1 - X_Scale; 2806 const Y_Scale = (1 - Y_DST) / (1 - Y_SRC); 2807 const Y_Offset = 1 - Y_Scale; 2808 const Z_Scale = (1 - Z_DST) / (1 - Z_SRC); 2809 const Z_Offset = 1 - Z_Scale; 2810 result[0] = XYZ_Flat[0] * X_Scale + X_Offset; 2811 result[1] = XYZ_Flat[1] * Y_Scale + Y_Offset; 2812 result[2] = XYZ_Flat[2] * Z_Scale + Z_Offset; 2813 } 2814 #normalizeWhitePointToFlat(sourceWhitePoint, XYZ_In, result) { 2815 if (sourceWhitePoint[0] === 1 && sourceWhitePoint[2] === 1) { 2816 result[0] = XYZ_In[0]; 2817 result[1] = XYZ_In[1]; 2818 result[2] = XYZ_In[2]; 2819 return; 2820 } 2821 const LMS = result; 2822 this.#matrixProduct(CalRGBCS.#BRADFORD_SCALE_MATRIX, XYZ_In, LMS); 2823 const LMS_Flat = CalRGBCS.#tempNormalizeMatrix; 2824 this.#toFlat(sourceWhitePoint, LMS, LMS_Flat); 2825 this.#matrixProduct(CalRGBCS.#BRADFORD_SCALE_INVERSE_MATRIX, LMS_Flat, result); 2826 } 2827 #normalizeWhitePointToD65(sourceWhitePoint, XYZ_In, result) { 2828 const LMS = result; 2829 this.#matrixProduct(CalRGBCS.#BRADFORD_SCALE_MATRIX, XYZ_In, LMS); 2830 const LMS_D65 = CalRGBCS.#tempNormalizeMatrix; 2831 this.#toD65(sourceWhitePoint, LMS, LMS_D65); 2832 this.#matrixProduct(CalRGBCS.#BRADFORD_SCALE_INVERSE_MATRIX, LMS_D65, result); 2833 } 2834 #toRgb(src, srcOffset, dest, destOffset, scale) { 2835 const A = this.#adjustToRange(0, 1, src[srcOffset] * scale); 2836 const B = this.#adjustToRange(0, 1, src[srcOffset + 1] * scale); 2837 const C = this.#adjustToRange(0, 1, src[srcOffset + 2] * scale); 2838 const AGR = A === 1 ? 1 : A ** this.GR; 2839 const BGG = B === 1 ? 1 : B ** this.GG; 2840 const CGB = C === 1 ? 1 : C ** this.GB; 2841 const X = this.MXA * AGR + this.MXB * BGG + this.MXC * CGB; 2842 const Y = this.MYA * AGR + this.MYB * BGG + this.MYC * CGB; 2843 const Z = this.MZA * AGR + this.MZB * BGG + this.MZC * CGB; 2844 const XYZ = CalRGBCS.#tempConvertMatrix1; 2845 XYZ[0] = X; 2846 XYZ[1] = Y; 2847 XYZ[2] = Z; 2848 const XYZ_Flat = CalRGBCS.#tempConvertMatrix2; 2849 this.#normalizeWhitePointToFlat(this.whitePoint, XYZ, XYZ_Flat); 2850 const XYZ_Black = CalRGBCS.#tempConvertMatrix1; 2851 this.#compensateBlackPoint(this.blackPoint, XYZ_Flat, XYZ_Black); 2852 const XYZ_D65 = CalRGBCS.#tempConvertMatrix2; 2853 this.#normalizeWhitePointToD65(CalRGBCS.#FLAT_WHITEPOINT_MATRIX, XYZ_Black, XYZ_D65); 2854 const SRGB = CalRGBCS.#tempConvertMatrix1; 2855 this.#matrixProduct(CalRGBCS.#SRGB_D65_XYZ_TO_RGB_MATRIX, XYZ_D65, SRGB); 2856 dest[destOffset] = this.#sRGBTransferFunction(SRGB[0]) * 255; 2857 dest[destOffset + 1] = this.#sRGBTransferFunction(SRGB[1]) * 255; 2858 dest[destOffset + 2] = this.#sRGBTransferFunction(SRGB[2]) * 255; 2859 } 2860 getRgbItem(src, srcOffset, dest, destOffset) { 2861 this.#toRgb(src, srcOffset, dest, destOffset, 1); 2862 } 2863 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2864 const scale = 1 / ((1 << bits) - 1); 2865 for (let i = 0; i < count; ++i) { 2866 this.#toRgb(src, srcOffset, dest, destOffset, scale); 2867 srcOffset += 3; 2868 destOffset += 3 + alpha01; 2869 } 2870 } 2871 getOutputLength(inputLength, alpha01) { 2872 return inputLength * (3 + alpha01) / 3 | 0; 2873 } 2874} 2875class LabCS extends ColorSpace { 2876 constructor(whitePoint, blackPoint, range) { 2877 super("Lab", 3); 2878 if (!whitePoint) { 2879 throw new FormatError("WhitePoint missing - required for color space Lab"); 2880 } 2881 [this.XW, this.YW, this.ZW] = whitePoint; 2882 [this.amin, this.amax, this.bmin, this.bmax] = range || [-100, 100, -100, 100]; 2883 [this.XB, this.YB, this.ZB] = blackPoint || [0, 0, 0]; 2884 if (this.XW < 0 || this.ZW < 0 || this.YW !== 1) { 2885 throw new FormatError("Invalid WhitePoint components, no fallback available"); 2886 } 2887 if (this.XB < 0 || this.YB < 0 || this.ZB < 0) { 2888 info("Invalid BlackPoint, falling back to default"); 2889 this.XB = this.YB = this.ZB = 0; 2890 } 2891 if (this.amin > this.amax || this.bmin > this.bmax) { 2892 info("Invalid Range, falling back to defaults"); 2893 this.amin = -100; 2894 this.amax = 100; 2895 this.bmin = -100; 2896 this.bmax = 100; 2897 } 2898 } 2899 #fn_g(x) { 2900 return x >= 6 / 29 ? x ** 3 : 108 / 841 * (x - 4 / 29); 2901 } 2902 #decode(value, high1, low2, high2) { 2903 return low2 + value * (high2 - low2) / high1; 2904 } 2905 #toRgb(src, srcOffset, maxVal, dest, destOffset) { 2906 let Ls = src[srcOffset]; 2907 let as = src[srcOffset + 1]; 2908 let bs = src[srcOffset + 2]; 2909 if (maxVal !== false) { 2910 Ls = this.#decode(Ls, maxVal, 0, 100); 2911 as = this.#decode(as, maxVal, this.amin, this.amax); 2912 bs = this.#decode(bs, maxVal, this.bmin, this.bmax); 2913 } 2914 if (as > this.amax) { 2915 as = this.amax; 2916 } else if (as < this.amin) { 2917 as = this.amin; 2918 } 2919 if (bs > this.bmax) { 2920 bs = this.bmax; 2921 } else if (bs < this.bmin) { 2922 bs = this.bmin; 2923 } 2924 const M = (Ls + 16) / 116; 2925 const L = M + as / 500; 2926 const N = M - bs / 200; 2927 const X = this.XW * this.#fn_g(L); 2928 const Y = this.YW * this.#fn_g(M); 2929 const Z = this.ZW * this.#fn_g(N); 2930 let r, g, b; 2931 if (this.ZW < 1) { 2932 r = X * 3.1339 + Y * -1.617 + Z * -0.4906; 2933 g = X * -0.9785 + Y * 1.916 + Z * 0.0333; 2934 b = X * 0.072 + Y * -0.229 + Z * 1.4057; 2935 } else { 2936 r = X * 3.2406 + Y * -1.5372 + Z * -0.4986; 2937 g = X * -0.9689 + Y * 1.8758 + Z * 0.0415; 2938 b = X * 0.0557 + Y * -0.204 + Z * 1.057; 2939 } 2940 dest[destOffset] = Math.sqrt(r) * 255; 2941 dest[destOffset + 1] = Math.sqrt(g) * 255; 2942 dest[destOffset + 2] = Math.sqrt(b) * 255; 2943 } 2944 getRgbItem(src, srcOffset, dest, destOffset) { 2945 this.#toRgb(src, srcOffset, false, dest, destOffset); 2946 } 2947 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2948 const maxVal = (1 << bits) - 1; 2949 for (let i = 0; i < count; i++) { 2950 this.#toRgb(src, srcOffset, maxVal, dest, destOffset); 2951 srcOffset += 3; 2952 destOffset += 3 + alpha01; 2953 } 2954 } 2955 getOutputLength(inputLength, alpha01) { 2956 return inputLength * (3 + alpha01) / 3 | 0; 2957 } 2958 isDefaultDecode(decodeMap, bpc) { 2959 return true; 2960 } 2961 get usesZeroToOneRange() { 2962 return shadow(this, "usesZeroToOneRange", false); 2963 } 2964} 2965 2966;// ./src/core/binary_cmap.js 2967 2968function hexToInt(a, size) { 2969 let n = 0; 2970 for (let i = 0; i <= size; i++) { 2971 n = n << 8 | a[i]; 2972 } 2973 return n >>> 0; 2974} 2975function hexToStr(a, size) { 2976 if (size === 1) { 2977 return String.fromCharCode(a[0], a[1]); 2978 } 2979 if (size === 3) { 2980 return String.fromCharCode(a[0], a[1], a[2], a[3]); 2981 } 2982 return String.fromCharCode(...a.subarray(0, size + 1)); 2983} 2984function addHex(a, b, size) { 2985 let c = 0; 2986 for (let i = size; i >= 0; i--) { 2987 c += a[i] + b[i]; 2988 a[i] = c & 255; 2989 c >>= 8; 2990 } 2991} 2992function incHex(a, size) { 2993 let c = 1; 2994 for (let i = size; i >= 0 && c > 0; i--) { 2995 c += a[i]; 2996 a[i] = c & 255; 2997 c >>= 8; 2998 } 2999} 3000const MAX_NUM_SIZE = 16; 3001const MAX_ENCODED_NUM_SIZE = 19; 3002class BinaryCMapStream { 3003 constructor(data) { 3004 this.buffer = data; 3005 this.pos = 0; 3006 this.end = data.length; 3007 this.tmpBuf = new Uint8Array(MAX_ENCODED_NUM_SIZE); 3008 } 3009 readByte() { 3010 if (this.pos >= this.end) { 3011 return -1; 3012 } 3013 return this.buffer[this.pos++]; 3014 } 3015 readNumber() { 3016 let n = 0; 3017 let last; 3018 do { 3019 const b = this.readByte(); 3020 if (b < 0) { 3021 throw new FormatError("unexpected EOF in bcmap"); 3022 } 3023 last = !(b & 0x80); 3024 n = n << 7 | b & 0x7f; 3025 } while (!last); 3026 return n; 3027 } 3028 readSigned() { 3029 const n = this.readNumber(); 3030 return n & 1 ? ~(n >>> 1) : n >>> 1; 3031 } 3032 readHex(num, size) { 3033 num.set(this.buffer.subarray(this.pos, this.pos + size + 1)); 3034 this.pos += size + 1; 3035 } 3036 readHexNumber(num, size) { 3037 let last; 3038 const stack = this.tmpBuf; 3039 let sp = 0; 3040 do { 3041 const b = this.readByte(); 3042 if (b < 0) { 3043 throw new FormatError("unexpected EOF in bcmap"); 3044 } 3045 last = !(b & 0x80); 3046 stack[sp++] = b & 0x7f; 3047 } while (!last); 3048 let i = size, 3049 buffer = 0, 3050 bufferSize = 0; 3051 while (i >= 0) { 3052 while (bufferSize < 8 && stack.length > 0) { 3053 buffer |= stack[--sp] << bufferSize; 3054 bufferSize += 7; 3055 } 3056 num[i] = buffer & 255; 3057 i--; 3058 buffer >>= 8; 3059 bufferSize -= 8; 3060 } 3061 } 3062 readHexSigned(num, size) { 3063 this.readHexNumber(num, size); 3064 const sign = num[size] & 1 ? 255 : 0; 3065 let c = 0; 3066 for (let i = 0; i <= size; i++) { 3067 c = (c & 1) << 8 | num[i]; 3068 num[i] = c >> 1 ^ sign; 3069 } 3070 } 3071 readString() { 3072 const len = this.readNumber(), 3073 buf = new Array(len); 3074 for (let i = 0; i < len; i++) { 3075 buf[i] = this.readNumber(); 3076 } 3077 return String.fromCharCode(...buf); 3078 } 3079} 3080class BinaryCMapReader { 3081 async process(data, cMap, extend) { 3082 const stream = new BinaryCMapStream(data); 3083 const header = stream.readByte(); 3084 cMap.vertical = !!(header & 1); 3085 let useCMap = null; 3086 const start = new Uint8Array(MAX_NUM_SIZE); 3087 const end = new Uint8Array(MAX_NUM_SIZE); 3088 const char = new Uint8Array(MAX_NUM_SIZE); 3089 const charCode = new Uint8Array(MAX_NUM_SIZE); 3090 const tmp = new Uint8Array(MAX_NUM_SIZE); 3091 let code; 3092 let b; 3093 while ((b = stream.readByte()) >= 0) { 3094 const type = b >> 5; 3095 if (type === 7) { 3096 switch (b & 0x1f) { 3097 case 0: 3098 stream.readString(); 3099 break; 3100 case 1: 3101 useCMap = stream.readString(); 3102 break; 3103 } 3104 continue; 3105 } 3106 const sequence = !!(b & 0x10); 3107 const dataSize = b & 15; 3108 if (dataSize + 1 > MAX_NUM_SIZE) { 3109 throw new Error("BinaryCMapReader.process: Invalid dataSize."); 3110 } 3111 const ucs2DataSize = 1; 3112 const subitemsCount = stream.readNumber(); 3113 switch (type) { 3114 case 0: 3115 stream.readHex(start, dataSize); 3116 stream.readHexNumber(end, dataSize); 3117 addHex(end, start, dataSize); 3118 cMap.addCodespaceRange(dataSize + 1, hexToInt(start, dataSize), hexToInt(end, dataSize)); 3119 for (let i = 1; i < subitemsCount; i++) { 3120 incHex(end, dataSize); 3121 stream.readHexNumber(start, dataSize); 3122 addHex(start, end, dataSize); 3123 stream.readHexNumber(end, dataSize); 3124 addHex(end, start, dataSize); 3125 cMap.addCodespaceRange(dataSize + 1, hexToInt(start, dataSize), hexToInt(end, dataSize)); 3126 } 3127 break; 3128 case 1: 3129 stream.readHex(start, dataSize); 3130 stream.readHexNumber(end, dataSize); 3131 addHex(end, start, dataSize); 3132 stream.readNumber(); 3133 for (let i = 1; i < subitemsCount; i++) { 3134 incHex(end, dataSize); 3135 stream.readHexNumber(start, dataSize); 3136 addHex(start, end, dataSize); 3137 stream.readHexNumber(end, dataSize); 3138 addHex(end, start, dataSize); 3139 stream.readNumber(); 3140 } 3141 break; 3142 case 2: 3143 stream.readHex(char, dataSize); 3144 code = stream.readNumber(); 3145 cMap.mapOne(hexToInt(char, dataSize), code); 3146 for (let i = 1; i < subitemsCount; i++) { 3147 incHex(char, dataSize); 3148 if (!sequence) { 3149 stream.readHexNumber(tmp, dataSize); 3150 addHex(char, tmp, dataSize); 3151 } 3152 code = stream.readSigned() + (code + 1); 3153 cMap.mapOne(hexToInt(char, dataSize), code); 3154 } 3155 break; 3156 case 3: 3157 stream.readHex(start, dataSize); 3158 stream.readHexNumber(end, dataSize); 3159 addHex(end, start, dataSize); 3160 code = stream.readNumber(); 3161 cMap.mapCidRange(hexToInt(start, dataSize), hexToInt(end, dataSize), code); 3162 for (let i = 1; i < subitemsCount; i++) { 3163 incHex(end, dataSize); 3164 if (!sequence) { 3165 stream.readHexNumber(start, dataSize); 3166 addHex(start, end, dataSize); 3167 } else { 3168 start.set(end); 3169 } 3170 stream.readHexNumber(end, dataSize); 3171 addHex(end, start, dataSize); 3172 code = stream.readNumber(); 3173 cMap.mapCidRange(hexToInt(start, dataSize), hexToInt(end, dataSize), code); 3174 } 3175 break; 3176 case 4: 3177 stream.readHex(char, ucs2DataSize); 3178 stream.readHex(charCode, dataSize); 3179 cMap.mapOne(hexToInt(char, ucs2DataSize), hexToStr(charCode, dataSize)); 3180 for (let i = 1; i < subitemsCount; i++) { 3181 incHex(char, ucs2DataSize); 3182 if (!sequence) { 3183 stream.readHexNumber(tmp, ucs2DataSize); 3184 addHex(char, tmp, ucs2DataSize); 3185 } 3186 incHex(charCode, dataSize); 3187 stream.readHexSigned(tmp, dataSize); 3188 addHex(charCode, tmp, dataSize); 3189 cMap.mapOne(hexToInt(char, ucs2DataSize), hexToStr(charCode, dataSize)); 3190 } 3191 break; 3192 case 5: 3193 stream.readHex(start, ucs2DataSize); 3194 stream.readHexNumber(end, ucs2DataSize); 3195 addHex(end, start, ucs2DataSize); 3196 stream.readHex(charCode, dataSize); 3197 cMap.mapBfRange(hexToInt(start, ucs2DataSize), hexToInt(end, ucs2DataSize), hexToStr(charCode, dataSize)); 3198 for (let i = 1; i < subitemsCount; i++) { 3199 incHex(end, ucs2DataSize); 3200 if (!sequence) { 3201 stream.readHexNumber(start, ucs2DataSize); 3202 addHex(start, end, ucs2DataSize); 3203 } else { 3204 start.set(end); 3205 } 3206 stream.readHexNumber(end, ucs2DataSize); 3207 addHex(end, start, ucs2DataSize); 3208 stream.readHex(charCode, dataSize); 3209 cMap.mapBfRange(hexToInt(start, ucs2DataSize), hexToInt(end, ucs2DataSize), hexToStr(charCode, dataSize)); 3210 } 3211 break; 3212 default: 3213 throw new Error(`BinaryCMapReader.process - unknown type: ${type}`); 3214 } 3215 } 3216 if (useCMap) { 3217 return extend(useCMap); 3218 } 3219 return cMap; 3220 } 3221} 3222 3223;// ./src/core/decode_stream.js 3224 3225 3226const emptyBuffer = new Uint8Array(0); 3227class DecodeStream extends BaseStream { 3228 constructor(maybeMinBufferLength) { 3229 super(); 3230 this._rawMinBufferLength = maybeMinBufferLength || 0; 3231 this.pos = 0; 3232 this.bufferLength = 0; 3233 this.eof = false; 3234 this.buffer = emptyBuffer; 3235 this.minBufferLength = 512; 3236 if (maybeMinBufferLength) { 3237 while (this.minBufferLength < maybeMinBufferLength) { 3238 this.minBufferLength *= 2; 3239 } 3240 } 3241 } 3242 get isEmpty() { 3243 while (!this.eof && this.bufferLength === 0) { 3244 this.readBlock(); 3245 } 3246 return this.bufferLength === 0; 3247 } 3248 ensureBuffer(requested) { 3249 const buffer = this.buffer; 3250 if (requested <= buffer.byteLength) { 3251 return buffer; 3252 } 3253 let size = this.minBufferLength; 3254 while (size < requested) { 3255 size *= 2; 3256 } 3257 const buffer2 = new Uint8Array(size); 3258 buffer2.set(buffer); 3259 return this.buffer = buffer2; 3260 } 3261 getByte() { 3262 const pos = this.pos; 3263 while (this.bufferLength <= pos) { 3264 if (this.eof) { 3265 return -1; 3266 } 3267 this.readBlock(); 3268 } 3269 return this.buffer[this.pos++]; 3270 } 3271 getBytes(length, decoderOptions = null) { 3272 const pos = this.pos; 3273 let end; 3274 if (length) { 3275 this.ensureBuffer(pos + length); 3276 end = pos + length; 3277 while (!this.eof && this.bufferLength < end) { 3278 this.readBlock(decoderOptions); 3279 } 3280 const bufEnd = this.bufferLength; 3281 if (end > bufEnd) { 3282 end = bufEnd; 3283 } 3284 } else { 3285 while (!this.eof) { 3286 this.readBlock(decoderOptions); 3287 } 3288 end = this.bufferLength; 3289 } 3290 this.pos = end; 3291 return this.buffer.subarray(pos, end); 3292 } 3293 async getImageData(length, decoderOptions = null) { 3294 if (!this.canAsyncDecodeImageFromBuffer) { 3295 return this.getBytes(length, decoderOptions); 3296 } 3297 const data = await this.stream.asyncGetBytes(); 3298 return this.decodeImage(data, decoderOptions); 3299 } 3300 reset() { 3301 this.pos = 0; 3302 } 3303 makeSubStream(start, length, dict = null) { 3304 if (length === undefined) { 3305 while (!this.eof) { 3306 this.readBlock(); 3307 } 3308 } else { 3309 const end = start + length; 3310 while (this.bufferLength <= end && !this.eof) { 3311 this.readBlock(); 3312 } 3313 } 3314 return new Stream(this.buffer, start, length, dict); 3315 } 3316 getBaseStreams() { 3317 return this.str ? this.str.getBaseStreams() : null; 3318 } 3319} 3320class StreamsSequenceStream extends DecodeStream { 3321 constructor(streams, onError = null) { 3322 streams = streams.filter(s => s instanceof BaseStream); 3323 let maybeLength = 0; 3324 for (const stream of streams) { 3325 maybeLength += stream instanceof DecodeStream ? stream._rawMinBufferLength : stream.length; 3326 } 3327 super(maybeLength); 3328 this.streams = streams; 3329 this._onError = onError; 3330 } 3331 readBlock() { 3332 const streams = this.streams; 3333 if (streams.length === 0) { 3334 this.eof = true; 3335 return; 3336 } 3337 const stream = streams.shift(); 3338 let chunk; 3339 try { 3340 chunk = stream.getBytes(); 3341 } catch (reason) { 3342 if (this._onError) { 3343 this._onError(reason, stream.dict?.objId); 3344 return; 3345 } 3346 throw reason; 3347 } 3348 const bufferLength = this.bufferLength; 3349 const newLength = bufferLength + chunk.length; 3350 const buffer = this.ensureBuffer(newLength); 3351 buffer.set(chunk, bufferLength); 3352 this.bufferLength = newLength; 3353 } 3354 getBaseStreams() { 3355 const baseStreamsBuf = []; 3356 for (const stream of this.streams) { 3357 const baseStreams = stream.getBaseStreams(); 3358 if (baseStreams) { 3359 baseStreamsBuf.push(...baseStreams); 3360 } 3361 } 3362 return baseStreamsBuf.length > 0 ? baseStreamsBuf : null; 3363 } 3364} 3365 3366;// ./src/core/ascii_85_stream.js 3367 3368 3369class Ascii85Stream extends DecodeStream { 3370 constructor(str, maybeLength) { 3371 if (maybeLength) { 3372 maybeLength *= 0.8; 3373 } 3374 super(maybeLength); 3375 this.str = str; 3376 this.dict = str.dict; 3377 this.input = new Uint8Array(5); 3378 } 3379 readBlock() { 3380 const TILDA_CHAR = 0x7e; 3381 const Z_LOWER_CHAR = 0x7a; 3382 const EOF = -1; 3383 const str = this.str; 3384 let c = str.getByte(); 3385 while (isWhiteSpace(c)) { 3386 c = str.getByte(); 3387 } 3388 if (c === EOF || c === TILDA_CHAR) { 3389 this.eof = true; 3390 return; 3391 } 3392 const bufferLength = this.bufferLength; 3393 let buffer, i; 3394 if (c === Z_LOWER_CHAR) { 3395 buffer = this.ensureBuffer(bufferLength + 4); 3396 for (i = 0; i < 4; ++i) { 3397 buffer[bufferLength + i] = 0; 3398 } 3399 this.bufferLength += 4; 3400 } else { 3401 const input = this.input; 3402 input[0] = c; 3403 for (i = 1; i < 5; ++i) { 3404 c = str.getByte(); 3405 while (isWhiteSpace(c)) { 3406 c = str.getByte(); 3407 } 3408 input[i] = c; 3409 if (c === EOF || c === TILDA_CHAR) { 3410 break; 3411 } 3412 } 3413 buffer = this.ensureBuffer(bufferLength + i - 1); 3414 this.bufferLength += i - 1; 3415 if (i < 5) { 3416 for (; i < 5; ++i) { 3417 input[i] = 0x21 + 84; 3418 } 3419 this.eof = true; 3420 } 3421 let t = 0; 3422 for (i = 0; i < 5; ++i) { 3423 t = t * 85 + (input[i] - 0x21); 3424 } 3425 for (i = 3; i >= 0; --i) { 3426 buffer[bufferLength + i] = t & 0xff; 3427 t >>= 8; 3428 } 3429 } 3430 } 3431} 3432 3433;// ./src/core/ascii_hex_stream.js 3434 3435class AsciiHexStream extends DecodeStream { 3436 constructor(str, maybeLength) { 3437 if (maybeLength) { 3438 maybeLength *= 0.5; 3439 } 3440 super(maybeLength); 3441 this.str = str; 3442 this.dict = str.dict; 3443 this.firstDigit = -1; 3444 } 3445 readBlock() { 3446 const UPSTREAM_BLOCK_SIZE = 8000; 3447 const bytes = this.str.getBytes(UPSTREAM_BLOCK_SIZE); 3448 if (!bytes.length) { 3449 this.eof = true; 3450 return; 3451 } 3452 const maxDecodeLength = bytes.length + 1 >> 1; 3453 const buffer = this.ensureBuffer(this.bufferLength + maxDecodeLength); 3454 let bufferLength = this.bufferLength; 3455 let firstDigit = this.firstDigit; 3456 for (const ch of bytes) { 3457 let digit; 3458 if (ch >= 0x30 && ch <= 0x39) { 3459 digit = ch & 0x0f; 3460 } else if (ch >= 0x41 && ch <= 0x46 || ch >= 0x61 && ch <= 0x66) { 3461 digit = (ch & 0x0f) + 9; 3462 } else if (ch === 0x3e) { 3463 this.eof = true; 3464 break; 3465 } else { 3466 continue; 3467 } 3468 if (firstDigit < 0) { 3469 firstDigit = digit; 3470 } else { 3471 buffer[bufferLength++] = firstDigit << 4 | digit; 3472 firstDigit = -1; 3473 } 3474 } 3475 if (firstDigit >= 0 && this.eof) { 3476 buffer[bufferLength++] = firstDigit << 4; 3477 firstDigit = -1; 3478 } 3479 this.firstDigit = firstDigit; 3480 this.bufferLength = bufferLength; 3481 } 3482} 3483 3484;// ./src/core/ccitt.js
vendor: 26,827 bytes, lines 3484-4037
3484 3485 3486const ccittEOL = -2; 3487const ccittEOF = -1; 3488const twoDimPass = 0; 3489const twoDimHoriz = 1; 3490const twoDimVert0 = 2; 3491const twoDimVertR1 = 3; 3492const twoDimVertL1 = 4; 3493const twoDimVertR2 = 5; 3494const twoDimVertL2 = 6; 3495const twoDimVertR3 = 7; 3496const twoDimVertL3 = 8; 3497const twoDimTable = [[-1, -1], [-1, -1], [7, twoDimVertL3], [7, twoDimVertR3], [6, twoDimVertL2], [6, twoDimVertL2], [6, twoDimVertR2], [6, twoDimVertR2], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0]]; 3498const whiteTable1 = [[-1, -1], [12, ccittEOL], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [11, 1792], [11, 1792], [12, 1984], [12, 2048], [12, 2112], [12, 2176], [12, 2240], [12, 2304], [11, 1856], [11, 1856], [11, 1920], [11, 1920], [12, 2368], [12, 2432], [12, 2496], [12, 2560]]; 3499const whiteTable2 = [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [8, 29], [8, 29], [8, 30], [8, 30], [8, 45], [8, 45], [8, 46], [8, 46], [7, 22], [7, 22], [7, 22], [7, 22], [7, 23], [7, 23], [7, 23], [7, 23], [8, 47], [8, 47], [8, 48], [8, 48], [6, 13], [6, 13], [6, 13], [6, 13], [6, 13], [6, 13], [6, 13], [6, 13], [7, 20], [7, 20], [7, 20], [7, 20], [8, 33], [8, 33], [8, 34], [8, 34], [8, 35], [8, 35], [8, 36], [8, 36], [8, 37], [8, 37], [8, 38], [8, 38], [7, 19], [7, 19], [7, 19], [7, 19], [8, 31], [8, 31], [8, 32], [8, 32], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [6, 12], [6, 12], [6, 12], [6, 12], [6, 12], [6, 12], [6, 12], [6, 12], [8, 53], [8, 53], [8, 54], [8, 54], [7, 26], [7, 26], [7, 26], [7, 26], [8, 39], [8, 39], [8, 40], [8, 40], [8, 41], [8, 41], [8, 42], [8, 42], [8, 43], [8, 43], [8, 44], [8, 44], [7, 21], [7, 21], [7, 21], [7, 21], [7, 28], [7, 28], [7, 28], [7, 28], [8, 61], [8, 61], [8, 62], [8, 62], [8, 63], [8, 63], [8, 0], [8, 0], [8, 320], [8, 320], [8, 384], [8, 384], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [7, 27], [7, 27], [7, 27], [7, 27], [8, 59], [8, 59], [8, 60], [8, 60], [9, 1472], [9, 1536], [9, 1600], [9, 1728], [7, 18], [7, 18], [7, 18], [7, 18], [7, 24], [7, 24], [7, 24], [7, 24], [8, 49], [8, 49], [8, 50], [8, 50], [8, 51], [8, 51], [8, 52], [8, 52], [7, 25], [7, 25], [7, 25], [7, 25], [8, 55], [8, 55], [8, 56], [8, 56], [8, 57], [8, 57], [8, 58], [8, 58], [6, 192], [6, 192], [6, 192], [6, 192], [6, 192], [6, 192], [6, 192], [6, 192], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [8, 448], [8, 448], [8, 512], [8, 512], [9, 704], [9, 768], [8, 640], [8, 640], [8, 576], [8, 576], [9, 832], [9, 896], [9, 960], [9, 1024], [9, 1088], [9, 1152], [9, 1216], [9, 1280], [9, 1344], [9, 1408], [7, 256], [7, 256], [7, 256], [7, 256], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [6, 16], [6, 16], [6, 16], [6, 16], [6, 16], [6, 16], [6, 16], [6, 16], [6, 17], [6, 17], [6, 17], [6, 17], [6, 17], [6, 17], [6, 17], [6, 17], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [6, 14], [6, 14], [6, 14], [6, 14], [6, 14], [6, 14], [6, 14], [6, 14], [6, 15], [6, 15], [6, 15], [6, 15], [6, 15], [6, 15], [6, 15], [6, 15], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7]]; 3500const blackTable1 = [[-1, -1], [-1, -1], [12, ccittEOL], [12, ccittEOL], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [11, 1792], [11, 1792], [11, 1792], [11, 1792], [12, 1984], [12, 1984], [12, 2048], [12, 2048], [12, 2112], [12, 2112], [12, 2176], [12, 2176], [12, 2240], [12, 2240], [12, 2304], [12, 2304], [11, 1856], [11, 1856], [11, 1856], [11, 1856], [11, 1920], [11, 1920], [11, 1920], [11, 1920], [12, 2368], [12, 2368], [12, 2432], [12, 2432], [12, 2496], [12, 2496], [12, 2560], [12, 2560], [10, 18], [10, 18], [10, 18], [10, 18], [10, 18], [10, 18], [10, 18], [10, 18], [12, 52], [12, 52], [13, 640], [13, 704], [13, 768], [13, 832], [12, 55], [12, 55], [12, 56], [12, 56], [13, 1280], [13, 1344], [13, 1408], [13, 1472], [12, 59], [12, 59], [12, 60], [12, 60], [13, 1536], [13, 1600], [11, 24], [11, 24], [11, 24], [11, 24], [11, 25], [11, 25], [11, 25], [11, 25], [13, 1664], [13, 1728], [12, 320], [12, 320], [12, 384], [12, 384], [12, 448], [12, 448], [13, 512], [13, 576], [12, 53], [12, 53], [12, 54], [12, 54], [13, 896], [13, 960], [13, 1024], [13, 1088], [13, 1152], [13, 1216], [10, 64], [10, 64], [10, 64], [10, 64], [10, 64], [10, 64], [10, 64], [10, 64]]; 3501const blackTable2 = [[8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [11, 23], [11, 23], [12, 50], [12, 51], [12, 44], [12, 45], [12, 46], [12, 47], [12, 57], [12, 58], [12, 61], [12, 256], [10, 16], [10, 16], [10, 16], [10, 16], [10, 17], [10, 17], [10, 17], [10, 17], [12, 48], [12, 49], [12, 62], [12, 63], [12, 30], [12, 31], [12, 32], [12, 33], [12, 40], [12, 41], [11, 22], [11, 22], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [9, 15], [9, 15], [9, 15], [9, 15], [9, 15], [9, 15], [9, 15], [9, 15], [12, 128], [12, 192], [12, 26], [12, 27], [12, 28], [12, 29], [11, 19], [11, 19], [11, 20], [11, 20], [12, 34], [12, 35], [12, 36], [12, 37], [12, 38], [12, 39], [11, 21], [11, 21], [12, 42], [12, 43], [10, 0], [10, 0], [10, 0], [10, 0], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12]]; 3502const blackTable3 = [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [6, 9], [6, 8], [5, 7], [5, 7], [4, 6], [4, 6], [4, 6], [4, 6], [4, 5], [4, 5], [4, 5], [4, 5], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2]]; 3503class CCITTFaxDecoder { 3504 constructor(source, options = {}) { 3505 if (typeof source?.next !== "function") { 3506 throw new Error('CCITTFaxDecoder - invalid "source" parameter.'); 3507 } 3508 this.source = source; 3509 this.eof = false; 3510 this.encoding = options.K || 0; 3511 this.eoline = options.EndOfLine || false; 3512 this.byteAlign = options.EncodedByteAlign || false; 3513 this.columns = options.Columns || 1728; 3514 this.rows = options.Rows || 0; 3515 this.eoblock = options.EndOfBlock ?? true; 3516 this.black = options.BlackIs1 || false; 3517 this.codingLine = new Uint32Array(this.columns + 1); 3518 this.refLine = new Uint32Array(this.columns + 2); 3519 this.codingLine[0] = this.columns; 3520 this.codingPos = 0; 3521 this.row = 0; 3522 this.nextLine2D = this.encoding < 0; 3523 this.inputBits = 0; 3524 this.inputBuf = 0; 3525 this.outputBits = 0; 3526 this.rowsDone = false; 3527 let code1; 3528 while ((code1 = this._lookBits(12)) === 0) { 3529 this._eatBits(1); 3530 } 3531 if (code1 === 1) { 3532 this._eatBits(12); 3533 } 3534 if (this.encoding > 0) { 3535 this.nextLine2D = !this._lookBits(1); 3536 this._eatBits(1); 3537 } 3538 } 3539 readNextChar() { 3540 if (this.eof) { 3541 return -1; 3542 } 3543 const refLine = this.refLine; 3544 const codingLine = this.codingLine; 3545 const columns = this.columns; 3546 let refPos, blackPixels, bits, i; 3547 if (this.outputBits === 0) { 3548 if (this.rowsDone) { 3549 this.eof = true; 3550 } 3551 if (this.eof) { 3552 return -1; 3553 } 3554 this.err = false; 3555 let code1, code2, code3; 3556 if (this.nextLine2D) { 3557 for (i = 0; codingLine[i] < columns; ++i) { 3558 refLine[i] = codingLine[i]; 3559 } 3560 refLine[i++] = columns; 3561 refLine[i] = columns; 3562 codingLine[0] = 0; 3563 this.codingPos = 0; 3564 refPos = 0; 3565 blackPixels = 0; 3566 while (codingLine[this.codingPos] < columns) { 3567 code1 = this._getTwoDimCode(); 3568 switch (code1) { 3569 case twoDimPass: 3570 this._addPixels(refLine[refPos + 1], blackPixels); 3571 if (refLine[refPos + 1] < columns) { 3572 refPos += 2; 3573 } 3574 break; 3575 case twoDimHoriz: 3576 code1 = code2 = 0; 3577 if (blackPixels) { 3578 do { 3579 code1 += code3 = this._getBlackCode(); 3580 } while (code3 >= 64); 3581 do { 3582 code2 += code3 = this._getWhiteCode(); 3583 } while (code3 >= 64); 3584 } else { 3585 do { 3586 code1 += code3 = this._getWhiteCode(); 3587 } while (code3 >= 64); 3588 do { 3589 code2 += code3 = this._getBlackCode(); 3590 } while (code3 >= 64); 3591 } 3592 this._addPixels(codingLine[this.codingPos] + code1, blackPixels); 3593 if (codingLine[this.codingPos] < columns) { 3594 this._addPixels(codingLine[this.codingPos] + code2, blackPixels ^ 1); 3595 } 3596 while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { 3597 refPos += 2; 3598 } 3599 break; 3600 case twoDimVertR3: 3601 this._addPixels(refLine[refPos] + 3, blackPixels); 3602 blackPixels ^= 1; 3603 if (codingLine[this.codingPos] < columns) { 3604 ++refPos; 3605 while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { 3606 refPos += 2; 3607 } 3608 } 3609 break; 3610 case twoDimVertR2: 3611 this._addPixels(refLine[refPos] + 2, blackPixels); 3612 blackPixels ^= 1; 3613 if (codingLine[this.codingPos] < columns) { 3614 ++refPos; 3615 while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { 3616 refPos += 2; 3617 } 3618 } 3619 break; 3620 case twoDimVertR1: 3621 this._addPixels(refLine[refPos] + 1, blackPixels); 3622 blackPixels ^= 1; 3623 if (codingLine[this.codingPos] < columns) { 3624 ++refPos; 3625 while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { 3626 refPos += 2; 3627 } 3628 } 3629 break; 3630 case twoDimVert0: 3631 this._addPixels(refLine[refPos], blackPixels); 3632 blackPixels ^= 1; 3633 if (codingLine[this.codingPos] < columns) { 3634 ++refPos; 3635 while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { 3636 refPos += 2; 3637 } 3638 } 3639 break; 3640 case twoDimVertL3: 3641 this._addPixelsNeg(refLine[refPos] - 3, blackPixels); 3642 blackPixels ^= 1; 3643 if (codingLine[this.codingPos] < columns) { 3644 if (refPos > 0) { 3645 --refPos; 3646 } else { 3647 ++refPos; 3648 } 3649 while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { 3650 refPos += 2; 3651 } 3652 } 3653 break; 3654 case twoDimVertL2: 3655 this._addPixelsNeg(refLine[refPos] - 2, blackPixels); 3656 blackPixels ^= 1; 3657 if (codingLine[this.codingPos] < columns) { 3658 if (refPos > 0) { 3659 --refPos; 3660 } else { 3661 ++refPos; 3662 } 3663 while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { 3664 refPos += 2; 3665 } 3666 } 3667 break; 3668 case twoDimVertL1: 3669 this._addPixelsNeg(refLine[refPos] - 1, blackPixels); 3670 blackPixels ^= 1; 3671 if (codingLine[this.codingPos] < columns) { 3672 if (refPos > 0) { 3673 --refPos; 3674 } else { 3675 ++refPos; 3676 } 3677 while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { 3678 refPos += 2; 3679 } 3680 } 3681 break; 3682 case ccittEOF: 3683 this._addPixels(columns, 0); 3684 this.eof = true; 3685 break; 3686 default: 3687 info("bad 2d code"); 3688 this._addPixels(columns, 0); 3689 this.err = true; 3690 } 3691 } 3692 } else { 3693 codingLine[0] = 0; 3694 this.codingPos = 0; 3695 blackPixels = 0; 3696 while (codingLine[this.codingPos] < columns) { 3697 code1 = 0; 3698 if (blackPixels) { 3699 do { 3700 code1 += code3 = this._getBlackCode(); 3701 } while (code3 >= 64); 3702 } else { 3703 do { 3704 code1 += code3 = this._getWhiteCode(); 3705 } while (code3 >= 64); 3706 } 3707 this._addPixels(codingLine[this.codingPos] + code1, blackPixels); 3708 blackPixels ^= 1; 3709 } 3710 } 3711 let gotEOL = false; 3712 if (this.byteAlign) { 3713 this.inputBits &= ~7; 3714 } 3715 if (!this.eoblock && this.row === this.rows - 1) { 3716 this.rowsDone = true; 3717 } else { 3718 code1 = this._lookBits(12); 3719 if (this.eoline) { 3720 while (code1 !== ccittEOF && code1 !== 1) { 3721 this._eatBits(1); 3722 code1 = this._lookBits(12); 3723 } 3724 } else { 3725 while (code1 === 0) { 3726 this._eatBits(1); 3727 code1 = this._lookBits(12); 3728 } 3729 } 3730 if (code1 === 1) { 3731 this._eatBits(12); 3732 gotEOL = true; 3733 } else if (code1 === ccittEOF) { 3734 this.eof = true; 3735 } 3736 } 3737 if (!this.eof && this.encoding > 0 && !this.rowsDone) { 3738 this.nextLine2D = !this._lookBits(1); 3739 this._eatBits(1); 3740 } 3741 if (this.eoblock && gotEOL && this.byteAlign) { 3742 code1 = this._lookBits(12); 3743 if (code1 === 1) { 3744 this._eatBits(12); 3745 if (this.encoding > 0) { 3746 this._lookBits(1); 3747 this._eatBits(1); 3748 } 3749 if (this.encoding >= 0) { 3750 for (i = 0; i < 4; ++i) { 3751 code1 = this._lookBits(12); 3752 if (code1 !== 1) { 3753 info("bad rtc code: " + code1); 3754 } 3755 this._eatBits(12); 3756 if (this.encoding > 0) { 3757 this._lookBits(1); 3758 this._eatBits(1); 3759 } 3760 } 3761 } 3762 this.eof = true; 3763 } 3764 } else if (this.err && this.eoline) { 3765 while (true) { 3766 code1 = this._lookBits(13); 3767 if (code1 === ccittEOF) { 3768 this.eof = true; 3769 return -1; 3770 } 3771 if (code1 >> 1 === 1) { 3772 break; 3773 } 3774 this._eatBits(1); 3775 } 3776 this._eatBits(12); 3777 if (this.encoding > 0) { 3778 this._eatBits(1); 3779 this.nextLine2D = !(code1 & 1); 3780 } 3781 } 3782 this.outputBits = codingLine[0] > 0 ? codingLine[this.codingPos = 0] : codingLine[this.codingPos = 1]; 3783 this.row++; 3784 } 3785 let c; 3786 if (this.outputBits >= 8) { 3787 c = this.codingPos & 1 ? 0 : 0xff; 3788 this.outputBits -= 8; 3789 if (this.outputBits === 0 && codingLine[this.codingPos] < columns) { 3790 this.codingPos++; 3791 this.outputBits = codingLine[this.codingPos] - codingLine[this.codingPos - 1]; 3792 } 3793 } else { 3794 bits = 8; 3795 c = 0; 3796 do { 3797 if (typeof this.outputBits !== "number") { 3798 throw new FormatError('Invalid /CCITTFaxDecode data, "outputBits" must be a number.'); 3799 } 3800 if (this.outputBits > bits) { 3801 c <<= bits; 3802 if (!(this.codingPos & 1)) { 3803 c |= 0xff >> 8 - bits; 3804 } 3805 this.outputBits -= bits; 3806 bits = 0; 3807 } else { 3808 c <<= this.outputBits; 3809 if (!(this.codingPos & 1)) { 3810 c |= 0xff >> 8 - this.outputBits; 3811 } 3812 bits -= this.outputBits; 3813 this.outputBits = 0; 3814 if (codingLine[this.codingPos] < columns) { 3815 this.codingPos++; 3816 this.outputBits = codingLine[this.codingPos] - codingLine[this.codingPos - 1]; 3817 } else if (bits > 0) { 3818 c <<= bits; 3819 bits = 0; 3820 } 3821 } 3822 } while (bits); 3823 } 3824 if (this.black) { 3825 c ^= 0xff; 3826 } 3827 return c; 3828 } 3829 _addPixels(a1, blackPixels) { 3830 const codingLine = this.codingLine; 3831 let codingPos = this.codingPos; 3832 if (a1 > codingLine[codingPos]) { 3833 if (a1 > this.columns) { 3834 info("row is wrong length"); 3835 this.err = true; 3836 a1 = this.columns; 3837 } 3838 if (codingPos & 1 ^ blackPixels) { 3839 ++codingPos; 3840 } 3841 codingLine[codingPos] = a1; 3842 } 3843 this.codingPos = codingPos; 3844 } 3845 _addPixelsNeg(a1, blackPixels) { 3846 const codingLine = this.codingLine; 3847 let codingPos = this.codingPos; 3848 if (a1 > codingLine[codingPos]) { 3849 if (a1 > this.columns) { 3850 info("row is wrong length"); 3851 this.err = true; 3852 a1 = this.columns; 3853 } 3854 if (codingPos & 1 ^ blackPixels) { 3855 ++codingPos; 3856 } 3857 codingLine[codingPos] = a1; 3858 } else if (a1 < codingLine[codingPos]) { 3859 if (a1 < 0) { 3860 info("invalid code"); 3861 this.err = true; 3862 a1 = 0; 3863 } 3864 while (codingPos > 0 && a1 < codingLine[codingPos - 1]) { 3865 --codingPos; 3866 } 3867 codingLine[codingPos] = a1; 3868 } 3869 this.codingPos = codingPos; 3870 } 3871 _findTableCode(start, end, table, limit) { 3872 const limitValue = limit || 0; 3873 for (let i = start; i <= end; ++i) { 3874 let code = this._lookBits(i); 3875 if (code === ccittEOF) { 3876 return [true, 1, false]; 3877 } 3878 if (i < end) { 3879 code <<= end - i; 3880 } 3881 if (!limitValue || code >= limitValue) { 3882 const p = table[code - limitValue]; 3883 if (p[0] === i) { 3884 this._eatBits(i); 3885 return [true, p[1], true]; 3886 } 3887 } 3888 } 3889 return [false, 0, false]; 3890 } 3891 _getTwoDimCode() { 3892 let code = 0; 3893 let p; 3894 if (this.eoblock) { 3895 code = this._lookBits(7); 3896 p = twoDimTable[code]; 3897 if (p?.[0] > 0) { 3898 this._eatBits(p[0]); 3899 return p[1]; 3900 } 3901 } else { 3902 const result = this._findTableCode(1, 7, twoDimTable); 3903 if (result[0] && result[2]) { 3904 return result[1]; 3905 } 3906 } 3907 info("Bad two dim code"); 3908 return ccittEOF; 3909 } 3910 _getWhiteCode() { 3911 let code = 0; 3912 let p; 3913 if (this.eoblock) { 3914 code = this._lookBits(12); 3915 if (code === ccittEOF) { 3916 return 1; 3917 } 3918 p = code >> 5 === 0 ? whiteTable1[code] : whiteTable2[code >> 3]; 3919 if (p[0] > 0) { 3920 this._eatBits(p[0]); 3921 return p[1]; 3922 } 3923 } else { 3924 let result = this._findTableCode(1, 9, whiteTable2); 3925 if (result[0]) { 3926 return result[1]; 3927 } 3928 result = this._findTableCode(11, 12, whiteTable1); 3929 if (result[0]) { 3930 return result[1]; 3931 } 3932 } 3933 info("bad white code"); 3934 this._eatBits(1); 3935 return 1; 3936 } 3937 _getBlackCode() { 3938 let code, p; 3939 if (this.eoblock) { 3940 code = this._lookBits(13); 3941 if (code === ccittEOF) { 3942 return 1; 3943 } 3944 if (code >> 7 === 0) { 3945 p = blackTable1[code]; 3946 } else if (code >> 9 === 0 && code >> 7 !== 0) { 3947 p = blackTable2[(code >> 1) - 64]; 3948 } else { 3949 p = blackTable3[code >> 7]; 3950 } 3951 if (p[0] > 0) { 3952 this._eatBits(p[0]); 3953 return p[1]; 3954 } 3955 } else { 3956 let result = this._findTableCode(2, 6, blackTable3); 3957 if (result[0]) { 3958 return result[1]; 3959 } 3960 result = this._findTableCode(7, 12, blackTable2, 64); 3961 if (result[0]) { 3962 return result[1]; 3963 } 3964 result = this._findTableCode(10, 13, blackTable1); 3965 if (result[0]) { 3966 return result[1]; 3967 } 3968 } 3969 info("bad black code"); 3970 this._eatBits(1); 3971 return 1; 3972 } 3973 _lookBits(n) { 3974 let c; 3975 while (this.inputBits < n) { 3976 if ((c = this.source.next()) === -1) { 3977 if (this.inputBits === 0) { 3978 return ccittEOF; 3979 } 3980 return this.inputBuf << n - this.inputBits & 0xffff >> 16 - n; 3981 } 3982 this.inputBuf = this.inputBuf << 8 | c; 3983 this.inputBits += 8; 3984 } 3985 return this.inputBuf >> this.inputBits - n & 0xffff >> 16 - n; 3986 } 3987 _eatBits(n) { 3988 if ((this.inputBits -= n) < 0) { 3989 this.inputBits = 0; 3990 } 3991 } 3992} 3993 3994;// ./src/core/ccitt_stream.js 3995 3996 3997 3998class CCITTFaxStream extends DecodeStream { 3999 constructor(str, maybeLength, params) { 4000 super(maybeLength); 4001 this.str = str; 4002 this.dict = str.dict; 4003 if (!(params instanceof Dict)) { 4004 params = Dict.empty; 4005 } 4006 const source = { 4007 next() { 4008 return str.getByte(); 4009 } 4010 }; 4011 this.ccittFaxDecoder = new CCITTFaxDecoder(source, { 4012 K: params.get("K"), 4013 EndOfLine: params.get("EndOfLine"), 4014 EncodedByteAlign: params.get("EncodedByteAlign"), 4015 Columns: params.get("Columns"), 4016 Rows: params.get("Rows"), 4017 EndOfBlock: params.get("EndOfBlock"), 4018 BlackIs1: params.get("BlackIs1") 4019 }); 4020 } 4021 readBlock() { 4022 while (!this.eof) { 4023 const c = this.ccittFaxDecoder.readNextChar(); 4024 if (c === -1) { 4025 this.eof = true; 4026 return; 4027 } 4028 this.ensureBuffer(this.bufferLength + 1); 4029 this.buffer[this.bufferLength++] = c; 4030 } 4031 } 4032} 4033 4034;// ./src/core/flate_stream.js 4035 4036 4037
4038const codeLenCodeMap = new Int32Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]); 4039const lengthDecode = new Int32Array([0x00003, 0x00004, 0x00005, 0x00006, 0x00007, 0x00008, 0x00009, 0x0000a, 0x1000b, 0x1000d, 0x1000f, 0x10011, 0x20013, 0x20017, 0x2001b, 0x2001f, 0x30023, 0x3002b, 0x30033, 0x3003b, 0x40043, 0x40053, 0x40063, 0x40073, 0x50083, 0x500a3, 0x500c3, 0x500e3, 0x00102, 0x00102, 0x00102]); 4040const distDecode = new Int32Array([0x00001, 0x00002, 0x00003, 0x00004, 0x10005, 0x10007, 0x20009, 0x2000d, 0x30011, 0x30019, 0x40021, 0x40031, 0x50041, 0x50061, 0x60081, 0x600c1, 0x70101, 0x70181, 0x80201, 0x80301, 0x90401, 0x90601, 0xa0801, 0xa0c01, 0xb1001, 0xb1801, 0xc2001, 0xc3001, 0xd4001, 0xd6001]); 4041const fixedLitCodeTab = [new Int32Array([0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c0, 0x70108, 0x80060, 0x80020, 0x900a0, 0x80000, 0x80080, 0x80040, 0x900e0, 0x70104, 0x80058, 0x80018, 0x90090, 0x70114, 0x80078, 0x80038, 0x900d0, 0x7010c, 0x80068, 0x80028, 0x900b0, 0x80008, 0x80088, 0x80048, 0x900f0, 0x70102, 0x80054, 0x80014, 0x8011c, 0x70112, 0x80074, 0x80034, 0x900c8, 0x7010a, 0x80064, 0x80024, 0x900a8, 0x80004, 0x80084, 0x80044, 0x900e8, 0x70106, 0x8005c, 0x8001c, 0x90098, 0x70116, 0x8007c, 0x8003c, 0x900d8, 0x7010e, 0x8006c, 0x8002c, 0x900b8, 0x8000c, 0x8008c, 0x8004c, 0x900f8, 0x70101, 0x80052, 0x80012, 0x8011a, 0x70111, 0x80072, 0x80032, 0x900c4, 0x70109, 0x80062, 0x80022, 0x900a4, 0x80002, 0x80082, 0x80042, 0x900e4, 0x70105, 0x8005a, 0x8001a, 0x90094, 0x70115, 0x8007a, 0x8003a, 0x900d4, 0x7010d, 0x8006a, 0x8002a, 0x900b4, 0x8000a, 0x8008a, 0x8004a, 0x900f4, 0x70103, 0x80056, 0x80016, 0x8011e, 0x70113, 0x80076, 0x80036, 0x900cc, 0x7010b, 0x80066, 0x80026, 0x900ac, 0x80006, 0x80086, 0x80046, 0x900ec, 0x70107, 0x8005e, 0x8001e, 0x9009c, 0x70117, 0x8007e, 0x8003e, 0x900dc, 0x7010f, 0x8006e, 0x8002e, 0x900bc, 0x8000e, 0x8008e, 0x8004e, 0x900fc, 0x70100, 0x80051, 0x80011, 0x80119, 0x70110, 0x80071, 0x80031, 0x900c2, 0x70108, 0x80061, 0x80021, 0x900a2, 0x80001, 0x80081, 0x80041, 0x900e2, 0x70104, 0x80059, 0x80019, 0x90092, 0x70114, 0x80079, 0x80039, 0x900d2, 0x7010c, 0x80069, 0x80029, 0x900b2, 0x80009, 0x80089, 0x80049, 0x900f2, 0x70102, 0x80055, 0x80015, 0x8011d, 0x70112, 0x80075, 0x80035, 0x900ca, 0x7010a, 0x80065, 0x80025, 0x900aa, 0x80005, 0x80085, 0x80045, 0x900ea, 0x70106, 0x8005d, 0x8001d, 0x9009a, 0x70116, 0x8007d, 0x8003d, 0x900da, 0x7010e, 0x8006d, 0x8002d, 0x900ba, 0x8000d, 0x8008d, 0x8004d, 0x900fa, 0x70101, 0x80053, 0x80013, 0x8011b, 0x70111, 0x80073, 0x80033, 0x900c6, 0x70109, 0x80063, 0x80023, 0x900a6, 0x80003, 0x80083, 0x80043, 0x900e6, 0x70105, 0x8005b, 0x8001b, 0x90096, 0x70115, 0x8007b, 0x8003b, 0x900d6, 0x7010d, 0x8006b, 0x8002b, 0x900b6, 0x8000b, 0x8008b, 0x8004b,
vendor: 3,825 bytes, lines 4041-4067
40410x900f6, 0x70103, 0x80057, 0x80017, 0x8011f, 0x70113, 0x80077, 0x80037, 0x900ce, 0x7010b, 0x80067, 0x80027, 0x900ae, 0x80007, 0x80087, 0x80047, 0x900ee, 0x70107, 0x8005f, 0x8001f, 0x9009e, 0x70117, 0x8007f, 0x8003f, 0x900de, 0x7010f, 0x8006f, 0x8002f, 0x900be, 0x8000f, 0x8008f, 0x8004f, 0x900fe, 0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c1, 0x70108, 0x80060, 0x80020, 0x900a1, 0x80000, 0x80080, 0x80040, 0x900e1, 0x70104, 0x80058, 0x80018, 0x90091, 0x70114, 0x80078, 0x80038, 0x900d1, 0x7010c, 0x80068, 0x80028, 0x900b1, 0x80008, 0x80088, 0x80048, 0x900f1, 0x70102, 0x80054, 0x80014, 0x8011c, 0x70112, 0x80074, 0x80034, 0x900c9, 0x7010a, 0x80064, 0x80024, 0x900a9, 0x80004, 0x80084, 0x80044, 0x900e9, 0x70106, 0x8005c, 0x8001c, 0x90099, 0x70116, 0x8007c, 0x8003c, 0x900d9, 0x7010e, 0x8006c, 0x8002c, 0x900b9, 0x8000c, 0x8008c, 0x8004c, 0x900f9, 0x70101, 0x80052, 0x80012, 0x8011a, 0x70111, 0x80072, 0x80032, 0x900c5, 0x70109, 0x80062, 0x80022, 0x900a5, 0x80002, 0x80082, 0x80042, 0x900e5, 0x70105, 0x8005a, 0x8001a, 0x90095, 0x70115, 0x8007a, 0x8003a, 0x900d5, 0x7010d, 0x8006a, 0x8002a, 0x900b5, 0x8000a, 0x8008a, 0x8004a, 0x900f5, 0x70103, 0x80056, 0x80016, 0x8011e, 0x70113, 0x80076, 0x80036, 0x900cd, 0x7010b, 0x80066, 0x80026, 0x900ad, 0x80006, 0x80086, 0x80046, 0x900ed, 0x70107, 0x8005e, 0x8001e, 0x9009d, 0x70117, 0x8007e, 0x8003e, 0x900dd, 0x7010f, 0x8006e, 0x8002e, 0x900bd, 0x8000e, 0x8008e, 0x8004e, 0x900fd, 0x70100, 0x80051, 0x80011, 0x80119, 0x70110, 0x80071, 0x80031, 0x900c3, 0x70108, 0x80061, 0x80021, 0x900a3, 0x80001, 0x80081, 0x80041, 0x900e3, 0x70104, 0x80059, 0x80019, 0x90093, 0x70114, 0x80079, 0x80039, 0x900d3, 0x7010c, 0x80069, 0x80029, 0x900b3, 0x80009, 0x80089, 0x80049, 0x900f3, 0x70102, 0x80055, 0x80015, 0x8011d, 0x70112, 0x80075, 0x80035, 0x900cb, 0x7010a, 0x80065, 0x80025, 0x900ab, 0x80005, 0x80085, 0x80045, 0x900eb, 0x70106, 0x8005d, 0x8001d, 0x9009b, 0x70116, 0x8007d, 0x8003d, 0x900db, 0x7010e, 0x8006d, 0x8002d, 0x900bb, 0x8000d, 0x8008d, 0x8004d, 0x900fb, 0x70101, 0x80053, 0x80013, 0x8011b, 0x70111, 0x80073, 0x80033, 0x900c7, 0x70109, 0x80063, 0x80023, 0x900a7, 0x80003, 0x80083, 0x80043, 0x900e7, 0x70105, 0x8005b, 0x8001b, 0x90097, 0x70115, 0x8007b, 0x8003b, 0x900d7, 0x7010d, 0x8006b, 0x8002b, 0x900b7, 0x8000b, 0x8008b, 0x8004b, 0x900f7, 0x70103, 0x80057, 0x80017, 0x8011f, 0x70113, 0x80077, 0x80037, 0x900cf, 0x7010b, 0x80067, 0x80027, 0x900af, 0x80007, 0x80087, 0x80047, 0x900ef, 0x70107, 0x8005f, 0x8001f, 0x9009f, 0x70117, 0x8007f, 0x8003f, 0x900df, 0x7010f, 0x8006f, 0x8002f, 0x900bf, 0x8000f, 0x8008f, 0x8004f, 0x900ff]), 9]; 4042const fixedDistCodeTab = [new Int32Array([0x50000, 0x50010, 0x50008, 0x50018, 0x50004, 0x50014, 0x5000c, 0x5001c, 0x50002, 0x50012, 0x5000a, 0x5001a, 0x50006, 0x50016, 0x5000e, 0x00000, 0x50001, 0x50011, 0x50009, 0x50019, 0x50005, 0x50015, 0x5000d, 0x5001d, 0x50003, 0x50013, 0x5000b, 0x5001b, 0x50007, 0x50017, 0x5000f, 0x00000]), 5]; 4043class FlateStream extends DecodeStream { 4044 constructor(str, maybeLength) { 4045 super(maybeLength); 4046 this.str = str; 4047 this.dict = str.dict; 4048 const cmf = str.getByte(); 4049 const flg = str.getByte(); 4050 if (cmf === -1 || flg === -1) { 4051 throw new FormatError(`Invalid header in flate stream: ${cmf}, ${flg}`); 4052 } 4053 if ((cmf & 0x0f) !== 0x08) { 4054 throw new FormatError(`Unknown compression method in flate stream: ${cmf}, ${flg}`); 4055 } 4056 if (((cmf << 8) + flg) % 31 !== 0) { 4057 throw new FormatError(`Bad FCHECK in flate stream: ${cmf}, ${flg}`); 4058 } 4059 if (flg & 0x20) { 4060 throw new FormatError(`FDICT bit set in flate stream: ${cmf}, ${flg}`); 4061 } 4062 this.codeSize = 0; 4063 this.codeBuf = 0; 4064 } 4065 async getImageData(length, _decoderOptions) { 4066 const data = await this.asyncGetBytes(); 4067 return data?.subarray(0, length) || this.getBytes(
vendor: 12,189 bytes, lines 4067-4656
4067length); 4068 } 4069 async asyncGetBytes() { 4070 this.str.reset(); 4071 const bytes = this.str.getBytes(); 4072 try { 4073 const { 4074 readable, 4075 writable 4076 } = new DecompressionStream("deflate"); 4077 const writer = writable.getWriter(); 4078 await writer.ready; 4079 writer.write(bytes).then(async () => { 4080 await writer.ready; 4081 await writer.close(); 4082 }).catch(() => {}); 4083 const chunks = []; 4084 let totalLength = 0; 4085 for await (const chunk of readable) { 4086 chunks.push(chunk); 4087 totalLength += chunk.byteLength; 4088 } 4089 const data = new Uint8Array(totalLength); 4090 let offset = 0; 4091 for (const chunk of chunks) { 4092 data.set(chunk, offset); 4093 offset += chunk.byteLength; 4094 } 4095 return data; 4096 } catch { 4097 this.str = new Stream(bytes, 2, bytes.length, this.str.dict); 4098 this.reset(); 4099 return null; 4100 } 4101 } 4102 get isAsync() { 4103 return true; 4104 } 4105 getBits(bits) { 4106 const str = this.str; 4107 let codeSize = this.codeSize; 4108 let codeBuf = this.codeBuf; 4109 let b; 4110 while (codeSize < bits) { 4111 if ((b = str.getByte()) === -1) { 4112 throw new FormatError("Bad encoding in flate stream"); 4113 } 4114 codeBuf |= b << codeSize; 4115 codeSize += 8; 4116 } 4117 b = codeBuf & (1 << bits) - 1; 4118 this.codeBuf = codeBuf >> bits; 4119 this.codeSize = codeSize -= bits; 4120 return b; 4121 } 4122 getCode(table) { 4123 const str = this.str; 4124 const codes = table[0]; 4125 const maxLen = table[1]; 4126 let codeSize = this.codeSize; 4127 let codeBuf = this.codeBuf; 4128 let b; 4129 while (codeSize < maxLen) { 4130 if ((b = str.getByte()) === -1) { 4131 break; 4132 } 4133 codeBuf |= b << codeSize; 4134 codeSize += 8; 4135 } 4136 const code = codes[codeBuf & (1 << maxLen) - 1]; 4137 const codeLen = code >> 16; 4138 const codeVal = code & 0xffff; 4139 if (codeLen < 1 || codeSize < codeLen) { 4140 throw new FormatError("Bad encoding in flate stream"); 4141 } 4142 this.codeBuf = codeBuf >> codeLen; 4143 this.codeSize = codeSize - codeLen; 4144 return codeVal; 4145 } 4146 generateHuffmanTable(lengths) { 4147 const n = lengths.length; 4148 let maxLen = 0; 4149 let i; 4150 for (i = 0; i < n; ++i) { 4151 if (lengths[i] > maxLen) { 4152 maxLen = lengths[i]; 4153 } 4154 } 4155 const size = 1 << maxLen; 4156 const codes = new Int32Array(size); 4157 for (let len = 1, code = 0, skip = 2; len <= maxLen; ++len, code <<= 1, skip <<= 1) { 4158 for (let val = 0; val < n; ++val) { 4159 if (lengths[val] === len) { 4160 let code2 = 0; 4161 let t = code; 4162 for (i = 0; i < len; ++i) { 4163 code2 = code2 << 1 | t & 1; 4164 t >>= 1; 4165 } 4166 for (i = code2; i < size; i += skip) { 4167 codes[i] = len << 16 | val; 4168 } 4169 ++code; 4170 } 4171 } 4172 } 4173 return [codes, maxLen]; 4174 } 4175 #endsStreamOnError(err) { 4176 info(err); 4177 this.eof = true; 4178 } 4179 readBlock() { 4180 let buffer, hdr, len; 4181 const str = this.str; 4182 try { 4183 hdr = this.getBits(3); 4184 } catch (ex) { 4185 this.#endsStreamOnError(ex.message); 4186 return; 4187 } 4188 if (hdr & 1) { 4189 this.eof = true; 4190 } 4191 hdr >>= 1; 4192 if (hdr === 0) { 4193 let b; 4194 if ((b = str.getByte()) === -1) { 4195 this.#endsStreamOnError("Bad block header in flate stream"); 4196 return; 4197 } 4198 let blockLen = b; 4199 if ((b = str.getByte()) === -1) { 4200 this.#endsStreamOnError("Bad block header in flate stream"); 4201 return; 4202 } 4203 blockLen |= b << 8; 4204 if ((b = str.getByte()) === -1) { 4205 this.#endsStreamOnError("Bad block header in flate stream"); 4206 return; 4207 } 4208 let check = b; 4209 if ((b = str.getByte()) === -1) { 4210 this.#endsStreamOnError("Bad block header in flate stream"); 4211 return; 4212 } 4213 check |= b << 8; 4214 if (check !== (~blockLen & 0xffff) && (blockLen !== 0 || check !== 0)) { 4215 throw new FormatError("Bad uncompressed block length in flate stream"); 4216 } 4217 this.codeBuf = 0; 4218 this.codeSize = 0; 4219 const bufferLength = this.bufferLength, 4220 end = bufferLength + blockLen; 4221 buffer = this.ensureBuffer(end); 4222 this.bufferLength = end; 4223 if (blockLen === 0) { 4224 if (str.peekByte() === -1) { 4225 this.eof = true; 4226 } 4227 } else { 4228 const block = str.getBytes(blockLen); 4229 buffer.set(block, bufferLength); 4230 if (block.length < blockLen) { 4231 this.eof = true; 4232 } 4233 } 4234 return; 4235 } 4236 let litCodeTable; 4237 let distCodeTable; 4238 if (hdr === 1) { 4239 litCodeTable = fixedLitCodeTab; 4240 distCodeTable = fixedDistCodeTab; 4241 } else if (hdr === 2) { 4242 const numLitCodes = this.getBits(5) + 257; 4243 const numDistCodes = this.getBits(5) + 1; 4244 const numCodeLenCodes = this.getBits(4) + 4; 4245 const codeLenCodeLengths = new Uint8Array(codeLenCodeMap.length); 4246 let i; 4247 for (i = 0; i < numCodeLenCodes; ++i) { 4248 codeLenCodeLengths[codeLenCodeMap[i]] = this.getBits(3); 4249 } 4250 const codeLenCodeTab = this.generateHuffmanTable(codeLenCodeLengths); 4251 len = 0; 4252 i = 0; 4253 const codes = numLitCodes + numDistCodes; 4254 const codeLengths = new Uint8Array(codes); 4255 let bitsLength, bitsOffset, what; 4256 while (i < codes) { 4257 const code = this.getCode(codeLenCodeTab); 4258 if (code === 16) { 4259 bitsLength = 2; 4260 bitsOffset = 3; 4261 what = len; 4262 } else if (code === 17) { 4263 bitsLength = 3; 4264 bitsOffset = 3; 4265 what = len = 0; 4266 } else if (code === 18) { 4267 bitsLength = 7; 4268 bitsOffset = 11; 4269 what = len = 0; 4270 } else { 4271 codeLengths[i++] = len = code; 4272 continue; 4273 } 4274 let repeatLength = this.getBits(bitsLength) + bitsOffset; 4275 while (repeatLength-- > 0) { 4276 codeLengths[i++] = what; 4277 } 4278 } 4279 litCodeTable = this.generateHuffmanTable(codeLengths.subarray(0, numLitCodes)); 4280 distCodeTable = this.generateHuffmanTable(codeLengths.subarray(numLitCodes, codes)); 4281 } else { 4282 throw new FormatError("Unknown block type in flate stream"); 4283 } 4284 buffer = this.buffer; 4285 let limit = buffer ? buffer.length : 0; 4286 let pos = this.bufferLength; 4287 while (true) { 4288 let code1 = this.getCode(litCodeTable); 4289 if (code1 < 256) { 4290 if (pos + 1 >= limit) { 4291 buffer = this.ensureBuffer(pos + 1); 4292 limit = buffer.length; 4293 } 4294 buffer[pos++] = code1; 4295 continue; 4296 } 4297 if (code1 === 256) { 4298 this.bufferLength = pos; 4299 return; 4300 } 4301 code1 -= 257; 4302 code1 = lengthDecode[code1]; 4303 let code2 = code1 >> 16; 4304 if (code2 > 0) { 4305 code2 = this.getBits(code2); 4306 } 4307 len = (code1 & 0xffff) + code2; 4308 code1 = this.getCode(distCodeTable); 4309 code1 = distDecode[code1]; 4310 code2 = code1 >> 16; 4311 if (code2 > 0) { 4312 code2 = this.getBits(code2); 4313 } 4314 const dist = (code1 & 0xffff) + code2; 4315 if (pos + len >= limit) { 4316 buffer = this.ensureBuffer(pos + len); 4317 limit = buffer.length; 4318 } 4319 for (let k = 0; k < len; ++k, ++pos) { 4320 buffer[pos] = buffer[pos - dist]; 4321 } 4322 } 4323 } 4324} 4325 4326;// ./src/core/arithmetic_decoder.js 4327const QeTable = [{ 4328 qe: 0x5601, 4329 nmps: 1, 4330 nlps: 1, 4331 switchFlag: 1 4332}, { 4333 qe: 0x3401, 4334 nmps: 2, 4335 nlps: 6, 4336 switchFlag: 0 4337}, { 4338 qe: 0x1801, 4339 nmps: 3, 4340 nlps: 9, 4341 switchFlag: 0 4342}, { 4343 qe: 0x0ac1, 4344 nmps: 4, 4345 nlps: 12, 4346 switchFlag: 0 4347}, { 4348 qe: 0x0521, 4349 nmps: 5, 4350 nlps: 29, 4351 switchFlag: 0 4352}, { 4353 qe: 0x0221, 4354 nmps: 38, 4355 nlps: 33, 4356 switchFlag: 0 4357}, { 4358 qe: 0x5601, 4359 nmps: 7, 4360 nlps: 6, 4361 switchFlag: 1 4362}, { 4363 qe: 0x5401, 4364 nmps: 8, 4365 nlps: 14, 4366 switchFlag: 0 4367}, { 4368 qe: 0x4801, 4369 nmps: 9, 4370 nlps: 14, 4371 switchFlag: 0 4372}, { 4373 qe: 0x3801, 4374 nmps: 10, 4375 nlps: 14, 4376 switchFlag: 0 4377}, { 4378 qe: 0x3001, 4379 nmps: 11, 4380 nlps: 17, 4381 switchFlag: 0 4382}, { 4383 qe: 0x2401, 4384 nmps: 12, 4385 nlps: 18, 4386 switchFlag: 0 4387}, { 4388 qe: 0x1c01, 4389 nmps: 13, 4390 nlps: 20, 4391 switchFlag: 0 4392}, { 4393 qe: 0x1601, 4394 nmps: 29, 4395 nlps: 21, 4396 switchFlag: 0 4397}, { 4398 qe: 0x5601, 4399 nmps: 15, 4400 nlps: 14, 4401 switchFlag: 1 4402}, { 4403 qe: 0x5401, 4404 nmps: 16, 4405 nlps: 14, 4406 switchFlag: 0 4407}, { 4408 qe: 0x5101, 4409 nmps: 17, 4410 nlps: 15, 4411 switchFlag: 0 4412}, { 4413 qe: 0x4801, 4414 nmps: 18, 4415 nlps: 16, 4416 switchFlag: 0 4417}, { 4418 qe: 0x3801, 4419 nmps: 19, 4420 nlps: 17, 4421 switchFlag: 0 4422}, { 4423 qe: 0x3401, 4424 nmps: 20, 4425 nlps: 18, 4426 switchFlag: 0 4427}, { 4428 qe: 0x3001, 4429 nmps: 21, 4430 nlps: 19, 4431 switchFlag: 0 4432}, { 4433 qe: 0x2801, 4434 nmps: 22, 4435 nlps: 19, 4436 switchFlag: 0 4437}, { 4438 qe: 0x2401, 4439 nmps: 23, 4440 nlps: 20, 4441 switchFlag: 0 4442}, { 4443 qe: 0x2201, 4444 nmps: 24, 4445 nlps: 21, 4446 switchFlag: 0 4447}, { 4448 qe: 0x1c01, 4449 nmps: 25, 4450 nlps: 22, 4451 switchFlag: 0 4452}, { 4453 qe: 0x1801, 4454 nmps: 26, 4455 nlps: 23, 4456 switchFlag: 0 4457}, { 4458 qe: 0x1601, 4459 nmps: 27, 4460 nlps: 24, 4461 switchFlag: 0 4462}, { 4463 qe: 0x1401, 4464 nmps: 28, 4465 nlps: 25, 4466 switchFlag: 0 4467}, { 4468 qe: 0x1201, 4469 nmps: 29, 4470 nlps: 26, 4471 switchFlag: 0 4472}, { 4473 qe: 0x1101, 4474 nmps: 30, 4475 nlps: 27, 4476 switchFlag: 0 4477}, { 4478 qe: 0x0ac1, 4479 nmps: 31, 4480 nlps: 28, 4481 switchFlag: 0 4482}, { 4483 qe: 0x09c1, 4484 nmps: 32, 4485 nlps: 29, 4486 switchFlag: 0 4487}, { 4488 qe: 0x08a1, 4489 nmps: 33, 4490 nlps: 30, 4491 switchFlag: 0 4492}, { 4493 qe: 0x0521, 4494 nmps: 34, 4495 nlps: 31, 4496 switchFlag: 0 4497}, { 4498 qe: 0x0441, 4499 nmps: 35, 4500 nlps: 32, 4501 switchFlag: 0 4502}, { 4503 qe: 0x02a1, 4504 nmps: 36, 4505 nlps: 33, 4506 switchFlag: 0 4507}, { 4508 qe: 0x0221, 4509 nmps: 37, 4510 nlps: 34, 4511 switchFlag: 0 4512}, { 4513 qe: 0x0141, 4514 nmps: 38, 4515 nlps: 35, 4516 switchFlag: 0 4517}, { 4518 qe: 0x0111, 4519 nmps: 39, 4520 nlps: 36, 4521 switchFlag: 0 4522}, { 4523 qe: 0x0085, 4524 nmps: 40, 4525 nlps: 37, 4526 switchFlag: 0 4527}, { 4528 qe: 0x0049, 4529 nmps: 41, 4530 nlps: 38, 4531 switchFlag: 0 4532}, { 4533 qe: 0x0025, 4534 nmps: 42, 4535 nlps: 39, 4536 switchFlag: 0 4537}, { 4538 qe: 0x0015, 4539 nmps: 43, 4540 nlps: 40, 4541 switchFlag: 0 4542}, { 4543 qe: 0x0009, 4544 nmps: 44, 4545 nlps: 41, 4546 switchFlag: 0 4547}, { 4548 qe: 0x0005, 4549 nmps: 45, 4550 nlps: 42, 4551 switchFlag: 0 4552}, { 4553 qe: 0x0001, 4554 nmps: 45, 4555 nlps: 43, 4556 switchFlag: 0 4557}, { 4558 qe: 0x5601, 4559 nmps: 46, 4560 nlps: 46, 4561 switchFlag: 0 4562}]; 4563class ArithmeticDecoder { 4564 constructor(data, start, end) { 4565 this.data = data; 4566 this.bp = start; 4567 this.dataEnd = end; 4568 this.chigh = data[start]; 4569 this.clow = 0; 4570 this.byteIn(); 4571 this.chigh = this.chigh << 7 & 0xffff | this.clow >> 9 & 0x7f; 4572 this.clow = this.clow << 7 & 0xffff; 4573 this.ct -= 7; 4574 this.a = 0x8000; 4575 } 4576 byteIn() { 4577 const data = this.data; 4578 let bp = this.bp; 4579 if (data[bp] === 0xff) { 4580 if (data[bp + 1] > 0x8f) { 4581 this.clow += 0xff00; 4582 this.ct = 8; 4583 } else { 4584 bp++; 4585 this.clow += data[bp] << 9; 4586 this.ct = 7; 4587 this.bp = bp; 4588 } 4589 } else { 4590 bp++; 4591 this.clow += bp < this.dataEnd ? data[bp] << 8 : 0xff00; 4592 this.ct = 8; 4593 this.bp = bp; 4594 } 4595 if (this.clow > 0xffff) { 4596 this.chigh += this.clow >> 16; 4597 this.clow &= 0xffff; 4598 } 4599 } 4600 readBit(contexts, pos) { 4601 let cx_index = contexts[pos] >> 1, 4602 cx_mps = contexts[pos] & 1; 4603 const qeTableIcx = QeTable[cx_index]; 4604 const qeIcx = qeTableIcx.qe; 4605 let d; 4606 let a = this.a - qeIcx; 4607 if (this.chigh < qeIcx) { 4608 if (a < qeIcx) { 4609 a = qeIcx; 4610 d = cx_mps; 4611 cx_index = qeTableIcx.nmps; 4612 } else { 4613 a = qeIcx; 4614 d = 1 ^ cx_mps; 4615 if (qeTableIcx.switchFlag === 1) { 4616 cx_mps = d; 4617 } 4618 cx_index = qeTableIcx.nlps; 4619 } 4620 } else { 4621 this.chigh -= qeIcx; 4622 if ((a & 0x8000) !== 0) { 4623 this.a = a; 4624 return cx_mps; 4625 } 4626 if (a < qeIcx) { 4627 d = 1 ^ cx_mps; 4628 if (qeTableIcx.switchFlag === 1) { 4629 cx_mps = d; 4630 } 4631 cx_index = qeTableIcx.nlps; 4632 } else { 4633 d = cx_mps; 4634 cx_index = qeTableIcx.nmps; 4635 } 4636 } 4637 do { 4638 if (this.ct === 0) { 4639 this.byteIn(); 4640 } 4641 a <<= 1; 4642 this.chigh = this.chigh << 1 & 0xffff | this.clow >> 15 & 1; 4643 this.clow = this.clow << 1 & 0xffff; 4644 this.ct--; 4645 } while ((a & 0x8000) === 0); 4646 this.a = a; 4647 contexts[pos] = cx_index << 1 | cx_mps; 4648 return d; 4649 } 4650} 4651 4652;// ./src/core/jbig2.js 4653 4654 4655 4656
vendor: 5,857 bytes, lines 4657-4952
4657class Jbig2Error extends BaseException { 4658 constructor(msg) { 4659 super(msg, "Jbig2Error"); 4660 } 4661} 4662class ContextCache { 4663 getContexts(id) { 4664 if (id in this) { 4665 return this[id]; 4666 } 4667 return this[id] = new Int8Array(1 << 16); 4668 } 4669} 4670class DecodingContext { 4671 constructor(data, start, end) { 4672 this.data = data; 4673 this.start = start; 4674 this.end = end; 4675 } 4676 get decoder() { 4677 const decoder = new ArithmeticDecoder(this.data, this.start, this.end); 4678 return shadow(this, "decoder", decoder); 4679 } 4680 get contextCache() { 4681 const cache = new ContextCache(); 4682 return shadow(this, "contextCache", cache); 4683 } 4684} 4685function decodeInteger(contextCache, procedure, decoder) { 4686 const contexts = contextCache.getContexts(procedure); 4687 let prev = 1; 4688 function readBits(length) { 4689 let v = 0; 4690 for (let i = 0; i < length; i++) { 4691 const bit = decoder.readBit(contexts, prev); 4692 prev = prev < 256 ? prev << 1 | bit : (prev << 1 | bit) & 511 | 256; 4693 v = v << 1 | bit; 4694 } 4695 return v >>> 0; 4696 } 4697 const sign = readBits(1); 4698 const value = readBits(1) ? readBits(1) ? readBits(1) ? readBits(1) ? readBits(1) ? readBits(32) + 4436 : readBits(12) + 340 : readBits(8) + 84 : readBits(6) + 20 : readBits(4) + 4 : readBits(2); 4699 let signedValue; 4700 if (sign === 0) { 4701 signedValue = value; 4702 } else if (value > 0) { 4703 signedValue = -value; 4704 } 4705 if (signedValue >= MIN_INT_32 && signedValue <= MAX_INT_32) { 4706 return signedValue; 4707 } 4708 return null; 4709} 4710function decodeIAID(contextCache, decoder, codeLength) { 4711 const contexts = contextCache.getContexts("IAID"); 4712 let prev = 1; 4713 for (let i = 0; i < codeLength; i++) { 4714 const bit = decoder.readBit(contexts, prev); 4715 prev = prev << 1 | bit; 4716 } 4717 if (codeLength < 31) { 4718 return prev & (1 << codeLength) - 1; 4719 } 4720 return prev & 0x7fffffff; 4721} 4722const SegmentTypes = ["SymbolDictionary", null, null, null, "IntermediateTextRegion", null, "ImmediateTextRegion", "ImmediateLosslessTextRegion", null, null, null, null, null, null, null, null, "PatternDictionary", null, null, null, "IntermediateHalftoneRegion", null, "ImmediateHalftoneRegion", "ImmediateLosslessHalftoneRegion", null, null, null, null, null, null, null, null, null, null, null, null, "IntermediateGenericRegion", null, "ImmediateGenericRegion", "ImmediateLosslessGenericRegion", "IntermediateGenericRefinementRegion", null, "ImmediateGenericRefinementRegion", "ImmediateLosslessGenericRefinementRegion", null, null, null, null, "PageInformation", "EndOfPage", "EndOfStripe", "EndOfFile", "Profiles", "Tables", null, null, null, null, null, null, null, null, "Extension"]; 4723const CodingTemplates = [[{ 4724 x: -1, 4725 y: -2 4726}, { 4727 x: 0, 4728 y: -2 4729}, { 4730 x: 1, 4731 y: -2 4732}, { 4733 x: -2, 4734 y: -1 4735}, { 4736 x: -1, 4737 y: -1 4738}, { 4739 x: 0, 4740 y: -1 4741}, { 4742 x: 1, 4743 y: -1 4744}, { 4745 x: 2, 4746 y: -1 4747}, { 4748 x: -4, 4749 y: 0 4750}, { 4751 x: -3, 4752 y: 0 4753}, { 4754 x: -2, 4755 y: 0 4756}, { 4757 x: -1, 4758 y: 0 4759}], [{ 4760 x: -1, 4761 y: -2 4762}, { 4763 x: 0, 4764 y: -2 4765}, { 4766 x: 1, 4767 y: -2 4768}, { 4769 x: 2, 4770 y: -2 4771}, { 4772 x: -2, 4773 y: -1 4774}, { 4775 x: -1, 4776 y: -1 4777}, { 4778 x: 0, 4779 y: -1 4780}, { 4781 x: 1, 4782 y: -1 4783}, { 4784 x: 2, 4785 y: -1 4786}, { 4787 x: -3, 4788 y: 0 4789}, { 4790 x: -2, 4791 y: 0 4792}, { 4793 x: -1, 4794 y: 0 4795}], [{ 4796 x: -1, 4797 y: -2 4798}, { 4799 x: 0, 4800 y: -2 4801}, { 4802 x: 1, 4803 y: -2 4804}, { 4805 x: -2, 4806 y: -1 4807}, { 4808 x: -1, 4809 y: -1 4810}, { 4811 x: 0, 4812 y: -1 4813}, { 4814 x: 1, 4815 y: -1 4816}, { 4817 x: -2, 4818 y: 0 4819}, { 4820 x: -1, 4821 y: 0 4822}], [{ 4823 x: -3, 4824 y: -1 4825}, { 4826 x: -2, 4827 y: -1 4828}, { 4829 x: -1, 4830 y: -1 4831}, { 4832 x: 0, 4833 y: -1 4834}, { 4835 x: 1, 4836 y: -1 4837}, { 4838 x: -4, 4839 y: 0 4840}, { 4841 x: -3, 4842 y: 0 4843}, { 4844 x: -2, 4845 y: 0 4846}, { 4847 x: -1, 4848 y: 0 4849}]]; 4850const RefinementTemplates = [{ 4851 coding: [{ 4852 x: 0, 4853 y: -1 4854 }, { 4855 x: 1, 4856 y: -1 4857 }, { 4858 x: -1, 4859 y: 0 4860 }], 4861 reference: [{ 4862 x: 0, 4863 y: -1 4864 }, { 4865 x: 1, 4866 y: -1 4867 }, { 4868 x: -1, 4869 y: 0 4870 }, { 4871 x: 0, 4872 y: 0 4873 }, { 4874 x: 1, 4875 y: 0 4876 }, { 4877 x: -1, 4878 y: 1 4879 }, { 4880 x: 0, 4881 y: 1 4882 }, { 4883 x: 1, 4884 y: 1 4885 }] 4886}, { 4887 coding: [{ 4888 x: -1, 4889 y: -1 4890 }, { 4891 x: 0, 4892 y: -1 4893 }, { 4894 x: 1, 4895 y: -1 4896 }, { 4897 x: -1, 4898 y: 0 4899 }], 4900 reference: [{ 4901 x: 0, 4902 y: -1 4903 }, { 4904 x: -1, 4905 y: 0 4906 }, { 4907 x: 0, 4908 y: 0 4909 }, { 4910 x: 1, 4911 y: 0 4912 }, { 4913 x: 0, 4914 y: 1 4915 }, { 4916 x: 1, 4917 y: 1 4918 }] 4919}]; 4920const ReusedContexts = [0x9b25, 0x0795, 0x00e5, 0x0195]; 4921const RefinementReusedContexts = [0x0020, 0x0008]; 4922function decodeBitmapTemplate0(width, height, decodingContext) { 4923 const decoder = decodingContext.decoder; 4924 const contexts = decodingContext.contextCache.getContexts("GB"); 4925 const bitmap = []; 4926 let contextLabel, i, j, pixel, row, row1, row2; 4927 const OLD_PIXEL_MASK = 0x7bf7; 4928 for (i = 0; i < height; i++) { 4929 row = bitmap[i] = new Uint8Array(width); 4930 row1 = i < 1 ? row : bitmap[i - 1]; 4931 row2 = i < 2 ? row : bitmap[i - 2]; 4932 contextLabel = row2[0] << 13 | row2[1] << 12 | row2[2] << 11 | row1[0] << 7 | row1[1] << 6 | row1[2] << 5 | row1[3] << 4; 4933 for (j = 0; j < width; j++) { 4934 row[j] = pixel = decoder.readBit(contexts, contextLabel); 4935 contextLabel = (contextLabel & OLD_PIXEL_MASK) << 1 | (j + 3 < width ? row2[j + 3] << 11 : 0) | (j + 4 < width ? row1[j + 4] << 4 : 0) | pixel; 4936 } 4937 } 4938 return bitmap; 4939} 4940function decodeBitmap(mmr, width, height, templateIndex, prediction, skip, at, decodingContext) { 4941 if (mmr) { 4942 const input = new Reader(decodingContext.data, decodingContext.start, decodingContext.end); 4943 return decodeMMRBitmap(input, width, height, false); 4944 } 4945 if (templateIndex === 0 && !skip && !prediction && at.length === 4 && at[0].x === 3 && at[0].y === -1 && at[1].x === -3 && at[1].y === -1 && at[2].x === 2 && at[2].y === -2 && at[3].x === -2 && at[3].y === -2) { 4946 return decodeBitmapTemplate0(width, height, decodingContext); 4947 } 4948 const useskip = !!skip; 4949 const template = CodingTemplates[templateIndex].concat(at); 4950 template.sort(function (a, b) { 4951 return a.y - b.y || a.x - b.x; 4952 }
vendor: 10,608 bytes, lines 4952-5235
4952); 4953 const templateLength = template.length; 4954 const templateX = new Int8Array(templateLength); 4955 const templateY = new Int8Array(templateLength); 4956 const changingTemplateEntries = []; 4957 let reuseMask = 0, 4958 minX = 0, 4959 maxX = 0, 4960 minY = 0; 4961 let c, k; 4962 for (k = 0; k < templateLength; k++) { 4963 templateX[k] = template[k].x; 4964 templateY[k] = template[k].y; 4965 minX = Math.min(minX, template[k].x); 4966 maxX = Math.max(maxX, template[k].x); 4967 minY = Math.min(minY, template[k].y); 4968 if (k < templateLength - 1 && template[k].y === template[k + 1].y && template[k].x === template[k + 1].x - 1) { 4969 reuseMask |= 1 << templateLength - 1 - k; 4970 } else { 4971 changingTemplateEntries.push(k); 4972 } 4973 } 4974 const changingEntriesLength = changingTemplateEntries.length; 4975 const changingTemplateX = new Int8Array(changingEntriesLength); 4976 const changingTemplateY = new Int8Array(changingEntriesLength); 4977 const changingTemplateBit = new Uint16Array(changingEntriesLength); 4978 for (c = 0; c < changingEntriesLength; c++) { 4979 k = changingTemplateEntries[c]; 4980 changingTemplateX[c] = template[k].x; 4981 changingTemplateY[c] = template[k].y; 4982 changingTemplateBit[c] = 1 << templateLength - 1 - k; 4983 } 4984 const sbb_left = -minX; 4985 const sbb_top = -minY; 4986 const sbb_right = width - maxX; 4987 const pseudoPixelContext = ReusedContexts[templateIndex]; 4988 let row = new Uint8Array(width); 4989 const bitmap = []; 4990 const decoder = decodingContext.decoder; 4991 const contexts = decodingContext.contextCache.getContexts("GB"); 4992 let ltp = 0, 4993 j, 4994 i0, 4995 j0, 4996 contextLabel = 0, 4997 bit, 4998 shift; 4999 for (let i = 0; i < height; i++) { 5000 if (prediction) { 5001 const sltp = decoder.readBit(contexts, pseudoPixelContext); 5002 ltp ^= sltp; 5003 if (ltp) { 5004 bitmap.push(row); 5005 continue; 5006 } 5007 } 5008 row = new Uint8Array(row); 5009 bitmap.push(row); 5010 for (j = 0; j < width; j++) { 5011 if (useskip && skip[i][j]) { 5012 row[j] = 0; 5013 continue; 5014 } 5015 if (j >= sbb_left && j < sbb_right && i >= sbb_top) { 5016 contextLabel = contextLabel << 1 & reuseMask; 5017 for (k = 0; k < changingEntriesLength; k++) { 5018 i0 = i + changingTemplateY[k]; 5019 j0 = j + changingTemplateX[k]; 5020 bit = bitmap[i0][j0]; 5021 if (bit) { 5022 bit = changingTemplateBit[k]; 5023 contextLabel |= bit; 5024 } 5025 } 5026 } else { 5027 contextLabel = 0; 5028 shift = templateLength - 1; 5029 for (k = 0; k < templateLength; k++, shift--) { 5030 j0 = j + templateX[k]; 5031 if (j0 >= 0 && j0 < width) { 5032 i0 = i + templateY[k]; 5033 if (i0 >= 0) { 5034 bit = bitmap[i0][j0]; 5035 if (bit) { 5036 contextLabel |= bit << shift; 5037 } 5038 } 5039 } 5040 } 5041 } 5042 const pixel = decoder.readBit(contexts, contextLabel); 5043 row[j] = pixel; 5044 } 5045 } 5046 return bitmap; 5047} 5048function decodeRefinement(width, height, templateIndex, referenceBitmap, offsetX, offsetY, prediction, at, decodingContext) { 5049 let codingTemplate = RefinementTemplates[templateIndex].coding; 5050 if (templateIndex === 0) { 5051 codingTemplate = codingTemplate.concat([at[0]]); 5052 } 5053 const codingTemplateLength = codingTemplate.length; 5054 const codingTemplateX = new Int32Array(codingTemplateLength); 5055 const codingTemplateY = new Int32Array(codingTemplateLength); 5056 let k; 5057 for (k = 0; k < codingTemplateLength; k++) { 5058 codingTemplateX[k] = codingTemplate[k].x; 5059 codingTemplateY[k] = codingTemplate[k].y; 5060 } 5061 let referenceTemplate = RefinementTemplates[templateIndex].reference; 5062 if (templateIndex === 0) { 5063 referenceTemplate = referenceTemplate.concat([at[1]]); 5064 } 5065 const referenceTemplateLength = referenceTemplate.length; 5066 const referenceTemplateX = new Int32Array(referenceTemplateLength); 5067 const referenceTemplateY = new Int32Array(referenceTemplateLength); 5068 for (k = 0; k < referenceTemplateLength; k++) { 5069 referenceTemplateX[k] = referenceTemplate[k].x; 5070 referenceTemplateY[k] = referenceTemplate[k].y; 5071 } 5072 const referenceWidth = referenceBitmap[0].length; 5073 const referenceHeight = referenceBitmap.length; 5074 const pseudoPixelContext = RefinementReusedContexts[templateIndex]; 5075 const bitmap = []; 5076 const decoder = decodingContext.decoder; 5077 const contexts = decodingContext.contextCache.getContexts("GR"); 5078 let ltp = 0; 5079 for (let i = 0; i < height; i++) { 5080 if (prediction) { 5081 const sltp = decoder.readBit(contexts, pseudoPixelContext); 5082 ltp ^= sltp; 5083 if (ltp) { 5084 throw new Jbig2Error("prediction is not supported"); 5085 } 5086 } 5087 const row = new Uint8Array(width); 5088 bitmap.push(row); 5089 for (let j = 0; j < width; j++) { 5090 let i0, j0; 5091 let contextLabel = 0; 5092 for (k = 0; k < codingTemplateLength; k++) { 5093 i0 = i + codingTemplateY[k]; 5094 j0 = j + codingTemplateX[k]; 5095 if (i0 < 0 || j0 < 0 || j0 >= width) { 5096 contextLabel <<= 1; 5097 } else { 5098 contextLabel = contextLabel << 1 | bitmap[i0][j0]; 5099 } 5100 } 5101 for (k = 0; k < referenceTemplateLength; k++) { 5102 i0 = i + referenceTemplateY[k] - offsetY; 5103 j0 = j + referenceTemplateX[k] - offsetX; 5104 if (i0 < 0 || i0 >= referenceHeight || j0 < 0 || j0 >= referenceWidth) { 5105 contextLabel <<= 1; 5106 } else { 5107 contextLabel = contextLabel << 1 | referenceBitmap[i0][j0]; 5108 } 5109 } 5110 const pixel = decoder.readBit(contexts, contextLabel); 5111 row[j] = pixel; 5112 } 5113 } 5114 return bitmap; 5115} 5116function decodeSymbolDictionary(huffman, refinement, symbols, numberOfNewSymbols, numberOfExportedSymbols, huffmanTables, templateIndex, at, refinementTemplateIndex, refinementAt, decodingContext, huffmanInput) { 5117 if (huffman && refinement) { 5118 throw new Jbig2Error("symbol refinement with Huffman is not supported"); 5119 } 5120 const newSymbols = []; 5121 let currentHeight = 0; 5122 let symbolCodeLength = log2(symbols.length + numberOfNewSymbols); 5123 const decoder = decodingContext.decoder; 5124 const contextCache = decodingContext.contextCache; 5125 let tableB1, symbolWidths; 5126 if (huffman) { 5127 tableB1 = getStandardTable(1); 5128 symbolWidths = []; 5129 symbolCodeLength = Math.max(symbolCodeLength, 1); 5130 } 5131 while (newSymbols.length < numberOfNewSymbols) { 5132 const deltaHeight = huffman ? huffmanTables.tableDeltaHeight.decode(huffmanInput) : decodeInteger(contextCache, "IADH", decoder); 5133 currentHeight += deltaHeight; 5134 let currentWidth = 0, 5135 totalWidth = 0; 5136 const firstSymbol = huffman ? symbolWidths.length : 0; 5137 while (true) { 5138 const deltaWidth = huffman ? huffmanTables.tableDeltaWidth.decode(huffmanInput) : decodeInteger(contextCache, "IADW", decoder); 5139 if (deltaWidth === null) { 5140 break; 5141 } 5142 currentWidth += deltaWidth; 5143 totalWidth += currentWidth; 5144 let bitmap; 5145 if (refinement) { 5146 const numberOfInstances = decodeInteger(contextCache, "IAAI", decoder); 5147 if (numberOfInstances > 1) { 5148 bitmap = decodeTextRegion(huffman, refinement, currentWidth, currentHeight, 0, numberOfInstances, 1, symbols.concat(newSymbols), symbolCodeLength, 0, 0, 1, 0, huffmanTables, refinementTemplateIndex, refinementAt, decodingContext, 0, huffmanInput); 5149 } else { 5150 const symbolId = decodeIAID(contextCache, decoder, symbolCodeLength); 5151 const rdx = decodeInteger(contextCache, "IARDX", decoder); 5152 const rdy = decodeInteger(contextCache, "IARDY", decoder); 5153 const symbol = symbolId < symbols.length ? symbols[symbolId] : newSymbols[symbolId - symbols.length]; 5154 bitmap = decodeRefinement(currentWidth, currentHeight, refinementTemplateIndex, symbol, rdx, rdy, false, refinementAt, decodingContext); 5155 } 5156 newSymbols.push(bitmap); 5157 } else if (huffman) { 5158 symbolWidths.push(currentWidth); 5159 } else { 5160 bitmap = decodeBitmap(false, currentWidth, currentHeight, templateIndex, false, null, at, decodingContext); 5161 newSymbols.push(bitmap); 5162 } 5163 } 5164 if (huffman && !refinement) { 5165 const bitmapSize = huffmanTables.tableBitmapSize.decode(huffmanInput); 5166 huffmanInput.byteAlign(); 5167 let collectiveBitmap; 5168 if (bitmapSize === 0) { 5169 collectiveBitmap = readUncompressedBitmap(huffmanInput, totalWidth, currentHeight); 5170 } else { 5171 const originalEnd = huffmanInput.end; 5172 const bitmapEnd = huffmanInput.position + bitmapSize; 5173 huffmanInput.end = bitmapEnd; 5174 collectiveBitmap = decodeMMRBitmap(huffmanInput, totalWidth, currentHeight, false); 5175 huffmanInput.end = originalEnd; 5176 huffmanInput.position = bitmapEnd; 5177 } 5178 const numberOfSymbolsDecoded = symbolWidths.length; 5179 if (firstSymbol === numberOfSymbolsDecoded - 1) { 5180 newSymbols.push(collectiveBitmap); 5181 } else { 5182 let i, 5183 y, 5184 xMin = 0, 5185 xMax, 5186 bitmapWidth, 5187 symbolBitmap; 5188 for (i = firstSymbol; i < numberOfSymbolsDecoded; i++) { 5189 bitmapWidth = symbolWidths[i]; 5190 xMax = xMin + bitmapWidth; 5191 symbolBitmap = []; 5192 for (y = 0; y < currentHeight; y++) { 5193 symbolBitmap.push(collectiveBitmap[y].subarray(xMin, xMax)); 5194 } 5195 newSymbols.push(symbolBitmap); 5196 xMin = xMax; 5197 } 5198 } 5199 } 5200 } 5201 const exportedSymbols = [], 5202 flags = []; 5203 let currentFlag = false, 5204 i, 5205 ii; 5206 const totalSymbolsLength = symbols.length + numberOfNewSymbols; 5207 while (flags.length < totalSymbolsLength) { 5208 let runLength = huffman ? tableB1.decode(huffmanInput) : decodeInteger(contextCache, "IAEX", decoder); 5209 while (runLength--) { 5210 flags.push(currentFlag); 5211 } 5212 currentFlag = !currentFlag; 5213 } 5214 for (i = 0, ii = symbols.length; i < ii; i++) { 5215 if (flags[i]) { 5216 exportedSymbols.push(symbols[i]); 5217 } 5218 } 5219 for (let j = 0; j < numberOfNewSymbols; i++, j++) { 5220 if (flags[i]) { 5221 exportedSymbols.push(newSymbols[j]); 5222 } 5223 } 5224 return exportedSymbols; 5225} 5226function decodeTextRegion(huffman, refinement, width, height, defaultPixelValue, numberOfSymbolInstances, stripSize, inputSymbols, symbolCodeLength, transposed, dsOffset, referenceCorner, combinationOperator, huffmanTables, refinementTemplateIndex, refinementAt, decodingContext, logStripSize, huffmanInput) { 5227 if (huffman && refinement) { 5228 throw new Jbig2Error("refinement with Huffman is not supported"); 5229 } 5230 const bitmap = []; 5231 let i, row; 5232 for (i = 0; i < height; i++) { 5233 row = new Uint8Array(width); 5234 if (defaultPixelValue) { 5235
vendor: 5,765 bytes, lines 5235-5392
5235for (let j = 0; j < width; j++) { 5236 row[j] = defaultPixelValue; 5237 } 5238 } 5239 bitmap.push(row); 5240 } 5241 const decoder = decodingContext.decoder; 5242 const contextCache = decodingContext.contextCache; 5243 let stripT = huffman ? -huffmanTables.tableDeltaT.decode(huffmanInput) : -decodeInteger(contextCache, "IADT", decoder); 5244 let firstS = 0; 5245 i = 0; 5246 while (i < numberOfSymbolInstances) { 5247 const deltaT = huffman ? huffmanTables.tableDeltaT.decode(huffmanInput) : decodeInteger(contextCache, "IADT", decoder); 5248 stripT += deltaT; 5249 const deltaFirstS = huffman ? huffmanTables.tableFirstS.decode(huffmanInput) : decodeInteger(contextCache, "IAFS", decoder); 5250 firstS += deltaFirstS; 5251 let currentS = firstS; 5252 do { 5253 let currentT = 0; 5254 if (stripSize > 1) { 5255 currentT = huffman ? huffmanInput.readBits(logStripSize) : decodeInteger(contextCache, "IAIT", decoder); 5256 } 5257 const t = stripSize * stripT + currentT; 5258 const symbolId = huffman ? huffmanTables.symbolIDTable.decode(huffmanInput) : decodeIAID(contextCache, decoder, symbolCodeLength); 5259 const applyRefinement = refinement && (huffman ? huffmanInput.readBit() : decodeInteger(contextCache, "IARI", decoder)); 5260 let symbolBitmap = inputSymbols[symbolId]; 5261 let symbolWidth = symbolBitmap[0].length; 5262 let symbolHeight = symbolBitmap.length; 5263 if (applyRefinement) { 5264 const rdw = decodeInteger(contextCache, "IARDW", decoder); 5265 const rdh = decodeInteger(contextCache, "IARDH", decoder); 5266 const rdx = decodeInteger(contextCache, "IARDX", decoder); 5267 const rdy = decodeInteger(contextCache, "IARDY", decoder); 5268 symbolWidth += rdw; 5269 symbolHeight += rdh; 5270 symbolBitmap = decodeRefinement(symbolWidth, symbolHeight, refinementTemplateIndex, symbolBitmap, (rdw >> 1) + rdx, (rdh >> 1) + rdy, false, refinementAt, decodingContext); 5271 } 5272 let increment = 0; 5273 if (!transposed) { 5274 if (referenceCorner > 1) { 5275 currentS += symbolWidth - 1; 5276 } else { 5277 increment = symbolWidth - 1; 5278 } 5279 } else if (!(referenceCorner & 1)) { 5280 currentS += symbolHeight - 1; 5281 } else { 5282 increment = symbolHeight - 1; 5283 } 5284 const offsetT = t - (referenceCorner & 1 ? 0 : symbolHeight - 1); 5285 const offsetS = currentS - (referenceCorner & 2 ? symbolWidth - 1 : 0); 5286 let s2, t2, symbolRow; 5287 if (transposed) { 5288 for (s2 = 0; s2 < symbolHeight; s2++) { 5289 row = bitmap[offsetS + s2]; 5290 if (!row) { 5291 continue; 5292 } 5293 symbolRow = symbolBitmap[s2]; 5294 const maxWidth = Math.min(width - offsetT, symbolWidth); 5295 switch (combinationOperator) { 5296 case 0: 5297 for (t2 = 0; t2 < maxWidth; t2++) { 5298 row[offsetT + t2] |= symbolRow[t2]; 5299 } 5300 break; 5301 case 2: 5302 for (t2 = 0; t2 < maxWidth; t2++) { 5303 row[offsetT + t2] ^= symbolRow[t2]; 5304 } 5305 break; 5306 default: 5307 throw new Jbig2Error(`operator ${combinationOperator} is not supported`); 5308 } 5309 } 5310 } else { 5311 for (t2 = 0; t2 < symbolHeight; t2++) { 5312 row = bitmap[offsetT + t2]; 5313 if (!row) { 5314 continue; 5315 } 5316 symbolRow = symbolBitmap[t2]; 5317 switch (combinationOperator) { 5318 case 0: 5319 for (s2 = 0; s2 < symbolWidth; s2++) { 5320 row[offsetS + s2] |= symbolRow[s2]; 5321 } 5322 break; 5323 case 2: 5324 for (s2 = 0; s2 < symbolWidth; s2++) { 5325 row[offsetS + s2] ^= symbolRow[s2]; 5326 } 5327 break; 5328 default: 5329 throw new Jbig2Error(`operator ${combinationOperator} is not supported`); 5330 } 5331 } 5332 } 5333 i++; 5334 const deltaS = huffman ? huffmanTables.tableDeltaS.decode(huffmanInput) : decodeInteger(contextCache, "IADS", decoder); 5335 if (deltaS === null) { 5336 break; 5337 } 5338 currentS += increment + deltaS + dsOffset; 5339 } while (true); 5340 } 5341 return bitmap; 5342} 5343function decodePatternDictionary(mmr, patternWidth, patternHeight, maxPatternIndex, template, decodingContext) { 5344 const at = []; 5345 if (!mmr) { 5346 at.push({ 5347 x: -patternWidth, 5348 y: 0 5349 }); 5350 if (template === 0) { 5351 at.push({ 5352 x: -3, 5353 y: -1 5354 }, { 5355 x: 2, 5356 y: -2 5357 }, { 5358 x: -2, 5359 y: -2 5360 }); 5361 } 5362 } 5363 const collectiveWidth = (maxPatternIndex + 1) * patternWidth; 5364 const collectiveBitmap = decodeBitmap(mmr, collectiveWidth, patternHeight, template, false, null, at, decodingContext); 5365 const patterns = []; 5366 for (let i = 0; i <= maxPatternIndex; i++) { 5367 const patternBitmap = []; 5368 const xMin = patternWidth * i; 5369 const xMax = xMin + patternWidth; 5370 for (let y = 0; y < patternHeight; y++) { 5371 patternBitmap.push(collectiveBitmap[y].subarray(xMin, xMax)); 5372 } 5373 patterns.push(patternBitmap); 5374 } 5375 return patterns; 5376} 5377function decodeHalftoneRegion(mmr, patterns, template, regionWidth, regionHeight, defaultPixelValue, enableSkip, combinationOperator, gridWidth, gridHeight, gridOffsetX, gridOffsetY, gridVectorX, gridVectorY, decodingContext) { 5378 const skip = null; 5379 if (enableSkip) { 5380 throw new Jbig2Error("skip is not supported"); 5381 } 5382 if (combinationOperator !== 0) { 5383 throw new Jbig2Error(`operator "${combinationOperator}" is not supported in halftone region`); 5384 } 5385 const regionBitmap = []; 5386 let i, j, row; 5387 for (i = 0; i < regionHeight; i++) { 5388 row = new Uint8Array(regionWidth); 5389 if (defaultPixelValue) { 5390 for (j = 0; j < regionWidth; j++) { 5391 row[j] = defaultPixelValue; 5392 }
vendor: 15,050 bytes, lines 5392-5810
5392 5393 } 5394 regionBitmap.push(row); 5395 } 5396 const numberOfPatterns = patterns.length; 5397 const pattern0 = patterns[0]; 5398 const patternWidth = pattern0[0].length, 5399 patternHeight = pattern0.length; 5400 const bitsPerValue = log2(numberOfPatterns); 5401 const at = []; 5402 if (!mmr) { 5403 at.push({ 5404 x: template <= 1 ? 3 : 2, 5405 y: -1 5406 }); 5407 if (template === 0) { 5408 at.push({ 5409 x: -3, 5410 y: -1 5411 }, { 5412 x: 2, 5413 y: -2 5414 }, { 5415 x: -2, 5416 y: -2 5417 }); 5418 } 5419 } 5420 const grayScaleBitPlanes = []; 5421 let mmrInput, bitmap; 5422 if (mmr) { 5423 mmrInput = new Reader(decodingContext.data, decodingContext.start, decodingContext.end); 5424 } 5425 for (i = bitsPerValue - 1; i >= 0; i--) { 5426 if (mmr) { 5427 bitmap = decodeMMRBitmap(mmrInput, gridWidth, gridHeight, true); 5428 } else { 5429 bitmap = decodeBitmap(false, gridWidth, gridHeight, template, false, skip, at, decodingContext); 5430 } 5431 grayScaleBitPlanes[i] = bitmap; 5432 } 5433 let mg, ng, bit, patternIndex, patternBitmap, x, y, patternRow, regionRow; 5434 for (mg = 0; mg < gridHeight; mg++) { 5435 for (ng = 0; ng < gridWidth; ng++) { 5436 bit = 0; 5437 patternIndex = 0; 5438 for (j = bitsPerValue - 1; j >= 0; j--) { 5439 bit ^= grayScaleBitPlanes[j][mg][ng]; 5440 patternIndex |= bit << j; 5441 } 5442 patternBitmap = patterns[patternIndex]; 5443 x = gridOffsetX + mg * gridVectorY + ng * gridVectorX >> 8; 5444 y = gridOffsetY + mg * gridVectorX - ng * gridVectorY >> 8; 5445 if (x >= 0 && x + patternWidth <= regionWidth && y >= 0 && y + patternHeight <= regionHeight) { 5446 for (i = 0; i < patternHeight; i++) { 5447 regionRow = regionBitmap[y + i]; 5448 patternRow = patternBitmap[i]; 5449 for (j = 0; j < patternWidth; j++) { 5450 regionRow[x + j] |= patternRow[j]; 5451 } 5452 } 5453 } else { 5454 let regionX, regionY; 5455 for (i = 0; i < patternHeight; i++) { 5456 regionY = y + i; 5457 if (regionY < 0 || regionY >= regionHeight) { 5458 continue; 5459 } 5460 regionRow = regionBitmap[regionY]; 5461 patternRow = patternBitmap[i]; 5462 for (j = 0; j < patternWidth; j++) { 5463 regionX = x + j; 5464 if (regionX >= 0 && regionX < regionWidth) { 5465 regionRow[regionX] |= patternRow[j]; 5466 } 5467 } 5468 } 5469 } 5470 } 5471 } 5472 return regionBitmap; 5473} 5474function readSegmentHeader(data, start) { 5475 const segmentHeader = {}; 5476 segmentHeader.number = readUint32(data, start); 5477 const flags = data[start + 4]; 5478 const segmentType = flags & 0x3f; 5479 if (!SegmentTypes[segmentType]) { 5480 throw new Jbig2Error("invalid segment type: " + segmentType); 5481 } 5482 segmentHeader.type = segmentType; 5483 segmentHeader.typeName = SegmentTypes[segmentType]; 5484 segmentHeader.deferredNonRetain = !!(flags & 0x80); 5485 const pageAssociationFieldSize = !!(flags & 0x40); 5486 const referredFlags = data[start + 5]; 5487 let referredToCount = referredFlags >> 5 & 7; 5488 const retainBits = [referredFlags & 31]; 5489 let position = start + 6; 5490 if (referredFlags === 7) { 5491 referredToCount = readUint32(data, position - 1) & 0x1fffffff; 5492 position += 3; 5493 let bytes = referredToCount + 7 >> 3; 5494 retainBits[0] = data[position++]; 5495 while (--bytes > 0) { 5496 retainBits.push(data[position++]); 5497 } 5498 } else if (referredFlags === 5 || referredFlags === 6) { 5499 throw new Jbig2Error("invalid referred-to flags"); 5500 } 5501 segmentHeader.retainBits = retainBits; 5502 let referredToSegmentNumberSize = 4; 5503 if (segmentHeader.number <= 256) { 5504 referredToSegmentNumberSize = 1; 5505 } else if (segmentHeader.number <= 65536) { 5506 referredToSegmentNumberSize = 2; 5507 } 5508 const referredTo = []; 5509 let i, ii; 5510 for (i = 0; i < referredToCount; i++) { 5511 let number; 5512 if (referredToSegmentNumberSize === 1) { 5513 number = data[position]; 5514 } else if (referredToSegmentNumberSize === 2) { 5515 number = readUint16(data, position); 5516 } else { 5517 number = readUint32(data, position); 5518 } 5519 referredTo.push(number); 5520 position += referredToSegmentNumberSize; 5521 } 5522 segmentHeader.referredTo = referredTo; 5523 if (!pageAssociationFieldSize) { 5524 segmentHeader.pageAssociation = data[position++]; 5525 } else { 5526 segmentHeader.pageAssociation = readUint32(data, position); 5527 position += 4; 5528 } 5529 segmentHeader.length = readUint32(data, position); 5530 position += 4; 5531 if (segmentHeader.length === 0xffffffff) { 5532 if (segmentType === 38) { 5533 const genericRegionInfo = readRegionSegmentInformation(data, position); 5534 const genericRegionSegmentFlags = data[position + RegionSegmentInformationFieldLength]; 5535 const genericRegionMmr = !!(genericRegionSegmentFlags & 1); 5536 const searchPatternLength = 6; 5537 const searchPattern = new Uint8Array(searchPatternLength); 5538 if (!genericRegionMmr) { 5539 searchPattern[0] = 0xff; 5540 searchPattern[1] = 0xac; 5541 } 5542 searchPattern[2] = genericRegionInfo.height >>> 24 & 0xff; 5543 searchPattern[3] = genericRegionInfo.height >> 16 & 0xff; 5544 searchPattern[4] = genericRegionInfo.height >> 8 & 0xff; 5545 searchPattern[5] = genericRegionInfo.height & 0xff; 5546 for (i = position, ii = data.length; i < ii; i++) { 5547 let j = 0; 5548 while (j < searchPatternLength && searchPattern[j] === data[i + j]) { 5549 j++; 5550 } 5551 if (j === searchPatternLength) { 5552 segmentHeader.length = i + searchPatternLength; 5553 break; 5554 } 5555 } 5556 if (segmentHeader.length === 0xffffffff) { 5557 throw new Jbig2Error("segment end was not found"); 5558 } 5559 } else { 5560 throw new Jbig2Error("invalid unknown segment length"); 5561 } 5562 } 5563 segmentHeader.headerEnd = position; 5564 return segmentHeader; 5565} 5566function readSegments(header, data, start, end) { 5567 const segments = []; 5568 let position = start; 5569 while (position < end) { 5570 const segmentHeader = readSegmentHeader(data, position); 5571 position = segmentHeader.headerEnd; 5572 const segment = { 5573 header: segmentHeader, 5574 data 5575 }; 5576 if (!header.randomAccess) { 5577 segment.start = position; 5578 position += segmentHeader.length; 5579 segment.end = position; 5580 } 5581 segments.push(segment); 5582 if (segmentHeader.type === 51) { 5583 break; 5584 } 5585 } 5586 if (header.randomAccess) { 5587 for (let i = 0, ii = segments.length; i < ii; i++) { 5588 segments[i].start = position; 5589 position += segments[i].header.length; 5590 segments[i].end = position; 5591 } 5592 } 5593 return segments; 5594} 5595function readRegionSegmentInformation(data, start) { 5596 return { 5597 width: readUint32(data, start), 5598 height: readUint32(data, start + 4), 5599 x: readUint32(data, start + 8), 5600 y: readUint32(data, start + 12), 5601 combinationOperator: data[start + 16] & 7 5602 }; 5603} 5604const RegionSegmentInformationFieldLength = 17; 5605function processSegment(segment, visitor) { 5606 const header = segment.header; 5607 const data = segment.data, 5608 end = segment.end; 5609 let position = segment.start; 5610 let args, at, i, atLength; 5611 switch (header.type) { 5612 case 0: 5613 const dictionary = {}; 5614 const dictionaryFlags = readUint16(data, position); 5615 dictionary.huffman = !!(dictionaryFlags & 1); 5616 dictionary.refinement = !!(dictionaryFlags & 2); 5617 dictionary.huffmanDHSelector = dictionaryFlags >> 2 & 3; 5618 dictionary.huffmanDWSelector = dictionaryFlags >> 4 & 3; 5619 dictionary.bitmapSizeSelector = dictionaryFlags >> 6 & 1; 5620 dictionary.aggregationInstancesSelector = dictionaryFlags >> 7 & 1; 5621 dictionary.bitmapCodingContextUsed = !!(dictionaryFlags & 256); 5622 dictionary.bitmapCodingContextRetained = !!(dictionaryFlags & 512); 5623 dictionary.template = dictionaryFlags >> 10 & 3; 5624 dictionary.refinementTemplate = dictionaryFlags >> 12 & 1; 5625 position += 2; 5626 if (!dictionary.huffman) { 5627 atLength = dictionary.template === 0 ? 4 : 1; 5628 at = []; 5629 for (i = 0; i < atLength; i++) { 5630 at.push({ 5631 x: readInt8(data, position), 5632 y: readInt8(data, position + 1) 5633 }); 5634 position += 2; 5635 } 5636 dictionary.at = at; 5637 } 5638 if (dictionary.refinement && !dictionary.refinementTemplate) { 5639 at = []; 5640 for (i = 0; i < 2; i++) { 5641 at.push({ 5642 x: readInt8(data, position), 5643 y: readInt8(data, position + 1) 5644 }); 5645 position += 2; 5646 } 5647 dictionary.refinementAt = at; 5648 } 5649 dictionary.numberOfExportedSymbols = readUint32(data, position); 5650 position += 4; 5651 dictionary.numberOfNewSymbols = readUint32(data, position); 5652 position += 4; 5653 args = [dictionary, header.number, header.referredTo, data, position, end]; 5654 break; 5655 case 6: 5656 case 7: 5657 const textRegion = {}; 5658 textRegion.info = readRegionSegmentInformation(data, position); 5659 position += RegionSegmentInformationFieldLength; 5660 const textRegionSegmentFlags = readUint16(data, position); 5661 position += 2; 5662 textRegion.huffman = !!(textRegionSegmentFlags & 1); 5663 textRegion.refinement = !!(textRegionSegmentFlags & 2); 5664 textRegion.logStripSize = textRegionSegmentFlags >> 2 & 3; 5665 textRegion.stripSize = 1 << textRegion.logStripSize; 5666 textRegion.referenceCorner = textRegionSegmentFlags >> 4 & 3; 5667 textRegion.transposed = !!(textRegionSegmentFlags & 64); 5668 textRegion.combinationOperator = textRegionSegmentFlags >> 7 & 3; 5669 textRegion.defaultPixelValue = textRegionSegmentFlags >> 9 & 1; 5670 textRegion.dsOffset = textRegionSegmentFlags << 17 >> 27; 5671 textRegion.refinementTemplate = textRegionSegmentFlags >> 15 & 1; 5672 if (textRegion.huffman) { 5673 const textRegionHuffmanFlags = readUint16(data, position); 5674 position += 2; 5675 textRegion.huffmanFS = textRegionHuffmanFlags & 3; 5676 textRegion.huffmanDS = textRegionHuffmanFlags >> 2 & 3; 5677 textRegion.huffmanDT = textRegionHuffmanFlags >> 4 & 3; 5678 textRegion.huffmanRefinementDW = textRegionHuffmanFlags >> 6 & 3; 5679 textRegion.huffmanRefinementDH = textRegionHuffmanFlags >> 8 & 3; 5680 textRegion.huffmanRefinementDX = textRegionHuffmanFlags >> 10 & 3; 5681 textRegion.huffmanRefinementDY = textRegionHuffmanFlags >> 12 & 3; 5682 textRegion.huffmanRefinementSizeSelector = !!(textRegionHuffmanFlags & 0x4000); 5683 } 5684 if (textRegion.refinement && !textRegion.refinementTemplate) { 5685 at = []; 5686 for (i = 0; i < 2; i++) { 5687 at.push({ 5688 x: readInt8(data, position), 5689 y: readInt8(data, position + 1) 5690 }); 5691 position += 2; 5692 } 5693 textRegion.refinementAt = at; 5694 } 5695 textRegion.numberOfSymbolInstances = readUint32(data, position); 5696 position += 4; 5697 args = [textRegion, header.referredTo, data, position, end]; 5698 break; 5699 case 16: 5700 const patternDictionary = {}; 5701 const patternDictionaryFlags = data[position++]; 5702 patternDictionary.mmr = !!(patternDictionaryFlags & 1); 5703 patternDictionary.template = patternDictionaryFlags >> 1 & 3; 5704 patternDictionary.patternWidth = data[position++]; 5705 patternDictionary.patternHeight = data[position++]; 5706 patternDictionary.maxPatternIndex = readUint32(data, position); 5707 position += 4; 5708 args = [patternDictionary, header.number, data, position, end]; 5709 break; 5710 case 22: 5711 case 23: 5712 const halftoneRegion = {}; 5713 halftoneRegion.info = readRegionSegmentInformation(data, position); 5714 position += RegionSegmentInformationFieldLength; 5715 const halftoneRegionFlags = data[position++]; 5716 halftoneRegion.mmr = !!(halftoneRegionFlags & 1); 5717 halftoneRegion.template = halftoneRegionFlags >> 1 & 3; 5718 halftoneRegion.enableSkip = !!(halftoneRegionFlags & 8); 5719 halftoneRegion.combinationOperator = halftoneRegionFlags >> 4 & 7; 5720 halftoneRegion.defaultPixelValue = halftoneRegionFlags >> 7 & 1; 5721 halftoneRegion.gridWidth = readUint32(data, position); 5722 position += 4; 5723 halftoneRegion.gridHeight = readUint32(data, position); 5724 position += 4; 5725 halftoneRegion.gridOffsetX = readUint32(data, position) & 0xffffffff; 5726 position += 4; 5727 halftoneRegion.gridOffsetY = readUint32(data, position) & 0xffffffff; 5728 position += 4; 5729 halftoneRegion.gridVectorX = readUint16(data, position); 5730 position += 2; 5731 halftoneRegion.gridVectorY = readUint16(data, position); 5732 position += 2; 5733 args = [halftoneRegion, header.referredTo, data, position, end]; 5734 break; 5735 case 38: 5736 case 39: 5737 const genericRegion = {}; 5738 genericRegion.info = readRegionSegmentInformation(data, position); 5739 position += RegionSegmentInformationFieldLength; 5740 const genericRegionSegmentFlags = data[position++]; 5741 genericRegion.mmr = !!(genericRegionSegmentFlags & 1); 5742 genericRegion.template = genericRegionSegmentFlags >> 1 & 3; 5743 genericRegion.prediction = !!(genericRegionSegmentFlags & 8); 5744 if (!genericRegion.mmr) { 5745 atLength = genericRegion.template === 0 ? 4 : 1; 5746 at = []; 5747 for (i = 0; i < atLength; i++) { 5748 at.push({ 5749 x: readInt8(data, position), 5750 y: readInt8(data, position + 1) 5751 }); 5752 position += 2; 5753 } 5754 genericRegion.at = at; 5755 } 5756 args = [genericRegion, data, position, end]; 5757 break; 5758 case 48: 5759 const pageInfo = { 5760 width: readUint32(data, position), 5761 height: readUint32(data, position + 4), 5762 resolutionX: readUint32(data, position + 8), 5763 resolutionY: readUint32(data, position + 12) 5764 }; 5765 if (pageInfo.height === 0xffffffff) { 5766 delete pageInfo.height; 5767 } 5768 const pageSegmentFlags = data[position + 16]; 5769 readUint16(data, position + 17); 5770 pageInfo.lossless = !!(pageSegmentFlags & 1); 5771 pageInfo.refinement = !!(pageSegmentFlags & 2); 5772 pageInfo.defaultPixelValue = pageSegmentFlags >> 2 & 1; 5773 pageInfo.combinationOperator = pageSegmentFlags >> 3 & 3; 5774 pageInfo.requiresBuffer = !!(pageSegmentFlags & 32); 5775 pageInfo.combinationOperatorOverride = !!(pageSegmentFlags & 64); 5776 args = [pageInfo]; 5777 break; 5778 case 49: 5779 break; 5780 case 50: 5781 break; 5782 case 51: 5783 break; 5784 case 53: 5785 args = [header.number, data, position, end]; 5786 break; 5787 case 62: 5788 break; 5789 default: 5790 throw new Jbig2Error(`segment type ${header.typeName}(${header.type}) is not implemented`); 5791 } 5792 const callbackName = "on" + header.typeName; 5793 if (callbackName in visitor) { 5794 visitor[callbackName].apply(visitor, args); 5795 } 5796} 5797function processSegments(segments, visitor) { 5798 for (let i = 0, ii = segments.length; i < ii; i++) { 5799 processSegment(segments[i], visitor); 5800 } 5801} 5802function parseJbig2Chunks(chunks) { 5803 const visitor = new SimpleSegmentVisitor(); 5804 for (let i = 0, ii = chunks.length; i < ii; i++) { 5805 const chunk = chunks[i]; 5806 const segments = readSegments({}, chunk.data, chunk.start, chunk.end); 5807 processSegments(segments, visitor); 5808 } 5809 return visitor.buffer; 5810}
5811function parseJbig2(data) { 5812 throw new Error("Not implemented: parseJbig2")
vendor: 21,175 bytes, lines 5812-6406
5812; 5813} 5814class SimpleSegmentVisitor { 5815 onPageInformation(info) { 5816 this.currentPageInfo = info; 5817 const rowSize = info.width + 7 >> 3; 5818 const buffer = new Uint8ClampedArray(rowSize * info.height); 5819 if (info.defaultPixelValue) { 5820 buffer.fill(0xff); 5821 } 5822 this.buffer = buffer; 5823 } 5824 drawBitmap(regionInfo, bitmap) { 5825 const pageInfo = this.currentPageInfo; 5826 const width = regionInfo.width, 5827 height = regionInfo.height; 5828 const rowSize = pageInfo.width + 7 >> 3; 5829 const combinationOperator = pageInfo.combinationOperatorOverride ? regionInfo.combinationOperator : pageInfo.combinationOperator; 5830 const buffer = this.buffer; 5831 const mask0 = 128 >> (regionInfo.x & 7); 5832 let offset0 = regionInfo.y * rowSize + (regionInfo.x >> 3); 5833 let i, j, mask, offset; 5834 switch (combinationOperator) { 5835 case 0: 5836 for (i = 0; i < height; i++) { 5837 mask = mask0; 5838 offset = offset0; 5839 for (j = 0; j < width; j++) { 5840 if (bitmap[i][j]) { 5841 buffer[offset] |= mask; 5842 } 5843 mask >>= 1; 5844 if (!mask) { 5845 mask = 128; 5846 offset++; 5847 } 5848 } 5849 offset0 += rowSize; 5850 } 5851 break; 5852 case 2: 5853 for (i = 0; i < height; i++) { 5854 mask = mask0; 5855 offset = offset0; 5856 for (j = 0; j < width; j++) { 5857 if (bitmap[i][j]) { 5858 buffer[offset] ^= mask; 5859 } 5860 mask >>= 1; 5861 if (!mask) { 5862 mask = 128; 5863 offset++; 5864 } 5865 } 5866 offset0 += rowSize; 5867 } 5868 break; 5869 default: 5870 throw new Jbig2Error(`operator ${combinationOperator} is not supported`); 5871 } 5872 } 5873 onImmediateGenericRegion(region, data, start, end) { 5874 const regionInfo = region.info; 5875 const decodingContext = new DecodingContext(data, start, end); 5876 const bitmap = decodeBitmap(region.mmr, regionInfo.width, regionInfo.height, region.template, region.prediction, null, region.at, decodingContext); 5877 this.drawBitmap(regionInfo, bitmap); 5878 } 5879 onImmediateLosslessGenericRegion() { 5880 this.onImmediateGenericRegion(...arguments); 5881 } 5882 onSymbolDictionary(dictionary, currentSegment, referredSegments, data, start, end) { 5883 let huffmanTables, huffmanInput; 5884 if (dictionary.huffman) { 5885 huffmanTables = getSymbolDictionaryHuffmanTables(dictionary, referredSegments, this.customTables); 5886 huffmanInput = new Reader(data, start, end); 5887 } 5888 let symbols = this.symbols; 5889 if (!symbols) { 5890 this.symbols = symbols = {}; 5891 } 5892 const inputSymbols = []; 5893 for (const referredSegment of referredSegments) { 5894 const referredSymbols = symbols[referredSegment]; 5895 if (referredSymbols) { 5896 inputSymbols.push(...referredSymbols); 5897 } 5898 } 5899 const decodingContext = new DecodingContext(data, start, end); 5900 symbols[currentSegment] = decodeSymbolDictionary(dictionary.huffman, dictionary.refinement, inputSymbols, dictionary.numberOfNewSymbols, dictionary.numberOfExportedSymbols, huffmanTables, dictionary.template, dictionary.at, dictionary.refinementTemplate, dictionary.refinementAt, decodingContext, huffmanInput); 5901 } 5902 onImmediateTextRegion(region, referredSegments, data, start, end) { 5903 const regionInfo = region.info; 5904 let huffmanTables, huffmanInput; 5905 const symbols = this.symbols; 5906 const inputSymbols = []; 5907 for (const referredSegment of referredSegments) { 5908 const referredSymbols = symbols[referredSegment]; 5909 if (referredSymbols) { 5910 inputSymbols.push(...referredSymbols); 5911 } 5912 } 5913 const symbolCodeLength = log2(inputSymbols.length); 5914 if (region.huffman) { 5915 huffmanInput = new Reader(data, start, end); 5916 huffmanTables = getTextRegionHuffmanTables(region, referredSegments, this.customTables, inputSymbols.length, huffmanInput); 5917 } 5918 const decodingContext = new DecodingContext(data, start, end); 5919 const bitmap = decodeTextRegion(region.huffman, region.refinement, regionInfo.width, regionInfo.height, region.defaultPixelValue, region.numberOfSymbolInstances, region.stripSize, inputSymbols, symbolCodeLength, region.transposed, region.dsOffset, region.referenceCorner, region.combinationOperator, huffmanTables, region.refinementTemplate, region.refinementAt, decodingContext, region.logStripSize, huffmanInput); 5920 this.drawBitmap(regionInfo, bitmap); 5921 } 5922 onImmediateLosslessTextRegion() { 5923 this.onImmediateTextRegion(...arguments); 5924 } 5925 onPatternDictionary(dictionary, currentSegment, data, start, end) { 5926 let patterns = this.patterns; 5927 if (!patterns) { 5928 this.patterns = patterns = {}; 5929 } 5930 const decodingContext = new DecodingContext(data, start, end); 5931 patterns[currentSegment] = decodePatternDictionary(dictionary.mmr, dictionary.patternWidth, dictionary.patternHeight, dictionary.maxPatternIndex, dictionary.template, decodingContext); 5932 } 5933 onImmediateHalftoneRegion(region, referredSegments, data, start, end) { 5934 const patterns = this.patterns[referredSegments[0]]; 5935 const regionInfo = region.info; 5936 const decodingContext = new DecodingContext(data, start, end); 5937 const bitmap = decodeHalftoneRegion(region.mmr, patterns, region.template, regionInfo.width, regionInfo.height, region.defaultPixelValue, region.enableSkip, region.combinationOperator, region.gridWidth, region.gridHeight, region.gridOffsetX, region.gridOffsetY, region.gridVectorX, region.gridVectorY, decodingContext); 5938 this.drawBitmap(regionInfo, bitmap); 5939 } 5940 onImmediateLosslessHalftoneRegion() { 5941 this.onImmediateHalftoneRegion(...arguments); 5942 } 5943 onTables(currentSegment, data, start, end) { 5944 let customTables = this.customTables; 5945 if (!customTables) { 5946 this.customTables = customTables = {}; 5947 } 5948 customTables[currentSegment] = decodeTablesSegment(data, start, end); 5949 } 5950} 5951class HuffmanLine { 5952 constructor(lineData) { 5953 if (lineData.length === 2) { 5954 this.isOOB = true; 5955 this.rangeLow = 0; 5956 this.prefixLength = lineData[0]; 5957 this.rangeLength = 0; 5958 this.prefixCode = lineData[1]; 5959 this.isLowerRange = false; 5960 } else { 5961 this.isOOB = false; 5962 this.rangeLow = lineData[0]; 5963 this.prefixLength = lineData[1]; 5964 this.rangeLength = lineData[2]; 5965 this.prefixCode = lineData[3]; 5966 this.isLowerRange = lineData[4] === "lower"; 5967 } 5968 } 5969} 5970class HuffmanTreeNode { 5971 constructor(line) { 5972 this.children = []; 5973 if (line) { 5974 this.isLeaf = true; 5975 this.rangeLength = line.rangeLength; 5976 this.rangeLow = line.rangeLow; 5977 this.isLowerRange = line.isLowerRange; 5978 this.isOOB = line.isOOB; 5979 } else { 5980 this.isLeaf = false; 5981 } 5982 } 5983 buildTree(line, shift) { 5984 const bit = line.prefixCode >> shift & 1; 5985 if (shift <= 0) { 5986 this.children[bit] = new HuffmanTreeNode(line); 5987 } else { 5988 let node = this.children[bit]; 5989 if (!node) { 5990 this.children[bit] = node = new HuffmanTreeNode(null); 5991 } 5992 node.buildTree(line, shift - 1); 5993 } 5994 } 5995 decodeNode(reader) { 5996 if (this.isLeaf) { 5997 if (this.isOOB) { 5998 return null; 5999 } 6000 const htOffset = reader.readBits(this.rangeLength); 6001 return this.rangeLow + (this.isLowerRange ? -htOffset : htOffset); 6002 } 6003 const node = this.children[reader.readBit()]; 6004 if (!node) { 6005 throw new Jbig2Error("invalid Huffman data"); 6006 } 6007 return node.decodeNode(reader); 6008 } 6009} 6010class HuffmanTable { 6011 constructor(lines, prefixCodesDone) { 6012 if (!prefixCodesDone) { 6013 this.assignPrefixCodes(lines); 6014 } 6015 this.rootNode = new HuffmanTreeNode(null); 6016 for (let i = 0, ii = lines.length; i < ii; i++) { 6017 const line = lines[i]; 6018 if (line.prefixLength > 0) { 6019 this.rootNode.buildTree(line, line.prefixLength - 1); 6020 } 6021 } 6022 } 6023 decode(reader) { 6024 return this.rootNode.decodeNode(reader); 6025 } 6026 assignPrefixCodes(lines) { 6027 const linesLength = lines.length; 6028 let prefixLengthMax = 0; 6029 for (let i = 0; i < linesLength; i++) { 6030 prefixLengthMax = Math.max(prefixLengthMax, lines[i].prefixLength); 6031 } 6032 const histogram = new Uint32Array(prefixLengthMax + 1); 6033 for (let i = 0; i < linesLength; i++) { 6034 histogram[lines[i].prefixLength]++; 6035 } 6036 let currentLength = 1, 6037 firstCode = 0, 6038 currentCode, 6039 currentTemp, 6040 line; 6041 histogram[0] = 0; 6042 while (currentLength <= prefixLengthMax) { 6043 firstCode = firstCode + histogram[currentLength - 1] << 1; 6044 currentCode = firstCode; 6045 currentTemp = 0; 6046 while (currentTemp < linesLength) { 6047 line = lines[currentTemp]; 6048 if (line.prefixLength === currentLength) { 6049 line.prefixCode = currentCode; 6050 currentCode++; 6051 } 6052 currentTemp++; 6053 } 6054 currentLength++; 6055 } 6056 } 6057} 6058function decodeTablesSegment(data, start, end) { 6059 const flags = data[start]; 6060 const lowestValue = readUint32(data, start + 1) & 0xffffffff; 6061 const highestValue = readUint32(data, start + 5) & 0xffffffff; 6062 const reader = new Reader(data, start + 9, end); 6063 const prefixSizeBits = (flags >> 1 & 7) + 1; 6064 const rangeSizeBits = (flags >> 4 & 7) + 1; 6065 const lines = []; 6066 let prefixLength, 6067 rangeLength, 6068 currentRangeLow = lowestValue; 6069 do { 6070 prefixLength = reader.readBits(prefixSizeBits); 6071 rangeLength = reader.readBits(rangeSizeBits); 6072 lines.push(new HuffmanLine([currentRangeLow, prefixLength, rangeLength, 0])); 6073 currentRangeLow += 1 << rangeLength; 6074 } while (currentRangeLow < highestValue); 6075 prefixLength = reader.readBits(prefixSizeBits); 6076 lines.push(new HuffmanLine([lowestValue - 1, prefixLength, 32, 0, "lower"])); 6077 prefixLength = reader.readBits(prefixSizeBits); 6078 lines.push(new HuffmanLine([highestValue, prefixLength, 32, 0])); 6079 if (flags & 1) { 6080 prefixLength = reader.readBits(prefixSizeBits); 6081 lines.push(new HuffmanLine([prefixLength, 0])); 6082 } 6083 return new HuffmanTable(lines, false); 6084} 6085const standardTablesCache = {}; 6086function getStandardTable(number) { 6087 let table = standardTablesCache[number]; 6088 if (table) { 6089 return table; 6090 } 6091 let lines; 6092 switch (number) { 6093 case 1: 6094 lines = [[0, 1, 4, 0x0], [16, 2, 8, 0x2], [272, 3, 16, 0x6], [65808, 3, 32, 0x7]]; 6095 break; 6096 case 2: 6097 lines = [[0, 1, 0, 0x0], [1, 2, 0, 0x2], [2, 3, 0, 0x6], [3, 4, 3, 0xe], [11, 5, 6, 0x1e], [75, 6, 32, 0x3e], [6, 0x3f]]; 6098 break; 6099 case 3: 6100 lines = [[-256, 8, 8, 0xfe], [0, 1, 0, 0x0], [1, 2, 0, 0x2], [2, 3, 0, 0x6], [3, 4, 3, 0xe], [11, 5, 6, 0x1e], [-257, 8, 32, 0xff, "lower"], [75, 7, 32, 0x7e], [6, 0x3e]]; 6101 break; 6102 case 4: 6103 lines = [[1, 1, 0, 0x0], [2, 2, 0, 0x2], [3, 3, 0, 0x6], [4, 4, 3, 0xe], [12, 5, 6, 0x1e], [76, 5, 32, 0x1f]]; 6104 break; 6105 case 5: 6106 lines = [[-255, 7, 8, 0x7e], [1, 1, 0, 0x0], [2, 2, 0, 0x2], [3, 3, 0, 0x6], [4, 4, 3, 0xe], [12, 5, 6, 0x1e], [-256, 7, 32, 0x7f, "lower"], [76, 6, 32, 0x3e]]; 6107 break; 6108 case 6: 6109 lines = [[-2048, 5, 10, 0x1c], [-1024, 4, 9, 0x8], [-512, 4, 8, 0x9], [-256, 4, 7, 0xa], [-128, 5, 6, 0x1d], [-64, 5, 5, 0x1e], [-32, 4, 5, 0xb], [0, 2, 7, 0x0], [128, 3, 7, 0x2], [256, 3, 8, 0x3], [512, 4, 9, 0xc], [1024, 4, 10, 0xd], [-2049, 6, 32, 0x3e, "lower"], [2048, 6, 32, 0x3f]]; 6110 break; 6111 case 7: 6112 lines = [[-1024, 4, 9, 0x8], [-512, 3, 8, 0x0], [-256, 4, 7, 0x9], [-128, 5, 6, 0x1a], [-64, 5, 5, 0x1b], [-32, 4, 5, 0xa], [0, 4, 5, 0xb], [32, 5, 5, 0x1c], [64, 5, 6, 0x1d], [128, 4, 7, 0xc], [256, 3, 8, 0x1], [512, 3, 9, 0x2], [1024, 3, 10, 0x3], [-1025, 5, 32, 0x1e, "lower"], [2048, 5, 32, 0x1f]]; 6113 break; 6114 case 8: 6115 lines = [[-15, 8, 3, 0xfc], [-7, 9, 1, 0x1fc], [-5, 8, 1, 0xfd], [-3, 9, 0, 0x1fd], [-2, 7, 0, 0x7c], [-1, 4, 0, 0xa], [0, 2, 1, 0x0], [2, 5, 0, 0x1a], [3, 6, 0, 0x3a], [4, 3, 4, 0x4], [20, 6, 1, 0x3b], [22, 4, 4, 0xb], [38, 4, 5, 0xc], [70, 5, 6, 0x1b], [134, 5, 7, 0x1c], [262, 6, 7, 0x3c], [390, 7, 8, 0x7d], [646, 6, 10, 0x3d], [-16, 9, 32, 0x1fe, "lower"], [1670, 9, 32, 0x1ff], [2, 0x1]]; 6116 break; 6117 case 9: 6118 lines = [[-31, 8, 4, 0xfc], [-15, 9, 2, 0x1fc], [-11, 8, 2, 0xfd], [-7, 9, 1, 0x1fd], [-5, 7, 1, 0x7c], [-3, 4, 1, 0xa], [-1, 3, 1, 0x2], [1, 3, 1, 0x3], [3, 5, 1, 0x1a], [5, 6, 1, 0x3a], [7, 3, 5, 0x4], [39, 6, 2, 0x3b], [43, 4, 5, 0xb], [75, 4, 6, 0xc], [139, 5, 7, 0x1b], [267, 5, 8, 0x1c], [523, 6, 8, 0x3c], [779, 7, 9, 0x7d], [1291, 6, 11, 0x3d], [-32, 9, 32, 0x1fe, "lower"], [3339, 9, 32, 0x1ff], [2, 0x0]]; 6119 break; 6120 case 10: 6121 lines = [[-21, 7, 4, 0x7a], [-5, 8, 0, 0xfc], [-4, 7, 0, 0x7b], [-3, 5, 0, 0x18], [-2, 2, 2, 0x0], [2, 5, 0, 0x19], [3, 6, 0, 0x36], [4, 7, 0, 0x7c], [5, 8, 0, 0xfd], [6, 2, 6, 0x1], [70, 5, 5, 0x1a], [102, 6, 5, 0x37], [134, 6, 6, 0x38], [198, 6, 7, 0x39], [326, 6, 8, 0x3a], [582, 6, 9, 0x3b], [1094, 6, 10, 0x3c], [2118, 7, 11, 0x7d], [-22, 8, 32, 0xfe, "lower"], [4166, 8, 32, 0xff], [2, 0x2]]; 6122 break; 6123 case 11: 6124 lines = [[1, 1, 0, 0x0], [2, 2, 1, 0x2], [4, 4, 0, 0xc], [5, 4, 1, 0xd], [7, 5, 1, 0x1c], [9, 5, 2, 0x1d], [13, 6, 2, 0x3c], [17, 7, 2, 0x7a], [21, 7, 3, 0x7b], [29, 7, 4, 0x7c], [45, 7, 5, 0x7d], [77, 7, 6, 0x7e], [141, 7, 32, 0x7f]]; 6125 break; 6126 case 12: 6127 lines = [[1, 1, 0, 0x0], [2, 2, 0, 0x2], [3, 3, 1, 0x6], [5, 5, 0, 0x1c], [6, 5, 1, 0x1d], [8, 6, 1, 0x3c], [10, 7, 0, 0x7a], [11, 7, 1, 0x7b], [13, 7, 2, 0x7c], [17, 7, 3, 0x7d], [25, 7, 4, 0x7e], [41, 8, 5, 0xfe], [73, 8, 32, 0xff]]; 6128 break; 6129 case 13: 6130 lines = [[1, 1, 0, 0x0], [2, 3, 0, 0x4], [3, 4, 0, 0xc], [4, 5, 0, 0x1c], [5, 4, 1, 0xd], [7, 3, 3, 0x5], [15, 6, 1, 0x3a], [17, 6, 2, 0x3b], [21, 6, 3, 0x3c], [29, 6, 4, 0x3d], [45, 6, 5, 0x3e], [77, 7, 6, 0x7e], [141, 7, 32, 0x7f]]; 6131 break; 6132 case 14: 6133 lines = [[-2, 3, 0, 0x4], [-1, 3, 0, 0x5], [0, 1, 0, 0x0], [1, 3, 0, 0x6], [2, 3, 0, 0x7]]; 6134 break; 6135 case 15: 6136 lines = [[-24, 7, 4, 0x7c], [-8, 6, 2, 0x3c], [-4, 5, 1, 0x1c], [-2, 4, 0, 0xc], [-1, 3, 0, 0x4], [0, 1, 0, 0x0], [1, 3, 0, 0x5], [2, 4, 0, 0xd], [3, 5, 1, 0x1d], [5, 6, 2, 0x3d], [9, 7, 4, 0x7d], [-25, 7, 32, 0x7e, "lower"], [25, 7, 32, 0x7f]]; 6137 break; 6138 default: 6139 throw new Jbig2Error(`standard table B.${number} does not exist`); 6140 } 6141 for (let i = 0, ii = lines.length; i < ii; i++) { 6142 lines[i] = new HuffmanLine(lines[i]); 6143 } 6144 table = new HuffmanTable(lines, true); 6145 standardTablesCache[number] = table; 6146 return table; 6147} 6148class Reader { 6149 constructor(data, start, end) { 6150 this.data = data; 6151 this.start = start; 6152 this.end = end; 6153 this.position = start; 6154 this.shift = -1; 6155 this.currentByte = 0; 6156 } 6157 readBit() { 6158 if (this.shift < 0) { 6159 if (this.position >= this.end) { 6160 throw new Jbig2Error("end of data while reading bit"); 6161 } 6162 this.currentByte = this.data[this.position++]; 6163 this.shift = 7; 6164 } 6165 const bit = this.currentByte >> this.shift & 1; 6166 this.shift--; 6167 return bit; 6168 } 6169 readBits(numBits) { 6170 let result = 0, 6171 i; 6172 for (i = numBits - 1; i >= 0; i--) { 6173 result |= this.readBit() << i; 6174 } 6175 return result; 6176 } 6177 byteAlign() { 6178 this.shift = -1; 6179 } 6180 next() { 6181 if (this.position >= this.end) { 6182 return -1; 6183 } 6184 return this.data[this.position++]; 6185 } 6186} 6187function getCustomHuffmanTable(index, referredTo, customTables) { 6188 let currentIndex = 0; 6189 for (let i = 0, ii = referredTo.length; i < ii; i++) { 6190 const table = customTables[referredTo[i]]; 6191 if (table) { 6192 if (index === currentIndex) { 6193 return table; 6194 } 6195 currentIndex++; 6196 } 6197 } 6198 throw new Jbig2Error("can't find custom Huffman table"); 6199} 6200function getTextRegionHuffmanTables(textRegion, referredTo, customTables, numberOfSymbols, reader) { 6201 const codes = []; 6202 for (let i = 0; i <= 34; i++) { 6203 const codeLength = reader.readBits(4); 6204 codes.push(new HuffmanLine([i, codeLength, 0, 0])); 6205 } 6206 const runCodesTable = new HuffmanTable(codes, false); 6207 codes.length = 0; 6208 for (let i = 0; i < numberOfSymbols;) { 6209 const codeLength = runCodesTable.decode(reader); 6210 if (codeLength >= 32) { 6211 let repeatedLength, numberOfRepeats, j; 6212 switch (codeLength) { 6213 case 32: 6214 if (i === 0) { 6215 throw new Jbig2Error("no previous value in symbol ID table"); 6216 } 6217 numberOfRepeats = reader.readBits(2) + 3; 6218 repeatedLength = codes[i - 1].prefixLength; 6219 break; 6220 case 33: 6221 numberOfRepeats = reader.readBits(3) + 3; 6222 repeatedLength = 0; 6223 break; 6224 case 34: 6225 numberOfRepeats = reader.readBits(7) + 11; 6226 repeatedLength = 0; 6227 break; 6228 default: 6229 throw new Jbig2Error("invalid code length in symbol ID table"); 6230 } 6231 for (j = 0; j < numberOfRepeats; j++) { 6232 codes.push(new HuffmanLine([i, repeatedLength, 0, 0])); 6233 i++; 6234 } 6235 } else { 6236 codes.push(new HuffmanLine([i, codeLength, 0, 0])); 6237 i++; 6238 } 6239 } 6240 reader.byteAlign(); 6241 const symbolIDTable = new HuffmanTable(codes, false); 6242 let customIndex = 0, 6243 tableFirstS, 6244 tableDeltaS, 6245 tableDeltaT; 6246 switch (textRegion.huffmanFS) { 6247 case 0: 6248 case 1: 6249 tableFirstS = getStandardTable(textRegion.huffmanFS + 6); 6250 break; 6251 case 3: 6252 tableFirstS = getCustomHuffmanTable(customIndex, referredTo, customTables); 6253 customIndex++; 6254 break; 6255 default: 6256 throw new Jbig2Error("invalid Huffman FS selector"); 6257 } 6258 switch (textRegion.huffmanDS) { 6259 case 0: 6260 case 1: 6261 case 2: 6262 tableDeltaS = getStandardTable(textRegion.huffmanDS + 8); 6263 break; 6264 case 3: 6265 tableDeltaS = getCustomHuffmanTable(customIndex, referredTo, customTables); 6266 customIndex++; 6267 break; 6268 default: 6269 throw new Jbig2Error("invalid Huffman DS selector"); 6270 } 6271 switch (textRegion.huffmanDT) { 6272 case 0: 6273 case 1: 6274 case 2: 6275 tableDeltaT = getStandardTable(textRegion.huffmanDT + 11); 6276 break; 6277 case 3: 6278 tableDeltaT = getCustomHuffmanTable(customIndex, referredTo, customTables); 6279 customIndex++; 6280 break; 6281 default: 6282 throw new Jbig2Error("invalid Huffman DT selector"); 6283 } 6284 if (textRegion.refinement) { 6285 throw new Jbig2Error("refinement with Huffman is not supported"); 6286 } 6287 return { 6288 symbolIDTable, 6289 tableFirstS, 6290 tableDeltaS, 6291 tableDeltaT 6292 }; 6293} 6294function getSymbolDictionaryHuffmanTables(dictionary, referredTo, customTables) { 6295 let customIndex = 0, 6296 tableDeltaHeight, 6297 tableDeltaWidth; 6298 switch (dictionary.huffmanDHSelector) { 6299 case 0: 6300 case 1: 6301 tableDeltaHeight = getStandardTable(dictionary.huffmanDHSelector + 4); 6302 break; 6303 case 3: 6304 tableDeltaHeight = getCustomHuffmanTable(customIndex, referredTo, customTables); 6305 customIndex++; 6306 break; 6307 default: 6308 throw new Jbig2Error("invalid Huffman DH selector"); 6309 } 6310 switch (dictionary.huffmanDWSelector) { 6311 case 0: 6312 case 1: 6313 tableDeltaWidth = getStandardTable(dictionary.huffmanDWSelector + 2); 6314 break; 6315 case 3: 6316 tableDeltaWidth = getCustomHuffmanTable(customIndex, referredTo, customTables); 6317 customIndex++; 6318 break; 6319 default: 6320 throw new Jbig2Error("invalid Huffman DW selector"); 6321 } 6322 let tableBitmapSize, tableAggregateInstances; 6323 if (dictionary.bitmapSizeSelector) { 6324 tableBitmapSize = getCustomHuffmanTable(customIndex, referredTo, customTables); 6325 customIndex++; 6326 } else { 6327 tableBitmapSize = getStandardTable(1); 6328 } 6329 if (dictionary.aggregationInstancesSelector) { 6330 tableAggregateInstances = getCustomHuffmanTable(customIndex, referredTo, customTables); 6331 } else { 6332 tableAggregateInstances = getStandardTable(1); 6333 } 6334 return { 6335 tableDeltaHeight, 6336 tableDeltaWidth, 6337 tableBitmapSize, 6338 tableAggregateInstances 6339 }; 6340} 6341function readUncompressedBitmap(reader, width, height) { 6342 const bitmap = []; 6343 for (let y = 0; y < height; y++) { 6344 const row = new Uint8Array(width); 6345 bitmap.push(row); 6346 for (let x = 0; x < width; x++) { 6347 row[x] = reader.readBit(); 6348 } 6349 reader.byteAlign(); 6350 } 6351 return bitmap; 6352} 6353function decodeMMRBitmap(input, width, height, endOfBlock) { 6354 const params = { 6355 K: -1, 6356 Columns: width, 6357 Rows: height, 6358 BlackIs1: true, 6359 EndOfBlock: endOfBlock 6360 }; 6361 const decoder = new CCITTFaxDecoder(input, params); 6362 const bitmap = []; 6363 let currentByte, 6364 eof = false; 6365 for (let y = 0; y < height; y++) { 6366 const row = new Uint8Array(width); 6367 bitmap.push(row); 6368 let shift = -1; 6369 for (let x = 0; x < width; x++) { 6370 if (shift < 0) { 6371 currentByte = decoder.readNextChar(); 6372 if (currentByte === -1) { 6373 currentByte = 0; 6374 eof = true; 6375 } 6376 shift = 7; 6377 } 6378 row[x] = currentByte >> shift & 1; 6379 shift--; 6380 } 6381 } 6382 if (endOfBlock && !eof) { 6383 const lookForEOFLimit = 5; 6384 for (let i = 0; i < lookForEOFLimit; i++) { 6385 if (decoder.readNextChar() === -1) { 6386 break; 6387 } 6388 } 6389 } 6390 return bitmap; 6391} 6392class Jbig2Image { 6393 parseChunks(chunks) { 6394 return parseJbig2Chunks(chunks); 6395 } 6396 parse(data) { 6397 throw new Error("Not implemented: Jbig2Image.parse"); 6398 } 6399} 6400 6401;// ./src/core/jbig2_stream.js 6402 6403 6404 6405 6406
vendor: 4,681 bytes, lines 6407-6568
6407class Jbig2Stream extends DecodeStream { 6408 constructor(stream, maybeLength, params) { 6409 super(maybeLength); 6410 this.stream = stream; 6411 this.dict = stream.dict; 6412 this.maybeLength = maybeLength; 6413 this.params = params; 6414 } 6415 get bytes() { 6416 return shadow(this, "bytes", this.stream.getBytes(this.maybeLength)); 6417 } 6418 ensureBuffer(requested) {} 6419 readBlock() { 6420 this.decodeImage(); 6421 } 6422 decodeImage(bytes) { 6423 if (this.eof) { 6424 return this.buffer; 6425 } 6426 bytes ||= this.bytes; 6427 const jbig2Image = new Jbig2Image(); 6428 const chunks = []; 6429 if (this.params instanceof Dict) { 6430 const globalsStream = this.params.get("JBIG2Globals"); 6431 if (globalsStream instanceof BaseStream) { 6432 const globals = globalsStream.getBytes(); 6433 chunks.push({ 6434 data: globals, 6435 start: 0, 6436 end: globals.length 6437 }); 6438 } 6439 } 6440 chunks.push({ 6441 data: bytes, 6442 start: 0, 6443 end: bytes.length 6444 }); 6445 const data = jbig2Image.parseChunks(chunks); 6446 const dataLength = data.length; 6447 for (let i = 0; i < dataLength; i++) { 6448 data[i] ^= 0xff; 6449 } 6450 this.buffer = data; 6451 this.bufferLength = dataLength; 6452 this.eof = true; 6453 return this.buffer; 6454 } 6455 get canAsyncDecodeImageFromBuffer() { 6456 return this.stream.isAsync; 6457 } 6458} 6459 6460;// ./src/shared/image_utils.js 6461 6462function convertToRGBA(params) { 6463 switch (params.kind) { 6464 case ImageKind.GRAYSCALE_1BPP: 6465 return convertBlackAndWhiteToRGBA(params); 6466 case ImageKind.RGB_24BPP: 6467 return convertRGBToRGBA(params); 6468 } 6469 return null; 6470} 6471function convertBlackAndWhiteToRGBA({ 6472 src, 6473 srcPos = 0, 6474 dest, 6475 width, 6476 height, 6477 nonBlackColor = 0xffffffff, 6478 inverseDecode = false 6479}) { 6480 const black = FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff; 6481 const [zeroMapping, oneMapping] = inverseDecode ? [nonBlackColor, black] : [black, nonBlackColor]; 6482 const widthInSource = width >> 3; 6483 const widthRemainder = width & 7; 6484 const srcLength = src.length; 6485 dest = new Uint32Array(dest.buffer); 6486 let destPos = 0; 6487 for (let i = 0; i < height; i++) { 6488 for (const max = srcPos + widthInSource; srcPos < max; srcPos++) { 6489 const elem = srcPos < srcLength ? src[srcPos] : 255; 6490 dest[destPos++] = elem & 0b10000000 ? oneMapping : zeroMapping; 6491 dest[destPos++] = elem & 0b1000000 ? oneMapping : zeroMapping; 6492 dest[destPos++] = elem & 0b100000 ? oneMapping : zeroMapping; 6493 dest[destPos++] = elem & 0b10000 ? oneMapping : zeroMapping; 6494 dest[destPos++] = elem & 0b1000 ? oneMapping : zeroMapping; 6495 dest[destPos++] = elem & 0b100 ? oneMapping : zeroMapping; 6496 dest[destPos++] = elem & 0b10 ? oneMapping : zeroMapping; 6497 dest[destPos++] = elem & 0b1 ? oneMapping : zeroMapping; 6498 } 6499 if (widthRemainder === 0) { 6500 continue; 6501 } 6502 const elem = srcPos < srcLength ? src[srcPos++] : 255; 6503 for (let j = 0; j < widthRemainder; j++) { 6504 dest[destPos++] = elem & 1 << 7 - j ? oneMapping : zeroMapping; 6505 } 6506 } 6507 return { 6508 srcPos, 6509 destPos 6510 }; 6511} 6512function convertRGBToRGBA({ 6513 src, 6514 srcPos = 0, 6515 dest, 6516 destPos = 0, 6517 width, 6518 height 6519}) { 6520 let i = 0; 6521 const len = width * height * 3; 6522 const len32 = len >> 2; 6523 const src32 = new Uint32Array(src.buffer, srcPos, len32); 6524 if (FeatureTest.isLittleEndian) { 6525 for (; i < len32 - 2; i += 3, destPos += 4) { 6526 const s1 = src32[i]; 6527 const s2 = src32[i + 1]; 6528 const s3 = src32[i + 2]; 6529 dest[destPos] = s1 | 0xff000000; 6530 dest[destPos + 1] = s1 >>> 24 | s2 << 8 | 0xff000000; 6531 dest[destPos + 2] = s2 >>> 16 | s3 << 16 | 0xff000000; 6532 dest[destPos + 3] = s3 >>> 8 | 0xff000000; 6533 } 6534 for (let j = i * 4, jj = srcPos + len; j < jj; j += 3) { 6535 dest[destPos++] = src[j] | src[j + 1] << 8 | src[j + 2] << 16 | 0xff000000; 6536 } 6537 } else { 6538 for (; i < len32 - 2; i += 3, destPos += 4) { 6539 const s1 = src32[i]; 6540 const s2 = src32[i + 1]; 6541 const s3 = src32[i + 2]; 6542 dest[destPos] = s1 | 0xff; 6543 dest[destPos + 1] = s1 << 24 | s2 >>> 8 | 0xff; 6544 dest[destPos + 2] = s2 << 16 | s3 >>> 16 | 0xff; 6545 dest[destPos + 3] = s3 << 8 | 0xff; 6546 } 6547 for (let j = i * 4, jj = srcPos + len; j < jj; j += 3) { 6548 dest[destPos++] = src[j] << 24 | src[j + 1] << 16 | src[j + 2] << 8 | 0xff; 6549 } 6550 } 6551 return { 6552 srcPos: srcPos + len, 6553 destPos 6554 }; 6555} 6556function grayToRGBA(src, dest) { 6557 if (FeatureTest.isLittleEndian) { 6558 for (let i = 0, ii = src.length; i < ii; i++) { 6559 dest[i] = src[i] * 0x10101 | 0xff000000; 6560 } 6561 } else { 6562 for (let i = 0, ii = src.length; i < ii; i++) { 6563 dest[i] = src[i] * 0x1010100 | 0x000000ff; 6564 } 6565 } 6566} 6567 6568;// ./src/core/jpg.js
vendor: 17,884 bytes, lines 6568-7180
6568 6569 6570 6571 6572class JpegError extends BaseException { 6573 constructor(msg) { 6574 super(msg, "JpegError"); 6575 } 6576} 6577class DNLMarkerError extends BaseException { 6578 constructor(message, scanLines) { 6579 super(message, "DNLMarkerError"); 6580 this.scanLines = scanLines; 6581 } 6582} 6583class EOIMarkerError extends BaseException { 6584 constructor(msg) { 6585 super(msg, "EOIMarkerError"); 6586 } 6587} 6588const dctZigZag = new Uint8Array([0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63]); 6589const dctCos1 = 4017; 6590const dctSin1 = 799; 6591const dctCos3 = 3406; 6592const dctSin3 = 2276; 6593const dctCos6 = 1567; 6594const dctSin6 = 3784; 6595const dctSqrt2 = 5793; 6596const dctSqrt1d2 = 2896; 6597function buildHuffmanTable(codeLengths, values) { 6598 let k = 0, 6599 i, 6600 j, 6601 length = 16; 6602 while (length > 0 && !codeLengths[length - 1]) { 6603 length--; 6604 } 6605 const code = [{ 6606 children: [], 6607 index: 0 6608 }]; 6609 let p = code[0], 6610 q; 6611 for (i = 0; i < length; i++) { 6612 for (j = 0; j < codeLengths[i]; j++) { 6613 p = code.pop(); 6614 p.children[p.index] = values[k]; 6615 while (p.index > 0) { 6616 p = code.pop(); 6617 } 6618 p.index++; 6619 code.push(p); 6620 while (code.length <= i) { 6621 code.push(q = { 6622 children: [], 6623 index: 0 6624 }); 6625 p.children[p.index] = q.children; 6626 p = q; 6627 } 6628 k++; 6629 } 6630 if (i + 1 < length) { 6631 code.push(q = { 6632 children: [], 6633 index: 0 6634 }); 6635 p.children[p.index] = q.children; 6636 p = q; 6637 } 6638 } 6639 return code[0].children; 6640} 6641function getBlockBufferOffset(component, row, col) { 6642 return 64 * ((component.blocksPerLine + 1) * row + col); 6643} 6644function decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successivePrev, successive, parseDNLMarker = false) { 6645 const mcusPerLine = frame.mcusPerLine; 6646 const progressive = frame.progressive; 6647 const startOffset = offset; 6648 let bitsData = 0, 6649 bitsCount = 0; 6650 function readBit() { 6651 if (bitsCount > 0) { 6652 bitsCount--; 6653 return bitsData >> bitsCount & 1; 6654 } 6655 bitsData = data[offset++]; 6656 if (bitsData === 0xff) { 6657 const nextByte = data[offset++]; 6658 if (nextByte) { 6659 if (nextByte === 0xdc && parseDNLMarker) { 6660 offset += 2; 6661 const scanLines = readUint16(data, offset); 6662 offset += 2; 6663 if (scanLines > 0 && scanLines !== frame.scanLines) { 6664 throw new DNLMarkerError("Found DNL marker (0xFFDC) while parsing scan data", scanLines); 6665 } 6666 } else if (nextByte === 0xd9) { 6667 if (parseDNLMarker) { 6668 const maybeScanLines = blockRow * (frame.precision === 8 ? 8 : 0); 6669 if (maybeScanLines > 0 && Math.round(frame.scanLines / maybeScanLines) >= 5) { 6670 throw new DNLMarkerError("Found EOI marker (0xFFD9) while parsing scan data, " + "possibly caused by incorrect `scanLines` parameter", maybeScanLines); 6671 } 6672 } 6673 throw new EOIMarkerError("Found EOI marker (0xFFD9) while parsing scan data"); 6674 } 6675 throw new JpegError(`unexpected marker ${(bitsData << 8 | nextByte).toString(16)}`); 6676 } 6677 } 6678 bitsCount = 7; 6679 return bitsData >>> 7; 6680 } 6681 function decodeHuffman(tree) { 6682 let node = tree; 6683 while (true) { 6684 node = node[readBit()]; 6685 switch (typeof node) { 6686 case "number": 6687 return node; 6688 case "object": 6689 continue; 6690 } 6691 throw new JpegError("invalid huffman sequence"); 6692 } 6693 } 6694 function receive(length) { 6695 let n = 0; 6696 while (length > 0) { 6697 n = n << 1 | readBit(); 6698 length--; 6699 } 6700 return n; 6701 } 6702 function receiveAndExtend(length) { 6703 if (length === 1) { 6704 return readBit() === 1 ? 1 : -1; 6705 } 6706 const n = receive(length); 6707 if (n >= 1 << length - 1) { 6708 return n; 6709 } 6710 return n + (-1 << length) + 1; 6711 } 6712 function decodeBaseline(component, blockOffset) { 6713 const t = decodeHuffman(component.huffmanTableDC); 6714 const diff = t === 0 ? 0 : receiveAndExtend(t); 6715 component.blockData[blockOffset] = component.pred += diff; 6716 let k = 1; 6717 while (k < 64) { 6718 const rs = decodeHuffman(component.huffmanTableAC); 6719 const s = rs & 15, 6720 r = rs >> 4; 6721 if (s === 0) { 6722 if (r < 15) { 6723 break; 6724 } 6725 k += 16; 6726 continue; 6727 } 6728 k += r; 6729 const z = dctZigZag[k]; 6730 component.blockData[blockOffset + z] = receiveAndExtend(s); 6731 k++; 6732 } 6733 } 6734 function decodeDCFirst(component, blockOffset) { 6735 const t = decodeHuffman(component.huffmanTableDC); 6736 const diff = t === 0 ? 0 : receiveAndExtend(t) << successive; 6737 component.blockData[blockOffset] = component.pred += diff; 6738 } 6739 function decodeDCSuccessive(component, blockOffset) { 6740 component.blockData[blockOffset] |= readBit() << successive; 6741 } 6742 let eobrun = 0; 6743 function decodeACFirst(component, blockOffset) { 6744 if (eobrun > 0) { 6745 eobrun--; 6746 return; 6747 } 6748 let k = spectralStart; 6749 const e = spectralEnd; 6750 while (k <= e) { 6751 const rs = decodeHuffman(component.huffmanTableAC); 6752 const s = rs & 15, 6753 r = rs >> 4; 6754 if (s === 0) { 6755 if (r < 15) { 6756 eobrun = receive(r) + (1 << r) - 1; 6757 break; 6758 } 6759 k += 16; 6760 continue; 6761 } 6762 k += r; 6763 const z = dctZigZag[k]; 6764 component.blockData[blockOffset + z] = receiveAndExtend(s) * (1 << successive); 6765 k++; 6766 } 6767 } 6768 let successiveACState = 0, 6769 successiveACNextValue; 6770 function decodeACSuccessive(component, blockOffset) { 6771 let k = spectralStart; 6772 const e = spectralEnd; 6773 let r = 0; 6774 let s; 6775 let rs; 6776 while (k <= e) { 6777 const offsetZ = blockOffset + dctZigZag[k]; 6778 const sign = component.blockData[offsetZ] < 0 ? -1 : 1; 6779 switch (successiveACState) { 6780 case 0: 6781 rs = decodeHuffman(component.huffmanTableAC); 6782 s = rs & 15; 6783 r = rs >> 4; 6784 if (s === 0) { 6785 if (r < 15) { 6786 eobrun = receive(r) + (1 << r); 6787 successiveACState = 4; 6788 } else { 6789 r = 16; 6790 successiveACState = 1; 6791 } 6792 } else { 6793 if (s !== 1) { 6794 throw new JpegError("invalid ACn encoding"); 6795 } 6796 successiveACNextValue = receiveAndExtend(s); 6797 successiveACState = r ? 2 : 3; 6798 } 6799 continue; 6800 case 1: 6801 case 2: 6802 if (component.blockData[offsetZ]) { 6803 component.blockData[offsetZ] += sign * (readBit() << successive); 6804 } else { 6805 r--; 6806 if (r === 0) { 6807 successiveACState = successiveACState === 2 ? 3 : 0; 6808 } 6809 } 6810 break; 6811 case 3: 6812 if (component.blockData[offsetZ]) { 6813 component.blockData[offsetZ] += sign * (readBit() << successive); 6814 } else { 6815 component.blockData[offsetZ] = successiveACNextValue << successive; 6816 successiveACState = 0; 6817 } 6818 break; 6819 case 4: 6820 if (component.blockData[offsetZ]) { 6821 component.blockData[offsetZ] += sign * (readBit() << successive); 6822 } 6823 break; 6824 } 6825 k++; 6826 } 6827 if (successiveACState === 4) { 6828 eobrun--; 6829 if (eobrun === 0) { 6830 successiveACState = 0; 6831 } 6832 } 6833 } 6834 let blockRow = 0; 6835 function decodeMcu(component, decode, mcu, row, col) { 6836 const mcuRow = mcu / mcusPerLine | 0; 6837 const mcuCol = mcu % mcusPerLine; 6838 blockRow = mcuRow * component.v + row; 6839 const blockCol = mcuCol * component.h + col; 6840 const blockOffset = getBlockBufferOffset(component, blockRow, blockCol); 6841 decode(component, blockOffset); 6842 } 6843 function decodeBlock(component, decode, mcu) { 6844 blockRow = mcu / component.blocksPerLine | 0; 6845 const blockCol = mcu % component.blocksPerLine; 6846 const blockOffset = getBlockBufferOffset(component, blockRow, blockCol); 6847 decode(component, blockOffset); 6848 } 6849 const componentsLength = components.length; 6850 let component, i, j, k, n; 6851 let decodeFn; 6852 if (progressive) { 6853 if (spectralStart === 0) { 6854 decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive; 6855 } else { 6856 decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive; 6857 } 6858 } else { 6859 decodeFn = decodeBaseline; 6860 } 6861 let mcu = 0, 6862 fileMarker; 6863 const mcuExpected = componentsLength === 1 ? components[0].blocksPerLine * components[0].blocksPerColumn : mcusPerLine * frame.mcusPerColumn; 6864 let h, v; 6865 while (mcu <= mcuExpected) { 6866 const mcuToRead = resetInterval ? Math.min(mcuExpected - mcu, resetInterval) : mcuExpected; 6867 if (mcuToRead > 0) { 6868 for (i = 0; i < componentsLength; i++) { 6869 components[i].pred = 0; 6870 } 6871 eobrun = 0; 6872 if (componentsLength === 1) { 6873 component = components[0]; 6874 for (n = 0; n < mcuToRead; n++) { 6875 decodeBlock(component, decodeFn, mcu); 6876 mcu++; 6877 } 6878 } else { 6879 for (n = 0; n < mcuToRead; n++) { 6880 for (i = 0; i < componentsLength; i++) { 6881 component = components[i]; 6882 h = component.h; 6883 v = component.v; 6884 for (j = 0; j < v; j++) { 6885 for (k = 0; k < h; k++) { 6886 decodeMcu(component, decodeFn, mcu, j, k); 6887 } 6888 } 6889 } 6890 mcu++; 6891 } 6892 } 6893 } 6894 bitsCount = 0; 6895 fileMarker = findNextFileMarker(data, offset); 6896 if (!fileMarker) { 6897 break; 6898 } 6899 if (fileMarker.invalid) { 6900 const partialMsg = mcuToRead > 0 ? "unexpected" : "excessive"; 6901 warn(`decodeScan - ${partialMsg} MCU data, current marker is: ${fileMarker.invalid}`); 6902 offset = fileMarker.offset; 6903 } 6904 if (fileMarker.marker >= 0xffd0 && fileMarker.marker <= 0xffd7) { 6905 offset += 2; 6906 } else { 6907 break; 6908 } 6909 } 6910 return offset - startOffset; 6911} 6912function quantizeAndInverse(component, blockBufferOffset, p) { 6913 const qt = component.quantizationTable, 6914 blockData = component.blockData; 6915 let v0, v1, v2, v3, v4, v5, v6, v7; 6916 let p0, p1, p2, p3, p4, p5, p6, p7; 6917 let t; 6918 if (!qt) { 6919 throw new JpegError("missing required Quantization Table."); 6920 } 6921 for (let row = 0; row < 64; row += 8) { 6922 p0 = blockData[blockBufferOffset + row]; 6923 p1 = blockData[blockBufferOffset + row + 1]; 6924 p2 = blockData[blockBufferOffset + row + 2]; 6925 p3 = blockData[blockBufferOffset + row + 3]; 6926 p4 = blockData[blockBufferOffset + row + 4]; 6927 p5 = blockData[blockBufferOffset + row + 5]; 6928 p6 = blockData[blockBufferOffset + row + 6]; 6929 p7 = blockData[blockBufferOffset + row + 7]; 6930 p0 *= qt[row]; 6931 if ((p1 | p2 | p3 | p4 | p5 | p6 | p7) === 0) { 6932 t = dctSqrt2 * p0 + 512 >> 10; 6933 p[row] = t; 6934 p[row + 1] = t; 6935 p[row + 2] = t; 6936 p[row + 3] = t; 6937 p[row + 4] = t; 6938 p[row + 5] = t; 6939 p[row + 6] = t; 6940 p[row + 7] = t; 6941 continue; 6942 } 6943 p1 *= qt[row + 1]; 6944 p2 *= qt[row + 2]; 6945 p3 *= qt[row + 3]; 6946 p4 *= qt[row + 4]; 6947 p5 *= qt[row + 5]; 6948 p6 *= qt[row + 6]; 6949 p7 *= qt[row + 7]; 6950 v0 = dctSqrt2 * p0 + 128 >> 8; 6951 v1 = dctSqrt2 * p4 + 128 >> 8; 6952 v2 = p2; 6953 v3 = p6; 6954 v4 = dctSqrt1d2 * (p1 - p7) + 128 >> 8; 6955 v7 = dctSqrt1d2 * (p1 + p7) + 128 >> 8; 6956 v5 = p3 << 4; 6957 v6 = p5 << 4; 6958 v0 = v0 + v1 + 1 >> 1; 6959 v1 = v0 - v1; 6960 t = v2 * dctSin6 + v3 * dctCos6 + 128 >> 8; 6961 v2 = v2 * dctCos6 - v3 * dctSin6 + 128 >> 8; 6962 v3 = t; 6963 v4 = v4 + v6 + 1 >> 1; 6964 v6 = v4 - v6; 6965 v7 = v7 + v5 + 1 >> 1; 6966 v5 = v7 - v5; 6967 v0 = v0 + v3 + 1 >> 1; 6968 v3 = v0 - v3; 6969 v1 = v1 + v2 + 1 >> 1; 6970 v2 = v1 - v2; 6971 t = v4 * dctSin3 + v7 * dctCos3 + 2048 >> 12; 6972 v4 = v4 * dctCos3 - v7 * dctSin3 + 2048 >> 12; 6973 v7 = t; 6974 t = v5 * dctSin1 + v6 * dctCos1 + 2048 >> 12; 6975 v5 = v5 * dctCos1 - v6 * dctSin1 + 2048 >> 12; 6976 v6 = t; 6977 p[row] = v0 + v7; 6978 p[row + 7] = v0 - v7; 6979 p[row + 1] = v1 + v6; 6980 p[row + 6] = v1 - v6; 6981 p[row + 2] = v2 + v5; 6982 p[row + 5] = v2 - v5; 6983 p[row + 3] = v3 + v4; 6984 p[row + 4] = v3 - v4; 6985 } 6986 for (let col = 0; col < 8; ++col) { 6987 p0 = p[col]; 6988 p1 = p[col + 8]; 6989 p2 = p[col + 16]; 6990 p3 = p[col + 24]; 6991 p4 = p[col + 32]; 6992 p5 = p[col + 40]; 6993 p6 = p[col + 48]; 6994 p7 = p[col + 56]; 6995 if ((p1 | p2 | p3 | p4 | p5 | p6 | p7) === 0) { 6996 t = dctSqrt2 * p0 + 8192 >> 14; 6997 if (t < -2040) { 6998 t = 0; 6999 } else if (t >= 2024) { 7000 t = 255; 7001 } else { 7002 t = t + 2056 >> 4; 7003 } 7004 blockData[blockBufferOffset + col] = t; 7005 blockData[blockBufferOffset + col + 8] = t; 7006 blockData[blockBufferOffset + col + 16] = t; 7007 blockData[blockBufferOffset + col + 24] = t; 7008 blockData[blockBufferOffset + col + 32] = t; 7009 blockData[blockBufferOffset + col + 40] = t; 7010 blockData[blockBufferOffset + col + 48] = t; 7011 blockData[blockBufferOffset + col + 56] = t; 7012 continue; 7013 } 7014 v0 = dctSqrt2 * p0 + 2048 >> 12; 7015 v1 = dctSqrt2 * p4 + 2048 >> 12; 7016 v2 = p2; 7017 v3 = p6; 7018 v4 = dctSqrt1d2 * (p1 - p7) + 2048 >> 12; 7019 v7 = dctSqrt1d2 * (p1 + p7) + 2048 >> 12; 7020 v5 = p3; 7021 v6 = p5; 7022 v0 = (v0 + v1 + 1 >> 1) + 4112; 7023 v1 = v0 - v1; 7024 t = v2 * dctSin6 + v3 * dctCos6 + 2048 >> 12; 7025 v2 = v2 * dctCos6 - v3 * dctSin6 + 2048 >> 12; 7026 v3 = t; 7027 v4 = v4 + v6 + 1 >> 1; 7028 v6 = v4 - v6; 7029 v7 = v7 + v5 + 1 >> 1; 7030 v5 = v7 - v5; 7031 v0 = v0 + v3 + 1 >> 1; 7032 v3 = v0 - v3; 7033 v1 = v1 + v2 + 1 >> 1; 7034 v2 = v1 - v2; 7035 t = v4 * dctSin3 + v7 * dctCos3 + 2048 >> 12; 7036 v4 = v4 * dctCos3 - v7 * dctSin3 + 2048 >> 12; 7037 v7 = t; 7038 t = v5 * dctSin1 + v6 * dctCos1 + 2048 >> 12; 7039 v5 = v5 * dctCos1 - v6 * dctSin1 + 2048 >> 12; 7040 v6 = t; 7041 p0 = v0 + v7; 7042 p7 = v0 - v7; 7043 p1 = v1 + v6; 7044 p6 = v1 - v6; 7045 p2 = v2 + v5; 7046 p5 = v2 - v5; 7047 p3 = v3 + v4; 7048 p4 = v3 - v4; 7049 if (p0 < 16) { 7050 p0 = 0; 7051 } else if (p0 >= 4080) { 7052 p0 = 255; 7053 } else { 7054 p0 >>= 4; 7055 } 7056 if (p1 < 16) { 7057 p1 = 0; 7058 } else if (p1 >= 4080) { 7059 p1 = 255; 7060 } else { 7061 p1 >>= 4; 7062 } 7063 if (p2 < 16) { 7064 p2 = 0; 7065 } else if (p2 >= 4080) { 7066 p2 = 255; 7067 } else { 7068 p2 >>= 4; 7069 } 7070 if (p3 < 16) { 7071 p3 = 0; 7072 } else if (p3 >= 4080) { 7073 p3 = 255; 7074 } else { 7075 p3 >>= 4; 7076 } 7077 if (p4 < 16) { 7078 p4 = 0; 7079 } else if (p4 >= 4080) { 7080 p4 = 255; 7081 } else { 7082 p4 >>= 4; 7083 } 7084 if (p5 < 16) { 7085 p5 = 0; 7086 } else if (p5 >= 4080) { 7087 p5 = 255; 7088 } else { 7089 p5 >>= 4; 7090 } 7091 if (p6 < 16) { 7092 p6 = 0; 7093 } else if (p6 >= 4080) { 7094 p6 = 255; 7095 } else { 7096 p6 >>= 4; 7097 } 7098 if (p7 < 16) { 7099 p7 = 0; 7100 } else if (p7 >= 4080) { 7101 p7 = 255; 7102 } else { 7103 p7 >>= 4; 7104 } 7105 blockData[blockBufferOffset + col] = p0; 7106 blockData[blockBufferOffset + col + 8] = p1; 7107 blockData[blockBufferOffset + col + 16] = p2; 7108 blockData[blockBufferOffset + col + 24] = p3; 7109 blockData[blockBufferOffset + col + 32] = p4; 7110 blockData[blockBufferOffset + col + 40] = p5; 7111 blockData[blockBufferOffset + col + 48] = p6; 7112 blockData[blockBufferOffset + col + 56] = p7; 7113 } 7114} 7115function buildComponentData(frame, component) { 7116 const blocksPerLine = component.blocksPerLine; 7117 const blocksPerColumn = component.blocksPerColumn; 7118 const computationBuffer = new Int16Array(64); 7119 for (let blockRow = 0; blockRow < blocksPerColumn; blockRow++) { 7120 for (let blockCol = 0; blockCol < blocksPerLine; blockCol++) { 7121 const offset = getBlockBufferOffset(component, blockRow, blockCol); 7122 quantizeAndInverse(component, offset, computationBuffer); 7123 } 7124 } 7125 return component.blockData; 7126} 7127function findNextFileMarker(data, currentPos, startPos = currentPos) { 7128 const maxPos = data.length - 1; 7129 let newPos = startPos < currentPos ? startPos : currentPos; 7130 if (currentPos >= maxPos) { 7131 return null; 7132 } 7133 const currentMarker = readUint16(data, currentPos); 7134 if (currentMarker >= 0xffc0 && currentMarker <= 0xfffe) { 7135 return { 7136 invalid: null, 7137 marker: currentMarker, 7138 offset: currentPos 7139 }; 7140 } 7141 let newMarker = readUint16(data, newPos); 7142 while (!(newMarker >= 0xffc0 && newMarker <= 0xfffe)) { 7143 if (++newPos >= maxPos) { 7144 return null; 7145 } 7146 newMarker = readUint16(data, newPos); 7147 } 7148 return { 7149 invalid: currentMarker.toString(16), 7150 marker: newMarker, 7151 offset: newPos 7152 }; 7153} 7154function prepareComponents(frame) { 7155 const mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / frame.maxH); 7156 const mcusPerColumn = Math.ceil(frame.scanLines / 8 / frame.maxV); 7157 for (const component of frame.components) { 7158 const blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / frame.maxH); 7159 const blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / frame.maxV); 7160 const blocksPerLineForMcu = mcusPerLine * component.h; 7161 const blocksPerColumnForMcu = mcusPerColumn * component.v; 7162 const blocksBufferSize = 64 * blocksPerColumnForMcu * (blocksPerLineForMcu + 1); 7163 component.blockData = new Int16Array(blocksBufferSize); 7164 component.blocksPerLine = blocksPerLine; 7165 component.blocksPerColumn = blocksPerColumn; 7166 } 7167 frame.mcusPerLine = mcusPerLine; 7168 frame.mcusPerColumn = mcusPerColumn; 7169} 7170function readDataBlock(data, offset) { 7171 const length = readUint16(data, offset); 7172 offset += 2; 7173 let endOffset = offset + length - 2; 7174 const fileMarker = findNextFileMarker(data, endOffset, offset); 7175 if (fileMarker?.invalid) { 7176 warn("readDataBlock - incorrect length, current marker is: " + fileMarker.invalid); 7177 endOffset = fileMarker.offset; 7178 } 7179 const array = data.subarray(offset, endOffset); 7180
7180offset += array.length; 7181 return { 7182 appData: array, 7183 newOffset: offset 7184 }; 7185} 7186function skipData(data, offset) { 7187 const length = readUint16(data, offset); 7188 offset += 2; 7189 const endOffset = offset + length - 2; 7190 const fileMarker = findNextFileMarker(data, endOffset, offset);
7191 if (fileMarker?.invalid) { 7192 return fileMarker.offset; 7193 } 7194 return endOffset; 7195} 7196class JpegImage { 7197 constructor({ 7198 decodeTransform = null, 7199 colorTransform = -1 7200 } = {}) { 7201 this._decodeTransform = decodeTransform; 7202 this._colorTransform = colorTransform; 7203 } 7204 static canUseImageDecoder(data, colorTransform = -1) { 7205 let offset = 0; 7206 let numComponents = null; 7207 let fileMarker = readUint16(data, offset); 7208 offset += 2; 7209 if (fileMarker !== 0xffd8) { 7210 throw new JpegError("SOI not found"); 7211 } 7212 fileMarker = readUint16(data, offset); 7213 offset += 2; 7214 markerLoop: while (fileMarker !== 0xffd9) { 7215 switch (fileMarker) { 7216 case 0xffc0: 7217 case 0xffc1: 7218 case 0xffc2: 7219 numComponents = data[offset + (2 + 1 + 2 + 2)]; 7220 break markerLoop; 7221 case 0xffff: 7222 if (data[offset] !== 0xff) { 7223 offset--; 7224 } 7225 break; 7226 } 7227 offset = skipData(data, offset); 7228 fileMarker = readUint16(data, offset); 7229 offset += 2; 7230 } 7231 if (numComponents === 4) { 7232 return false; 7233 } 7234 if (numComponents === 3 && colorTransform === 0) { 7235 return false; 7236 } 7237 return true
vendor: 11,990 bytes, lines 7237-7577
7237; 7238 } 7239 parse(data, { 7240 dnlScanLines = null 7241 } = {}) { 7242 let offset = 0; 7243 let jfif = null; 7244 let adobe = null; 7245 let frame, resetInterval; 7246 let numSOSMarkers = 0; 7247 const quantizationTables = []; 7248 const huffmanTablesAC = [], 7249 huffmanTablesDC = []; 7250 let fileMarker = readUint16(data, offset); 7251 offset += 2; 7252 if (fileMarker !== 0xffd8) { 7253 throw new JpegError("SOI not found"); 7254 } 7255 fileMarker = readUint16(data, offset); 7256 offset += 2; 7257 markerLoop: while (fileMarker !== 0xffd9) { 7258 let i, j, l; 7259 switch (fileMarker) { 7260 case 0xffe0: 7261 case 0xffe1: 7262 case 0xffe2: 7263 case 0xffe3: 7264 case 0xffe4: 7265 case 0xffe5: 7266 case 0xffe6: 7267 case 0xffe7: 7268 case 0xffe8: 7269 case 0xffe9: 7270 case 0xffea: 7271 case 0xffeb: 7272 case 0xffec: 7273 case 0xffed: 7274 case 0xffee: 7275 case 0xffef: 7276 case 0xfffe: 7277 const { 7278 appData, 7279 newOffset 7280 } = readDataBlock(data, offset); 7281 offset = newOffset; 7282 if (fileMarker === 0xffe0) { 7283 if (appData[0] === 0x4a && appData[1] === 0x46 && appData[2] === 0x49 && appData[3] === 0x46 && appData[4] === 0) { 7284 jfif = { 7285 version: { 7286 major: appData[5], 7287 minor: appData[6] 7288 }, 7289 densityUnits: appData[7], 7290 xDensity: appData[8] << 8 | appData[9], 7291 yDensity: appData[10] << 8 | appData[11], 7292 thumbWidth: appData[12], 7293 thumbHeight: appData[13], 7294 thumbData: appData.subarray(14, 14 + 3 * appData[12] * appData[13]) 7295 }; 7296 } 7297 } 7298 if (fileMarker === 0xffee) { 7299 if (appData[0] === 0x41 && appData[1] === 0x64 && appData[2] === 0x6f && appData[3] === 0x62 && appData[4] === 0x65) { 7300 adobe = { 7301 version: appData[5] << 8 | appData[6], 7302 flags0: appData[7] << 8 | appData[8], 7303 flags1: appData[9] << 8 | appData[10], 7304 transformCode: appData[11] 7305 }; 7306 } 7307 } 7308 break; 7309 case 0xffdb: 7310 const quantizationTablesLength = readUint16(data, offset); 7311 offset += 2; 7312 const quantizationTablesEnd = quantizationTablesLength + offset - 2; 7313 let z; 7314 while (offset < quantizationTablesEnd) { 7315 const quantizationTableSpec = data[offset++]; 7316 const tableData = new Uint16Array(64); 7317 if (quantizationTableSpec >> 4 === 0) { 7318 for (j = 0; j < 64; j++) { 7319 z = dctZigZag[j]; 7320 tableData[z] = data[offset++]; 7321 } 7322 } else if (quantizationTableSpec >> 4 === 1) { 7323 for (j = 0; j < 64; j++) { 7324 z = dctZigZag[j]; 7325 tableData[z] = readUint16(data, offset); 7326 offset += 2; 7327 } 7328 } else { 7329 throw new JpegError("DQT - invalid table spec"); 7330 } 7331 quantizationTables[quantizationTableSpec & 15] = tableData; 7332 } 7333 break; 7334 case 0xffc0: 7335 case 0xffc1: 7336 case 0xffc2: 7337 if (frame) { 7338 throw new JpegError("Only single frame JPEGs supported"); 7339 } 7340 offset += 2; 7341 frame = {}; 7342 frame.extended = fileMarker === 0xffc1; 7343 frame.progressive = fileMarker === 0xffc2; 7344 frame.precision = data[offset++]; 7345 const sofScanLines = readUint16(data, offset); 7346 offset += 2; 7347 frame.scanLines = dnlScanLines || sofScanLines; 7348 frame.samplesPerLine = readUint16(data, offset); 7349 offset += 2; 7350 frame.components = []; 7351 frame.componentIds = {}; 7352 const componentsCount = data[offset++]; 7353 let maxH = 0, 7354 maxV = 0; 7355 for (i = 0; i < componentsCount; i++) { 7356 const componentId = data[offset]; 7357 const h = data[offset + 1] >> 4; 7358 const v = data[offset + 1] & 15; 7359 if (maxH < h) { 7360 maxH = h; 7361 } 7362 if (maxV < v) { 7363 maxV = v; 7364 } 7365 const qId = data[offset + 2]; 7366 l = frame.components.push({ 7367 h, 7368 v, 7369 quantizationId: qId, 7370 quantizationTable: null 7371 }); 7372 frame.componentIds[componentId] = l - 1; 7373 offset += 3; 7374 } 7375 frame.maxH = maxH; 7376 frame.maxV = maxV; 7377 prepareComponents(frame); 7378 break; 7379 case 0xffc4: 7380 const huffmanLength = readUint16(data, offset); 7381 offset += 2; 7382 for (i = 2; i < huffmanLength;) { 7383 const huffmanTableSpec = data[offset++]; 7384 const codeLengths = new Uint8Array(16); 7385 let codeLengthSum = 0; 7386 for (j = 0; j < 16; j++, offset++) { 7387 codeLengthSum += codeLengths[j] = data[offset]; 7388 } 7389 const huffmanValues = new Uint8Array(codeLengthSum); 7390 for (j = 0; j < codeLengthSum; j++, offset++) { 7391 huffmanValues[j] = data[offset]; 7392 } 7393 i += 17 + codeLengthSum; 7394 (huffmanTableSpec >> 4 === 0 ? huffmanTablesDC : huffmanTablesAC)[huffmanTableSpec & 15] = buildHuffmanTable(codeLengths, huffmanValues); 7395 } 7396 break; 7397 case 0xffdd: 7398 offset += 2; 7399 resetInterval = readUint16(data, offset); 7400 offset += 2; 7401 break; 7402 case 0xffda: 7403 const parseDNLMarker = ++numSOSMarkers === 1 && !dnlScanLines; 7404 offset += 2; 7405 const selectorsCount = data[offset++], 7406 components = []; 7407 for (i = 0; i < selectorsCount; i++) { 7408 const index = data[offset++]; 7409 const componentIndex = frame.componentIds[index]; 7410 const component = frame.components[componentIndex]; 7411 component.index = index; 7412 const tableSpec = data[offset++]; 7413 component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4]; 7414 component.huffmanTableAC = huffmanTablesAC[tableSpec & 15]; 7415 components.push(component); 7416 } 7417 const spectralStart = data[offset++], 7418 spectralEnd = data[offset++], 7419 successiveApproximation = data[offset++]; 7420 try { 7421 const processed = decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successiveApproximation >> 4, successiveApproximation & 15, parseDNLMarker); 7422 offset += processed; 7423 } catch (ex) { 7424 if (ex instanceof DNLMarkerError) { 7425 warn(`${ex.message} -- attempting to re-parse the JPEG image.`); 7426 return this.parse(data, { 7427 dnlScanLines: ex.scanLines 7428 }); 7429 } else if (ex instanceof EOIMarkerError) { 7430 warn(`${ex.message} -- ignoring the rest of the image data.`); 7431 break markerLoop; 7432 } 7433 throw ex; 7434 } 7435 break; 7436 case 0xffdc: 7437 offset += 4; 7438 break; 7439 case 0xffff: 7440 if (data[offset] !== 0xff) { 7441 offset--; 7442 } 7443 break; 7444 default: 7445 const nextFileMarker = findNextFileMarker(data, offset - 2, offset - 3); 7446 if (nextFileMarker?.invalid) { 7447 warn("JpegImage.parse - unexpected data, current marker is: " + nextFileMarker.invalid); 7448 offset = nextFileMarker.offset; 7449 break; 7450 } 7451 if (!nextFileMarker || offset >= data.length - 1) { 7452 warn("JpegImage.parse - reached the end of the image data " + "without finding an EOI marker (0xFFD9)."); 7453 break markerLoop; 7454 } 7455 throw new JpegError("JpegImage.parse - unknown marker: " + fileMarker.toString(16)); 7456 } 7457 fileMarker = readUint16(data, offset); 7458 offset += 2; 7459 } 7460 if (!frame) { 7461 throw new JpegError("JpegImage.parse - no frame data found."); 7462 } 7463 this.width = frame.samplesPerLine; 7464 this.height = frame.scanLines; 7465 this.jfif = jfif; 7466 this.adobe = adobe; 7467 this.components = []; 7468 for (const component of frame.components) { 7469 const quantizationTable = quantizationTables[component.quantizationId]; 7470 if (quantizationTable) { 7471 component.quantizationTable = quantizationTable; 7472 } 7473 this.components.push({ 7474 index: component.index, 7475 output: buildComponentData(frame, component), 7476 scaleX: component.h / frame.maxH, 7477 scaleY: component.v / frame.maxV, 7478 blocksPerLine: component.blocksPerLine, 7479 blocksPerColumn: component.blocksPerColumn 7480 }); 7481 } 7482 this.numComponents = this.components.length; 7483 return undefined; 7484 } 7485 _getLinearizedBlockData(width, height, isSourcePDF = false) { 7486 const scaleX = this.width / width, 7487 scaleY = this.height / height; 7488 let component, componentScaleX, componentScaleY, blocksPerScanline; 7489 let x, y, i, j, k; 7490 let index; 7491 let offset = 0; 7492 let output; 7493 const numComponents = this.components.length; 7494 const dataLength = width * height * numComponents; 7495 const data = new Uint8ClampedArray(dataLength); 7496 const xScaleBlockOffset = new Uint32Array(width); 7497 const mask3LSB = 0xfffffff8; 7498 let lastComponentScaleX; 7499 for (i = 0; i < numComponents; i++) { 7500 component = this.components[i]; 7501 componentScaleX = component.scaleX * scaleX; 7502 componentScaleY = component.scaleY * scaleY; 7503 offset = i; 7504 output = component.output; 7505 blocksPerScanline = component.blocksPerLine + 1 << 3; 7506 if (componentScaleX !== lastComponentScaleX) { 7507 for (x = 0; x < width; x++) { 7508 j = 0 | x * componentScaleX; 7509 xScaleBlockOffset[x] = (j & mask3LSB) << 3 | j & 7; 7510 } 7511 lastComponentScaleX = componentScaleX; 7512 } 7513 for (y = 0; y < height; y++) { 7514 j = 0 | y * componentScaleY; 7515 index = blocksPerScanline * (j & mask3LSB) | (j & 7) << 3; 7516 for (x = 0; x < width; x++) { 7517 data[offset] = output[index + xScaleBlockOffset[x]]; 7518 offset += numComponents; 7519 } 7520 } 7521 } 7522 let transform = this._decodeTransform; 7523 if (!isSourcePDF && numComponents === 4 && !transform) { 7524 transform = new Int32Array([-256, 255, -256, 255, -256, 255, -256, 255]); 7525 } 7526 if (transform) { 7527 for (i = 0; i < dataLength;) { 7528 for (j = 0, k = 0; j < numComponents; j++, i++, k += 2) { 7529 data[i] = (data[i] * transform[k] >> 8) + transform[k + 1]; 7530 } 7531 } 7532 } 7533 return data; 7534 } 7535 get _isColorConversionNeeded() { 7536 if (this.adobe) { 7537 return !!this.adobe.transformCode; 7538 } 7539 if (this.numComponents === 3) { 7540 if (this._colorTransform === 0) { 7541 return false; 7542 } else if (this.components[0].index === 0x52 && this.components[1].index === 0x47 && this.components[2].index === 0x42) { 7543 return false; 7544 } 7545 return true; 7546 } 7547 if (this._colorTransform === 1) { 7548 return true; 7549 } 7550 return false; 7551 } 7552 _convertYccToRgb(data) { 7553 let Y, Cb, Cr; 7554 for (let i = 0, length = data.length; i < length; i += 3) { 7555 Y = data[i]; 7556 Cb = data[i + 1]; 7557 Cr = data[i + 2]; 7558 data[i] = Y - 179.456 + 1.402 * Cr; 7559 data[i + 1] = Y + 135.459 - 0.344 * Cb - 0.714 * Cr; 7560 data[i + 2] = Y - 226.816 + 1.772 * Cb; 7561 } 7562 return data; 7563 } 7564 _convertYccToRgba(data, out) { 7565 for (let i = 0, j = 0, length = data.length; i < length; i += 3, j += 4) { 7566 const Y = data[i]; 7567 const Cb = data[i + 1]; 7568 const Cr = data[i + 2]; 7569 out[j] = Y - 179.456 + 1.402 * Cr; 7570 out[j + 1] = Y + 135.459 - 0.344 * Cb - 0.714 * Cr; 7571 out[j + 2] = Y - 226.816 + 1.772 * Cb; 7572 out[j + 3] = 255; 7573 } 7574 return out; 7575 } 7576 _convertYcckToRgb(data) { 7577
7577let Y, Cb, Cr, k; 7578 let offset = 0; 7579 for (let i = 0, length = data.length; i < length; i += 4) { 7580 Y = data[i]; 7581 Cb = data[i + 1]; 7582 Cr = data[i + 2]; 7583 k = data[i + 3]; 7584 data[offset++] = -122.67195406894 + Cb * (-6.60635669420364e-5 * Cb + 0.000437130475926232 * Cr - 5.4080610064599e-5 * Y + 0.00048449797120281 * k - 0.154362151871126) + Cr * (-0.000957964378445773 * Cr + 0.000817076911346625 * Y - 0.00477271405408747 * k + 1.53380253221734) + Y * (0.000961250184130688 * Y - 0.00266257332283933 * k + 0.48357088451265) + k * (-0.000336197177618394 * k + 0.484791561490776); 7585 data[offset++] = 107.268039397724 + Cb * (2.19927104525741e-5 * Cb - 0.000640992018297945 * Cr + 0.000659397001245577 * Y + 0.000426105652938837 * k - 0.176491792462875) + Cr * (-0.000778269941513683 * Cr + 0.00130872261408275 * Y + 0.000770482631801132 * k - 0.151051492775562) + Y * (0.00126935368114843 * Y - 0.00265090189010898 * k + 0.25802910206845) + k * (-0.000318913117588328 * k - 0.213742400323665); 7586 data[offset++] = -20.810012546947 + Cb * (-0.000570115196973677 * Cb - 2.63409051004589e-5 * Cr + 0.0020741088115012 * Y - 0.00288260236853442 * k + 0.814272968359295) + Cr * (-1.53496057440975e-5 * Cr - 0.000132689043961446 * Y + 0.000560833691242812 * k - 0.195152027534049) + Y * (0.00174418132927582 * Y - 0.00255243321439347 * k + 0.116935020465145) + k * (-0.000343531996510555 * k + 0.24165260232407); 7587 } 7588 return data.subarray(0, offset); 7589 } 7590 _convertYcckToRgba(data) { 7591 for (let i = 0, length = data.length; i < length; i += 4) { 7592 const Y = data[i]; 7593 const Cb = data[i + 1]; 7594 const Cr = data[i + 2]; 7595 const k = data[i + 3]; 7596 data[i] = -122.67195406894 + Cb * (-6.60635669420364e-5 * Cb + 0.000437130475926232 * Cr - 5.4080610064599e-5 * Y + 0.00048449797120281 * k - 0.154362151871126) + Cr * (-0.000957964378445773 * Cr + 0.000817076911346625 * Y - 0.00477271405408747 * k + 1.53380253221734) + Y * (0.000961250184130688 * Y - 0.00266257332283933 * k + 0.48357088451265) + k * (-0.000336197177618394 * k + 0.484791561490776); 7597 data[i + 1] = 107.268039397724 + Cb * (2.19927104525741e-5 * Cb - 0.000640992018297945 * Cr + 0.000659397001245577 * Y + 0.000426105652938837 * k - 0.176491792462875) + Cr * (-0.000778269941513683 * Cr + 0.00130872261408275 * Y + 0.000770482631801132 * k - 0.151051492775562) + Y * (0.00126935368114843 * Y - 0.00265090189010898 * k + 0.25802910206845) + k * (-0.000318913117588328 * k - 0.213742400323665); 7598 data[i + 2] = -20.810012546947 + Cb * (-0.000570115196973677 * Cb - 2.63409051004589e-5 * Cr + 0.0020741088115012 * Y - 0.00288260236853442 * k + 0.814272968359295) + Cr * (-1.53496057440975e-5 * Cr - 0.000132689043961446 * Y + 0.000560833691242812 * k - 0.195152027534049) + Y * (0.00174418132927582 * Y - 0.00255243321439347 * k + 0.116935020465145) + k * (-0.000343531996510555 * k + 0.24165260232407); 7599 data[i + 3] = 255; 7600 } 7601 return data; 7602 } 7603 _convertYcckToCmyk(data) { 7604 let Y, Cb, Cr; 7605 for (let i = 0, length = data.length; i < length; i += 4) { 7606 Y = data[i]; 7607 Cb = data[i + 1]; 7608 Cr = data[i + 2]; 7609 data[i] = 434.456 - Y - 1.402 * Cr; 7610 data[i + 1] = 119.541 - Y + 0.344 * Cb + 0.714 * Cr; 7611 data[i + 2] = 481.816 - Y - 1.772 * Cb; 7612 } 7613 return data; 7614 } 7615 _convertCmykToRgb(data) {
7616 let c, m, y, k; 7617 let offset = 0; 7618 for (let i = 0, length = data.length; i < length; i += 4) { 7619 c = data[i]; 7620 m = data[i + 1]; 7621 y = data[i + 2]; 7622 k = data[i + 3]; 7623 data[offset++] = 255 + c * (-0.00006747147073602441 * c + 0.0008379262121013727 * m + 0.0002894718188643294 * y + 0.003264231057537806 * k - 1.1185611867203937) + m * (0.000026374107616089405 * m - 0.00008626949158638572 * y - 0.0002748769067499491 * k - 0.02155688794978967) + y * (-0.00003878099212869363 * y - 0.0003267808279485286 * k + 0.0686742238595345) - k * (0.0003361971776183937 * k + 0.7430659151342254); 7624 data[offset++] = 255 + c * (0.00013596372813588848 * c + 0.000924537132573585 * m + 0.00010567359618683593 * y + 0.0004791864687436512 * k - 0.3109689587515875) + m * (-0.00023545346108370344 * m + 0.0002702845253534714 * y + 0.0020200308977307156 * k - 0.7488052167015494) + y * (0.00006834815998235662 * y + 0.00015168452363460973 * k - 0.09751927774728933) - k * (0.0003189131175883281 * k + 0.7364883807733168); 7625 data[offset++] = 255 + c * (0.000013598650411385307 * c + 0.00012423956175490851 * m + 0.0004751985097583589 * y - 0.0000036729317476630422 * k - 0.05562186980264034) + m * (0.00016141380598724676 * m + 0.0009692239130725186 * y + 0.0007782692450036253 * k - 0.44015232367526463) + y * (5.068882914068769e-7 * y + 0.0017778369011375071 * k - 0.7591454649749609) - k * (0.0003435319965105553 * k + 0.7063770186160144); 7626 } 7627 return data.subarray(0, offset); 7628 } 7629 _convertCmykToRgba(data) { 7630 for (let i = 0, length = data.length; i < length; i += 4) { 7631 const c = data[i]; 7632 const m = data[i + 1]; 7633 const y = data[i + 2]; 7634 const k = data[i + 3]; 7635 data[i] = 255 + c * (-0.00006747147073602441 * c + 0.0008379262121013727 * m + 0.0002894718188643294 * y + 0.003264231057537806 * k - 1.1185611867203937) + m * (0.000026374107616089405 * m - 0.00008626949158638572 * y - 0.0002748769067499491 * k - 0.02155688794978967) + y * (-0.00003878099212869363 * y - 0.0003267808279485286 * k + 0.0686742238595345) - k * (0.0003361971776183937 * k + 0.7430659151342254); 7636 data[i + 1] = 255 + c * (0.00013596372813588848 * c + 0.000924537132573585 * m + 0.00010567359618683593 * y + 0.0004791864687436512 * k - 0.3109689587515875) + m * (-0.00023545346108370344 * m + 0.0002702845253534714 * y + 0.0020200308977307156 * k - 0.7488052167015494) + y * (0.00006834815998235662 * y + 0.00015168452363460973 * k - 0.09751927774728933) - k * (0.0003189131175883281 * k + 0.7364883807733168); 7637 data[i + 2] = 255 + c * (0.000013598650411385307 * c + 0.00012423956175490851 * m + 0.0004751985097583589 * y - 0.0000036729317476630422 * k - 0.05562186980264034) + m * (0.00016141380598724676 * m + 0.0009692239130725186 * y + 0.0007782692450036253 * k - 0.44015232367526463) + y * (5.068882914068769e-7 * y + 0.0017778369011375071 * k - 0.7591454649749609) - k * (0.0003435319965105553 * k + 0.7063770186160144); 7638 data[i + 3] = 255; 7639 } 7640 return data; 7641 } 7642 getData({ 7643 width, 7644 height, 7645 forceRGBA = false, 7646 forceRGB = false, 7647 isSourcePDF = false 7648 }) { 7649 if (this.numComponents > 4) { 7650 throw new JpegError("Unsupported color mode"); 7651 } 7652 const data = this._getLinearizedBlockData(width, height, isSourcePDF); 7653 if (this.numComponents === 1 && (forceRGBA || forceRGB)) { 7654 const len = data.length * (forceRGBA ? 4 : 3); 7655 const rgbaData = new Uint8ClampedArray(len); 7656 let offset = 0; 7657 if (forceRGBA) { 7658 grayToRGBA(data, new Uint32Array(rgbaData.buffer)); 7659 } else { 7660 for (const grayColor of data) { 7661 rgbaData[offset++] = grayColor; 7662 rgbaData[offset++] = grayColor; 7663 rgbaData[offset++] = grayColor; 7664 } 7665 } 7666 return rgbaData; 7667 } else if (this.numComponents === 3 && this._isColorConversionNeeded) { 7668 if (forceRGBA) { 7669 const rgbaData = new Uint8ClampedArray(data.length / 3 * 4); 7670 return this._convertYccToRgba(data, rgbaData); 7671 } 7672 return this._convertYccToRgb(data); 7673 } else if (this.numComponents === 4) { 7674 if (this._isColorConversionNeeded) { 7675 if (forceRGBA) { 7676 return this._convertYcckToRgba(data); 7677 } 7678 if (forceRGB) { 7679 return this._convertYcckToRgb(data); 7680 } 7681 return this._convertYcckToCmyk(data); 7682 } else if (forceRGBA) { 7683 return this._convertCmykToRgba(data); 7684 } else if (forceRGB) { 7685 return this._convertCmykToRgb(data); 7686 } 7687 } 7688 return data; 7689 } 7690} 7691 7692;// ./src/core/jpeg_stream.js 7693 7694 7695 7696 7697class JpegStream extends DecodeStream { 7698 static #isImageDecoderSupported = FeatureTest.isImageDecoderSupported; 7699 constructor(stream, maybeLength, params) { 7700 super(maybeLength); 7701 this.stream = stream; 7702 this.dict = stream.dict; 7703 this.maybeLength = maybeLength; 7704 this.params = params; 7705 } 7706 static get canUseImageDecoder() { 7707 return shadow(this, "canUseImageDecoder", this.#isImageDecoderSupported ? ImageDecoder.isTypeSupp
7707orted("image/jpeg") : Promise.resolve(false)); 7708 } 7709 static setOptions({ 7710 isImageDecoderSupported = false 7711 }) { 7712 this.#isImageDecoderSupported = isImageDecoderSupported; 7713 } 7714 get bytes() { 7715 return shadow(this, "bytes", this.stream.getBytes(this.maybeLength)); 7716 } 7717 ensureBuffer(requested) {} 7718 readBlock() { 7719 this.decodeImage(); 7720 } 7721 get jpegOptions() { 7722 const jpegOptions = { 7723 decodeTransform: undefined, 7724 colorTransform: undefined 7725 }; 7726 const decodeArr = this.dict.getArray("D", "Decode"); 7727 if ((this.forceRGBA || this.forceRGB) && Array.isArray(decodeArr)) { 7728 const bitsPerComponent = this.dict.get("BPC", "BitsPerComponent") || 8; 7729 const decodeArrLength = decodeArr.length; 7730 const transform = new Int32Array(decodeArrLength); 7731 let transformNeeded = false; 7732 const maxValue = (1 << bitsPerComponent) - 1; 7733 for (let i = 0; i < decodeArrLength; i += 2) { 7734 transform[i] = (decodeArr[i + 1] - decodeArr[i]) * 256 | 0; 7735 transform[i + 1] = decodeArr[i] * maxValue | 0; 7736 if (transform[i] !== 256 || transform[i + 1] !== 0) { 7737 transformNeeded = true; 7738 } 7739 } 7740 if (transformNeeded) { 7741 jpegOptions.decodeTransform = transform; 7742 } 7743 } 7744 if (this.params instanceof Dict) { 7745 const colorTransform = this.params.get("ColorTransform"); 7746 if (Number.isInteger(colorTransform)) { 7747 jpegOptions.colorTransform = colorTransform; 7748 } 7749 } 7750 return shadow(this, "jpegOptions", jpegOptions); 7751 } 7752 #skipUselessBytes(data) { 7753 for (let i = 0, ii = data.length - 1; i < ii; i++) { 7754 if (data[i] === 0xff && data[i + 1] === 0xd8) { 7755 if (i > 0) { 7756 data = data.subarray(i); 7757 } 7758 break; 7759 } 7760 } 7761 return data; 7762 } 7763 decodeImage(bytes) { 7764 if (this.eof) { 7765 return this.buffer; 7766 } 7767 bytes = this.#skipUselessBytes(bytes || this.bytes); 7768 const jpegImage = new JpegImage(this.jpegOptions); 7769 jpegImage.parse(bytes); 7770 const data = jpegImage.getData({ 7771 width: this.drawWidth, 7772 height: this.drawHeight, 7773 forceRGBA: this.forceRGBA, 7774 forceRGB: this.forceRGB, 7775 isSourcePDF: true 7776 }); 7777 this.buffer = data; 7778 this.bufferLength = data.length; 7779 this.eof = true; 7780 return this.buffer; 7781 } 7782 get canAsyncDecodeImageFromBuffer() { 7783 return this.stream.isAsync; 7784 } 7785 async getTransferableImage() { 7786 if (!(await JpegStream.canUseImageDecoder)) { 7787 return null; 7788 } 7789 const jpegOptions = this.jpegOptions; 7790 if (jpegOptions.decodeTransform) { 7791 return null; 7792 } 7793 let decoder; 7794 try { 7795 const bytes = this.canAsyncDecodeImageFromBuffer && (await this.stream.asyncGetBytes()) || this.bytes; 7796 if (!bytes) { 7797 return null; 7798 } 7799 const data = this.#skipUselessBytes(bytes); 7800 if (!JpegImage.canUseImageDecoder(data, jpegOptions.colorTransform)) { 7801 return null; 7802 } 7803 decoder = new ImageDecoder({ 7804 data, 7805 type: "image/jpeg", 7806 preferAnimation: false 7807 }); 7808 return (await decoder.decode()).image; 7809 } catch (reason) { 7810 warn(`getTransferableImage - failed: "${reason}".`); 7811 return null; 7812 } finally { 7813 decoder?.close(); 7814 } 7815 } 7816} 7817 7818;// ./external/openjpeg/openjpeg.js 7819var OpenJPEG = (() => { 7820 var _scriptName = typeof document != 'undefined' ? document.currentScript?.src : undefined; 7821 return function (moduleArg = {}) { 7822 var moduleRtn; 7823 var Module = moduleArg; 7824 var readyPromiseResolve, readyPromiseReject; 7825 var readyPromise = new Promise((resolve, reject) => { 7826 readyPromiseResolve = resolve; 7827 readyPromiseReject = reject; 7828 }); 7829 var ENVIRONMENT_IS_WEB = true; 7830 var ENVIRONMENT_IS_WORKER = false; 7831 Module.decode = function (bytes, { 7832 numComponents = 4, 7833 isIndexedColormap = false, 7834 smaskInData = false 7835 }) { 7836 const size = bytes.length; 7837 const ptr = Module._malloc(size); 7838 Module.HEAPU8.set(bytes, ptr); 7839 const ret = Module._jp2_decode(ptr, size, numComponents > 0 ? numComponents : 0, !!isIndexedColormap, !!smaskInData); 7840 Module._free(ptr); 7841 if (ret) { 7842 const { 7843 errorMessages 7844 } = Module; 7845 if (errorMessages) { 7846 delete Module.errorMessages; 7847 return errorMessages; 7848 } 7849 return "Unknown error"; 7850 } 7851 const { 7852 imageData 7853 } = Module; 7854 Module.imageData = null; 7855 return imageData; 7856 }; 7857 var moduleOverrides = Object.assign({}, Module); 7858 var arguments_ = []; 7859 var thisProgram = "./this.program"; 7860 var quit_ = (status, toThrow) => { 7861 throw toThrow; 7862 }; 7863 var scriptDirectory = ""; 7864 var readAsync, readBinary; 7865 if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { 7866 if (ENVIRONMENT_IS_WORKER) { 7867 scriptDirectory = self.location.href; 7868 } else if (typeof document != "undefined" && document.currentScript) { 7869 scriptDirectory = document.currentScript.src; 7870 } 7871 if (_scriptName) { 7872 scriptDirectory = _scriptName; 7873 } 7874 if (scriptDirectory.startsWith("blob:")) { 7875 scriptDirectory = ""; 7876 } else { 7877 scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, "").lastIndexOf("/") + 1); 7878 } 7879 readAsync = url => fetch(url, { 7880 credentials: "same-origin" 7881 }).then(response => { 7882 if (response.ok) { 7883 return response.arrayBuffer(); 7884 } 7885 return Promise.reject(new Error(response.status + " : " + response.url)); 7886 }); 7887 } else {} 7888 var out = Module["print"] || console.log.bind(console); 7889 var err = Module["printErr"] || console.error.bind(console);
7890 Object.assign(Module, moduleOverrides); 7891 moduleOverrides = null; 7892 if (Module["arguments"]) arguments_ = Module["arguments"]; 7893 if (Module["thisProgram"]) thisProgram = Module["thisProgram"]; 7894 var wasmBinary = Module["wasmBinary"]; 7895 function intArrayFromBase64(s) { 7896 var decoded = atob(s); 7897 var bytes = new Uint8Array(decoded.length); 7898 for (var i = 0; i < decoded.length; ++i) { 7899 bytes[i] = decoded.charCodeAt(i); 7900 } 7901 return bytes; 7902 } 7903 function tryParseAsDataURI(filename) { 7904 if (!isDataURI(filename)) { 7905 return; 7906 } 7907 return intArrayFromBase64(filename.slice(dataURIPrefix.length)); 7908 } 7909 var wasmMemory; 7910 var ABORT = false; 7911 var EXITSTATUS; 7912 var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; 7913 function updateMemoryViews() { 7914 var b = wasmMemory.buffer; 7915 Module["HEAP8"] = HEAP8 = new Int8Array(b); 7916 Module["HEAP16"] = HEAP16 = new Int16Array(b); 7917 Module["HEAPU8"] = HEAPU8 = new Uint8Array(b); 7918 Module["HEAPU16"] = HEAPU16 = new Uint16Array(b); 7919 Module["HEAP32"] = HEAP32 = new Int32Array(b); 7920 Module["HEAPU32"] = HEAPU32 = new Uint32Array(b); 7921 Module["HEAPF32"] = HEAPF32 = new Float32Array(b); 7922 Module["HEAPF64"] = HEAPF64 = new Float64Array(b); 7923 } 7924 var __ATPRERUN__ = []; 7925 var __ATINIT__ = []; 7926 var __ATPOSTRUN__ = []; 7927 var runtimeInitialized = false; 7928 function preRun() { 7929 if (Module["preRun"]) { 7930 if (typeof Module["preRun"] == "function") Module["preRun"] = [Module["preRun"]]; 7931 while (Module["preRun"].length) { 7932 addOnPreRun(Module["preRun"].shift()); 7933 } 7934 } 7935 callRuntimeCallbacks(__ATPRERUN__); 7936 } 7937 function initRuntime() { 7938 runtimeInitialized = true; 7939 callRuntimeCallbacks(__ATINIT__); 7940 } 7941 function postRun() { 7942 if (Module["postRun"]) { 7943 if (typeof Module["postRun"] == "function") Module["postRun"] = [Module["postRun"]]; 7944 while (Module["postRun"].length) { 7945 addOnPostRun(Module["postRun"].shift()); 7946 } 7947 } 7948 callRuntimeCallbacks(__ATPOSTRUN__); 7949 } 7950 function addOnPreRun(cb) { 7951 __ATPRERUN__.unshift(cb); 7952 } 7953 function addOnInit(cb) { 7954 __ATINIT__.unshift(cb); 7955 } 7956 function addOnPostRun(cb) { 7957 __ATPOSTRUN__.unshift(cb); 7958 } 7959 var runDependencies = 0; 7960 var runDependencyWatcher = null; 7961 var dependenciesFulfilled = null; 7962 function addRunDependency(id) { 7963 runDependencies++; 7964 Module["monitorRunDependencies"]?.(runDependencies); 7965 } 7966 function removeRunDependency(id) { 7967 runDependencies--; 7968 Module["monitorRunDependencies"]?.(runDependencies); 7969 if (runDependencies == 0) { 7970 if (runDependencyWatcher !== null) { 7971 clearInterval(runDependencyWatcher); 7972 runDependencyWatcher = null; 7973 } 7974 if (dependenciesFulfilled) { 7975 var callback = dependenciesFulfilled; 7976 dependenciesFulfilled = null; 7977 callback(); 7978 } 7979 } 7980 } 7981 function abort(what) { 7982 Module["onAbort"]?.(what); 7983 what = "Aborted(" + what + ")"; 7984 err(what); 7985 ABORT = true; 7986 what += ". Build with -sASSERTIONS for more info."; 7987 var e = new WebAssembly.RuntimeError(what); 7988 readyPromiseReject(e); 7989 throw e; 7990 } 7991 var dataURIPrefix = "data:application/octet-stream;base64,"; 7992 var isDataURI = filename => filename.startsWith(dataURIPrefix); 7993 function findWasmBinary() { 7994 var f = "data:application/octet-stream;base64,AGFzbQEAAAAB2QEcYAN/f38Bf2AEf39/fwF/YAF/AGACf38AYAF/AX9gA39/fwBgAn9/AX9gBH9/f38AYAN/fn8B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RrIgMgAS0AAzoAACABQQRqIQEgBEEEaiIEIAJHDQALCwuCBAEDfyACQYAETwRAIAAgASACEAIgAA8LIAAgAmohAwJAIAAgAXNBA3FFBEACQCAAQQNxRQRAIAAhAgwBCyACRQRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAkEDcUUNASACIANJDQALCyADQXxxIQQCQCADQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0EEayIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAswAQF/AkAgAEUNACABRQ0AQQggACABbCIBECkiAARAIABBACABEBkaCyAAIQILIAILEQAgAEUEQEEADwtBCCAAECkL8gICAn8BfgJAIAJFDQAgACABOgAAIAAgAmoiA0EBayABOgAAIAJBA0kNACAAIAE6AAIgACABOgABIANBA2sgAToAACADQQJrIAE6AAAgAkEHSQ0AIAAgAToAAyADQQRrIAE6AAAgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBBGsgATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQQhrIAE2AgAgAkEMayABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2A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AgCCAlaigCAGpBAmpBAnVrNgIAIAEgKWooAgAgCCApaigCAGpBAmoLIQEgKSAGQQJ0aiIGIAYoAgAgAUECdWs2AgAgB0EBaiIHICNHDQALCyAXIB9ODQAgDSAXIgEiB0oEQANAIBIgAUEFdGoiByAH/QACICAH/QACAP2uAUEB/awBIAf9AAIQ/a4B/QsCECABQQFqIgEgDUcNAAsgDSEHCyAHIB9ODQADQCApIAdBA3QiAUEEciIGQQJ0aiIqAn8gB0EASARAIBIoAgAhASAHQX9HBEAgEiAGQQJ0IgZqIgggCCgCACABajYCACAGICFqIgEgASgCACAhKAIAajYCACAGICVqIgEgASgCACAlKAIAajYCACApKAIADAILIBIgBkECdCIGaiIIIAgoAgAgUygCACABakEBdWo2AgAgBiAhaiIBIAEoAgAgUigCACAhKAIAakEBdWo2AgAgBiAlaiIBIAEoAgAgUSgCACAlKAIAakEBdWo2AgAgSygCACApKAIAakEBdQwBCyASIAEgMiAHI
7994BZIG0ECdGoiASgCACEIIBYgB0EBaiIwTARAIBIgBkECdCIGaiIgICAoAgAgaSgCACAIakEBdWo2AgAgBiAhaiIIIAgoAgAgaCgCACABKAIEakEBdWo2AgAgBiAlaiIGIAYoAgAgZygCACABKAIIakEBdWo2AgAgZigCACABKAIMakEBdQwBCyASIAZBAnQiIGoiBiAGKAIAIAggEiAwQQV0aiIGKAIAakEBdWo2AgAgICAhaiIIIAgoAgAgBigCBCABKAIEakEBdWo2AgAgICAlaiIIIAgoAgAgBigCCCABKAIIakEBdWo2AgAgBigCDCABKAIMakEBdQsgKigCAGo2AgAgB0EBaiIHIB9HDQALCyA5IBEgWSAPID4gWkEBQQRBABAqDQALCwwCCyASEBRBASEHCyA5ICtBEGsoAgAiASBdKAIAIgZrICtBDGsoAgAgXigCACIIayArQQhrKAIAIgkgBmsgK0EEaygCACAIayAOKAI0QQEgCSABaxAiIDkQJwwDCyA5ECcgEhAUQQAhBwwCCyA5ECdBACEHDAELQQAhByAXECQgDBAUCyAnQSBqJAAgBw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AAkACQAJAAkACQAJAAkAgAUEJaw4SAAgJCggJAQIDBAoJCgoICQUGBwsgAiACKAIAIgFBBGo2AgAgACABKAIANgIADwsgAiACKAIAIgFBBGo2AgAgACABMgEANwMADwsgAiACKAIAIgFBBGo2AgAgACABMwEANwMADwsgAiACKAIAIgFBBGo2AgAgACABMAAANwMADwsgAiACKAIAIgFBBGo2AgAgACABMQAANwMADwsgAiACKAIAQQdqQXhxIgFBCGo2AgAgACABKwMAOQMADwsgACACIAMRAwALDwsgAiACKAIAIgFBBGo2AgAgACABNAIANwMADwsgAiACKAIAIgFBBGo2AgAgACABNQIANwMADwsgAiACKAIAQQdqQXhxIgFBCGo2AgAgACABKQMANwMAC28BBX8gACgCACIDLAAAQTBrIgFBCUsEQEEADwsDQEF/IQQgAkHMmbPmAE0EQEF/IAEgAkEKbCIFaiABIAVB/////wdzSxshBAsgACADQQFqIgU2AgAgAywAASAEIQIgBSEDQTBrIgFBCkkNAAsgAgtJAQF/AkBBAUEsEBciAQRAIAFBADYCEAJAIABBAEwEQCABQQFBCBAXIgA2AiQgAEUNAQwDCyABQQA2AgwLIAEQFAtBACEBCyABC64UAhJ/An4jAEFAaiIIJAAgCCABNgI8IAhBJ2ohFyAIQShqIRICQAJAAkACQANAQQAhBwNAIAEhDSAHIA5B/////wdzSg0CIAcgDmohDgJAAkACQAJAIAEiBy0AACIMBEADQAJAAkAgDEH/AXEiAUUEQCAHIQEMAQsgAUElRw0BIAchDANAIAwtAAFBJUcEQCAMIQEMAgsgB0EBaiEHIAwtAAIgDEECaiIBIQxBJUYNAAsLIAcgDWsiByAOQf////8HcyIYSg0JIAAEQCAAIA0gBxAeCyAHDQcgCCABNgI8IAFBAWohB0F/IRECQCABLAABQTBrIgtBCUsNACABLQACQSRHDQAgAUEDaiEHQQEhEyALIRELIAggBzYCPEEAIQkCQCAHLAAAIgxBIGsiAUEfSwRAIAchCwwBCyAHIQtBASABdCIBQYnRBHFFDQADQCAIIAdBAWoiCzYCPCABIAlyI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nwgAhAwDQFBACEGIAJBAUGbKkEAEBMMAwsgAyAHNgIEIAMgBTYCACACQQJBq+oAIAMQE0EAIQYgACADQcgAakEAIANBxABqIANBQGsgA0E8aiADQThqIANBNGogA0HMAGogASACECwNAQwCCwsgACACEH8hBgsgA0HQAGokACAGC4YUAw5/An4BeyMAQdAAayIJJAAgCUEBNgJMAkACQCAAKAKAAUEBRw0AIAAoAoQBQQFHDQAgACgCbA0AIAAoAnANACAAKAJkIgMoAgANACADKAIEDQAgAygCCCAAKAJ0Rw0AIAMoAgwgACgCeEcNAEEAIQMgACAJQcgAakEAIAlBxABqIAlBQGsgCUE8aiAJQThqIAlBNGogCUHMAGogASACECxFDQECQAJAIAkoAkxFDQAgACAJKAJIQQBBACABIAIQMUUNACAAKAJkIgEoAhANAUEBIQMMAwsgAkEBQaPEAEEAEBMMAgsgASgCGCEFA0AgBSAEQTRsIgFqKAIsEBQgACgCZCICKAIYIgUgAWoiAyAAKALoASIHKAIUKAIAKAIUIARBzABsaiIGKAIkNgIsIAMgBygCGCgCGCABaigCJDYCJCAGQQA2AiRBASEDIARBAWoiBCACKAIQSQ0ACwwBCyAAQgA3A1AgACgCWBAUIABBADYCWAJAAkAgACgCHA0AIAAoAiANACAAKAIkIAAoAoABRw0AQgIhESAAKAIoIAAoAoQBRg0BC0ICIREgACgCTA0AIAEoAhxBAkYNACAAKAKAASINIAAoAoQBbCIDBH4gA0EBcSEEIAAoAuABKAIoIQcCQCADQQFGBEBBACEDQgAhEQwBCyADQX5xIQZBACEDQgAhEQNAIAcgA0EobGoiCCgCBCIKBEAgCCgCECAKQRhsakEIaykDACISIBEgESASUxshEQsgByADQQFyQShsaiIIKAIEIgoEQCAIKAIQIApBGGxqQQhrKQMAIhIgESARIBJTGyERCyADQQJqIQMgBUECaiIFIAZHDQALCwJAIARFDQAgByADQShsaiIDKAIEIgVFDQAgAygCECAFQRhsakEIaykDACISIBEgESASUxshEQsgEUICfAVCAgshEUEAIQQCQCAAKAIgIgYgACg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 return f; 7996 } 7997 var wasmBinaryFile; 7998 function getBinarySync(file) { 7999 if (file == wasmBinaryFile && wasmBinary) { 8000 return new Uint8Array(wasmBinary); 8001 } 8002 var binary = tryParseAsDataURI(file); 8003 if (binary) { 8004 return binary; 8005 } 8006 if (readBinary) { 8007 return readBinary(file); 8008 } 8009 throw 'sync fetching of the wasm failed: you can preload it to Module["wasmBinary"] manually, or emcc.py will do that for you when generating HTML (but not JS)'; 8010 } 8011 function instantiateSync(file, info) { 8012 var module; 8013 var binary = getBinarySync(file); 8014 module = new WebAssembly.Module(binary); 8015 var instance = new WebAssembly.Instance(module, info); 8016 return [instance, module]; 8017 } 8018 function getWasmImports() { 8019 return { 8020 a: wasmImports 8021 }; 8022 } 8023 function createWasm() { 8024 function receiveInstance(instance, module) { 8025 wasmExports = instance.exports; 8026 wasmMemory = wasmExports["t"]; 8027 updateMemoryViews(); 8028 addOnInit(wasmExports["u"]); 8029 removeRunDependency("wasm-instantiate"); 8030 return wasmExports; 8031 } 8032 addRunDependency("wasm-instantiate"); 8033 var info = getWasmImports(); 8034 if (Module["instantiateWasm"]) { 8035 try { 8036 return Module["instantiateWasm"](info, receiveInstance); 8037 } catch (e) { 8038 err(`Module.instantiateWasm callback failed with error: ${e}`); 8039 readyPromiseReject(e); 8040 } 8041 } 8042 wasmBinaryFile ??= findWasmBinary(); 8043 var result = instantiateSync(wasmBinaryFile, info); 8044 return receiveInstance(result[0]); 8045 } 8046 class ExitStatus { 8047 name = "ExitStatus"; 8048 constructor(status) { 8049 this.message = `Program terminated with exit(${status})`; 8050 this.status = status; 8051 } 8052 } 8053 var callRuntimeCallbacks = callbacks => { 8054 while (callbacks.length > 0) { 8055 callbacks.shift()(Module); 8056 } 8057 }; 8058 var noExitRuntime = Module["noExitRuntime"] || true; 8059 var __abort_js = () => abort(""); 8060 var __emscripten_memcpy_js = (dest, src, num) => HEAPU8.copyWithin(dest, src, src + num); 8061 var runtimeKeepaliveCounter = 0; 8062 var __emscripten_runtime_keepalive_clear = () => { 8063 noExitRuntime = false; 8064 runtimeKeepaliveCounter = 0; 8065 }; 8066 var timers = {}; 8067 var handleException = e => { 8068 if (e instanceof ExitStatus || e == "unwind") { 8069 return EXITSTATUS; 8070 } 8071 quit_(1, e); 8072 }; 8073 var keepRuntimeAlive = () => noExitRuntime || runtimeKeepaliveCounter > 0; 8074 var _proc_exit = code => { 8075 EXITSTATUS = code; 8076 if (!keepRuntimeAlive()) { 8077 Module["onExit"]?.(code); 8078 ABORT = true; 8079 } 8080 quit_(code, new ExitStatus(code)); 8081 }; 8082 var exitJS = (status, implicit) => { 8083 EXITSTATUS = status; 8084 _proc_exit(status); 8085 }; 8086 var _exit = exitJS; 8087 var maybeExit = () => { 8088 if (!keepRuntimeAlive()) { 8089 try { 8090 _exit(EXITSTATUS); 8091 } catch (e) { 8092 handleException(e); 8093 } 8094 } 8095 }; 8096 var callUserCallback = func => { 8097 if (ABORT) { 8098 return; 8099 } 8100 try { 8101 func(); 8102 maybeExit(); 8103 } catch (e) { 8104 handleException(e); 8105 } 8106 }; 8107 var _emscripten_get_now = () => performance.now(); 8108 var __setitimer_js = (which, timeout_ms) => { 8109 if (timers[which]) { 8110 clearTimeout(timers[which].id); 8111 delete timers[which]; 8112 } 8113 if (!timeout_ms) return 0; 8114 var id = setTimeout(() => { 8115 delete timers[which]; 8116 callUserCallback(() => __emscripten_timeout(which, _emscripten_get_now())); 8117 }, timeout_ms); 8118 timers[which] = { 8119 id, 8120 timeout_ms 8121 }; 8122 return 0; 8123 }; 8124 function _copy_pixels_1(compG_ptr, nb_pixels) { 8125 compG_ptr >>= 2; 8126 const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels); 8127 const compG = Module.HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels); 8128 imageData.set(compG); 8129 } 8130 function _copy_pixels_3(compR_ptr, compG_ptr, compB_ptr, nb_pixels) { 8131 compR_ptr >>= 2; 8132 compG_ptr >>= 2; 8133 compB_ptr >>= 2; 8134 const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 3); 8135 const compR = Module.HEAP32.subarray(compR_ptr, compR_ptr + nb_pixels); 8136 const compG = Module.HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels); 8137 const compB = Module.HEAP32.subarray(compB_ptr, compB_ptr + nb_pixels); 8138 for (let i = 0; i < nb_pixels; i++) { 8139 imageData[3 * i] = compR[i]; 8140 imageData[3 * i + 1] = compG[i]; 8141 imageData[3 * i + 2] = compB[i]; 8142 } 8143 } 8144 function _copy_pixels_4(compR_ptr, compG_ptr, compB_ptr, compA_ptr, nb_pixels) { 8145 compR_ptr >>= 2; 8146 compG_ptr >>= 2; 8147 compB_ptr >>= 2; 8148 compA_ptr >>= 2; 8149 const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 4); 8150 const compR = Module.HEAP32.subarray(compR_ptr, compR_ptr + nb_pixels); 8151 const compG = Module.HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels); 8152 const compB = Module.HEAP32.subarray(compB_ptr, compB_ptr + nb_pixels); 8153 const compA = Module.HEAP32.subarray(compA_ptr, compA_ptr + nb_pixels); 8154 for (let i = 0; i < nb_pixels; i++) { 8155 imageData[4 * i] = compR[i]; 8156 imageData[4 * i + 1] = compG[i]; 8157 imageData[4 * i + 2] = compB[i]; 8158 imageData[4 * i + 3] = compA[i]; 8159 } 8160 } 8161 var getHeapMax = () => 2147483648; 8162 var alignMemory = (size, alignment) =>
8162 Math.ceil(size / alignment) * alignment; 8163 var growMemory = size => { 8164 var b = wasmMemory.buffer; 8165 var pages = (size - b.byteLength + 65535) / 65536 | 0; 8166 try { 8167 wasmMemory.grow(pages); 8168 updateMemoryViews(); 8169 return 1; 8170 } catch (e) {} 8171 }; 8172 var _emscripten_resize_heap = requestedSize => { 8173 var oldSize = HEAPU8.length; 8174 requestedSize >>>= 0; 8175 var maxHeapSize = getHeapMax(); 8176 if (requestedSize > maxHeapSize) { 8177 return false; 8178 } 8179 for (var cutDown = 1; cutDown <= 4; cutDown *= 2) { 8180 var overGrownHeapSize = oldSize * (1 + .2 / cutDown); 8181 overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296); 8182 var newSize = Math.min(maxHeapSize, alignMemory(Math.max(requestedSize, overGrownHeapSize), 65536)); 8183 var replacement = growMemory(newSize); 8184 if (replacement) { 8185 return true; 8186 } 8187 } 8188 return false; 8189 }; 8190 var ENV = {}; 8191 var getExecutableName = () => thisProgram || "./this.program"; 8192 var getEnvStrings = () => { 8193 if (!getEnvStrings.strings) { 8194 var lang = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8"; 8195 var env = { 8196 USER: "web_user", 8197 LOGNAME: "web_user", 8198 PATH: "/", 8199 PWD: "/", 8200 HOME: "/home/web_user", 8201 LANG: lang, 8202 _: getExecutableName() 8203 }; 8204 for (var x in ENV) { 8205 if (ENV[x] === undefined) delete env[x];else env[x] = ENV[x]; 8206 } 8207 var strings = []; 8208 for (var x in env) { 8209 strings.push(`${x}=${env[x]}`); 8210 } 8211 getEnvStrings.strings = strings; 8212 } 8213 return getEnvStrings.strings; 8214 }; 8215 var stringToAscii = (str, buffer) => { 8216 for (var i = 0; i < str.length; ++i) { 8217 HEAP8[buffer++] = str.charCodeAt(i); 8218 } 8219 HEAP8[buffer] = 0; 8220 }; 8221 var _environ_get = (__environ, environ_buf) => { 8222 var bufSize = 0;
8223 getEnvStrings().forEach((string, i) => { 8224 var ptr = environ_buf + bufSize; 8225 HEAPU32[__environ + i * 4 >> 2] = ptr; 8226 stringToAscii(string, ptr); 8227 bufSize += string.length + 1; 8228 }); 8229 return 0; 8230 }; 8231 var _environ_sizes_get = (penviron_count, penviron_buf_size) => { 8232 var strings = getEnvStrings(); 8233 HEAPU32[penviron_count >> 2] = strings.length; 8234 var bufSize = 0; 8235 strings.forEach(string => bufSize += string.length + 1); 8236 HEAPU32[penviron_buf_size >> 2] = bufSize; 8237 return 0; 8238 }; 8239 var _fd_close = fd => 52; 8240 var convertI32PairToI53Checked = (lo, hi) => hi + 2097152 >>> 0 < 4194305 - !!lo ? (lo >>> 0) + hi * 4294967296 : NaN; 8241 function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { 8242 var offset = convertI32PairToI53Checked(offset_low, offset_high); 8243 return 70; 8244 } 8245 var printCharBuffers = [null, [], []]; 8246 var UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder() : undefined; 8247 var UTF8ArrayToString = (heapOrArray, idx = 0, maxBytesToRead = NaN) => { 8248 var endIdx = idx + maxBytesToRead; 8249 var endPtr = idx; 8250 while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr; 8251 if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) { 8252 return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr)); 8253 } 8254 var str = ""; 8255 while (idx < endPtr) { 8256 var u0 = heapOrArray[idx++]; 8257 if (!(u0 & 128)) { 8258 str += String.fromCharCode(u0); 8259 continue; 8260 } 8261 var u1 = heapOrArray[idx++] & 63; 8262 if ((u0 & 224) == 192) { 8263 str += String.fromCharCode((u0 & 31) << 6 | u1); 8264 continue; 8265 } 8266 var u2 = heapOrArray[idx++] & 63; 8267 if ((u0 & 240) == 224) { 8268 u0 = (u0 & 15) << 12 | u1 << 6 | u2; 8269 } else { 8270 u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63; 8271 } 8272 if (u0 < 65536) { 8273 str += String.fromCharCode(u0); 8274 } else { 8275 var ch = u0 - 65536; 8276 str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023); 8277 } 8278 } 8279 return str; 8280 }; 8281 var printChar = (stream, curr) => { 8282 var buffer = printCharBuffers[stream]; 8283 if (curr === 0 || curr === 10) { 8284 (stream === 1 ? out : err)(UTF8ArrayToString(buffer)); 8285 buffer.length = 0; 8286 } else { 8287 buffer.push(curr); 8288 } 8289 }; 8290 var UTF8ToString = (ptr, maxBytesToRead) => ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ""; 8291 var _fd_write = (fd, iov, iovcnt, pnum) => { 8292 var num = 0; 8293 for (var i = 0; i < iovcnt; i++) { 8294 var ptr = HEAPU32[iov >> 2]; 8295 var len = HEAPU32[iov + 4 >> 2]; 8296 iov += 8; 8297 for (var j = 0; j < len; j++) { 8298 printChar(fd, HEAPU8[ptr + j]); 8299 } 8300 num += len; 8301 } 8302 HEAPU32[pnum >> 2] = num; 8303 return 0; 8304 }; 8305 function _gray_to_rgba(compG_ptr, nb_pixels) { 8306 compG_ptr >>= 2; 8307 const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 4); 8308 const compG = Module.HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels); 8309 for (let i = 0; i < nb_pixels; i++) { 8310 imageData[4 * i] = imageData[4 * i + 1] = imageData[4 * i + 2] = compG[i]; 8311 imageData[4 * i + 3] = 255; 8312 } 8313 } 8314 function _graya_to_rgba(compG_ptr, compA_ptr, nb_pixels) { 8315 compG_ptr >>= 2; 8316 compA_ptr >>= 2; 8317 const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 4); 8318 const compG = Module.HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels); 8319 const compA = Module.HEAP32.subarray(compA_ptr, compA_ptr + nb_pixels); 8320 for (let i = 0; i < nb_pixels; i++) { 8321 imageData[4 * i] = imageData[4 * i + 1] = imageData[4 * i + 2] = compG[i]; 8322 imageData[4 * i + 3] = compA[i]; 8323 } 8324 } 8325 function _jsPrintWarning(message_ptr) { 8326 const message = UTF8ToString(message_ptr); 8327 (Module.warn || console.warn)(`OpenJPEG: ${message}`); 8328 } 8329 function _rgb_to_rgba(compR_ptr, compG_ptr, compB_ptr, nb_pixels) { 8330 compR_ptr >>= 2; 8331 compG_ptr >>= 2; 8332 compB_ptr >>= 2; 8333 const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 4); 8334 const compR = Module.HEAP32.subarray(compR_ptr, compR_ptr + nb_pixels); 8335 const compG = Module.HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels); 8336 const compB = Module.HEAP32.subarray(compB_ptr, compB_ptr + nb_pixels); 8337 for (let i = 0; i < nb_pixels; i++) { 8338 imageData[4 * i] = compR[i]; 8339 imageData[4 * i + 1] = compG[i]; 8340 imageData[4 * i + 2] = compB[i]; 8341 imageData[4 * i + 3] = 255; 8342 } 8343 } 8344 function _storeErrorMessage(message_ptr) { 8345 const message = UTF8ToString(message_ptr); 8346 if (!Module.errorMessages) { 8347 Module.errorMessages = message; 8348 } else { 8349 Module.errorMessages += "\n" + message; 8350 } 8351 } 8352 var wasmImports = { 8353 m: __abort_js, 8354 c: __emscripten_memcpy_js, 8355 l: __emscripten_runtime_keepalive_clear, 8356 n: __setitimer_js, 8357 g: _copy_pixels_1, 8358 f: _copy_pixels_3, 8359 e: _copy_pixels_4, 8360 o: _emscripten_resize_heap, 8361 p: _environ_get, 8362 q: _environ_sizes_get, 8363 r: _fd_close, 8364 j: _fd_seek, 8365 b: _fd_write, 8366 s: _gray_to_rgba, 8367 i: _graya_to_rgba, 8368 d: _jsPrintWarning, 8369 k: _proc_exit, 8370 h: _rgb_to_rgba, 8371 a: _storeErrorMessage 8372 }; 8373 var wasmExports = createWasm(); 8374 var ___wasm_call_ctors = wasmExports["u"]; 8375 var _malloc = Module["_malloc"] = wasmExports["v"]; 8376 var _free = Module["_free"] = wasmExports["w"]; 8377 var _jp2_decode = Module["_jp2_decode"] = wasmExports["y"]; 8378 var __emscripten_timeout = wasmExports["z"]; 8379 var calledRun; 8380 dependenciesFulfilled = function runCaller() { 8381 if (!calledRun) run();
8382 if (!calledRun) dependenciesFulfilled = runCaller; 8383 }; 8384 function run() { 8385 if (runDependencies > 0) { 8386 return; 8387 } 8388 preRun(); 8389 if (runDependencies > 0) { 8390 return; 8391 } 8392 function doRun() { 8393 if (calledRun) return; 8394 calledRun = true; 8395 Module["calledRun"] = true; 8396 if (ABORT) return; 8397 initRuntime(); 8398 readyPromiseResolve(Module); 8399 Module["onRuntimeInitialized"]?.(); 8400 postRun(); 8401 } 8402 if (Module["setStatus"]) { 8403 Module["setStatus"]("Running..."); 8404 setTimeout(() => { 8405 setTimeout(() => Module["setStatus"](""), 1); 8406 doRun(); 8407 }, 1); 8408 } else { 8409 doRun(); 8410 } 8411 } 8412 if (Module["preInit"]) { 8413 if (typeof Module["preInit"] == "function") Module["preInit"] = [Module["preInit"]]; 8414 while (Module["preInit"].length > 0) { 8415 Module["preInit"].pop()(); 8416 } 8417 } 8418 run(); 8419 moduleRtn = Module; 8420 return moduleRtn; 8421 }; 8422})(); 8423/* harmony default export */ const openjpeg = (OpenJPEG); 8424;// ./src/core/jpx.js 8425 8426 8427 8428class JpxError extends BaseException { 8429 constructor(msg) { 8430 super(msg, "JpxError"); 8431 } 8432} 8433class JpxImage { 8434 static #module = null; 8435 static decode(data, decoderOptions) { 8436 decoderOptions ||= {}; 8437 this.#module ||= openjpeg({ 8438 warn: warn 8439 }); 8440 const imageData = this.#module.decode(data, decoderOptions); 8441 if (typeof imageData === "string") { 8442 throw new JpxError(imageData); 8443 } 8444 return imageData; 8445 } 8446 static cleanup() { 8447 this.#module = null; 8448 } 8449 static parseImageProperties(stream) { 8450 let newByte = stream.getByte(); 8451 while (newByte >= 0) { 8452 const oldByte = newByte; 8453 newByte = stream.getByte(); 8454 const code = oldByte << 8 | newByte; 8455 if (code === 0xff51) { 8456 stream.skip(4); 8457 const Xsiz = stream.getInt32() >>> 0; 8458 const Ysiz = stream.getInt32() >>> 0; 8459 const XOsiz = stream.getInt32() >>> 0; 8460 const YOsiz = stream.getInt32() >>> 0; 8461 stream.skip(16); 8462 const Csiz = stream.getUint16(); 8463 return { 8464 width: Xsiz - XOsiz, 8465 height: Ysiz - YOsiz, 8466 bitsPerComponent: 8, 8467 componentsCount: Csiz 8468 }; 8469 } 8470 } 8471 throw new JpxError("No size marker found in JPX stream"); 8472 } 8473} 8474 8475;// ./src/core/jpx_stream.js 8476 8477 8478 8479class JpxStream extends DecodeStream { 8480 constructor(stream, maybeLength, params) { 8481 super(maybeLength); 8482 this.stream = stream; 8483 this.dict = stream.dict; 8484 this.maybeLength = maybeLength; 8485 this.params = params; 8486 } 8487 get bytes() { 8488 return shadow(this, "bytes", this.stream.getBytes(this.maybeLength)); 8489 } 8490 ensureBuffer(requested) {} 8491 readBlock(decoderOptions) { 8492 this.decodeImage(null, decoderOptions); 8493 } 8494 decodeImage(bytes, decoderOptions) { 8495 if (this.eof) { 8496 return this.buffer; 8497 } 8498 bytes ||= this.bytes; 8499 this.buffer = JpxImage.decode(bytes, decoderOptions); 8500 this.bufferLength = this.buffer.length; 8501 this.eof = true; 8502 return this.buffer; 8503 } 8504 get canAsyncDecodeImageFromBuffer() { 8505 return this.stream.isAsync; 8506 } 8507} 8508 8509;// ./src/core/lzw_stream.js 8510 8511class LZWStream extends DecodeStream { 8512 constructor(str, maybeLength, earlyChange) { 8513 super(maybeLength); 8514 this.str = str; 8515 this.dict = str.dict; 8516 this.cachedData = 0; 8517 this.bitsCached = 0; 8518 const maxLzwDictionarySize = 4096; 8519 const lzwState = { 8520 earlyChange, 8521 codeLength: 9, 8522 nextCode: 258, 8523 dictionaryValues: new Uint8Array(maxLzwDictionarySize), 8524 dictionaryLengths: new Uint16Array(maxLzwDictionarySize), 8525 dictionaryPrevCodes: new Uint16Array(maxLzwDictionarySize), 8526 currentSequence: new Uint8Array(maxLzwDictionarySize), 8527 currentSequenceLength: 0 8528 }; 8529 for (let i = 0; i < 256; ++i) { 8530 lzwState.dictionaryValues[i] = i; 8531 lzwState.dictionaryLengths[i] = 1; 8532 } 8533 this.lzwState = lzwState; 8534 } 8535 readBits(n) { 8536 let bitsCached = this.bitsCached; 8537 let cachedData = this.cachedData; 8538 while (bitsCached < n) { 8539 const c = this.str.getByte(); 8540 if (c === -1) { 8541 this.eof = true; 8542 return null; 8543 } 8544 cachedData = cachedData << 8 | c; 8545 bitsCached += 8; 8546 } 8547 this.bitsCached = bitsCached -= n; 8548 this.cachedData = cachedData; 8549 this.lastCode = null; 8550 return cachedData >>>
vendor: 1,122 bytes, lines 8550-8579
8550 bitsCached & (1 << n) - 1; 8551 } 8552 readBlock() { 8553 const blockSize = 512, 8554 decodedSizeDelta = blockSize; 8555 let estimatedDecodedSize = blockSize * 2; 8556 let i, j, q; 8557 const lzwState = this.lzwState; 8558 if (!lzwState) { 8559 return; 8560 } 8561 const earlyChange = lzwState.earlyChange; 8562 let nextCode = lzwState.nextCode; 8563 const dictionaryValues = lzwState.dictionaryValues; 8564 const dictionaryLengths = lzwState.dictionaryLengths; 8565 const dictionaryPrevCodes = lzwState.dictionaryPrevCodes; 8566 let codeLength = lzwState.codeLength; 8567 let prevCode = lzwState.prevCode; 8568 const currentSequence = lzwState.currentSequence; 8569 let currentSequenceLength = lzwState.currentSequenceLength; 8570 let decodedLength = 0; 8571 let currentBufferLength = this.bufferLength; 8572 let buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize); 8573 for (i = 0; i < blockSize; i++) { 8574 const code = this.readBits(codeLength); 8575 const hasPrev = currentSequenceLength > 0; 8576 if (code < 256) { 8577 currentSequence[0] = code; 8578 currentSequenceLength = 1; 8579 } else if (code >= 258) {
vendor: 4,292 bytes, lines 8580-8706
8580 if (code < nextCode) { 8581 currentSequenceLength = dictionaryLengths[code]; 8582 for (j = currentSequenceLength - 1, q = code; j >= 0; j--) { 8583 currentSequence[j] = dictionaryValues[q]; 8584 q = dictionaryPrevCodes[q]; 8585 } 8586 } else { 8587 currentSequence[currentSequenceLength++] = currentSequence[0]; 8588 } 8589 } else if (code === 256) { 8590 codeLength = 9; 8591 nextCode = 258; 8592 currentSequenceLength = 0; 8593 continue; 8594 } else { 8595 this.eof = true; 8596 delete this.lzwState; 8597 break; 8598 } 8599 if (hasPrev) { 8600 dictionaryPrevCodes[nextCode] = prevCode; 8601 dictionaryLengths[nextCode] = dictionaryLengths[prevCode] + 1; 8602 dictionaryValues[nextCode] = currentSequence[0]; 8603 nextCode++; 8604 codeLength = nextCode + earlyChange & nextCode + earlyChange - 1 ? codeLength : Math.min(Math.log(nextCode + earlyChange) / 0.6931471805599453 + 1, 12) | 0; 8605 } 8606 prevCode = code; 8607 decodedLength += currentSequenceLength; 8608 if (estimatedDecodedSize < decodedLength) { 8609 do { 8610 estimatedDecodedSize += decodedSizeDelta; 8611 } while (estimatedDecodedSize < decodedLength); 8612 buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize); 8613 } 8614 for (j = 0; j < currentSequenceLength; j++) { 8615 buffer[currentBufferLength++] = currentSequence[j]; 8616 } 8617 } 8618 lzwState.nextCode = nextCode; 8619 lzwState.codeLength = codeLength; 8620 lzwState.prevCode = prevCode; 8621 lzwState.currentSequenceLength = currentSequenceLength; 8622 this.bufferLength = currentBufferLength; 8623 } 8624} 8625 8626;// ./src/core/predictor_stream.js 8627 8628 8629 8630class PredictorStream extends DecodeStream { 8631 constructor(str, maybeLength, params) { 8632 super(maybeLength); 8633 if (!(params instanceof Dict)) { 8634 return str; 8635 } 8636 const predictor = this.predictor = params.get("Predictor") || 1; 8637 if (predictor <= 1) { 8638 return str; 8639 } 8640 if (predictor !== 2 && (predictor < 10 || predictor > 15)) { 8641 throw new FormatError(`Unsupported predictor: ${predictor}`); 8642 } 8643 this.readBlock = predictor === 2 ? this.readBlockTiff : this.readBlockPng; 8644 this.str = str; 8645 this.dict = str.dict; 8646 const colors = this.colors = params.get("Colors") || 1; 8647 const bits = this.bits = params.get("BPC", "BitsPerComponent") || 8; 8648 const columns = this.columns = params.get("Columns") || 1; 8649 this.pixBytes = colors * bits + 7 >> 3; 8650 this.rowBytes = columns * colors * bits + 7 >> 3; 8651 return this; 8652 } 8653 readBlockTiff() { 8654 const rowBytes = this.rowBytes; 8655 const bufferLength = this.bufferLength; 8656 const buffer = this.ensureBuffer(bufferLength + rowBytes); 8657 const bits = this.bits; 8658 const colors = this.colors; 8659 const rawBytes = this.str.getBytes(rowBytes); 8660 this.eof = !rawBytes.length; 8661 if (this.eof) { 8662 return; 8663 } 8664 let inbuf = 0, 8665 outbuf = 0; 8666 let inbits = 0, 8667 outbits = 0; 8668 let pos = bufferLength; 8669 let i; 8670 if (bits === 1 && colors === 1) { 8671 for (i = 0; i < rowBytes; ++i) { 8672 let c = rawBytes[i] ^ inbuf; 8673 c ^= c >> 1; 8674 c ^= c >> 2; 8675 c ^= c >> 4; 8676 inbuf = (c & 1) << 7; 8677 buffer[pos++] = c; 8678 } 8679 } else if (bits === 8) { 8680 for (i = 0; i < colors; ++i) { 8681 buffer[pos++] = rawBytes[i]; 8682 } 8683 for (; i < rowBytes; ++i) { 8684 buffer[pos] = buffer[pos - colors] + rawBytes[i]; 8685 pos++; 8686 } 8687 } else if (bits === 16) { 8688 const bytesPerPixel = colors * 2; 8689 for (i = 0; i < bytesPerPixel; ++i) { 8690 buffer[pos++] = rawBytes[i]; 8691 } 8692 for (; i < rowBytes; i += 2) { 8693 const sum = ((rawBytes[i] & 0xff) << 8) + (rawBytes[i + 1] & 0xff) + ((buffer[pos - bytesPerPixel] & 0xff) << 8) + (buffer[pos - bytesPerPixel + 1] & 0xff); 8694 buffer[pos++] = sum >> 8 & 0xff; 8695 buffer[pos++] = sum & 0xff; 8696 } 8697 } else { 8698 const compArray = new Uint8Array(colors + 1); 8699 const bitMask = (1 << bits) - 1; 8700 let j = 0, 8701 k = bufferLength; 8702 const columns = this.columns; 8703 for (i = 0; i < columns; ++i) { 8704 for (let kk = 0; kk < colors; ++kk) { 8705 if (inbits < bits) { 8706 inbuf = inbuf << 8 | rawBytes[j++] & 0xff;
vendor: 3,902 bytes, lines 8707-8850
8707 inbits += 8; 8708 } 8709 compArray[kk] = compArray[kk] + (inbuf >> inbits - bits) & bitMask; 8710 inbits -= bits; 8711 outbuf = outbuf << bits | compArray[kk]; 8712 outbits += bits; 8713 if (outbits >= 8) { 8714 buffer[k++] = outbuf >> outbits - 8 & 0xff; 8715 outbits -= 8; 8716 } 8717 } 8718 } 8719 if (outbits > 0) { 8720 buffer[k++] = (outbuf << 8 - outbits) + (inbuf & (1 << 8 - outbits) - 1); 8721 } 8722 } 8723 this.bufferLength += rowBytes; 8724 } 8725 readBlockPng() { 8726 const rowBytes = this.rowBytes; 8727 const pixBytes = this.pixBytes; 8728 const predictor = this.str.getByte(); 8729 const rawBytes = this.str.getBytes(rowBytes); 8730 this.eof = !rawBytes.length; 8731 if (this.eof) { 8732 return; 8733 } 8734 const bufferLength = this.bufferLength; 8735 const buffer = this.ensureBuffer(bufferLength + rowBytes); 8736 let prevRow = buffer.subarray(bufferLength - rowBytes, bufferLength); 8737 if (prevRow.length === 0) { 8738 prevRow = new Uint8Array(rowBytes); 8739 } 8740 let i, 8741 j = bufferLength, 8742 up, 8743 c; 8744 switch (predictor) { 8745 case 0: 8746 for (i = 0; i < rowBytes; ++i) { 8747 buffer[j++] = rawBytes[i]; 8748 } 8749 break; 8750 case 1: 8751 for (i = 0; i < pixBytes; ++i) { 8752 buffer[j++] = rawBytes[i]; 8753 } 8754 for (; i < rowBytes; ++i) { 8755 buffer[j] = buffer[j - pixBytes] + rawBytes[i] & 0xff; 8756 j++; 8757 } 8758 break; 8759 case 2: 8760 for (i = 0; i < rowBytes; ++i) { 8761 buffer[j++] = prevRow[i] + rawBytes[i] & 0xff; 8762 } 8763 break; 8764 case 3: 8765 for (i = 0; i < pixBytes; ++i) { 8766 buffer[j++] = (prevRow[i] >> 1) + rawBytes[i]; 8767 } 8768 for (; i < rowBytes; ++i) { 8769 buffer[j] = (prevRow[i] + buffer[j - pixBytes] >> 1) + rawBytes[i] & 0xff; 8770 j++; 8771 } 8772 break; 8773 case 4: 8774 for (i = 0; i < pixBytes; ++i) { 8775 up = prevRow[i]; 8776 c = rawBytes[i]; 8777 buffer[j++] = up + c; 8778 } 8779 for (; i < rowBytes; ++i) { 8780 up = prevRow[i]; 8781 const upLeft = prevRow[i - pixBytes]; 8782 const left = buffer[j - pixBytes]; 8783 const p = left + up - upLeft; 8784 let pa = p - left; 8785 if (pa < 0) { 8786 pa = -pa; 8787 } 8788 let pb = p - up; 8789 if (pb < 0) { 8790 pb = -pb; 8791 } 8792 let pc = p - upLeft; 8793 if (pc < 0) { 8794 pc = -pc; 8795 } 8796 c = rawBytes[i]; 8797 if (pa <= pb && pa <= pc) { 8798 buffer[j++] = left + c; 8799 } else if (pb <= pc) { 8800 buffer[j++] = up + c; 8801 } else { 8802 buffer[j++] = upLeft + c; 8803 } 8804 } 8805 break; 8806 default: 8807 throw new FormatError(`Unsupported predictor: ${predictor}`); 8808 } 8809 this.bufferLength += rowBytes; 8810 } 8811} 8812 8813;// ./src/core/run_length_stream.js 8814 8815class RunLengthStream extends DecodeStream { 8816 constructor(str, maybeLength) { 8817 super(maybeLength); 8818 this.str = str; 8819 this.dict = str.dict; 8820 } 8821 readBlock() { 8822 const repeatHeader = this.str.getBytes(2); 8823 if (!repeatHeader || repeatHeader.length < 2 || repeatHeader[0] === 128) { 8824 this.eof = true; 8825 return; 8826 } 8827 let buffer; 8828 let bufferLength = this.bufferLength; 8829 let n = repeatHeader[0]; 8830 if (n < 128) { 8831 buffer = this.ensureBuffer(bufferLength + n + 1); 8832 buffer[bufferLength++] = repeatHeader[1]; 8833 if (n > 0) { 8834 const source = this.str.getBytes(n); 8835 buffer.set(source, bufferLength); 8836 bufferLength += n; 8837 } 8838 } else { 8839 n = 257 - n; 8840 const b = repeatHeader[1]; 8841 buffer = this.ensureBuffer(bufferLength + n + 1); 8842 for (let i = 0; i < n; i++) { 8843 buffer[bufferLength++] = b; 8844 } 8845 } 8846 this.bufferLength = bufferLength; 8847 } 8848} 8849 8850;// ./src/core/parser.js
vendor: 4,460 bytes, lines 8850-9029
8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865const MAX_LENGTH_TO_CACHE = 1000; 8866function getInlineImageCacheKey(bytes) { 8867 const strBuf = [], 8868 ii = bytes.length; 8869 let i = 0; 8870 while (i < ii - 1) { 8871 strBuf.push(bytes[i++] << 8 | bytes[i++]); 8872 } 8873 if (i < ii) { 8874 strBuf.push(bytes[i]); 8875 } 8876 return ii + "_" + String.fromCharCode.apply(null, strBuf); 8877} 8878class Parser { 8879 constructor({ 8880 lexer, 8881 xref, 8882 allowStreams = false, 8883 recoveryMode = false 8884 }) { 8885 this.lexer = lexer; 8886 this.xref = xref; 8887 this.allowStreams = allowStreams; 8888 this.recoveryMode = recoveryMode; 8889 this.imageCache = Object.create(null); 8890 this._imageId = 0; 8891 this.refill(); 8892 } 8893 refill() { 8894 this.buf1 = this.lexer.getObj(); 8895 this.buf2 = this.lexer.getObj(); 8896 } 8897 shift() { 8898 if (this.buf2 instanceof Cmd && this.buf2.cmd === "ID") { 8899 this.buf1 = this.buf2; 8900 this.buf2 = null; 8901 } else { 8902 this.buf1 = this.buf2; 8903 this.buf2 = this.lexer.getObj(); 8904 } 8905 } 8906 tryShift() { 8907 try { 8908 this.shift(); 8909 return true; 8910 } catch (e) { 8911 if (e instanceof MissingDataException) { 8912 throw e; 8913 } 8914 return false; 8915 } 8916 } 8917 getObj(cipherTransform = null) { 8918 const buf1 = this.buf1; 8919 this.shift(); 8920 if (buf1 instanceof Cmd) { 8921 switch (buf1.cmd) { 8922 case "BI": 8923 return this.makeInlineImage(cipherTransform); 8924 case "[": 8925 const array = []; 8926 while (!isCmd(this.buf1, "]") && this.buf1 !== EOF) { 8927 array.push(this.getObj(cipherTransform)); 8928 } 8929 if (this.buf1 === EOF) { 8930 if (this.recoveryMode) { 8931 return array; 8932 } 8933 throw new ParserEOFException("End of file inside array."); 8934 } 8935 this.shift(); 8936 return array; 8937 case "<<": 8938 const dict = new Dict(this.xref); 8939 while (!isCmd(this.buf1, ">>") && this.buf1 !== EOF) { 8940 if (!(this.buf1 instanceof Name)) { 8941 info("Malformed dictionary: key must be a name object"); 8942 this.shift(); 8943 continue; 8944 } 8945 const key = this.buf1.name; 8946 this.shift(); 8947 if (this.buf1 === EOF) { 8948 break; 8949 } 8950 dict.set(key, this.getObj(cipherTransform)); 8951 } 8952 if (this.buf1 === EOF) { 8953 if (this.recoveryMode) { 8954 return dict; 8955 } 8956 throw new ParserEOFException("End of file inside dictionary."); 8957 } 8958 if (isCmd(this.buf2, "stream")) { 8959 return this.allowStreams ? this.makeStream(dict, cipherTransform) : dict; 8960 } 8961 this.shift(); 8962 return dict; 8963 default: 8964 return buf1; 8965 } 8966 } 8967 if (Number.isInteger(buf1)) { 8968 if (Number.isInteger(this.buf1) && isCmd(this.buf2, "R")) { 8969 const ref = Ref.get(buf1, this.buf1); 8970 this.shift(); 8971 this.shift(); 8972 return ref; 8973 } 8974 return buf1; 8975 } 8976 if (typeof buf1 === "string") { 8977 if (cipherTransform) { 8978 return cipherTransform.decryptString(buf1); 8979 } 8980 return buf1; 8981 } 8982 return buf1; 8983 } 8984 findDefaultInlineStreamEnd(stream) { 8985 const E = 0x45, 8986 I = 0x49, 8987 SPACE = 0x20, 8988 LF = 0xa, 8989 CR = 0xd, 8990 NUL = 0x0; 8991 const { 8992 knownCommands 8993 } = this.lexer, 8994 startPos = stream.pos, 8995 n = 15; 8996 let state = 0, 8997 ch, 8998 maybeEIPos; 8999 while ((ch = stream.getByte()) !== -1) { 9000 if (state === 0) { 9001 state = ch === E ? 1 : 0; 9002 } else if (state === 1) { 9003 state = ch === I ? 2 : 0; 9004 } else { 9005 if (ch === SPACE || ch === LF || ch === CR) { 9006 maybeEIPos = stream.pos; 9007 const followingBytes = stream.peekBytes(n); 9008 const ii = followingBytes.length; 9009 if (ii === 0) { 9010 break; 9011 } 9012 for (let i = 0; i < ii; i++) { 9013 ch = followingBytes[i]; 9014 if (ch === NUL && followingBytes[i + 1] !== NUL) { 9015 continue; 9016 } 9017 if (ch !== LF && ch !== CR && (ch < SPACE || ch > 0x7f)) { 9018 state = 0; 9019 break; 9020 } 9021 } 9022 if (state !== 2) { 9023 continue; 9024 } 9025 if (!knownCommands) { 9026 warn("findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined."); 9027 continue; 9028 } 9029 const tmpLexer = new Lexer(new Stream(
9029followingBytes.slice(
vendor: 25,049 bytes, lines 9029-9885
9029)), knownCommands); 9030 tmpLexer._hexStringWarn = () => {}; 9031 let numArgs = 0; 9032 while (true) { 9033 const nextObj = tmpLexer.getObj(); 9034 if (nextObj === EOF) { 9035 state = 0; 9036 break; 9037 } 9038 if (nextObj instanceof Cmd) { 9039 const knownCommand = knownCommands[nextObj.cmd]; 9040 if (!knownCommand) { 9041 state = 0; 9042 break; 9043 } else if (knownCommand.variableArgs ? numArgs <= knownCommand.numArgs : numArgs === knownCommand.numArgs) { 9044 break; 9045 } 9046 numArgs = 0; 9047 continue; 9048 } 9049 numArgs++; 9050 } 9051 if (state === 2) { 9052 break; 9053 } 9054 } else { 9055 state = 0; 9056 } 9057 } 9058 } 9059 if (ch === -1) { 9060 warn("findDefaultInlineStreamEnd: " + "Reached the end of the stream without finding a valid EI marker"); 9061 if (maybeEIPos) { 9062 warn('... trying to recover by using the last "EI" occurrence.'); 9063 stream.skip(-(stream.pos - maybeEIPos)); 9064 } 9065 } 9066 let endOffset = 4; 9067 stream.skip(-endOffset); 9068 ch = stream.peekByte(); 9069 stream.skip(endOffset); 9070 if (!isWhiteSpace(ch)) { 9071 endOffset--; 9072 } 9073 return stream.pos - endOffset - startPos; 9074 } 9075 findDCTDecodeInlineStreamEnd(stream) { 9076 const startPos = stream.pos; 9077 let foundEOI = false, 9078 b, 9079 markerLength; 9080 while ((b = stream.getByte()) !== -1) { 9081 if (b !== 0xff) { 9082 continue; 9083 } 9084 switch (stream.getByte()) { 9085 case 0x00: 9086 break; 9087 case 0xff: 9088 stream.skip(-1); 9089 break; 9090 case 0xd9: 9091 foundEOI = true; 9092 break; 9093 case 0xc0: 9094 case 0xc1: 9095 case 0xc2: 9096 case 0xc3: 9097 case 0xc5: 9098 case 0xc6: 9099 case 0xc7: 9100 case 0xc9: 9101 case 0xca: 9102 case 0xcb: 9103 case 0xcd: 9104 case 0xce: 9105 case 0xcf: 9106 case 0xc4: 9107 case 0xcc: 9108 case 0xda: 9109 case 0xdb: 9110 case 0xdc: 9111 case 0xdd: 9112 case 0xde: 9113 case 0xdf: 9114 case 0xe0: 9115 case 0xe1: 9116 case 0xe2: 9117 case 0xe3: 9118 case 0xe4: 9119 case 0xe5: 9120 case 0xe6: 9121 case 0xe7: 9122 case 0xe8: 9123 case 0xe9: 9124 case 0xea: 9125 case 0xeb: 9126 case 0xec: 9127 case 0xed: 9128 case 0xee: 9129 case 0xef: 9130 case 0xfe: 9131 markerLength = stream.getUint16(); 9132 if (markerLength > 2) { 9133 stream.skip(markerLength - 2); 9134 } else { 9135 stream.skip(-2); 9136 } 9137 break; 9138 } 9139 if (foundEOI) { 9140 break; 9141 } 9142 } 9143 const length = stream.pos - startPos; 9144 if (b === -1) { 9145 warn("Inline DCTDecode image stream: " + "EOI marker not found, searching for /EI/ instead."); 9146 stream.skip(-length); 9147 return this.findDefaultInlineStreamEnd(stream); 9148 } 9149 this.inlineStreamSkipEI(stream); 9150 return length; 9151 } 9152 findASCII85DecodeInlineStreamEnd(stream) { 9153 const TILDE = 0x7e, 9154 GT = 0x3e; 9155 const startPos = stream.pos; 9156 let ch; 9157 while ((ch = stream.getByte()) !== -1) { 9158 if (ch === TILDE) { 9159 const tildePos = stream.pos; 9160 ch = stream.peekByte(); 9161 while (isWhiteSpace(ch)) { 9162 stream.skip(); 9163 ch = stream.peekByte(); 9164 } 9165 if (ch === GT) { 9166 stream.skip(); 9167 break; 9168 } 9169 if (stream.pos > tildePos) { 9170 const maybeEI = stream.peekBytes(2); 9171 if (maybeEI[0] === 0x45 && maybeEI[1] === 0x49) { 9172 break; 9173 } 9174 } 9175 } 9176 } 9177 const length = stream.pos - startPos; 9178 if (ch === -1) { 9179 warn("Inline ASCII85Decode image stream: " + "EOD marker not found, searching for /EI/ instead."); 9180 stream.skip(-length); 9181 return this.findDefaultInlineStreamEnd(stream); 9182 } 9183 this.inlineStreamSkipEI(stream); 9184 return length; 9185 } 9186 findASCIIHexDecodeInlineStreamEnd(stream) { 9187 const GT = 0x3e; 9188 const startPos = stream.pos; 9189 let ch; 9190 while ((ch = stream.getByte()) !== -1) { 9191 if (ch === GT) { 9192 break; 9193 } 9194 } 9195 const length = stream.pos - startPos; 9196 if (ch === -1) { 9197 warn("Inline ASCIIHexDecode image stream: " + "EOD marker not found, searching for /EI/ instead."); 9198 stream.skip(-length); 9199 return this.findDefaultInlineStreamEnd(stream); 9200 } 9201 this.inlineStreamSkipEI(stream); 9202 return length; 9203 } 9204 inlineStreamSkipEI(stream) { 9205 const E = 0x45, 9206 I = 0x49; 9207 let state = 0, 9208 ch; 9209 while ((ch = stream.getByte()) !== -1) { 9210 if (state === 0) { 9211 state = ch === E ? 1 : 0; 9212 } else if (state === 1) { 9213 state = ch === I ? 2 : 0; 9214 } else if (state === 2) { 9215 break; 9216 } 9217 } 9218 } 9219 makeInlineImage(cipherTransform) { 9220 const lexer = this.lexer; 9221 const stream = lexer.stream; 9222 const dictMap = Object.create(null); 9223 let dictLength; 9224 while (!isCmd(this.buf1, "ID") && this.buf1 !== EOF) { 9225 if (!(this.buf1 instanceof Name)) { 9226 throw new FormatError("Dictionary key must be a name object"); 9227 } 9228 const key = this.buf1.name; 9229 this.shift(); 9230 if (this.buf1 === EOF) { 9231 break; 9232 } 9233 dictMap[key] = this.getObj(cipherTransform); 9234 } 9235 if (lexer.beginInlineImagePos !== -1) { 9236 dictLength = stream.pos - lexer.beginInlineImagePos; 9237 } 9238 const filter = this.xref.fetchIfRef(dictMap.F || dictMap.Filter); 9239 let filterName; 9240 if (filter instanceof Name) { 9241 filterName = filter.name; 9242 } else if (Array.isArray(filter)) { 9243 const filterZero = this.xref.fetchIfRef(filter[0]); 9244 if (filterZero instanceof Name) { 9245 filterName = filterZero.name; 9246 } 9247 } 9248 const startPos = stream.pos; 9249 let length; 9250 switch (filterName) { 9251 case "DCT": 9252 case "DCTDecode": 9253 length = this.findDCTDecodeInlineStreamEnd(stream); 9254 break; 9255 case "A85": 9256 case "ASCII85Decode": 9257 length = this.findASCII85DecodeInlineStreamEnd(stream); 9258 break; 9259 case "AHx": 9260 case "ASCIIHexDecode": 9261 length = this.findASCIIHexDecodeInlineStreamEnd(stream); 9262 break; 9263 default: 9264 length = this.findDefaultInlineStreamEnd(stream); 9265 } 9266 let cacheKey; 9267 if (length < MAX_LENGTH_TO_CACHE && dictLength > 0) { 9268 const initialStreamPos = stream.pos; 9269 stream.pos = lexer.beginInlineImagePos; 9270 cacheKey = getInlineImageCacheKey(stream.getBytes(dictLength + length)); 9271 stream.pos = initialStreamPos; 9272 const cacheEntry = this.imageCache[cacheKey]; 9273 if (cacheEntry !== undefined) { 9274 this.buf2 = Cmd.get("EI"); 9275 this.shift(); 9276 cacheEntry.reset(); 9277 return cacheEntry; 9278 } 9279 } 9280 const dict = new Dict(this.xref); 9281 for (const key in dictMap) { 9282 dict.set(key, dictMap[key]); 9283 } 9284 let imageStream = stream.makeSubStream(startPos, length, dict); 9285 if (cipherTransform) { 9286 imageStream = cipherTransform.createStream(imageStream, length); 9287 } 9288 imageStream = this.filter(imageStream, dict, length); 9289 imageStream.dict = dict; 9290 if (cacheKey !== undefined) { 9291 imageStream.cacheKey = `inline_img_${++this._imageId}`; 9292 this.imageCache[cacheKey] = imageStream; 9293 } 9294 this.buf2 = Cmd.get("EI"); 9295 this.shift(); 9296 return imageStream; 9297 } 9298 #findStreamLength(startPos) { 9299 const { 9300 stream 9301 } = this.lexer; 9302 stream.pos = startPos; 9303 const SCAN_BLOCK_LENGTH = 2048; 9304 const signatureLength = "endstream".length; 9305 const END_SIGNATURE = new Uint8Array([0x65, 0x6e, 0x64]); 9306 const endLength = END_SIGNATURE.length; 9307 const PARTIAL_SIGNATURE = [new Uint8Array([0x73, 0x74, 0x72, 0x65, 0x61, 0x6d]), new Uint8Array([0x73, 0x74, 0x65, 0x61, 0x6d]), new Uint8Array([0x73, 0x74, 0x72, 0x65, 0x61])]; 9308 const normalLength = signatureLength - endLength; 9309 while (stream.pos < stream.end) { 9310 const scanBytes = stream.peekBytes(SCAN_BLOCK_LENGTH); 9311 const scanLength = scanBytes.length - signatureLength; 9312 if (scanLength <= 0) { 9313 break; 9314 } 9315 let pos = 0; 9316 while (pos < scanLength) { 9317 let j = 0; 9318 while (j < endLength && scanBytes[pos + j] === END_SIGNATURE[j]) { 9319 j++; 9320 } 9321 if (j >= endLength) { 9322 let found = false; 9323 for (const part of PARTIAL_SIGNATURE) { 9324 const partLen = part.length; 9325 let k = 0; 9326 while (k < partLen && scanBytes[pos + j + k] === part[k]) { 9327 k++; 9328 } 9329 if (k >= normalLength) { 9330 found = true; 9331 break; 9332 } 9333 if (k >= partLen) { 9334 const lastByte = scanBytes[pos + j + k]; 9335 if (isWhiteSpace(lastByte)) { 9336 info(`Found "${bytesToString([...END_SIGNATURE, ...part])}" when ` + "searching for endstream command."); 9337 found = true; 9338 } 9339 break; 9340 } 9341 } 9342 if (found) { 9343 stream.pos += pos; 9344 return stream.pos - startPos; 9345 } 9346 } 9347 pos++; 9348 } 9349 stream.pos += scanLength; 9350 } 9351 return -1; 9352 } 9353 makeStream(dict, cipherTransform) { 9354 const lexer = this.lexer; 9355 let stream = lexer.stream; 9356 lexer.skipToNextLine(); 9357 const startPos = stream.pos - 1; 9358 let length = dict.get("Length"); 9359 if (!Number.isInteger(length)) { 9360 info(`Bad length "${length && length.toString()}" in stream.`); 9361 length = 0; 9362 } 9363 stream.pos = startPos + length; 9364 lexer.nextChar(); 9365 if (this.tryShift() && isCmd(this.buf2, "endstream")) { 9366 this.shift(); 9367 } else { 9368 length = this.#findStreamLength(startPos); 9369 if (length < 0) { 9370 throw new FormatError("Missing endstream command."); 9371 } 9372 lexer.nextChar(); 9373 this.shift(); 9374 this.shift(); 9375 } 9376 this.shift(); 9377 stream = stream.makeSubStream(startPos, length, dict); 9378 if (cipherTransform) { 9379 stream = cipherTransform.createStream(stream, length); 9380 } 9381 stream = this.filter(stream, dict, length); 9382 stream.dict = dict; 9383 return stream; 9384 } 9385 filter(stream, dict, length) { 9386 let filter = dict.get("F", "Filter"); 9387 let params = dict.get("DP", "DecodeParms"); 9388 if (filter instanceof Name) { 9389 if (Array.isArray(params)) { 9390 warn("/DecodeParms should not be an Array, when /Filter is a Name."); 9391 } 9392 return this.makeFilter(stream, filter.name, length, params); 9393 } 9394 let maybeLength = length; 9395 if (Array.isArray(filter)) { 9396 const filterArray = filter; 9397 const paramsArray = params; 9398 for (let i = 0, ii = filterArray.length; i < ii; ++i) { 9399 filter = this.xref.fetchIfRef(filterArray[i]); 9400 if (!(filter instanceof Name)) { 9401 throw new FormatError(`Bad filter name "${filter}"`); 9402 } 9403 params = null; 9404 if (Array.isArray(paramsArray) && i in paramsArray) { 9405 params = this.xref.fetchIfRef(paramsArray[i]); 9406 } 9407 stream = this.makeFilter(stream, filter.name, maybeLength, params); 9408 maybeLength = null; 9409 } 9410 } 9411 return stream; 9412 } 9413 makeFilter(stream, name, maybeLength, params) { 9414 if (maybeLength === 0) { 9415 warn(`Empty "${name}" stream.`); 9416 return new NullStream(); 9417 } 9418 try { 9419 switch (name) { 9420 case "Fl": 9421 case "FlateDecode": 9422 if (params) { 9423 return new PredictorStream(new FlateStream(stream, maybeLength), maybeLength, params); 9424 } 9425 return new FlateStream(stream, maybeLength); 9426 case "LZW": 9427 case "LZWDecode": 9428 let earlyChange = 1; 9429 if (params) { 9430 if (params.has("EarlyChange")) { 9431 earlyChange = params.get("EarlyChange"); 9432 } 9433 return new PredictorStream(new LZWStream(stream, maybeLength, earlyChange), maybeLength, params); 9434 } 9435 return new LZWStream(stream, maybeLength, earlyChange); 9436 case "DCT": 9437 case "DCTDecode": 9438 return new JpegStream(stream, maybeLength, params); 9439 case "JPX": 9440 case "JPXDecode": 9441 return new JpxStream(stream, maybeLength, params); 9442 case "A85": 9443 case "ASCII85Decode": 9444 return new Ascii85Stream(stream, maybeLength); 9445 case "AHx": 9446 case "ASCIIHexDecode": 9447 return new AsciiHexStream(stream, maybeLength); 9448 case "CCF": 9449 case "CCITTFaxDecode": 9450 return new CCITTFaxStream(stream, maybeLength, params); 9451 case "RL": 9452 case "RunLengthDecode": 9453 return new RunLengthStream(stream, maybeLength); 9454 case "JBIG2Decode": 9455 return new Jbig2Stream(stream, maybeLength, params); 9456 } 9457 warn(`Filter "${name}" is not supported.`); 9458 return stream; 9459 } catch (ex) { 9460 if (ex instanceof MissingDataException) { 9461 throw ex; 9462 } 9463 warn(`Invalid stream: "${ex}"`); 9464 return new NullStream(); 9465 } 9466 } 9467} 9468const specialChars = [1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; 9469function toHexDigit(ch) { 9470 if (ch >= 0x30 && ch <= 0x39) { 9471 return ch & 0x0f; 9472 } 9473 if (ch >= 0x41 && ch <= 0x46 || ch >= 0x61 && ch <= 0x66) { 9474 return (ch & 0x0f) + 9; 9475 } 9476 return -1; 9477} 9478class Lexer { 9479 constructor(stream, knownCommands = null) { 9480 this.stream = stream; 9481 this.nextChar(); 9482 this.strBuf = []; 9483 this.knownCommands = knownCommands; 9484 this._hexStringNumWarn = 0; 9485 this.beginInlineImagePos = -1; 9486 } 9487 nextChar() { 9488 return this.currentChar = this.stream.getByte(); 9489 } 9490 peekChar() { 9491 return this.stream.peekByte(); 9492 } 9493 getNumber() { 9494 let ch = this.currentChar; 9495 let eNotation = false; 9496 let divideBy = 0; 9497 let sign = 1; 9498 if (ch === 0x2d) { 9499 sign = -1; 9500 ch = this.nextChar(); 9501 if (ch === 0x2d) { 9502 ch = this.nextChar(); 9503 } 9504 } else if (ch === 0x2b) { 9505 ch = this.nextChar(); 9506 } 9507 if (ch === 0x0a || ch === 0x0d) { 9508 do { 9509 ch = this.nextChar(); 9510 } while (ch === 0x0a || ch === 0x0d); 9511 } 9512 if (ch === 0x2e) { 9513 divideBy = 10; 9514 ch = this.nextChar(); 9515 } 9516 if (ch < 0x30 || ch > 0x39) { 9517 const msg = `Invalid number: ${String.fromCharCode(ch)} (charCode ${ch})`; 9518 if (isWhiteSpace(ch) || ch === -1) { 9519 info(`Lexer.getNumber - "${msg}".`); 9520 return 0; 9521 } 9522 throw new FormatError(msg); 9523 } 9524 let baseValue = ch - 0x30; 9525 let powerValue = 0; 9526 let powerValueSign = 1; 9527 while ((ch = this.nextChar()) >= 0) { 9528 if (ch >= 0x30 && ch <= 0x39) { 9529 const currentDigit = ch - 0x30; 9530 if (eNotation) { 9531 powerValue = powerValue * 10 + currentDigit; 9532 } else { 9533 if (divideBy !== 0) { 9534 divideBy *= 10; 9535 } 9536 baseValue = baseValue * 10 + currentDigit; 9537 } 9538 } else if (ch === 0x2e) { 9539 if (divideBy === 0) { 9540 divideBy = 1; 9541 } else { 9542 break; 9543 } 9544 } else if (ch === 0x2d) { 9545 warn("Badly formatted number: minus sign in the middle"); 9546 } else if (ch === 0x45 || ch === 0x65) { 9547 ch = this.peekChar(); 9548 if (ch === 0x2b || ch === 0x2d) { 9549 powerValueSign = ch === 0x2d ? -1 : 1; 9550 this.nextChar(); 9551 } else if (ch < 0x30 || ch > 0x39) { 9552 break; 9553 } 9554 eNotation = true; 9555 } else { 9556 break; 9557 } 9558 } 9559 if (divideBy !== 0) { 9560 baseValue /= divideBy; 9561 } 9562 if (eNotation) { 9563 baseValue *= 10 ** (powerValueSign * powerValue); 9564 } 9565 return sign * baseValue; 9566 } 9567 getString() { 9568 let numParen = 1; 9569 let done = false; 9570 const strBuf = this.strBuf; 9571 strBuf.length = 0; 9572 let ch = this.nextChar(); 9573 while (true) { 9574 let charBuffered = false; 9575 switch (ch | 0) { 9576 case -1: 9577 warn("Unterminated string"); 9578 done = true; 9579 break; 9580 case 0x28: 9581 ++numParen; 9582 strBuf.push("("); 9583 break; 9584 case 0x29: 9585 if (--numParen === 0) { 9586 this.nextChar(); 9587 done = true; 9588 } else { 9589 strBuf.push(")"); 9590 } 9591 break; 9592 case 0x5c: 9593 ch = this.nextChar(); 9594 switch (ch) { 9595 case -1: 9596 warn("Unterminated string"); 9597 done = true; 9598 break; 9599 case 0x6e: 9600 strBuf.push("\n"); 9601 break; 9602 case 0x72: 9603 strBuf.push("\r"); 9604 break; 9605 case 0x74: 9606 strBuf.push("\t"); 9607 break; 9608 case 0x62: 9609 strBuf.push("\b"); 9610 break; 9611 case 0x66: 9612 strBuf.push("\f"); 9613 break; 9614 case 0x5c: 9615 case 0x28: 9616 case 0x29: 9617 strBuf.push(String.fromCharCode(ch)); 9618 break; 9619 case 0x30: 9620 case 0x31: 9621 case 0x32: 9622 case 0x33: 9623 case 0x34: 9624 case 0x35: 9625 case 0x36: 9626 case 0x37: 9627 let x = ch & 0x0f; 9628 ch = this.nextChar(); 9629 charBuffered = true; 9630 if (ch >= 0x30 && ch <= 0x37) { 9631 x = (x << 3) + (ch & 0x0f); 9632 ch = this.nextChar(); 9633 if (ch >= 0x30 && ch <= 0x37) { 9634 charBuffered = false; 9635 x = (x << 3) + (ch & 0x0f); 9636 } 9637 } 9638 strBuf.push(String.fromCharCode(x)); 9639 break; 9640 case 0x0d: 9641 if (this.peekChar() === 0x0a) { 9642 this.nextChar(); 9643 } 9644 break; 9645 case 0x0a: 9646 break; 9647 default: 9648 strBuf.push(String.fromCharCode(ch)); 9649 break; 9650 } 9651 break; 9652 default: 9653 strBuf.push(String.fromCharCode(ch)); 9654 break; 9655 } 9656 if (done) { 9657 break; 9658 } 9659 if (!charBuffered) { 9660 ch = this.nextChar(); 9661 } 9662 } 9663 return strBuf.join(""); 9664 } 9665 getName() { 9666 let ch, previousCh; 9667 const strBuf = this.strBuf; 9668 strBuf.length = 0; 9669 while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) { 9670 if (ch === 0x23) { 9671 ch = this.nextChar(); 9672 if (specialChars[ch]) { 9673 warn("Lexer_getName: " + "NUMBER SIGN (#) should be followed by a hexadecimal number."); 9674 strBuf.push("#"); 9675 break; 9676 } 9677 const x = toHexDigit(ch); 9678 if (x !== -1) { 9679 previousCh = ch; 9680 ch = this.nextChar(); 9681 const x2 = toHexDigit(ch); 9682 if (x2 === -1) { 9683 warn(`Lexer_getName: Illegal digit (${String.fromCharCode(ch)}) ` + "in hexadecimal number."); 9684 strBuf.push("#", String.fromCharCode(previousCh)); 9685 if (specialChars[ch]) { 9686 break; 9687 } 9688 strBuf.push(String.fromCharCode(ch)); 9689 continue; 9690 } 9691 strBuf.push(String.fromCharCode(x << 4 | x2)); 9692 } else { 9693 strBuf.push("#", String.fromCharCode(ch)); 9694 } 9695 } else { 9696 strBuf.push(String.fromCharCode(ch)); 9697 } 9698 } 9699 if (strBuf.length > 127) { 9700 warn(`Name token is longer than allowed by the spec: ${strBuf.length}`); 9701 } 9702 return Name.get(strBuf.join("")); 9703 } 9704 _hexStringWarn(ch) { 9705 const MAX_HEX_STRING_NUM_WARN = 5; 9706 if (this._hexStringNumWarn++ === MAX_HEX_STRING_NUM_WARN) { 9707 warn("getHexString - ignoring additional invalid characters."); 9708 return; 9709 } 9710 if (this._hexStringNumWarn > MAX_HEX_STRING_NUM_WARN) { 9711 return; 9712 } 9713 warn(`getHexString - ignoring invalid character: ${ch}`); 9714 } 9715 getHexString() { 9716 const strBuf = this.strBuf; 9717 strBuf.length = 0; 9718 let ch = this.currentChar; 9719 let firstDigit = -1, 9720 digit = -1; 9721 this._hexStringNumWarn = 0; 9722 while (true) { 9723 if (ch < 0) { 9724 warn("Unterminated hex string"); 9725 break; 9726 } else if (ch === 0x3e) { 9727 this.nextChar(); 9728 break; 9729 } else if (specialChars[ch] === 1) { 9730 ch = this.nextChar(); 9731 continue; 9732 } else { 9733 digit = toHexDigit(ch); 9734 if (digit === -1) { 9735 this._hexStringWarn(ch); 9736 } else if (firstDigit === -1) { 9737 firstDigit = digit; 9738 } else { 9739 strBuf.push(String.fromCharCode(firstDigit << 4 | digit)); 9740 firstDigit = -1; 9741 } 9742 ch = this.nextChar(); 9743 } 9744 } 9745 if (firstDigit !== -1) { 9746 strBuf.push(String.fromCharCode(firstDigit << 4)); 9747 } 9748 return strBuf.join(""); 9749 } 9750 getObj() { 9751 let comment = false; 9752 let ch = this.currentChar; 9753 while (true) { 9754 if (ch < 0) { 9755 return EOF; 9756 } 9757 if (comment) { 9758 if (ch === 0x0a || ch === 0x0d) { 9759 comment = false; 9760 } 9761 } else if (ch === 0x25) { 9762 comment = true; 9763 } else if (specialChars[ch] !== 1) { 9764 break; 9765 } 9766 ch = this.nextChar(); 9767 } 9768 switch (ch | 0) { 9769 case 0x30: 9770 case 0x31: 9771 case 0x32: 9772 case 0x33: 9773 case 0x34: 9774 case 0x35: 9775 case 0x36: 9776 case 0x37: 9777 case 0x38: 9778 case 0x39: 9779 case 0x2b: 9780 case 0x2d: 9781 case 0x2e: 9782 return this.getNumber(); 9783 case 0x28: 9784 return this.getString(); 9785 case 0x2f: 9786 return this.getName(); 9787 case 0x5b: 9788 this.nextChar(); 9789 return Cmd.get("["); 9790 case 0x5d: 9791 this.nextChar(); 9792 return Cmd.get("]"); 9793 case 0x3c: 9794 ch = this.nextChar(); 9795 if (ch === 0x3c) { 9796 this.nextChar(); 9797 return Cmd.get("<<"); 9798 } 9799 return this.getHexString(); 9800 case 0x3e: 9801 ch = this.nextChar(); 9802 if (ch === 0x3e) { 9803 this.nextChar(); 9804 return Cmd.get(">>"); 9805 } 9806 return Cmd.get(">"); 9807 case 0x7b: 9808 this.nextChar(); 9809 return Cmd.get("{"); 9810 case 0x7d: 9811 this.nextChar(); 9812 return Cmd.get("}"); 9813 case 0x29: 9814 this.nextChar(); 9815 throw new FormatError(`Illegal character: ${ch}`); 9816 } 9817 let str = String.fromCharCode(ch); 9818 if (ch < 0x20 || ch > 0x7f) { 9819 const nextCh = this.peekChar(); 9820 if (nextCh >= 0x20 && nextCh <= 0x7f) { 9821 this.nextChar(); 9822 return Cmd.get(str); 9823 } 9824 } 9825 const knownCommands = this.knownCommands; 9826 let knownCommandFound = knownCommands?.[str] !== undefined; 9827 while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) { 9828 const possibleCommand = str + String.fromCharCode(ch); 9829 if (knownCommandFound && knownCommands[possibleCommand] === undefined) { 9830 break; 9831 } 9832 if (str.length === 128) { 9833 throw new FormatError(`Command token too long: ${str.length}`); 9834 } 9835 str = possibleCommand; 9836 knownCommandFound = knownCommands?.[str] !== undefined; 9837 } 9838 if (str === "true") { 9839 return true; 9840 } 9841 if (str === "false") { 9842 return false; 9843 } 9844 if (str === "null") { 9845 return null; 9846 } 9847 if (str === "BI") { 9848 this.beginInlineImagePos = this.stream.pos; 9849 } 9850 return Cmd.get(str); 9851 } 9852 skipToNextLine() { 9853 let ch = this.currentChar; 9854 while (ch >= 0) { 9855 if (ch === 0x0d) { 9856 ch = this.nextChar(); 9857 if (ch === 0x0a) { 9858 this.nextChar(); 9859 } 9860 break; 9861 } else if (ch === 0x0a) { 9862 this.nextChar(); 9863 break; 9864 } 9865 ch = this.nextChar(); 9866 } 9867 } 9868} 9869class Linearization { 9870 static create(stream) { 9871 function getInt(linDict, name, allowZeroValue = false) { 9872 const obj = linDict.get(name); 9873 if (Number.isInteger(obj) && (allowZeroValue ? obj >= 0 : obj > 0)) { 9874 return obj; 9875 } 9876 throw new Error(`The "${name}" parameter in the linearization ` + "dictionary is invalid."); 9877 } 9878 function getHints(linDict) { 9879 const hints = linDict.get("H"); 9880 let hintsLength; 9881 if (Array.isArray(hints) && ((hintsLength = hints.length) === 2 || hintsLength === 4)) { 9882 for (let index = 0; index < hintsLength; index++) { 9883 const hint = hints[index]; 9884 if (!(Number.isInteger(hint) && hint > 0)) { 9885 throw new Error(`Hint (${index}
vendor: 3,926 bytes, lines 9885-9934
9885) in the linearization dictionary is invalid.`); 9886 } 9887 } 9888 return hints; 9889 } 9890 throw new Error("Hint array in the linearization dictionary is invalid."); 9891 } 9892 const parser = new Parser({ 9893 lexer: new Lexer(stream), 9894 xref: null 9895 }); 9896 const obj1 = parser.getObj(); 9897 const obj2 = parser.getObj(); 9898 const obj3 = parser.getObj(); 9899 const linDict = parser.getObj(); 9900 let obj, length; 9901 if (!(Number.isInteger(obj1) && Number.isInteger(obj2) && isCmd(obj3, "obj") && linDict instanceof Dict && typeof (obj = linDict.get("Linearized")) === "number" && obj > 0)) { 9902 return null; 9903 } else if ((length = getInt(linDict, "L")) !== stream.length) { 9904 throw new Error('The "L" parameter in the linearization dictionary ' + "does not equal the stream length."); 9905 } 9906 return { 9907 length, 9908 hints: getHints(linDict), 9909 objectNumberFirst: getInt(linDict, "O"), 9910 endFirst: getInt(linDict, "E"), 9911 numPages: getInt(linDict, "N"), 9912 mainXRefEntriesOffset: getInt(linDict, "T"), 9913 pageFirst: linDict.has("P") ? getInt(linDict, "P", true) : 0 9914 }; 9915 } 9916} 9917 9918;// ./src/core/cmap.js 9919 9920 9921 9922 9923 9924 9925 9926const BUILT_IN_CMAPS = ["Adobe-GB1-UCS2", "Adobe-CNS1-UCS2", "Adobe-Japan1-UCS2", "Adobe-Korea1-UCS2", "78-EUC-H", "78-EUC-V", "78-H", "78-RKSJ-H", "78-RKSJ-V", "78-V", "78ms-RKSJ-H", "78ms-RKSJ-V", "83pv-RKSJ-H", "90ms-RKSJ-H", "90ms-RKSJ-V", "90msp-RKSJ-H", "90msp-RKSJ-V", "90pv-RKSJ-H", "90pv-RKSJ-V", "Add-H", "Add-RKSJ-H", "Add-RKSJ-V", "Add-V", "Adobe-CNS1-0", "Adobe-CNS1-1", "Adobe-CNS1-2", "Adobe-CNS1-3", "Adobe-CNS1-4", "Adobe-CNS1-5", "Adobe-CNS1-6", "Adobe-GB1-0", "Adobe-GB1-1", "Adobe-GB1-2", "Adobe-GB1-3", "Adobe-GB1-4", "Adobe-GB1-5", "Adobe-Japan1-0", "Adobe-Japan1-1", "Adobe-Japan1-2", "Adobe-Japan1-3", "Adobe-Japan1-4", "Adobe-Japan1-5", "Adobe-Japan1-6", "Adobe-Korea1-0", "Adobe-Korea1-1", "Adobe-Korea1-2", "B5-H", "B5-V", "B5pc-H", "B5pc-V", "CNS-EUC-H", "CNS-EUC-V", "CNS1-H", "CNS1-V", "CNS2-H", "CNS2-V", "ETHK-B5-H", "ETHK-B5-V", "ETen-B5-H", "ETen-B5-V", "ETenms-B5-H", "ETenms-B5-V", "EUC-H", "EUC-V", "Ext-H", "Ext-RKSJ-H", "Ext-RKSJ-V", "Ext-V", "GB-EUC-H", "GB-EUC-V", "GB-H", "GB-V", "GBK-EUC-H", "GBK-EUC-V", "GBK2K-H", "GBK2K-V", "GBKp-EUC-H", "GBKp-EUC-V", "GBT-EUC-H", "GBT-EUC-V", "GBT-H", "GBT-V", "GBTpc-EUC-H", "GBTpc-EUC-V", "GBpc-EUC-H", "GBpc-EUC-V", "H", "HKdla-B5-H", "HKdla-B5-V", "HKdlb-B5-H", "HKdlb-B5-V", "HKgccs-B5-H", "HKgccs-B5-V", "HKm314-B5-H", "HKm314-B5-V", "HKm471-B5-H", "HKm471-B5-V", "HKscs-B5-H", "HKscs-B5-V", "Hankaku", "Hiragana", "KSC-EUC-H", "KSC-EUC-V", "KSC-H", "KSC-Johab-H", "KSC-Johab-V", "KSC-V", "KSCms-UHC-H", "KSCms-UHC-HW-H", "KSCms-UHC-HW-V", "KSCms-UHC-V", "KSCpc-EUC-H", "KSCpc-EUC-V", "Katakana", "NWP-H", "NWP-V", "RKSJ-H", "RKSJ-V", "Roman", "UniCNS-UCS2-H", "UniCNS-UCS2-V", "UniCNS-UTF16-H", "UniCNS-UTF16-V", "UniCNS-UTF32-H", "UniCNS-UTF32-V", "UniCNS-UTF8-H", "UniCNS-UTF8-V", "UniGB-UCS2-H", "UniGB-UCS2-V", "UniGB-UTF16-H", "UniGB-UTF16-V", "UniGB-UTF32-H", "UniGB-UTF32-V", "UniGB-UTF8-H", "UniGB-UTF8-V", "UniJIS-UCS2-H", "UniJIS-UCS2-HW-H", "UniJIS-UCS2-HW-V", "UniJIS-UCS2-V", "UniJIS-UTF16-H", "UniJIS-UTF16-V", "UniJIS-UTF32-H", "UniJIS-UTF32-V", "UniJIS-UTF8-H", "UniJIS-UTF8-V", "UniJIS2004-UTF16-H", "UniJIS2004-UTF16-V", "UniJIS2004-UTF32-H", "UniJIS2004-UTF32-V", "UniJIS2004-UTF8-H", "UniJIS2004-UTF8-V", "UniJISPro-UCS2-HW-V", "UniJISPro-UCS2-V", "UniJISPro-UTF8-V", "UniJISX0213-UTF32-H", "UniJISX0213-UTF32-V", "UniJISX02132004-UTF32-H", "UniJISX02132004-UTF32-V", "UniKS-UCS2-H", "UniKS-UCS2-V", "UniKS-UTF16-H", "UniKS-UTF16-V", "UniKS-UTF32-H", "UniKS-UTF32-V", "UniKS-UTF8-H", "UniKS-UTF8-V", "V", "WP-Symbol"]; 9927const MAX_MAP_RANGE = 2 ** 24 - 1; 9928class CMap { 9929 constructor(builtInCMap = false) { 9930 this.codespaceRanges = [[], [], [], []]; 9931 this.numCodespaceRanges = 0; 9932 this._map = []; 9933 this.name = ""; 9934 this.vertical = false;
vendor: 11,115 bytes, lines 9935-10363
9935 this.useCMap = null; 9936 this.builtInCMap = builtInCMap; 9937 } 9938 addCodespaceRange(n, low, high) { 9939 this.codespaceRanges[n - 1].push(low, high); 9940 this.numCodespaceRanges++; 9941 } 9942 mapCidRange(low, high, dstLow) { 9943 if (high - low > MAX_MAP_RANGE) { 9944 throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE."); 9945 } 9946 while (low <= high) { 9947 this._map[low++] = dstLow++; 9948 } 9949 } 9950 mapBfRange(low, high, dstLow) { 9951 if (high - low > MAX_MAP_RANGE) { 9952 throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE."); 9953 } 9954 const lastByte = dstLow.length - 1; 9955 while (low <= high) { 9956 this._map[low++] = dstLow; 9957 const nextCharCode = dstLow.charCodeAt(lastByte) + 1; 9958 if (nextCharCode > 0xff) { 9959 dstLow = dstLow.substring(0, lastByte - 1) + String.fromCharCode(dstLow.charCodeAt(lastByte - 1) + 1) + "\x00"; 9960 continue; 9961 } 9962 dstLow = dstLow.substring(0, lastByte) + String.fromCharCode(nextCharCode); 9963 } 9964 } 9965 mapBfRangeToArray(low, high, array) { 9966 if (high - low > MAX_MAP_RANGE) { 9967 throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE."); 9968 } 9969 const ii = array.length; 9970 let i = 0; 9971 while (low <= high && i < ii) { 9972 this._map[low] = array[i++]; 9973 ++low; 9974 } 9975 } 9976 mapOne(src, dst) { 9977 this._map[src] = dst; 9978 } 9979 lookup(code) { 9980 return this._map[code]; 9981 } 9982 contains(code) { 9983 return this._map[code] !== undefined; 9984 } 9985 forEach(callback) { 9986 const map = this._map; 9987 const length = map.length; 9988 if (length <= 0x10000) { 9989 for (let i = 0; i < length; i++) { 9990 if (map[i] !== undefined) { 9991 callback(i, map[i]); 9992 } 9993 } 9994 } else { 9995 for (const i in map) { 9996 callback(i, map[i]); 9997 } 9998 } 9999 } 10000 charCodeOf(value) { 10001 const map = this._map; 10002 if (map.length <= 0x10000) { 10003 return map.indexOf(value); 10004 } 10005 for (const charCode in map) { 10006 if (map[charCode] === value) { 10007 return charCode | 0; 10008 } 10009 } 10010 return -1; 10011 } 10012 getMap() { 10013 return this._map; 10014 } 10015 readCharCode(str, offset, out) { 10016 let c = 0; 10017 const codespaceRanges = this.codespaceRanges; 10018 for (let n = 0, nn = codespaceRanges.length; n < nn; n++) { 10019 c = (c << 8 | str.charCodeAt(offset + n)) >>> 0; 10020 const codespaceRange = codespaceRanges[n]; 10021 for (let k = 0, kk = codespaceRange.length; k < kk;) { 10022 const low = codespaceRange[k++]; 10023 const high = codespaceRange[k++]; 10024 if (c >= low && c <= high) { 10025 out.charcode = c; 10026 out.length = n + 1; 10027 return; 10028 } 10029 } 10030 } 10031 out.charcode = 0; 10032 out.length = 1; 10033 } 10034 getCharCodeLength(charCode) { 10035 const codespaceRanges = this.codespaceRanges; 10036 for (let n = 0, nn = codespaceRanges.length; n < nn; n++) { 10037 const codespaceRange = codespaceRanges[n]; 10038 for (let k = 0, kk = codespaceRange.length; k < kk;) { 10039 const low = codespaceRange[k++]; 10040 const high = codespaceRange[k++]; 10041 if (charCode >= low && charCode <= high) { 10042 return n + 1; 10043 } 10044 } 10045 } 10046 return 1; 10047 } 10048 get length() { 10049 return this._map.length; 10050 } 10051 get isIdentityCMap() { 10052 if (!(this.name === "Identity-H" || this.name === "Identity-V")) { 10053 return false; 10054 } 10055 if (this._map.length !== 0x10000) { 10056 return false; 10057 } 10058 for (let i = 0; i < 0x10000; i++) { 10059 if (this._map[i] !== i) { 10060 return false; 10061 } 10062 } 10063 return true; 10064 } 10065} 10066class IdentityCMap extends CMap { 10067 constructor(vertical, n) { 10068 super(); 10069 this.vertical = vertical; 10070 this.addCodespaceRange(n, 0, 0xffff); 10071 } 10072 mapCidRange(low, high, dstLow) { 10073 unreachable("should not call mapCidRange"); 10074 } 10075 mapBfRange(low, high, dstLow) { 10076 unreachable("should not call mapBfRange"); 10077 } 10078 mapBfRangeToArray(low, high, array) { 10079 unreachable("should not call mapBfRangeToArray"); 10080 } 10081 mapOne(src, dst) { 10082 unreachable("should not call mapCidOne"); 10083 } 10084 lookup(code) { 10085 return Number.isInteger(code) && code <= 0xffff ? code : undefined; 10086 } 10087 contains(code) { 10088 return Number.isInteger(code) && code <= 0xffff; 10089 } 10090 forEach(callback) { 10091 for (let i = 0; i <= 0xffff; i++) { 10092 callback(i, i); 10093 } 10094 } 10095 charCodeOf(value) { 10096 return Number.isInteger(value) && value <= 0xffff ? value : -1; 10097 } 10098 getMap() { 10099 const map = new Array(0x10000); 10100 for (let i = 0; i <= 0xffff; i++) { 10101 map[i] = i; 10102 } 10103 return map; 10104 } 10105 get length() { 10106 return 0x10000; 10107 } 10108 get isIdentityCMap() { 10109 unreachable("should not access .isIdentityCMap"); 10110 } 10111} 10112function strToInt(str) { 10113 let a = 0; 10114 for (let i = 0; i < str.length; i++) { 10115 a = a << 8 | str.charCodeAt(i); 10116 } 10117 return a >>> 0; 10118} 10119function expectString(obj) { 10120 if (typeof obj !== "string") { 10121 throw new FormatError("Malformed CMap: expected string."); 10122 } 10123} 10124function expectInt(obj) { 10125 if (!Number.isInteger(obj)) { 10126 throw new FormatError("Malformed CMap: expected int."); 10127 } 10128} 10129function parseBfChar(cMap, lexer) { 10130 while (true) { 10131 let obj = lexer.getObj(); 10132 if (obj === EOF) { 10133 break; 10134 } 10135 if (isCmd(obj, "endbfchar")) { 10136 return; 10137 } 10138 expectString(obj); 10139 const src = strToInt(obj); 10140 obj = lexer.getObj(); 10141 expectString(obj); 10142 const dst = obj; 10143 cMap.mapOne(src, dst); 10144 } 10145} 10146function parseBfRange(cMap, lexer) { 10147 while (true) { 10148 let obj = lexer.getObj(); 10149 if (obj === EOF) { 10150 break; 10151 } 10152 if (isCmd(obj, "endbfrange")) { 10153 return; 10154 } 10155 expectString(obj); 10156 const low = strToInt(obj); 10157 obj = lexer.getObj(); 10158 expectString(obj); 10159 const high = strToInt(obj); 10160 obj = lexer.getObj(); 10161 if (Number.isInteger(obj) || typeof obj === "string") { 10162 const dstLow = Number.isInteger(obj) ? String.fromCharCode(obj) : obj; 10163 cMap.mapBfRange(low, high, dstLow); 10164 } else if (isCmd(obj, "[")) { 10165 obj = lexer.getObj(); 10166 const array = []; 10167 while (!isCmd(obj, "]") && obj !== EOF) { 10168 array.push(obj); 10169 obj = lexer.getObj(); 10170 } 10171 cMap.mapBfRangeToArray(low, high, array); 10172 } else { 10173 break; 10174 } 10175 } 10176 throw new FormatError("Invalid bf range."); 10177} 10178function parseCidChar(cMap, lexer) { 10179 while (true) { 10180 let obj = lexer.getObj(); 10181 if (obj === EOF) { 10182 break; 10183 } 10184 if (isCmd(obj, "endcidchar")) { 10185 return; 10186 } 10187 expectString(obj); 10188 const src = strToInt(obj); 10189 obj = lexer.getObj(); 10190 expectInt(obj); 10191 const dst = obj; 10192 cMap.mapOne(src, dst); 10193 } 10194} 10195function parseCidRange(cMap, lexer) { 10196 while (true) { 10197 let obj = lexer.getObj(); 10198 if (obj === EOF) { 10199 break; 10200 } 10201 if (isCmd(obj, "endcidrange")) { 10202 return; 10203 } 10204 expectString(obj); 10205 const low = strToInt(obj); 10206 obj = lexer.getObj(); 10207 expectString(obj); 10208 const high = strToInt(obj); 10209 obj = lexer.getObj(); 10210 expectInt(obj); 10211 const dstLow = obj; 10212 cMap.mapCidRange(low, high, dstLow); 10213 } 10214} 10215function parseCodespaceRange(cMap, lexer) { 10216 while (true) { 10217 let obj = lexer.getObj(); 10218 if (obj === EOF) { 10219 break; 10220 } 10221 if (isCmd(obj, "endcodespacerange")) { 10222 return; 10223 } 10224 if (typeof obj !== "string") { 10225 break; 10226 } 10227 const low = strToInt(obj); 10228 obj = lexer.getObj(); 10229 if (typeof obj !== "string") { 10230 break; 10231 } 10232 const high = strToInt(obj); 10233 cMap.addCodespaceRange(obj.length, low, high); 10234 } 10235 throw new FormatError("Invalid codespace range."); 10236} 10237function parseWMode(cMap, lexer) { 10238 const obj = lexer.getObj(); 10239 if (Number.isInteger(obj)) { 10240 cMap.vertical = !!obj; 10241 } 10242} 10243function parseCMapName(cMap, lexer) { 10244 const obj = lexer.getObj(); 10245 if (obj instanceof Name) { 10246 cMap.name = obj.name; 10247 } 10248} 10249async function parseCMap(cMap, lexer, fetchBuiltInCMap, useCMap) { 10250 let previous, embeddedUseCMap; 10251 objLoop: while (true) { 10252 try { 10253 const obj = lexer.getObj(); 10254 if (obj === EOF) { 10255 break; 10256 } else if (obj instanceof Name) { 10257 if (obj.name === "WMode") { 10258 parseWMode(cMap, lexer); 10259 } else if (obj.name === "CMapName") { 10260 parseCMapName(cMap, lexer); 10261 } 10262 previous = obj; 10263 } else if (obj instanceof Cmd) { 10264 switch (obj.cmd) { 10265 case "endcmap": 10266 break objLoop; 10267 case "usecmap": 10268 if (previous instanceof Name) { 10269 embeddedUseCMap = previous.name; 10270 } 10271 break; 10272 case "begincodespacerange": 10273 parseCodespaceRange(cMap, lexer); 10274 break; 10275 case "beginbfchar": 10276 parseBfChar(cMap, lexer); 10277 break; 10278 case "begincidchar": 10279 parseCidChar(cMap, lexer); 10280 break; 10281 case "beginbfrange": 10282 parseBfRange(cMap, lexer); 10283 break; 10284 case "begincidrange": 10285 parseCidRange(cMap, lexer); 10286 break; 10287 } 10288 } 10289 } catch (ex) { 10290 if (ex instanceof MissingDataException) { 10291 throw ex; 10292 } 10293 warn("Invalid cMap data: " + ex); 10294 continue; 10295 } 10296 } 10297 if (!useCMap && embeddedUseCMap) { 10298 useCMap = embeddedUseCMap; 10299 } 10300 if (useCMap) { 10301 return extendCMap(cMap, fetchBuiltInCMap, useCMap); 10302 } 10303 return cMap; 10304} 10305async function extendCMap(cMap, fetchBuiltInCMap, useCMap) { 10306 cMap.useCMap = await createBuiltInCMap(useCMap, fetchBuiltInCMap); 10307 if (cMap.numCodespaceRanges === 0) { 10308 const useCodespaceRanges = cMap.useCMap.codespaceRanges; 10309 for (let i = 0; i < useCodespaceRanges.length; i++) { 10310 cMap.codespaceRanges[i] = useCodespaceRanges[i].slice(); 10311 } 10312 cMap.numCodespaceRanges = cMap.useCMap.numCodespaceRanges; 10313 } 10314 cMap.useCMap.forEach(function (key, value) { 10315 if (!cMap.contains(key)) { 10316 cMap.mapOne(key, value); 10317 } 10318 }); 10319 return cMap; 10320} 10321async function createBuiltInCMap(name, fetchBuiltInCMap) { 10322 if (name === "Identity-H") { 10323 return new IdentityCMap(false, 2); 10324 } else if (name === "Identity-V") { 10325 return new IdentityCMap(true, 2); 10326 } 10327 if (!BUILT_IN_CMAPS.includes(name)) { 10328 throw new Error("Unknown CMap name: " + name); 10329 } 10330 if (!fetchBuiltInCMap) { 10331 throw new Error("Built-in CMap parameters are not provided."); 10332 } 10333 const { 10334 cMapData, 10335 isCompressed 10336 } = await fetchBuiltInCMap(name); 10337 const cMap = new CMap(true); 10338 if (isCompressed) { 10339 return new BinaryCMapReader().process(cMapData, cMap, useCMap => extendCMap(cMap, fetchBuiltInCMap, useCMap)); 10340 } 10341 const lexer = new Lexer(new Stream(cMapData)); 10342 return parseCMap(cMap, lexer, fetchBuiltInCMap, null); 10343} 10344class CMapFactory { 10345 static async create({ 10346 encoding, 10347 fetchBuiltInCMap, 10348 useCMap 10349 }) { 10350 if (encoding instanceof Name) { 10351 return createBuiltInCMap(encoding.name, fetchBuiltInCMap); 10352 } else if (encoding instanceof BaseStream) { 10353 const parsedCMap = await parseCMap(new CMap(), new Lexer(encoding), fetchBuiltInCMap, useCMap); 10354 if (parsedCMap.isIdentityCMap) { 10355 return createBuiltInCMap(parsedCMap.name, fetchBuiltInCMap); 10356 } 10357 return parsedCMap; 10358 } 10359 throw new Error("Encoding required."); 10360 } 10361} 10362 10363;// ./src/core/
10363charsets.js 10364const ISOAdobeCharset = [".notdef", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "endash", "dagger", "daggerdbl", "periodcentered", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "questiondown", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "emdash", "AE", "ordfeminine", "Lslash", "Oslash", "OE", "ordmasculine", "ae", "dotlessi", "lslash", "oslash", "oe", "germandbls", "onesuperior", "logicalnot", "mu", "trademark", "Eth", "onehalf", "plusminus", "Thorn", "onequarter", "divide", "brokenbar", "degree", "thorn", "threequarters", "twosuperior", "registered", "minus", "eth", "multiply", "threesuperior", "copyright", "Aacute", "Acircumflex", "Adieresis", "Agrave", "Aring", "Atilde", "Ccedilla", "Eacute", "Ecircumflex", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Ntilde", "Oacute", "Ocircumflex", "Odieresis", "Ograve", "Otilde", "Scaron", "Uacute", "Ucircumflex", "Udieresis", "Ugrave", "Yacute", "Ydieresis", "Zcaron", "aacute", "acircumflex", "adieresis", "agrave", "aring", "atilde", "ccedilla", "eacute", "ecircumflex", "edieresis", "egrave", "iacute", "icircumflex", "idieresis", "igrave", "ntilde", "oacute", "ocircumflex", "odieresis", "ograve", "otilde", "scaron", "uacute", "ucircumflex", "udieresis", "ugrave", "yacute", "ydieresis", "zcaron"]; 10365const ExpertCharset = [".notdef", "space", "exclamsmall", "Hungarumlautsmall", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "comma", "hyphen", "period", "fraction", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "colon", "semicolon", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior", "tsuperior", "ff", "fi", "fl", "ffi", "ffl", "parenleftinferior", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "exclamdownsmall", "centoldstyle", "Lslashsmall", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior", "Ogoneksmall", "Ringsmall", "Cedillasmall", "onequarter", "onehalf", "threequarters", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "zerosuperior", "onesuperior", "twosuperior", "threesuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall"]; 10366const ExpertSubsetCharset = [".notdef", "space", "dollaroldstyle", "dollarsuperior", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "comma", "hyphen", "period", "fraction", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "colon", "semicolon", "commasuperior", "threequartersemdash", "periodsuperior", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior", "tsuperior", "ff", "fi", "fl", "ffi", "ffl", "parenleftinferior", "parenrightinferior", "hyphensuperior", "colonmonetary", "onefitted", "rupiah", "centoldstyle", "figuredash", "hypheninferior", "onequarter", "onehalf", "threequarters", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "zerosuperior", "onesuperior", "twosuperior", "threesuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior"];
vendor: 16,958 bytes, lines 10366-10397
10366 10367 10368;// ./src/core/encodings.js 10369const ExpertEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclamsmall", "Hungarumlautsmall", "", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "comma", "hyphen", "period", "fraction", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "colon", "semicolon", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "", "", "", "isuperior", "", "", "lsuperior", "msuperior", "nsuperior", "osuperior", "", "", "rsuperior", "ssuperior", "tsuperior", "", "ff", "fi", "fl", "ffi", "ffl", "parenleftinferior", "", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "exclamdownsmall", "centoldstyle", "Lslashsmall", "", "", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "", "Dotaccentsmall", "", "", "Macronsmall", "", "", "figuredash", "hypheninferior", "", "", "Ogoneksmall", "Ringsmall", "Cedillasmall", "", "", "", "onequarter", "onehalf", "threequarters", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "", "", "zerosuperior", "onesuperior", "twosuperior", "threesuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall"]; 10370const MacExpertEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclamsmall", "Hungarumlautsmall", "centoldstyle", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "comma", "hyphen", "period", "fraction", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "colon", "semicolon", "", "threequartersemdash", "", "questionsmall", "", "", "", "", "Ethsmall", "", "", "onequarter", "onehalf", "threequarters", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "", "", "", "", "", "", "ff", "fi", "fl", "ffi", "ffl", "parenleftinferior", "", "parenrightinferior", "Circumflexsmall", "hypheninferior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "", "", "asuperior", "centsuperior", "", "", "", "", "Aacutesmall", "Agravesmall", "Acircumflexsmall", "Adieresissmall", "Atildesmall", "Aringsmall", "Ccedillasmall", "Eacutesmall", "Egravesmall", "Ecircumflexsmall", "Edieresissmall", "Iacutesmall", "Igravesmall", "Icircumflexsmall", "Idieresissmall", "Ntildesmall", "Oacutesmall", "Ogravesmall", "Ocircumflexsmall", "Odieresissmall", "Otildesmall", "Uacutesmall", "Ugravesmall", "Ucircumflexsmall", "Udieresissmall", "", "eightsuperior", "fourinferior", "threeinferior", "sixinferior", "eightinferior", "seveninferior", "Scaronsmall", "", "centinferior", "twoinferior", "", "Dieresissmall", "", "Caronsmall", "osuperior", "fiveinferior", "", "commainferior", "periodinferior", "Yacutesmall", "", "dollarinferior", "", "", "Thornsmall", "", "nineinferior", "zeroinferior", "Zcaronsmall", "AEsmall", "Oslashsmall", "questiondownsmall", "oneinferior", "Lslashsmall", "", "", "", "", "", "", "Cedillasmall", "", "", "", "", "", "OEsmall", "figuredash", "hyphensuperior", "", "", "", "", "exclamdownsmall", "", "Ydieresissmall", "", "onesuperior", "twosuperior", "threesuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "ninesuperior", "zerosuperior", "", "esuperior", "rsuperior", "tsuperior", "", "", "isuperior", "ssuperior", "dsuperior", "", "", "", "", "", "lsuperior", "Ogoneksmall", "Brevesmall", "Macronsmall", "bsuperior", "nsuperior", "msuperior", "commasuperior", "periodsuperior", "Dotaccentsmall", "Ringsmall", "", "", "", ""]; 10371const MacRomanEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quotesingle", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "grave", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "", "Adieresis", "Aring", "Ccedilla", "Eacute", "Ntilde", "Odieresis", "Udieresis", "aacute", "agrave", "acircumflex", "adieresis", "atilde", "aring", "ccedilla", "eacute", "egrave", "ecircumflex", "edieresis", "iacute", "igrave", "icircumflex", "idieresis", "ntilde", "oacute", "ograve", "ocircumflex", "odieresis", "otilde", "uacute", "ugrave", "ucircumflex", "udieresis", "dagger", "degree", "cent", "sterling", "section", "bullet", "paragraph", "germandbls", "registered", "copyright", "trademark", "acute", "dieresis", "notequal", "AE", "Oslash", "infinity", "plusminus", "lessequal", "greaterequal", "yen", "mu", "partialdiff", "summation", "product", "pi", "integral", "ordfeminine", "ordmasculine", "Omega", "ae", "oslash", "questiondown", "exclamdown", "logicalnot", "radical", "florin", "approxequal", "Delta", "guillemotleft", "guillemotright", "ellipsis", "space", "Agrave", "Atilde", "Otilde", "OE", "oe", "endash", "emdash", "quotedblleft", "quotedblright", "quoteleft", "quoteright", "divide", "lozenge", "ydieresis", "Ydieresis", "fraction", "currency", "guilsinglleft", "guilsinglright", "fi", "fl", "daggerdbl", "periodcentered", "quotesinglbase", "quotedblbase", "perthousand", "Acircumflex", "Ecircumflex", "Aacute", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Oacute", "Ocircumflex", "apple", "Ograve", "Uacute", "Ucircumflex", "Ugrave", "dotlessi", "circumflex", "tilde", "macron", "breve", "dotaccent", "ring", "cedilla", "hungarumlaut", "ogonek", "caron"]; 10372const StandardEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "", "endash", "dagger", "daggerdbl", "periodcentered", "", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "", "questiondown", "", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "", "ring", "cedilla", "", "hungarumlaut", "ogonek", "caron", "emdash", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "AE", "", "ordfeminine", "", "", "", "", "Lslash", "Oslash", "OE", "ordmasculine", "", "", "", "", "", "ae", "", "", "", "dotlessi", "", "", "lslash", "oslash", "oe", "germandbls", "", "", "", ""]; 10373const WinAnsiEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quotesingle", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "grave", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "bullet", "Euro", "bullet", "quotesinglbase", "florin", "quotedblbase", "ellipsis", "dagger", "daggerdbl", "circumflex", "perthousand", "Scaron", "guilsinglleft", "OE", "bullet", "Zcaron", "bullet", "bullet", "quoteleft", "quoteright", "quotedblleft", "quotedblright", "bullet", "endash", "emdash", "tilde", "trademark", "scaron", "guilsinglright", "oe", "bullet", "zcaron", "Ydieresis", "space", "exclamdown", "cent", "sterling", "currency", "yen", "brokenbar", "section", "dieresis", "copyright", "ordfeminine", "guillemotleft", "logicalnot", "hyphen", "registered", "macron", "degree", "plusminus", "twosuperior", "threesuperior", "acute", "mu", "paragraph", "periodcentered", "cedilla", "onesuperior", "ordmasculine", "guillemotright", "onequarter", "onehalf", "threequarters", "questiondown", "Agrave", "Aacute", "Acircumflex", "Atilde", "Adieresis", "Aring", "AE", "Ccedilla", "Egrave", "Eacute", "Ecircumflex", "Edieresis", "Igrave", "Iacute", "Icircumflex", "Idieresis", "Eth", "Ntilde", "Ograve", "Oacute", "Ocircumflex", "Otilde", "Odieresis", "multiply", "Oslash", "Ugrave", "Uacute", "Ucircumflex", "Udieresis", "Yacute", "Thorn", "germandbls", "agrave", "aacute", "acircumflex", "atilde", "adieresis", "aring", "ae", "ccedilla", "egrave", "eacute", "ecircumflex", "edieresis", "igrave", "iacute", "icircumflex", "idieresis", "eth", "ntilde", "ograve", "oacute", "ocircumflex", "otilde", "odieresis", "divide", "oslash", "ugrave", "uacute", "ucircumflex", "udieresis", "yacute", "thorn", "ydieresis"]; 10374const SymbolSetEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclam", "universal", "numbersign", "existential", "percent", "ampersand", "suchthat", "parenleft", "parenright", "asteriskmath", "plus", "comma", "minus", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "congruent", "Alpha", "Beta", "Chi", "Delta", "Epsilon", "Phi", "Gamma", "Eta", "Iota", "theta1", "Kappa", "Lambda", "Mu", "Nu", "Omicron", "Pi", "Theta", "Rho", "Sigma", "Tau", "Upsilon", "sigma1", "Omega", "Xi", "Psi", "Zeta", "bracketleft", "therefore", "bracketright", "perpendicular", "underscore", "radicalex", "alpha", "beta", "chi", "delta", "epsilon", "phi", "gamma", "eta", "iota", "phi1", "kappa", "lambda", "mu", "nu", "omicron", "pi", "theta", "rho", "sigma", "tau", "upsilon", "omega1", "omega", "xi", "psi", "zeta", "braceleft", "bar", "braceright", "similar", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "Euro", "Upsilon1", "minute", "lessequal", "fraction", "infinity", "florin", "club", "diamond", "heart", "spade", "arrowboth", "arrowleft", "arrowup", "arrowright", "arrowdown", "degree", "plusminus", "second", "greaterequal", "multiply", "proportional", "partialdiff", "bullet", "divide", "notequal", "equivalence", "approxequal", "ellipsis", "arrowvertex", "arrowhorizex", "carriagereturn", "aleph", "Ifraktur", "Rfraktur", "weierstrass", "circlemultiply", "circleplus", "emptyset", "intersection", "union", "propersuperset", "reflexsuperset", "notsubset", "propersubset", "reflexsubset", "element", "notelement", "angle", "gradient", "registerserif", "copyrightserif", "trademarkserif", "product", "radical", "dotmath", "logicalnot", "logicaland", "logicalor", "arrowdblboth", "arrowdblleft", "arrowdblup", "arrowdblright", "arrowdbldown", "lozenge", "angleleft", "registersans", "copyrightsans", "trademarksans", "summation", "parenlefttp", "parenleftex", "parenleftbt", "bracketlefttp", "bracketleftex", "bracketleftbt", "bracelefttp", "braceleftmid", "braceleftbt", "braceex", "", "angleright", "integral", "integraltp", "integralex", "integralbt", "parenrighttp", "parenrightex", "parenrightbt", "bracketrighttp", "bracketrightex", "bracketrightbt", "bracerighttp", "bracerightmid", "bracerightbt", ""]; 10375const ZapfDingbatsEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "a1", "a2", "a202", "a3", "a4", "a5", "a119", "a118", "a117", "a11", "a12", "a13", "a14", "a15", "a16", "a105", "a17", "a18", "a19", "a20", "a21", "a22", "a23", "a24", "a25", "a26", "a27", "a28", "a6", "a7", "a8", "a9", "a10", "a29", "a30", "a31", "a32", "a33", "a34", "a35", "a36", "a37", "a38", "a39", "a40", "a41", "a42", "a43", "a44", "a45", "a46", "a47", "a48", "a49", "a50", "a51", "a52", "a53", "a54", "a55", "a56", "a57", "a58", "a59", "a60", "a61", "a62", "a63", "a64", "a65", "a66", "a67", "a68", "a69", "a70", "a71", "a72", "a73", "a74", "a203", "a75", "a204", "a76", "a77", "a78", "a79", "a81", "a82", "a83", "a84", "a97", "a98", "a99", "a100", "", "a89", "a90", "a93", "a94", "a91", "a92", "a205", "a85", "a206", "a86", "a87", "a88", "a95", "a96", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "a101", "a102", "a103", "a104", "a106", "a107", "a108", "a112", "a111", "a110", "a109", "a120", "a121", "a122", "a123", "a124", "a125", "a126", "a127", "a128", "a129", "a130", "a131", "a132", "a133", "a134", "a135", "a136", "a137", "a138", "a139", "a140", "a141", "a142", "a143", "a144", "a145", "a146", "a147", "a148", "a149", "a150", "a151", "a152", "a153", "a154", "a155", "a156", "a157", "a158", "a159", "a160", "a161", "a163", "a164", "a196", "a165", "a192", "a166", "a167", "a168", "a169", "a170", "a171", "a172", "a173", "a162", "a174", "a175", "a176", "a177", "a178", "a179", "a193", "a180", "a199", "a181", "a200", "a182", "", "a201", "a183", "a184", "a197", "a185", "a194", "a198", "a186", "a195", "a187", "a188", "a189", "a190", "a191", ""]; 10376function getEncoding(encodingName) { 10377 switch (encodingName) { 10378 case "WinAnsiEncoding": 10379 return WinAnsiEncoding; 10380 case "StandardEncoding": 10381 return StandardEncoding; 10382 case "MacRomanEncoding": 10383 return MacRomanEncoding; 10384 case "SymbolSetEncoding": 10385 return SymbolSetEncoding; 10386 case "ZapfDingbatsEncoding": 10387 return ZapfDingbatsEncoding; 10388 case "ExpertEncoding": 10389 return ExpertEncoding; 10390 case "MacExpertEncoding": 10391 return MacExpertEncoding; 10392 default: 10393 return null; 10394 } 10395} 10396 10397;// ./src/core/
10397cff_parser.js
vendor: 11,504 bytes, lines 10397-10712
10397 10398 10399 10400 10401const MAX_SUBR_NESTING = 10; 10402const CFFStandardStrings = [".notdef", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "endash", "dagger", "daggerdbl", "periodcentered", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "questiondown", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "emdash", "AE", "ordfeminine", "Lslash", "Oslash", "OE", "ordmasculine", "ae", "dotlessi", "lslash", "oslash", "oe", "germandbls", "onesuperior", "logicalnot", "mu", "trademark", "Eth", "onehalf", "plusminus", "Thorn", "onequarter", "divide", "brokenbar", "degree", "thorn", "threequarters", "twosuperior", "registered", "minus", "eth", "multiply", "threesuperior", "copyright", "Aacute", "Acircumflex", "Adieresis", "Agrave", "Aring", "Atilde", "Ccedilla", "Eacute", "Ecircumflex", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Ntilde", "Oacute", "Ocircumflex", "Odieresis", "Ograve", "Otilde", "Scaron", "Uacute", "Ucircumflex", "Udieresis", "Ugrave", "Yacute", "Ydieresis", "Zcaron", "aacute", "acircumflex", "adieresis", "agrave", "aring", "atilde", "ccedilla", "eacute", "ecircumflex", "edieresis", "egrave", "iacute", "icircumflex", "idieresis", "igrave", "ntilde", "oacute", "ocircumflex", "odieresis", "ograve", "otilde", "scaron", "uacute", "ucircumflex", "udieresis", "ugrave", "yacute", "ydieresis", "zcaron", "exclamsmall", "Hungarumlautsmall", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior", "tsuperior", "ff", "ffi", "ffl", "parenleftinferior", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "exclamdownsmall", "centoldstyle", "Lslashsmall", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior", "Ogoneksmall", "Ringsmall", "Cedillasmall", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "zerosuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall", "001.000", "001.001", "001.002", "001.003", "Black", "Bold", "Book", "Light", "Medium", "Regular", "Roman", "Semibold"]; 10403const NUM_STANDARD_CFF_STRINGS = 391; 10404const CharstringValidationData = [null, { 10405 id: "hstem", 10406 min: 2, 10407 stackClearing: true, 10408 stem: true 10409}, null, { 10410 id: "vstem", 10411 min: 2, 10412 stackClearing: true, 10413 stem: true 10414}, { 10415 id: "vmoveto", 10416 min: 1, 10417 stackClearing: true 10418}, { 10419 id: "rlineto", 10420 min: 2, 10421 resetStack: true 10422}, { 10423 id: "hlineto", 10424 min: 1, 10425 resetStack: true 10426}, { 10427 id: "vlineto", 10428 min: 1, 10429 resetStack: true 10430}, { 10431 id: "rrcurveto", 10432 min: 6, 10433 resetStack: true 10434}, null, { 10435 id: "callsubr", 10436 min: 1, 10437 undefStack: true 10438}, { 10439 id: "return", 10440 min: 0, 10441 undefStack: true 10442}, null, null, { 10443 id: "endchar", 10444 min: 0, 10445 stackClearing: true 10446}, null, null, null, { 10447 id: "hstemhm", 10448 min: 2, 10449 stackClearing: true, 10450 stem: true 10451}, { 10452 id: "hintmask", 10453 min: 0, 10454 stackClearing: true 10455}, { 10456 id: "cntrmask", 10457 min: 0, 10458 stackClearing: true 10459}, { 10460 id: "rmoveto", 10461 min: 2, 10462 stackClearing: true 10463}, { 10464 id: "hmoveto", 10465 min: 1, 10466 stackClearing: true 10467}, { 10468 id: "vstemhm", 10469 min: 2, 10470 stackClearing: true, 10471 stem: true 10472}, { 10473 id: "rcurveline", 10474 min: 8, 10475 resetStack: true 10476}, { 10477 id: "rlinecurve", 10478 min: 8, 10479 resetStack: true 10480}, { 10481 id: "vvcurveto", 10482 min: 4, 10483 resetStack: true 10484}, { 10485 id: "hhcurveto", 10486 min: 4, 10487 resetStack: true 10488}, null, { 10489 id: "callgsubr", 10490 min: 1, 10491 undefStack: true 10492}, { 10493 id: "vhcurveto", 10494 min: 4, 10495 resetStack: true 10496}, { 10497 id: "hvcurveto", 10498 min: 4, 10499 resetStack: true 10500}]; 10501const CharstringValidationData12 = [null, null, null, { 10502 id: "and", 10503 min: 2, 10504 stackDelta: -1 10505}, { 10506 id: "or", 10507 min: 2, 10508 stackDelta: -1 10509}, { 10510 id: "not", 10511 min: 1, 10512 stackDelta: 0 10513}, null, null, null, { 10514 id: "abs", 10515 min: 1, 10516 stackDelta: 0 10517}, { 10518 id: "add", 10519 min: 2, 10520 stackDelta: -1, 10521 stackFn(stack, index) { 10522 stack[index - 2] = stack[index - 2] + stack[index - 1]; 10523 } 10524}, { 10525 id: "sub", 10526 min: 2, 10527 stackDelta: -1, 10528 stackFn(stack, index) { 10529 stack[index - 2] = stack[index - 2] - stack[index - 1]; 10530 } 10531}, { 10532 id: "div", 10533 min: 2, 10534 stackDelta: -1, 10535 stackFn(stack, index) { 10536 stack[index - 2] = stack[index - 2] / stack[index - 1]; 10537 } 10538}, null, { 10539 id: "neg", 10540 min: 1, 10541 stackDelta: 0, 10542 stackFn(stack, index) { 10543 stack[index - 1] = -stack[index - 1]; 10544 } 10545}, { 10546 id: "eq", 10547 min: 2, 10548 stackDelta: -1 10549}, null, null, { 10550 id: "drop", 10551 min: 1, 10552 stackDelta: -1 10553}, null, { 10554 id: "put", 10555 min: 2, 10556 stackDelta: -2 10557}, { 10558 id: "get", 10559 min: 1, 10560 stackDelta: 0 10561}, { 10562 id: "ifelse", 10563 min: 4, 10564 stackDelta: -3 10565}, { 10566 id: "random", 10567 min: 0, 10568 stackDelta: 1 10569}, { 10570 id: "mul", 10571 min: 2, 10572 stackDelta: -1, 10573 stackFn(stack, index) { 10574 stack[index - 2] = stack[index - 2] * stack[index - 1]; 10575 } 10576}, null, { 10577 id: "sqrt", 10578 min: 1, 10579 stackDelta: 0 10580}, { 10581 id: "dup", 10582 min: 1, 10583 stackDelta: 1 10584}, { 10585 id: "exch", 10586 min: 2, 10587 stackDelta: 0 10588}, { 10589 id: "index", 10590 min: 2, 10591 stackDelta: 0 10592}, { 10593 id: "roll", 10594 min: 3, 10595 stackDelta: -2 10596}, null, null, null, { 10597 id: "hflex", 10598 min: 7, 10599 resetStack: true 10600}, { 10601 id: "flex", 10602 min: 13, 10603 resetStack: true 10604}, { 10605 id: "hflex1", 10606 min: 9, 10607 resetStack: true 10608}, { 10609 id: "flex1", 10610 min: 11, 10611 resetStack: true 10612}]; 10613class CFFParser { 10614 constructor(file, properties, seacAnalysisEnabled) { 10615 this.bytes = file.getBytes(); 10616 this.properties = properties; 10617 this.seacAnalysisEnabled = !!seacAnalysisEnabled; 10618 } 10619 parse() { 10620 const properties = this.properties; 10621 const cff = new CFF(); 10622 this.cff = cff; 10623 const header = this.parseHeader(); 10624 const nameIndex = this.parseIndex(header.endPos); 10625 const topDictIndex = this.parseIndex(nameIndex.endPos); 10626 const stringIndex = this.parseIndex(topDictIndex.endPos); 10627 const globalSubrIndex = this.parseIndex(stringIndex.endPos); 10628 const topDictParsed = this.parseDict(topDictIndex.obj.get(0)); 10629 const topDict = this.createDict(CFFTopDict, topDictParsed, cff.strings); 10630 cff.header = header.obj; 10631 cff.names = this.parseNameIndex(nameIndex.obj); 10632 cff.strings = this.parseStringIndex(stringIndex.obj); 10633 cff.topDict = topDict; 10634 cff.globalSubrIndex = globalSubrIndex.obj; 10635 this.parsePrivateDict(cff.topDict); 10636 cff.isCIDFont = topDict.hasName("ROS"); 10637 const charStringOffset = topDict.getByName("CharStrings"); 10638 const charStringIndex = this.parseIndex(charStringOffset).obj; 10639 const fontMatrix = topDict.getByName("FontMatrix"); 10640 if (fontMatrix) { 10641 properties.fontMatrix = fontMatrix; 10642 } 10643 const fontBBox = topDict.getByName("FontBBox"); 10644 if (fontBBox) { 10645 properties.ascent = Math.max(fontBBox[3], fontBBox[1]); 10646 properties.descent = Math.min(fontBBox[1], fontBBox[3]); 10647 properties.ascentScaled = true; 10648 } 10649 let charset, encoding; 10650 if (cff.isCIDFont) { 10651 const fdArrayIndex = this.parseIndex(topDict.getByName("FDArray")).obj; 10652 for (let i = 0, ii = fdArrayIndex.count; i < ii; ++i) { 10653 const dictRaw = fdArrayIndex.get(i); 10654 const fontDict = this.createDict(CFFTopDict, this.parseDict(dictRaw), cff.strings); 10655 this.parsePrivateDict(fontDict); 10656 cff.fdArray.push(fontDict); 10657 } 10658 encoding = null; 10659 charset = this.parseCharsets(topDict.getByName("charset"), charStringIndex.count, cff.strings, true); 10660 cff.fdSelect = this.parseFDSelect(topDict.getByName("FDSelect"), charStringIndex.count); 10661 } else { 10662 charset = this.parseCharsets(topDict.getByName("charset"), charStringIndex.count, cff.strings, false); 10663 encoding = this.parseEncoding(topDict.getByName("Encoding"), properties, cff.strings, charset.charset); 10664 } 10665 cff.charset = charset; 10666 cff.encoding = encoding; 10667 const charStringsAndSeacs = this.parseCharStrings({ 10668 charStrings: charStringIndex, 10669 localSubrIndex: topDict.privateDict.subrsIndex, 10670 globalSubrIndex: globalSubrIndex.obj, 10671 fdSelect: cff.fdSelect, 10672 fdArray: cff.fdArray, 10673 privateDict: topDict.privateDict 10674 }); 10675 cff.charStrings = charStringsAndSeacs.charStrings; 10676 cff.seacs = charStringsAndSeacs.seacs; 10677 cff.widths = charStringsAndSeacs.widths; 10678 return cff; 10679 } 10680 parseHeader() { 10681 let bytes = this.bytes; 10682 const bytesLength = bytes.length; 10683 let offset = 0; 10684 while (offset < bytesLength && bytes[offset] !== 1) { 10685 ++offset; 10686 } 10687 if (offset >= bytesLength) { 10688 throw new FormatError("Invalid CFF header"); 10689 } 10690 if (offset !== 0) { 10691 info("cff data is shifted"); 10692 bytes = bytes.subarray(offset); 10693 this.bytes = bytes; 10694 } 10695 const major = bytes[0]; 10696 const minor = bytes[1]; 10697 const hdrSize = bytes[2]; 10698 const offSize = bytes[3]; 10699 const header = new CFFHeader(major, minor, hdrSize, offSize); 10700 return { 10701 obj: header, 10702 endPos: hdrSize 10703 }; 10704 } 10705 parseDict(dict) { 10706 let pos = 0; 10707 function parseOperand() { 10708 let value = dict[pos++]; 10709 if (value === 30) { 10710 return parseFloatOperand(); 10711 } else if (value === 28) { 10712 value =
vendor: 3,774 bytes, lines 10712-10843
10712dict[pos++]; 10713 value = (value << 24 | dict[pos++] << 16) >> 16; 10714 return value; 10715 } else if (value === 29) { 10716 value = dict[pos++]; 10717 value = value << 8 | dict[pos++]; 10718 value = value << 8 | dict[pos++]; 10719 value = value << 8 | dict[pos++]; 10720 return value; 10721 } else if (value >= 32 && value <= 246) { 10722 return value - 139; 10723 } else if (value >= 247 && value <= 250) { 10724 return (value - 247) * 256 + dict[pos++] + 108; 10725 } else if (value >= 251 && value <= 254) { 10726 return -((value - 251) * 256) - dict[pos++] - 108; 10727 } 10728 warn('CFFParser_parseDict: "' + value + '" is a reserved command.'); 10729 return NaN; 10730 } 10731 function parseFloatOperand() { 10732 let str = ""; 10733 const eof = 15; 10734 const lookup = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "E", "E-", null, "-"]; 10735 const length = dict.length; 10736 while (pos < length) { 10737 const b = dict[pos++]; 10738 const b1 = b >> 4; 10739 const b2 = b & 15; 10740 if (b1 === eof) { 10741 break; 10742 } 10743 str += lookup[b1]; 10744 if (b2 === eof) { 10745 break; 10746 } 10747 str += lookup[b2]; 10748 } 10749 return parseFloat(str); 10750 } 10751 let operands = []; 10752 const entries = []; 10753 pos = 0; 10754 const end = dict.length; 10755 while (pos < end) { 10756 let b = dict[pos]; 10757 if (b <= 21) { 10758 if (b === 12) { 10759 b = b << 8 | dict[++pos]; 10760 } 10761 entries.push([b, operands]); 10762 operands = []; 10763 ++pos; 10764 } else { 10765 operands.push(parseOperand()); 10766 } 10767 } 10768 return entries; 10769 } 10770 parseIndex(pos) { 10771 const cffIndex = new CFFIndex(); 10772 const bytes = this.bytes; 10773 const count = bytes[pos++] << 8 | bytes[pos++]; 10774 const offsets = []; 10775 let end = pos; 10776 let i, ii; 10777 if (count !== 0) { 10778 const offsetSize = bytes[pos++]; 10779 const startPos = pos + (count + 1) * offsetSize - 1; 10780 for (i = 0, ii = count + 1; i < ii; ++i) { 10781 let offset = 0; 10782 for (let j = 0; j < offsetSize; ++j) { 10783 offset <<= 8; 10784 offset += bytes[pos++]; 10785 } 10786 offsets.push(startPos + offset); 10787 } 10788 end = offsets[count]; 10789 } 10790 for (i = 0, ii = offsets.length - 1; i < ii; ++i) { 10791 const offsetStart = offsets[i]; 10792 const offsetEnd = offsets[i + 1]; 10793 cffIndex.add(bytes.subarray(offsetStart, offsetEnd)); 10794 } 10795 return { 10796 obj: cffIndex, 10797 endPos: end 10798 }; 10799 } 10800 parseNameIndex(index) { 10801 const names = []; 10802 for (let i = 0, ii = index.count; i < ii; ++i) { 10803 const name = index.get(i); 10804 names.push(bytesToString(name)); 10805 } 10806 return names; 10807 } 10808 parseStringIndex(index) { 10809 const strings = new CFFStrings(); 10810 for (let i = 0, ii = index.count; i < ii; ++i) { 10811 const data = index.get(i); 10812 strings.add(bytesToString(data)); 10813 } 10814 return strings; 10815 } 10816 createDict(Type, dict, strings) { 10817 const cffDict = new Type(strings); 10818 for (const [key, value] of dict) { 10819 cffDict.setByKey(key, value); 10820 } 10821 return cffDict; 10822 } 10823 parseCharString(state, data, localSubrIndex, globalSubrIndex) { 10824 if (!data || state.callDepth > MAX_SUBR_NESTING) { 10825 return false; 10826 } 10827 let stackSize = state.stackSize; 10828 const stack = state.stack; 10829 let length = data.length; 10830 for (let j = 0; j < length;) { 10831 const value = data[j++]; 10832 let validationCommand = null; 10833 if (value === 12) { 10834 const q = data[j++]; 10835 if (q === 0) { 10836 data[j - 2] = 139; 10837 data[j - 1] = 22; 10838 stackSize = 0; 10839 } else { 10840 validationCommand = CharstringValidationData12[q]; 10841 } 10842 } else if (value === 28) { 10843 stack[stackSize] = (data[j] << 24 | data[j + 1] << 16) >> 16
vendor: 30,681 bytes, lines 10843-11754
10843; 10844 j += 2; 10845 stackSize++; 10846 } else if (value === 14) { 10847 if (stackSize >= 4) { 10848 stackSize -= 4; 10849 if (this.seacAnalysisEnabled) { 10850 state.seac = stack.slice(stackSize, stackSize + 4); 10851 return false; 10852 } 10853 } 10854 validationCommand = CharstringValidationData[value]; 10855 } else if (value >= 32 && value <= 246) { 10856 stack[stackSize] = value - 139; 10857 stackSize++; 10858 } else if (value >= 247 && value <= 254) { 10859 stack[stackSize] = value < 251 ? (value - 247 << 8) + data[j] + 108 : -(value - 251 << 8) - data[j] - 108; 10860 j++; 10861 stackSize++; 10862 } else if (value === 255) { 10863 stack[stackSize] = (data[j] << 24 | data[j + 1] << 16 | data[j + 2] << 8 | data[j + 3]) / 65536; 10864 j += 4; 10865 stackSize++; 10866 } else if (value === 19 || value === 20) { 10867 state.hints += stackSize >> 1; 10868 if (state.hints === 0) { 10869 data.copyWithin(j - 1, j, -1); 10870 j -= 1; 10871 length -= 1; 10872 continue; 10873 } 10874 j += state.hints + 7 >> 3; 10875 stackSize %= 2; 10876 validationCommand = CharstringValidationData[value]; 10877 } else if (value === 10 || value === 29) { 10878 const subrsIndex = value === 10 ? localSubrIndex : globalSubrIndex; 10879 if (!subrsIndex) { 10880 validationCommand = CharstringValidationData[value]; 10881 warn("Missing subrsIndex for " + validationCommand.id); 10882 return false; 10883 } 10884 let bias = 32768; 10885 if (subrsIndex.count < 1240) { 10886 bias = 107; 10887 } else if (subrsIndex.count < 33900) { 10888 bias = 1131; 10889 } 10890 const subrNumber = stack[--stackSize] + bias; 10891 if (subrNumber < 0 || subrNumber >= subrsIndex.count || isNaN(subrNumber)) { 10892 validationCommand = CharstringValidationData[value]; 10893 warn("Out of bounds subrIndex for " + validationCommand.id); 10894 return false; 10895 } 10896 state.stackSize = stackSize; 10897 state.callDepth++; 10898 const valid = this.parseCharString(state, subrsIndex.get(subrNumber), localSubrIndex, globalSubrIndex); 10899 if (!valid) { 10900 return false; 10901 } 10902 state.callDepth--; 10903 stackSize = state.stackSize; 10904 continue; 10905 } else if (value === 11) { 10906 state.stackSize = stackSize; 10907 return true; 10908 } else if (value === 0 && j === data.length) { 10909 data[j - 1] = 14; 10910 validationCommand = CharstringValidationData[14]; 10911 } else if (value === 9) { 10912 data.copyWithin(j - 1, j, -1); 10913 j -= 1; 10914 length -= 1; 10915 continue; 10916 } else { 10917 validationCommand = CharstringValidationData[value]; 10918 } 10919 if (validationCommand) { 10920 if (validationCommand.stem) { 10921 state.hints += stackSize >> 1; 10922 if (value === 3 || value === 23) { 10923 state.hasVStems = true; 10924 } else if (state.hasVStems && (value === 1 || value === 18)) { 10925 warn("CFF stem hints are in wrong order"); 10926 data[j - 1] = value === 1 ? 3 : 23; 10927 } 10928 } 10929 if ("min" in validationCommand) { 10930 if (!state.undefStack && stackSize < validationCommand.min) { 10931 warn("Not enough parameters for " + validationCommand.id + "; actual: " + stackSize + ", expected: " + validationCommand.min); 10932 if (stackSize === 0) { 10933 data[j - 1] = 14; 10934 return true; 10935 } 10936 return false; 10937 } 10938 } 10939 if (state.firstStackClearing && validationCommand.stackClearing) { 10940 state.firstStackClearing = false; 10941 stackSize -= validationCommand.min; 10942 if (stackSize >= 2 && validationCommand.stem) { 10943 stackSize %= 2; 10944 } else if (stackSize > 1) { 10945 warn("Found too many parameters for stack-clearing command"); 10946 } 10947 if (stackSize > 0) { 10948 state.width = stack[stackSize - 1]; 10949 } 10950 } 10951 if ("stackDelta" in validationCommand) { 10952 if ("stackFn" in validationCommand) { 10953 validationCommand.stackFn(stack, stackSize); 10954 } 10955 stackSize += validationCommand.stackDelta; 10956 } else if (validationCommand.stackClearing) { 10957 stackSize = 0; 10958 } else if (validationCommand.resetStack) { 10959 stackSize = 0; 10960 state.undefStack = false; 10961 } else if (validationCommand.undefStack) { 10962 stackSize = 0; 10963 state.undefStack = true; 10964 state.firstStackClearing = false; 10965 } 10966 } 10967 } 10968 if (length < data.length) { 10969 data.fill(14, length); 10970 } 10971 state.stackSize = stackSize; 10972 return true; 10973 } 10974 parseCharStrings({ 10975 charStrings, 10976 localSubrIndex, 10977 globalSubrIndex, 10978 fdSelect, 10979 fdArray, 10980 privateDict 10981 }) { 10982 const seacs = []; 10983 const widths = []; 10984 const count = charStrings.count; 10985 for (let i = 0; i < count; i++) { 10986 const charstring = charStrings.get(i); 10987 const state = { 10988 callDepth: 0, 10989 stackSize: 0, 10990 stack: [], 10991 undefStack: true, 10992 hints: 0, 10993 firstStackClearing: true, 10994 seac: null, 10995 width: null, 10996 hasVStems: false 10997 }; 10998 let valid = true; 10999 let localSubrToUse = null; 11000 let privateDictToUse = privateDict; 11001 if (fdSelect && fdArray.length) { 11002 const fdIndex = fdSelect.getFDIndex(i); 11003 if (fdIndex === -1) { 11004 warn("Glyph index is not in fd select."); 11005 valid = false; 11006 } 11007 if (fdIndex >= fdArray.length) { 11008 warn("Invalid fd index for glyph index."); 11009 valid = false; 11010 } 11011 if (valid) { 11012 privateDictToUse = fdArray[fdIndex].privateDict; 11013 localSubrToUse = privateDictToUse.subrsIndex; 11014 } 11015 } else if (localSubrIndex) { 11016 localSubrToUse = localSubrIndex; 11017 } 11018 if (valid) { 11019 valid = this.parseCharString(state, charstring, localSubrToUse, globalSubrIndex); 11020 } 11021 if (state.width !== null) { 11022 const nominalWidth = privateDictToUse.getByName("nominalWidthX"); 11023 widths[i] = nominalWidth + state.width; 11024 } else { 11025 const defaultWidth = privateDictToUse.getByName("defaultWidthX"); 11026 widths[i] = defaultWidth; 11027 } 11028 if (state.seac !== null) { 11029 seacs[i] = state.seac; 11030 } 11031 if (!valid) { 11032 charStrings.set(i, new Uint8Array([14])); 11033 } 11034 } 11035 return { 11036 charStrings, 11037 seacs, 11038 widths 11039 }; 11040 } 11041 emptyPrivateDictionary(parentDict) { 11042 const privateDict = this.createDict(CFFPrivateDict, [], parentDict.strings); 11043 parentDict.setByKey(18, [0, 0]); 11044 parentDict.privateDict = privateDict; 11045 } 11046 parsePrivateDict(parentDict) { 11047 if (!parentDict.hasName("Private")) { 11048 this.emptyPrivateDictionary(parentDict); 11049 return; 11050 } 11051 const privateOffset = parentDict.getByName("Private"); 11052 if (!Array.isArray(privateOffset) || privateOffset.length !== 2) { 11053 parentDict.removeByName("Private"); 11054 return; 11055 } 11056 const size = privateOffset[0]; 11057 const offset = privateOffset[1]; 11058 if (size === 0 || offset >= this.bytes.length) { 11059 this.emptyPrivateDictionary(parentDict); 11060 return; 11061 } 11062 const privateDictEnd = offset + size; 11063 const dictData = this.bytes.subarray(offset, privateDictEnd); 11064 const dict = this.parseDict(dictData); 11065 const privateDict = this.createDict(CFFPrivateDict, dict, parentDict.strings); 11066 parentDict.privateDict = privateDict; 11067 if (privateDict.getByName("ExpansionFactor") === 0) { 11068 privateDict.setByName("ExpansionFactor", 0.06); 11069 } 11070 if (!privateDict.getByName("Subrs")) { 11071 return; 11072 } 11073 const subrsOffset = privateDict.getByName("Subrs"); 11074 const relativeOffset = offset + subrsOffset; 11075 if (subrsOffset === 0 || relativeOffset >= this.bytes.length) { 11076 this.emptyPrivateDictionary(parentDict); 11077 return; 11078 } 11079 const subrsIndex = this.parseIndex(relativeOffset); 11080 privateDict.subrsIndex = subrsIndex.obj; 11081 } 11082 parseCharsets(pos, length, strings, cid) { 11083 if (pos === 0) { 11084 return new CFFCharset(true, CFFCharsetPredefinedTypes.ISO_ADOBE, ISOAdobeCharset); 11085 } else if (pos === 1) { 11086 return new CFFCharset(true, CFFCharsetPredefinedTypes.EXPERT, ExpertCharset); 11087 } else if (pos === 2) { 11088 return new CFFCharset(true, CFFCharsetPredefinedTypes.EXPERT_SUBSET, ExpertSubsetCharset); 11089 } 11090 const bytes = this.bytes; 11091 const start = pos; 11092 const format = bytes[pos++]; 11093 const charset = [cid ? 0 : ".notdef"]; 11094 let id, count, i; 11095 length -= 1; 11096 switch (format) { 11097 case 0: 11098 for (i = 0; i < length; i++) { 11099 id = bytes[pos++] << 8 | bytes[pos++]; 11100 charset.push(cid ? id : strings.get(id)); 11101 } 11102 break; 11103 case 1: 11104 while (charset.length <= length) { 11105 id = bytes[pos++] << 8 | bytes[pos++]; 11106 count = bytes[pos++]; 11107 for (i = 0; i <= count; i++) { 11108 charset.push(cid ? id++ : strings.get(id++)); 11109 } 11110 } 11111 break; 11112 case 2: 11113 while (charset.length <= length) { 11114 id = bytes[pos++] << 8 | bytes[pos++]; 11115 count = bytes[pos++] << 8 | bytes[pos++]; 11116 for (i = 0; i <= count; i++) { 11117 charset.push(cid ? id++ : strings.get(id++)); 11118 } 11119 } 11120 break; 11121 default: 11122 throw new FormatError("Unknown charset format"); 11123 } 11124 const end = pos; 11125 const raw = bytes.subarray(start, end); 11126 return new CFFCharset(false, format, charset, raw); 11127 } 11128 parseEncoding(pos, properties, strings, charset) { 11129 const encoding = Object.create(null); 11130 const bytes = this.bytes; 11131 let predefined = false; 11132 let format, i, ii; 11133 let raw = null; 11134 function readSupplement() { 11135 const supplementsCount = bytes[pos++]; 11136 for (i = 0; i < supplementsCount; i++) { 11137 const code = bytes[pos++]; 11138 const sid = (bytes[pos++] << 8) + (bytes[pos++] & 0xff); 11139 encoding[code] = charset.indexOf(strings.get(sid)); 11140 } 11141 } 11142 if (pos === 0 || pos === 1) { 11143 predefined = true; 11144 format = pos; 11145 const baseEncoding = pos ? ExpertEncoding : StandardEncoding; 11146 for (i = 0, ii = charset.length; i < ii; i++) { 11147 const index = baseEncoding.indexOf(charset[i]); 11148 if (index !== -1) { 11149 encoding[index] = i; 11150 } 11151 } 11152 } else { 11153 const dataStart = pos; 11154 format = bytes[pos++]; 11155 switch (format & 0x7f) { 11156 case 0: 11157 const glyphsCount = bytes[pos++]; 11158 for (i = 1; i <= glyphsCount; i++) { 11159 encoding[bytes[pos++]] = i; 11160 } 11161 break; 11162 case 1: 11163 const rangesCount = bytes[pos++]; 11164 let gid = 1; 11165 for (i = 0; i < rangesCount; i++) { 11166 const start = bytes[pos++]; 11167 const left = bytes[pos++]; 11168 for (let j = start; j <= start + left; j++) { 11169 encoding[j] = gid++; 11170 } 11171 } 11172 break; 11173 default: 11174 throw new FormatError(`Unknown encoding format: ${format} in CFF`); 11175 } 11176 const dataEnd = pos; 11177 if (format & 0x80) { 11178 bytes[dataStart] &= 0x7f; 11179 readSupplement(); 11180 } 11181 raw = bytes.subarray(dataStart, dataEnd); 11182 } 11183 format &= 0x7f; 11184 return new CFFEncoding(predefined, format, encoding, raw); 11185 } 11186 parseFDSelect(pos, length) { 11187 const bytes = this.bytes; 11188 const format = bytes[pos++]; 11189 const fdSelect = []; 11190 let i; 11191 switch (format) { 11192 case 0: 11193 for (i = 0; i < length; ++i) { 11194 const id = bytes[pos++]; 11195 fdSelect.push(id); 11196 } 11197 break; 11198 case 3: 11199 const rangesCount = bytes[pos++] << 8 | bytes[pos++]; 11200 for (i = 0; i < rangesCount; ++i) { 11201 let first = bytes[pos++] << 8 | bytes[pos++]; 11202 if (i === 0 && first !== 0) { 11203 warn("parseFDSelect: The first range must have a first GID of 0" + " -- trying to recover."); 11204 first = 0; 11205 } 11206 const fdIndex = bytes[pos++]; 11207 const next = bytes[pos] << 8 | bytes[pos + 1]; 11208 for (let j = first; j < next; ++j) { 11209 fdSelect.push(fdIndex); 11210 } 11211 } 11212 pos += 2; 11213 break; 11214 default: 11215 throw new FormatError(`parseFDSelect: Unknown format "${format}".`); 11216 } 11217 if (fdSelect.length !== length) { 11218 throw new FormatError("parseFDSelect: Invalid font data."); 11219 } 11220 return new CFFFDSelect(format, fdSelect); 11221 } 11222} 11223class CFF { 11224 constructor() { 11225 this.header = null; 11226 this.names = []; 11227 this.topDict = null; 11228 this.strings = new CFFStrings(); 11229 this.globalSubrIndex = null; 11230 this.encoding = null; 11231 this.charset = null; 11232 this.charStrings = null; 11233 this.fdArray = []; 11234 this.fdSelect = null; 11235 this.isCIDFont = false; 11236 } 11237 duplicateFirstGlyph() { 11238 if (this.charStrings.count >= 65535) { 11239 warn("Not enough space in charstrings to duplicate first glyph."); 11240 return; 11241 } 11242 const glyphZero = this.charStrings.get(0); 11243 this.charStrings.add(glyphZero); 11244 if (this.isCIDFont) { 11245 this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0]); 11246 } 11247 } 11248 hasGlyphId(id) { 11249 if (id < 0 || id >= this.charStrings.count) { 11250 return false; 11251 } 11252 const glyph = this.charStrings.get(id); 11253 return glyph.length > 0; 11254 } 11255} 11256class CFFHeader { 11257 constructor(major, minor, hdrSize, offSize) { 11258 this.major = major; 11259 this.minor = minor; 11260 this.hdrSize = hdrSize; 11261 this.offSize = offSize; 11262 } 11263} 11264class CFFStrings { 11265 constructor() { 11266 this.strings = []; 11267 } 11268 get(index) { 11269 if (index >= 0 && index <= NUM_STANDARD_CFF_STRINGS - 1) { 11270 return CFFStandardStrings[index]; 11271 } 11272 if (index - NUM_STANDARD_CFF_STRINGS <= this.strings.length) { 11273 return this.strings[index - NUM_STANDARD_CFF_STRINGS]; 11274 } 11275 return CFFStandardStrings[0]; 11276 } 11277 getSID(str) { 11278 let index = CFFStandardStrings.indexOf(str); 11279 if (index !== -1) { 11280 return index; 11281 } 11282 index = this.strings.indexOf(str); 11283 if (index !== -1) { 11284 return index + NUM_STANDARD_CFF_STRINGS; 11285 } 11286 return -1; 11287 } 11288 add(value) { 11289 this.strings.push(value); 11290 } 11291 get count() { 11292 return this.strings.length; 11293 } 11294} 11295class CFFIndex { 11296 constructor() { 11297 this.objects = []; 11298 this.length = 0; 11299 } 11300 add(data) { 11301 this.length += data.length; 11302 this.objects.push(data); 11303 } 11304 set(index, data) { 11305 this.length += data.length - this.objects[index].length; 11306 this.objects[index] = data; 11307 } 11308 get(index) { 11309 return this.objects[index]; 11310 } 11311 get count() { 11312 return this.objects.length; 11313 } 11314} 11315class CFFDict { 11316 constructor(tables, strings) { 11317 this.keyToNameMap = tables.keyToNameMap; 11318 this.nameToKeyMap = tables.nameToKeyMap; 11319 this.defaults = tables.defaults; 11320 this.types = tables.types; 11321 this.opcodes = tables.opcodes; 11322 this.order = tables.order; 11323 this.strings = strings; 11324 this.values = Object.create(null); 11325 } 11326 setByKey(key, value) { 11327 if (!(key in this.keyToNameMap)) { 11328 return false; 11329 } 11330 if (value.length === 0) { 11331 return true; 11332 } 11333 for (const val of value) { 11334 if (isNaN(val)) { 11335 warn(`Invalid CFFDict value: "${value}" for key "${key}".`); 11336 return true; 11337 } 11338 } 11339 const type = this.types[key]; 11340 if (type === "num" || type === "sid" || type === "offset") { 11341 value = value[0]; 11342 } 11343 this.values[key] = value; 11344 return true; 11345 } 11346 setByName(name, value) { 11347 if (!(name in this.nameToKeyMap)) { 11348 throw new FormatError(`Invalid dictionary name "${name}"`); 11349 } 11350 this.values[this.nameToKeyMap[name]] = value; 11351 } 11352 hasName(name) { 11353 return this.nameToKeyMap[name] in this.values; 11354 } 11355 getByName(name) { 11356 if (!(name in this.nameToKeyMap)) { 11357 throw new FormatError(`Invalid dictionary name ${name}"`); 11358 } 11359 const key = this.nameToKeyMap[name]; 11360 if (!(key in this.values)) { 11361 return this.defaults[key]; 11362 } 11363 return this.values[key]; 11364 } 11365 removeByName(name) { 11366 delete this.values[this.nameToKeyMap[name]]; 11367 } 11368 static createTables(layout) { 11369 const tables = { 11370 keyToNameMap: {}, 11371 nameToKeyMap: {}, 11372 defaults: {}, 11373 types: {}, 11374 opcodes: {}, 11375 order: [] 11376 }; 11377 for (const entry of layout) { 11378 const key = Array.isArray(entry[0]) ? (entry[0][0] << 8) + entry[0][1] : entry[0]; 11379 tables.keyToNameMap[key] = entry[1]; 11380 tables.nameToKeyMap[entry[1]] = key; 11381 tables.types[key] = entry[2]; 11382 tables.defaults[key] = entry[3]; 11383 tables.opcodes[key] = Array.isArray(entry[0]) ? entry[0] : [entry[0]]; 11384 tables.order.push(key); 11385 } 11386 return tables; 11387 } 11388} 11389const CFFTopDictLayout = [[[12, 30], "ROS", ["sid", "sid", "num"], null], [[12, 20], "SyntheticBase", "num", null], [0, "version", "sid", null], [1, "Notice", "sid", null], [[12, 0], "Copyright", "sid", null], [2, "FullName", "sid", null], [3, "FamilyName", "sid", null], [4, "Weight", "sid", null], [[12, 1], "isFixedPitch", "num", 0], [[12, 2], "ItalicAngle", "num", 0], [[12, 3], "UnderlinePosition", "num", -100], [[12, 4], "UnderlineThickness", "num", 50], [[12, 5], "PaintType", "num", 0], [[12, 6], "CharstringType", "num", 2], [[12, 7], "FontMatrix", ["num", "num", "num", "num", "num", "num"], [0.001, 0, 0, 0.001, 0, 0]], [13, "UniqueID", "num", null], [5, "FontBBox", ["num", "num", "num", "num"], [0, 0, 0, 0]], [[12, 8], "StrokeWidth", "num", 0], [14, "XUID", "array", null], [15, "charset", "offset", 0], [16, "Encoding", "offset", 0], [17, "CharStrings", "offset", 0], [18, "Private", ["offset", "offset"], null], [[12, 21], "PostScript", "sid", null], [[12, 22], "BaseFontName", "sid", null], [[12, 23], "BaseFontBlend", "delta", null], [[12, 31], "CIDFontVersion", "num", 0], [[12, 32], "CIDFontRevision", "num", 0], [[12, 33], "CIDFontType", "num", 0], [[12, 34], "CIDCount", "num", 8720], [[12, 35], "UIDBase", "num", null], [[12, 37], "FDSelect", "offset", null], [[12, 36], "FDArray", "offset", null], [[12, 38], "FontName", "sid", null]]; 11390class CFFTopDict extends CFFDict { 11391 static get tables() { 11392 return shadow(this, "tables", this.createTables(CFFTopDictLayout)); 11393 } 11394 constructor(strings) { 11395 super(CFFTopDict.tables, strings); 11396 this.privateDict = null; 11397 } 11398} 11399const CFFPrivateDictLayout = [[6, "BlueValues", "delta", null], [7, "OtherBlues", "delta", null], [8, "FamilyBlues", "delta", null], [9, "FamilyOtherBlues", "delta", null], [[12, 9], "BlueScale", "num", 0.039625], [[12, 10], "BlueShift", "num", 7], [[12, 11], "BlueFuzz", "num", 1], [10, "StdHW", "num", null], [11, "StdVW", "num", null], [[12, 12], "StemSnapH", "delta", null], [[12, 13], "StemSnapV", "delta", null], [[12, 14], "ForceBold", "num", 0], [[12, 17], "LanguageGroup", "num", 0], [[12, 18], "ExpansionFactor", "num", 0.06], [[12, 19], "initialRandomSeed", "num", 0], [20, "defaultWidthX", "num", 0], [21, "nominalWidthX", "num", 0], [19, "Subrs", "offset", null]]; 11400class CFFPrivateDict extends CFFDict { 11401 static get tables() { 11402 return shadow(this, "tables", this.createTables(CFFPrivateDictLayout)); 11403 } 11404 constructor(strings) { 11405 super(CFFPrivateDict.tables, strings); 11406 this.subrsIndex = null; 11407 } 11408} 11409const CFFCharsetPredefinedTypes = { 11410 ISO_ADOBE: 0, 11411 EXPERT: 1, 11412 EXPERT_SUBSET: 2 11413}; 11414class CFFCharset { 11415 constructor(predefined, format, charset, raw) { 11416 this.predefined = predefined; 11417 this.format = format; 11418 this.charset = charset; 11419 this.raw = raw; 11420 } 11421} 11422class CFFEncoding { 11423 constructor(predefined, format, encoding, raw) { 11424 this.predefined = predefined; 11425 this.format = format; 11426 this.encoding = encoding; 11427 this.raw = raw; 11428 } 11429} 11430class CFFFDSelect { 11431 constructor(format, fdSelect) { 11432 this.format = format; 11433 this.fdSelect = fdSelect; 11434 } 11435 getFDIndex(glyphIndex) { 11436 if (glyphIndex < 0 || glyphIndex >= this.fdSelect.length) { 11437 return -1; 11438 } 11439 return this.fdSelect[glyphIndex]; 11440 } 11441} 11442class CFFOffsetTracker { 11443 constructor() { 11444 this.offsets = Object.create(null); 11445 } 11446 isTracking(key) { 11447 return key in this.offsets; 11448 } 11449 track(key, location) { 11450 if (key in this.offsets) { 11451 throw new FormatError(`Already tracking location of ${key}`); 11452 } 11453 this.offsets[key] = location; 11454 } 11455 offset(value) { 11456 for (const key in this.offsets) { 11457 this.offsets[key] += value; 11458 } 11459 } 11460 setEntryLocation(key, values, output) { 11461 if (!(key in this.offsets)) { 11462 throw new FormatError(`Not tracking location of ${key}`); 11463 } 11464 const data = output.data; 11465 const dataOffset = this.offsets[key]; 11466 const size = 5; 11467 for (let i = 0, ii = values.length; i < ii; ++i) { 11468 const offset0 = i * size + dataOffset; 11469 const offset1 = offset0 + 1; 11470 const offset2 = offset0 + 2; 11471 const offset3 = offset0 + 3; 11472 const offset4 = offset0 + 4; 11473 if (data[offset0] !== 0x1d || data[offset1] !== 0 || data[offset2] !== 0 || data[offset3] !== 0 || data[offset4] !== 0) { 11474 throw new FormatError("writing to an offset that is not empty"); 11475 } 11476 const value = values[i]; 11477 data[offset0] = 0x1d; 11478 data[offset1] = value >> 24 & 0xff; 11479 data[offset2] = value >> 16 & 0xff; 11480 data[offset3] = value >> 8 & 0xff; 11481 data[offset4] = value & 0xff; 11482 } 11483 } 11484} 11485class CFFCompiler { 11486 constructor(cff) { 11487 this.cff = cff; 11488 } 11489 compile() { 11490 const cff = this.cff; 11491 const output = { 11492 data: [], 11493 length: 0, 11494 add(data) { 11495 try { 11496 this.data.push(...data); 11497 } catch { 11498 this.data = this.data.concat(data); 11499 } 11500 this.length = this.data.length; 11501 } 11502 }; 11503 const header = this.compileHeader(cff.header); 11504 output.add(header); 11505 const nameIndex = this.compileNameIndex(cff.names); 11506 output.add(nameIndex); 11507 if (cff.isCIDFont) { 11508 if (cff.topDict.hasName("FontMatrix")) { 11509 const base = cff.topDict.getByName("FontMatrix"); 11510 cff.topDict.removeByName("FontMatrix"); 11511 for (const subDict of cff.fdArray) { 11512 let matrix = base.slice(0); 11513 if (subDict.hasName("FontMatrix")) { 11514 matrix = Util.transform(matrix, subDict.getByName("FontMatrix")); 11515 } 11516 subDict.setByName("FontMatrix", matrix); 11517 } 11518 } 11519 } 11520 const xuid = cff.topDict.getByName("XUID"); 11521 if (xuid?.length > 16) { 11522 cff.topDict.removeByName("XUID"); 11523 } 11524 cff.topDict.setByName("charset", 0); 11525 let compiled = this.compileTopDicts([cff.topDict], output.length, cff.isCIDFont); 11526 output.add(compiled.output); 11527 const topDictTracker = compiled.trackers[0]; 11528 const stringIndex = this.compileStringIndex(cff.strings.strings); 11529 output.add(stringIndex); 11530 const globalSubrIndex = this.compileIndex(cff.globalSubrIndex); 11531 output.add(globalSubrIndex); 11532 if (cff.encoding && cff.topDict.hasName("Encoding")) { 11533 if (cff.encoding.predefined) { 11534 topDictTracker.setEntryLocation("Encoding", [cff.encoding.format], output); 11535 } else { 11536 const encoding = this.compileEncoding(cff.encoding); 11537 topDictTracker.setEntryLocation("Encoding", [output.length], output); 11538 output.add(encoding); 11539 } 11540 } 11541 const charset = this.compileCharset(cff.charset, cff.charStrings.count, cff.strings, cff.isCIDFont); 11542 topDictTracker.setEntryLocation("charset", [output.length], output); 11543 output.add(charset); 11544 const charStrings = this.compileCharStrings(cff.charStrings); 11545 topDictTracker.setEntryLocation("CharStrings", [output.length], output); 11546 output.add(charStrings); 11547 if (cff.isCIDFont) { 11548 topDictTracker.setEntryLocation("FDSelect", [output.length], output); 11549 const fdSelect = this.compileFDSelect(cff.fdSelect); 11550 output.add(fdSelect); 11551 compiled = this.compileTopDicts(cff.fdArray, output.length, true); 11552 topDictTracker.setEntryLocation("FDArray", [output.length], output); 11553 output.add(compiled.output); 11554 const fontDictTrackers = compiled.trackers; 11555 this.compilePrivateDicts(cff.fdArray, fontDictTrackers, output); 11556 } 11557 this.compilePrivateDicts([cff.topDict], [topDictTracker], output); 11558 output.add([0]); 11559 return output.data; 11560 } 11561 encodeNumber(value) { 11562 if (Number.isInteger(value)) { 11563 return this.encodeInteger(value); 11564 } 11565 return this.encodeFloat(value); 11566 } 11567 static get EncodeFloatRegExp() { 11568 return shadow(this, "EncodeFloatRegExp", /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/); 11569 } 11570 encodeFloat(num) { 11571 let value = num.toString(); 11572 const m = CFFCompiler.EncodeFloatRegExp.exec(value); 11573 if (m) { 11574 const epsilon = parseFloat("1e" + ((m[2] ? +m[2] : 0) + m[1].length)); 11575 value = (Math.round(num * epsilon) / epsilon).toString(); 11576 } 11577 let nibbles = ""; 11578 let i, ii; 11579 for (i = 0, ii = value.length; i < ii; ++i) { 11580 const a = value[i]; 11581 if (a === "e") { 11582 nibbles += value[++i] === "-" ? "c" : "b"; 11583 } else if (a === ".") { 11584 nibbles += "a"; 11585 } else if (a === "-") { 11586 nibbles += "e"; 11587 } else { 11588 nibbles += a; 11589 } 11590 } 11591 nibbles += nibbles.length & 1 ? "f" : "ff"; 11592 const out = [30]; 11593 for (i = 0, ii = nibbles.length; i < ii; i += 2) { 11594 out.push(parseInt(nibbles.substring(i, i + 2), 16)); 11595 } 11596 return out; 11597 } 11598 encodeInteger(value) { 11599 let code; 11600 if (value >= -107 && value <= 107) { 11601 code = [value + 139]; 11602 } else if (value >= 108 && value <= 1131) { 11603 value -= 108; 11604 code = [(value >> 8) + 247, value & 0xff]; 11605 } else if (value >= -1131 && value <= -108) { 11606 value = -value - 108; 11607 code = [(value >> 8) + 251, value & 0xff]; 11608 } else if (value >= -32768 && value <= 32767) { 11609 code = [0x1c, value >> 8 & 0xff, value & 0xff]; 11610 } else { 11611 code = [0x1d, value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff]; 11612 } 11613 return code; 11614 } 11615 compileHeader(header) { 11616 return [header.major, header.minor, 4, header.offSize]; 11617 } 11618 compileNameIndex(names) { 11619 const nameIndex = new CFFIndex(); 11620 for (const name of names) { 11621 const length = Math.min(name.length, 127); 11622 let sanitizedName = new Array(length); 11623 for (let j = 0; j < length; j++) { 11624 let char = name[j]; 11625 if (char < "!" || char > "~" || char === "[" || char === "]" || char === "(" || char === ")" || char === "{" || char === "}" || char === "<" || char === ">" || char === "/" || char === "%") { 11626 char = "_"; 11627 } 11628 sanitizedName[j] = char; 11629 } 11630 sanitizedName = sanitizedName.join(""); 11631 if (sanitizedName === "") { 11632 sanitizedName = "Bad_Font_Name"; 11633 } 11634 nameIndex.add(stringToBytes(sanitizedName)); 11635 } 11636 return this.compileIndex(nameIndex); 11637 } 11638 compileTopDicts(dicts, length, removeCidKeys) { 11639 const fontDictTrackers = []; 11640 let fdArrayIndex = new CFFIndex(); 11641 for (const fontDict of dicts) { 11642 if (removeCidKeys) { 11643 fontDict.removeByName("CIDFontVersion"); 11644 fontDict.removeByName("CIDFontRevision"); 11645 fontDict.removeByName("CIDFontType"); 11646 fontDict.removeByName("CIDCount"); 11647 fontDict.removeByName("UIDBase"); 11648 } 11649 const fontDictTracker = new CFFOffsetTracker(); 11650 const fontDictData = this.compileDict(fontDict, fontDictTracker); 11651 fontDictTrackers.push(fontDictTracker); 11652 fdArrayIndex.add(fontDictData); 11653 fontDictTracker.offset(length); 11654 } 11655 fdArrayIndex = this.compileIndex(fdArrayIndex, fontDictTrackers); 11656 return { 11657 trackers: fontDictTrackers, 11658 output: fdArrayIndex 11659 }; 11660 } 11661 compilePrivateDicts(dicts, trackers, output) { 11662 for (let i = 0, ii = dicts.length; i < ii; ++i) { 11663 const fontDict = dicts[i]; 11664 const privateDict = fontDict.privateDict; 11665 if (!privateDict || !fontDict.hasName("Private")) { 11666 throw new FormatError("There must be a private dictionary."); 11667 } 11668 const privateDictTracker = new CFFOffsetTracker(); 11669 const privateDictData = this.compileDict(privateDict, privateDictTracker); 11670 let outputLength = output.length; 11671 privateDictTracker.offset(outputLength); 11672 if (!privateDictData.length) { 11673 outputLength = 0; 11674 } 11675 trackers[i].setEntryLocation("Private", [privateDictData.length, outputLength], output); 11676 output.add(privateDictData); 11677 if (privateDict.subrsIndex && privateDict.hasName("Subrs")) { 11678 const subrs = this.compileIndex(privateDict.subrsIndex); 11679 privateDictTracker.setEntryLocation("Subrs", [privateDictData.length], output); 11680 output.add(subrs); 11681 } 11682 } 11683 } 11684 compileDict(dict, offsetTracker) { 11685 const out = []; 11686 for (const key of dict.order) { 11687 if (!(key in dict.values)) { 11688 continue; 11689 } 11690 let values = dict.values[key]; 11691 let types = dict.types[key]; 11692 if (!Array.isArray(types)) { 11693 types = [types]; 11694 } 11695 if (!Array.isArray(values)) { 11696 values = [values]; 11697 } 11698 if (values.length === 0) { 11699 continue; 11700 } 11701 for (let j = 0, jj = types.length; j < jj; ++j) { 11702 const type = types[j]; 11703 const value = values[j]; 11704 switch (type) { 11705 case "num": 11706 case "sid": 11707 out.push(...this.encodeNumber(value)); 11708 break; 11709 case "offset": 11710 const name = dict.keyToNameMap[key]; 11711 if (!offsetTracker.isTracking(name)) { 11712 offsetTracker.track(name, out.length); 11713 } 11714 out.push(0x1d, 0, 0, 0, 0); 11715 break; 11716 case "array": 11717 case "delta": 11718 out.push(...this.encodeNumber(value)); 11719 for (let k = 1, kk = values.length; k < kk; ++k) { 11720 out.push(...this.encodeNumber(values[k])); 11721 } 11722 break; 11723 default: 11724 throw new FormatError(`Unknown data type of ${type}`); 11725 } 11726 } 11727 out.push(...dict.opcodes[key]); 11728 } 11729 return out; 11730 } 11731 compileStringIndex(strings) { 11732 const stringIndex = new CFFIndex(); 11733 for (const string of strings) { 11734 stringIndex.add(stringToBytes(string)); 11735 } 11736 return this.compileIndex(stringIndex); 11737 } 11738 compileCharStrings(charStrings) { 11739 const charStringsIndex = new CFFIndex(); 11740 for (let i = 0; i < charStrings.count; i++) { 11741 const glyph = charStrings.get(i); 11742 if (glyph.length === 0) { 11743 charStringsIndex.add(new Uint8Array([0x8b, 0x0e])); 11744 continue; 11745 } 11746 charStringsIndex.add(glyph); 11747 } 11748 return this.compileIndex(charStringsIndex); 11749 } 11750 compileCharset(charset, numGlyphs, strings, isCIDFont) { 11751 let out; 11752 const numGlyphsLessNotDef = numGlyphs - 1; 11753 if (isCIDFont) { 11754
vendor: 3,386 bytes, lines 11754-11862
11754out = new Uint8Array([2, 0, 0, numGlyphsLessNotDef >> 8 & 0xff, numGlyphsLessNotDef & 0xff]); 11755 } else { 11756 const length = 1 + numGlyphsLessNotDef * 2; 11757 out = new Uint8Array(length); 11758 out[0] = 0; 11759 let charsetIndex = 0; 11760 const numCharsets = charset.charset.length; 11761 let warned = false; 11762 for (let i = 1; i < out.length; i += 2) { 11763 let sid = 0; 11764 if (charsetIndex < numCharsets) { 11765 const name = charset.charset[charsetIndex++]; 11766 sid = strings.getSID(name); 11767 if (sid === -1) { 11768 sid = 0; 11769 if (!warned) { 11770 warned = true; 11771 warn(`Couldn't find ${name} in CFF strings`); 11772 } 11773 } 11774 } 11775 out[i] = sid >> 8 & 0xff; 11776 out[i + 1] = sid & 0xff; 11777 } 11778 } 11779 return this.compileTypedArray(out); 11780 } 11781 compileEncoding(encoding) { 11782 return this.compileTypedArray(encoding.raw); 11783 } 11784 compileFDSelect(fdSelect) { 11785 const format = fdSelect.format; 11786 let out, i; 11787 switch (format) { 11788 case 0: 11789 out = new Uint8Array(1 + fdSelect.fdSelect.length); 11790 out[0] = format; 11791 for (i = 0; i < fdSelect.fdSelect.length; i++) { 11792 out[i + 1] = fdSelect.fdSelect[i]; 11793 } 11794 break; 11795 case 3: 11796 const start = 0; 11797 let lastFD = fdSelect.fdSelect[0]; 11798 const ranges = [format, 0, 0, start >> 8 & 0xff, start & 0xff, lastFD]; 11799 for (i = 1; i < fdSelect.fdSelect.length; i++) { 11800 const currentFD = fdSelect.fdSelect[i]; 11801 if (currentFD !== lastFD) { 11802 ranges.push(i >> 8 & 0xff, i & 0xff, currentFD); 11803 lastFD = currentFD; 11804 } 11805 } 11806 const numRanges = (ranges.length - 3) / 3; 11807 ranges[1] = numRanges >> 8 & 0xff; 11808 ranges[2] = numRanges & 0xff; 11809 ranges.push(i >> 8 & 0xff, i & 0xff); 11810 out = new Uint8Array(ranges); 11811 break; 11812 } 11813 return this.compileTypedArray(out); 11814 } 11815 compileTypedArray(data) { 11816 return Array.from(data); 11817 } 11818 compileIndex(index, trackers = []) { 11819 const objects = index.objects; 11820 const count = objects.length; 11821 if (count === 0) { 11822 return [0, 0]; 11823 } 11824 const data = [count >> 8 & 0xff, count & 0xff]; 11825 let lastOffset = 1, 11826 i; 11827 for (i = 0; i < count; ++i) { 11828 lastOffset += objects[i].length; 11829 } 11830 let offsetSize; 11831 if (lastOffset < 0x100) { 11832 offsetSize = 1; 11833 } else if (lastOffset < 0x10000) { 11834 offsetSize = 2; 11835 } else if (lastOffset < 0x1000000) { 11836 offsetSize = 3; 11837 } else { 11838 offsetSize = 4; 11839 } 11840 data.push(offsetSize); 11841 let relativeOffset = 1; 11842 for (i = 0; i < count + 1; i++) { 11843 if (offsetSize === 1) { 11844 data.push(relativeOffset & 0xff); 11845 } else if (offsetSize === 2) { 11846 data.push(relativeOffset >> 8 & 0xff, relativeOffset & 0xff); 11847 } else if (offsetSize === 3) { 11848 data.push(relativeOffset >> 16 & 0xff, relativeOffset >> 8 & 0xff, relativeOffset & 0xff); 11849 } else { 11850 data.push(relativeOffset >>> 24 & 0xff, relativeOffset >> 16 & 0xff, relativeOffset >> 8 & 0xff, relativeOffset & 0xff); 11851 } 11852 if (objects[i]) { 11853 relativeOffset += objects[i].length; 11854 } 11855 } 11856 for (i = 0; i < count; i++) { 11857 if (trackers[i]) { 11858 trackers[i].offset(data.length); 11859 } 11860 data.push(...objects[i]); 11861 } 11862 return data
vendor: 124,971 bytes, lines 11862-16514
11862; 11863 } 11864} 11865 11866;// ./src/core/glyphlist.js 11867 11868const getGlyphsUnicode = getLookupTableFactory(function (t) { 11869 t.A = 0x0041; 11870 t.AE = 0x00c6; 11871 t.AEacute = 0x01fc; 11872 t.AEmacron = 0x01e2; 11873 t.AEsmall = 0xf7e6; 11874 t.Aacute = 0x00c1; 11875 t.Aacutesmall = 0xf7e1; 11876 t.Abreve = 0x0102; 11877 t.Abreveacute = 0x1eae; 11878 t.Abrevecyrillic = 0x04d0; 11879 t.Abrevedotbelow = 0x1eb6; 11880 t.Abrevegrave = 0x1eb0; 11881 t.Abrevehookabove = 0x1eb2; 11882 t.Abrevetilde = 0x1eb4; 11883 t.Acaron = 0x01cd; 11884 t.Acircle = 0x24b6; 11885 t.Acircumflex = 0x00c2; 11886 t.Acircumflexacute = 0x1ea4; 11887 t.Acircumflexdotbelow = 0x1eac; 11888 t.Acircumflexgrave = 0x1ea6; 11889 t.Acircumflexhookabove = 0x1ea8; 11890 t.Acircumflexsmall = 0xf7e2; 11891 t.Acircumflextilde = 0x1eaa; 11892 t.Acute = 0xf6c9; 11893 t.Acutesmall = 0xf7b4; 11894 t.Acyrillic = 0x0410; 11895 t.Adblgrave = 0x0200; 11896 t.Adieresis = 0x00c4; 11897 t.Adieresiscyrillic = 0x04d2; 11898 t.Adieresismacron = 0x01de; 11899 t.Adieresissmall = 0xf7e4; 11900 t.Adotbelow = 0x1ea0; 11901 t.Adotmacron = 0x01e0; 11902 t.Agrave = 0x00c0; 11903 t.Agravesmall = 0xf7e0; 11904 t.Ahookabove = 0x1ea2; 11905 t.Aiecyrillic = 0x04d4; 11906 t.Ainvertedbreve = 0x0202; 11907 t.Alpha = 0x0391; 11908 t.Alphatonos = 0x0386; 11909 t.Amacron = 0x0100; 11910 t.Amonospace = 0xff21; 11911 t.Aogonek = 0x0104; 11912 t.Aring = 0x00c5; 11913 t.Aringacute = 0x01fa; 11914 t.Aringbelow = 0x1e00; 11915 t.Aringsmall = 0xf7e5; 11916 t.Asmall = 0xf761; 11917 t.Atilde = 0x00c3; 11918 t.Atildesmall = 0xf7e3; 11919 t.Aybarmenian = 0x0531; 11920 t.B = 0x0042; 11921 t.Bcircle = 0x24b7; 11922 t.Bdotaccent = 0x1e02; 11923 t.Bdotbelow = 0x1e04; 11924 t.Becyrillic = 0x0411; 11925 t.Benarmenian = 0x0532; 11926 t.Beta = 0x0392; 11927 t.Bhook = 0x0181; 11928 t.Blinebelow = 0x1e06; 11929 t.Bmonospace = 0xff22; 11930 t.Brevesmall = 0xf6f4; 11931 t.Bsmall = 0xf762; 11932 t.Btopbar = 0x0182; 11933 t.C = 0x0043; 11934 t.Caarmenian = 0x053e; 11935 t.Cacute = 0x0106; 11936 t.Caron = 0xf6ca; 11937 t.Caronsmall = 0xf6f5; 11938 t.Ccaron = 0x010c; 11939 t.Ccedilla = 0x00c7; 11940 t.Ccedillaacute = 0x1e08; 11941 t.Ccedillasmall = 0xf7e7; 11942 t.Ccircle = 0x24b8; 11943 t.Ccircumflex = 0x0108; 11944 t.Cdot = 0x010a; 11945 t.Cdotaccent = 0x010a; 11946 t.Cedillasmall = 0xf7b8; 11947 t.Chaarmenian = 0x0549; 11948 t.Cheabkhasiancyrillic = 0x04bc; 11949 t.Checyrillic = 0x0427; 11950 t.Chedescenderabkhasiancyrillic = 0x04be; 11951 t.Chedescendercyrillic = 0x04b6; 11952 t.Chedieresiscyrillic = 0x04f4; 11953 t.Cheharmenian = 0x0543; 11954 t.Chekhakassiancyrillic = 0x04cb; 11955 t.Cheverticalstrokecyrillic = 0x04b8; 11956 t.Chi = 0x03a7; 11957 t.Chook = 0x0187; 11958 t.Circumflexsmall = 0xf6f6; 11959 t.Cmonospace = 0xff23; 11960 t.Coarmenian = 0x0551; 11961 t.Csmall = 0xf763; 11962 t.D = 0x0044; 11963 t.DZ = 0x01f1; 11964 t.DZcaron = 0x01c4; 11965 t.Daarmenian = 0x0534; 11966 t.Dafrican = 0x0189; 11967 t.Dcaron = 0x010e; 11968 t.Dcedilla = 0x1e10; 11969 t.Dcircle = 0x24b9; 11970 t.Dcircumflexbelow = 0x1e12; 11971 t.Dcroat = 0x0110; 11972 t.Ddotaccent = 0x1e0a; 11973 t.Ddotbelow = 0x1e0c; 11974 t.Decyrillic = 0x0414; 11975 t.Deicoptic = 0x03ee; 11976 t.Delta = 0x2206; 11977 t.Deltagreek = 0x0394; 11978 t.Dhook = 0x018a; 11979 t.Dieresis = 0xf6cb; 11980 t.DieresisAcute = 0xf6cc; 11981 t.DieresisGrave = 0xf6cd; 11982 t.Dieresissmall = 0xf7a8; 11983 t.Digammagreek = 0x03dc; 11984 t.Djecyrillic = 0x0402; 11985 t.Dlinebelow = 0x1e0e; 11986 t.Dmonospace = 0xff24; 11987 t.Dotaccentsmall = 0xf6f7; 11988 t.Dslash = 0x0110; 11989 t.Dsmall = 0xf764; 11990 t.Dtopbar = 0x018b; 11991 t.Dz = 0x01f2; 11992 t.Dzcaron = 0x01c5; 11993 t.Dzeabkhasiancyrillic = 0x04e0; 11994 t.Dzecyrillic = 0x0405; 11995 t.Dzhecyrillic = 0x040f; 11996 t.E = 0x0045; 11997 t.Eacute = 0x00c9; 11998 t.Eacutesmall = 0xf7e9; 11999 t.Ebreve = 0x0114; 12000 t.Ecaron = 0x011a; 12001 t.Ecedillabreve = 0x1e1c; 12002 t.Echarmenian = 0x0535; 12003 t.Ecircle = 0x24ba; 12004 t.Ecircumflex = 0x00ca; 12005 t.Ecircumflexacute = 0x1ebe; 12006 t.Ecircumflexbelow = 0x1e18; 12007 t.Ecircumflexdotbelow = 0x1ec6; 12008 t.Ecircumflexgrave = 0x1ec0; 12009 t.Ecircumflexhookabove = 0x1ec2; 12010 t.Ecircumflexsmall = 0xf7ea; 12011 t.Ecircumflextilde = 0x1ec4; 12012 t.Ecyrillic = 0x0404; 12013 t.Edblgrave = 0x0204; 12014 t.Edieresis = 0x00cb; 12015 t.Edieresissmall = 0xf7eb; 12016 t.Edot = 0x0116; 12017 t.Edotaccent = 0x0116; 12018 t.Edotbelow = 0x1eb8; 12019 t.Efcyrillic = 0x0424; 12020 t.Egrave = 0x00c8; 12021 t.Egravesmall = 0xf7e8; 12022 t.Eharmenian = 0x0537; 12023 t.Ehookabove = 0x1eba; 12024 t.Eightroman = 0x2167; 12025 t.Einvertedbreve = 0x0206; 12026 t.Eiotifiedcyrillic = 0x0464; 12027 t.Elcyrillic = 0x041b; 12028 t.Elevenroman = 0x216a; 12029 t.Emacron = 0x0112; 12030 t.Emacronacute = 0x1e16; 12031 t.Emacrongrave = 0x1e14; 12032 t.Emcyrillic = 0x041c; 12033 t.Emonospace = 0xff25; 12034 t.Encyrillic = 0x041d; 12035 t.Endescendercyrillic = 0x04a2; 12036 t.Eng = 0x014a; 12037 t.Enghecyrillic = 0x04a4; 12038 t.Enhookcyrillic = 0x04c7; 12039 t.Eogonek = 0x0118; 12040 t.Eopen = 0x0190; 12041 t.Epsilon = 0x0395; 12042 t.Epsilontonos = 0x0388; 12043 t.Ercyrillic = 0x0420; 12044 t.Ereversed = 0x018e; 12045 t.Ereversedcyrillic = 0x042d; 12046 t.Escyrillic = 0x0421; 12047 t.Esdescendercyrillic = 0x04aa; 12048 t.Esh = 0x01a9; 12049 t.Esmall = 0xf765; 12050 t.Eta = 0x0397; 12051 t.Etarmenian = 0x0538; 12052 t.Etatonos = 0x0389; 12053 t.Eth = 0x00d0; 12054 t.Ethsmall = 0xf7f0; 12055 t.Etilde = 0x1ebc; 12056 t.Etildebelow = 0x1e1a; 12057 t.Euro = 0x20ac; 12058 t.Ezh = 0x01b7; 12059 t.Ezhcaron = 0x01ee; 12060 t.Ezhreversed = 0x01b8; 12061 t.F = 0x0046; 12062 t.Fcircle = 0x24bb; 12063 t.Fdotaccent = 0x1e1e; 12064 t.Feharmenian = 0x0556; 12065 t.Feicoptic = 0x03e4; 12066 t.Fhook = 0x0191; 12067 t.Fitacyrillic = 0x0472; 12068 t.Fiveroman = 0x2164; 12069 t.Fmonospace = 0xff26; 12070 t.Fourroman = 0x2163; 12071 t.Fsmall = 0xf766; 12072 t.G = 0x0047; 12073 t.GBsquare = 0x3387; 12074 t.Gacute = 0x01f4; 12075 t.Gamma = 0x0393; 12076 t.Gammaafrican = 0x0194; 12077 t.Gangiacoptic = 0x03ea; 12078 t.Gbreve = 0x011e; 12079 t.Gcaron = 0x01e6; 12080 t.Gcedilla = 0x0122; 12081 t.Gcircle = 0x24bc; 12082 t.Gcircumflex = 0x011c; 12083 t.Gcommaaccent = 0x0122; 12084 t.Gdot = 0x0120; 12085 t.Gdotaccent = 0x0120; 12086 t.Gecyrillic = 0x0413; 12087 t.Ghadarmenian = 0x0542; 12088 t.Ghemiddlehookcyrillic = 0x0494; 12089 t.Ghestrokecyrillic = 0x0492; 12090 t.Gheupturncyrillic = 0x0490; 12091 t.Ghook = 0x0193; 12092 t.Gimarmenian = 0x0533; 12093 t.Gjecyrillic = 0x0403; 12094 t.Gmacron = 0x1e20; 12095 t.Gmonospace = 0xff27; 12096 t.Grave = 0xf6ce; 12097 t.Gravesmall = 0xf760; 12098 t.Gsmall = 0xf767; 12099 t.Gsmallhook = 0x029b; 12100 t.Gstroke = 0x01e4; 12101 t.H = 0x0048; 12102 t.H18533 = 0x25cf; 12103 t.H18543 = 0x25aa; 12104 t.H18551 = 0x25ab; 12105 t.H22073 = 0x25a1; 12106 t.HPsquare = 0x33cb; 12107 t.Haabkhasiancyrillic = 0x04a8; 12108 t.Hadescendercyrillic = 0x04b2; 12109 t.Hardsigncyrillic = 0x042a; 12110 t.Hbar = 0x0126; 12111 t.Hbrevebelow = 0x1e2a; 12112 t.Hcedilla = 0x1e28; 12113 t.Hcircle = 0x24bd; 12114 t.Hcircumflex = 0x0124; 12115 t.Hdieresis = 0x1e26; 12116 t.Hdotaccent = 0x1e22; 12117 t.Hdotbelow = 0x1e24; 12118 t.Hmonospace = 0xff28; 12119 t.Hoarmenian = 0x0540; 12120 t.Horicoptic = 0x03e8; 12121 t.Hsmall = 0xf768; 12122 t.Hungarumlaut = 0xf6cf; 12123 t.Hungarumlautsmall = 0xf6f8; 12124 t.Hzsquare = 0x3390; 12125 t.I = 0x0049; 12126 t.IAcyrillic = 0x042f; 12127 t.IJ = 0x0132; 12128 t.IUcyrillic = 0x042e; 12129 t.Iacute = 0x00cd; 12130 t.Iacutesmall = 0xf7ed; 12131 t.Ibreve = 0x012c; 12132 t.Icaron = 0x01cf; 12133 t.Icircle = 0x24be; 12134 t.Icircumflex = 0x00ce; 12135 t.Icircumflexsmall = 0xf7ee; 12136 t.Icyrillic = 0x0406; 12137 t.Idblgrave = 0x0208; 12138 t.Idieresis = 0x00cf; 12139 t.Idieresisacute = 0x1e2e; 12140 t.Idieresiscyrillic = 0x04e4; 12141 t.Idieresissmall = 0xf7ef; 12142 t.Idot = 0x0130; 12143 t.Idotaccent = 0x0130; 12144 t.Idotbelow = 0x1eca; 12145 t.Iebrevecyrillic = 0x04d6; 12146 t.Iecyrillic = 0x0415; 12147 t.Ifraktur = 0x2111; 12148 t.Igrave = 0x00cc; 12149 t.Igravesmall = 0xf7ec; 12150 t.Ihookabove = 0x1ec8; 12151 t.Iicyrillic = 0x0418; 12152 t.Iinvertedbreve = 0x020a; 12153 t.Iishortcyrillic = 0x0419; 12154 t.Imacron = 0x012a; 12155 t.Imacroncyrillic = 0x04e2; 12156 t.Imonospace = 0xff29; 12157 t.Iniarmenian = 0x053b; 12158 t.Iocyrillic = 0x0401; 12159 t.Iogonek = 0x012e; 12160 t.Iota = 0x0399; 12161 t.Iotaafrican = 0x0196; 12162 t.Iotadieresis = 0x03aa; 12163 t.Iotatonos = 0x038a; 12164 t.Ismall = 0xf769; 12165 t.Istroke = 0x0197; 12166 t.Itilde = 0x0128; 12167 t.Itildebelow = 0x1e2c; 12168 t.Izhitsacyrillic = 0x0474; 12169 t.Izhitsadblgravecyrillic = 0x0476; 12170 t.J = 0x004a; 12171 t.Jaarmenian = 0x0541; 12172 t.Jcircle = 0x24bf; 12173 t.Jcircumflex = 0x0134; 12174 t.Jecyrillic = 0x0408; 12175 t.Jheharmenian = 0x054b; 12176 t.Jmonospace = 0xff2a; 12177 t.Jsmall = 0xf76a; 12178 t.K = 0x004b; 12179 t.KBsquare = 0x3385; 12180 t.KKsquare = 0x33cd; 12181 t.Kabashkircyrillic = 0x04a0; 12182 t.Kacute = 0x1e30; 12183 t.Kacyrillic = 0x041a; 12184 t.Kadescendercyrillic = 0x049a; 12185 t.Kahookcyrillic = 0x04c3; 12186 t.Kappa = 0x039a; 12187 t.Kastrokecyrillic = 0x049e; 12188 t.Kaverticalstrokecyrillic = 0x049c; 12189 t.Kcaron = 0x01e8; 12190 t.Kcedilla = 0x0136; 12191 t.Kcircle = 0x24c0; 12192 t.Kcommaaccent = 0x0136; 12193 t.Kdotbelow = 0x1e32; 12194 t.Keharmenian = 0x0554; 12195 t.Kenarmenian = 0x053f; 12196 t.Khacyrillic = 0x0425; 12197 t.Kheicoptic = 0x03e6; 12198 t.Khook = 0x0198; 12199 t.Kjecyrillic = 0x040c; 12200 t.Klinebelow = 0x1e34; 12201 t.Kmonospace = 0xff2b; 12202 t.Koppacyrillic = 0x0480; 12203 t.Koppagreek = 0x03de; 12204 t.Ksicyrillic = 0x046e; 12205 t.Ksmall = 0xf76b; 12206 t.L = 0x004c; 12207 t.LJ = 0x01c7; 12208 t.LL = 0xf6bf; 12209 t.Lacute = 0x0139; 12210 t.Lambda = 0x039b; 12211 t.Lcaron = 0x013d; 12212 t.Lcedilla = 0x013b; 12213 t.Lcircle = 0x24c1; 12214 t.Lcircumflexbelow = 0x1e3c; 12215 t.Lcommaaccent = 0x013b; 12216 t.Ldot = 0x013f; 12217 t.Ldotaccent = 0x013f; 12218 t.Ldotbelow = 0x1e36; 12219 t.Ldotbelowmacron = 0x1e38; 12220 t.Liwnarmenian = 0x053c; 12221 t.Lj = 0x01c8; 12222 t.Ljecyrillic = 0x0409; 12223 t.Llinebelow = 0x1e3a; 12224 t.Lmonospace = 0xff2c; 12225 t.Lslash = 0x0141; 12226 t.Lslashsmall = 0xf6f9; 12227 t.Lsmall = 0xf76c; 12228 t.M = 0x004d; 12229 t.MBsquare = 0x3386; 12230 t.Macron = 0xf6d0; 12231 t.Macronsmall = 0xf7af; 12232 t.Macute = 0x1e3e; 12233 t.Mcircle = 0x24c2; 12234 t.Mdotaccent = 0x1e40; 12235 t.Mdotbelow = 0x1e42; 12236 t.Menarmenian = 0x0544; 12237 t.Mmonospace = 0xff2d; 12238 t.Msmall = 0xf76d; 12239 t.Mturned = 0x019c; 12240 t.Mu = 0x039c; 12241 t.N = 0x004e; 12242 t.NJ = 0x01ca; 12243 t.Nacute = 0x0143; 12244 t.Ncaron = 0x0147; 12245 t.Ncedilla = 0x0145; 12246 t.Ncircle = 0x24c3; 12247 t.Ncircumflexbelow = 0x1e4a; 12248 t.Ncommaaccent = 0x0145; 12249 t.Ndotaccent = 0x1e44; 12250 t.Ndotbelow = 0x1e46; 12251 t.Nhookleft = 0x019d; 12252 t.Nineroman = 0x2168; 12253 t.Nj = 0x01cb; 12254 t.Njecyrillic = 0x040a; 12255 t.Nlinebelow = 0x1e48; 12256 t.Nmonospace = 0xff2e; 12257 t.Nowarmenian = 0x0546; 12258 t.Nsmall = 0xf76e; 12259 t.Ntilde = 0x00d1; 12260 t.Ntildesmall = 0xf7f1; 12261 t.Nu = 0x039d; 12262 t.O = 0x004f; 12263 t.OE = 0x0152; 12264 t.OEsmall = 0xf6fa; 12265 t.Oacute = 0x00d3; 12266 t.Oacutesmall = 0xf7f3; 12267 t.Obarredcyrillic = 0x04e8; 12268 t.Obarreddieresiscyrillic = 0x04ea; 12269 t.Obreve = 0x014e; 12270 t.Ocaron = 0x01d1; 12271 t.Ocenteredtilde = 0x019f; 12272 t.Ocircle = 0x24c4; 12273 t.Ocircumflex = 0x00d4; 12274 t.Ocircumflexacute = 0x1ed0; 12275 t.Ocircumflexdotbelow = 0x1ed8; 12276 t.Ocircumflexgrave = 0x1ed2; 12277 t.Ocircumflexhookabove = 0x1ed4; 12278 t.Ocircumflexsmall = 0xf7f4; 12279 t.Ocircumflextilde = 0x1ed6; 12280 t.Ocyrillic = 0x041e; 12281 t.Odblacute = 0x0150; 12282 t.Odblgrave = 0x020c; 12283 t.Odieresis = 0x00d6; 12284 t.Odieresiscyrillic = 0x04e6; 12285 t.Odieresissmall = 0xf7f6; 12286 t.Odotbelow = 0x1ecc; 12287 t.Ogoneksmall = 0xf6fb; 12288 t.Ograve = 0x00d2; 12289 t.Ogravesmall = 0xf7f2; 12290 t.Oharmenian = 0x0555; 12291 t.Ohm = 0x2126; 12292 t.Ohookabove = 0x1ece; 12293 t.Ohorn = 0x01a0; 12294 t.Ohornacute = 0x1eda; 12295 t.Ohorndotbelow = 0x1ee2; 12296 t.Ohorngrave = 0x1edc; 12297 t.Ohornhookabove = 0x1ede; 12298 t.Ohorntilde = 0x1ee0; 12299 t.Ohungarumlaut = 0x0150; 12300 t.Oi = 0x01a2; 12301 t.Oinvertedbreve = 0x020e; 12302 t.Omacron = 0x014c; 12303 t.Omacronacute = 0x1e52; 12304 t.Omacrongrave = 0x1e50; 12305 t.Omega = 0x2126; 12306 t.Omegacyrillic = 0x0460; 12307 t.Omegagreek = 0x03a9; 12308 t.Omegaroundcyrillic = 0x047a; 12309 t.Omegatitlocyrillic = 0x047c; 12310 t.Omegatonos = 0x038f; 12311 t.Omicron = 0x039f; 12312 t.Omicrontonos = 0x038c; 12313 t.Omonospace = 0xff2f; 12314 t.Oneroman = 0x2160; 12315 t.Oogonek = 0x01ea; 12316 t.Oogonekmacron = 0x01ec; 12317 t.Oopen = 0x0186; 12318 t.Oslash = 0x00d8; 12319 t.Oslashacute = 0x01fe; 12320 t.Oslashsmall = 0xf7f8; 12321 t.Osmall = 0xf76f; 12322 t.Ostrokeacute = 0x01fe; 12323 t.Otcyrillic = 0x047e; 12324 t.Otilde = 0x00d5; 12325 t.Otildeacute = 0x1e4c; 12326 t.Otildedieresis = 0x1e4e; 12327 t.Otildesmall = 0xf7f5; 12328 t.P = 0x0050; 12329 t.Pacute = 0x1e54; 12330 t.Pcircle = 0x24c5; 12331 t.Pdotaccent = 0x1e56; 12332 t.Pecyrillic = 0x041f; 12333 t.Peharmenian = 0x054a; 12334 t.Pemiddlehookcyrillic = 0x04a6; 12335 t.Phi = 0x03a6; 12336 t.Phook = 0x01a4; 12337 t.Pi = 0x03a0; 12338 t.Piwrarmenian = 0x0553; 12339 t.Pmonospace = 0xff30; 12340 t.Psi = 0x03a8; 12341 t.Psicyrillic = 0x0470; 12342 t.Psmall = 0xf770; 12343 t.Q = 0x0051; 12344 t.Qcircle = 0x24c6; 12345 t.Qmonospace = 0xff31; 12346 t.Qsmall = 0xf771; 12347 t.R = 0x0052; 12348 t.Raarmenian = 0x054c; 12349 t.Racute = 0x0154; 12350 t.Rcaron = 0x0158; 12351 t.Rcedilla = 0x0156; 12352 t.Rcircle = 0x24c7; 12353 t.Rcommaaccent = 0x0156; 12354 t.Rdblgrave = 0x0210; 12355 t.Rdotaccent = 0x1e58; 12356 t.Rdotbelow = 0x1e5a; 12357 t.Rdotbelowmacron = 0x1e5c; 12358 t.Reharmenian = 0x0550; 12359 t.Rfraktur = 0x211c; 12360 t.Rho = 0x03a1; 12361 t.Ringsmall = 0xf6fc; 12362 t.Rinvertedbreve = 0x0212; 12363 t.Rlinebelow = 0x1e5e; 12364 t.Rmonospace = 0xff32; 12365 t.Rsmall = 0xf772; 12366 t.Rsmallinverted = 0x0281; 12367 t.Rsmallinvertedsuperior = 0x02b6; 12368 t.S = 0x0053; 12369 t.SF010000 = 0x250c; 12370 t.SF020000 = 0x2514; 12371 t.SF030000 = 0x2510; 12372 t.SF040000 = 0x2518; 12373 t.SF050000 = 0x253c; 12374 t.SF060000 = 0x252c; 12375 t.SF070000 = 0x2534; 12376 t.SF080000 = 0x251c; 12377 t.SF090000 = 0x2524; 12378 t.SF100000 = 0x2500; 12379 t.SF110000 = 0x2502; 12380 t.SF190000 = 0x2561; 12381 t.SF200000 = 0x2562; 12382 t.SF210000 = 0x2556; 12383 t.SF220000 = 0x2555; 12384 t.SF230000 = 0x2563; 12385 t.SF240000 = 0x2551; 12386 t.SF250000 = 0x2557; 12387 t.SF260000 = 0x255d; 12388 t.SF270000 = 0x255c; 12389 t.SF280000 = 0x255b; 12390 t.SF360000 = 0x255e; 12391 t.SF370000 = 0x255f; 12392 t.SF380000 = 0x255a; 12393 t.SF390000 = 0x2554; 12394 t.SF400000 = 0x2569; 12395 t.SF410000 = 0x2566; 12396 t.SF420000 = 0x2560; 12397 t.SF430000 = 0x2550; 12398 t.SF440000 = 0x256c; 12399 t.SF450000 = 0x2567; 12400 t.SF460000 = 0x2568; 12401 t.SF470000 = 0x2564; 12402 t.SF480000 = 0x2565; 12403 t.SF490000 = 0x2559; 12404 t.SF500000 = 0x2558; 12405 t.SF510000 = 0x2552; 12406 t.SF520000 = 0x2553; 12407 t.SF530000 = 0x256b; 12408 t.SF540000 = 0x256a; 12409 t.Sacute = 0x015a; 12410 t.Sacutedotaccent = 0x1e64; 12411 t.Sampigreek = 0x03e0; 12412 t.Scaron = 0x0160; 12413 t.Scarondotaccent = 0x1e66; 12414 t.Scaronsmall = 0xf6fd; 12415 t.Scedilla = 0x015e; 12416 t.Schwa = 0x018f; 12417 t.Schwacyrillic = 0x04d8; 12418 t.Schwadieresiscyrillic = 0x04da; 12419 t.Scircle = 0x24c8; 12420 t.Scircumflex = 0x015c; 12421 t.Scommaaccent = 0x0218; 12422 t.Sdotaccent = 0x1e60; 12423 t.Sdotbelow = 0x1e62; 12424 t.Sdotbelowdotaccent = 0x1e68; 12425 t.Seharmenian = 0x054d; 12426 t.Sevenroman = 0x2166; 12427 t.Shaarmenian = 0x0547; 12428 t.Shacyrillic = 0x0428; 12429 t.Shchacyrillic = 0x0429; 12430 t.Sheicoptic = 0x03e2; 12431 t.Shhacyrillic = 0x04ba; 12432 t.Shimacoptic = 0x03ec; 12433 t.Sigma = 0x03a3; 12434 t.Sixroman = 0x2165; 12435 t.Smonospace = 0xff33; 12436 t.Softsigncyrillic = 0x042c; 12437 t.Ssmall = 0xf773; 12438 t.Stigmagreek = 0x03da; 12439 t.T = 0x0054; 12440 t.Tau = 0x03a4; 12441 t.Tbar = 0x0166; 12442 t.Tcaron = 0x0164; 12443 t.Tcedilla = 0x0162; 12444 t.Tcircle = 0x24c9; 12445 t.Tcircumflexbelow = 0x1e70; 12446 t.Tcommaaccent = 0x0162; 12447 t.Tdotaccent = 0x1e6a; 12448 t.Tdotbelow = 0x1e6c; 12449 t.Tecyrillic = 0x0422; 12450 t.Tedescendercyrillic = 0x04ac; 12451 t.Tenroman = 0x2169; 12452 t.Tetsecyrillic = 0x04b4; 12453 t.Theta = 0x0398; 12454 t.Thook = 0x01ac; 12455 t.Thorn = 0x00de; 12456 t.Thornsmall = 0xf7fe; 12457 t.Threeroman = 0x2162; 12458 t.Tildesmall = 0xf6fe; 12459 t.Tiwnarmenian = 0x054f; 12460 t.Tlinebelow = 0x1e6e; 12461 t.Tmonospace = 0xff34; 12462 t.Toarmenian = 0x0539; 12463 t.Tonefive = 0x01bc; 12464 t.Tonesix = 0x0184; 12465 t.Tonetwo = 0x01a7; 12466 t.Tretroflexhook = 0x01ae; 12467 t.Tsecyrillic = 0x0426; 12468 t.Tshecyrillic = 0x040b; 12469 t.Tsmall = 0xf774; 12470 t.Twelveroman = 0x216b; 12471 t.Tworoman = 0x2161; 12472 t.U = 0x0055; 12473 t.Uacute = 0x00da; 12474 t.Uacutesmall = 0xf7fa; 12475 t.Ubreve = 0x016c; 12476 t.Ucaron = 0x01d3; 12477 t.Ucircle = 0x24ca; 12478 t.Ucircumflex = 0x00db; 12479 t.Ucircumflexbelow = 0x1e76; 12480 t.Ucircumflexsmall = 0xf7fb; 12481 t.Ucyrillic = 0x0423; 12482 t.Udblacute = 0x0170; 12483 t.Udblgrave = 0x0214; 12484 t.Udieresis = 0x00dc; 12485 t.Udieresisacute = 0x01d7; 12486 t.Udieresisbelow = 0x1e72; 12487 t.Udieresiscaron = 0x01d9; 12488 t.Udieresiscyrillic = 0x04f0; 12489 t.Udieresisgrave = 0x01db; 12490 t.Udieresismacron = 0x01d5; 12491 t.Udieresissmall = 0xf7fc; 12492 t.Udotbelow = 0x1ee4; 12493 t.Ugrave = 0x00d9; 12494 t.Ugravesmall = 0xf7f9; 12495 t.Uhookabove = 0x1ee6; 12496 t.Uhorn = 0x01af; 12497 t.Uhornacute = 0x1ee8; 12498 t.Uhorndotbelow = 0x1ef0; 12499 t.Uhorngrave = 0x1eea; 12500 t.Uhornhookabove = 0x1eec; 12501 t.Uhorntilde = 0x1eee; 12502 t.Uhungarumlaut = 0x0170; 12503 t.Uhungarumlautcyrillic = 0x04f2; 12504 t.Uinvertedbreve = 0x0216; 12505 t.Ukcyrillic = 0x0478; 12506 t.Umacron = 0x016a; 12507 t.Umacroncyrillic = 0x04ee; 12508 t.Umacrondieresis = 0x1e7a; 12509 t.Umonospace = 0xff35; 12510 t.Uogonek = 0x0172; 12511 t.Upsilon = 0x03a5; 12512 t.Upsilon1 = 0x03d2; 12513 t.Upsilonacutehooksymbolgreek = 0x03d3; 12514 t.Upsilonafrican = 0x01b1; 12515 t.Upsilondieresis = 0x03ab; 12516 t.Upsilondieresishooksymbolgreek = 0x03d4; 12517 t.Upsilonhooksymbol = 0x03d2; 12518 t.Upsilontonos = 0x038e; 12519 t.Uring = 0x016e; 12520 t.Ushortcyrillic = 0x040e; 12521 t.Usmall = 0xf775; 12522 t.Ustraightcyrillic = 0x04ae; 12523 t.Ustraightstrokecyrillic = 0x04b0; 12524 t.Utilde = 0x0168; 12525 t.Utildeacute = 0x1e78; 12526 t.Utildebelow = 0x1e74; 12527 t.V = 0x0056; 12528 t.Vcircle = 0x24cb; 12529 t.Vdotbelow = 0x1e7e; 12530 t.Vecyrillic = 0x0412; 12531 t.Vewarmenian = 0x054e; 12532 t.Vhook = 0x01b2; 12533 t.Vmonospace = 0xff36; 12534 t.Voarmenian = 0x0548; 12535 t.Vsmall = 0xf776; 12536 t.Vtilde = 0x1e7c; 12537 t.W = 0x0057; 12538 t.Wacute = 0x1e82; 12539 t.Wcircle = 0x24cc; 12540 t.Wcircumflex = 0x0174; 12541 t.Wdieresis = 0x1e84; 12542 t.Wdotaccent = 0x1e86; 12543 t.Wdotbelow = 0x1e88; 12544 t.Wgrave = 0x1e80; 12545 t.Wmonospace = 0xff37; 12546 t.Wsmall = 0xf777; 12547 t.X = 0x0058; 12548 t.Xcircle = 0x24cd; 12549 t.Xdieresis = 0x1e8c; 12550 t.Xdotaccent = 0x1e8a; 12551 t.Xeharmenian = 0x053d; 12552 t.Xi = 0x039e; 12553 t.Xmonospace = 0xff38; 12554 t.Xsmall = 0xf778; 12555 t.Y = 0x0059; 12556 t.Yacute = 0x00dd; 12557 t.Yacutesmall = 0xf7fd; 12558 t.Yatcyrillic = 0x0462; 12559 t.Ycircle = 0x24ce; 12560 t.Ycircumflex = 0x0176; 12561 t.Ydieresis = 0x0178; 12562 t.Ydieresissmall = 0xf7ff; 12563 t.Ydotaccent = 0x1e8e; 12564 t.Ydotbelow = 0x1ef4; 12565 t.Yericyrillic = 0x042b; 12566 t.Yerudieresiscyrillic = 0x04f8; 12567 t.Ygrave = 0x1ef2; 12568 t.Yhook = 0x01b3; 12569 t.Yhookabove = 0x1ef6; 12570 t.Yiarmenian = 0x0545; 12571 t.Yicyrillic = 0x0407; 12572 t.Yiwnarmenian = 0x0552; 12573 t.Ymonospace = 0xff39; 12574 t.Ysmall = 0xf779; 12575 t.Ytilde = 0x1ef8; 12576 t.Yusbigcyrillic = 0x046a; 12577 t.Yusbigiotifiedcyrillic = 0x046c; 12578 t.Yuslittlecyrillic = 0x0466; 12579 t.Yuslittleiotifiedcyrillic = 0x0468; 12580 t.Z = 0x005a; 12581 t.Zaarmenian = 0x0536; 12582 t.Zacute = 0x0179; 12583 t.Zcaron = 0x017d; 12584 t.Zcaronsmall = 0xf6ff; 12585 t.Zcircle = 0x24cf; 12586 t.Zcircumflex = 0x1e90; 12587 t.Zdot = 0x017b; 12588 t.Zdotaccent = 0x017b; 12589 t.Zdotbelow = 0x1e92; 12590 t.Zecyrillic = 0x0417; 12591 t.Zedescendercyrillic = 0x0498; 12592 t.Zedieresiscyrillic = 0x04de; 12593 t.Zeta = 0x0396; 12594 t.Zhearmenian = 0x053a; 12595 t.Zhebrevecyrillic = 0x04c1; 12596 t.Zhecyrillic = 0x0416; 12597 t.Zhedescendercyrillic = 0x0496; 12598 t.Zhedieresiscyrillic = 0x04dc; 12599 t.Zlinebelow = 0x1e94; 12600 t.Zmonospace = 0xff3a; 12601 t.Zsmall = 0xf77a; 12602 t.Zstroke = 0x01b5; 12603 t.a = 0x0061; 12604 t.aabengali = 0x0986; 12605 t.aacute = 0x00e1; 12606 t.aadeva = 0x0906; 12607 t.aagujarati = 0x0a86; 12608 t.aagurmukhi = 0x0a06; 12609 t.aamatragurmukhi = 0x0a3e; 12610 t.aarusquare = 0x3303; 12611 t.aavowelsignbengali = 0x09be; 12612 t.aavowelsigndeva = 0x093e; 12613 t.aavowelsigngujarati = 0x0abe; 12614 t.abbreviationmarkarmenian = 0x055f; 12615 t.abbreviationsigndeva = 0x0970; 12616 t.abengali = 0x0985; 12617 t.abopomofo = 0x311a; 12618 t.abreve = 0x0103; 12619 t.abreveacute = 0x1eaf; 12620 t.abrevecyrillic = 0x04d1; 12621 t.abrevedotbelow = 0x1eb7; 12622 t.abrevegrave = 0x1eb1; 12623 t.abrevehookabove = 0x1eb3; 12624 t.abrevetilde = 0x1eb5; 12625 t.acaron = 0x01ce; 12626 t.acircle = 0x24d0; 12627 t.acircumflex = 0x00e2; 12628 t.acircumflexacute = 0x1ea5; 12629 t.acircumflexdotbelow = 0x1ead; 12630 t.acircumflexgrave = 0x1ea7; 12631 t.acircumflexhookabove = 0x1ea9; 12632 t.acircumflextilde = 0x1eab; 12633 t.acute = 0x00b4; 12634 t.acutebelowcmb = 0x0317; 12635 t.acutecmb = 0x0301; 12636 t.acutecomb = 0x0301; 12637 t.acutedeva = 0x0954; 12638 t.acutelowmod = 0x02cf; 12639 t.acutetonecmb = 0x0341; 12640 t.acyrillic = 0x0430; 12641 t.adblgrave = 0x0201; 12642 t.addakgurmukhi = 0x0a71; 12643 t.adeva = 0x0905; 12644 t.adieresis = 0x00e4; 12645 t.adieresiscyrillic = 0x04d3; 12646 t.adieresismacron = 0x01df; 12647 t.adotbelow = 0x1ea1; 12648 t.adotmacron = 0x01e1; 12649 t.ae = 0x00e6; 12650 t.aeacute = 0x01fd; 12651 t.aekorean = 0x3150; 12652 t.aemacron = 0x01e3; 12653 t.afii00208 = 0x2015; 12654 t.afii08941 = 0x20a4; 12655 t.afii10017 = 0x0410; 12656 t.afii10018 = 0x0411; 12657 t.afii10019 = 0x0412; 12658 t.afii10020 = 0x0413; 12659 t.afii10021 = 0x0414; 12660 t.afii10022 = 0x0415; 12661 t.afii10023 = 0x0401; 12662 t.afii10024 = 0x0416; 12663 t.afii10025 = 0x0417; 12664 t.afii10026 = 0x0418; 12665 t.afii10027 = 0x0419; 12666 t.afii10028 = 0x041a; 12667 t.afii10029 = 0x041b; 12668 t.afii10030 = 0x041c; 12669 t.afii10031 = 0x041d; 12670 t.afii10032 = 0x041e; 12671 t.afii10033 = 0x041f; 12672 t.afii10034 = 0x0420; 12673 t.afii10035 = 0x0421; 12674 t.afii10036 = 0x0422; 12675 t.afii10037 = 0x0423; 12676 t.afii10038 = 0x0424; 12677 t.afii10039 = 0x0425; 12678 t.afii10040 = 0x0426; 12679 t.afii10041 = 0x0427; 12680 t.afii10042 = 0x0428; 12681 t.afii10043 = 0x0429; 12682 t.afii10044 = 0x042a; 12683 t.afii10045 = 0x042b; 12684 t.afii10046 = 0x042c; 12685 t.afii10047 = 0x042d; 12686 t.afii10048 = 0x042e; 12687 t.afii10049 = 0x042f; 12688 t.afii10050 = 0x0490; 12689 t.afii10051 = 0x0402; 12690 t.afii10052 = 0x0403; 12691 t.afii10053 = 0x0404; 12692 t.afii10054 = 0x0405; 12693 t.afii10055 = 0x0406; 12694 t.afii10056 = 0x0407; 12695 t.afii10057 = 0x0408; 12696 t.afii10058 = 0x0409; 12697 t.afii10059 = 0x040a; 12698 t.afii10060 = 0x040b; 12699 t.afii10061 = 0x040c; 12700 t.afii10062 = 0x040e; 12701 t.afii10063 = 0xf6c4; 12702 t.afii10064 = 0xf6c5; 12703 t.afii10065 = 0x0430; 12704 t.afii10066 = 0x0431; 12705 t.afii10067 = 0x0432; 12706 t.afii10068 = 0x0433; 12707 t.afii10069 = 0x0434; 12708 t.afii10070 = 0x0435; 12709 t.afii10071 = 0x0451; 12710 t.afii10072 = 0x0436; 12711 t.afii10073 = 0x0437; 12712 t.afii10074 = 0x0438; 12713 t.afii10075 = 0x0439; 12714 t.afii10076 = 0x043a; 12715 t.afii10077 = 0x043b; 12716 t.afii10078 = 0x043c; 12717 t.afii10079 = 0x043d; 12718 t.afii10080 = 0x043e; 12719 t.afii10081 = 0x043f; 12720 t.afii10082 = 0x0440; 12721 t.afii10083 = 0x0441; 12722 t.afii10084 = 0x0442; 12723 t.afii10085 = 0x0443; 12724 t.afii10086 = 0x0444; 12725 t.afii10087 = 0x0445; 12726 t.afii10088 = 0x0446; 12727 t.afii10089 = 0x0447; 12728 t.afii10090 = 0x0448; 12729 t.afii10091 = 0x0449; 12730 t.afii10092 = 0x044a; 12731 t.afii10093 = 0x044b; 12732 t.afii10094 = 0x044c; 12733 t.afii10095 = 0x044d; 12734 t.afii10096 = 0x044e; 12735 t.afii10097 = 0x044f; 12736 t.afii10098 = 0x0491; 12737 t.afii10099 = 0x0452; 12738 t.afii10100 = 0x0453; 12739 t.afii10101 = 0x0454; 12740 t.afii10102 = 0x0455; 12741 t.afii10103 = 0x0456; 12742 t.afii10104 = 0x0457; 12743 t.afii10105 = 0x0458; 12744 t.afii10106 = 0x0459; 12745 t.afii10107 = 0x045a; 12746 t.afii10108 = 0x045b; 12747 t.afii10109 = 0x045c; 12748 t.afii10110 = 0x045e; 12749 t.afii10145 = 0x040f; 12750 t.afii10146 = 0x0462; 12751 t.afii10147 = 0x0472; 12752 t.afii10148 = 0x0474; 12753 t.afii10192 = 0xf6c6; 12754 t.afii10193 = 0x045f; 12755 t.afii10194 = 0x0463; 12756 t.afii10195 = 0x0473; 12757 t.afii10196 = 0x0475; 12758 t.afii10831 = 0xf6c7; 12759 t.afii10832 = 0xf6c8; 12760 t.afii10846 = 0x04d9; 12761 t.afii299 = 0x200e; 12762 t.afii300 = 0x200f; 12763 t.afii301 = 0x200d; 12764 t.afii57381 = 0x066a; 12765 t.afii57388 = 0x060c; 12766 t.afii57392 = 0x0660; 12767 t.afii57393 = 0x0661; 12768 t.afii57394 = 0x0662; 12769 t.afii57395 = 0x0663; 12770 t.afii57396 = 0x0664; 12771 t.afii57397 = 0x0665; 12772 t.afii57398 = 0x0666; 12773 t.afii57399 = 0x0667; 12774 t.afii57400 = 0x0668; 12775 t.afii57401 = 0x0669; 12776 t.afii57403 = 0x061b; 12777 t.afii57407 = 0x061f; 12778 t.afii57409 = 0x0621; 12779 t.afii57410 = 0x0622; 12780 t.afii57411 = 0x0623; 12781 t.afii57412 = 0x0624; 12782 t.afii57413 = 0x0625; 12783 t.afii57414 = 0x0626; 12784 t.afii57415 = 0x0627; 12785 t.afii57416 = 0x0628; 12786 t.afii57417 = 0x0629; 12787 t.afii57418 = 0x062a; 12788 t.afii57419 = 0x062b; 12789 t.afii57420 = 0x062c; 12790 t.afii57421 = 0x062d; 12791 t.afii57422 = 0x062e; 12792 t.afii57423 = 0x062f; 12793 t.afii57424 = 0x0630; 12794 t.afii57425 = 0x0631; 12795 t.afii57426 = 0x0632; 12796 t.afii57427 = 0x0633; 12797 t.afii57428 = 0x0634; 12798 t.afii57429 = 0x0635; 12799 t.afii57430 = 0x0636; 12800 t.afii57431 = 0x0637; 12801 t.afii57432 = 0x0638; 12802 t.afii57433 = 0x0639; 12803 t.afii57434 = 0x063a; 12804 t.afii57440 = 0x0640; 12805 t.afii57441 = 0x0641; 12806 t.afii57442 = 0x0642; 12807 t.afii57443 = 0x0643; 12808 t.afii57444 = 0x0644; 12809 t.afii57445 = 0x0645; 12810 t.afii57446 = 0x0646; 12811 t.afii57448 = 0x0648; 12812 t.afii57449 = 0x0649; 12813 t.afii57450 = 0x064a; 12814 t.afii57451 = 0x064b; 12815 t.afii57452 = 0x064c; 12816 t.afii57453 = 0x064d; 12817 t.afii57454 = 0x064e; 12818 t.afii57455 = 0x064f; 12819 t.afii57456 = 0x0650; 12820 t.afii57457 = 0x0651; 12821 t.afii57458 = 0x0652; 12822 t.afii57470 = 0x0647; 12823 t.afii57505 = 0x06a4; 12824 t.afii57506 = 0x067e; 12825 t.afii57507 = 0x0686; 12826 t.afii57508 = 0x0698; 12827 t.afii57509 = 0x06af; 12828 t.afii57511 = 0x0679; 12829 t.afii57512 = 0x0688; 12830 t.afii57513 = 0x0691; 12831 t.afii57514 = 0x06ba; 12832 t.afii57519 = 0x06d2; 12833 t.afii57534 = 0x06d5; 12834 t.afii57636 = 0x20aa; 12835 t.afii57645 = 0x05be; 12836 t.afii57658 = 0x05c3; 12837 t.afii57664 = 0x05d0; 12838 t.afii57665 = 0x05d1; 12839 t.afii57666 = 0x05d2; 12840 t.afii57667 = 0x05d3; 12841 t.afii57668 = 0x05d4; 12842 t.afii57669 = 0x05d5; 12843 t.afii57670 = 0x05d6; 12844 t.afii57671 = 0x05d7; 12845 t.afii57672 = 0x05d8; 12846 t.afii57673 = 0x05d9; 12847 t.afii57674 = 0x05da; 12848 t.afii57675 = 0x05db; 12849 t.afii57676 = 0x05dc; 12850 t.afii57677 = 0x05dd; 12851 t.afii57678 = 0x05de; 12852 t.afii57679 = 0x05df; 12853 t.afii57680 = 0x05e0; 12854 t.afii57681 = 0x05e1; 12855 t.afii57682 = 0x05e2; 12856 t.afii57683 = 0x05e3; 12857 t.afii57684 = 0x05e4; 12858 t.afii57685 = 0x05e5; 12859 t.afii57686 = 0x05e6; 12860 t.afii57687 = 0x05e7; 12861 t.afii57688 = 0x05e8; 12862 t.afii57689 = 0x05e9; 12863 t.afii57690 = 0x05ea; 12864 t.afii57694 = 0xfb2a; 12865 t.afii57695 = 0xfb2b; 12866 t.afii57700 = 0xfb4b; 12867 t.afii57705 = 0xfb1f; 12868 t.afii57716 = 0x05f0; 12869 t.afii57717 = 0x05f1; 12870 t.afii57718 = 0x05f2; 12871 t.afii57723 = 0xfb35; 12872 t.afii57793 = 0x05b4; 12873 t.afii57794 = 0x05b5; 12874 t.afii57795 = 0x05b6; 12875 t.afii57796 = 0x05bb; 12876 t.afii57797 = 0x05b8; 12877 t.afii57798 = 0x05b7; 12878 t.afii57799 = 0x05b0; 12879 t.afii57800 = 0x05b2; 12880 t.afii57801 = 0x05b1; 12881 t.afii57802 = 0x05b3; 12882 t.afii57803 = 0x05c2; 12883 t.afii57804 = 0x05c1; 12884 t.afii57806 = 0x05b9; 12885 t.afii57807 = 0x05bc; 12886 t.afii57839 = 0x05bd; 12887 t.afii57841 = 0x05bf; 12888 t.afii57842 = 0x05c0; 12889 t.afii57929 = 0x02bc; 12890 t.afii61248 = 0x2105; 12891 t.afii61289 = 0x2113; 12892 t.afii61352 = 0x2116; 12893 t.afii61573 = 0x202c; 12894 t.afii61574 = 0x202d; 12895 t.afii61575 = 0x202e; 12896 t.afii61664 = 0x200c; 12897 t.afii63167 = 0x066d; 12898 t.afii64937 = 0x02bd; 12899 t.agrave = 0x00e0; 12900 t.agujarati = 0x0a85; 12901 t.agurmukhi = 0x0a05; 12902 t.ahiragana = 0x3042; 12903 t.ahookabove = 0x1ea3; 12904 t.aibengali = 0x0990; 12905 t.aibopomofo = 0x311e; 12906 t.aideva = 0x0910; 12907 t.aiecyrillic = 0x04d5; 12908 t.aigujarati = 0x0a90; 12909 t.aigurmukhi = 0x0a10; 12910 t.aimatragurmukhi = 0x0a48; 12911 t.ainarabic = 0x0639; 12912 t.ainfinalarabic = 0xfeca; 12913 t.aininitialarabic = 0xfecb; 12914 t.ainmedialarabic = 0xfecc; 12915 t.ainvertedbreve = 0x0203; 12916 t.aivowelsignbengali = 0x09c8; 12917 t.aivowelsigndeva = 0x0948; 12918 t.aivowelsigngujarati = 0x0ac8; 12919 t.akatakana = 0x30a2; 12920 t.akatakanahalfwidth = 0xff71; 12921 t.akorean = 0x314f; 12922 t.alef = 0x05d0; 12923 t.alefarabic = 0x0627; 12924 t.alefdageshhebrew = 0xfb30; 12925 t.aleffinalarabic = 0xfe8e; 12926 t.alefhamzaabovearabic = 0x0623; 12927 t.alefhamzaabovefinalarabic = 0xfe84; 12928 t.alefhamzabelowarabic = 0x0625; 12929 t.alefhamzabelowfinalarabic = 0xfe88; 12930 t.alefhebrew = 0x05d0; 12931 t.aleflamedhebrew = 0xfb4f; 12932 t.alefmaddaabovearabic = 0x0622; 12933 t.alefmaddaabovefinalarabic = 0xfe82; 12934 t.alefmaksuraarabic = 0x0649; 12935 t.alefmaksurafinalarabic = 0xfef0; 12936 t.alefmaksurainitialarabic = 0xfef3; 12937 t.alefmaksuramedialarabic = 0xfef4; 12938 t.alefpatahhebrew = 0xfb2e; 12939 t.alefqamatshebrew = 0xfb2f; 12940 t.aleph = 0x2135; 12941 t.allequal = 0x224c; 12942 t.alpha = 0x03b1; 12943 t.alphatonos = 0x03ac; 12944 t.amacron = 0x0101; 12945 t.amonospace = 0xff41; 12946 t.ampersand = 0x0026; 12947 t.ampersandmonospace = 0xff06; 12948 t.ampersandsmall = 0xf726; 12949 t.amsquare = 0x33c2; 12950 t.anbopomofo = 0x3122; 12951 t.angbopomofo = 0x3124; 12952 t.angbracketleft = 0x3008; 12953 t.angbracketright = 0x3009; 12954 t.angkhankhuthai = 0x0e5a; 12955 t.angle = 0x2220; 12956 t.anglebracketleft = 0x3008; 12957 t.anglebracketleftvertical = 0xfe3f; 12958 t.anglebracketright = 0x3009; 12959 t.anglebracketrightvertical = 0xfe40; 12960 t.angleleft = 0x2329; 12961 t.angleright = 0x232a; 12962 t.angstrom = 0x212b; 12963 t.anoteleia = 0x0387; 12964 t.anudattadeva = 0x0952; 12965 t.anusvarabengali = 0x0982; 12966 t.anusvaradeva = 0x0902; 12967 t.anusvaragujarati = 0x0a82; 12968 t.aogonek = 0x0105; 12969 t.apaatosquare = 0x3300; 12970 t.aparen = 0x249c; 12971 t.apostrophearmenian = 0x055a; 12972 t.apostrophemod = 0x02bc; 12973 t.apple = 0xf8ff; 12974 t.approaches = 0x2250; 12975 t.approxequal = 0x2248; 12976 t.approxequalorimage = 0x2252; 12977 t.approximatelyequal = 0x2245; 12978 t.araeaekorean = 0x318e; 12979 t.araeakorean = 0x318d; 12980 t.arc = 0x2312; 12981 t.arighthalfring = 0x1e9a; 12982 t.aring = 0x00e5; 12983 t.aringacute = 0x01fb; 12984 t.aringbelow = 0x1e01; 12985 t.arrowboth = 0x2194; 12986 t.arrowdashdown = 0x21e3; 12987 t.arrowdashleft = 0x21e0; 12988 t.arrowdashright = 0x21e2; 12989 t.arrowdashup = 0x21e1; 12990 t.arrowdblboth = 0x21d4; 12991 t.arrowdbldown = 0x21d3; 12992 t.arrowdblleft = 0x21d0; 12993 t.arrowdblright = 0x21d2; 12994 t.arrowdblup = 0x21d1; 12995 t.arrowdown = 0x2193; 12996 t.arrowdownleft = 0x2199; 12997 t.arrowdownright = 0x2198; 12998 t.arrowdownwhite = 0x21e9; 12999 t.arrowheaddownmod = 0x02c5; 13000 t.arrowheadleftmod = 0x02c2; 13001 t.arrowheadrightmod = 0x02c3; 13002 t.arrowheadupmod = 0x02c4; 13003 t.arrowhorizex = 0xf8e7; 13004 t.arrowleft = 0x2190; 13005 t.arrowleftdbl = 0x21d0; 13006 t.arrowleftdblstroke = 0x21cd; 13007 t.arrowleftoverright = 0x21c6; 13008 t.arrowleftwhite = 0x21e6; 13009 t.arrowright = 0x2192; 13010 t.arrowrightdblstroke = 0x21cf; 13011 t.arrowrightheavy = 0x279e; 13012 t.arrowrightoverleft = 0x21c4; 13013 t.arrowrightwhite = 0x21e8; 13014 t.arrowtableft = 0x21e4; 13015 t.arrowtabright = 0x21e5; 13016 t.arrowup = 0x2191; 13017 t.arrowupdn = 0x2195; 13018 t.arrowupdnbse = 0x21a8; 13019 t.arrowupdownbase = 0x21a8; 13020 t.arrowupleft = 0x2196; 13021 t.arrowupleftofdown = 0x21c5; 13022 t.arrowupright = 0x2197; 13023 t.arrowupwhite = 0x21e7; 13024 t.arrowvertex = 0xf8e6; 13025 t.asciicircum = 0x005e; 13026 t.asciicircummonospace = 0xff3e; 13027 t.asciitilde = 0x007e; 13028 t.asciitildemonospace = 0xff5e; 13029 t.ascript = 0x0251; 13030 t.ascriptturned = 0x0252; 13031 t.asmallhiragana = 0x3041; 13032 t.asmallkatakana = 0x30a1; 13033 t.asmallkatakanahalfwidth = 0xff67; 13034 t.asterisk = 0x002a; 13035 t.asteriskaltonearabic = 0x066d; 13036 t.asteriskarabic = 0x066d; 13037 t.asteriskmath = 0x2217; 13038 t.asteriskmonospace = 0xff0a; 13039 t.asterisksmall = 0xfe61; 13040 t.asterism = 0x2042; 13041 t.asuperior = 0xf6e9; 13042 t.asymptoticallyequal = 0x2243; 13043 t.at = 0x0040; 13044 t.atilde = 0x00e3; 13045 t.atmonospace = 0xff20; 13046 t.atsmall = 0xfe6b; 13047 t.aturned = 0x0250; 13048 t.aubengali = 0x0994; 13049 t.aubopomofo = 0x3120; 13050 t.audeva = 0x0914; 13051 t.augujarati = 0x0a94; 13052 t.augurmukhi = 0x0a14; 13053 t.aulengthmarkbengali = 0x09d7; 13054 t.aumatragurmukhi = 0x0a4c; 13055 t.auvowelsignbengali = 0x09cc; 13056 t.auvowelsigndeva = 0x094c; 13057 t.auvowelsigngujarati = 0x0acc; 13058 t.avagrahadeva = 0x093d; 13059 t.aybarmenian = 0x0561; 13060 t.ayin = 0x05e2; 13061 t.ayinaltonehebrew = 0xfb20; 13062 t.ayinhebrew = 0x05e2; 13063 t.b = 0x0062; 13064 t.babengali = 0x09ac; 13065 t.backslash = 0x005c; 13066 t.backslashmonospace = 0xff3c; 13067 t.badeva = 0x092c; 13068 t.bagujarati = 0x0aac; 13069 t.bagurmukhi = 0x0a2c; 13070 t.bahiragana = 0x3070; 13071 t.bahtthai = 0x0e3f; 13072 t.bakatakana = 0x30d0; 13073 t.bar = 0x007c; 13074 t.barmonospace = 0xff5c; 13075 t.bbopomofo = 0x3105; 13076 t.bcircle = 0x24d1; 13077 t.bdotaccent = 0x1e03; 13078 t.bdotbelow = 0x1e05; 13079 t.beamedsixteenthnotes = 0x266c; 13080 t.because = 0x2235; 13081 t.becyrillic = 0x0431; 13082 t.beharabic = 0x0628; 13083 t.behfinalarabic = 0xfe90; 13084 t.behinitialarabic = 0xfe91; 13085 t.behiragana = 0x3079; 13086 t.behmedialarabic = 0xfe92; 13087 t.behmeeminitialarabic = 0xfc9f; 13088 t.behmeemisolatedarabic = 0xfc08; 13089 t.behnoonfinalarabic = 0xfc6d; 13090 t.bekatakana = 0x30d9; 13091 t.benarmenian = 0x0562; 13092 t.bet = 0x05d1; 13093 t.beta = 0x03b2; 13094 t.betasymbolgreek = 0x03d0; 13095 t.betdagesh = 0xfb31; 13096 t.betdageshhebrew = 0xfb31; 13097 t.bethebrew = 0x05d1; 13098 t.betrafehebrew = 0xfb4c; 13099 t.bhabengali = 0x09ad; 13100 t.bhadeva = 0x092d; 13101 t.bhagujarati = 0x0aad; 13102 t.bhagurmukhi = 0x0a2d; 13103 t.bhook = 0x0253; 13104 t.bihiragana = 0x3073; 13105 t.bikatakana = 0x30d3; 13106 t.bilabialclick = 0x0298; 13107 t.bindigurmukhi = 0x0a02; 13108 t.birusquare = 0x3331; 13109 t.blackcircle = 0x25cf; 13110 t.blackdiamond = 0x25c6; 13111 t.blackdownpointingtriangle = 0x25bc; 13112 t.blackleftpointingpointer = 0x25c4; 13113 t.blackleftpointingtriangle = 0x25c0; 13114 t.blacklenticularbracketleft = 0x3010; 13115 t.blacklenticularbracketleftvertical = 0xfe3b; 13116 t.blacklenticularbracketright = 0x3011; 13117 t.blacklenticularbracketrightvertical = 0xfe3c; 13118 t.blacklowerlefttriangle = 0x25e3; 13119 t.blacklowerrighttriangle = 0x25e2; 13120 t.blackrectangle = 0x25ac; 13121 t.blackrightpointingpointer = 0x25ba; 13122 t.blackrightpointingtriangle = 0x25b6; 13123 t.blacksmallsquare = 0x25aa; 13124 t.blacksmilingface = 0x263b; 13125 t.blacksquare = 0x25a0; 13126 t.blackstar = 0x2605; 13127 t.blackupperlefttriangle = 0x25e4; 13128 t.blackupperrighttriangle = 0x25e5; 13129 t.blackuppointingsmalltriangle = 0x25b4; 13130 t.blackuppointingtriangle = 0x25b2; 13131 t.blank = 0x2423; 13132 t.blinebelow = 0x1e07; 13133 t.block = 0x2588; 13134 t.bmonospace = 0xff42; 13135 t.bobaimaithai = 0x0e1a; 13136 t.bohiragana = 0x307c; 13137 t.bokatakana = 0x30dc; 13138 t.bparen = 0x249d; 13139 t.bqsquare = 0x33c3; 13140 t.braceex = 0xf8f4; 13141 t.braceleft = 0x007b; 13142 t.braceleftbt = 0xf8f3; 13143 t.braceleftmid = 0xf8f2; 13144 t.braceleftmonospace = 0xff5b; 13145 t.braceleftsmall = 0xfe5b; 13146 t.bracelefttp = 0xf8f1; 13147 t.braceleftvertical = 0xfe37; 13148 t.braceright = 0x007d; 13149 t.bracerightbt = 0xf8fe; 13150 t.bracerightmid = 0xf8fd; 13151 t.bracerightmonospace = 0xff5d; 13152 t.bracerightsmall = 0xfe5c; 13153 t.bracerighttp = 0xf8fc; 13154 t.bracerightvertical = 0xfe38; 13155 t.bracketleft = 0x005b; 13156 t.bracketleftbt = 0xf8f0; 13157 t.bracketleftex = 0xf8ef; 13158 t.bracketleftmonospace = 0xff3b; 13159 t.bracketlefttp = 0xf8ee; 13160 t.bracketright = 0x005d; 13161 t.bracketrightbt = 0xf8fb; 13162 t.bracketrightex = 0xf8fa; 13163 t.bracketrightmonospace = 0xff3d; 13164 t.bracketrighttp = 0xf8f9; 13165 t.breve = 0x02d8; 13166 t.brevebelowcmb = 0x032e; 13167 t.brevecmb = 0x0306; 13168 t.breveinvertedbelowcmb = 0x032f; 13169 t.breveinvertedcmb = 0x0311; 13170 t.breveinverteddoublecmb = 0x0361; 13171 t.bridgebelowcmb = 0x032a; 13172 t.bridgeinvertedbelowcmb = 0x033a; 13173 t.brokenbar = 0x00a6; 13174 t.bstroke = 0x0180; 13175 t.bsuperior = 0xf6ea; 13176 t.btopbar = 0x0183; 13177 t.buhiragana = 0x3076; 13178 t.bukatakana = 0x30d6; 13179 t.bullet = 0x2022; 13180 t.bulletinverse = 0x25d8; 13181 t.bulletoperator = 0x2219; 13182 t.bullseye = 0x25ce; 13183 t.c = 0x0063; 13184 t.caarmenian = 0x056e; 13185 t.cabengali = 0x099a; 13186 t.cacute = 0x0107; 13187 t.cadeva = 0x091a; 13188 t.cagujarati = 0x0a9a; 13189 t.cagurmukhi = 0x0a1a; 13190 t.calsquare = 0x3388; 13191 t.candrabindubengali = 0x0981; 13192 t.candrabinducmb = 0x0310; 13193 t.candrabindudeva = 0x0901; 13194 t.candrabindugujarati = 0x0a81; 13195 t.capslock = 0x21ea; 13196 t.careof = 0x2105; 13197 t.caron = 0x02c7; 13198 t.caronbelowcmb = 0x032c; 13199 t.caroncmb = 0x030c; 13200 t.carriagereturn = 0x21b5; 13201 t.cbopomofo = 0x3118; 13202 t.ccaron = 0x010d; 13203 t.ccedilla = 0x00e7; 13204 t.ccedillaacute = 0x1e09; 13205 t.ccircle = 0x24d2; 13206 t.ccircumflex = 0x0109; 13207 t.ccurl = 0x0255; 13208 t.cdot = 0x010b; 13209 t.cdotaccent = 0x010b; 13210 t.cdsquare = 0x33c5; 13211 t.cedilla = 0x00b8; 13212 t.cedillacmb = 0x0327; 13213 t.cent = 0x00a2; 13214 t.centigrade = 0x2103; 13215 t.centinferior = 0xf6df; 13216 t.centmonospace = 0xffe0; 13217 t.centoldstyle = 0xf7a2; 13218 t.centsuperior = 0xf6e0; 13219 t.chaarmenian = 0x0579; 13220 t.chabengali = 0x099b; 13221 t.chadeva = 0x091b; 13222 t.chagujarati = 0x0a9b; 13223 t.chagurmukhi = 0x0a1b; 13224 t.chbopomofo = 0x3114; 13225 t.cheabkhasiancyrillic = 0x04bd; 13226 t.checkmark = 0x2713; 13227 t.checyrillic = 0x0447; 13228 t.chedescenderabkhasiancyrillic = 0x04bf; 13229 t.chedescendercyrillic = 0x04b7; 13230 t.chedieresiscyrillic = 0x04f5; 13231 t.cheharmenian = 0x0573; 13232 t.chekhakassiancyrillic = 0x04cc; 13233 t.cheverticalstrokecyrillic = 0x04b9; 13234 t.chi = 0x03c7; 13235 t.chieuchacirclekorean = 0x3277; 13236 t.chieuchaparenkorean = 0x3217; 13237 t.chieuchcirclekorean = 0x3269; 13238 t.chieuchkorean = 0x314a; 13239 t.chieuchparenkorean = 0x3209; 13240 t.chochangthai = 0x0e0a; 13241 t.chochanthai = 0x0e08; 13242 t.chochingthai = 0x0e09; 13243 t.chochoethai = 0x0e0c; 13244 t.chook = 0x0188; 13245 t.cieucacirclekorean = 0x3276; 13246 t.cieucaparenkorean = 0x3216; 13247 t.cieuccirclekorean = 0x3268; 13248 t.cieuckorean = 0x3148; 13249 t.cieucparenkorean = 0x3208; 13250 t.cieucuparenkorean = 0x321c; 13251 t.circle = 0x25cb; 13252 t.circlecopyrt = 0x00a9; 13253 t.circlemultiply = 0x2297; 13254 t.circleot = 0x2299; 13255 t.circleplus = 0x2295; 13256 t.circlepostalmark = 0x3036; 13257 t.circlewithlefthalfblack = 0x25d0; 13258 t.circlewithrighthalfblack = 0x25d1; 13259 t.circumflex = 0x02c6; 13260 t.circumflexbelowcmb = 0x032d; 13261 t.circumflexcmb = 0x0302; 13262 t.clear = 0x2327; 13263 t.clickalveolar = 0x01c2; 13264 t.clickdental = 0x01c0; 13265 t.clicklateral = 0x01c1; 13266 t.clickretroflex = 0x01c3; 13267 t.club = 0x2663; 13268 t.clubsuitblack = 0x2663; 13269 t.clubsuitwhite = 0x2667; 13270 t.cmcubedsquare = 0x33a4; 13271 t.cmonospace = 0xff43; 13272 t.cmsquaredsquare = 0x33a0; 13273 t.coarmenian = 0x0581; 13274 t.colon = 0x003a; 13275 t.colonmonetary = 0x20a1; 13276 t.colonmonospace = 0xff1a; 13277 t.colonsign = 0x20a1; 13278 t.colonsmall = 0xfe55; 13279 t.colontriangularhalfmod = 0x02d1; 13280 t.colontriangularmod = 0x02d0; 13281 t.comma = 0x002c; 13282 t.commaabovecmb = 0x0313; 13283 t.commaaboverightcmb = 0x0315; 13284 t.commaaccent = 0xf6c3; 13285 t.commaarabic = 0x060c; 13286 t.commaarmenian = 0x055d; 13287 t.commainferior = 0xf6e1; 13288 t.commamonospace = 0xff0c; 13289 t.commareversedabovecmb = 0x0314; 13290 t.commareversedmod = 0x02bd; 13291 t.commasmall = 0xfe50; 13292 t.commasuperior = 0xf6e2; 13293 t.commaturnedabovecmb = 0x0312; 13294 t.commaturnedmod = 0x02bb; 13295 t.compass = 0x263c; 13296 t.congruent = 0x2245; 13297 t.contourintegral = 0x222e; 13298 t.control = 0x2303; 13299 t.controlACK = 0x0006; 13300 t.controlBEL = 0x0007; 13301 t.controlBS = 0x0008; 13302 t.controlCAN = 0x0018; 13303 t.controlCR = 0x000d; 13304 t.controlDC1 = 0x0011; 13305 t.controlDC2 = 0x0012; 13306 t.controlDC3 = 0x0013; 13307 t.controlDC4 = 0x0014; 13308 t.controlDEL = 0x007f; 13309 t.controlDLE = 0x0010; 13310 t.controlEM = 0x0019; 13311 t.controlENQ = 0x0005; 13312 t.controlEOT = 0x0004; 13313 t.controlESC = 0x001b; 13314 t.controlETB = 0x0017; 13315 t.controlETX = 0x0003; 13316 t.controlFF = 0x000c; 13317 t.controlFS = 0x001c; 13318 t.controlGS = 0x001d; 13319 t.controlHT = 0x0009; 13320 t.controlLF = 0x000a; 13321 t.controlNAK = 0x0015; 13322 t.controlNULL = 0x0000; 13323 t.controlRS = 0x001e; 13324 t.controlSI = 0x000f; 13325 t.controlSO = 0x000e; 13326 t.controlSOT = 0x0002; 13327 t.controlSTX = 0x0001; 13328 t.controlSUB = 0x001a; 13329 t.controlSYN = 0x0016; 13330 t.controlUS = 0x001f; 13331 t.controlVT = 0x000b; 13332 t.copyright = 0x00a9; 13333 t.copyrightsans = 0xf8e9; 13334 t.copyrightserif = 0xf6d9; 13335 t.cornerbracketleft = 0x300c; 13336 t.cornerbracketlefthalfwidth = 0xff62; 13337 t.cornerbracketleftvertical = 0xfe41; 13338 t.cornerbracketright = 0x300d; 13339 t.cornerbracketrighthalfwidth = 0xff63; 13340 t.cornerbracketrightvertical = 0xfe42; 13341 t.corporationsquare = 0x337f; 13342 t.cosquare = 0x33c7; 13343 t.coverkgsquare = 0x33c6; 13344 t.cparen = 0x249e; 13345 t.cruzeiro = 0x20a2; 13346 t.cstretched = 0x0297; 13347 t.curlyand = 0x22cf; 13348 t.curlyor = 0x22ce; 13349 t.currency = 0x00a4; 13350 t.cyrBreve = 0xf6d1; 13351 t.cyrFlex = 0xf6d2; 13352 t.cyrbreve = 0xf6d4; 13353 t.cyrflex = 0xf6d5; 13354 t.d = 0x0064; 13355 t.daarmenian = 0x0564; 13356 t.dabengali = 0x09a6; 13357 t.dadarabic = 0x0636; 13358 t.dadeva = 0x0926; 13359 t.dadfinalarabic = 0xfebe; 13360 t.dadinitialarabic = 0xfebf; 13361 t.dadmedialarabic = 0xfec0; 13362 t.dagesh = 0x05bc; 13363 t.dageshhebrew = 0x05bc; 13364 t.dagger = 0x2020; 13365 t.daggerdbl = 0x2021; 13366 t.dagujarati = 0x0aa6; 13367 t.dagurmukhi = 0x0a26; 13368 t.dahiragana = 0x3060; 13369 t.dakatakana = 0x30c0; 13370 t.dalarabic = 0x062f; 13371 t.dalet = 0x05d3; 13372 t.daletdagesh = 0xfb33; 13373 t.daletdageshhebrew = 0xfb33; 13374 t.dalethebrew = 0x05d3; 13375 t.dalfinalarabic = 0xfeaa; 13376 t.dammaarabic = 0x064f; 13377 t.dammalowarabic = 0x064f; 13378 t.dammatanaltonearabic = 0x064c; 13379 t.dammatanarabic = 0x064c; 13380 t.danda = 0x0964; 13381 t.dargahebrew = 0x05a7; 13382 t.dargalefthebrew = 0x05a7; 13383 t.dasiapneumatacyrilliccmb = 0x0485; 13384 t.dblGrave = 0xf6d3; 13385 t.dblanglebracketleft = 0x300a; 13386 t.dblanglebracketleftvertical = 0xfe3d; 13387 t.dblanglebracketright = 0x300b; 13388 t.dblanglebracketrightvertical = 0xfe3e; 13389 t.dblarchinvertedbelowcmb = 0x032b; 13390 t.dblarrowleft = 0x21d4; 13391 t.dblarrowright = 0x21d2; 13392 t.dbldanda = 0x0965; 13393 t.dblgrave = 0xf6d6; 13394 t.dblgravecmb = 0x030f; 13395 t.dblintegral = 0x222c; 13396 t.dbllowline = 0x2017; 13397 t.dbllowlinecmb = 0x0333; 13398 t.dbloverlinecmb = 0x033f; 13399 t.dblprimemod = 0x02ba; 13400 t.dblverticalbar = 0x2016; 13401 t.dblverticallineabovecmb = 0x030e; 13402 t.dbopomofo = 0x3109; 13403 t.dbsquare = 0x33c8; 13404 t.dcaron = 0x010f; 13405 t.dcedilla = 0x1e11; 13406 t.dcircle = 0x24d3; 13407 t.dcircumflexbelow = 0x1e13; 13408 t.dcroat = 0x0111; 13409 t.ddabengali = 0x09a1; 13410 t.ddadeva = 0x0921; 13411 t.ddagujarati = 0x0aa1; 13412 t.ddagurmukhi = 0x0a21; 13413 t.ddalarabic = 0x0688; 13414 t.ddalfinalarabic = 0xfb89; 13415 t.dddhadeva = 0x095c; 13416 t.ddhabengali = 0x09a2; 13417 t.ddhadeva = 0x0922; 13418 t.ddhagujarati = 0x0aa2; 13419 t.ddhagurmukhi = 0x0a22; 13420 t.ddotaccent = 0x1e0b; 13421 t.ddotbelow = 0x1e0d; 13422 t.decimalseparatorarabic = 0x066b; 13423 t.decimalseparatorpersian = 0x066b; 13424 t.decyrillic = 0x0434; 13425 t.degree = 0x00b0; 13426 t.dehihebrew = 0x05ad; 13427 t.dehiragana = 0x3067; 13428 t.deicoptic = 0x03ef; 13429 t.dekatakana = 0x30c7; 13430 t.deleteleft = 0x232b; 13431 t.deleteright = 0x2326; 13432 t.delta = 0x03b4; 13433 t.deltaturned = 0x018d; 13434 t.denominatorminusonenumeratorbengali = 0x09f8; 13435 t.dezh = 0x02a4; 13436 t.dhabengali = 0x09a7; 13437 t.dhadeva = 0x0927; 13438 t.dhagujarati = 0x0aa7; 13439 t.dhagurmukhi = 0x0a27; 13440 t.dhook = 0x0257; 13441 t.dialytikatonos = 0x0385; 13442 t.dialytikatonoscmb = 0x0344; 13443 t.diamond = 0x2666; 13444 t.diamondsuitwhite = 0x2662; 13445 t.dieresis = 0x00a8; 13446 t.dieresisacute = 0xf6d7; 13447 t.dieresisbelowcmb = 0x0324; 13448 t.dieresiscmb = 0x0308; 13449 t.dieresisgrave = 0xf6d8; 13450 t.dieresistonos = 0x0385; 13451 t.dihiragana = 0x3062; 13452 t.dikatakana = 0x30c2; 13453 t.dittomark = 0x3003; 13454 t.divide = 0x00f7; 13455 t.divides = 0x2223; 13456 t.divisionslash = 0x2215; 13457 t.djecyrillic = 0x0452; 13458 t.dkshade = 0x2593; 13459 t.dlinebelow = 0x1e0f; 13460 t.dlsquare = 0x3397; 13461 t.dmacron = 0x0111; 13462 t.dmonospace = 0xff44; 13463 t.dnblock = 0x2584; 13464 t.dochadathai = 0x0e0e; 13465 t.dodekthai = 0x0e14; 13466 t.dohiragana = 0x3069; 13467 t.dokatakana = 0x30c9; 13468 t.dollar = 0x0024; 13469 t.dollarinferior = 0xf6e3; 13470 t.dollarmonospace = 0xff04; 13471 t.dollaroldstyle = 0xf724; 13472 t.dollarsmall = 0xfe69; 13473 t.dollarsuperior = 0xf6e4; 13474 t.dong = 0x20ab; 13475 t.dorusquare = 0x3326; 13476 t.dotaccent = 0x02d9; 13477 t.dotaccentcmb = 0x0307; 13478 t.dotbelowcmb = 0x0323; 13479 t.dotbelowcomb = 0x0323; 13480 t.dotkatakana = 0x30fb; 13481 t.dotlessi = 0x0131; 13482 t.dotlessj = 0xf6be; 13483 t.dotlessjstrokehook = 0x0284; 13484 t.dotmath = 0x22c5; 13485 t.dottedcircle = 0x25cc; 13486 t.doubleyodpatah = 0xfb1f; 13487 t.doubleyodpatahhebrew = 0xfb1f; 13488 t.downtackbelowcmb = 0x031e; 13489 t.downtackmod = 0x02d5; 13490 t.dparen = 0x249f; 13491 t.dsuperior = 0xf6eb; 13492 t.dtail = 0x0256; 13493 t.dtopbar = 0x018c; 13494 t.duhiragana = 0x3065; 13495 t.dukatakana = 0x30c5; 13496 t.dz = 0x01f3; 13497 t.dzaltone = 0x02a3; 13498 t.dzcaron = 0x01c6; 13499 t.dzcurl = 0x02a5; 13500 t.dzeabkhasiancyrillic = 0x04e1; 13501 t.dzecyrillic = 0x0455; 13502 t.dzhecyrillic = 0x045f; 13503 t.e = 0x0065; 13504 t.eacute = 0x00e9; 13505 t.earth = 0x2641; 13506 t.ebengali = 0x098f; 13507 t.ebopomofo = 0x311c; 13508 t.ebreve = 0x0115; 13509 t.ecandradeva = 0x090d; 13510 t.ecandragujarati = 0x0a8d; 13511 t.ecandravowelsigndeva = 0x0945; 13512 t.ecandravowelsigngujarati = 0x0ac5; 13513 t.ecaron = 0x011b; 13514 t.ecedillabreve = 0x1e1d; 13515 t.echarmenian = 0x0565; 13516 t.echyiwnarmenian = 0x0587; 13517 t.ecircle = 0x24d4; 13518 t.ecircumflex = 0x00ea; 13519 t.ecircumflexacute = 0x1ebf; 13520 t.ecircumflexbelow = 0x1e19; 13521 t.ecircumflexdotbelow = 0x1ec7; 13522 t.ecircumflexgrave = 0x1ec1; 13523 t.ecircumflexhookabove = 0x1ec3; 13524 t.ecircumflextilde = 0x1ec5; 13525 t.ecyrillic = 0x0454; 13526 t.edblgrave = 0x0205; 13527 t.edeva = 0x090f; 13528 t.edieresis = 0x00eb; 13529 t.edot = 0x0117; 13530 t.edotaccent = 0x0117; 13531 t.edotbelow = 0x1eb9; 13532 t.eegurmukhi = 0x0a0f; 13533 t.eematragurmukhi = 0x0a47; 13534 t.efcyrillic = 0x0444; 13535 t.egrave = 0x00e8; 13536 t.egujarati = 0x0a8f; 13537 t.eharmenian = 0x0567; 13538 t.ehbopomofo = 0x311d; 13539 t.ehiragana = 0x3048; 13540 t.ehookabove = 0x1ebb; 13541 t.eibopomofo = 0x311f; 13542 t.eight = 0x0038; 13543 t.eightarabic = 0x0668; 13544 t.eightbengali = 0x09ee; 13545 t.eightcircle = 0x2467; 13546 t.eightcircleinversesansserif = 0x2791; 13547 t.eightdeva = 0x096e; 13548 t.eighteencircle = 0x2471; 13549 t.eighteenparen = 0x2485; 13550 t.eighteenperiod = 0x2499; 13551 t.eightgujarati = 0x0aee; 13552 t.eightgurmukhi = 0x0a6e; 13553 t.eighthackarabic = 0x0668; 13554 t.eighthangzhou = 0x3028; 13555 t.eighthnotebeamed = 0x266b; 13556 t.eightideographicparen = 0x3227; 13557 t.eightinferior = 0x2088; 13558 t.eightmonospace = 0xff18; 13559 t.eightoldstyle = 0xf738; 13560 t.eightparen = 0x247b; 13561 t.eightperiod = 0x248f; 13562 t.eightpersian = 0x06f8; 13563 t.eightroman = 0x2177; 13564 t.eightsuperior = 0x2078; 13565 t.eightthai = 0x0e58; 13566 t.einvertedbreve = 0x0207; 13567 t.eiotifiedcyrillic = 0x0465; 13568 t.ekatakana = 0x30a8; 13569 t.ekatakanahalfwidth = 0xff74; 13570 t.ekonkargurmukhi = 0x0a74; 13571 t.ekorean = 0x3154; 13572 t.elcyrillic = 0x043b; 13573 t.element = 0x2208; 13574 t.elevencircle = 0x246a; 13575 t.elevenparen = 0x247e; 13576 t.elevenperiod = 0x2492; 13577 t.elevenroman = 0x217a; 13578 t.ellipsis = 0x2026; 13579 t.ellipsisvertical = 0x22ee; 13580 t.emacron = 0x0113; 13581 t.emacronacute = 0x1e17; 13582 t.emacrongrave = 0x1e15; 13583 t.emcyrillic = 0x043c; 13584 t.emdash = 0x2014; 13585 t.emdashvertical = 0xfe31; 13586 t.emonospace = 0xff45; 13587 t.emphasismarkarmenian = 0x055b; 13588 t.emptyset = 0x2205; 13589 t.enbopomofo = 0x3123; 13590 t.encyrillic = 0x043d; 13591 t.endash = 0x2013; 13592 t.endashvertical = 0xfe32; 13593 t.endescendercyrillic = 0x04a3; 13594 t.eng = 0x014b; 13595 t.engbopomofo = 0x3125; 13596 t.enghecyrillic = 0x04a5; 13597 t.enhookcyrillic = 0x04c8; 13598 t.enspace = 0x2002; 13599 t.eogonek = 0x0119; 13600 t.eokorean = 0x3153; 13601 t.eopen = 0x025b; 13602 t.eopenclosed = 0x029a; 13603 t.eopenreversed = 0x025c; 13604 t.eopenreversedclosed = 0x025e; 13605 t.eopenreversedhook = 0x025d; 13606 t.eparen = 0x24a0; 13607 t.epsilon = 0x03b5; 13608 t.epsilontonos = 0x03ad; 13609 t.equal = 0x003d; 13610 t.equalmonospace = 0xff1d; 13611 t.equalsmall = 0xfe66; 13612 t.equalsuperior = 0x207c; 13613 t.equivalence = 0x2261; 13614 t.erbopomofo = 0x3126; 13615 t.ercyrillic = 0x0440; 13616 t.ereversed = 0x0258; 13617 t.ereversedcyrillic = 0x044d; 13618 t.escyrillic = 0x0441; 13619 t.esdescendercyrillic = 0x04ab; 13620 t.esh = 0x0283; 13621 t.eshcurl = 0x0286; 13622 t.eshortdeva = 0x090e; 13623 t.eshortvowelsigndeva = 0x0946; 13624 t.eshreversedloop = 0x01aa; 13625 t.eshsquatreversed = 0x0285; 13626 t.esmallhiragana = 0x3047; 13627 t.esmallkatakana = 0x30a7; 13628 t.esmallkatakanahalfwidth = 0xff6a; 13629 t.estimated = 0x212e; 13630 t.esuperior = 0xf6ec; 13631 t.eta = 0x03b7; 13632 t.etarmenian = 0x0568; 13633 t.etatonos = 0x03ae; 13634 t.eth = 0x00f0; 13635 t.etilde = 0x1ebd; 13636 t.etildebelow = 0x1e1b; 13637 t.etnahtafoukhhebrew = 0x0591; 13638 t.etnahtafoukhlefthebrew = 0x0591; 13639 t.etnahtahebrew = 0x0591; 13640 t.etnahtalefthebrew = 0x0591; 13641 t.eturned = 0x01dd; 13642 t.eukorean = 0x3161; 13643 t.euro = 0x20ac; 13644 t.evowelsignbengali = 0x09c7; 13645 t.evowelsigndeva = 0x0947; 13646 t.evowelsigngujarati = 0x0ac7; 13647 t.exclam = 0x0021; 13648 t.exclamarmenian = 0x055c; 13649 t.exclamdbl = 0x203c; 13650 t.exclamdown = 0x00a1; 13651 t.exclamdownsmall = 0xf7a1; 13652 t.exclammonospace = 0xff01; 13653 t.exclamsmall = 0xf721; 13654 t.existential = 0x2203; 13655 t.ezh = 0x0292; 13656 t.ezhcaron = 0x01ef; 13657 t.ezhcurl = 0x0293; 13658 t.ezhreversed = 0x01b9; 13659 t.ezhtail = 0x01ba; 13660 t.f = 0x0066; 13661 t.fadeva = 0x095e; 13662 t.fagurmukhi = 0x0a5e; 13663 t.fahrenheit = 0x2109; 13664 t.fathaarabic = 0x064e; 13665 t.fathalowarabic = 0x064e; 13666 t.fathatanarabic = 0x064b; 13667 t.fbopomofo = 0x3108; 13668 t.fcircle = 0x24d5; 13669 t.fdotaccent = 0x1e1f; 13670 t.feharabic = 0x0641; 13671 t.feharmenian = 0x0586; 13672 t.fehfinalarabic = 0xfed2; 13673 t.fehinitialarabic = 0xfed3; 13674 t.fehmedialarabic = 0xfed4; 13675 t.feicoptic = 0x03e5; 13676 t.female = 0x2640; 13677 t.ff = 0xfb00; 13678 t.f_f = 0xfb00; 13679 t.ffi = 0xfb03; 13680 t.f_f_i = 0xfb03; 13681 t.ffl = 0xfb04; 13682 t.f_f_l = 0xfb04; 13683 t.fi = 0xfb01; 13684 t.f_i = 0xfb01; 13685 t.fifteencircle = 0x246e; 13686 t.fifteenparen = 0x2482; 13687 t.fifteenperiod = 0x2496; 13688 t.figuredash = 0x2012; 13689 t.filledbox = 0x25a0; 13690 t.filledrect = 0x25ac; 13691 t.finalkaf = 0x05da; 13692 t.finalkafdagesh = 0xfb3a; 13693 t.finalkafdageshhebrew = 0xfb3a; 13694 t.finalkafhebrew = 0x05da; 13695 t.finalmem = 0x05dd; 13696 t.finalmemhebrew = 0x05dd; 13697 t.finalnun = 0x05df; 13698 t.finalnunhebrew = 0x05df; 13699 t.finalpe = 0x05e3; 13700 t.finalpehebrew = 0x05e3; 13701 t.finaltsadi = 0x05e5; 13702 t.finaltsadihebrew = 0x05e5; 13703 t.firsttonechinese = 0x02c9; 13704 t.fisheye = 0x25c9; 13705 t.fitacyrillic = 0x0473; 13706 t.five = 0x0035; 13707 t.fivearabic = 0x0665; 13708 t.fivebengali = 0x09eb; 13709 t.fivecircle = 0x2464; 13710 t.fivecircleinversesansserif = 0x278e; 13711 t.fivedeva = 0x096b; 13712 t.fiveeighths = 0x215d; 13713 t.fivegujarati = 0x0aeb; 13714 t.fivegurmukhi = 0x0a6b; 13715 t.fivehackarabic = 0x0665; 13716 t.fivehangzhou = 0x3025; 13717 t.fiveideographicparen = 0x3224; 13718 t.fiveinferior = 0x2085; 13719 t.fivemonospace = 0xff15; 13720 t.fiveoldstyle = 0xf735; 13721 t.fiveparen = 0x2478; 13722 t.fiveperiod = 0x248c; 13723 t.fivepersian = 0x06f5; 13724 t.fiveroman = 0x2174; 13725 t.fivesuperior = 0x2075; 13726 t.fivethai = 0x0e55; 13727 t.fl = 0xfb02; 13728 t.f_l = 0xfb02; 13729 t.florin = 0x0192; 13730 t.fmonospace = 0xff46; 13731 t.fmsquare = 0x3399; 13732 t.fofanthai = 0x0e1f; 13733 t.fofathai = 0x0e1d; 13734 t.fongmanthai = 0x0e4f; 13735 t.forall = 0x2200; 13736 t.four = 0x0034; 13737 t.fourarabic = 0x0664; 13738 t.fourbengali = 0x09ea; 13739 t.fourcircle = 0x2463; 13740 t.fourcircleinversesansserif = 0x278d; 13741 t.fourdeva = 0x096a; 13742 t.fourgujarati = 0x0aea; 13743 t.fourgurmukhi = 0x0a6a; 13744 t.fourhackarabic = 0x0664; 13745 t.fourhangzhou = 0x3024; 13746 t.fourideographicparen = 0x3223; 13747 t.fourinferior = 0x2084; 13748 t.fourmonospace = 0xff14; 13749 t.fournumeratorbengali = 0x09f7; 13750 t.fouroldstyle = 0xf734; 13751 t.fourparen = 0x2477; 13752 t.fourperiod = 0x248b; 13753 t.fourpersian = 0x06f4; 13754 t.fourroman = 0x2173; 13755 t.foursuperior = 0x2074; 13756 t.fourteencircle = 0x246d; 13757 t.fourteenparen = 0x2481; 13758 t.fourteenperiod = 0x2495; 13759 t.fourthai = 0x0e54; 13760 t.fourthtonechinese = 0x02cb; 13761 t.fparen = 0x24a1; 13762 t.fraction = 0x2044; 13763 t.franc = 0x20a3; 13764 t.g = 0x0067; 13765 t.gabengali = 0x0997; 13766 t.gacute = 0x01f5; 13767 t.gadeva = 0x0917; 13768 t.gafarabic = 0x06af; 13769 t.gaffinalarabic = 0xfb93; 13770 t.gafinitialarabic = 0xfb94; 13771 t.gafmedialarabic = 0xfb95; 13772 t.gagujarati = 0x0a97; 13773 t.gagurmukhi = 0x0a17; 13774 t.gahiragana = 0x304c; 13775 t.gakatakana = 0x30ac; 13776 t.gamma = 0x03b3; 13777 t.gammalatinsmall = 0x0263; 13778 t.gammasuperior = 0x02e0; 13779 t.gangiacoptic = 0x03eb; 13780 t.gbopomofo = 0x310d; 13781 t.gbreve = 0x011f; 13782 t.gcaron = 0x01e7; 13783 t.gcedilla = 0x0123; 13784 t.gcircle = 0x24d6; 13785 t.gcircumflex = 0x011d; 13786 t.gcommaaccent = 0x0123; 13787 t.gdot = 0x0121; 13788 t.gdotaccent = 0x0121; 13789 t.gecyrillic = 0x0433; 13790 t.gehiragana = 0x3052; 13791 t.gekatakana = 0x30b2; 13792 t.geometricallyequal = 0x2251; 13793 t.gereshaccenthebrew = 0x059c; 13794 t.gereshhebrew = 0x05f3; 13795 t.gereshmuqdamhebrew = 0x059d; 13796 t.germandbls = 0x00df; 13797 t.gershayimaccenthebrew = 0x059e; 13798 t.gershayimhebrew = 0x05f4; 13799 t.getamark = 0x3013; 13800 t.ghabengali = 0x0998; 13801 t.ghadarmenian = 0x0572; 13802 t.ghadeva = 0x0918; 13803 t.ghagujarati = 0x0a98; 13804 t.ghagurmukhi = 0x0a18; 13805 t.ghainarabic = 0x063a; 13806 t.ghainfinalarabic = 0xfece; 13807 t.ghaininitialarabic = 0xfecf; 13808 t.ghainmedialarabic = 0xfed0; 13809 t.ghemiddlehookcyrillic = 0x0495; 13810 t.ghestrokecyrillic = 0x0493; 13811 t.gheupturncyrillic = 0x0491; 13812 t.ghhadeva = 0x095a; 13813 t.ghhagurmukhi = 0x0a5a; 13814 t.ghook = 0x0260; 13815 t.ghzsquare = 0x3393; 13816 t.gihiragana = 0x304e; 13817 t.gikatakana = 0x30ae; 13818 t.gimarmenian = 0x0563; 13819 t.gimel = 0x05d2; 13820 t.gimeldagesh = 0xfb32; 13821 t.gimeldageshhebrew = 0xfb32; 13822 t.gimelhebrew = 0x05d2; 13823 t.gjecyrillic = 0x0453; 13824 t.glottalinvertedstroke = 0x01be; 13825 t.glottalstop = 0x0294; 13826 t.glottalstopinverted = 0x0296; 13827 t.glottalstopmod = 0x02c0; 13828 t.glottalstopreversed = 0x0295; 13829 t.glottalstopreversedmod = 0x02c1; 13830 t.glottalstopreversedsuperior = 0x02e4; 13831 t.glottalstopstroke = 0x02a1; 13832 t.glottalstopstrokereversed = 0x02a2; 13833 t.gmacron = 0x1e21; 13834 t.gmonospace = 0xff47; 13835 t.gohiragana = 0x3054; 13836 t.gokatakana = 0x30b4; 13837 t.gparen = 0x24a2; 13838 t.gpasquare = 0x33ac; 13839 t.gradient = 0x2207; 13840 t.grave = 0x0060; 13841 t.gravebelowcmb = 0x0316; 13842 t.gravecmb = 0x0300; 13843 t.gravecomb = 0x0300; 13844 t.gravedeva = 0x0953; 13845 t.gravelowmod = 0x02ce; 13846 t.gravemonospace = 0xff40; 13847 t.gravetonecmb = 0x0340; 13848 t.greater = 0x003e; 13849 t.greaterequal = 0x2265; 13850 t.greaterequalorless = 0x22db; 13851 t.greatermonospace = 0xff1e; 13852 t.greaterorequivalent = 0x2273; 13853 t.greaterorless = 0x2277; 13854 t.greateroverequal = 0x2267; 13855 t.greatersmall = 0xfe65; 13856 t.gscript = 0x0261; 13857 t.gstroke = 0x01e5; 13858 t.guhiragana = 0x3050; 13859 t.guillemotleft = 0x00ab; 13860 t.guillemotright = 0x00bb; 13861 t.guilsinglleft = 0x2039; 13862 t.guilsinglright = 0x203a; 13863 t.gukatakana = 0x30b0; 13864 t.guramusquare = 0x3318; 13865 t.gysquare = 0x33c9; 13866 t.h = 0x0068; 13867 t.haabkhasiancyrillic = 0x04a9; 13868 t.haaltonearabic = 0x06c1; 13869 t.habengali = 0x09b9; 13870 t.hadescendercyrillic = 0x04b3; 13871 t.hadeva = 0x0939; 13872 t.hagujarati = 0x0ab9; 13873 t.hagurmukhi = 0x0a39; 13874 t.haharabic = 0x062d; 13875 t.hahfinalarabic = 0xfea2; 13876 t.hahinitialarabic = 0xfea3; 13877 t.hahiragana = 0x306f; 13878 t.hahmedialarabic = 0xfea4; 13879 t.haitusquare = 0x332a; 13880 t.hakatakana = 0x30cf; 13881 t.hakatakanahalfwidth = 0xff8a; 13882 t.halantgurmukhi = 0x0a4d; 13883 t.hamzaarabic = 0x0621; 13884 t.hamzalowarabic = 0x0621; 13885 t.hangulfiller = 0x3164; 13886 t.hardsigncyrillic = 0x044a; 13887 t.harpoonleftbarbup = 0x21bc; 13888 t.harpoonrightbarbup = 0x21c0; 13889 t.hasquare = 0x33ca; 13890 t.hatafpatah = 0x05b2; 13891 t.hatafpatah16 = 0x05b2; 13892 t.hatafpatah23 = 0x05b2; 13893 t.hatafpatah2f = 0x05b2; 13894 t.hatafpatahhebrew = 0x05b2; 13895 t.hatafpatahnarrowhebrew = 0x05b2; 13896 t.hatafpatahquarterhebrew = 0x05b2; 13897 t.hatafpatahwidehebrew = 0x05b2; 13898 t.hatafqamats = 0x05b3; 13899 t.hatafqamats1b = 0x05b3; 13900 t.hatafqamats28 = 0x05b3; 13901 t.hatafqamats34 = 0x05b3; 13902 t.hatafqamatshebrew = 0x05b3; 13903 t.hatafqamatsnarrowhebrew = 0x05b3; 13904 t.hatafqamatsquarterhebrew = 0x05b3; 13905 t.hatafqamatswidehebrew = 0x05b3; 13906 t.hatafsegol = 0x05b1; 13907 t.hatafsegol17 = 0x05b1; 13908 t.hatafsegol24 = 0x05b1; 13909 t.hatafsegol30 = 0x05b1; 13910 t.hatafsegolhebrew = 0x05b1; 13911 t.hatafsegolnarrowhebrew = 0x05b1; 13912 t.hatafsegolquarterhebrew = 0x05b1; 13913 t.hatafsegolwidehebrew = 0x05b1; 13914 t.hbar = 0x0127; 13915 t.hbopomofo = 0x310f; 13916 t.hbrevebelow = 0x1e2b; 13917 t.hcedilla = 0x1e29; 13918 t.hcircle = 0x24d7; 13919 t.hcircumflex = 0x0125; 13920 t.hdieresis = 0x1e27; 13921 t.hdotaccent = 0x1e23; 13922 t.hdotbelow = 0x1e25; 13923 t.he = 0x05d4; 13924 t.heart = 0x2665; 13925 t.heartsuitblack = 0x2665; 13926 t.heartsuitwhite = 0x2661; 13927 t.hedagesh = 0xfb34; 13928 t.hedageshhebrew = 0xfb34; 13929 t.hehaltonearabic = 0x06c1; 13930 t.heharabic = 0x0647; 13931 t.hehebrew = 0x05d4; 13932 t.hehfinalaltonearabic = 0xfba7; 13933 t.hehfinalalttwoarabic = 0xfeea; 13934 t.hehfinalarabic = 0xfeea; 13935 t.hehhamzaabovefinalarabic = 0xfba5; 13936 t.hehhamzaaboveisolatedarabic = 0xfba4; 13937 t.hehinitialaltonearabic = 0xfba8; 13938 t.hehinitialarabic = 0xfeeb; 13939 t.hehiragana = 0x3078; 13940 t.hehmedialaltonearabic = 0xfba9; 13941 t.hehmedialarabic = 0xfeec; 13942 t.heiseierasquare = 0x337b; 13943 t.hekatakana = 0x30d8; 13944 t.hekatakanahalfwidth = 0xff8d; 13945 t.hekutaarusquare = 0x3336; 13946 t.henghook = 0x0267; 13947 t.herutusquare = 0x3339; 13948 t.het = 0x05d7; 13949 t.hethebrew = 0x05d7; 13950 t.hhook = 0x0266; 13951 t.hhooksuperior = 0x02b1; 13952 t.hieuhacirclekorean = 0x327b; 13953 t.hieuhaparenkorean = 0x321b; 13954 t.hieuhcirclekorean = 0x326d; 13955 t.hieuhkorean = 0x314e; 13956 t.hieuhparenkorean = 0x320d; 13957 t.hihiragana = 0x3072; 13958 t.hikatakana = 0x30d2; 13959 t.hikatakanahalfwidth = 0xff8b; 13960 t.hiriq = 0x05b4; 13961 t.hiriq14 = 0x05b4; 13962 t.hiriq21 = 0x05b4; 13963 t.hiriq2d = 0x05b4; 13964 t.hiriqhebrew = 0x05b4; 13965 t.hiriqnarrowhebrew = 0x05b4; 13966 t.hiriqquarterhebrew = 0x05b4; 13967 t.hiriqwidehebrew = 0x05b4; 13968 t.hlinebelow = 0x1e96; 13969 t.hmonospace = 0xff48; 13970 t.hoarmenian = 0x0570; 13971 t.hohipthai = 0x0e2b; 13972 t.hohiragana = 0x307b; 13973 t.hokatakana = 0x30db; 13974 t.hokatakanahalfwidth = 0xff8e; 13975 t.holam = 0x05b9; 13976 t.holam19 = 0x05b9; 13977 t.holam26 = 0x05b9; 13978 t.holam32 = 0x05b9; 13979 t.holamhebrew = 0x05b9; 13980 t.holamnarrowhebrew = 0x05b9; 13981 t.holamquarterhebrew = 0x05b9; 13982 t.holamwidehebrew = 0x05b9; 13983 t.honokhukthai = 0x0e2e; 13984 t.hookabovecomb = 0x0309; 13985 t.hookcmb = 0x0309; 13986 t.hookpalatalizedbelowcmb = 0x0321; 13987 t.hookretroflexbelowcmb = 0x0322; 13988 t.hoonsquare = 0x3342; 13989 t.horicoptic = 0x03e9; 13990 t.horizontalbar = 0x2015; 13991 t.horncmb = 0x031b; 13992 t.hotsprings = 0x2668; 13993 t.house = 0x2302; 13994 t.hparen = 0x24a3; 13995 t.hsuperior = 0x02b0; 13996 t.hturned = 0x0265; 13997 t.huhiragana = 0x3075; 13998 t.huiitosquare = 0x3333; 13999 t.hukatakana = 0x30d5; 14000 t.hukatakanahalfwidth = 0xff8c; 14001 t.hungarumlaut = 0x02dd; 14002 t.hungarumlautcmb = 0x030b; 14003 t.hv = 0x0195; 14004 t.hyphen = 0x002d; 14005 t.hypheninferior = 0xf6e5; 14006 t.hyphenmonospace = 0xff0d; 14007 t.hyphensmall = 0xfe63; 14008 t.hyphensuperior = 0xf6e6; 14009 t.hyphentwo = 0x2010; 14010 t.i = 0x0069; 14011 t.iacute = 0x00ed; 14012 t.iacyrillic = 0x044f; 14013 t.ibengali = 0x0987; 14014 t.ibopomofo = 0x3127; 14015 t.ibreve = 0x012d; 14016 t.icaron = 0x01d0; 14017 t.icircle = 0x24d8; 14018 t.icircumflex = 0x00ee; 14019 t.icyrillic = 0x0456; 14020 t.idblgrave = 0x0209; 14021 t.ideographearthcircle = 0x328f; 14022 t.ideographfirecircle = 0x328b; 14023 t.ideographicallianceparen = 0x323f; 14024 t.ideographiccallparen = 0x323a; 14025 t.ideographiccentrecircle = 0x32a5; 14026 t.ideographicclose = 0x3006; 14027 t.ideographiccomma = 0x3001; 14028 t.ideographiccommaleft = 0xff64; 14029 t.ideographiccongratulationparen = 0x3237; 14030 t.ideographiccorrectcircle = 0x32a3; 14031 t.ideographicearthparen = 0x322f; 14032 t.ideographicenterpriseparen = 0x323d; 14033 t.ideographicexcellentcircle = 0x329d; 14034 t.ideographicfestivalparen = 0x3240; 14035 t.ideographicfinancialcircle = 0x3296; 14036 t.ideographicfinancialparen = 0x3236; 14037 t.ideographicfireparen = 0x322b; 14038 t.ideographichaveparen = 0x3232; 14039 t.ideographichighcircle = 0x32a4; 14040 t.ideographiciterationmark = 0x3005; 14041 t.ideographiclaborcircle = 0x3298; 14042 t.ideographiclaborparen = 0x3238; 14043 t.ideographicleftcircle = 0x32a7; 14044 t.ideographiclowcircle = 0x32a6; 14045 t.ideographicmedicinecircle = 0x32a9; 14046 t.ideographicmetalparen = 0x322e; 14047 t.ideographicmoonparen = 0x322a; 14048 t.ideographicnameparen = 0x3234; 14049 t.ideographicperiod = 0x3002; 14050 t.ideographicprintcircle = 0x329e; 14051 t.ideographicreachparen = 0x3243; 14052 t.ideographicrepresentparen = 0x3239; 14053 t.ideographicresourceparen = 0x323e; 14054 t.ideographicrightcircle = 0x32a8; 14055 t.ideographicsecretcircle = 0x3299; 14056 t.ideographicselfparen = 0x3242; 14057 t.ideographicsocietyparen = 0x3233; 14058 t.ideographicspace = 0x3000; 14059 t.ideographicspecialparen = 0x3235; 14060 t.ideographicstockparen = 0x3231; 14061 t.ideographicstudyparen = 0x323b; 14062 t.ideographicsunparen = 0x3230; 14063 t.ideographicsuperviseparen = 0x323c; 14064 t.ideographicwaterparen = 0x322c; 14065 t.ideographicwoodparen = 0x322d; 14066 t.ideographiczero = 0x3007; 14067 t.ideographmetalcircle = 0x328e; 14068 t.ideographmooncircle = 0x328a; 14069 t.ideographnamecircle = 0x3294; 14070 t.ideographsuncircle = 0x3290; 14071 t.ideographwatercircle = 0x328c; 14072 t.ideographwoodcircle = 0x328d; 14073 t.ideva = 0x0907; 14074 t.idieresis = 0x00ef; 14075 t.idieresisacute = 0x1e2f; 14076 t.idieresiscyrillic = 0x04e5; 14077 t.idotbelow = 0x1ecb; 14078 t.iebrevecyrillic = 0x04d7; 14079 t.iecyrillic = 0x0435; 14080 t.ieungacirclekorean = 0x3275; 14081 t.ieungaparenkorean = 0x3215; 14082 t.ieungcirclekorean = 0x3267; 14083 t.ieungkorean = 0x3147; 14084 t.ieungparenkorean = 0x3207; 14085 t.igrave = 0x00ec; 14086 t.igujarati = 0x0a87; 14087 t.igurmukhi = 0x0a07; 14088 t.ihiragana = 0x3044; 14089 t.ihookabove = 0x1ec9; 14090 t.iibengali = 0x0988; 14091 t.iicyrillic = 0x0438; 14092 t.iideva = 0x0908; 14093 t.iigujarati = 0x0a88; 14094 t.iigurmukhi = 0x0a08; 14095 t.iimatragurmukhi = 0x0a40; 14096 t.iinvertedbreve = 0x020b; 14097 t.iishortcyrillic = 0x0439; 14098 t.iivowelsignbengali = 0x09c0; 14099 t.iivowelsigndeva = 0x0940; 14100 t.iivowelsigngujarati = 0x0ac0; 14101 t.ij = 0x0133; 14102 t.ikatakana = 0x30a4; 14103 t.ikatakanahalfwidth = 0xff72; 14104 t.ikorean = 0x3163; 14105 t.ilde = 0x02dc; 14106 t.iluyhebrew = 0x05ac; 14107 t.imacron = 0x012b; 14108 t.imacroncyrillic = 0x04e3; 14109 t.imageorapproximatelyequal = 0x2253; 14110 t.imatragurmukhi = 0x0a3f; 14111 t.imonospace = 0xff49; 14112 t.increment = 0x2206; 14113 t.infinity = 0x221e; 14114 t.iniarmenian = 0x056b; 14115 t.integral = 0x222b; 14116 t.integralbottom = 0x2321; 14117 t.integralbt = 0x2321; 14118 t.integralex = 0xf8f5; 14119 t.integraltop = 0x2320; 14120 t.integraltp = 0x2320; 14121 t.intersection = 0x2229; 14122 t.intisquare = 0x3305; 14123 t.invbullet = 0x25d8; 14124 t.invcircle = 0x25d9; 14125 t.invsmileface = 0x263b; 14126 t.iocyrillic = 0x0451; 14127 t.iogonek = 0x012f; 14128 t.iota = 0x03b9; 14129 t.iotadieresis = 0x03ca; 14130 t.iotadieresistonos = 0x0390; 14131 t.iotalatin = 0x0269; 14132 t.iotatonos = 0x03af; 14133 t.iparen = 0x24a4; 14134 t.irigurmukhi = 0x0a72; 14135 t.ismallhiragana = 0x3043; 14136 t.ismallkatakana = 0x30a3; 14137 t.ismallkatakanahalfwidth = 0xff68; 14138 t.issharbengali = 0x09fa; 14139 t.istroke = 0x0268; 14140 t.isuperior = 0xf6ed; 14141 t.iterationhiragana = 0x309d; 14142 t.iterationkatakana = 0x30fd; 14143 t.itilde = 0x0129; 14144 t.itildebelow = 0x1e2d; 14145 t.iubopomofo = 0x3129; 14146 t.iucyrillic = 0x044e; 14147 t.ivowelsignbengali = 0x09bf; 14148 t.ivowelsigndeva = 0x093f; 14149 t.ivowelsigngujarati = 0x0abf; 14150 t.izhitsacyrillic = 0x0475; 14151 t.izhitsadblgravecyrillic = 0x0477; 14152 t.j = 0x006a; 14153 t.jaarmenian = 0x0571; 14154 t.jabengali = 0x099c; 14155 t.jadeva = 0x091c; 14156 t.jagujarati = 0x0a9c; 14157 t.jagurmukhi = 0x0a1c; 14158 t.jbopomofo = 0x3110; 14159 t.jcaron = 0x01f0; 14160 t.jcircle = 0x24d9; 14161 t.jcircumflex = 0x0135; 14162 t.jcrossedtail = 0x029d; 14163 t.jdotlessstroke = 0x025f; 14164 t.jecyrillic = 0x0458; 14165 t.jeemarabic = 0x062c; 14166 t.jeemfinalarabic = 0xfe9e; 14167 t.jeeminitialarabic = 0xfe9f; 14168 t.jeemmedialarabic = 0xfea0; 14169 t.jeharabic = 0x0698; 14170 t.jehfinalarabic = 0xfb8b; 14171 t.jhabengali = 0x099d; 14172 t.jhadeva = 0x091d; 14173 t.jhagujarati = 0x0a9d; 14174 t.jhagurmukhi = 0x0a1d; 14175 t.jheharmenian = 0x057b; 14176 t.jis = 0x3004; 14177 t.jmonospace = 0xff4a; 14178 t.jparen = 0x24a5; 14179 t.jsuperior = 0x02b2; 14180 t.k = 0x006b; 14181 t.kabashkircyrillic = 0x04a1; 14182 t.kabengali = 0x0995; 14183 t.kacute = 0x1e31; 14184 t.kacyrillic = 0x043a; 14185 t.kadescendercyrillic = 0x049b; 14186 t.kadeva = 0x0915; 14187 t.kaf = 0x05db; 14188 t.kafarabic = 0x0643; 14189 t.kafdagesh = 0xfb3b; 14190 t.kafdageshhebrew = 0xfb3b; 14191 t.kaffinalarabic = 0xfeda; 14192 t.kafhebrew = 0x05db; 14193 t.kafinitialarabic = 0xfedb; 14194 t.kafmedialarabic = 0xfedc; 14195 t.kafrafehebrew = 0xfb4d; 14196 t.kagujarati = 0x0a95; 14197 t.kagurmukhi = 0x0a15; 14198 t.kahiragana = 0x304b; 14199 t.kahookcyrillic = 0x04c4; 14200 t.kakatakana = 0x30ab; 14201 t.kakatakanahalfwidth = 0xff76; 14202 t.kappa = 0x03ba; 14203 t.kappasymbolgreek = 0x03f0; 14204 t.kapyeounmieumkorean = 0x3171; 14205 t.kapyeounphieuphkorean = 0x3184; 14206 t.kapyeounpieupkorean = 0x3178; 14207 t.kapyeounssangpieupkorean = 0x3179; 14208 t.karoriisquare = 0x330d; 14209 t.kashidaautoarabic = 0x0640; 14210 t.kashidaautonosidebearingarabic = 0x0640; 14211 t.kasmallkatakana = 0x30f5; 14212 t.kasquare = 0x3384; 14213 t.kasraarabic = 0x0650; 14214 t.kasratanarabic = 0x064d; 14215 t.kastrokecyrillic = 0x049f; 14216 t.katahiraprolongmarkhalfwidth = 0xff70; 14217 t.kaverticalstrokecyrillic = 0x049d; 14218 t.kbopomofo = 0x310e; 14219 t.kcalsquare = 0x3389; 14220 t.kcaron = 0x01e9; 14221 t.kcedilla = 0x0137; 14222 t.kcircle = 0x24da; 14223 t.kcommaaccent = 0x0137; 14224 t.kdotbelow = 0x1e33; 14225 t.keharmenian = 0x0584; 14226 t.kehiragana = 0x3051; 14227 t.kekatakana = 0x30b1; 14228 t.kekatakanahalfwidth = 0xff79; 14229 t.kenarmenian = 0x056f; 14230 t.kesmallkatakana = 0x30f6; 14231 t.kgreenlandic = 0x0138; 14232 t.khabengali = 0x0996; 14233 t.khacyrillic = 0x0445; 14234 t.khadeva = 0x0916; 14235 t.khagujarati = 0x0a96; 14236 t.khagurmukhi = 0x0a16; 14237 t.khaharabic = 0x062e; 14238 t.khahfinalarabic = 0xfea6; 14239 t.khahinitialarabic = 0xfea7; 14240 t.khahmedialarabic = 0xfea8; 14241 t.kheicoptic = 0x03e7; 14242 t.khhadeva = 0x0959; 14243 t.khhagurmukhi = 0x0a59; 14244 t.khieukhacirclekorean = 0x3278; 14245 t.khieukhaparenkorean = 0x3218; 14246 t.khieukhcirclekorean = 0x326a; 14247 t.khieukhkorean = 0x314b; 14248 t.khieukhparenkorean = 0x320a; 14249 t.khokhaithai = 0x0e02; 14250 t.khokhonthai = 0x0e05; 14251 t.khokhuatthai = 0x0e03; 14252 t.khokhwaithai = 0x0e04; 14253 t.khomutthai = 0x0e5b; 14254 t.khook = 0x0199; 14255 t.khorakhangthai = 0x0e06; 14256 t.khzsquare = 0x3391; 14257 t.kihiragana = 0x304d; 14258 t.kikatakana = 0x30ad; 14259 t.kikatakanahalfwidth = 0xff77; 14260 t.kiroguramusquare = 0x3315; 14261 t.kiromeetorusquare = 0x3316; 14262 t.kirosquare = 0x3314; 14263 t.kiyeokacirclekorean = 0x326e; 14264 t.kiyeokaparenkorean = 0x320e; 14265 t.kiyeokcirclekorean = 0x3260; 14266 t.kiyeokkorean = 0x3131; 14267 t.kiyeokparenkorean = 0x3200; 14268 t.kiyeoksioskorean = 0x3133; 14269 t.kjecyrillic = 0x045c; 14270 t.klinebelow = 0x1e35; 14271 t.klsquare = 0x3398; 14272 t.kmcubedsquare = 0x33a6; 14273 t.kmonospace = 0xff4b; 14274 t.kmsquaredsquare = 0x33a2; 14275 t.kohiragana = 0x3053; 14276 t.kohmsquare = 0x33c0; 14277 t.kokaithai = 0x0e01; 14278 t.kokatakana = 0x30b3; 14279 t.kokatakanahalfwidth = 0xff7a; 14280 t.kooposquare = 0x331e; 14281 t.koppacyrillic = 0x0481; 14282 t.koreanstandardsymbol = 0x327f; 14283 t.koroniscmb = 0x0343; 14284 t.kparen = 0x24a6; 14285 t.kpasquare = 0x33aa; 14286 t.ksicyrillic = 0x046f; 14287 t.ktsquare = 0x33cf; 14288 t.kturned = 0x029e; 14289 t.kuhiragana = 0x304f; 14290 t.kukatakana = 0x30af; 14291 t.kukatakanahalfwidth = 0xff78; 14292 t.kvsquare = 0x33b8; 14293 t.kwsquare = 0x33be; 14294 t.l = 0x006c; 14295 t.labengali = 0x09b2; 14296 t.lacute = 0x013a; 14297 t.ladeva = 0x0932; 14298 t.lagujarati = 0x0ab2; 14299 t.lagurmukhi = 0x0a32; 14300 t.lakkhangyaothai = 0x0e45; 14301 t.lamaleffinalarabic = 0xfefc; 14302 t.lamalefhamzaabovefinalarabic = 0xfef8; 14303 t.lamalefhamzaaboveisolatedarabic = 0xfef7; 14304 t.lamalefhamzabelowfinalarabic = 0xfefa; 14305 t.lamalefhamzabelowisolatedarabic = 0xfef9; 14306 t.lamalefisolatedarabic = 0xfefb; 14307 t.lamalefmaddaabovefinalarabic = 0xfef6; 14308 t.lamalefmaddaaboveisolatedarabic = 0xfef5; 14309 t.lamarabic = 0x0644; 14310 t.lambda = 0x03bb; 14311 t.lambdastroke = 0x019b; 14312 t.lamed = 0x05dc; 14313 t.lameddagesh = 0xfb3c; 14314 t.lameddageshhebrew = 0xfb3c; 14315 t.lamedhebrew = 0x05dc; 14316 t.lamfinalarabic = 0xfede; 14317 t.lamhahinitialarabic = 0xfcca; 14318 t.laminitialarabic = 0xfedf; 14319 t.lamjeeminitialarabic = 0xfcc9; 14320 t.lamkhahinitialarabic = 0xfccb; 14321 t.lamlamhehisolatedarabic = 0xfdf2; 14322 t.lammedialarabic = 0xfee0; 14323 t.lammeemhahinitialarabic = 0xfd88; 14324 t.lammeeminitialarabic = 0xfccc; 14325 t.largecircle = 0x25ef; 14326 t.lbar = 0x019a; 14327 t.lbelt = 0x026c; 14328 t.lbopomofo = 0x310c; 14329 t.lcaron = 0x013e; 14330 t.lcedilla = 0x013c; 14331 t.lcircle = 0x24db; 14332 t.lcircumflexbelow = 0x1e3d; 14333 t.lcommaaccent = 0x013c; 14334 t.ldot = 0x0140; 14335 t.ldotaccent = 0x0140; 14336 t.ldotbelow = 0x1e37; 14337 t.ldotbelowmacron = 0x1e39; 14338 t.leftangleabovecmb = 0x031a; 14339 t.lefttackbelowcmb = 0x0318; 14340 t.less = 0x003c; 14341 t.lessequal = 0x2264; 14342 t.lessequalorgreater = 0x22da; 14343 t.lessmonospace = 0xff1c; 14344 t.lessorequivalent = 0x2272; 14345 t.lessorgreater = 0x2276; 14346 t.lessoverequal = 0x2266; 14347 t.lesssmall = 0xfe64; 14348 t.lezh = 0x026e; 14349 t.lfblock = 0x258c; 14350 t.lhookretroflex = 0x026d; 14351 t.lira = 0x20a4; 14352 t.liwnarmenian = 0x056c; 14353 t.lj = 0x01c9; 14354 t.ljecyrillic = 0x0459; 14355 t.ll = 0xf6c0; 14356 t.lladeva = 0x0933; 14357 t.llagujarati = 0x0ab3; 14358 t.llinebelow = 0x1e3b; 14359 t.llladeva = 0x0934; 14360 t.llvocalicbengali = 0x09e1; 14361 t.llvocalicdeva = 0x0961; 14362 t.llvocalicvowelsignbengali = 0x09e3; 14363 t.llvocalicvowelsigndeva = 0x0963; 14364 t.lmiddletilde = 0x026b; 14365 t.lmonospace = 0xff4c; 14366 t.lmsquare = 0x33d0; 14367 t.lochulathai = 0x0e2c; 14368 t.logicaland = 0x2227; 14369 t.logicalnot = 0x00ac; 14370 t.logicalnotreversed = 0x2310; 14371 t.logicalor = 0x2228; 14372 t.lolingthai = 0x0e25; 14373 t.longs = 0x017f; 14374 t.lowlinecenterline = 0xfe4e; 14375 t.lowlinecmb = 0x0332; 14376 t.lowlinedashed = 0xfe4d; 14377 t.lozenge = 0x25ca; 14378 t.lparen = 0x24a7; 14379 t.lslash = 0x0142; 14380 t.lsquare = 0x2113; 14381 t.lsuperior = 0xf6ee; 14382 t.ltshade = 0x2591; 14383 t.luthai = 0x0e26; 14384 t.lvocalicbengali = 0x098c; 14385 t.lvocalicdeva = 0x090c; 14386 t.lvocalicvowelsignbengali = 0x09e2; 14387 t.lvocalicvowelsigndeva = 0x0962; 14388 t.lxsquare = 0x33d3; 14389 t.m = 0x006d; 14390 t.mabengali = 0x09ae; 14391 t.macron = 0x00af; 14392 t.macronbelowcmb = 0x0331; 14393 t.macroncmb = 0x0304; 14394 t.macronlowmod = 0x02cd; 14395 t.macronmonospace = 0xffe3; 14396 t.macute = 0x1e3f; 14397 t.madeva = 0x092e; 14398 t.magujarati = 0x0aae; 14399 t.magurmukhi = 0x0a2e; 14400 t.mahapakhhebrew = 0x05a4; 14401 t.mahapakhlefthebrew = 0x05a4; 14402 t.mahiragana = 0x307e; 14403 t.maichattawalowleftthai = 0xf895; 14404 t.maichattawalowrightthai = 0xf894; 14405 t.maichattawathai = 0x0e4b; 14406 t.maichattawaupperleftthai = 0xf893; 14407 t.maieklowleftthai = 0xf88c; 14408 t.maieklowrightthai = 0xf88b; 14409 t.maiekthai = 0x0e48; 14410 t.maiekupperleftthai = 0xf88a; 14411 t.maihanakatleftthai = 0xf884; 14412 t.maihanakatthai = 0x0e31; 14413 t.maitaikhuleftthai = 0xf889; 14414 t.maitaikhuthai = 0x0e47; 14415 t.maitholowleftthai = 0xf88f; 14416 t.maitholowrightthai = 0xf88e; 14417 t.maithothai = 0x0e49; 14418 t.maithoupperleftthai = 0xf88d; 14419 t.maitrilowleftthai = 0xf892; 14420 t.maitrilowrightthai = 0xf891; 14421 t.maitrithai = 0x0e4a; 14422 t.maitriupperleftthai = 0xf890; 14423 t.maiyamokthai = 0x0e46; 14424 t.makatakana = 0x30de; 14425 t.makatakanahalfwidth = 0xff8f; 14426 t.male = 0x2642; 14427 t.mansyonsquare = 0x3347; 14428 t.maqafhebrew = 0x05be; 14429 t.mars = 0x2642; 14430 t.masoracirclehebrew = 0x05af; 14431 t.masquare = 0x3383; 14432 t.mbopomofo = 0x3107; 14433 t.mbsquare = 0x33d4; 14434 t.mcircle = 0x24dc; 14435 t.mcubedsquare = 0x33a5; 14436 t.mdotaccent = 0x1e41; 14437 t.mdotbelow = 0x1e43; 14438 t.meemarabic = 0x0645; 14439 t.meemfinalarabic = 0xfee2; 14440 t.meeminitialarabic = 0xfee3; 14441 t.meemmedialarabic = 0xfee4; 14442 t.meemmeeminitialarabic = 0xfcd1; 14443 t.meemmeemisolatedarabic = 0xfc48; 14444 t.meetorusquare = 0x334d; 14445 t.mehiragana = 0x3081; 14446 t.meizierasquare = 0x337e; 14447 t.mekatakana = 0x30e1; 14448 t.mekatakanahalfwidth = 0xff92; 14449 t.mem = 0x05de; 14450 t.memdagesh = 0xfb3e; 14451 t.memdageshhebrew = 0xfb3e; 14452 t.memhebrew = 0x05de; 14453 t.menarmenian = 0x0574; 14454 t.merkhahebrew = 0x05a5; 14455 t.merkhakefulahebrew = 0x05a6; 14456 t.merkhakefulalefthebrew = 0x05a6; 14457 t.merkhalefthebrew = 0x05a5; 14458 t.mhook = 0x0271; 14459 t.mhzsquare = 0x3392; 14460 t.middledotkatakanahalfwidth = 0xff65; 14461 t.middot = 0x00b7; 14462 t.mieumacirclekorean = 0x3272; 14463 t.mieumaparenkorean = 0x3212; 14464 t.mieumcirclekorean = 0x3264; 14465 t.mieumkorean = 0x3141; 14466 t.mieumpansioskorean = 0x3170; 14467 t.mieumparenkorean = 0x3204; 14468 t.mieumpieupkorean = 0x316e; 14469 t.mieumsioskorean = 0x316f; 14470 t.mihiragana = 0x307f; 14471 t.mikatakana = 0x30df; 14472 t.mikatakanahalfwidth = 0xff90; 14473 t.minus = 0x2212; 14474 t.minusbelowcmb = 0x0320; 14475 t.minuscircle = 0x2296; 14476 t.minusmod = 0x02d7; 14477 t.minusplus = 0x2213; 14478 t.minute = 0x2032; 14479 t.miribaarusquare = 0x334a; 14480 t.mirisquare = 0x3349; 14481 t.mlonglegturned = 0x0270; 14482 t.mlsquare = 0x3396; 14483 t.mmcubedsquare = 0x33a3; 14484 t.mmonospace = 0xff4d; 14485 t.mmsquaredsquare = 0x339f; 14486 t.mohiragana = 0x3082; 14487 t.mohmsquare = 0x33c1; 14488 t.mokatakana = 0x30e2; 14489 t.mokatakanahalfwidth = 0xff93; 14490 t.molsquare = 0x33d6; 14491 t.momathai = 0x0e21; 14492 t.moverssquare = 0x33a7; 14493 t.moverssquaredsquare = 0x33a8; 14494 t.mparen = 0x24a8; 14495 t.mpasquare = 0x33ab; 14496 t.mssquare = 0x33b3; 14497 t.msuperior = 0xf6ef; 14498 t.mturned = 0x026f; 14499 t.mu = 0x00b5; 14500 t.mu1 = 0x00b5; 14501 t.muasquare = 0x3382; 14502 t.muchgreater = 0x226b; 14503 t.muchless = 0x226a; 14504 t.mufsquare = 0x338c; 14505 t.mugreek = 0x03bc; 14506 t.mugsquare = 0x338d; 14507 t.muhiragana = 0x3080; 14508 t.mukatakana = 0x30e0; 14509 t.mukatakanahalfwidth = 0xff91; 14510 t.mulsquare = 0x3395; 14511 t.multiply = 0x00d7; 14512 t.mumsquare = 0x339b; 14513 t.munahhebrew = 0x05a3; 14514 t.munahlefthebrew = 0x05a3; 14515 t.musicalnote = 0x266a; 14516 t.musicalnotedbl = 0x266b; 14517 t.musicflatsign = 0x266d; 14518 t.musicsharpsign = 0x266f; 14519 t.mussquare = 0x33b2; 14520 t.muvsquare = 0x33b6; 14521 t.muwsquare = 0x33bc; 14522 t.mvmegasquare = 0x33b9; 14523 t.mvsquare = 0x33b7; 14524 t.mwmegasquare = 0x33bf; 14525 t.mwsquare = 0x33bd; 14526 t.n = 0x006e; 14527 t.nabengali = 0x09a8; 14528 t.nabla = 0x2207; 14529 t.nacute = 0x0144; 14530 t.nadeva = 0x0928; 14531 t.nagujarati = 0x0aa8; 14532 t.nagurmukhi = 0x0a28; 14533 t.nahiragana = 0x306a; 14534 t.nakatakana = 0x30ca; 14535 t.nakatakanahalfwidth = 0xff85; 14536 t.napostrophe = 0x0149; 14537 t.nasquare = 0x3381; 14538 t.nbopomofo = 0x310b; 14539 t.nbspace = 0x00a0; 14540 t.ncaron = 0x0148; 14541 t.ncedilla = 0x0146; 14542 t.ncircle = 0x24dd; 14543 t.ncircumflexbelow = 0x1e4b; 14544 t.ncommaaccent = 0x0146; 14545 t.ndotaccent = 0x1e45; 14546 t.ndotbelow = 0x1e47; 14547 t.nehiragana = 0x306d; 14548 t.nekatakana = 0x30cd; 14549 t.nekatakanahalfwidth = 0xff88; 14550 t.newsheqelsign = 0x20aa; 14551 t.nfsquare = 0x338b; 14552 t.ngabengali = 0x0999; 14553 t.ngadeva = 0x0919; 14554 t.ngagujarati = 0x0a99; 14555 t.ngagurmukhi = 0x0a19; 14556 t.ngonguthai = 0x0e07; 14557 t.nhiragana = 0x3093; 14558 t.nhookleft = 0x0272; 14559 t.nhookretroflex = 0x0273; 14560 t.nieunacirclekorean = 0x326f; 14561 t.nieunaparenkorean = 0x320f; 14562 t.nieuncieuckorean = 0x3135; 14563 t.nieuncirclekorean = 0x3261; 14564 t.nieunhieuhkorean = 0x3136; 14565 t.nieunkorean = 0x3134; 14566 t.nieunpansioskorean = 0x3168; 14567 t.nieunparenkorean = 0x3201; 14568 t.nieunsioskorean = 0x3167; 14569 t.nieuntikeutkorean = 0x3166; 14570 t.nihiragana = 0x306b; 14571 t.nikatakana = 0x30cb; 14572 t.nikatakanahalfwidth = 0xff86; 14573 t.nikhahitleftthai = 0xf899; 14574 t.nikhahitthai = 0x0e4d; 14575 t.nine = 0x0039; 14576 t.ninearabic = 0x0669; 14577 t.ninebengali = 0x09ef; 14578 t.ninecircle = 0x2468; 14579 t.ninecircleinversesansserif = 0x2792; 14580 t.ninedeva = 0x096f; 14581 t.ninegujarati = 0x0aef; 14582 t.ninegurmukhi = 0x0a6f; 14583 t.ninehackarabic = 0x0669; 14584 t.ninehangzhou = 0x3029; 14585 t.nineideographicparen = 0x3228; 14586 t.nineinferior = 0x2089; 14587 t.ninemonospace = 0xff19; 14588 t.nineoldstyle = 0xf739; 14589 t.nineparen = 0x247c; 14590 t.nineperiod = 0x2490; 14591 t.ninepersian = 0x06f9; 14592 t.nineroman = 0x2178; 14593 t.ninesuperior = 0x2079; 14594 t.nineteencircle = 0x2472; 14595 t.nineteenparen = 0x2486; 14596 t.nineteenperiod = 0x249a; 14597 t.ninethai = 0x0e59; 14598 t.nj = 0x01cc; 14599 t.njecyrillic = 0x045a; 14600 t.nkatakana = 0x30f3; 14601 t.nkatakanahalfwidth = 0xff9d; 14602 t.nlegrightlong = 0x019e; 14603 t.nlinebelow = 0x1e49; 14604 t.nmonospace = 0xff4e; 14605 t.nmsquare = 0x339a; 14606 t.nnabengali = 0x09a3; 14607 t.nnadeva = 0x0923; 14608 t.nnagujarati = 0x0aa3; 14609 t.nnagurmukhi = 0x0a23; 14610 t.nnnadeva = 0x0929; 14611 t.nohiragana = 0x306e; 14612 t.nokatakana = 0x30ce; 14613 t.nokatakanahalfwidth = 0xff89; 14614 t.nonbreakingspace = 0x00a0; 14615 t.nonenthai = 0x0e13; 14616 t.nonuthai = 0x0e19; 14617 t.noonarabic = 0x0646; 14618 t.noonfinalarabic = 0xfee6; 14619 t.noonghunnaarabic = 0x06ba; 14620 t.noonghunnafinalarabic = 0xfb9f; 14621 t.nooninitialarabic = 0xfee7; 14622 t.noonjeeminitialarabic = 0xfcd2; 14623 t.noonjeemisolatedarabic = 0xfc4b; 14624 t.noonmedialarabic = 0xfee8; 14625 t.noonmeeminitialarabic = 0xfcd5; 14626 t.noonmeemisolatedarabic = 0xfc4e; 14627 t.noonnoonfinalarabic = 0xfc8d; 14628 t.notcontains = 0x220c; 14629 t.notelement = 0x2209; 14630 t.notelementof = 0x2209; 14631 t.notequal = 0x2260; 14632 t.notgreater = 0x226f; 14633 t.notgreaternorequal = 0x2271; 14634 t.notgreaternorless = 0x2279; 14635 t.notidentical = 0x2262; 14636 t.notless = 0x226e; 14637 t.notlessnorequal = 0x2270; 14638 t.notparallel = 0x2226; 14639 t.notprecedes = 0x2280; 14640 t.notsubset = 0x2284; 14641 t.notsucceeds = 0x2281; 14642 t.notsuperset = 0x2285; 14643 t.nowarmenian = 0x0576; 14644 t.nparen = 0x24a9; 14645 t.nssquare = 0x33b1; 14646 t.nsuperior = 0x207f; 14647 t.ntilde = 0x00f1; 14648 t.nu = 0x03bd; 14649 t.nuhiragana = 0x306c; 14650 t.nukatakana = 0x30cc; 14651 t.nukatakanahalfwidth = 0xff87; 14652 t.nuktabengali = 0x09bc; 14653 t.nuktadeva = 0x093c; 14654 t.nuktagujarati = 0x0abc; 14655 t.nuktagurmukhi = 0x0a3c; 14656 t.numbersign = 0x0023; 14657 t.numbersignmonospace = 0xff03; 14658 t.numbersignsmall = 0xfe5f; 14659 t.numeralsigngreek = 0x0374; 14660 t.numeralsignlowergreek = 0x0375; 14661 t.numero = 0x2116; 14662 t.nun = 0x05e0; 14663 t.nundagesh = 0xfb40; 14664 t.nundageshhebrew = 0xfb40; 14665 t.nunhebrew = 0x05e0; 14666 t.nvsquare = 0x33b5; 14667 t.nwsquare = 0x33bb; 14668 t.nyabengali = 0x099e; 14669 t.nyadeva = 0x091e; 14670 t.nyagujarati = 0x0a9e; 14671 t.nyagurmukhi = 0x0a1e; 14672 t.o = 0x006f; 14673 t.oacute = 0x00f3; 14674 t.oangthai = 0x0e2d; 14675 t.obarred = 0x0275; 14676 t.obarredcyrillic = 0x04e9; 14677 t.obarreddieresiscyrillic = 0x04eb; 14678 t.obengali = 0x0993; 14679 t.obopomofo = 0x311b; 14680 t.obreve = 0x014f; 14681 t.ocandradeva = 0x0911; 14682 t.ocandragujarati = 0x0a91; 14683 t.ocandravowelsigndeva = 0x0949; 14684 t.ocandravowelsigngujarati = 0x0ac9; 14685 t.ocaron = 0x01d2; 14686 t.ocircle = 0x24de; 14687 t.ocircumflex = 0x00f4; 14688 t.ocircumflexacute = 0x1ed1; 14689 t.ocircumflexdotbelow = 0x1ed9; 14690 t.ocircumflexgrave = 0x1ed3; 14691 t.ocircumflexhookabove = 0x1ed5; 14692 t.ocircumflextilde = 0x1ed7; 14693 t.ocyrillic = 0x043e; 14694 t.odblacute = 0x0151; 14695 t.odblgrave = 0x020d; 14696 t.odeva = 0x0913; 14697 t.odieresis = 0x00f6; 14698 t.odieresiscyrillic = 0x04e7; 14699 t.odotbelow = 0x1ecd; 14700 t.oe = 0x0153; 14701 t.oekorean = 0x315a; 14702 t.ogonek = 0x02db; 14703 t.ogonekcmb = 0x0328; 14704 t.ograve = 0x00f2; 14705 t.ogujarati = 0x0a93; 14706 t.oharmenian = 0x0585; 14707 t.ohiragana = 0x304a; 14708 t.ohookabove = 0x1ecf; 14709 t.ohorn = 0x01a1; 14710 t.ohornacute = 0x1edb; 14711 t.ohorndotbelow = 0x1ee3; 14712 t.ohorngrave = 0x1edd; 14713 t.ohornhookabove = 0x1edf; 14714 t.ohorntilde = 0x1ee1; 14715 t.ohungarumlaut = 0x0151; 14716 t.oi = 0x01a3; 14717 t.oinvertedbreve = 0x020f; 14718 t.okatakana = 0x30aa; 14719 t.okatakanahalfwidth = 0xff75; 14720 t.okorean = 0x3157; 14721 t.olehebrew = 0x05ab; 14722 t.omacron = 0x014d; 14723 t.omacronacute = 0x1e53; 14724 t.omacrongrave = 0x1e51; 14725 t.omdeva = 0x0950; 14726 t.omega = 0x03c9; 14727 t.omega1 = 0x03d6; 14728 t.omegacyrillic = 0x0461; 14729 t.omegalatinclosed = 0x0277; 14730 t.omegaroundcyrillic = 0x047b; 14731 t.omegatitlocyrillic = 0x047d; 14732 t.omegatonos = 0x03ce; 14733 t.omgujarati = 0x0ad0; 14734 t.omicron = 0x03bf; 14735 t.omicrontonos = 0x03cc; 14736 t.omonospace = 0xff4f; 14737 t.one = 0x0031; 14738 t.onearabic = 0x0661; 14739 t.onebengali = 0x09e7; 14740 t.onecircle = 0x2460; 14741 t.onecircleinversesansserif = 0x278a; 14742 t.onedeva = 0x0967; 14743 t.onedotenleader = 0x2024; 14744 t.oneeighth = 0x215b; 14745 t.onefitted = 0xf6dc; 14746 t.onegujarati = 0x0ae7; 14747 t.onegurmukhi = 0x0a67; 14748 t.onehackarabic = 0x0661; 14749 t.onehalf = 0x00bd; 14750 t.onehangzhou = 0x3021; 14751 t.oneideographicparen = 0x3220; 14752 t.oneinferior = 0x2081; 14753 t.onemonospace = 0xff11; 14754 t.onenumeratorbengali = 0x09f4; 14755 t.oneoldstyle = 0xf731; 14756 t.oneparen = 0x2474; 14757 t.oneperiod = 0x2488; 14758 t.onepersian = 0x06f1; 14759 t.onequarter = 0x00bc; 14760 t.oneroman = 0x2170; 14761 t.onesuperior = 0x00b9; 14762 t.onethai = 0x0e51; 14763 t.onethird = 0x2153; 14764 t.oogonek = 0x01eb; 14765 t.oogonekmacron = 0x01ed; 14766 t.oogurmukhi = 0x0a13; 14767 t.oomatragurmukhi = 0x0a4b; 14768 t.oopen = 0x0254; 14769 t.oparen = 0x24aa; 14770 t.openbullet = 0x25e6; 14771 t.option = 0x2325; 14772 t.ordfeminine = 0x00aa; 14773 t.ordmasculine = 0x00ba; 14774 t.orthogonal = 0x221f; 14775 t.oshortdeva = 0x0912; 14776 t.oshortvowelsigndeva = 0x094a; 14777 t.oslash = 0x00f8; 14778 t.oslashacute = 0x01ff; 14779 t.osmallhiragana = 0x3049; 14780 t.osmallkatakana = 0x30a9; 14781 t.osmallkatakanahalfwidth = 0xff6b; 14782 t.ostrokeacute = 0x01ff; 14783 t.osuperior = 0xf6f0; 14784 t.otcyrillic = 0x047f; 14785 t.otilde = 0x00f5; 14786 t.otildeacute = 0x1e4d; 14787 t.otildedieresis = 0x1e4f; 14788 t.oubopomofo = 0x3121; 14789 t.overline = 0x203e; 14790 t.overlinecenterline = 0xfe4a; 14791 t.overlinecmb = 0x0305; 14792 t.overlinedashed = 0xfe49; 14793 t.overlinedblwavy = 0xfe4c; 14794 t.overlinewavy = 0xfe4b; 14795 t.overscore = 0x00af; 14796 t.ovowelsignbengali = 0x09cb; 14797 t.ovowelsigndeva = 0x094b; 14798 t.ovowelsigngujarati = 0x0acb; 14799 t.p = 0x0070; 14800 t.paampssquare = 0x3380; 14801 t.paasentosquare = 0x332b; 14802 t.pabengali = 0x09aa; 14803 t.pacute = 0x1e55; 14804 t.padeva = 0x092a; 14805 t.pagedown = 0x21df; 14806 t.pageup = 0x21de; 14807 t.pagujarati = 0x0aaa; 14808 t.pagurmukhi = 0x0a2a; 14809 t.pahiragana = 0x3071; 14810 t.paiyannoithai = 0x0e2f; 14811 t.pakatakana = 0x30d1; 14812 t.palatalizationcyrilliccmb = 0x0484; 14813 t.palochkacyrillic = 0x04c0; 14814 t.pansioskorean = 0x317f; 14815 t.paragraph = 0x00b6; 14816 t.parallel = 0x2225; 14817 t.parenleft = 0x0028; 14818 t.parenleftaltonearabic = 0xfd3e; 14819 t.parenleftbt = 0xf8ed; 14820 t.parenleftex = 0xf8ec; 14821 t.parenleftinferior = 0x208d; 14822 t.parenleftmonospace = 0xff08; 14823 t.parenleftsmall = 0xfe59; 14824 t.parenleftsuperior = 0x207d; 14825 t.parenlefttp = 0xf8eb; 14826 t.parenleftvertical = 0xfe35; 14827 t.parenright = 0x0029; 14828 t.parenrightaltonearabic = 0xfd3f; 14829 t.parenrightbt = 0xf8f8; 14830 t.parenrightex = 0xf8f7; 14831 t.parenrightinferior = 0x208e; 14832 t.parenrightmonospace = 0xff09; 14833 t.parenrightsmall = 0xfe5a; 14834 t.parenrightsuperior = 0x207e; 14835 t.parenrighttp = 0xf8f6; 14836 t.parenrightvertical = 0xfe36; 14837 t.partialdiff = 0x2202; 14838 t.paseqhebrew = 0x05c0; 14839 t.pashtahebrew = 0x0599; 14840 t.pasquare = 0x33a9; 14841 t.patah = 0x05b7; 14842 t.patah11 = 0x05b7; 14843 t.patah1d = 0x05b7; 14844 t.patah2a = 0x05b7; 14845 t.patahhebrew = 0x05b7; 14846 t.patahnarrowhebrew = 0x05b7; 14847 t.patahquarterhebrew = 0x05b7; 14848 t.patahwidehebrew = 0x05b7; 14849 t.pazerhebrew = 0x05a1; 14850 t.pbopomofo = 0x3106; 14851 t.pcircle = 0x24df; 14852 t.pdotaccent = 0x1e57; 14853 t.pe = 0x05e4; 14854 t.pecyrillic = 0x043f; 14855 t.pedagesh = 0xfb44; 14856 t.pedageshhebrew = 0xfb44; 14857 t.peezisquare = 0x333b; 14858 t.pefinaldageshhebrew = 0xfb43; 14859 t.peharabic = 0x067e; 14860 t.peharmenian = 0x057a; 14861 t.pehebrew = 0x05e4; 14862 t.pehfinalarabic = 0xfb57; 14863 t.pehinitialarabic = 0xfb58; 14864 t.pehiragana = 0x307a; 14865 t.pehmedialarabic = 0xfb59; 14866 t.pekatakana = 0x30da; 14867 t.pemiddlehookcyrillic = 0x04a7; 14868 t.perafehebrew = 0xfb4e; 14869 t.percent = 0x0025; 14870 t.percentarabic = 0x066a; 14871 t.percentmonospace = 0xff05; 14872 t.percentsmall = 0xfe6a; 14873 t.period = 0x002e; 14874 t.periodarmenian = 0x0589; 14875 t.periodcentered = 0x00b7; 14876 t.periodhalfwidth = 0xff61; 14877 t.periodinferior = 0xf6e7; 14878 t.periodmonospace = 0xff0e; 14879 t.periodsmall = 0xfe52; 14880 t.periodsuperior = 0xf6e8; 14881 t.perispomenigreekcmb = 0x0342; 14882 t.perpendicular = 0x22a5; 14883 t.perthousand = 0x2030; 14884 t.peseta = 0x20a7; 14885 t.pfsquare = 0x338a; 14886 t.phabengali = 0x09ab; 14887 t.phadeva = 0x092b; 14888 t.phagujarati = 0x0aab; 14889 t.phagurmukhi = 0x0a2b; 14890 t.phi = 0x03c6; 14891 t.phi1 = 0x03d5; 14892 t.phieuphacirclekorean = 0x327a; 14893 t.phieuphaparenkorean = 0x321a; 14894 t.phieuphcirclekorean = 0x326c; 14895 t.phieuphkorean = 0x314d; 14896 t.phieuphparenkorean = 0x320c; 14897 t.philatin = 0x0278; 14898 t.phinthuthai = 0x0e3a; 14899 t.phisymbolgreek = 0x03d5; 14900 t.phook = 0x01a5; 14901 t.phophanthai = 0x0e1e; 14902 t.phophungthai = 0x0e1c; 14903 t.phosamphaothai = 0x0e20; 14904 t.pi = 0x03c0; 14905 t.pieupacirclekorean = 0x3273; 14906 t.pieupaparenkorean = 0x3213; 14907 t.pieupcieuckorean = 0x3176; 14908 t.pieupcirclekorean = 0x3265; 14909 t.pieupkiyeokkorean = 0x3172; 14910 t.pieupkorean = 0x3142; 14911 t.pieupparenkorean = 0x3205; 14912 t.pieupsioskiyeokkorean = 0x3174; 14913 t.pieupsioskorean = 0x3144; 14914 t.pieupsiostikeutkorean = 0x3175; 14915 t.pieupthieuthkorean = 0x3177; 14916 t.pieuptikeutkorean = 0x3173; 14917 t.pihiragana = 0x3074; 14918 t.pikatakana = 0x30d4; 14919 t.pisymbolgreek = 0x03d6; 14920 t.piwrarmenian = 0x0583; 14921 t.planckover2pi = 0x210f; 14922 t.planckover2pi1 = 0x210f; 14923 t.plus = 0x002b; 14924 t.plusbelowcmb = 0x031f; 14925 t.pluscircle = 0x2295; 14926 t.plusminus = 0x00b1; 14927 t.plusmod = 0x02d6; 14928 t.plusmonospace = 0xff0b; 14929 t.plussmall = 0xfe62; 14930 t.plussuperior = 0x207a; 14931 t.pmonospace = 0xff50; 14932 t.pmsquare = 0x33d8; 14933 t.pohiragana = 0x307d; 14934 t.pointingindexdownwhite = 0x261f; 14935 t.pointingindexleftwhite = 0x261c; 14936 t.pointingindexrightwhite = 0x261e; 14937 t.pointingindexupwhite = 0x261d; 14938 t.pokatakana = 0x30dd; 14939 t.poplathai = 0x0e1b; 14940 t.postalmark = 0x3012; 14941 t.postalmarkface = 0x3020; 14942 t.pparen = 0x24ab; 14943 t.precedes = 0x227a; 14944 t.prescription = 0x211e; 14945 t.primemod = 0x02b9; 14946 t.primereversed = 0x2035; 14947 t.product = 0x220f; 14948 t.projective = 0x2305; 14949 t.prolongedkana = 0x30fc; 14950 t.propellor = 0x2318; 14951 t.propersubset = 0x2282; 14952 t.propersuperset = 0x2283; 14953 t.proportion = 0x2237; 14954 t.proportional = 0x221d; 14955 t.psi = 0x03c8; 14956 t.psicyrillic = 0x0471; 14957 t.psilipneumatacyrilliccmb = 0x0486; 14958 t.pssquare = 0x33b0; 14959 t.puhiragana = 0x3077; 14960 t.pukatakana = 0x30d7; 14961 t.pvsquare = 0x33b4; 14962 t.pwsquare = 0x33ba; 14963 t.q = 0x0071; 14964 t.qadeva = 0x0958; 14965 t.qadmahebrew = 0x05a8; 14966 t.qafarabic = 0x0642; 14967 t.qaffinalarabic = 0xfed6; 14968 t.qafinitialarabic = 0xfed7; 14969 t.qafmedialarabic = 0xfed8; 14970 t.qamats = 0x05b8; 14971 t.qamats10 = 0x05b8; 14972 t.qamats1a = 0x05b8; 14973 t.qamats1c = 0x05b8; 14974 t.qamats27 = 0x05b8; 14975 t.qamats29 = 0x05b8; 14976 t.qamats33 = 0x05b8; 14977 t.qamatsde = 0x05b8; 14978 t.qamatshebrew = 0x05b8; 14979 t.qamatsnarrowhebrew = 0x05b8; 14980 t.qamatsqatanhebrew = 0x05b8; 14981 t.qamatsqatannarrowhebrew = 0x05b8; 14982 t.qamatsqatanquarterhebrew = 0x05b8; 14983 t.qamatsqatanwidehebrew = 0x05b8; 14984 t.qamatsquarterhebrew = 0x05b8; 14985 t.qamatswidehebrew = 0x05b8; 14986 t.qarneyparahebrew = 0x059f; 14987 t.qbopomofo = 0x3111; 14988 t.qcircle = 0x24e0; 14989 t.qhook = 0x02a0; 14990 t.qmonospace = 0xff51; 14991 t.qof = 0x05e7; 14992 t.qofdagesh = 0xfb47; 14993 t.qofdageshhebrew = 0xfb47; 14994 t.qofhebrew = 0x05e7; 14995 t.qparen = 0x24ac; 14996 t.quarternote = 0x2669; 14997 t.qubuts = 0x05bb; 14998 t.qubuts18 = 0x05bb; 14999 t.qubuts25 = 0x05bb; 15000 t.qubuts31 = 0x05bb; 15001 t.qubutshebrew = 0x05bb; 15002 t.qubutsnarrowhebrew = 0x05bb; 15003 t.qubutsquarterhebrew = 0x05bb; 15004 t.qubutswidehebrew = 0x05bb; 15005 t.question = 0x003f; 15006 t.questionarabic = 0x061f; 15007 t.questionarmenian = 0x055e; 15008 t.questiondown = 0x00bf; 15009 t.questiondownsmall = 0xf7bf; 15010 t.questiongreek = 0x037e; 15011 t.questionmonospace = 0xff1f; 15012 t.questionsmall = 0xf73f; 15013 t.quotedbl = 0x0022; 15014 t.quotedblbase = 0x201e; 15015 t.quotedblleft = 0x201c; 15016 t.quotedblmonospace = 0xff02; 15017 t.quotedblprime = 0x301e; 15018 t.quotedblprimereversed = 0x301d; 15019 t.quotedblright = 0x201d; 15020 t.quoteleft = 0x2018; 15021 t.quoteleftreversed = 0x201b; 15022 t.quotereversed = 0x201b; 15023 t.quoteright = 0x2019; 15024 t.quoterightn = 0x0149; 15025 t.quotesinglbase = 0x201a; 15026 t.quotesingle = 0x0027; 15027 t.quotesinglemonospace = 0xff07; 15028 t.r = 0x0072; 15029 t.raarmenian = 0x057c; 15030 t.rabengali = 0x09b0; 15031 t.racute = 0x0155; 15032 t.radeva = 0x0930; 15033 t.radical = 0x221a; 15034 t.radicalex = 0xf8e5; 15035 t.radoverssquare = 0x33ae; 15036 t.radoverssquaredsquare = 0x33af; 15037 t.radsquare = 0x33ad; 15038 t.rafe = 0x05bf; 15039 t.rafehebrew = 0x05bf; 15040 t.ragujarati = 0x0ab0; 15041 t.ragurmukhi = 0x0a30; 15042 t.rahiragana = 0x3089; 15043 t.rakatakana = 0x30e9; 15044 t.rakatakanahalfwidth = 0xff97; 15045 t.ralowerdiagonalbengali = 0x09f1; 15046 t.ramiddlediagonalbengali = 0x09f0; 15047 t.ramshorn = 0x0264; 15048 t.ratio = 0x2236; 15049 t.rbopomofo = 0x3116; 15050 t.rcaron = 0x0159; 15051 t.rcedilla = 0x0157; 15052 t.rcircle = 0x24e1; 15053 t.rcommaaccent = 0x0157; 15054 t.rdblgrave = 0x0211; 15055 t.rdotaccent = 0x1e59; 15056 t.rdotbelow = 0x1e5b; 15057 t.rdotbelowmacron = 0x1e5d; 15058 t.referencemark = 0x203b; 15059 t.reflexsubset = 0x2286; 15060 t.reflexsuperset = 0x2287; 15061 t.registered = 0x00ae; 15062 t.registersans = 0xf8e8; 15063 t.registerserif = 0xf6da; 15064 t.reharabic = 0x0631; 15065 t.reharmenian = 0x0580; 15066 t.rehfinalarabic = 0xfeae; 15067 t.rehiragana = 0x308c; 15068 t.rekatakana = 0x30ec; 15069 t.rekatakanahalfwidth = 0xff9a; 15070 t.resh = 0x05e8; 15071 t.reshdageshhebrew = 0xfb48; 15072 t.reshhebrew = 0x05e8; 15073 t.reversedtilde = 0x223d; 15074 t.reviahebrew = 0x0597; 15075 t.reviamugrashhebrew = 0x0597; 15076 t.revlogicalnot = 0x2310; 15077 t.rfishhook = 0x027e; 15078 t.rfishhookreversed = 0x027f; 15079 t.rhabengali = 0x09dd; 15080 t.rhadeva = 0x095d; 15081 t.rho = 0x03c1; 15082 t.rhook = 0x027d; 15083 t.rhookturned = 0x027b; 15084 t.rhookturnedsuperior = 0x02b5; 15085 t.rhosymbolgreek = 0x03f1; 15086 t.rhotichookmod = 0x02de; 15087 t.rieulacirclekorean = 0x3271; 15088 t.rieulaparenkorean = 0x3211; 15089 t.rieulcirclekorean = 0x3263; 15090 t.rieulhieuhkorean = 0x3140; 15091 t.rieulkiyeokkorean = 0x313a; 15092 t.rieulkiyeoksioskorean = 0x3169; 15093 t.rieulkorean = 0x3139; 15094 t.rieulmieumkorean = 0x313b; 15095 t.rieulpansioskorean = 0x316c; 15096 t.rieulparenkorean = 0x3203; 15097 t.rieulphieuphkorean = 0x313f; 15098 t.rieulpieupkorean = 0x313c; 15099 t.rieulpieupsioskorean = 0x316b; 15100 t.rieulsioskorean = 0x313d; 15101 t.rieulthieuthkorean = 0x313e; 15102 t.rieultikeutkorean = 0x316a; 15103 t.rieulyeorinhieuhkorean = 0x316d; 15104 t.rightangle = 0x221f; 15105 t.righttackbelowcmb = 0x0319; 15106 t.righttriangle = 0x22bf; 15107 t.rihiragana = 0x308a; 15108 t.rikatakana = 0x30ea; 15109 t.rikatakanahalfwidth = 0xff98; 15110 t.ring = 0x02da; 15111 t.ringbelowcmb = 0x0325; 15112 t.ringcmb = 0x030a; 15113 t.ringhalfleft = 0x02bf; 15114 t.ringhalfleftarmenian = 0x0559; 15115 t.ringhalfleftbelowcmb = 0x031c; 15116 t.ringhalfleftcentered = 0x02d3; 15117 t.ringhalfright = 0x02be; 15118 t.ringhalfrightbelowcmb = 0x0339; 15119 t.ringhalfrightcentered = 0x02d2; 15120 t.rinvertedbreve = 0x0213; 15121 t.rittorusquare = 0x3351; 15122 t.rlinebelow = 0x1e5f; 15123 t.rlongleg = 0x027c; 15124 t.rlonglegturned = 0x027a; 15125 t.rmonospace = 0xff52; 15126 t.rohiragana = 0x308d; 15127 t.rokatakana = 0x30ed; 15128 t.rokatakanahalfwidth = 0xff9b; 15129 t.roruathai = 0x0e23; 15130 t.rparen = 0x24ad; 15131 t.rrabengali = 0x09dc; 15132 t.rradeva = 0x0931; 15133 t.rragurmukhi = 0x0a5c; 15134 t.rreharabic = 0x0691; 15135 t.rrehfinalarabic = 0xfb8d; 15136 t.rrvocalicbengali = 0x09e0; 15137 t.rrvocalicdeva = 0x0960; 15138 t.rrvocalicgujarati = 0x0ae0; 15139 t.rrvocalicvowelsignbengali = 0x09c4; 15140 t.rrvocalicvowelsigndeva = 0x0944; 15141 t.rrvocalicvowelsigngujarati = 0x0ac4; 15142 t.rsuperior = 0xf6f1; 15143 t.rtblock = 0x2590; 15144 t.rturned = 0x0279; 15145 t.rturnedsuperior = 0x02b4; 15146 t.ruhiragana = 0x308b; 15147 t.rukatakana = 0x30eb; 15148 t.rukatakanahalfwidth = 0xff99; 15149 t.rupeemarkbengali = 0x09f2; 15150 t.rupeesignbengali = 0x09f3; 15151 t.rupiah = 0xf6dd; 15152 t.ruthai = 0x0e24; 15153 t.rvocalicbengali = 0x098b; 15154 t.rvocalicdeva = 0x090b; 15155 t.rvocalicgujarati = 0x0a8b; 15156 t.rvocalicvowelsignbengali = 0x09c3; 15157 t.rvocalicvowelsigndeva = 0x0943; 15158 t.rvocalicvowelsigngujarati = 0x0ac3; 15159 t.s = 0x0073; 15160 t.sabengali = 0x09b8; 15161 t.sacute = 0x015b; 15162 t.sacutedotaccent = 0x1e65; 15163 t.sadarabic = 0x0635; 15164 t.sadeva = 0x0938; 15165 t.sadfinalarabic = 0xfeba; 15166 t.sadinitialarabic = 0xfebb; 15167 t.sadmedialarabic = 0xfebc; 15168 t.sagujarati = 0x0ab8; 15169 t.sagurmukhi = 0x0a38; 15170 t.sahiragana = 0x3055; 15171 t.sakatakana = 0x30b5; 15172 t.sakatakanahalfwidth = 0xff7b; 15173 t.sallallahoualayhewasallamarabic = 0xfdfa; 15174 t.samekh = 0x05e1; 15175 t.samekhdagesh = 0xfb41; 15176 t.samekhdageshhebrew = 0xfb41; 15177 t.samekhhebrew = 0x05e1; 15178 t.saraaathai = 0x0e32; 15179 t.saraaethai = 0x0e41; 15180 t.saraaimaimalaithai = 0x0e44; 15181 t.saraaimaimuanthai = 0x0e43; 15182 t.saraamthai = 0x0e33; 15183 t.saraathai = 0x0e30; 15184 t.saraethai = 0x0e40; 15185 t.saraiileftthai = 0xf886; 15186 t.saraiithai = 0x0e35; 15187 t.saraileftthai = 0xf885; 15188 t.saraithai = 0x0e34; 15189 t.saraothai = 0x0e42; 15190 t.saraueeleftthai = 0xf888; 15191 t.saraueethai = 0x0e37; 15192 t.saraueleftthai = 0xf887; 15193 t.sarauethai = 0x0e36; 15194 t.sarauthai = 0x0e38; 15195 t.sarauuthai = 0x0e39; 15196 t.sbopomofo = 0x3119; 15197 t.scaron = 0x0161; 15198 t.scarondotaccent = 0x1e67; 15199 t.scedilla = 0x015f; 15200 t.schwa = 0x0259; 15201 t.schwacyrillic = 0x04d9; 15202 t.schwadieresiscyrillic = 0x04db; 15203 t.schwahook = 0x025a; 15204 t.scircle = 0x24e2; 15205 t.scircumflex = 0x015d; 15206 t.scommaaccent = 0x0219; 15207 t.sdotaccent = 0x1e61; 15208 t.sdotbelow = 0x1e63; 15209 t.sdotbelowdotaccent = 0x1e69; 15210 t.seagullbelowcmb = 0x033c; 15211 t.second = 0x2033; 15212 t.secondtonechinese = 0x02ca; 15213 t.section = 0x00a7; 15214 t.seenarabic = 0x0633; 15215 t.seenfinalarabic = 0xfeb2; 15216 t.seeninitialarabic = 0xfeb3; 15217 t.seenmedialarabic = 0xfeb4; 15218 t.segol = 0x05b6; 15219 t.segol13 = 0x05b6; 15220 t.segol1f = 0x05b6; 15221 t.segol2c = 0x05b6; 15222 t.segolhebrew = 0x05b6; 15223 t.segolnarrowhebrew = 0x05b6; 15224 t.segolquarterhebrew = 0x05b6; 15225 t.segoltahebrew = 0x0592; 15226 t.segolwidehebrew = 0x05b6; 15227 t.seharmenian = 0x057d; 15228 t.sehiragana = 0x305b; 15229 t.sekatakana = 0x30bb; 15230 t.sekatakanahalfwidth = 0xff7e; 15231 t.semicolon = 0x003b; 15232 t.semicolonarabic = 0x061b; 15233 t.semicolonmonospace = 0xff1b; 15234 t.semicolonsmall = 0xfe54; 15235 t.semivoicedmarkkana = 0x309c; 15236 t.semivoicedmarkkanahalfwidth = 0xff9f; 15237 t.sentisquare = 0x3322; 15238 t.sentosquare = 0x3323; 15239 t.seven = 0x0037; 15240 t.sevenarabic = 0x0667; 15241 t.sevenbengali = 0x09ed; 15242 t.sevencircle = 0x2466; 15243 t.sevencircleinversesansserif = 0x2790; 15244 t.sevendeva = 0x096d; 15245 t.seveneighths = 0x215e; 15246 t.sevengujarati = 0x0aed; 15247 t.sevengurmukhi = 0x0a6d; 15248 t.sevenhackarabic = 0x0667; 15249 t.sevenhangzhou = 0x3027; 15250 t.sevenideographicparen = 0x3226; 15251 t.seveninferior = 0x2087; 15252 t.sevenmonospace = 0xff17; 15253 t.sevenoldstyle = 0xf737; 15254 t.sevenparen = 0x247a; 15255 t.sevenperiod = 0x248e; 15256 t.sevenpersian = 0x06f7; 15257 t.sevenroman = 0x2176; 15258 t.sevensuperior = 0x2077; 15259 t.seventeencircle = 0x2470; 15260 t.seventeenparen = 0x2484; 15261 t.seventeenperiod = 0x2498; 15262 t.seventhai = 0x0e57; 15263 t.sfthyphen = 0x00ad; 15264 t.shaarmenian = 0x0577; 15265 t.shabengali = 0x09b6; 15266 t.shacyrillic = 0x0448; 15267 t.shaddaarabic = 0x0651; 15268 t.shaddadammaarabic = 0xfc61; 15269 t.shaddadammatanarabic = 0xfc5e; 15270 t.shaddafathaarabic = 0xfc60; 15271 t.shaddakasraarabic = 0xfc62; 15272 t.shaddakasratanarabic = 0xfc5f; 15273 t.shade = 0x2592; 15274 t.shadedark = 0x2593; 15275 t.shadelight = 0x2591; 15276 t.shademedium = 0x2592; 15277 t.shadeva = 0x0936; 15278 t.shagujarati = 0x0ab6; 15279 t.shagurmukhi = 0x0a36; 15280 t.shalshelethebrew = 0x0593; 15281 t.shbopomofo = 0x3115; 15282 t.shchacyrillic = 0x0449; 15283 t.sheenarabic = 0x0634; 15284 t.sheenfinalarabic = 0xfeb6; 15285 t.sheeninitialarabic = 0xfeb7; 15286 t.sheenmedialarabic = 0xfeb8; 15287 t.sheicoptic = 0x03e3; 15288 t.sheqel = 0x20aa; 15289 t.sheqelhebrew = 0x20aa; 15290 t.sheva = 0x05b0; 15291 t.sheva115 = 0x05b0; 15292 t.sheva15 = 0x05b0; 15293 t.sheva22 = 0x05b0; 15294 t.sheva2e = 0x05b0; 15295 t.shevahebrew = 0x05b0; 15296 t.shevanarrowhebrew = 0x05b0; 15297 t.shevaquarterhebrew = 0x05b0; 15298 t.shevawidehebrew = 0x05b0; 15299 t.shhacyrillic = 0x04bb; 15300 t.shimacoptic = 0x03ed; 15301 t.shin = 0x05e9; 15302 t.shindagesh = 0xfb49; 15303 t.shindageshhebrew = 0xfb49; 15304 t.shindageshshindot = 0xfb2c; 15305 t.shindageshshindothebrew = 0xfb2c; 15306 t.shindageshsindot = 0xfb2d; 15307 t.shindageshsindothebrew = 0xfb2d; 15308 t.shindothebrew = 0x05c1; 15309 t.shinhebrew = 0x05e9; 15310 t.shinshindot = 0xfb2a; 15311 t.shinshindothebrew = 0xfb2a; 15312 t.shinsindot = 0xfb2b; 15313 t.shinsindothebrew = 0xfb2b; 15314 t.shook = 0x0282; 15315 t.sigma = 0x03c3; 15316 t.sigma1 = 0x03c2; 15317 t.sigmafinal = 0x03c2; 15318 t.sigmalunatesymbolgreek = 0x03f2; 15319 t.sihiragana = 0x3057; 15320 t.sikatakana = 0x30b7; 15321 t.sikatakanahalfwidth = 0xff7c; 15322 t.siluqhebrew = 0x05bd; 15323 t.siluqlefthebrew = 0x05bd; 15324 t.similar = 0x223c; 15325 t.sindothebrew = 0x05c2; 15326 t.siosacirclekorean = 0x3274; 15327 t.siosaparenkorean = 0x3214; 15328 t.sioscieuckorean = 0x317e; 15329 t.sioscirclekorean = 0x3266; 15330 t.sioskiyeokkorean = 0x317a; 15331 t.sioskorean = 0x3145; 15332 t.siosnieunkorean = 0x317b; 15333 t.siosparenkorean = 0x3206; 15334 t.siospieupkorean = 0x317d; 15335 t.siostikeutkorean = 0x317c; 15336 t.six = 0x0036; 15337 t.sixarabic = 0x0666; 15338 t.sixbengali = 0x09ec; 15339 t.sixcircle = 0x2465; 15340 t.sixcircleinversesansserif = 0x278f; 15341 t.sixdeva = 0x096c; 15342 t.sixgujarati = 0x0aec; 15343 t.sixgurmukhi = 0x0a6c; 15344 t.sixhackarabic = 0x0666; 15345 t.sixhangzhou = 0x3026; 15346 t.sixideographicparen = 0x3225; 15347 t.sixinferior = 0x2086; 15348 t.sixmonospace = 0xff16; 15349 t.sixoldstyle = 0xf736; 15350 t.sixparen = 0x2479; 15351 t.sixperiod = 0x248d; 15352 t.sixpersian = 0x06f6; 15353 t.sixroman = 0x2175; 15354 t.sixsuperior = 0x2076; 15355 t.sixteencircle = 0x246f; 15356 t.sixteencurrencydenominatorbengali = 0x09f9; 15357 t.sixteenparen = 0x2483; 15358 t.sixteenperiod = 0x2497; 15359 t.sixthai = 0x0e56; 15360 t.slash = 0x002f; 15361 t.slashmonospace = 0xff0f; 15362 t.slong = 0x017f; 15363 t.slongdotaccent = 0x1e9b; 15364 t.smileface = 0x263a; 15365 t.smonospace = 0xff53; 15366 t.sofpasuqhebrew = 0x05c3; 15367 t.softhyphen = 0x00ad; 15368 t.softsigncyrillic = 0x044c; 15369 t.sohiragana = 0x305d; 15370 t.sokatakana = 0x30bd; 15371 t.sokatakanahalfwidth = 0xff7f; 15372 t.soliduslongoverlaycmb = 0x0338; 15373 t.solidusshortoverlaycmb = 0x0337; 15374 t.sorusithai = 0x0e29; 15375 t.sosalathai = 0x0e28; 15376 t.sosothai = 0x0e0b; 15377 t.sosuathai = 0x0e2a; 15378 t.space = 0x0020; 15379 t.spacehackarabic = 0x0020; 15380 t.spade = 0x2660; 15381 t.spadesuitblack = 0x2660; 15382 t.spadesuitwhite = 0x2664; 15383 t.sparen = 0x24ae; 15384 t.squarebelowcmb = 0x033b; 15385 t.squarecc = 0x33c4; 15386 t.squarecm = 0x339d; 15387 t.squarediagonalcrosshatchfill = 0x25a9; 15388 t.squarehorizontalfill = 0x25a4; 15389 t.squarekg = 0x338f; 15390 t.squarekm = 0x339e; 15391 t.squarekmcapital = 0x33ce; 15392 t.squareln = 0x33d1; 15393 t.squarelog = 0x33d2; 15394 t.squaremg = 0x338e; 15395 t.squaremil = 0x33d5; 15396 t.squaremm = 0x339c; 15397 t.squaremsquared = 0x33a1; 15398 t.squareorthogonalcrosshatchfill = 0x25a6; 15399 t.squareupperlefttolowerrightfill = 0x25a7; 15400 t.squareupperrighttolowerleftfill = 0x25a8; 15401 t.squareverticalfill = 0x25a5; 15402 t.squarewhitewithsmallblack = 0x25a3; 15403 t.srsquare = 0x33db; 15404 t.ssabengali = 0x09b7; 15405 t.ssadeva = 0x0937; 15406 t.ssagujarati = 0x0ab7; 15407 t.ssangcieuckorean = 0x3149; 15408 t.ssanghieuhkorean = 0x3185; 15409 t.ssangieungkorean = 0x3180; 15410 t.ssangkiyeokkorean = 0x3132; 15411 t.ssangnieunkorean = 0x3165; 15412 t.ssangpieupkorean = 0x3143; 15413 t.ssangsioskorean = 0x3146; 15414 t.ssangtikeutkorean = 0x3138; 15415 t.ssuperior = 0xf6f2; 15416 t.sterling = 0x00a3; 15417 t.sterlingmonospace = 0xffe1; 15418 t.strokelongoverlaycmb = 0x0336; 15419 t.strokeshortoverlaycmb = 0x0335; 15420 t.subset = 0x2282; 15421 t.subsetnotequal = 0x228a; 15422 t.subsetorequal = 0x2286; 15423 t.succeeds = 0x227b; 15424 t.suchthat = 0x220b; 15425 t.suhiragana = 0x3059; 15426 t.sukatakana = 0x30b9; 15427 t.sukatakanahalfwidth = 0xff7d; 15428 t.sukunarabic = 0x0652; 15429 t.summation = 0x2211; 15430 t.sun = 0x263c; 15431 t.superset = 0x2283; 15432 t.supersetnotequal = 0x228b; 15433 t.supersetorequal = 0x2287; 15434 t.svsquare = 0x33dc; 15435 t.syouwaerasquare = 0x337c; 15436 t.t = 0x0074; 15437 t.tabengali = 0x09a4; 15438 t.tackdown = 0x22a4; 15439 t.tackleft = 0x22a3; 15440 t.tadeva = 0x0924; 15441 t.tagujarati = 0x0aa4; 15442 t.tagurmukhi = 0x0a24; 15443 t.taharabic = 0x0637; 15444 t.tahfinalarabic = 0xfec2; 15445 t.tahinitialarabic = 0xfec3; 15446 t.tahiragana = 0x305f; 15447 t.tahmedialarabic = 0xfec4; 15448 t.taisyouerasquare = 0x337d; 15449 t.takatakana = 0x30bf; 15450 t.takatakanahalfwidth = 0xff80; 15451 t.tatweelarabic = 0x0640; 15452 t.tau = 0x03c4; 15453 t.tav = 0x05ea; 15454 t.tavdages = 0xfb4a; 15455 t.tavdagesh = 0xfb4a; 15456 t.tavdageshhebrew = 0xfb4a; 15457 t.tavhebrew = 0x05ea; 15458 t.tbar = 0x0167; 15459 t.tbopomofo = 0x310a; 15460 t.tcaron = 0x0165; 15461 t.tccurl = 0x02a8; 15462 t.tcedilla = 0x0163; 15463 t.tcheharabic = 0x0686; 15464 t.tchehfinalarabic = 0xfb7b; 15465 t.tchehinitialarabic = 0xfb7c; 15466 t.tchehmedialarabic = 0xfb7d; 15467 t.tcircle = 0x24e3; 15468 t.tcircumflexbelow = 0x1e71; 15469 t.tcommaaccent = 0x0163; 15470 t.tdieresis = 0x1e97; 15471 t.tdotaccent = 0x1e6b; 15472 t.tdotbelow = 0x1e6d; 15473 t.tecyrillic = 0x0442; 15474 t.tedescendercyrillic = 0x04ad; 15475 t.teharabic = 0x062a; 15476 t.tehfinalarabic = 0xfe96; 15477 t.tehhahinitialarabic = 0xfca2; 15478 t.tehhahisolatedarabic = 0xfc0c; 15479 t.tehinitialarabic = 0xfe97; 15480 t.tehiragana = 0x3066; 15481 t.tehjeeminitialarabic = 0xfca1; 15482 t.tehjeemisolatedarabic = 0xfc0b; 15483 t.tehmarbutaarabic = 0x0629; 15484 t.tehmarbutafinalarabic = 0xfe94; 15485 t.tehmedialarabic = 0xfe98; 15486 t.tehmeeminitialarabic = 0xfca4; 15487 t.tehmeemisolatedarabic = 0xfc0e; 15488 t.tehnoonfinalarabic = 0xfc73; 15489 t.tekatakana = 0x30c6; 15490 t.tekatakanahalfwidth = 0xff83; 15491 t.telephone = 0x2121; 15492 t.telephoneblack = 0x260e; 15493 t.telishagedolahebrew = 0x05a0; 15494 t.telishaqetanahebrew = 0x05a9; 15495 t.tencircle = 0x2469; 15496 t.tenideographicparen = 0x3229; 15497 t.tenparen = 0x247d; 15498 t.tenperiod = 0x2491; 15499 t.tenroman = 0x2179; 15500 t.tesh = 0x02a7; 15501 t.tet = 0x05d8; 15502 t.tetdagesh = 0xfb38; 15503 t.tetdageshhebrew = 0xfb38; 15504 t.tethebrew = 0x05d8; 15505 t.tetsecyrillic = 0x04b5; 15506 t.tevirhebrew = 0x059b; 15507 t.tevirlefthebrew = 0x059b; 15508 t.thabengali = 0x09a5; 15509 t.thadeva = 0x0925; 15510 t.thagujarati = 0x0aa5; 15511 t.thagurmukhi = 0x0a25; 15512 t.thalarabic = 0x0630; 15513 t.thalfinalarabic = 0xfeac; 15514 t.thanthakhatlowleftthai = 0xf898; 15515 t.thanthakhatlowrightthai = 0xf897; 15516 t.thanthakhatthai = 0x0e4c; 15517 t.thanthakhatupperleftthai = 0xf896; 15518 t.theharabic = 0x062b; 15519 t.thehfinalarabic = 0xfe9a; 15520 t.thehinitialarabic = 0xfe9b; 15521 t.thehmedialarabic = 0xfe9c; 15522 t.thereexists = 0x2203; 15523 t.therefore = 0x2234; 15524 t.theta = 0x03b8; 15525 t.theta1 = 0x03d1; 15526 t.thetasymbolgreek = 0x03d1; 15527 t.thieuthacirclekorean = 0x3279; 15528 t.thieuthaparenkorean = 0x3219; 15529 t.thieuthcirclekorean = 0x326b; 15530 t.thieuthkorean = 0x314c; 15531 t.thieuthparenkorean = 0x320b; 15532 t.thirteencircle = 0x246c; 15533 t.thirteenparen = 0x2480; 15534 t.thirteenperiod = 0x2494; 15535 t.thonangmonthothai = 0x0e11; 15536 t.thook = 0x01ad; 15537 t.thophuthaothai = 0x0e12; 15538 t.thorn = 0x00fe; 15539 t.thothahanthai = 0x0e17; 15540 t.thothanthai = 0x0e10; 15541 t.thothongthai = 0x0e18; 15542 t.thothungthai = 0x0e16; 15543 t.thousandcyrillic = 0x0482; 15544 t.thousandsseparatorarabic = 0x066c; 15545 t.thousandsseparatorpersian = 0x066c; 15546 t.three = 0x0033; 15547 t.threearabic = 0x0663; 15548 t.threebengali = 0x09e9; 15549 t.threecircle = 0x2462; 15550 t.threecircleinversesansserif = 0x278c; 15551 t.threedeva = 0x0969; 15552 t.threeeighths = 0x215c; 15553 t.threegujarati = 0x0ae9; 15554 t.threegurmukhi = 0x0a69; 15555 t.threehackarabic = 0x0663; 15556 t.threehangzhou = 0x3023; 15557 t.threeideographicparen = 0x3222; 15558 t.threeinferior = 0x2083; 15559 t.threemonospace = 0xff13; 15560 t.threenumeratorbengali = 0x09f6; 15561 t.threeoldstyle = 0xf733; 15562 t.threeparen = 0x2476; 15563 t.threeperiod = 0x248a; 15564 t.threepersian = 0x06f3; 15565 t.threequarters = 0x00be; 15566 t.threequartersemdash = 0xf6de; 15567 t.threeroman = 0x2172; 15568 t.threesuperior = 0x00b3; 15569 t.threethai = 0x0e53; 15570 t.thzsquare = 0x3394; 15571 t.tihiragana = 0x3061; 15572 t.tikatakana = 0x30c1; 15573 t.tikatakanahalfwidth = 0xff81; 15574 t.tikeutacirclekorean = 0x3270; 15575 t.tikeutaparenkorean = 0x3210; 15576 t.tikeutcirclekorean = 0x3262; 15577 t.tikeutkorean = 0x3137; 15578 t.tikeutparenkorean = 0x3202; 15579 t.tilde = 0x02dc; 15580 t.tildebelowcmb = 0x0330; 15581 t.tildecmb = 0x0303; 15582 t.tildecomb = 0x0303; 15583 t.tildedoublecmb = 0x0360; 15584 t.tildeoperator = 0x223c; 15585 t.tildeoverlaycmb = 0x0334; 15586 t.tildeverticalcmb = 0x033e; 15587 t.timescircle = 0x2297; 15588 t.tipehahebrew = 0x0596; 15589 t.tipehalefthebrew = 0x0596; 15590 t.tippigurmukhi = 0x0a70; 15591 t.titlocyrilliccmb = 0x0483; 15592 t.tiwnarmenian = 0x057f; 15593 t.tlinebelow = 0x1e6f; 15594 t.tmonospace = 0xff54; 15595 t.toarmenian = 0x0569; 15596 t.tohiragana = 0x3068; 15597 t.tokatakana = 0x30c8; 15598 t.tokatakanahalfwidth = 0xff84; 15599 t.tonebarextrahighmod = 0x02e5; 15600 t.tonebarextralowmod = 0x02e9; 15601 t.tonebarhighmod = 0x02e6; 15602 t.tonebarlowmod = 0x02e8; 15603 t.tonebarmidmod = 0x02e7; 15604 t.tonefive = 0x01bd; 15605 t.tonesix = 0x0185; 15606 t.tonetwo = 0x01a8; 15607 t.tonos = 0x0384; 15608 t.tonsquare = 0x3327; 15609 t.topatakthai = 0x0e0f; 15610 t.tortoiseshellbracketleft = 0x3014; 15611 t.tortoiseshellbracketleftsmall = 0xfe5d; 15612 t.tortoiseshellbracketleftvertical = 0xfe39; 15613 t.tortoiseshellbracketright = 0x3015; 15614 t.tortoiseshellbracketrightsmall = 0xfe5e; 15615 t.tortoiseshellbracketrightvertical = 0xfe3a; 15616 t.totaothai = 0x0e15; 15617 t.tpalatalhook = 0x01ab; 15618 t.tparen = 0x24af; 15619 t.trademark = 0x2122; 15620 t.trademarksans = 0xf8ea; 15621 t.trademarkserif = 0xf6db; 15622 t.tretroflexhook = 0x0288; 15623 t.triagdn = 0x25bc; 15624 t.triaglf = 0x25c4; 15625 t.triagrt = 0x25ba; 15626 t.triagup = 0x25b2; 15627 t.ts = 0x02a6; 15628 t.tsadi = 0x05e6; 15629 t.tsadidagesh = 0xfb46; 15630 t.tsadidageshhebrew = 0xfb46; 15631 t.tsadihebrew = 0x05e6; 15632 t.tsecyrillic = 0x0446; 15633 t.tsere = 0x05b5; 15634 t.tsere12 = 0x05b5; 15635 t.tsere1e = 0x05b5; 15636 t.tsere2b = 0x05b5; 15637 t.tserehebrew = 0x05b5; 15638 t.tserenarrowhebrew = 0x05b5; 15639 t.tserequarterhebrew = 0x05b5; 15640 t.tserewidehebrew = 0x05b5; 15641 t.tshecyrillic = 0x045b; 15642 t.tsuperior = 0xf6f3; 15643 t.ttabengali = 0x099f; 15644 t.ttadeva = 0x091f; 15645 t.ttagujarati = 0x0a9f; 15646 t.ttagurmukhi = 0x0a1f; 15647 t.tteharabic = 0x0679; 15648 t.ttehfinalarabic = 0xfb67; 15649 t.ttehinitialarabic = 0xfb68; 15650 t.ttehmedialarabic = 0xfb69; 15651 t.tthabengali = 0x09a0; 15652 t.tthadeva = 0x0920; 15653 t.tthagujarati = 0x0aa0; 15654 t.tthagurmukhi = 0x0a20; 15655 t.tturned = 0x0287; 15656 t.tuhiragana = 0x3064; 15657 t.tukatakana = 0x30c4; 15658 t.tukatakanahalfwidth = 0xff82; 15659 t.tusmallhiragana = 0x3063; 15660 t.tusmallkatakana = 0x30c3; 15661 t.tusmallkatakanahalfwidth = 0xff6f; 15662 t.twelvecircle = 0x246b; 15663 t.twelveparen = 0x247f; 15664 t.twelveperiod = 0x2493; 15665 t.twelveroman = 0x217b; 15666 t.twentycircle = 0x2473; 15667 t.twentyhangzhou = 0x5344; 15668 t.twentyparen = 0x2487; 15669 t.twentyperiod = 0x249b; 15670 t.two = 0x0032; 15671 t.twoarabic = 0x0662; 15672 t.twobengali = 0x09e8; 15673 t.twocircle = 0x2461; 15674 t.twocircleinversesansserif = 0x278b; 15675 t.twodeva = 0x0968; 15676 t.twodotenleader = 0x2025; 15677 t.twodotleader = 0x2025; 15678 t.twodotleadervertical = 0xfe30; 15679 t.twogujarati = 0x0ae8; 15680 t.twogurmukhi = 0x0a68; 15681 t.twohackarabic = 0x0662; 15682 t.twohangzhou = 0x3022; 15683 t.twoideographicparen = 0x3221; 15684 t.twoinferior = 0x2082; 15685 t.twomonospace = 0xff12; 15686 t.twonumeratorbengali = 0x09f5; 15687 t.twooldstyle = 0xf732; 15688 t.twoparen = 0x2475; 15689 t.twoperiod = 0x2489; 15690 t.twopersian = 0x06f2; 15691 t.tworoman = 0x2171; 15692 t.twostroke = 0x01bb; 15693 t.twosuperior = 0x00b2; 15694 t.twothai = 0x0e52; 15695 t.twothirds = 0x2154; 15696 t.u = 0x0075; 15697 t.uacute = 0x00fa; 15698 t.ubar = 0x0289; 15699 t.ubengali = 0x0989; 15700 t.ubopomofo = 0x3128; 15701 t.ubreve = 0x016d; 15702 t.ucaron = 0x01d4; 15703 t.ucircle = 0x24e4; 15704 t.ucircumflex = 0x00fb; 15705 t.ucircumflexbelow = 0x1e77; 15706 t.ucyrillic = 0x0443; 15707 t.udattadeva = 0x0951; 15708 t.udblacute = 0x0171; 15709 t.udblgrave = 0x0215; 15710 t.udeva = 0x0909; 15711 t.udieresis = 0x00fc; 15712 t.udieresisacute = 0x01d8; 15713 t.udieresisbelow = 0x1e73; 15714 t.udieresiscaron = 0x01da; 15715 t.udieresiscyrillic = 0x04f1; 15716 t.udieresisgrave = 0x01dc; 15717 t.udieresismacron = 0x01d6; 15718 t.udotbelow = 0x1ee5; 15719 t.ugrave = 0x00f9; 15720 t.ugujarati = 0x0a89; 15721 t.ugurmukhi = 0x0a09; 15722 t.uhiragana = 0x3046; 15723 t.uhookabove = 0x1ee7; 15724 t.uhorn = 0x01b0; 15725 t.uhornacute = 0x1ee9; 15726 t.uhorndotbelow = 0x1ef1; 15727 t.uhorngrave = 0x1eeb; 15728 t.uhornhookabove = 0x1eed; 15729 t.uhorntilde = 0x1eef; 15730 t.uhungarumlaut = 0x0171; 15731 t.uhungarumlautcyrillic = 0x04f3; 15732 t.uinvertedbreve = 0x0217; 15733 t.ukatakana = 0x30a6; 15734 t.ukatakanahalfwidth = 0xff73; 15735 t.ukcyrillic = 0x0479; 15736 t.ukorean = 0x315c; 15737 t.umacron = 0x016b; 15738 t.umacroncyrillic = 0x04ef; 15739 t.umacrondieresis = 0x1e7b; 15740 t.umatragurmukhi = 0x0a41; 15741 t.umonospace = 0xff55; 15742 t.underscore = 0x005f; 15743 t.underscoredbl = 0x2017; 15744 t.underscoremonospace = 0xff3f; 15745 t.underscorevertical = 0xfe33; 15746 t.underscorewavy = 0xfe4f; 15747 t.union = 0x222a; 15748 t.universal = 0x2200; 15749 t.uogonek = 0x0173; 15750 t.uparen = 0x24b0; 15751 t.upblock = 0x2580; 15752 t.upperdothebrew = 0x05c4; 15753 t.upsilon = 0x03c5; 15754 t.upsilondieresis = 0x03cb; 15755 t.upsilondieresistonos = 0x03b0; 15756 t.upsilonlatin = 0x028a; 15757 t.upsilontonos = 0x03cd; 15758 t.uptackbelowcmb = 0x031d; 15759 t.uptackmod = 0x02d4; 15760 t.uragurmukhi = 0x0a73; 15761 t.uring = 0x016f; 15762 t.ushortcyrillic = 0x045e; 15763 t.usmallhiragana = 0x3045; 15764 t.usmallkatakana = 0x30a5; 15765 t.usmallkatakanahalfwidth = 0xff69; 15766 t.ustraightcyrillic = 0x04af; 15767 t.ustraightstrokecyrillic = 0x04b1; 15768 t.utilde = 0x0169; 15769 t.utildeacute = 0x1e79; 15770 t.utildebelow = 0x1e75; 15771 t.uubengali = 0x098a; 15772 t.uudeva = 0x090a; 15773 t.uugujarati = 0x0a8a; 15774 t.uugurmukhi = 0x0a0a; 15775 t.uumatragurmukhi = 0x0a42; 15776 t.uuvowelsignbengali = 0x09c2; 15777 t.uuvowelsigndeva = 0x0942; 15778 t.uuvowelsigngujarati = 0x0ac2; 15779 t.uvowelsignbengali = 0x09c1; 15780 t.uvowelsigndeva = 0x0941; 15781 t.uvowelsigngujarati = 0x0ac1; 15782 t.v = 0x0076; 15783 t.vadeva = 0x0935; 15784 t.vagujarati = 0x0ab5; 15785 t.vagurmukhi = 0x0a35; 15786 t.vakatakana = 0x30f7; 15787 t.vav = 0x05d5; 15788 t.vavdagesh = 0xfb35; 15789 t.vavdagesh65 = 0xfb35; 15790 t.vavdageshhebrew = 0xfb35; 15791 t.vavhebrew = 0x05d5; 15792 t.vavholam = 0xfb4b; 15793 t.vavholamhebrew = 0xfb4b; 15794 t.vavvavhebrew = 0x05f0; 15795 t.vavyodhebrew = 0x05f1; 15796 t.vcircle = 0x24e5; 15797 t.vdotbelow = 0x1e7f; 15798 t.vecyrillic = 0x0432; 15799 t.veharabic = 0x06a4; 15800 t.vehfinalarabic = 0xfb6b; 15801 t.vehinitialarabic = 0xfb6c; 15802 t.vehmedialarabic = 0xfb6d; 15803 t.vekatakana = 0x30f9; 15804 t.venus = 0x2640; 15805 t.verticalbar = 0x007c; 15806 t.verticallineabovecmb = 0x030d; 15807 t.verticallinebelowcmb = 0x0329; 15808 t.verticallinelowmod = 0x02cc; 15809 t.verticallinemod = 0x02c8; 15810 t.vewarmenian = 0x057e; 15811 t.vhook = 0x028b; 15812 t.vikatakana = 0x30f8; 15813 t.viramabengali = 0x09cd; 15814 t.viramadeva = 0x094d; 15815 t.viramagujarati = 0x0acd; 15816 t.visargabengali = 0x0983; 15817 t.visargadeva = 0x0903; 15818 t.visargagujarati = 0x0a83; 15819 t.vmonospace = 0xff56; 15820 t.voarmenian = 0x0578; 15821 t.voicediterationhiragana = 0x309e; 15822 t.voicediterationkatakana = 0x30fe; 15823 t.voicedmarkkana = 0x309b; 15824 t.voicedmarkkanahalfwidth = 0xff9e; 15825 t.vokatakana = 0x30fa; 15826 t.vparen = 0x24b1; 15827 t.vtilde = 0x1e7d; 15828 t.vturned = 0x028c; 15829 t.vuhiragana = 0x3094; 15830 t.vukatakana = 0x30f4; 15831 t.w = 0x0077; 15832 t.wacute = 0x1e83; 15833 t.waekorean = 0x3159; 15834 t.wahiragana = 0x308f; 15835 t.wakatakana = 0x30ef; 15836 t.wakatakanahalfwidth = 0xff9c; 15837 t.wakorean = 0x3158; 15838 t.wasmallhiragana = 0x308e; 15839 t.wasmallkatakana = 0x30ee; 15840 t.wattosquare = 0x3357; 15841 t.wavedash = 0x301c; 15842 t.wavyunderscorevertical = 0xfe34; 15843 t.wawarabic = 0x0648; 15844 t.wawfinalarabic = 0xfeee; 15845 t.wawhamzaabovearabic = 0x0624; 15846 t.wawhamzaabovefinalarabic = 0xfe86; 15847 t.wbsquare = 0x33dd; 15848 t.wcircle = 0x24e6; 15849 t.wcircumflex = 0x0175; 15850 t.wdieresis = 0x1e85; 15851 t.wdotaccent = 0x1e87; 15852 t.wdotbelow = 0x1e89; 15853 t.wehiragana = 0x3091; 15854 t.weierstrass = 0x2118; 15855 t.wekatakana = 0x30f1; 15856 t.wekorean = 0x315e; 15857 t.weokorean = 0x315d; 15858 t.wgrave = 0x1e81; 15859 t.whitebullet = 0x25e6; 15860 t.whitecircle = 0x25cb; 15861 t.whitecircleinverse = 0x25d9; 15862 t.whitecornerbracketleft = 0x300e; 15863 t.whitecornerbracketleftvertical = 0xfe43; 15864 t.whitecornerbracketright = 0x300f; 15865 t.whitecornerbracketrightvertical = 0xfe44; 15866 t.whitediamond = 0x25c7; 15867 t.whitediamondcontainingblacksmalldiamond = 0x25c8; 15868 t.whitedownpointingsmalltriangle = 0x25bf; 15869 t.whitedownpointingtriangle = 0x25bd; 15870 t.whiteleftpointingsmalltriangle = 0x25c3; 15871 t.whiteleftpointingtriangle = 0x25c1; 15872 t.whitelenticularbracketleft = 0x3016; 15873 t.whitelenticularbracketright = 0x3017; 15874 t.whiterightpointingsmalltriangle = 0x25b9; 15875 t.whiterightpointingtriangle = 0x25b7; 15876 t.whitesmallsquare = 0x25ab; 15877 t.whitesmilingface = 0x263a; 15878 t.whitesquare = 0x25a1; 15879 t.whitestar = 0x2606; 15880 t.whitetelephone = 0x260f; 15881 t.whitetortoiseshellbracketleft = 0x3018; 15882 t.whitetortoiseshellbracketright = 0x3019; 15883 t.whiteuppointingsmalltriangle = 0x25b5; 15884 t.whiteuppointingtriangle = 0x25b3; 15885 t.wihiragana = 0x3090; 15886 t.wikatakana = 0x30f0; 15887 t.wikorean = 0x315f; 15888 t.wmonospace = 0xff57; 15889 t.wohiragana = 0x3092; 15890 t.wokatakana = 0x30f2; 15891 t.wokatakanahalfwidth = 0xff66; 15892 t.won = 0x20a9; 15893 t.wonmonospace = 0xffe6; 15894 t.wowaenthai = 0x0e27; 15895 t.wparen = 0x24b2; 15896 t.wring = 0x1e98; 15897 t.wsuperior = 0x02b7; 15898 t.wturned = 0x028d; 15899 t.wynn = 0x01bf; 15900 t.x = 0x0078; 15901 t.xabovecmb = 0x033d; 15902 t.xbopomofo = 0x3112; 15903 t.xcircle = 0x24e7; 15904 t.xdieresis = 0x1e8d; 15905 t.xdotaccent = 0x1e8b; 15906 t.xeharmenian = 0x056d; 15907 t.xi = 0x03be; 15908 t.xmonospace = 0xff58; 15909 t.xparen = 0x24b3; 15910 t.xsuperior = 0x02e3; 15911 t.y = 0x0079; 15912 t.yaadosquare = 0x334e; 15913 t.yabengali = 0x09af; 15914 t.yacute = 0x00fd; 15915 t.yadeva = 0x092f; 15916 t.yaekorean = 0x3152; 15917 t.yagujarati = 0x0aaf; 15918 t.yagurmukhi = 0x0a2f; 15919 t.yahiragana = 0x3084; 15920 t.yakatakana = 0x30e4; 15921 t.yakatakanahalfwidth = 0xff94; 15922 t.yakorean = 0x3151; 15923 t.yamakkanthai = 0x0e4e; 15924 t.yasmallhiragana = 0x3083; 15925 t.yasmallkatakana = 0x30e3; 15926 t.yasmallkatakanahalfwidth = 0xff6c; 15927 t.yatcyrillic = 0x0463; 15928 t.ycircle = 0x24e8; 15929 t.ycircumflex = 0x0177; 15930 t.ydieresis = 0x00ff; 15931 t.ydotaccent = 0x1e8f; 15932 t.ydotbelow = 0x1ef5; 15933 t.yeharabic = 0x064a; 15934 t.yehbarreearabic = 0x06d2; 15935 t.yehbarreefinalarabic = 0xfbaf; 15936 t.yehfinalarabic = 0xfef2; 15937 t.yehhamzaabovearabic = 0x0626; 15938 t.yehhamzaabovefinalarabic = 0xfe8a; 15939 t.yehhamzaaboveinitialarabic = 0xfe8b; 15940 t.yehhamzaabovemedialarabic = 0xfe8c; 15941 t.yehinitialarabic = 0xfef3; 15942 t.yehmedialarabic = 0xfef4; 15943 t.yehmeeminitialarabic = 0xfcdd; 15944 t.yehmeemisolatedarabic = 0xfc58; 15945 t.yehnoonfinalarabic = 0xfc94; 15946 t.yehthreedotsbelowarabic = 0x06d1; 15947 t.yekorean = 0x3156; 15948 t.yen = 0x00a5; 15949 t.yenmonospace = 0xffe5; 15950 t.yeokorean = 0x3155; 15951 t.yeorinhieuhkorean = 0x3186; 15952 t.yerahbenyomohebrew = 0x05aa; 15953 t.yerahbenyomolefthebrew = 0x05aa; 15954 t.yericyrillic = 0x044b; 15955 t.yerudieresiscyrillic = 0x04f9; 15956 t.yesieungkorean = 0x3181; 15957 t.yesieungpansioskorean = 0x3183; 15958 t.yesieungsioskorean = 0x3182; 15959 t.yetivhebrew = 0x059a; 15960 t.ygrave = 0x1ef3; 15961 t.yhook = 0x01b4; 15962 t.yhookabove = 0x1ef7; 15963 t.yiarmenian = 0x0575; 15964 t.yicyrillic = 0x0457; 15965 t.yikorean = 0x3162; 15966 t.yinyang = 0x262f; 15967 t.yiwnarmenian = 0x0582; 15968 t.ymonospace = 0xff59; 15969 t.yod = 0x05d9; 15970 t.yoddagesh = 0xfb39; 15971 t.yoddageshhebrew = 0xfb39; 15972 t.yodhebrew = 0x05d9; 15973 t.yodyodhebrew = 0x05f2; 15974 t.yodyodpatahhebrew = 0xfb1f; 15975 t.yohiragana = 0x3088; 15976 t.yoikorean = 0x3189; 15977 t.yokatakana = 0x30e8; 15978 t.yokatakanahalfwidth = 0xff96; 15979 t.yokorean = 0x315b; 15980 t.yosmallhiragana = 0x3087; 15981 t.yosmallkatakana = 0x30e7; 15982 t.yosmallkatakanahalfwidth = 0xff6e; 15983 t.yotgreek = 0x03f3; 15984 t.yoyaekorean = 0x3188; 15985 t.yoyakorean = 0x3187; 15986 t.yoyakthai = 0x0e22; 15987 t.yoyingthai = 0x0e0d; 15988 t.yparen = 0x24b4; 15989 t.ypogegrammeni = 0x037a; 15990 t.ypogegrammenigreekcmb = 0x0345; 15991 t.yr = 0x01a6; 15992 t.yring = 0x1e99; 15993 t.ysuperior = 0x02b8; 15994 t.ytilde = 0x1ef9; 15995 t.yturned = 0x028e; 15996 t.yuhiragana = 0x3086; 15997 t.yuikorean = 0x318c; 15998 t.yukatakana = 0x30e6; 15999 t.yukatakanahalfwidth = 0xff95; 16000 t.yukorean = 0x3160; 16001 t.yusbigcyrillic = 0x046b; 16002 t.yusbigiotifiedcyrillic = 0x046d; 16003 t.yuslittlecyrillic = 0x0467; 16004 t.yuslittleiotifiedcyrillic = 0x0469; 16005 t.yusmallhiragana = 0x3085; 16006 t.yusmallkatakana = 0x30e5; 16007 t.yusmallkatakanahalfwidth = 0xff6d; 16008 t.yuyekorean = 0x318b; 16009 t.yuyeokorean = 0x318a; 16010 t.yyabengali = 0x09df; 16011 t.yyadeva = 0x095f; 16012 t.z = 0x007a; 16013 t.zaarmenian = 0x0566; 16014 t.zacute = 0x017a; 16015 t.zadeva = 0x095b; 16016 t.zagurmukhi = 0x0a5b; 16017 t.zaharabic = 0x0638; 16018 t.zahfinalarabic = 0xfec6; 16019 t.zahinitialarabic = 0xfec7; 16020 t.zahiragana = 0x3056; 16021 t.zahmedialarabic = 0xfec8; 16022 t.zainarabic = 0x0632; 16023 t.zainfinalarabic = 0xfeb0; 16024 t.zakatakana = 0x30b6; 16025 t.zaqefgadolhebrew = 0x0595; 16026 t.zaqefqatanhebrew = 0x0594; 16027 t.zarqahebrew = 0x0598; 16028 t.zayin = 0x05d6; 16029 t.zayindagesh = 0xfb36; 16030 t.zayindageshhebrew = 0xfb36; 16031 t.zayinhebrew = 0x05d6; 16032 t.zbopomofo = 0x3117; 16033 t.zcaron = 0x017e; 16034 t.zcircle = 0x24e9; 16035 t.zcircumflex = 0x1e91; 16036 t.zcurl = 0x0291; 16037 t.zdot = 0x017c; 16038 t.zdotaccent = 0x017c; 16039 t.zdotbelow = 0x1e93; 16040 t.zecyrillic = 0x0437; 16041 t.zedescendercyrillic = 0x0499; 16042 t.zedieresiscyrillic = 0x04df; 16043 t.zehiragana = 0x305c; 16044 t.zekatakana = 0x30bc; 16045 t.zero = 0x0030; 16046 t.zeroarabic = 0x0660; 16047 t.zerobengali = 0x09e6; 16048 t.zerodeva = 0x0966; 16049 t.zerogujarati = 0x0ae6; 16050 t.zerogurmukhi = 0x0a66; 16051 t.zerohackarabic = 0x0660; 16052 t.zeroinferior = 0x2080; 16053 t.zeromonospace = 0xff10; 16054 t.zerooldstyle = 0xf730; 16055 t.zeropersian = 0x06f0; 16056 t.zerosuperior = 0x2070; 16057 t.zerothai = 0x0e50; 16058 t.zerowidthjoiner = 0xfeff; 16059 t.zerowidthnonjoiner = 0x200c; 16060 t.zerowidthspace = 0x200b; 16061 t.zeta = 0x03b6; 16062 t.zhbopomofo = 0x3113; 16063 t.zhearmenian = 0x056a; 16064 t.zhebrevecyrillic = 0x04c2; 16065 t.zhecyrillic = 0x0436; 16066 t.zhedescendercyrillic = 0x0497; 16067 t.zhedieresiscyrillic = 0x04dd; 16068 t.zihiragana = 0x3058; 16069 t.zikatakana = 0x30b8; 16070 t.zinorhebrew = 0x05ae; 16071 t.zlinebelow = 0x1e95; 16072 t.zmonospace = 0xff5a; 16073 t.zohiragana = 0x305e; 16074 t.zokatakana = 0x30be; 16075 t.zparen = 0x24b5; 16076 t.zretroflexhook = 0x0290; 16077 t.zstroke = 0x01b6; 16078 t.zuhiragana = 0x305a; 16079 t.zukatakana = 0x30ba; 16080 t[".notdef"] = 0x0000; 16081 t.angbracketleftbig = 0x2329; 16082 t.angbracketleftBig = 0x2329; 16083 t.angbracketleftbigg = 0x2329; 16084 t.angbracketleftBigg = 0x2329; 16085 t.angbracketrightBig = 0x232a; 16086 t.angbracketrightbig = 0x232a; 16087 t.angbracketrightBigg = 0x232a; 16088 t.angbracketrightbigg = 0x232a; 16089 t.arrowhookleft = 0x21aa; 16090 t.arrowhookright = 0x21a9; 16091 t.arrowlefttophalf = 0x21bc; 16092 t.arrowleftbothalf = 0x21bd; 16093 t.arrownortheast = 0x2197; 16094 t.arrownorthwest = 0x2196; 16095 t.arrowrighttophalf = 0x21c0; 16096 t.arrowrightbothalf = 0x21c1; 16097 t.arrowsoutheast = 0x2198; 16098 t.arrowsouthwest = 0x2199; 16099 t.backslashbig = 0x2216; 16100 t.backslashBig = 0x2216; 16101 t.backslashBigg = 0x2216; 16102 t.backslashbigg = 0x2216; 16103 t.bardbl = 0x2016; 16104 t.bracehtipdownleft = 0xfe37; 16105 t.bracehtipdownright = 0xfe37; 16106 t.bracehtipupleft = 0xfe38; 16107 t.bracehtipupright = 0xfe38; 16108 t.braceleftBig = 0x007b; 16109 t.braceleftbig = 0x007b; 16110 t.braceleftbigg = 0x007b; 16111 t.braceleftBigg = 0x007b; 16112 t.bracerightBig = 0x007d; 16113 t.bracerightbig = 0x007d; 16114 t.bracerightbigg = 0x007d; 16115 t.bracerightBigg = 0x007d; 16116 t.bracketleftbig = 0x005b; 16117 t.bracketleftBig = 0x005b; 16118 t.bracketleftbigg = 0x005b; 16119 t.bracketleftBigg = 0x005b; 16120 t.bracketrightBig = 0x005d; 16121 t.bracketrightbig = 0x005d; 16122 t.bracketrightbigg = 0x005d; 16123 t.bracketrightBigg = 0x005d; 16124 t.ceilingleftbig = 0x2308; 16125 t.ceilingleftBig = 0x2308; 16126 t.ceilingleftBigg = 0x2308; 16127 t.ceilingleftbigg = 0x2308; 16128 t.ceilingrightbig = 0x2309; 16129 t.ceilingrightBig = 0x2309; 16130 t.ceilingrightbigg = 0x2309; 16131 t.ceilingrightBigg = 0x2309; 16132 t.circledotdisplay = 0x2299; 16133 t.circledottext = 0x2299; 16134 t.circlemultiplydisplay = 0x2297; 16135 t.circlemultiplytext = 0x2297; 16136 t.circleplusdisplay = 0x2295; 16137 t.circleplustext = 0x2295; 16138 t.contintegraldisplay = 0x222e; 16139 t.contintegraltext = 0x222e; 16140 t.coproductdisplay = 0x2210; 16141 t.coproducttext = 0x2210; 16142 t.floorleftBig = 0x230a; 16143 t.floorleftbig = 0x230a; 16144 t.floorleftbigg = 0x230a; 16145 t.floorleftBigg = 0x230a; 16146 t.floorrightbig = 0x230b; 16147 t.floorrightBig = 0x230b; 16148 t.floorrightBigg = 0x230b; 16149 t.floorrightbigg = 0x230b; 16150 t.hatwide = 0x0302; 16151 t.hatwider = 0x0302; 16152 t.hatwidest = 0x0302; 16153 t.intercal = 0x1d40; 16154 t.integraldisplay = 0x222b; 16155 t.integraltext = 0x222b; 16156 t.intersectiondisplay = 0x22c2; 16157 t.intersectiontext = 0x22c2; 16158 t.logicalanddisplay = 0x2227; 16159 t.logicalandtext = 0x2227; 16160 t.logicalordisplay = 0x2228; 16161 t.logicalortext = 0x2228; 16162 t.parenleftBig = 0x0028; 16163 t.parenleftbig = 0x0028; 16164 t.parenleftBigg = 0x0028; 16165 t.parenleftbigg = 0x0028; 16166 t.parenrightBig = 0x0029; 16167 t.parenrightbig = 0x0029; 16168 t.parenrightBigg = 0x0029; 16169 t.parenrightbigg = 0x0029; 16170 t.prime = 0x2032; 16171 t.productdisplay = 0x220f; 16172 t.producttext = 0x220f; 16173 t.radicalbig = 0x221a; 16174 t.radicalBig = 0x221a; 16175 t.radicalBigg = 0x221a; 16176 t.radicalbigg = 0x221a; 16177 t.radicalbt = 0x221a; 16178 t.radicaltp = 0x221a; 16179 t.radicalvertex = 0x221a; 16180 t.slashbig = 0x002f; 16181 t.slashBig = 0x002f; 16182 t.slashBigg = 0x002f; 16183 t.slashbigg = 0x002f; 16184 t.summationdisplay = 0x2211; 16185 t.summationtext = 0x2211; 16186 t.tildewide = 0x02dc; 16187 t.tildewider = 0x02dc; 16188 t.tildewidest = 0x02dc; 16189 t.uniondisplay = 0x22c3; 16190 t.unionmultidisplay = 0x228e; 16191 t.unionmultitext = 0x228e; 16192 t.unionsqdisplay = 0x2294; 16193 t.unionsqtext = 0x2294; 16194 t.uniontext = 0x22c3; 16195 t.vextenddouble = 0x2225; 16196 t.vextendsingle = 0x2223; 16197}); 16198const getDingbatsGlyphsUnicode = getLookupTableFactory(function (t) { 16199 t.space = 0x0020; 16200 t.a1 = 0x2701; 16201 t.a2 = 0x2702; 16202 t.a202 = 0x2703; 16203 t.a3 = 0x2704; 16204 t.a4 = 0x260e; 16205 t.a5 = 0x2706; 16206 t.a119 = 0x2707; 16207 t.a118 = 0x2708; 16208 t.a117 = 0x2709; 16209 t.a11 = 0x261b; 16210 t.a12 = 0x261e; 16211 t.a13 = 0x270c; 16212 t.a14 = 0x270d; 16213 t.a15 = 0x270e; 16214 t.a16 = 0x270f; 16215 t.a105 = 0x2710; 16216 t.a17 = 0x2711; 16217 t.a18 = 0x2712; 16218 t.a19 = 0x2713; 16219 t.a20 = 0x2714; 16220 t.a21 = 0x2715; 16221 t.a22 = 0x2716; 16222 t.a23 = 0x2717; 16223 t.a24 = 0x2718; 16224 t.a25 = 0x2719; 16225 t.a26 = 0x271a; 16226 t.a27 = 0x271b; 16227 t.a28 = 0x271c; 16228 t.a6 = 0x271d; 16229 t.a7 = 0x271e; 16230 t.a8 = 0x271f; 16231 t.a9 = 0x2720; 16232 t.a10 = 0x2721; 16233 t.a29 = 0x2722; 16234 t.a30 = 0x2723; 16235 t.a31 = 0x2724; 16236 t.a32 = 0x2725; 16237 t.a33 = 0x2726; 16238 t.a34 = 0x2727; 16239 t.a35 = 0x2605; 16240 t.a36 = 0x2729; 16241 t.a37 = 0x272a; 16242 t.a38 = 0x272b; 16243 t.a39 = 0x272c; 16244 t.a40 = 0x272d; 16245 t.a41 = 0x272e; 16246 t.a42 = 0x272f; 16247 t.a43 = 0x2730; 16248 t.a44 = 0x2731; 16249 t.a45 = 0x2732; 16250 t.a46 = 0x2733; 16251 t.a47 = 0x2734; 16252 t.a48 = 0x2735; 16253 t.a49 = 0x2736; 16254 t.a50 = 0x2737; 16255 t.a51 = 0x2738; 16256 t.a52 = 0x2739; 16257 t.a53 = 0x273a; 16258 t.a54 = 0x273b; 16259 t.a55 = 0x273c; 16260 t.a56 = 0x273d; 16261 t.a57 = 0x273e; 16262 t.a58 = 0x273f; 16263 t.a59 = 0x2740; 16264 t.a60 = 0x2741; 16265 t.a61 = 0x2742; 16266 t.a62 = 0x2743; 16267 t.a63 = 0x2744; 16268 t.a64 = 0x2745; 16269 t.a65 = 0x2746; 16270 t.a66 = 0x2747; 16271 t.a67 = 0x2748; 16272 t.a68 = 0x2749; 16273 t.a69 = 0x274a; 16274 t.a70 = 0x274b; 16275 t.a71 = 0x25cf; 16276 t.a72 = 0x274d; 16277 t.a73 = 0x25a0; 16278 t.a74 = 0x274f; 16279 t.a203 = 0x2750; 16280 t.a75 = 0x2751; 16281 t.a204 = 0x2752; 16282 t.a76 = 0x25b2; 16283 t.a77 = 0x25bc; 16284 t.a78 = 0x25c6; 16285 t.a79 = 0x2756; 16286 t.a81 = 0x25d7; 16287 t.a82 = 0x2758; 16288 t.a83 = 0x2759; 16289 t.a84 = 0x275a; 16290 t.a97 = 0x275b; 16291 t.a98 = 0x275c; 16292 t.a99 = 0x275d; 16293 t.a100 = 0x275e; 16294 t.a101 = 0x2761; 16295 t.a102 = 0x2762; 16296 t.a103 = 0x2763; 16297 t.a104 = 0x2764; 16298 t.a106 = 0x2765; 16299 t.a107 = 0x2766; 16300 t.a108 = 0x2767; 16301 t.a112 = 0x2663; 16302 t.a111 = 0x2666; 16303 t.a110 = 0x2665; 16304 t.a109 = 0x2660; 16305 t.a120 = 0x2460; 16306 t.a121 = 0x2461; 16307 t.a122 = 0x2462; 16308 t.a123 = 0x2463; 16309 t.a124 = 0x2464; 16310 t.a125 = 0x2465; 16311 t.a126 = 0x2466; 16312 t.a127 = 0x2467; 16313 t.a128 = 0x2468; 16314 t.a129 = 0x2469; 16315 t.a130 = 0x2776; 16316 t.a131 = 0x2777; 16317 t.a132 = 0x2778; 16318 t.a133 = 0x2779; 16319 t.a134 = 0x277a; 16320 t.a135 = 0x277b; 16321 t.a136 = 0x277c; 16322 t.a137 = 0x277d; 16323 t.a138 = 0x277e; 16324 t.a139 = 0x277f; 16325 t.a140 = 0x2780; 16326 t.a141 = 0x2781; 16327 t.a142 = 0x2782; 16328 t.a143 = 0x2783; 16329 t.a144 = 0x2784; 16330 t.a145 = 0x2785; 16331 t.a146 = 0x2786; 16332 t.a147 = 0x2787; 16333 t.a148 = 0x2788; 16334 t.a149 = 0x2789; 16335 t.a150 = 0x278a; 16336 t.a151 = 0x278b; 16337 t.a152 = 0x278c; 16338 t.a153 = 0x278d; 16339 t.a154 = 0x278e; 16340 t.a155 = 0x278f; 16341 t.a156 = 0x2790; 16342 t.a157 = 0x2791; 16343 t.a158 = 0x2792; 16344 t.a159 = 0x2793; 16345 t.a160 = 0x2794; 16346 t.a161 = 0x2192; 16347 t.a163 = 0x2194; 16348 t.a164 = 0x2195; 16349 t.a196 = 0x2798; 16350 t.a165 = 0x2799; 16351 t.a192 = 0x279a; 16352 t.a166 = 0x279b; 16353 t.a167 = 0x279c; 16354 t.a168 = 0x279d; 16355 t.a169 = 0x279e; 16356 t.a170 = 0x279f; 16357 t.a171 = 0x27a0; 16358 t.a172 = 0x27a1; 16359 t.a173 = 0x27a2; 16360 t.a162 = 0x27a3; 16361 t.a174 = 0x27a4; 16362 t.a175 = 0x27a5; 16363 t.a176 = 0x27a6; 16364 t.a177 = 0x27a7; 16365 t.a178 = 0x27a8; 16366 t.a179 = 0x27a9; 16367 t.a193 = 0x27aa; 16368 t.a180 = 0x27ab; 16369 t.a199 = 0x27ac; 16370 t.a181 = 0x27ad; 16371 t.a200 = 0x27ae; 16372 t.a182 = 0x27af; 16373 t.a201 = 0x27b1; 16374 t.a183 = 0x27b2; 16375 t.a184 = 0x27b3; 16376 t.a197 = 0x27b4; 16377 t.a185 = 0x27b5; 16378 t.a194 = 0x27b6; 16379 t.a198 = 0x27b7; 16380 t.a186 = 0x27b8; 16381 t.a195 = 0x27b9; 16382 t.a187 = 0x27ba; 16383 t.a188 = 0x27bb; 16384 t.a189 = 0x27bc; 16385 t.a190 = 0x27bd; 16386 t.a191 = 0x27be; 16387 t.a89 = 0x2768; 16388 t.a90 = 0x2769; 16389 t.a93 = 0x276a; 16390 t.a94 = 0x276b; 16391 t.a91 = 0x276c; 16392 t.a92 = 0x276d; 16393 t.a205 = 0x276e; 16394 t.a85 = 0x276f; 16395 t.a206 = 0x2770; 16396 t.a86 = 0x2771; 16397 t.a87 = 0x2772; 16398 t.a88 = 0x2773; 16399 t.a95 = 0x2774; 16400 t.a96 = 0x2775; 16401 t[".notdef"] = 0x0000; 16402}); 16403 16404;// ./src/core/unicode.js 16405 16406const getSpecialPUASymbols = getLookupTableFactory(function (t) { 16407 t[63721] = 0x00a9; 16408 t[63193] = 0x00a9; 16409 t[63720] = 0x00ae; 16410 t[63194] = 0x00ae; 16411 t[63722] = 0x2122; 16412 t[63195] = 0x2122; 16413 t[63729] = 0x23a7; 16414 t[63730] = 0x23a8; 16415 t[63731] = 0x23a9; 16416 t[63740] = 0x23ab; 16417 t[63741] = 0x23ac; 16418 t[63742] = 0x23ad; 16419 t[63726] = 0x23a1; 16420 t[63727] = 0x23a2; 16421 t[63728] = 0x23a3; 16422 t[63737] = 0x23a4; 16423 t[63738] = 0x23a5; 16424 t[63739] = 0x23a6; 16425 t[63723] = 0x239b; 16426 t[63724] = 0x239c; 16427 t[63725] = 0x239d; 16428 t[63734] = 0x239e; 16429 t[63735] = 0x239f; 16430 t[63736] = 0x23a0; 16431}); 16432function mapSpecialUnicodeValues(code) { 16433 if (code >= 0xfff0 && code <= 0xffff) { 16434 return 0; 16435 } else if (code >= 0xf600 && code <= 0xf8ff) { 16436 return getSpecialPUASymbols()[code] || code; 16437 } else if (code === 0x00ad) { 16438 return 0x002d; 16439 } 16440 return code; 16441} 16442function getUnicodeForGlyph(name, glyphsUnicodeMap) { 16443 let unicode = glyphsUnicodeMap[name]; 16444 if (unicode !== undefined) { 16445 return unicode; 16446 } 16447 if (!name) { 16448 return -1; 16449 } 16450 if (name[0] === "u") { 16451 const nameLen = name.length; 16452 let hexStr; 16453 if (nameLen === 7 && name[1] === "n" && name[2] === "i") { 16454 hexStr = name.substring(3); 16455 } else if (nameLen >= 5 && nameLen <= 7) { 16456 hexStr = name.substring(1); 16457 } else { 16458 return -1; 16459 } 16460 if (hexStr === hexStr.toUpperCase()) { 16461 unicode = parseInt(hexStr, 16); 16462 if (unicode >= 0) { 16463 return unicode; 16464 } 16465 } 16466 } 16467 return -1; 16468} 16469const UnicodeRanges = [[0x0000, 0x007f], [0x0080, 0x00ff], [0x0100, 0x017f], [0x0180, 0x024f], [0x0250, 0x02af, 0x1d00, 0x1d7f, 0x1d80, 0x1dbf], [0x02b0, 0x02ff, 0xa700, 0xa71f], [0x0300, 0x036f, 0x1dc0, 0x1dff], [0x0370, 0x03ff], [0x2c80, 0x2cff], [0x0400, 0x04ff, 0x0500, 0x052f, 0x2de0, 0x2dff, 0xa640, 0xa69f], [0x0530, 0x058f], [0x0590, 0x05ff], [0xa500, 0xa63f], [0x0600, 0x06ff, 0x0750, 0x077f], [0x07c0, 0x07ff], [0x0900, 0x097f], [0x0980, 0x09ff], [0x0a00, 0x0a7f], [0x0a80, 0x0aff], [0x0b00, 0x0b7f], [0x0b80, 0x0bff], [0x0c00, 0x0c7f], [0x0c80, 0x0cff], [0x0d00, 0x0d7f], [0x0e00, 0x0e7f], [0x0e80, 0x0eff], [0x10a0, 0x10ff, 0x2d00, 0x2d2f], [0x1b00, 0x1b7f], [0x1100, 0x11ff], [0x1e00, 0x1eff, 0x2c60, 0x2c7f, 0xa720, 0xa7ff], [0x1f00, 0x1fff], [0x2000, 0x206f, 0x2e00, 0x2e7f], [0x2070, 0x209f], [0x20a0, 0x20cf], [0x20d0, 0x20ff], [0x2100, 0x214f], [0x2150, 0x218f], [0x2190, 0x21ff, 0x27f0, 0x27ff, 0x2900, 0x297f, 0x2b00, 0x2bff], [0x2200, 0x22ff, 0x2a00, 0x2aff, 0x27c0, 0x27ef, 0x2980, 0x29ff], [0x2300, 0x23ff], [0x2400, 0x243f], [0x2440, 0x245f], [0x2460, 0x24ff], [0x2500, 0x257f], [0x2580, 0x259f], [0x25a0, 0x25ff], [0x2600, 0x26ff], [0x2700, 0x27bf], [0x3000, 0x303f], [0x3040, 0x309f], [0x30a0, 0x30ff, 0x31f0, 0x31ff], [0x3100, 0x312f, 0x31a0, 0x31bf], [0x3130, 0x318f], [0xa840, 0xa87f], [0x3200, 0x32ff], [0x3300, 0x33ff], [0xac00, 0xd7af], [0xd800, 0xdfff], [0x10900, 0x1091f], [0x4e00, 0x9fff, 0x2e80, 0x2eff, 0x2f00, 0x2fdf, 0x2ff0, 0x2fff, 0x3400, 0x4dbf, 0x20000, 0x2a6df, 0x3190, 0x319f], [0xe000, 0xf8ff], [0x31c0, 0x31ef, 0xf900, 0xfaff, 0x2f800, 0x2fa1f], [0xfb00, 0xfb4f], [0xfb50, 0xfdff], [0xfe20, 0xfe2f], [0xfe10, 0xfe1f], [0xfe50, 0xfe6f], [0xfe70, 0xfeff], [0xff00, 0xffef], [0xfff0, 0xffff], [0x0f00, 0x0fff], [0x0700, 0x074f], [0x0780, 0x07bf], [0x0d80, 0x0dff], [0x1000, 0x109f], [0x1200, 0x137f, 0x1380, 0x139f, 0x2d80, 0x2ddf], [0x13a0, 0x13ff], [0x1400, 0x167f], [0x1680, 0x169f], [0x16a0, 0x16ff], [0x1780, 0x17ff], [0x1800, 0x18af], [0x2800, 0x28ff], [0xa000, 0xa48f], [0x1700, 0x171f, 0x1720, 0x173f, 0x1740, 0x175f, 0x1760, 0x177f], [0x10300, 0x1032f], [0x10330, 0x1034f], [0x10400, 0x1044f], [0x1d000, 0x1d0ff, 0x1d100, 0x1d1ff, 0x1d200, 0x1d24f], [0x1d400, 0x1d7ff], [0xff000, 0xffffd], [0xfe00, 0xfe0f, 0xe0100, 0xe01ef], [0xe0000, 0xe007f], [0x1900, 0x194f], [0x1950, 0x197f], [0x1980, 0x19df], [0x1a00, 0x1a1f], [0x2c00, 0x2c5f], [0x2d30, 0x2d7f], [0x4dc0, 0x4dff], [0xa800, 0xa82f], [0x10000, 0x1007f, 0x10080, 0x100ff, 0x10100, 0x1013f], [0x10140, 0x1018f], [0x10380, 0x1039f], [0x103a0, 0x103df], [0x10450, 0x1047f], [0x10480, 0x104af], [0x10800, 0x1083f], [0x10a00, 0x10a5f], [0x1d300, 0x1d35f], [0x12000, 0x123ff, 0x12400, 0x1247f], [0x1d360, 0x1d37f], [0x1b80, 0x1bbf], [0x1c00, 0x1c4f], [0x1c50, 0x1c7f], [0xa880, 0xa8df], [0xa900, 0xa92f], [0xa930, 0xa95f], [0xaa00, 0xaa5f], [0x10190, 0x101cf], [0x101d0, 0x101ff], [0x102a0, 0x102df, 0x10280, 0x1029f, 0x10920, 0x1093f], [0x1f030, 0x1f09f, 0x1f000, 0x1f02f]]; 16470function getUnicodeRangeFor(value, lastPosition = -1) { 16471 if (lastPosition !== -1) { 16472 const range = UnicodeRanges[lastPosition]; 16473 for (let i = 0, ii = range.length; i < ii; i += 2) { 16474 if (value >= range[i] && value <= range[i + 1]) { 16475 return lastPosition; 16476 } 16477 } 16478 } 16479 for (let i = 0, ii = UnicodeRanges.length; i < ii; i++) { 16480 const range = UnicodeRanges[i]; 16481 for (let j = 0, jj = range.length; j < jj; j += 2) { 16482 if (value >= range[j] && value <= range[j + 1]) { 16483 return i; 16484 } 16485 } 16486 } 16487 return -1; 16488} 16489const SpecialCharRegExp = new RegExp("^(\\s)|(\\p{Mn})|(\\p{Cf})$", "u"); 16490const CategoryCache = new Map(); 16491function getCharUnicodeCategory(char) { 16492 const cachedCategory = CategoryCache.get(char); 16493 if (cachedCategory) { 16494 return cachedCategory; 16495 } 16496 const groups = char.match(SpecialCharRegExp); 16497 const category = { 16498 isWhitespace: !!groups?.[1], 16499 isZeroWidthDiacritic: !!groups?.[2], 16500 isInvisibleFormatMark: !!groups?.[3] 16501 }; 16502 CategoryCache.set(char, category); 16503 return category; 16504} 16505function clearUnicodeCaches() { 16506 CategoryCache.clear(); 16507} 16508 16509;// ./src/core/fonts_utils.js 16510 16511 16512 16513 16514
16515const SEAC_ANALYSIS_ENABLED = true; 16516const FontFlags = { 16517 FixedPitch: 1, 16518 Serif: 2, 16519 Symbolic: 4, 16520 Script: 8, 16521 Nonsymbolic: 32, 16522 Italic: 64, 16523 AllCap: 65536, 16524 SmallCap: 131072, 16525 ForceBold: 262144 16526}; 16527const MacStandardGlyphOrdering = [".notdef", ".null", "nonmarkingreturn", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quotesingle", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "grave", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "Adieresis", "Aring", "Ccedilla", "Eacute", "Ntilde", "Odieresis", "Udieresis", "aacute", "agrave", "acircumflex", "adieresis", "atilde", "aring", "ccedilla", "eacute", "egrave", "ecircumflex", "edieresis", "iacute", "igrave", "icircumflex", "idieresis", "ntilde", "oacute", "ograve", "ocircumflex", "odieresis", "otilde", "uacute", "ugrave", "ucircumflex", "udieresis", "dagger", "degree", "cent", "sterling", "section", "bullet", "paragraph", "germandbls", "registered", "copyright", "trademark", "acute", "dieresis", "notequal", "AE", "Oslash", "infinity", "plusminus", "lessequal", "greaterequal", "yen", "mu", "partialdiff", "summation", "product", "pi", "integral", "ordfeminine", "ordmasculine", "Omega", "ae", "oslash", "questiondown", "exclamdown", "logicalnot", "radical", "florin", "approxequal", "Delta", "guillemotleft", "guillemotright", "ellipsis", "nonbreakingspace", "Agrave", "Atilde", "Otilde", "OE", "oe", "endash", "emdash", "quotedblleft", "quotedblright", "quoteleft", "quoteright", "divide", "lozenge", "ydieresis", "Ydieresis", "fraction", "currency", "guilsinglleft", "guilsinglright", "fi", "fl", "daggerdbl", "periodce
vendor: 3,873 bytes, lines 16527-16627
16527ntered", "quotesinglbase", "quotedblbase", "perthousand", "Acircumflex", "Ecircumflex", "Aacute", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Oacute", "Ocircumflex", "apple", "Ograve", "Uacute", "Ucircumflex", "Ugrave", "dotlessi", "circumflex", "tilde", "macron", "breve", "dotaccent", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "Lslash", "lslash", "Scaron", "scaron", "Zcaron", "zcaron", "brokenbar", "Eth", "eth", "Yacute", "yacute", "Thorn", "thorn", "minus", "multiply", "onesuperior", "twosuperior", "threesuperior", "onehalf", "onequarter", "threequarters", "franc", "Gbreve", "gbreve", "Idotaccent", "Scedilla", "scedilla", "Cacute", "cacute", "Ccaron", "ccaron", "dcroat"]; 16528function recoverGlyphName(name, glyphsUnicodeMap) { 16529 if (glyphsUnicodeMap[name] !== undefined) { 16530 return name; 16531 } 16532 const unicode = getUnicodeForGlyph(name, glyphsUnicodeMap); 16533 if (unicode !== -1) { 16534 for (const key in glyphsUnicodeMap) { 16535 if (glyphsUnicodeMap[key] === unicode) { 16536 return key; 16537 } 16538 } 16539 } 16540 info("Unable to recover a standard glyph name for: " + name); 16541 return name; 16542} 16543function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) { 16544 const charCodeToGlyphId = Object.create(null); 16545 let glyphId, charCode, baseEncoding; 16546 const isSymbolicFont = !!(properties.flags & FontFlags.Symbolic); 16547 if (properties.isInternalFont) { 16548 baseEncoding = builtInEncoding; 16549 for (charCode = 0; charCode < baseEncoding.length; charCode++) { 16550 glyphId = glyphNames.indexOf(baseEncoding[charCode]); 16551 charCodeToGlyphId[charCode] = glyphId >= 0 ? glyphId : 0; 16552 } 16553 } else if (properties.baseEncodingName) { 16554 baseEncoding = getEncoding(properties.baseEncodingName); 16555 for (charCode = 0; charCode < baseEncoding.length; charCode++) { 16556 glyphId = glyphNames.indexOf(baseEncoding[charCode]); 16557 charCodeToGlyphId[charCode] = glyphId >= 0 ? glyphId : 0; 16558 } 16559 } else if (isSymbolicFont) { 16560 for (charCode in builtInEncoding) { 16561 charCodeToGlyphId[charCode] = builtInEncoding[charCode]; 16562 } 16563 } else { 16564 baseEncoding = StandardEncoding; 16565 for (charCode = 0; charCode < baseEncoding.length; charCode++) { 16566 glyphId = glyphNames.indexOf(baseEncoding[charCode]); 16567 charCodeToGlyphId[charCode] = glyphId >= 0 ? glyphId : 0; 16568 } 16569 } 16570 const differences = properties.differences; 16571 let glyphsUnicodeMap; 16572 if (differences) { 16573 for (charCode in differences) { 16574 const glyphName = differences[charCode]; 16575 glyphId = glyphNames.indexOf(glyphName); 16576 if (glyphId === -1) { 16577 if (!glyphsUnicodeMap) { 16578 glyphsUnicodeMap = getGlyphsUnicode(); 16579 } 16580 const standardGlyphName = recoverGlyphName(glyphName, glyphsUnicodeMap); 16581 if (standardGlyphName !== glyphName) { 16582 glyphId = glyphNames.indexOf(standardGlyphName); 16583 } 16584 } 16585 charCodeToGlyphId[charCode] = glyphId >= 0 ? glyphId : 0; 16586 } 16587 } 16588 return charCodeToGlyphId; 16589} 16590function normalizeFontName(name) { 16591 return name.replaceAll(/[,_]/g, "-").replaceAll(/\s/g, ""); 16592} 16593const getVerticalPresentationForm = getLookupTableFactory(t => { 16594 t[0x2013] = 0xfe32; 16595 t[0x2014] = 0xfe31; 16596 t[0x2025] = 0xfe30; 16597 t[0x2026] = 0xfe19; 16598 t[0x3001] = 0xfe11; 16599 t[0x3002] = 0xfe12; 16600 t[0x3008] = 0xfe3f; 16601 t[0x3009] = 0xfe40; 16602 t[0x300a] = 0xfe3d; 16603 t[0x300b] = 0xfe3e; 16604 t[0x300c] = 0xfe41; 16605 t[0x300d] = 0xfe42; 16606 t[0x300e] = 0xfe43; 16607 t[0x300f] = 0xfe44; 16608 t[0x3010] = 0xfe3b; 16609 t[0x3011] = 0xfe3c; 16610 t[0x3014] = 0xfe39; 16611 t[0x3015] = 0xfe3a; 16612 t[0x3016] = 0xfe17; 16613 t[0x3017] = 0xfe18; 16614 t[0xfe4f] = 0xfe34; 16615 t[0xff01] = 0xfe15; 16616 t[0xff08] = 0xfe35; 16617 t[0xff09] = 0xfe36; 16618 t[0xff0c] = 0xfe10; 16619 t[0xff1a] = 0xfe13; 16620 t[0xff1b] = 0xfe14; 16621 t[0xff1f] = 0xfe16; 16622 t[0xff3b] = 0xfe47; 16623 t[0xff3d] = 0xfe48; 16624 t[0xff3f] = 0xfe33; 16625 t[0xff5b] = 0xfe37; 16626 t[0xff5d] = 0xfe38; 16627});
vendor: 18,765 bytes, lines 16627-17461
16627 16628 16629;// ./src/core/standard_fonts.js 16630 16631 16632const getStdFontMap = getLookupTableFactory(function (t) { 16633 t["Times-Roman"] = "Times-Roman"; 16634 t.Helvetica = "Helvetica"; 16635 t.Courier = "Courier"; 16636 t.Symbol = "Symbol"; 16637 t["Times-Bold"] = "Times-Bold"; 16638 t["Helvetica-Bold"] = "Helvetica-Bold"; 16639 t["Courier-Bold"] = "Courier-Bold"; 16640 t.ZapfDingbats = "ZapfDingbats"; 16641 t["Times-Italic"] = "Times-Italic"; 16642 t["Helvetica-Oblique"] = "Helvetica-Oblique"; 16643 t["Courier-Oblique"] = "Courier-Oblique"; 16644 t["Times-BoldItalic"] = "Times-BoldItalic"; 16645 t["Helvetica-BoldOblique"] = "Helvetica-BoldOblique"; 16646 t["Courier-BoldOblique"] = "Courier-BoldOblique"; 16647 t.ArialNarrow = "Helvetica"; 16648 t["ArialNarrow-Bold"] = "Helvetica-Bold"; 16649 t["ArialNarrow-BoldItalic"] = "Helvetica-BoldOblique"; 16650 t["ArialNarrow-Italic"] = "Helvetica-Oblique"; 16651 t.ArialBlack = "Helvetica"; 16652 t["ArialBlack-Bold"] = "Helvetica-Bold"; 16653 t["ArialBlack-BoldItalic"] = "Helvetica-BoldOblique"; 16654 t["ArialBlack-Italic"] = "Helvetica-Oblique"; 16655 t["Arial-Black"] = "Helvetica"; 16656 t["Arial-Black-Bold"] = "Helvetica-Bold"; 16657 t["Arial-Black-BoldItalic"] = "Helvetica-BoldOblique"; 16658 t["Arial-Black-Italic"] = "Helvetica-Oblique"; 16659 t.Arial = "Helvetica"; 16660 t["Arial-Bold"] = "Helvetica-Bold"; 16661 t["Arial-BoldItalic"] = "Helvetica-BoldOblique"; 16662 t["Arial-Italic"] = "Helvetica-Oblique"; 16663 t.ArialMT = "Helvetica"; 16664 t["Arial-BoldItalicMT"] = "Helvetica-BoldOblique"; 16665 t["Arial-BoldMT"] = "Helvetica-Bold"; 16666 t["Arial-ItalicMT"] = "Helvetica-Oblique"; 16667 t["Arial-BoldItalicMT-BoldItalic"] = "Helvetica-BoldOblique"; 16668 t["Arial-BoldMT-Bold"] = "Helvetica-Bold"; 16669 t["Arial-ItalicMT-Italic"] = "Helvetica-Oblique"; 16670 t.ArialUnicodeMS = "Helvetica"; 16671 t["ArialUnicodeMS-Bold"] = "Helvetica-Bold"; 16672 t["ArialUnicodeMS-BoldItalic"] = "Helvetica-BoldOblique"; 16673 t["ArialUnicodeMS-Italic"] = "Helvetica-Oblique"; 16674 t["Courier-BoldItalic"] = "Courier-BoldOblique"; 16675 t["Courier-Italic"] = "Courier-Oblique"; 16676 t.CourierNew = "Courier"; 16677 t["CourierNew-Bold"] = "Courier-Bold"; 16678 t["CourierNew-BoldItalic"] = "Courier-BoldOblique"; 16679 t["CourierNew-Italic"] = "Courier-Oblique"; 16680 t["CourierNewPS-BoldItalicMT"] = "Courier-BoldOblique"; 16681 t["CourierNewPS-BoldMT"] = "Courier-Bold"; 16682 t["CourierNewPS-ItalicMT"] = "Courier-Oblique"; 16683 t.CourierNewPSMT = "Courier"; 16684 t["Helvetica-BoldItalic"] = "Helvetica-BoldOblique"; 16685 t["Helvetica-Italic"] = "Helvetica-Oblique"; 16686 t["HelveticaLTStd-Bold"] = "Helvetica-Bold"; 16687 t["Symbol-Bold"] = "Symbol"; 16688 t["Symbol-BoldItalic"] = "Symbol"; 16689 t["Symbol-Italic"] = "Symbol"; 16690 t.TimesNewRoman = "Times-Roman"; 16691 t["TimesNewRoman-Bold"] = "Times-Bold"; 16692 t["TimesNewRoman-BoldItalic"] = "Times-BoldItalic"; 16693 t["TimesNewRoman-Italic"] = "Times-Italic"; 16694 t.TimesNewRomanPS = "Times-Roman"; 16695 t["TimesNewRomanPS-Bold"] = "Times-Bold"; 16696 t["TimesNewRomanPS-BoldItalic"] = "Times-BoldItalic"; 16697 t["TimesNewRomanPS-BoldItalicMT"] = "Times-BoldItalic"; 16698 t["TimesNewRomanPS-BoldMT"] = "Times-Bold"; 16699 t["TimesNewRomanPS-Italic"] = "Times-Italic"; 16700 t["TimesNewRomanPS-ItalicMT"] = "Times-Italic"; 16701 t.TimesNewRomanPSMT = "Times-Roman"; 16702 t["TimesNewRomanPSMT-Bold"] = "Times-Bold"; 16703 t["TimesNewRomanPSMT-BoldItalic"] = "Times-BoldItalic"; 16704 t["TimesNewRomanPSMT-Italic"] = "Times-Italic"; 16705}); 16706const getFontNameToFileMap = getLookupTableFactory(function (t) { 16707 t.Courier = "FoxitFixed.pfb"; 16708 t["Courier-Bold"] = "FoxitFixedBold.pfb"; 16709 t["Courier-BoldOblique"] = "FoxitFixedBoldItalic.pfb"; 16710 t["Courier-Oblique"] = "FoxitFixedItalic.pfb"; 16711 t.Helvetica = "LiberationSans-Regular.ttf"; 16712 t["Helvetica-Bold"] = "LiberationSans-Bold.ttf"; 16713 t["Helvetica-BoldOblique"] = "LiberationSans-BoldItalic.ttf"; 16714 t["Helvetica-Oblique"] = "LiberationSans-Italic.ttf"; 16715 t["Times-Roman"] = "FoxitSerif.pfb"; 16716 t["Times-Bold"] = "FoxitSerifBold.pfb"; 16717 t["Times-BoldItalic"] = "FoxitSerifBoldItalic.pfb"; 16718 t["Times-Italic"] = "FoxitSerifItalic.pfb"; 16719 t.Symbol = "FoxitSymbol.pfb"; 16720 t.ZapfDingbats = "FoxitDingbats.pfb"; 16721 t["LiberationSans-Regular"] = "LiberationSans-Regular.ttf"; 16722 t["LiberationSans-Bold"] = "LiberationSans-Bold.ttf"; 16723 t["LiberationSans-Italic"] = "LiberationSans-Italic.ttf"; 16724 t["LiberationSans-BoldItalic"] = "LiberationSans-BoldItalic.ttf"; 16725}); 16726const getNonStdFontMap = getLookupTableFactory(function (t) { 16727 t.Calibri = "Helvetica"; 16728 t["Calibri-Bold"] = "Helvetica-Bold"; 16729 t["Calibri-BoldItalic"] = "Helvetica-BoldOblique"; 16730 t["Calibri-Italic"] = "Helvetica-Oblique"; 16731 t.CenturyGothic = "Helvetica"; 16732 t["CenturyGothic-Bold"] = "Helvetica-Bold"; 16733 t["CenturyGothic-BoldItalic"] = "Helvetica-BoldOblique"; 16734 t["CenturyGothic-Italic"] = "Helvetica-Oblique"; 16735 t.ComicSansMS = "Comic Sans MS"; 16736 t["ComicSansMS-Bold"] = "Comic Sans MS-Bold"; 16737 t["ComicSansMS-BoldItalic"] = "Comic Sans MS-BoldItalic"; 16738 t["ComicSansMS-Italic"] = "Comic Sans MS-Italic"; 16739 t.GillSansMT = "Helvetica"; 16740 t["GillSansMT-Bold"] = "Helvetica-Bold"; 16741 t["GillSansMT-BoldItalic"] = "Helvetica-BoldOblique"; 16742 t["GillSansMT-Italic"] = "Helvetica-Oblique"; 16743 t.Impact = "Helvetica"; 16744 t["ItcSymbol-Bold"] = "Helvetica-Bold"; 16745 t["ItcSymbol-BoldItalic"] = "Helvetica-BoldOblique"; 16746 t["ItcSymbol-Book"] = "Helvetica"; 16747 t["ItcSymbol-BookItalic"] = "Helvetica-Oblique"; 16748 t["ItcSymbol-Medium"] = "Helvetica"; 16749 t["ItcSymbol-MediumItalic"] = "Helvetica-Oblique"; 16750 t.LucidaConsole = "Courier"; 16751 t["LucidaConsole-Bold"] = "Courier-Bold"; 16752 t["LucidaConsole-BoldItalic"] = "Courier-BoldOblique"; 16753 t["LucidaConsole-Italic"] = "Courier-Oblique"; 16754 t["LucidaSans-Demi"] = "Helvetica-Bold"; 16755 t["MS-Gothic"] = "MS Gothic"; 16756 t["MS-Gothic-Bold"] = "MS Gothic-Bold"; 16757 t["MS-Gothic-BoldItalic"] = "MS Gothic-BoldItalic"; 16758 t["MS-Gothic-Italic"] = "MS Gothic-Italic"; 16759 t["MS-Mincho"] = "MS Mincho"; 16760 t["MS-Mincho-Bold"] = "MS Mincho-Bold"; 16761 t["MS-Mincho-BoldItalic"] = "MS Mincho-BoldItalic"; 16762 t["MS-Mincho-Italic"] = "MS Mincho-Italic"; 16763 t["MS-PGothic"] = "MS PGothic"; 16764 t["MS-PGothic-Bold"] = "MS PGothic-Bold"; 16765 t["MS-PGothic-BoldItalic"] = "MS PGothic-BoldItalic"; 16766 t["MS-PGothic-Italic"] = "MS PGothic-Italic"; 16767 t["MS-PMincho"] = "MS PMincho"; 16768 t["MS-PMincho-Bold"] = "MS PMincho-Bold"; 16769 t["MS-PMincho-BoldItalic"] = "MS PMincho-BoldItalic"; 16770 t["MS-PMincho-Italic"] = "MS PMincho-Italic"; 16771 t.NuptialScript = "Times-Italic"; 16772 t.SegoeUISymbol = "Helvetica"; 16773}); 16774const getSerifFonts = getLookupTableFactory(function (t) { 16775 t["Adobe Jenson"] = true; 16776 t["Adobe Text"] = true; 16777 t.Albertus = true; 16778 t.Aldus = true; 16779 t.Alexandria = true; 16780 t.Algerian = true; 16781 t["American Typewriter"] = true; 16782 t.Antiqua = true; 16783 t.Apex = true; 16784 t.Arno = true; 16785 t.Aster = true; 16786 t.Aurora = true; 16787 t.Baskerville = true; 16788 t.Bell = true; 16789 t.Bembo = true; 16790 t["Bembo Schoolbook"] = true; 16791 t.Benguiat = true; 16792 t["Berkeley Old Style"] = true; 16793 t["Bernhard Modern"] = true; 16794 t["Berthold City"] = true; 16795 t.Bodoni = true; 16796 t["Bauer Bodoni"] = true; 16797 t["Book Antiqua"] = true; 16798 t.Bookman = true; 16799 t["Bordeaux Roman"] = true; 16800 t["Californian FB"] = true; 16801 t.Calisto = true; 16802 t.Calvert = true; 16803 t.Capitals = true; 16804 t.Cambria = true; 16805 t.Cartier = true; 16806 t.Caslon = true; 16807 t.Catull = true; 16808 t.Centaur = true; 16809 t["Century Old Style"] = true; 16810 t["Century Schoolbook"] = true; 16811 t.Chaparral = true; 16812 t["Charis SIL"] = true; 16813 t.Cheltenham = true; 16814 t["Cholla Slab"] = true; 16815 t.Clarendon = true; 16816 t.Clearface = true; 16817 t.Cochin = true; 16818 t.Colonna = true; 16819 t["Computer Modern"] = true; 16820 t["Concrete Roman"] = true; 16821 t.Constantia = true; 16822 t["Cooper Black"] = true; 16823 t.Corona = true; 16824 t.Ecotype = true; 16825 t.Egyptienne = true; 16826 t.Elephant = true; 16827 t.Excelsior = true; 16828 t.Fairfield = true; 16829 t["FF Scala"] = true; 16830 t.Folkard = true; 16831 t.Footlight = true; 16832 t.FreeSerif = true; 16833 t["Friz Quadrata"] = true; 16834 t.Garamond = true; 16835 t.Gentium = true; 16836 t.Georgia = true; 16837 t.Gloucester = true; 16838 t["Goudy Old Style"] = true; 16839 t["Goudy Schoolbook"] = true; 16840 t["Goudy Pro Font"] = true; 16841 t.Granjon = true; 16842 t["Guardian Egyptian"] = true; 16843 t.Heather = true; 16844 t.Hercules = true; 16845 t["High Tower Text"] = true; 16846 t.Hiroshige = true; 16847 t["Hoefler Text"] = true; 16848 t["Humana Serif"] = true; 16849 t.Imprint = true; 16850 t["Ionic No. 5"] = true; 16851 t.Janson = true; 16852 t.Joanna = true; 16853 t.Korinna = true; 16854 t.Lexicon = true; 16855 t.LiberationSerif = true; 16856 t["Liberation Serif"] = true; 16857 t["Linux Libertine"] = true; 16858 t.Literaturnaya = true; 16859 t.Lucida = true; 16860 t["Lucida Bright"] = true; 16861 t.Melior = true; 16862 t.Memphis = true; 16863 t.Miller = true; 16864 t.Minion = true; 16865 t.Modern = true; 16866 t["Mona Lisa"] = true; 16867 t["Mrs Eaves"] = true; 16868 t["MS Serif"] = true; 16869 t["Museo Slab"] = true; 16870 t["New York"] = true; 16871 t["Nimbus Roman"] = true; 16872 t["NPS Rawlinson Roadway"] = true; 16873 t.NuptialScript = true; 16874 t.Palatino = true; 16875 t.Perpetua = true; 16876 t.Plantin = true; 16877 t["Plantin Schoolbook"] = true; 16878 t.Playbill = true; 16879 t["Poor Richard"] = true; 16880 t["Rawlinson Roadway"] = true; 16881 t.Renault = true; 16882 t.Requiem = true; 16883 t.Rockwell = true; 16884 t.Roman = true; 16885 t["Rotis Serif"] = true; 16886 t.Sabon = true; 16887 t.Scala = true; 16888 t.Seagull = true; 16889 t.Sistina = true; 16890 t.Souvenir = true; 16891 t.STIX = true; 16892 t["Stone Informal"] = true; 16893 t["Stone Serif"] = true; 16894 t.Sylfaen = true; 16895 t.Times = true; 16896 t.Trajan = true; 16897 t["Trinité"] = true; 16898 t["Trump Mediaeval"] = true; 16899 t.Utopia = true; 16900 t["Vale Type"] = true; 16901 t["Bitstream Vera"] = true; 16902 t["Vera Serif"] = true; 16903 t.Versailles = true; 16904 t.Wanted = true; 16905 t.Weiss = true; 16906 t["Wide Latin"] = true; 16907 t.Windsor = true; 16908 t.XITS = true; 16909}); 16910const getSymbolsFonts = getLookupTableFactory(function (t) { 16911 t.Dingbats = true; 16912 t.Symbol = true; 16913 t.ZapfDingbats = true; 16914 t.Wingdings = true; 16915 t["Wingdings-Bold"] = true; 16916 t["Wingdings-Regular"] = true; 16917}); 16918const getGlyphMapForStandardFonts = getLookupTableFactory(function (t) { 16919 t[2] = 10; 16920 t[3] = 32; 16921 t[4] = 33; 16922 t[5] = 34; 16923 t[6] = 35; 16924 t[7] = 36; 16925 t[8] = 37; 16926 t[9] = 38; 16927 t[10] = 39; 16928 t[11] = 40; 16929 t[12] = 41; 16930 t[13] = 42; 16931 t[14] = 43; 16932 t[15] = 44; 16933 t[16] = 45; 16934 t[17] = 46; 16935 t[18] = 47; 16936 t[19] = 48; 16937 t[20] = 49; 16938 t[21] = 50; 16939 t[22] = 51; 16940 t[23] = 52; 16941 t[24] = 53; 16942 t[25] = 54; 16943 t[26] = 55; 16944 t[27] = 56; 16945 t[28] = 57; 16946 t[29] = 58; 16947 t[30] = 894; 16948 t[31] = 60; 16949 t[32] = 61; 16950 t[33] = 62; 16951 t[34] = 63; 16952 t[35] = 64; 16953 t[36] = 65; 16954 t[37] = 66; 16955 t[38] = 67; 16956 t[39] = 68; 16957 t[40] = 69; 16958 t[41] = 70; 16959 t[42] = 71; 16960 t[43] = 72; 16961 t[44] = 73; 16962 t[45] = 74; 16963 t[46] = 75; 16964 t[47] = 76; 16965 t[48] = 77; 16966 t[49] = 78; 16967 t[50] = 79; 16968 t[51] = 80; 16969 t[52] = 81; 16970 t[53] = 82; 16971 t[54] = 83; 16972 t[55] = 84; 16973 t[56] = 85; 16974 t[57] = 86; 16975 t[58] = 87; 16976 t[59] = 88; 16977 t[60] = 89; 16978 t[61] = 90; 16979 t[62] = 91; 16980 t[63] = 92; 16981 t[64] = 93; 16982 t[65] = 94; 16983 t[66] = 95; 16984 t[67] = 96; 16985 t[68] = 97; 16986 t[69] = 98; 16987 t[70] = 99; 16988 t[71] = 100; 16989 t[72] = 101; 16990 t[73] = 102; 16991 t[74] = 103; 16992 t[75] = 104; 16993 t[76] = 105; 16994 t[77] = 106; 16995 t[78] = 107; 16996 t[79] = 108; 16997 t[80] = 109; 16998 t[81] = 110; 16999 t[82] = 111; 17000 t[83] = 112; 17001 t[84] = 113; 17002 t[85] = 114; 17003 t[86] = 115; 17004 t[87] = 116; 17005 t[88] = 117; 17006 t[89] = 118; 17007 t[90] = 119; 17008 t[91] = 120; 17009 t[92] = 121; 17010 t[93] = 122; 17011 t[94] = 123; 17012 t[95] = 124; 17013 t[96] = 125; 17014 t[97] = 126; 17015 t[98] = 196; 17016 t[99] = 197; 17017 t[100] = 199; 17018 t[101] = 201; 17019 t[102] = 209; 17020 t[103] = 214; 17021 t[104] = 220; 17022 t[105] = 225; 17023 t[106] = 224; 17024 t[107] = 226; 17025 t[108] = 228; 17026 t[109] = 227; 17027 t[110] = 229; 17028 t[111] = 231; 17029 t[112] = 233; 17030 t[113] = 232; 17031 t[114] = 234; 17032 t[115] = 235; 17033 t[116] = 237; 17034 t[117] = 236; 17035 t[118] = 238; 17036 t[119] = 239; 17037 t[120] = 241; 17038 t[121] = 243; 17039 t[122] = 242; 17040 t[123] = 244; 17041 t[124] = 246; 17042 t[125] = 245; 17043 t[126] = 250; 17044 t[127] = 249; 17045 t[128] = 251; 17046 t[129] = 252; 17047 t[130] = 8224; 17048 t[131] = 176; 17049 t[132] = 162; 17050 t[133] = 163; 17051 t[134] = 167; 17052 t[135] = 8226; 17053 t[136] = 182; 17054 t[137] = 223; 17055 t[138] = 174; 17056 t[139] = 169; 17057 t[140] = 8482; 17058 t[141] = 180; 17059 t[142] = 168; 17060 t[143] = 8800; 17061 t[144] = 198; 17062 t[145] = 216; 17063 t[146] = 8734; 17064 t[147] = 177; 17065 t[148] = 8804; 17066 t[149] = 8805; 17067 t[150] = 165; 17068 t[151] = 181; 17069 t[152] = 8706; 17070 t[153] = 8721; 17071 t[154] = 8719; 17072 t[156] = 8747; 17073 t[157] = 170; 17074 t[158] = 186; 17075 t[159] = 8486; 17076 t[160] = 230; 17077 t[161] = 248; 17078 t[162] = 191; 17079 t[163] = 161; 17080 t[164] = 172; 17081 t[165] = 8730; 17082 t[166] = 402; 17083 t[167] = 8776; 17084 t[168] = 8710; 17085 t[169] = 171; 17086 t[170] = 187; 17087 t[171] = 8230; 17088 t[179] = 8220; 17089 t[180] = 8221; 17090 t[181] = 8216; 17091 t[182] = 8217; 17092 t[200] = 193; 17093 t[203] = 205; 17094 t[207] = 211; 17095 t[210] = 218; 17096 t[223] = 711; 17097 t[224] = 321; 17098 t[225] = 322; 17099 t[226] = 352; 17100 t[227] = 353; 17101 t[228] = 381; 17102 t[229] = 382; 17103 t[233] = 221; 17104 t[234] = 253; 17105 t[252] = 263; 17106 t[253] = 268; 17107 t[254] = 269; 17108 t[258] = 258; 17109 t[260] = 260; 17110 t[261] = 261; 17111 t[265] = 280; 17112 t[266] = 281; 17113 t[267] = 282; 17114 t[268] = 283; 17115 t[269] = 313; 17116 t[275] = 323; 17117 t[276] = 324; 17118 t[278] = 328; 17119 t[283] = 344; 17120 t[284] = 345; 17121 t[285] = 346; 17122 t[286] = 347; 17123 t[292] = 367; 17124 t[295] = 377; 17125 t[296] = 378; 17126 t[298] = 380; 17127 t[305] = 963; 17128 t[306] = 964; 17129 t[307] = 966; 17130 t[308] = 8215; 17131 t[309] = 8252; 17132 t[310] = 8319; 17133 t[311] = 8359; 17134 t[312] = 8592; 17135 t[313] = 8593; 17136 t[337] = 9552; 17137 t[493] = 1039; 17138 t[494] = 1040; 17139 t[672] = 1488; 17140 t[673] = 1489; 17141 t[674] = 1490; 17142 t[675] = 1491; 17143 t[676] = 1492; 17144 t[677] = 1493; 17145 t[678] = 1494; 17146 t[679] = 1495; 17147 t[680] = 1496; 17148 t[681] = 1497; 17149 t[682] = 1498; 17150 t[683] = 1499; 17151 t[684] = 1500; 17152 t[685] = 1501; 17153 t[686] = 1502; 17154 t[687] = 1503; 17155 t[688] = 1504; 17156 t[689] = 1505; 17157 t[690] = 1506; 17158 t[691] = 1507; 17159 t[692] = 1508; 17160 t[693] = 1509; 17161 t[694] = 1510; 17162 t[695] = 1511; 17163 t[696] = 1512; 17164 t[697] = 1513; 17165 t[698] = 1514; 17166 t[705] = 1524; 17167 t[706] = 8362; 17168 t[710] = 64288; 17169 t[711] = 64298; 17170 t[759] = 1617; 17171 t[761] = 1776; 17172 t[763] = 1778; 17173 t[775] = 1652; 17174 t[777] = 1764; 17175 t[778] = 1780; 17176 t[779] = 1781; 17177 t[780] = 1782; 17178 t[782] = 771; 17179 t[783] = 64726; 17180 t[786] = 8363; 17181 t[788] = 8532; 17182 t[790] = 768; 17183 t[791] = 769; 17184 t[792] = 768; 17185 t[795] = 803; 17186 t[797] = 64336; 17187 t[798] = 64337; 17188 t[799] = 64342; 17189 t[800] = 64343; 17190 t[801] = 64344; 17191 t[802] = 64345; 17192 t[803] = 64362; 17193 t[804] = 64363; 17194 t[805] = 64364; 17195 t[2424] = 7821; 17196 t[2425] = 7822; 17197 t[2426] = 7823; 17198 t[2427] = 7824; 17199 t[2428] = 7825; 17200 t[2429] = 7826; 17201 t[2430] = 7827; 17202 t[2433] = 7682; 17203 t[2678] = 8045; 17204 t[2679] = 8046; 17205 t[2830] = 1552; 17206 t[2838] = 686; 17207 t[2840] = 751; 17208 t[2842] = 753; 17209 t[2843] = 754; 17210 t[2844] = 755; 17211 t[2846] = 757; 17212 t[2856] = 767; 17213 t[2857] = 848; 17214 t[2858] = 849; 17215 t[2862] = 853; 17216 t[2863] = 854; 17217 t[2864] = 855; 17218 t[2865] = 861; 17219 t[2866] = 862; 17220 t[2906] = 7460; 17221 t[2908] = 7462; 17222 t[2909] = 7463; 17223 t[2910] = 7464; 17224 t[2912] = 7466; 17225 t[2913] = 7467; 17226 t[2914] = 7468; 17227 t[2916] = 7470; 17228 t[2917] = 7471; 17229 t[2918] = 7472; 17230 t[2920] = 7474; 17231 t[2921] = 7475; 17232 t[2922] = 7476; 17233 t[2924] = 7478; 17234 t[2925] = 7479; 17235 t[2926] = 7480; 17236 t[2928] = 7482; 17237 t[2929] = 7483; 17238 t[2930] = 7484; 17239 t[2932] = 7486; 17240 t[2933] = 7487; 17241 t[2934] = 7488; 17242 t[2936] = 7490; 17243 t[2937] = 7491; 17244 t[2938] = 7492; 17245 t[2940] = 7494; 17246 t[2941] = 7495; 17247 t[2942] = 7496; 17248 t[2944] = 7498; 17249 t[2946] = 7500; 17250 t[2948] = 7502; 17251 t[2950] = 7504; 17252 t[2951] = 7505; 17253 t[2952] = 7506; 17254 t[2954] = 7508; 17255 t[2955] = 7509; 17256 t[2956] = 7510; 17257 t[2958] = 7512; 17258 t[2959] = 7513; 17259 t[2960] = 7514; 17260 t[2962] = 7516; 17261 t[2963] = 7517; 17262 t[2964] = 7518; 17263 t[2966] = 7520; 17264 t[2967] = 7521; 17265 t[2968] = 7522; 17266 t[2970] = 7524; 17267 t[2971] = 7525; 17268 t[2972] = 7526; 17269 t[2974] = 7528; 17270 t[2975] = 7529; 17271 t[2976] = 7530; 17272 t[2978] = 1537; 17273 t[2979] = 1538; 17274 t[2980] = 1539; 17275 t[2982] = 1549; 17276 t[2983] = 1551; 17277 t[2984] = 1552; 17278 t[2986] = 1554; 17279 t[2987] = 1555; 17280 t[2988] = 1556; 17281 t[2990] = 1623; 17282 t[2991] = 1624; 17283 t[2995] = 1775; 17284 t[2999] = 1791; 17285 t[3002] = 64290; 17286 t[3003] = 64291; 17287 t[3004] = 64292; 17288 t[3006] = 64294; 17289 t[3007] = 64295; 17290 t[3008] = 64296; 17291 t[3011] = 1900; 17292 t[3014] = 8223; 17293 t[3015] = 8244; 17294 t[3017] = 7532; 17295 t[3018] = 7533; 17296 t[3019] = 7534; 17297 t[3075] = 7590; 17298 t[3076] = 7591; 17299 t[3079] = 7594; 17300 t[3080] = 7595; 17301 t[3083] = 7598; 17302 t[3084] = 7599; 17303 t[3087] = 7602; 17304 t[3088] = 7603; 17305 t[3091] = 7606; 17306 t[3092] = 7607; 17307 t[3095] = 7610; 17308 t[3096] = 7611; 17309 t[3099] = 7614; 17310 t[3100] = 7615; 17311 t[3103] = 7618; 17312 t[3104] = 7619; 17313 t[3107] = 8337; 17314 t[3108] = 8338; 17315 t[3116] = 1884; 17316 t[3119] = 1885; 17317 t[3120] = 1885; 17318 t[3123] = 1886; 17319 t[3124] = 1886; 17320 t[3127] = 1887; 17321 t[3128] = 1887; 17322 t[3131] = 1888; 17323 t[3132] = 1888; 17324 t[3135] = 1889; 17325 t[3136] = 1889; 17326 t[3139] = 1890; 17327 t[3140] = 1890; 17328 t[3143] = 1891; 17329 t[3144] = 1891; 17330 t[3147] = 1892; 17331 t[3148] = 1892; 17332 t[3153] = 580; 17333 t[3154] = 581; 17334 t[3157] = 584; 17335 t[3158] = 585; 17336 t[3161] = 588; 17337 t[3162] = 589; 17338 t[3165] = 891; 17339 t[3166] = 892; 17340 t[3169] = 1274; 17341 t[3170] = 1275; 17342 t[3173] = 1278; 17343 t[3174] = 1279; 17344 t[3181] = 7622; 17345 t[3182] = 7623; 17346 t[3282] = 11799; 17347 t[3316] = 578; 17348 t[3379] = 42785; 17349 t[3393] = 1159; 17350 t[3416] = 8377; 17351}); 17352const getSupplementalGlyphMapForArialBlack = getLookupTableFactory(function (t) { 17353 t[227] = 322; 17354 t[264] = 261; 17355 t[291] = 346; 17356}); 17357const getSupplementalGlyphMapForCalibri = getLookupTableFactory(function (t) { 17358 t[1] = 32; 17359 t[4] = 65; 17360 t[5] = 192; 17361 t[6] = 193; 17362 t[9] = 196; 17363 t[17] = 66; 17364 t[18] = 67; 17365 t[21] = 268; 17366 t[24] = 68; 17367 t[28] = 69; 17368 t[29] = 200; 17369 t[30] = 201; 17370 t[32] = 282; 17371 t[38] = 70; 17372 t[39] = 71; 17373 t[44] = 72; 17374 t[47] = 73; 17375 t[48] = 204; 17376 t[49] = 205; 17377 t[58] = 74; 17378 t[60] = 75; 17379 t[62] = 76; 17380 t[68] = 77; 17381 t[69] = 78; 17382 t[75] = 79; 17383 t[76] = 210; 17384 t[80] = 214; 17385 t[87] = 80; 17386 t[89] = 81; 17387 t[90] = 82; 17388 t[92] = 344; 17389 t[94] = 83; 17390 t[97] = 352; 17391 t[100] = 84; 17392 t[104] = 85; 17393 t[109] = 220; 17394 t[115] = 86; 17395 t[116] = 87; 17396 t[121] = 88; 17397 t[122] = 89; 17398 t[124] = 221; 17399 t[127] = 90; 17400 t[129] = 381; 17401 t[258] = 97; 17402 t[259] = 224; 17403 t[260] = 225; 17404 t[263] = 228; 17405 t[268] = 261; 17406 t[271] = 98; 17407 t[272] = 99; 17408 t[273] = 263; 17409 t[275] = 269; 17410 t[282] = 100; 17411 t[286] = 101; 17412 t[287] = 232; 17413 t[288] = 233; 17414 t[290] = 283; 17415 t[295] = 281; 17416 t[296] = 102; 17417 t[336] = 103; 17418 t[346] = 104; 17419 t[349] = 105; 17420 t[350] = 236; 17421 t[351] = 237; 17422 t[361] = 106; 17423 t[364] = 107; 17424 t[367] = 108; 17425 t[371] = 322; 17426 t[373] = 109; 17427 t[374] = 110; 17428 t[381] = 111; 17429 t[382] = 242; 17430 t[383] = 243; 17431 t[386] = 246; 17432 t[393] = 112; 17433 t[395] = 113; 17434 t[396] = 114; 17435 t[398] = 345; 17436 t[400] = 115; 17437 t[401] = 347; 17438 t[403] = 353; 17439 t[410] = 116; 17440 t[437] = 117; 17441 t[442] = 252; 17442 t[448] = 118; 17443 t[449] = 119; 17444 t[454] = 120; 17445 t[455] = 121; 17446 t[457] = 253; 17447 t[460] = 122; 17448 t[462] = 382; 17449 t[463] = 380; 17450 t[853] = 44; 17451 t[855] = 58; 17452 t[856] = 46; 17453 t[876] = 47; 17454 t[878] = 45; 17455 t[882] = 45; 17456 t[894] = 40; 17457 t[895] = 41; 17458 t[896] = 91; 17459 t[897] = 93; 17460 t[923] = 64; 17461 t[
vendor: 13,040 bytes, lines 17461-17959
174611004] = 48; 17462 t[1005] = 49; 17463 t[1006] = 50; 17464 t[1007] = 51; 17465 t[1008] = 52; 17466 t[1009] = 53; 17467 t[1010] = 54; 17468 t[1011] = 55; 17469 t[1012] = 56; 17470 t[1013] = 57; 17471 t[1081] = 37; 17472 t[1085] = 43; 17473 t[1086] = 45; 17474}); 17475function getStandardFontName(name) { 17476 const fontName = normalizeFontName(name); 17477 const stdFontMap = getStdFontMap(); 17478 return stdFontMap[fontName]; 17479} 17480function isKnownFontName(name) { 17481 const fontName = normalizeFontName(name); 17482 return !!(getStdFontMap()[fontName] || getNonStdFontMap()[fontName] || getSerifFonts()[fontName] || getSymbolsFonts()[fontName]); 17483} 17484 17485;// ./src/core/to_unicode_map.js 17486 17487class ToUnicodeMap { 17488 constructor(cmap = []) { 17489 this._map = cmap; 17490 } 17491 get length() { 17492 return this._map.length; 17493 } 17494 forEach(callback) { 17495 for (const charCode in this._map) { 17496 callback(charCode, this._map[charCode].codePointAt(0)); 17497 } 17498 } 17499 has(i) { 17500 return this._map[i] !== undefined; 17501 } 17502 get(i) { 17503 return this._map[i]; 17504 } 17505 charCodeOf(value) { 17506 const map = this._map; 17507 if (map.length <= 0x10000) { 17508 return map.indexOf(value); 17509 } 17510 for (const charCode in map) { 17511 if (map[charCode] === value) { 17512 return charCode | 0; 17513 } 17514 } 17515 return -1; 17516 } 17517 amend(map) { 17518 for (const charCode in map) { 17519 this._map[charCode] = map[charCode]; 17520 } 17521 } 17522} 17523class IdentityToUnicodeMap { 17524 constructor(firstChar, lastChar) { 17525 this.firstChar = firstChar; 17526 this.lastChar = lastChar; 17527 } 17528 get length() { 17529 return this.lastChar + 1 - this.firstChar; 17530 } 17531 forEach(callback) { 17532 for (let i = this.firstChar, ii = this.lastChar; i <= ii; i++) { 17533 callback(i, i); 17534 } 17535 } 17536 has(i) { 17537 return this.firstChar <= i && i <= this.lastChar; 17538 } 17539 get(i) { 17540 if (this.firstChar <= i && i <= this.lastChar) { 17541 return String.fromCharCode(i); 17542 } 17543 return undefined; 17544 } 17545 charCodeOf(v) { 17546 return Number.isInteger(v) && v >= this.firstChar && v <= this.lastChar ? v : -1; 17547 } 17548 amend(map) { 17549 unreachable("Should not call amend()"); 17550 } 17551} 17552 17553;// ./src/core/cff_font.js 17554 17555 17556 17557class CFFFont { 17558 constructor(file, properties) { 17559 this.properties = properties; 17560 const parser = new CFFParser(file, properties, SEAC_ANALYSIS_ENABLED); 17561 this.cff = parser.parse(); 17562 this.cff.duplicateFirstGlyph(); 17563 const compiler = new CFFCompiler(this.cff); 17564 this.seacs = this.cff.seacs; 17565 try { 17566 this.data = compiler.compile(); 17567 } catch { 17568 warn("Failed to compile font " + properties.loadedName); 17569 this.data = file; 17570 } 17571 this._createBuiltInEncoding(); 17572 } 17573 get numGlyphs() { 17574 return this.cff.charStrings.count; 17575 } 17576 getCharset() { 17577 return this.cff.charset.charset; 17578 } 17579 getGlyphMapping() { 17580 const cff = this.cff; 17581 const properties = this.properties; 17582 const { 17583 cidToGidMap, 17584 cMap 17585 } = properties; 17586 const charsets = cff.charset.charset; 17587 let charCodeToGlyphId; 17588 let glyphId; 17589 if (properties.composite) { 17590 let invCidToGidMap; 17591 if (cidToGidMap?.length > 0) { 17592 invCidToGidMap = Object.create(null); 17593 for (let i = 0, ii = cidToGidMap.length; i < ii; i++) { 17594 const gid = cidToGidMap[i]; 17595 if (gid !== undefined) { 17596 invCidToGidMap[gid] = i; 17597 } 17598 } 17599 } 17600 charCodeToGlyphId = Object.create(null); 17601 let charCode; 17602 if (cff.isCIDFont) { 17603 for (glyphId = 0; glyphId < charsets.length; glyphId++) { 17604 const cid = charsets[glyphId]; 17605 charCode = cMap.charCodeOf(cid); 17606 if (invCidToGidMap?.[charCode] !== undefined) { 17607 charCode = invCidToGidMap[charCode]; 17608 } 17609 charCodeToGlyphId[charCode] = glyphId; 17610 } 17611 } else { 17612 for (glyphId = 0; glyphId < cff.charStrings.count; glyphId++) { 17613 charCode = cMap.charCodeOf(glyphId); 17614 charCodeToGlyphId[charCode] = glyphId; 17615 } 17616 } 17617 return charCodeToGlyphId; 17618 } 17619 let encoding = cff.encoding ? cff.encoding.encoding : null; 17620 if (properties.isInternalFont) { 17621 encoding = properties.defaultEncoding; 17622 } 17623 charCodeToGlyphId = type1FontGlyphMapping(properties, encoding, charsets); 17624 return charCodeToGlyphId; 17625 } 17626 hasGlyphId(id) { 17627 return this.cff.hasGlyphId(id); 17628 } 17629 _createBuiltInEncoding() { 17630 const { 17631 charset, 17632 encoding 17633 } = this.cff; 17634 if (!charset || !encoding) { 17635 return; 17636 } 17637 const charsets = charset.charset, 17638 encodings = encoding.encoding; 17639 const map = []; 17640 for (const charCode in encodings) { 17641 const glyphId = encodings[charCode]; 17642 if (glyphId >= 0) { 17643 const glyphName = charsets[glyphId]; 17644 if (glyphName) { 17645 map[charCode] = glyphName; 17646 } 17647 } 17648 } 17649 if (map.length > 0) { 17650 this.properties.builtInEncoding = map; 17651 } 17652 } 17653} 17654 17655;// ./src/core/font_renderer.js 17656 17657 17658 17659 17660 17661 17662function getUint32(data, offset) { 17663 return (data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]) >>> 0; 17664} 17665function getUint16(data, offset) { 17666 return data[offset] << 8 | data[offset + 1]; 17667} 17668function getInt16(data, offset) { 17669 return (data[offset] << 24 | data[offset + 1] << 16) >> 16; 17670} 17671function getInt8(data, offset) { 17672 return data[offset] << 24 >> 24; 17673} 17674function getFloat214(data, offset) { 17675 return getInt16(data, offset) / 16384; 17676} 17677function getSubroutineBias(subrs) { 17678 const numSubrs = subrs.length; 17679 let bias = 32768; 17680 if (numSubrs < 1240) { 17681 bias = 107; 17682 } else if (numSubrs < 33900) { 17683 bias = 1131; 17684 } 17685 return bias; 17686} 17687function parseCmap(data, start, end) { 17688 const offset = getUint16(data, start + 2) === 1 ? getUint32(data, start + 8) : getUint32(data, start + 16); 17689 const format = getUint16(data, start + offset); 17690 let ranges, p, i; 17691 if (format === 4) { 17692 getUint16(data, start + offset + 2); 17693 const segCount = getUint16(data, start + offset + 6) >> 1; 17694 p = start + offset + 14; 17695 ranges = []; 17696 for (i = 0; i < segCount; i++, p += 2) { 17697 ranges[i] = { 17698 end: getUint16(data, p) 17699 }; 17700 } 17701 p += 2; 17702 for (i = 0; i < segCount; i++, p += 2) { 17703 ranges[i].start = getUint16(data, p); 17704 } 17705 for (i = 0; i < segCount; i++, p += 2) { 17706 ranges[i].idDelta = getUint16(data, p); 17707 } 17708 for (i = 0; i < segCount; i++, p += 2) { 17709 let idOffset = getUint16(data, p); 17710 if (idOffset === 0) { 17711 continue; 17712 } 17713 ranges[i].ids = []; 17714 for (let j = 0, jj = ranges[i].end - ranges[i].start + 1; j < jj; j++) { 17715 ranges[i].ids[j] = getUint16(data, p + idOffset); 17716 idOffset += 2; 17717 } 17718 } 17719 return ranges; 17720 } else if (format === 12) { 17721 const groups = getUint32(data, start + offset + 12); 17722 p = start + offset + 16; 17723 ranges = []; 17724 for (i = 0; i < groups; i++) { 17725 start = getUint32(data, p); 17726 ranges.push({ 17727 start, 17728 end: getUint32(data, p + 4), 17729 idDelta: getUint32(data, p + 8) - start 17730 }); 17731 p += 12; 17732 } 17733 return ranges; 17734 } 17735 throw new FormatError(`unsupported cmap: ${format}`); 17736} 17737function parseCff(data, start, end, seacAnalysisEnabled) { 17738 const properties = {}; 17739 const parser = new CFFParser(new Stream(data, start, end - start), properties, seacAnalysisEnabled); 17740 const cff = parser.parse(); 17741 return { 17742 glyphs: cff.charStrings.objects, 17743 subrs: cff.topDict.privateDict?.subrsIndex?.objects, 17744 gsubrs: cff.globalSubrIndex?.objects, 17745 isCFFCIDFont: cff.isCIDFont, 17746 fdSelect: cff.fdSelect, 17747 fdArray: cff.fdArray 17748 }; 17749} 17750function parseGlyfTable(glyf, loca, isGlyphLocationsLong) { 17751 let itemSize, itemDecode; 17752 if (isGlyphLocationsLong) { 17753 itemSize = 4; 17754 itemDecode = getUint32; 17755 } else { 17756 itemSize = 2; 17757 itemDecode = (data, offset) => 2 * getUint16(data, offset); 17758 } 17759 const glyphs = []; 17760 let startOffset = itemDecode(loca, 0); 17761 for (let j = itemSize; j < loca.length; j += itemSize) { 17762 const endOffset = itemDecode(loca, j); 17763 glyphs.push(glyf.subarray(startOffset, endOffset)); 17764 startOffset = endOffset; 17765 } 17766 return glyphs; 17767} 17768function lookupCmap(ranges, unicode) { 17769 const code = unicode.codePointAt(0); 17770 let gid = 0, 17771 l = 0, 17772 r = ranges.length - 1; 17773 while (l < r) { 17774 const c = l + r + 1 >> 1; 17775 if (code < ranges[c].start) { 17776 r = c - 1; 17777 } else { 17778 l = c; 17779 } 17780 } 17781 if (ranges[l].start <= code && code <= ranges[l].end) { 17782 gid = ranges[l].idDelta + (ranges[l].ids ? ranges[l].ids[code - ranges[l].start] : code) & 0xffff; 17783 } 17784 return { 17785 charCode: code, 17786 glyphId: gid 17787 }; 17788} 17789function compileGlyf(code, cmds, font) { 17790 function moveTo(x, y) { 17791 cmds.add("M", [x, y]); 17792 } 17793 function lineTo(x, y) { 17794 cmds.add("L", [x, y]); 17795 } 17796 function quadraticCurveTo(xa, ya, x, y) { 17797 cmds.add("Q", [xa, ya, x, y]); 17798 } 17799 let i = 0; 17800 const numberOfContours = getInt16(code, i); 17801 let flags; 17802 let x = 0, 17803 y = 0; 17804 i += 10; 17805 if (numberOfContours < 0) { 17806 do { 17807 flags = getUint16(code, i); 17808 const glyphIndex = getUint16(code, i + 2); 17809 i += 4; 17810 let arg1, arg2; 17811 if (flags & 0x01) { 17812 if (flags & 0x02) { 17813 arg1 = getInt16(code, i); 17814 arg2 = getInt16(code, i + 2); 17815 } else { 17816 arg1 = getUint16(code, i); 17817 arg2 = getUint16(code, i + 2); 17818 } 17819 i += 4; 17820 } else if (flags & 0x02) { 17821 arg1 = getInt8(code, i++); 17822 arg2 = getInt8(code, i++); 17823 } else { 17824 arg1 = code[i++]; 17825 arg2 = code[i++]; 17826 } 17827 if (flags & 0x02) { 17828 x = arg1; 17829 y = arg2; 17830 } else { 17831 x = 0; 17832 y = 0; 17833 } 17834 let scaleX = 1, 17835 scaleY = 1, 17836 scale01 = 0, 17837 scale10 = 0; 17838 if (flags & 0x08) { 17839 scaleX = scaleY = getFloat214(code, i); 17840 i += 2; 17841 } else if (flags & 0x40) { 17842 scaleX = getFloat214(code, i); 17843 scaleY = getFloat214(code, i + 2); 17844 i += 4; 17845 } else if (flags & 0x80) { 17846 scaleX = getFloat214(code, i); 17847 scale01 = getFloat214(code, i + 2); 17848 scale10 = getFloat214(code, i + 4); 17849 scaleY = getFloat214(code, i + 6); 17850 i += 8; 17851 } 17852 const subglyph = font.glyphs[glyphIndex]; 17853 if (subglyph) { 17854 cmds.save(); 17855 cmds.transform([scaleX, scale01, scale10, scaleY, x, y]); 17856 if (!(flags & 0x02)) {} 17857 compileGlyf(subglyph, cmds, font); 17858 cmds.restore(); 17859 } 17860 } while (flags & 0x20); 17861 } else { 17862 const endPtsOfContours = []; 17863 let j, jj; 17864 for (j = 0; j < numberOfContours; j++) { 17865 endPtsOfContours.push(getUint16(code, i)); 17866 i += 2; 17867 } 17868 const instructionLength = getUint16(code, i); 17869 i += 2 + instructionLength; 17870 const numberOfPoints = endPtsOfContours.at(-1) + 1; 17871 const points = []; 17872 while (points.length < numberOfPoints) { 17873 flags = code[i++]; 17874 let repeat = 1; 17875 if (flags & 0x08) { 17876 repeat += code[i++]; 17877 } 17878 while (repeat-- > 0) { 17879 points.push({ 17880 flags 17881 }); 17882 } 17883 } 17884 for (j = 0; j < numberOfPoints; j++) { 17885 switch (points[j].flags & 0x12) { 17886 case 0x00: 17887 x += getInt16(code, i); 17888 i += 2; 17889 break; 17890 case 0x02: 17891 x -= code[i++]; 17892 break; 17893 case 0x12: 17894 x += code[i++]; 17895 break; 17896 } 17897 points[j].x = x; 17898 } 17899 for (j = 0; j < numberOfPoints; j++) { 17900 switch (points[j].flags & 0x24) { 17901 case 0x00: 17902 y += getInt16(code, i); 17903 i += 2; 17904 break; 17905 case 0x04: 17906 y -= code[i++]; 17907 break; 17908 case 0x24: 17909 y += code[i++]; 17910 break; 17911 } 17912 points[j].y = y; 17913 } 17914 let startPoint = 0; 17915 for (i = 0; i < numberOfContours; i++) { 17916 const endPoint = endPtsOfContours[i]; 17917 const contour = points.slice(startPoint, endPoint + 1); 17918 if (contour[0].flags & 1) { 17919 contour.push(contour[0]); 17920 } else if (contour.at(-1).flags & 1) { 17921 contour.unshift(contour.at(-1)); 17922 } else { 17923 const p = { 17924 flags: 1, 17925 x: (contour[0].x + contour.at(-1).x) / 2, 17926 y: (contour[0].y + contour.at(-1).y) / 2 17927 }; 17928 contour.unshift(p); 17929 contour.push(p); 17930 } 17931 moveTo(contour[0].x, contour[0].y); 17932 for (j = 1, jj = contour.length; j < jj; j++) { 17933 if (contour[j].flags & 1) { 17934 lineTo(contour[j].x, contour[j].y); 17935 } else if (contour[j + 1].flags & 1) { 17936 quadraticCurveTo(contour[j].x, contour[j].y, contour[j + 1].x, contour[j + 1].y); 17937 j++; 17938 } else { 17939 quadraticCurveTo(contour[j].x, contour[j].y, (contour[j].x + contour[j + 1].x) / 2, (contour[j].y + contour[j + 1].y) / 2); 17940 } 17941 } 17942 startPoint = endPoint + 1; 17943 } 17944 } 17945} 17946function compileCharString(charStringCode, cmds, font, glyphId) { 17947 function moveTo(x, y) { 17948 cmds.add("M", [x, y]); 17949 } 17950 function lineTo(x, y) { 17951 cmds.add("L", [x, y]); 17952 } 17953 function bezierCurveTo(x1, y1, x2, y2, x, y) { 17954 cmds.add("C", [x1, y1, x2, y2, x, y]); 17955 } 17956 const stack = []; 17957 let x = 0, 17958 y = 0; 17959 let stems = 0
vendor: 8,057 bytes, lines 17959-18219
17959; 17960 function parse(code) { 17961 let i = 0; 17962 while (i < code.length) { 17963 let stackClean = false; 17964 let v = code[i++]; 17965 let xa, xb, ya, yb, y1, y2, y3, n, subrCode; 17966 switch (v) { 17967 case 1: 17968 stems += stack.length >> 1; 17969 stackClean = true; 17970 break; 17971 case 3: 17972 stems += stack.length >> 1; 17973 stackClean = true; 17974 break; 17975 case 4: 17976 y += stack.pop(); 17977 moveTo(x, y); 17978 stackClean = true; 17979 break; 17980 case 5: 17981 while (stack.length > 0) { 17982 x += stack.shift(); 17983 y += stack.shift(); 17984 lineTo(x, y); 17985 } 17986 break; 17987 case 6: 17988 while (stack.length > 0) { 17989 x += stack.shift(); 17990 lineTo(x, y); 17991 if (stack.length === 0) { 17992 break; 17993 } 17994 y += stack.shift(); 17995 lineTo(x, y); 17996 } 17997 break; 17998 case 7: 17999 while (stack.length > 0) { 18000 y += stack.shift(); 18001 lineTo(x, y); 18002 if (stack.length === 0) { 18003 break; 18004 } 18005 x += stack.shift(); 18006 lineTo(x, y); 18007 } 18008 break; 18009 case 8: 18010 while (stack.length > 0) { 18011 xa = x + stack.shift(); 18012 ya = y + stack.shift(); 18013 xb = xa + stack.shift(); 18014 yb = ya + stack.shift(); 18015 x = xb + stack.shift(); 18016 y = yb + stack.shift(); 18017 bezierCurveTo(xa, ya, xb, yb, x, y); 18018 } 18019 break; 18020 case 10: 18021 n = stack.pop(); 18022 subrCode = null; 18023 if (font.isCFFCIDFont) { 18024 const fdIndex = font.fdSelect.getFDIndex(glyphId); 18025 if (fdIndex >= 0 && fdIndex < font.fdArray.length) { 18026 const fontDict = font.fdArray[fdIndex]; 18027 let subrs; 18028 if (fontDict.privateDict?.subrsIndex) { 18029 subrs = fontDict.privateDict.subrsIndex.objects; 18030 } 18031 if (subrs) { 18032 n += getSubroutineBias(subrs); 18033 subrCode = subrs[n]; 18034 } 18035 } else { 18036 warn("Invalid fd index for glyph index."); 18037 } 18038 } else { 18039 subrCode = font.subrs[n + font.subrsBias]; 18040 } 18041 if (subrCode) { 18042 parse(subrCode); 18043 } 18044 break; 18045 case 11: 18046 return; 18047 case 12: 18048 v = code[i++]; 18049 switch (v) { 18050 case 34: 18051 xa = x + stack.shift(); 18052 xb = xa + stack.shift(); 18053 y1 = y + stack.shift(); 18054 x = xb + stack.shift(); 18055 bezierCurveTo(xa, y, xb, y1, x, y1); 18056 xa = x + stack.shift(); 18057 xb = xa + stack.shift(); 18058 x = xb + stack.shift(); 18059 bezierCurveTo(xa, y1, xb, y, x, y); 18060 break; 18061 case 35: 18062 xa = x + stack.shift(); 18063 ya = y + stack.shift(); 18064 xb = xa + stack.shift(); 18065 yb = ya + stack.shift(); 18066 x = xb + stack.shift(); 18067 y = yb + stack.shift(); 18068 bezierCurveTo(xa, ya, xb, yb, x, y); 18069 xa = x + stack.shift(); 18070 ya = y + stack.shift(); 18071 xb = xa + stack.shift(); 18072 yb = ya + stack.shift(); 18073 x = xb + stack.shift(); 18074 y = yb + stack.shift(); 18075 bezierCurveTo(xa, ya, xb, yb, x, y); 18076 stack.pop(); 18077 break; 18078 case 36: 18079 xa = x + stack.shift(); 18080 y1 = y + stack.shift(); 18081 xb = xa + stack.shift(); 18082 y2 = y1 + stack.shift(); 18083 x = xb + stack.shift(); 18084 bezierCurveTo(xa, y1, xb, y2, x, y2); 18085 xa = x + stack.shift(); 18086 xb = xa + stack.shift(); 18087 y3 = y2 + stack.shift(); 18088 x = xb + stack.shift(); 18089 bezierCurveTo(xa, y2, xb, y3, x, y); 18090 break; 18091 case 37: 18092 const x0 = x, 18093 y0 = y; 18094 xa = x + stack.shift(); 18095 ya = y + stack.shift(); 18096 xb = xa + stack.shift(); 18097 yb = ya + stack.shift(); 18098 x = xb + stack.shift(); 18099 y = yb + stack.shift(); 18100 bezierCurveTo(xa, ya, xb, yb, x, y); 18101 xa = x + stack.shift(); 18102 ya = y + stack.shift(); 18103 xb = xa + stack.shift(); 18104 yb = ya + stack.shift(); 18105 x = xb; 18106 y = yb; 18107 if (Math.abs(x - x0) > Math.abs(y - y0)) { 18108 x += stack.shift(); 18109 } else { 18110 y += stack.shift(); 18111 } 18112 bezierCurveTo(xa, ya, xb, yb, x, y); 18113 break; 18114 default: 18115 throw new FormatError(`unknown operator: 12 ${v}`); 18116 } 18117 break; 18118 case 14: 18119 if (stack.length >= 4) { 18120 const achar = stack.pop(); 18121 const bchar = stack.pop(); 18122 y = stack.pop(); 18123 x = stack.pop(); 18124 cmds.save(); 18125 cmds.translate(x, y); 18126 let cmap = lookupCmap(font.cmap, String.fromCharCode(font.glyphNameMap[StandardEncoding[achar]])); 18127 compileCharString(font.glyphs[cmap.glyphId], cmds, font, cmap.glyphId); 18128 cmds.restore(); 18129 cmap = lookupCmap(font.cmap, String.fromCharCode(font.glyphNameMap[StandardEncoding[bchar]])); 18130 compileCharString(font.glyphs[cmap.glyphId], cmds, font, cmap.glyphId); 18131 } 18132 return; 18133 case 18: 18134 stems += stack.length >> 1; 18135 stackClean = true; 18136 break; 18137 case 19: 18138 stems += stack.length >> 1; 18139 i += stems + 7 >> 3; 18140 stackClean = true; 18141 break; 18142 case 20: 18143 stems += stack.length >> 1; 18144 i += stems + 7 >> 3; 18145 stackClean = true; 18146 break; 18147 case 21: 18148 y += stack.pop(); 18149 x += stack.pop(); 18150 moveTo(x, y); 18151 stackClean = true; 18152 break; 18153 case 22: 18154 x += stack.pop(); 18155 moveTo(x, y); 18156 stackClean = true; 18157 break; 18158 case 23: 18159 stems += stack.length >> 1; 18160 stackClean = true; 18161 break; 18162 case 24: 18163 while (stack.length > 2) { 18164 xa = x + stack.shift(); 18165 ya = y + stack.shift(); 18166 xb = xa + stack.shift(); 18167 yb = ya + stack.shift(); 18168 x = xb + stack.shift(); 18169 y = yb + stack.shift(); 18170 bezierCurveTo(xa, ya, xb, yb, x, y); 18171 } 18172 x += stack.shift(); 18173 y += stack.shift(); 18174 lineTo(x, y); 18175 break; 18176 case 25: 18177 while (stack.length > 6) { 18178 x += stack.shift(); 18179 y += stack.shift(); 18180 lineTo(x, y); 18181 } 18182 xa = x + stack.shift(); 18183 ya = y + stack.shift(); 18184 xb = xa + stack.shift(); 18185 yb = ya + stack.shift(); 18186 x = xb + stack.shift(); 18187 y = yb + stack.shift(); 18188 bezierCurveTo(xa, ya, xb, yb, x, y); 18189 break; 18190 case 26: 18191 if (stack.length % 2) { 18192 x += stack.shift(); 18193 } 18194 while (stack.length > 0) { 18195 xa = x; 18196 ya = y + stack.shift(); 18197 xb = xa + stack.shift(); 18198 yb = ya + stack.shift(); 18199 x = xb; 18200 y = yb + stack.shift(); 18201 bezierCurveTo(xa, ya, xb, yb, x, y); 18202 } 18203 break; 18204 case 27: 18205 if (stack.length % 2) { 18206 y += stack.shift(); 18207 } 18208 while (stack.length > 0) { 18209 xa = x + stack.shift(); 18210 ya = y; 18211 xb = xa + stack.shift(); 18212 yb = ya + stack.shift(); 18213 x = xb + stack.shift(); 18214 y = yb; 18215 bezierCurveTo(xa, ya, xb, yb, x, y); 18216 } 18217 break; 18218 case 28: 18219 stack.push(
vendor: 1,981 bytes, lines 18219-18279
18219(code[i] << 24 | code[i + 1] << 16) >> 16); 18220 i += 2; 18221 break; 18222 case 29: 18223 n = stack.pop() + font.gsubrsBias; 18224 subrCode = font.gsubrs[n]; 18225 if (subrCode) { 18226 parse(subrCode); 18227 } 18228 break; 18229 case 30: 18230 while (stack.length > 0) { 18231 xa = x; 18232 ya = y + stack.shift(); 18233 xb = xa + stack.shift(); 18234 yb = ya + stack.shift(); 18235 x = xb + stack.shift(); 18236 y = yb + (stack.length === 1 ? stack.shift() : 0); 18237 bezierCurveTo(xa, ya, xb, yb, x, y); 18238 if (stack.length === 0) { 18239 break; 18240 } 18241 xa = x + stack.shift(); 18242 ya = y; 18243 xb = xa + stack.shift(); 18244 yb = ya + stack.shift(); 18245 y = yb + stack.shift(); 18246 x = xb + (stack.length === 1 ? stack.shift() : 0); 18247 bezierCurveTo(xa, ya, xb, yb, x, y); 18248 } 18249 break; 18250 case 31: 18251 while (stack.length > 0) { 18252 xa = x + stack.shift(); 18253 ya = y; 18254 xb = xa + stack.shift(); 18255 yb = ya + stack.shift(); 18256 y = yb + stack.shift(); 18257 x = xb + (stack.length === 1 ? stack.shift() : 0); 18258 bezierCurveTo(xa, ya, xb, yb, x, y); 18259 if (stack.length === 0) { 18260 break; 18261 } 18262 xa = x; 18263 ya = y + stack.shift(); 18264 xb = xa + stack.shift(); 18265 yb = ya + stack.shift(); 18266 x = xb + stack.shift(); 18267 y = yb + (stack.length === 1 ? stack.shift() : 0); 18268 bezierCurveTo(xa, ya, xb, yb, x, y); 18269 } 18270 break; 18271 default: 18272 if (v < 32) { 18273 throw new FormatError(`unknown operator: ${v}`); 18274 } 18275 if (v < 247) { 18276 stack.push(v - 139); 18277 } else if (v < 251) { 18278 stack.push((v - 247) * 256 + code[i++] + 108); 18279 } else if (v < 255) {
vendor: 4,231 bytes, lines 18280-18423
18280 stack.push(-(v - 251) * 256 - code[i++] - 108); 18281 } else { 18282 stack.push((code[i] << 24 | code[i + 1] << 16 | code[i + 2] << 8 | code[i + 3]) / 65536); 18283 i += 4; 18284 } 18285 break; 18286 } 18287 if (stackClean) { 18288 stack.length = 0; 18289 } 18290 } 18291 } 18292 parse(charStringCode); 18293} 18294const NOOP = ""; 18295class Commands { 18296 cmds = []; 18297 transformStack = []; 18298 currentTransform = [1, 0, 0, 1, 0, 0]; 18299 add(cmd, args) { 18300 if (args) { 18301 const [a, b, c, d, e, f] = this.currentTransform; 18302 for (let i = 0, ii = args.length; i < ii; i += 2) { 18303 const x = args[i]; 18304 const y = args[i + 1]; 18305 args[i] = a * x + c * y + e; 18306 args[i + 1] = b * x + d * y + f; 18307 } 18308 this.cmds.push(`${cmd}${args.join(" ")}`); 18309 } else { 18310 this.cmds.push(cmd); 18311 } 18312 } 18313 transform(transf) { 18314 this.currentTransform = Util.transform(this.currentTransform, transf); 18315 } 18316 translate(x, y) { 18317 this.transform([1, 0, 0, 1, x, y]); 18318 } 18319 save() { 18320 this.transformStack.push(this.currentTransform.slice()); 18321 } 18322 restore() { 18323 this.currentTransform = this.transformStack.pop() || [1, 0, 0, 1, 0, 0]; 18324 } 18325 getSVG() { 18326 return this.cmds.join(""); 18327 } 18328} 18329class CompiledFont { 18330 constructor(fontMatrix) { 18331 this.fontMatrix = fontMatrix; 18332 this.compiledGlyphs = Object.create(null); 18333 this.compiledCharCodeToGlyphId = Object.create(null); 18334 } 18335 getPathJs(unicode) { 18336 const { 18337 charCode, 18338 glyphId 18339 } = lookupCmap(this.cmap, unicode); 18340 let fn = this.compiledGlyphs[glyphId], 18341 compileEx; 18342 if (fn === undefined) { 18343 try { 18344 fn = this.compileGlyph(this.glyphs[glyphId], glyphId); 18345 } catch (ex) { 18346 fn = NOOP; 18347 compileEx = ex; 18348 } 18349 this.compiledGlyphs[glyphId] = fn; 18350 } 18351 this.compiledCharCodeToGlyphId[charCode] ??= glyphId; 18352 if (compileEx) { 18353 throw compileEx; 18354 } 18355 return fn; 18356 } 18357 compileGlyph(code, glyphId) { 18358 if (!code?.length || code[0] === 14) { 18359 return NOOP; 18360 } 18361 let fontMatrix = this.fontMatrix; 18362 if (this.isCFFCIDFont) { 18363 const fdIndex = this.fdSelect.getFDIndex(glyphId); 18364 if (fdIndex >= 0 && fdIndex < this.fdArray.length) { 18365 const fontDict = this.fdArray[fdIndex]; 18366 fontMatrix = fontDict.getByName("FontMatrix") || FONT_IDENTITY_MATRIX; 18367 } else { 18368 warn("Invalid fd index for glyph index."); 18369 } 18370 } 18371 assert(isNumberArray(fontMatrix, 6), "Expected a valid fontMatrix."); 18372 const cmds = new Commands(); 18373 cmds.transform(fontMatrix.slice()); 18374 this.compileGlyphImpl(code, cmds, glyphId); 18375 cmds.add("Z"); 18376 return cmds.getSVG(); 18377 } 18378 compileGlyphImpl() { 18379 unreachable("Children classes should implement this."); 18380 } 18381 hasBuiltPath(unicode) { 18382 const { 18383 charCode, 18384 glyphId 18385 } = lookupCmap(this.cmap, unicode); 18386 return this.compiledGlyphs[glyphId] !== undefined && this.compiledCharCodeToGlyphId[charCode] !== undefined; 18387 } 18388} 18389class TrueTypeCompiled extends CompiledFont { 18390 constructor(glyphs, cmap, fontMatrix) { 18391 super(fontMatrix || [0.000488, 0, 0, 0.000488, 0, 0]); 18392 this.glyphs = glyphs; 18393 this.cmap = cmap; 18394 } 18395 compileGlyphImpl(code, cmds) { 18396 compileGlyf(code, cmds, this); 18397 } 18398} 18399class Type2Compiled extends CompiledFont { 18400 constructor(cffInfo, cmap, fontMatrix) { 18401 super(fontMatrix || [0.001, 0, 0, 0.001, 0, 0]); 18402 this.glyphs = cffInfo.glyphs; 18403 this.gsubrs = cffInfo.gsubrs || []; 18404 this.subrs = cffInfo.subrs || []; 18405 this.cmap = cmap; 18406 this.glyphNameMap = getGlyphsUnicode(); 18407 this.gsubrsBias = getSubroutineBias(this.gsubrs); 18408 this.subrsBias = getSubroutineBias(this.subrs); 18409 this.isCFFCIDFont = cffInfo.isCFFCIDFont; 18410 this.fdSelect = cffInfo.fdSelect; 18411 this.fdArray = cffInfo.fdArray; 18412 } 18413 compileGlyphImpl(code, cmds, glyphId) { 18414 compileCharString(code, cmds, this, glyphId); 18415 } 18416} 18417class FontRendererFactory { 18418 static create(font, seacAnalysisEnabled) { 18419 const data = new Uint8Array(font.data); 18420 let cmap, glyf, loca, cff, indexToLocFormat, unitsPerEm; 18421 const numTables = getUint16(data, 4); 18422 for (let i = 0, p = 12; i < numTables; i++, p += 16) { 18423 const tag = bytesToString(data.subarray(p, p + 4));
18424 const offset = getUint32(data, p + 8); 18425 const length = getUint32(data, p + 12); 18426 switch (tag) { 18427 case "cmap": 18428 cmap = parseCmap(data, offset, offset + length); 18429 break; 18430 case "glyf": 18431 glyf = data.subarray(offset, offset + length); 18432 break; 18433 case "loca": 18434 loca = data.subarray(offset, offset + length); 18435 break; 18436 case "head": 18437 unitsPerEm = getUint16(data, offset + 18); 18438 indexToLocFormat = get
vendor: 62,305 bytes, lines 18438-21480
18438Uint16(data, offset + 50); 18439 break; 18440 case "CFF ": 18441 cff = parseCff(data, offset, offset + length, seacAnalysisEnabled); 18442 break; 18443 } 18444 } 18445 if (glyf) { 18446 const fontMatrix = !unitsPerEm ? font.fontMatrix : [1 / unitsPerEm, 0, 0, 1 / unitsPerEm, 0, 0]; 18447 return new TrueTypeCompiled(parseGlyfTable(glyf, loca, indexToLocFormat), cmap, fontMatrix); 18448 } 18449 return new Type2Compiled(cff, cmap, font.fontMatrix); 18450 } 18451} 18452 18453;// ./src/core/metrics.js 18454 18455const getMetrics = getLookupTableFactory(function (t) { 18456 t.Courier = 600; 18457 t["Courier-Bold"] = 600; 18458 t["Courier-BoldOblique"] = 600; 18459 t["Courier-Oblique"] = 600; 18460 t.Helvetica = getLookupTableFactory(function (t) { 18461 t.space = 278; 18462 t.exclam = 278; 18463 t.quotedbl = 355; 18464 t.numbersign = 556; 18465 t.dollar = 556; 18466 t.percent = 889; 18467 t.ampersand = 667; 18468 t.quoteright = 222; 18469 t.parenleft = 333; 18470 t.parenright = 333; 18471 t.asterisk = 389; 18472 t.plus = 584; 18473 t.comma = 278; 18474 t.hyphen = 333; 18475 t.period = 278; 18476 t.slash = 278; 18477 t.zero = 556; 18478 t.one = 556; 18479 t.two = 556; 18480 t.three = 556; 18481 t.four = 556; 18482 t.five = 556; 18483 t.six = 556; 18484 t.seven = 556; 18485 t.eight = 556; 18486 t.nine = 556; 18487 t.colon = 278; 18488 t.semicolon = 278; 18489 t.less = 584; 18490 t.equal = 584; 18491 t.greater = 584; 18492 t.question = 556; 18493 t.at = 1015; 18494 t.A = 667; 18495 t.B = 667; 18496 t.C = 722; 18497 t.D = 722; 18498 t.E = 667; 18499 t.F = 611; 18500 t.G = 778; 18501 t.H = 722; 18502 t.I = 278; 18503 t.J = 500; 18504 t.K = 667; 18505 t.L = 556; 18506 t.M = 833; 18507 t.N = 722; 18508 t.O = 778; 18509 t.P = 667; 18510 t.Q = 778; 18511 t.R = 722; 18512 t.S = 667; 18513 t.T = 611; 18514 t.U = 722; 18515 t.V = 667; 18516 t.W = 944; 18517 t.X = 667; 18518 t.Y = 667; 18519 t.Z = 611; 18520 t.bracketleft = 278; 18521 t.backslash = 278; 18522 t.bracketright = 278; 18523 t.asciicircum = 469; 18524 t.underscore = 556; 18525 t.quoteleft = 222; 18526 t.a = 556; 18527 t.b = 556; 18528 t.c = 500; 18529 t.d = 556; 18530 t.e = 556; 18531 t.f = 278; 18532 t.g = 556; 18533 t.h = 556; 18534 t.i = 222; 18535 t.j = 222; 18536 t.k = 500; 18537 t.l = 222; 18538 t.m = 833; 18539 t.n = 556; 18540 t.o = 556; 18541 t.p = 556; 18542 t.q = 556; 18543 t.r = 333; 18544 t.s = 500; 18545 t.t = 278; 18546 t.u = 556; 18547 t.v = 500; 18548 t.w = 722; 18549 t.x = 500; 18550 t.y = 500; 18551 t.z = 500; 18552 t.braceleft = 334; 18553 t.bar = 260; 18554 t.braceright = 334; 18555 t.asciitilde = 584; 18556 t.exclamdown = 333; 18557 t.cent = 556; 18558 t.sterling = 556; 18559 t.fraction = 167; 18560 t.yen = 556; 18561 t.florin = 556; 18562 t.section = 556; 18563 t.currency = 556; 18564 t.quotesingle = 191; 18565 t.quotedblleft = 333; 18566 t.guillemotleft = 556; 18567 t.guilsinglleft = 333; 18568 t.guilsinglright = 333; 18569 t.fi = 500; 18570 t.fl = 500; 18571 t.endash = 556; 18572 t.dagger = 556; 18573 t.daggerdbl = 556; 18574 t.periodcentered = 278; 18575 t.paragraph = 537; 18576 t.bullet = 350; 18577 t.quotesinglbase = 222; 18578 t.quotedblbase = 333; 18579 t.quotedblright = 333; 18580 t.guillemotright = 556; 18581 t.ellipsis = 1000; 18582 t.perthousand = 1000; 18583 t.questiondown = 611; 18584 t.grave = 333; 18585 t.acute = 333; 18586 t.circumflex = 333; 18587 t.tilde = 333; 18588 t.macron = 333; 18589 t.breve = 333; 18590 t.dotaccent = 333; 18591 t.dieresis = 333; 18592 t.ring = 333; 18593 t.cedilla = 333; 18594 t.hungarumlaut = 333; 18595 t.ogonek = 333; 18596 t.caron = 333; 18597 t.emdash = 1000; 18598 t.AE = 1000; 18599 t.ordfeminine = 370; 18600 t.Lslash = 556; 18601 t.Oslash = 778; 18602 t.OE = 1000; 18603 t.ordmasculine = 365; 18604 t.ae = 889; 18605 t.dotlessi = 278; 18606 t.lslash = 222; 18607 t.oslash = 611; 18608 t.oe = 944; 18609 t.germandbls = 611; 18610 t.Idieresis = 278; 18611 t.eacute = 556; 18612 t.abreve = 556; 18613 t.uhungarumlaut = 556; 18614 t.ecaron = 556; 18615 t.Ydieresis = 667; 18616 t.divide = 584; 18617 t.Yacute = 667; 18618 t.Acircumflex = 667; 18619 t.aacute = 556; 18620 t.Ucircumflex = 722; 18621 t.yacute = 500; 18622 t.scommaaccent = 500; 18623 t.ecircumflex = 556; 18624 t.Uring = 722; 18625 t.Udieresis = 722; 18626 t.aogonek = 556; 18627 t.Uacute = 722; 18628 t.uogonek = 556; 18629 t.Edieresis = 667; 18630 t.Dcroat = 722; 18631 t.commaaccent = 250; 18632 t.copyright = 737; 18633 t.Emacron = 667; 18634 t.ccaron = 500; 18635 t.aring = 556; 18636 t.Ncommaaccent = 722; 18637 t.lacute = 222; 18638 t.agrave = 556; 18639 t.Tcommaaccent = 611; 18640 t.Cacute = 722; 18641 t.atilde = 556; 18642 t.Edotaccent = 667; 18643 t.scaron = 500; 18644 t.scedilla = 500; 18645 t.iacute = 278; 18646 t.lozenge = 471; 18647 t.Rcaron = 722; 18648 t.Gcommaaccent = 778; 18649 t.ucircumflex = 556; 18650 t.acircumflex = 556; 18651 t.Amacron = 667; 18652 t.rcaron = 333; 18653 t.ccedilla = 500; 18654 t.Zdotaccent = 611; 18655 t.Thorn = 667; 18656 t.Omacron = 778; 18657 t.Racute = 722; 18658 t.Sacute = 667; 18659 t.dcaron = 643; 18660 t.Umacron = 722; 18661 t.uring = 556; 18662 t.threesuperior = 333; 18663 t.Ograve = 778; 18664 t.Agrave = 667; 18665 t.Abreve = 667; 18666 t.multiply = 584; 18667 t.uacute = 556; 18668 t.Tcaron = 611; 18669 t.partialdiff = 476; 18670 t.ydieresis = 500; 18671 t.Nacute = 722; 18672 t.icircumflex = 278; 18673 t.Ecircumflex = 667; 18674 t.adieresis = 556; 18675 t.edieresis = 556; 18676 t.cacute = 500; 18677 t.nacute = 556; 18678 t.umacron = 556; 18679 t.Ncaron = 722; 18680 t.Iacute = 278; 18681 t.plusminus = 584; 18682 t.brokenbar = 260; 18683 t.registered = 737; 18684 t.Gbreve = 778; 18685 t.Idotaccent = 278; 18686 t.summation = 600; 18687 t.Egrave = 667; 18688 t.racute = 333; 18689 t.omacron = 556; 18690 t.Zacute = 611; 18691 t.Zcaron = 611; 18692 t.greaterequal = 549; 18693 t.Eth = 722; 18694 t.Ccedilla = 722; 18695 t.lcommaaccent = 222; 18696 t.tcaron = 317; 18697 t.eogonek = 556; 18698 t.Uogonek = 722; 18699 t.Aacute = 667; 18700 t.Adieresis = 667; 18701 t.egrave = 556; 18702 t.zacute = 500; 18703 t.iogonek = 222; 18704 t.Oacute = 778; 18705 t.oacute = 556; 18706 t.amacron = 556; 18707 t.sacute = 500; 18708 t.idieresis = 278; 18709 t.Ocircumflex = 778; 18710 t.Ugrave = 722; 18711 t.Delta = 612; 18712 t.thorn = 556; 18713 t.twosuperior = 333; 18714 t.Odieresis = 778; 18715 t.mu = 556; 18716 t.igrave = 278; 18717 t.ohungarumlaut = 556; 18718 t.Eogonek = 667; 18719 t.dcroat = 556; 18720 t.threequarters = 834; 18721 t.Scedilla = 667; 18722 t.lcaron = 299; 18723 t.Kcommaaccent = 667; 18724 t.Lacute = 556; 18725 t.trademark = 1000; 18726 t.edotaccent = 556; 18727 t.Igrave = 278; 18728 t.Imacron = 278; 18729 t.Lcaron = 556; 18730 t.onehalf = 834; 18731 t.lessequal = 549; 18732 t.ocircumflex = 556; 18733 t.ntilde = 556; 18734 t.Uhungarumlaut = 722; 18735 t.Eacute = 667; 18736 t.emacron = 556; 18737 t.gbreve = 556; 18738 t.onequarter = 834; 18739 t.Scaron = 667; 18740 t.Scommaaccent = 667; 18741 t.Ohungarumlaut = 778; 18742 t.degree = 400; 18743 t.ograve = 556; 18744 t.Ccaron = 722; 18745 t.ugrave = 556; 18746 t.radical = 453; 18747 t.Dcaron = 722; 18748 t.rcommaaccent = 333; 18749 t.Ntilde = 722; 18750 t.otilde = 556; 18751 t.Rcommaaccent = 722; 18752 t.Lcommaaccent = 556; 18753 t.Atilde = 667; 18754 t.Aogonek = 667; 18755 t.Aring = 667; 18756 t.Otilde = 778; 18757 t.zdotaccent = 500; 18758 t.Ecaron = 667; 18759 t.Iogonek = 278; 18760 t.kcommaaccent = 500; 18761 t.minus = 584; 18762 t.Icircumflex = 278; 18763 t.ncaron = 556; 18764 t.tcommaaccent = 278; 18765 t.logicalnot = 584; 18766 t.odieresis = 556; 18767 t.udieresis = 556; 18768 t.notequal = 549; 18769 t.gcommaaccent = 556; 18770 t.eth = 556; 18771 t.zcaron = 500; 18772 t.ncommaaccent = 556; 18773 t.onesuperior = 333; 18774 t.imacron = 278; 18775 t.Euro = 556; 18776 }); 18777 t["Helvetica-Bold"] = getLookupTableFactory(function (t) { 18778 t.space = 278; 18779 t.exclam = 333; 18780 t.quotedbl = 474; 18781 t.numbersign = 556; 18782 t.dollar = 556; 18783 t.percent = 889; 18784 t.ampersand = 722; 18785 t.quoteright = 278; 18786 t.parenleft = 333; 18787 t.parenright = 333; 18788 t.asterisk = 389; 18789 t.plus = 584; 18790 t.comma = 278; 18791 t.hyphen = 333; 18792 t.period = 278; 18793 t.slash = 278; 18794 t.zero = 556; 18795 t.one = 556; 18796 t.two = 556; 18797 t.three = 556; 18798 t.four = 556; 18799 t.five = 556; 18800 t.six = 556; 18801 t.seven = 556; 18802 t.eight = 556; 18803 t.nine = 556; 18804 t.colon = 333; 18805 t.semicolon = 333; 18806 t.less = 584; 18807 t.equal = 584; 18808 t.greater = 584; 18809 t.question = 611; 18810 t.at = 975; 18811 t.A = 722; 18812 t.B = 722; 18813 t.C = 722; 18814 t.D = 722; 18815 t.E = 667; 18816 t.F = 611; 18817 t.G = 778; 18818 t.H = 722; 18819 t.I = 278; 18820 t.J = 556; 18821 t.K = 722; 18822 t.L = 611; 18823 t.M = 833; 18824 t.N = 722; 18825 t.O = 778; 18826 t.P = 667; 18827 t.Q = 778; 18828 t.R = 722; 18829 t.S = 667; 18830 t.T = 611; 18831 t.U = 722; 18832 t.V = 667; 18833 t.W = 944; 18834 t.X = 667; 18835 t.Y = 667; 18836 t.Z = 611; 18837 t.bracketleft = 333; 18838 t.backslash = 278; 18839 t.bracketright = 333; 18840 t.asciicircum = 584; 18841 t.underscore = 556; 18842 t.quoteleft = 278; 18843 t.a = 556; 18844 t.b = 611; 18845 t.c = 556; 18846 t.d = 611; 18847 t.e = 556; 18848 t.f = 333; 18849 t.g = 611; 18850 t.h = 611; 18851 t.i = 278; 18852 t.j = 278; 18853 t.k = 556; 18854 t.l = 278; 18855 t.m = 889; 18856 t.n = 611; 18857 t.o = 611; 18858 t.p = 611; 18859 t.q = 611; 18860 t.r = 389; 18861 t.s = 556; 18862 t.t = 333; 18863 t.u = 611; 18864 t.v = 556; 18865 t.w = 778; 18866 t.x = 556; 18867 t.y = 556; 18868 t.z = 500; 18869 t.braceleft = 389; 18870 t.bar = 280; 18871 t.braceright = 389; 18872 t.asciitilde = 584; 18873 t.exclamdown = 333; 18874 t.cent = 556; 18875 t.sterling = 556; 18876 t.fraction = 167; 18877 t.yen = 556; 18878 t.florin = 556; 18879 t.section = 556; 18880 t.currency = 556; 18881 t.quotesingle = 238; 18882 t.quotedblleft = 500; 18883 t.guillemotleft = 556; 18884 t.guilsinglleft = 333; 18885 t.guilsinglright = 333; 18886 t.fi = 611; 18887 t.fl = 611; 18888 t.endash = 556; 18889 t.dagger = 556; 18890 t.daggerdbl = 556; 18891 t.periodcentered = 278; 18892 t.paragraph = 556; 18893 t.bullet = 350; 18894 t.quotesinglbase = 278; 18895 t.quotedblbase = 500; 18896 t.quotedblright = 500; 18897 t.guillemotright = 556; 18898 t.ellipsis = 1000; 18899 t.perthousand = 1000; 18900 t.questiondown = 611; 18901 t.grave = 333; 18902 t.acute = 333; 18903 t.circumflex = 333; 18904 t.tilde = 333; 18905 t.macron = 333; 18906 t.breve = 333; 18907 t.dotaccent = 333; 18908 t.dieresis = 333; 18909 t.ring = 333; 18910 t.cedilla = 333; 18911 t.hungarumlaut = 333; 18912 t.ogonek = 333; 18913 t.caron = 333; 18914 t.emdash = 1000; 18915 t.AE = 1000; 18916 t.ordfeminine = 370; 18917 t.Lslash = 611; 18918 t.Oslash = 778; 18919 t.OE = 1000; 18920 t.ordmasculine = 365; 18921 t.ae = 889; 18922 t.dotlessi = 278; 18923 t.lslash = 278; 18924 t.oslash = 611; 18925 t.oe = 944; 18926 t.germandbls = 611; 18927 t.Idieresis = 278; 18928 t.eacute = 556; 18929 t.abreve = 556; 18930 t.uhungarumlaut = 611; 18931 t.ecaron = 556; 18932 t.Ydieresis = 667; 18933 t.divide = 584; 18934 t.Yacute = 667; 18935 t.Acircumflex = 722; 18936 t.aacute = 556; 18937 t.Ucircumflex = 722; 18938 t.yacute = 556; 18939 t.scommaaccent = 556; 18940 t.ecircumflex = 556; 18941 t.Uring = 722; 18942 t.Udieresis = 722; 18943 t.aogonek = 556; 18944 t.Uacute = 722; 18945 t.uogonek = 611; 18946 t.Edieresis = 667; 18947 t.Dcroat = 722; 18948 t.commaaccent = 250; 18949 t.copyright = 737; 18950 t.Emacron = 667; 18951 t.ccaron = 556; 18952 t.aring = 556; 18953 t.Ncommaaccent = 722; 18954 t.lacute = 278; 18955 t.agrave = 556; 18956 t.Tcommaaccent = 611; 18957 t.Cacute = 722; 18958 t.atilde = 556; 18959 t.Edotaccent = 667; 18960 t.scaron = 556; 18961 t.scedilla = 556; 18962 t.iacute = 278; 18963 t.lozenge = 494; 18964 t.Rcaron = 722; 18965 t.Gcommaaccent = 778; 18966 t.ucircumflex = 611; 18967 t.acircumflex = 556; 18968 t.Amacron = 722; 18969 t.rcaron = 389; 18970 t.ccedilla = 556; 18971 t.Zdotaccent = 611; 18972 t.Thorn = 667; 18973 t.Omacron = 778; 18974 t.Racute = 722; 18975 t.Sacute = 667; 18976 t.dcaron = 743; 18977 t.Umacron = 722; 18978 t.uring = 611; 18979 t.threesuperior = 333; 18980 t.Ograve = 778; 18981 t.Agrave = 722; 18982 t.Abreve = 722; 18983 t.multiply = 584; 18984 t.uacute = 611; 18985 t.Tcaron = 611; 18986 t.partialdiff = 494; 18987 t.ydieresis = 556; 18988 t.Nacute = 722; 18989 t.icircumflex = 278; 18990 t.Ecircumflex = 667; 18991 t.adieresis = 556; 18992 t.edieresis = 556; 18993 t.cacute = 556; 18994 t.nacute = 611; 18995 t.umacron = 611; 18996 t.Ncaron = 722; 18997 t.Iacute = 278; 18998 t.plusminus = 584; 18999 t.brokenbar = 280; 19000 t.registered = 737; 19001 t.Gbreve = 778; 19002 t.Idotaccent = 278; 19003 t.summation = 600; 19004 t.Egrave = 667; 19005 t.racute = 389; 19006 t.omacron = 611; 19007 t.Zacute = 611; 19008 t.Zcaron = 611; 19009 t.greaterequal = 549; 19010 t.Eth = 722; 19011 t.Ccedilla = 722; 19012 t.lcommaaccent = 278; 19013 t.tcaron = 389; 19014 t.eogonek = 556; 19015 t.Uogonek = 722; 19016 t.Aacute = 722; 19017 t.Adieresis = 722; 19018 t.egrave = 556; 19019 t.zacute = 500; 19020 t.iogonek = 278; 19021 t.Oacute = 778; 19022 t.oacute = 611; 19023 t.amacron = 556; 19024 t.sacute = 556; 19025 t.idieresis = 278; 19026 t.Ocircumflex = 778; 19027 t.Ugrave = 722; 19028 t.Delta = 612; 19029 t.thorn = 611; 19030 t.twosuperior = 333; 19031 t.Odieresis = 778; 19032 t.mu = 611; 19033 t.igrave = 278; 19034 t.ohungarumlaut = 611; 19035 t.Eogonek = 667; 19036 t.dcroat = 611; 19037 t.threequarters = 834; 19038 t.Scedilla = 667; 19039 t.lcaron = 400; 19040 t.Kcommaaccent = 722; 19041 t.Lacute = 611; 19042 t.trademark = 1000; 19043 t.edotaccent = 556; 19044 t.Igrave = 278; 19045 t.Imacron = 278; 19046 t.Lcaron = 611; 19047 t.onehalf = 834; 19048 t.lessequal = 549; 19049 t.ocircumflex = 611; 19050 t.ntilde = 611; 19051 t.Uhungarumlaut = 722; 19052 t.Eacute = 667; 19053 t.emacron = 556; 19054 t.gbreve = 611; 19055 t.onequarter = 834; 19056 t.Scaron = 667; 19057 t.Scommaaccent = 667; 19058 t.Ohungarumlaut = 778; 19059 t.degree = 400; 19060 t.ograve = 611; 19061 t.Ccaron = 722; 19062 t.ugrave = 611; 19063 t.radical = 549; 19064 t.Dcaron = 722; 19065 t.rcommaaccent = 389; 19066 t.Ntilde = 722; 19067 t.otilde = 611; 19068 t.Rcommaaccent = 722; 19069 t.Lcommaaccent = 611; 19070 t.Atilde = 722; 19071 t.Aogonek = 722; 19072 t.Aring = 722; 19073 t.Otilde = 778; 19074 t.zdotaccent = 500; 19075 t.Ecaron = 667; 19076 t.Iogonek = 278; 19077 t.kcommaaccent = 556; 19078 t.minus = 584; 19079 t.Icircumflex = 278; 19080 t.ncaron = 611; 19081 t.tcommaaccent = 333; 19082 t.logicalnot = 584; 19083 t.odieresis = 611; 19084 t.udieresis = 611; 19085 t.notequal = 549; 19086 t.gcommaaccent = 611; 19087 t.eth = 611; 19088 t.zcaron = 500; 19089 t.ncommaaccent = 611; 19090 t.onesuperior = 333; 19091 t.imacron = 278; 19092 t.Euro = 556; 19093 }); 19094 t["Helvetica-BoldOblique"] = getLookupTableFactory(function (t) { 19095 t.space = 278; 19096 t.exclam = 333; 19097 t.quotedbl = 474; 19098 t.numbersign = 556; 19099 t.dollar = 556; 19100 t.percent = 889; 19101 t.ampersand = 722; 19102 t.quoteright = 278; 19103 t.parenleft = 333; 19104 t.parenright = 333; 19105 t.asterisk = 389; 19106 t.plus = 584; 19107 t.comma = 278; 19108 t.hyphen = 333; 19109 t.period = 278; 19110 t.slash = 278; 19111 t.zero = 556; 19112 t.one = 556; 19113 t.two = 556; 19114 t.three = 556; 19115 t.four = 556; 19116 t.five = 556; 19117 t.six = 556; 19118 t.seven = 556; 19119 t.eight = 556; 19120 t.nine = 556; 19121 t.colon = 333; 19122 t.semicolon = 333; 19123 t.less = 584; 19124 t.equal = 584; 19125 t.greater = 584; 19126 t.question = 611; 19127 t.at = 975; 19128 t.A = 722; 19129 t.B = 722; 19130 t.C = 722; 19131 t.D = 722; 19132 t.E = 667; 19133 t.F = 611; 19134 t.G = 778; 19135 t.H = 722; 19136 t.I = 278; 19137 t.J = 556; 19138 t.K = 722; 19139 t.L = 611; 19140 t.M = 833; 19141 t.N = 722; 19142 t.O = 778; 19143 t.P = 667; 19144 t.Q = 778; 19145 t.R = 722; 19146 t.S = 667; 19147 t.T = 611; 19148 t.U = 722; 19149 t.V = 667; 19150 t.W = 944; 19151 t.X = 667; 19152 t.Y = 667; 19153 t.Z = 611; 19154 t.bracketleft = 333; 19155 t.backslash = 278; 19156 t.bracketright = 333; 19157 t.asciicircum = 584; 19158 t.underscore = 556; 19159 t.quoteleft = 278; 19160 t.a = 556; 19161 t.b = 611; 19162 t.c = 556; 19163 t.d = 611; 19164 t.e = 556; 19165 t.f = 333; 19166 t.g = 611; 19167 t.h = 611; 19168 t.i = 278; 19169 t.j = 278; 19170 t.k = 556; 19171 t.l = 278; 19172 t.m = 889; 19173 t.n = 611; 19174 t.o = 611; 19175 t.p = 611; 19176 t.q = 611; 19177 t.r = 389; 19178 t.s = 556; 19179 t.t = 333; 19180 t.u = 611; 19181 t.v = 556; 19182 t.w = 778; 19183 t.x = 556; 19184 t.y = 556; 19185 t.z = 500; 19186 t.braceleft = 389; 19187 t.bar = 280; 19188 t.braceright = 389; 19189 t.asciitilde = 584; 19190 t.exclamdown = 333; 19191 t.cent = 556; 19192 t.sterling = 556; 19193 t.fraction = 167; 19194 t.yen = 556; 19195 t.florin = 556; 19196 t.section = 556; 19197 t.currency = 556; 19198 t.quotesingle = 238; 19199 t.quotedblleft = 500; 19200 t.guillemotleft = 556; 19201 t.guilsinglleft = 333; 19202 t.guilsinglright = 333; 19203 t.fi = 611; 19204 t.fl = 611; 19205 t.endash = 556; 19206 t.dagger = 556; 19207 t.daggerdbl = 556; 19208 t.periodcentered = 278; 19209 t.paragraph = 556; 19210 t.bullet = 350; 19211 t.quotesinglbase = 278; 19212 t.quotedblbase = 500; 19213 t.quotedblright = 500; 19214 t.guillemotright = 556; 19215 t.ellipsis = 1000; 19216 t.perthousand = 1000; 19217 t.questiondown = 611; 19218 t.grave = 333; 19219 t.acute = 333; 19220 t.circumflex = 333; 19221 t.tilde = 333; 19222 t.macron = 333; 19223 t.breve = 333; 19224 t.dotaccent = 333; 19225 t.dieresis = 333; 19226 t.ring = 333; 19227 t.cedilla = 333; 19228 t.hungarumlaut = 333; 19229 t.ogonek = 333; 19230 t.caron = 333; 19231 t.emdash = 1000; 19232 t.AE = 1000; 19233 t.ordfeminine = 370; 19234 t.Lslash = 611; 19235 t.Oslash = 778; 19236 t.OE = 1000; 19237 t.ordmasculine = 365; 19238 t.ae = 889; 19239 t.dotlessi = 278; 19240 t.lslash = 278; 19241 t.oslash = 611; 19242 t.oe = 944; 19243 t.germandbls = 611; 19244 t.Idieresis = 278; 19245 t.eacute = 556; 19246 t.abreve = 556; 19247 t.uhungarumlaut = 611; 19248 t.ecaron = 556; 19249 t.Ydieresis = 667; 19250 t.divide = 584; 19251 t.Yacute = 667; 19252 t.Acircumflex = 722; 19253 t.aacute = 556; 19254 t.Ucircumflex = 722; 19255 t.yacute = 556; 19256 t.scommaaccent = 556; 19257 t.ecircumflex = 556; 19258 t.Uring = 722; 19259 t.Udieresis = 722; 19260 t.aogonek = 556; 19261 t.Uacute = 722; 19262 t.uogonek = 611; 19263 t.Edieresis = 667; 19264 t.Dcroat = 722; 19265 t.commaaccent = 250; 19266 t.copyright = 737; 19267 t.Emacron = 667; 19268 t.ccaron = 556; 19269 t.aring = 556; 19270 t.Ncommaaccent = 722; 19271 t.lacute = 278; 19272 t.agrave = 556; 19273 t.Tcommaaccent = 611; 19274 t.Cacute = 722; 19275 t.atilde = 556; 19276 t.Edotaccent = 667; 19277 t.scaron = 556; 19278 t.scedilla = 556; 19279 t.iacute = 278; 19280 t.lozenge = 494; 19281 t.Rcaron = 722; 19282 t.Gcommaaccent = 778; 19283 t.ucircumflex = 611; 19284 t.acircumflex = 556; 19285 t.Amacron = 722; 19286 t.rcaron = 389; 19287 t.ccedilla = 556; 19288 t.Zdotaccent = 611; 19289 t.Thorn = 667; 19290 t.Omacron = 778; 19291 t.Racute = 722; 19292 t.Sacute = 667; 19293 t.dcaron = 743; 19294 t.Umacron = 722; 19295 t.uring = 611; 19296 t.threesuperior = 333; 19297 t.Ograve = 778; 19298 t.Agrave = 722; 19299 t.Abreve = 722; 19300 t.multiply = 584; 19301 t.uacute = 611; 19302 t.Tcaron = 611; 19303 t.partialdiff = 494; 19304 t.ydieresis = 556; 19305 t.Nacute = 722; 19306 t.icircumflex = 278; 19307 t.Ecircumflex = 667; 19308 t.adieresis = 556; 19309 t.edieresis = 556; 19310 t.cacute = 556; 19311 t.nacute = 611; 19312 t.umacron = 611; 19313 t.Ncaron = 722; 19314 t.Iacute = 278; 19315 t.plusminus = 584; 19316 t.brokenbar = 280; 19317 t.registered = 737; 19318 t.Gbreve = 778; 19319 t.Idotaccent = 278; 19320 t.summation = 600; 19321 t.Egrave = 667; 19322 t.racute = 389; 19323 t.omacron = 611; 19324 t.Zacute = 611; 19325 t.Zcaron = 611; 19326 t.greaterequal = 549; 19327 t.Eth = 722; 19328 t.Ccedilla = 722; 19329 t.lcommaaccent = 278; 19330 t.tcaron = 389; 19331 t.eogonek = 556; 19332 t.Uogonek = 722; 19333 t.Aacute = 722; 19334 t.Adieresis = 722; 19335 t.egrave = 556; 19336 t.zacute = 500; 19337 t.iogonek = 278; 19338 t.Oacute = 778; 19339 t.oacute = 611; 19340 t.amacron = 556; 19341 t.sacute = 556; 19342 t.idieresis = 278; 19343 t.Ocircumflex = 778; 19344 t.Ugrave = 722; 19345 t.Delta = 612; 19346 t.thorn = 611; 19347 t.twosuperior = 333; 19348 t.Odieresis = 778; 19349 t.mu = 611; 19350 t.igrave = 278; 19351 t.ohungarumlaut = 611; 19352 t.Eogonek = 667; 19353 t.dcroat = 611; 19354 t.threequarters = 834; 19355 t.Scedilla = 667; 19356 t.lcaron = 400; 19357 t.Kcommaaccent = 722; 19358 t.Lacute = 611; 19359 t.trademark = 1000; 19360 t.edotaccent = 556; 19361 t.Igrave = 278; 19362 t.Imacron = 278; 19363 t.Lcaron = 611; 19364 t.onehalf = 834; 19365 t.lessequal = 549; 19366 t.ocircumflex = 611; 19367 t.ntilde = 611; 19368 t.Uhungarumlaut = 722; 19369 t.Eacute = 667; 19370 t.emacron = 556; 19371 t.gbreve = 611; 19372 t.onequarter = 834; 19373 t.Scaron = 667; 19374 t.Scommaaccent = 667; 19375 t.Ohungarumlaut = 778; 19376 t.degree = 400; 19377 t.ograve = 611; 19378 t.Ccaron = 722; 19379 t.ugrave = 611; 19380 t.radical = 549; 19381 t.Dcaron = 722; 19382 t.rcommaaccent = 389; 19383 t.Ntilde = 722; 19384 t.otilde = 611; 19385 t.Rcommaaccent = 722; 19386 t.Lcommaaccent = 611; 19387 t.Atilde = 722; 19388 t.Aogonek = 722; 19389 t.Aring = 722; 19390 t.Otilde = 778; 19391 t.zdotaccent = 500; 19392 t.Ecaron = 667; 19393 t.Iogonek = 278; 19394 t.kcommaaccent = 556; 19395 t.minus = 584; 19396 t.Icircumflex = 278; 19397 t.ncaron = 611; 19398 t.tcommaaccent = 333; 19399 t.logicalnot = 584; 19400 t.odieresis = 611; 19401 t.udieresis = 611; 19402 t.notequal = 549; 19403 t.gcommaaccent = 611; 19404 t.eth = 611; 19405 t.zcaron = 500; 19406 t.ncommaaccent = 611; 19407 t.onesuperior = 333; 19408 t.imacron = 278; 19409 t.Euro = 556; 19410 }); 19411 t["Helvetica-Oblique"] = getLookupTableFactory(function (t) { 19412 t.space = 278; 19413 t.exclam = 278; 19414 t.quotedbl = 355; 19415 t.numbersign = 556; 19416 t.dollar = 556; 19417 t.percent = 889; 19418 t.ampersand = 667; 19419 t.quoteright = 222; 19420 t.parenleft = 333; 19421 t.parenright = 333; 19422 t.asterisk = 389; 19423 t.plus = 584; 19424 t.comma = 278; 19425 t.hyphen = 333; 19426 t.period = 278; 19427 t.slash = 278; 19428 t.zero = 556; 19429 t.one = 556; 19430 t.two = 556; 19431 t.three = 556; 19432 t.four = 556; 19433 t.five = 556; 19434 t.six = 556; 19435 t.seven = 556; 19436 t.eight = 556; 19437 t.nine = 556; 19438 t.colon = 278; 19439 t.semicolon = 278; 19440 t.less = 584; 19441 t.equal = 584; 19442 t.greater = 584; 19443 t.question = 556; 19444 t.at = 1015; 19445 t.A = 667; 19446 t.B = 667; 19447 t.C = 722; 19448 t.D = 722; 19449 t.E = 667; 19450 t.F = 611; 19451 t.G = 778; 19452 t.H = 722; 19453 t.I = 278; 19454 t.J = 500; 19455 t.K = 667; 19456 t.L = 556; 19457 t.M = 833; 19458 t.N = 722; 19459 t.O = 778; 19460 t.P = 667; 19461 t.Q = 778; 19462 t.R = 722; 19463 t.S = 667; 19464 t.T = 611; 19465 t.U = 722; 19466 t.V = 667; 19467 t.W = 944; 19468 t.X = 667; 19469 t.Y = 667; 19470 t.Z = 611; 19471 t.bracketleft = 278; 19472 t.backslash = 278; 19473 t.bracketright = 278; 19474 t.asciicircum = 469; 19475 t.underscore = 556; 19476 t.quoteleft = 222; 19477 t.a = 556; 19478 t.b = 556; 19479 t.c = 500; 19480 t.d = 556; 19481 t.e = 556; 19482 t.f = 278; 19483 t.g = 556; 19484 t.h = 556; 19485 t.i = 222; 19486 t.j = 222; 19487 t.k = 500; 19488 t.l = 222; 19489 t.m = 833; 19490 t.n = 556; 19491 t.o = 556; 19492 t.p = 556; 19493 t.q = 556; 19494 t.r = 333; 19495 t.s = 500; 19496 t.t = 278; 19497 t.u = 556; 19498 t.v = 500; 19499 t.w = 722; 19500 t.x = 500; 19501 t.y = 500; 19502 t.z = 500; 19503 t.braceleft = 334; 19504 t.bar = 260; 19505 t.braceright = 334; 19506 t.asciitilde = 584; 19507 t.exclamdown = 333; 19508 t.cent = 556; 19509 t.sterling = 556; 19510 t.fraction = 167; 19511 t.yen = 556; 19512 t.florin = 556; 19513 t.section = 556; 19514 t.currency = 556; 19515 t.quotesingle = 191; 19516 t.quotedblleft = 333; 19517 t.guillemotleft = 556; 19518 t.guilsinglleft = 333; 19519 t.guilsinglright = 333; 19520 t.fi = 500; 19521 t.fl = 500; 19522 t.endash = 556; 19523 t.dagger = 556; 19524 t.daggerdbl = 556; 19525 t.periodcentered = 278; 19526 t.paragraph = 537; 19527 t.bullet = 350; 19528 t.quotesinglbase = 222; 19529 t.quotedblbase = 333; 19530 t.quotedblright = 333; 19531 t.guillemotright = 556; 19532 t.ellipsis = 1000; 19533 t.perthousand = 1000; 19534 t.questiondown = 611; 19535 t.grave = 333; 19536 t.acute = 333; 19537 t.circumflex = 333; 19538 t.tilde = 333; 19539 t.macron = 333; 19540 t.breve = 333; 19541 t.dotaccent = 333; 19542 t.dieresis = 333; 19543 t.ring = 333; 19544 t.cedilla = 333; 19545 t.hungarumlaut = 333; 19546 t.ogonek = 333; 19547 t.caron = 333; 19548 t.emdash = 1000; 19549 t.AE = 1000; 19550 t.ordfeminine = 370; 19551 t.Lslash = 556; 19552 t.Oslash = 778; 19553 t.OE = 1000; 19554 t.ordmasculine = 365; 19555 t.ae = 889; 19556 t.dotlessi = 278; 19557 t.lslash = 222; 19558 t.oslash = 611; 19559 t.oe = 944; 19560 t.germandbls = 611; 19561 t.Idieresis = 278; 19562 t.eacute = 556; 19563 t.abreve = 556; 19564 t.uhungarumlaut = 556; 19565 t.ecaron = 556; 19566 t.Ydieresis = 667; 19567 t.divide = 584; 19568 t.Yacute = 667; 19569 t.Acircumflex = 667; 19570 t.aacute = 556; 19571 t.Ucircumflex = 722; 19572 t.yacute = 500; 19573 t.scommaaccent = 500; 19574 t.ecircumflex = 556; 19575 t.Uring = 722; 19576 t.Udieresis = 722; 19577 t.aogonek = 556; 19578 t.Uacute = 722; 19579 t.uogonek = 556; 19580 t.Edieresis = 667; 19581 t.Dcroat = 722; 19582 t.commaaccent = 250; 19583 t.copyright = 737; 19584 t.Emacron = 667; 19585 t.ccaron = 500; 19586 t.aring = 556; 19587 t.Ncommaaccent = 722; 19588 t.lacute = 222; 19589 t.agrave = 556; 19590 t.Tcommaaccent = 611; 19591 t.Cacute = 722; 19592 t.atilde = 556; 19593 t.Edotaccent = 667; 19594 t.scaron = 500; 19595 t.scedilla = 500; 19596 t.iacute = 278; 19597 t.lozenge = 471; 19598 t.Rcaron = 722; 19599 t.Gcommaaccent = 778; 19600 t.ucircumflex = 556; 19601 t.acircumflex = 556; 19602 t.Amacron = 667; 19603 t.rcaron = 333; 19604 t.ccedilla = 500; 19605 t.Zdotaccent = 611; 19606 t.Thorn = 667; 19607 t.Omacron = 778; 19608 t.Racute = 722; 19609 t.Sacute = 667; 19610 t.dcaron = 643; 19611 t.Umacron = 722; 19612 t.uring = 556; 19613 t.threesuperior = 333; 19614 t.Ograve = 778; 19615 t.Agrave = 667; 19616 t.Abreve = 667; 19617 t.multiply = 584; 19618 t.uacute = 556; 19619 t.Tcaron = 611; 19620 t.partialdiff = 476; 19621 t.ydieresis = 500; 19622 t.Nacute = 722; 19623 t.icircumflex = 278; 19624 t.Ecircumflex = 667; 19625 t.adieresis = 556; 19626 t.edieresis = 556; 19627 t.cacute = 500; 19628 t.nacute = 556; 19629 t.umacron = 556; 19630 t.Ncaron = 722; 19631 t.Iacute = 278; 19632 t.plusminus = 584; 19633 t.brokenbar = 260; 19634 t.registered = 737; 19635 t.Gbreve = 778; 19636 t.Idotaccent = 278; 19637 t.summation = 600; 19638 t.Egrave = 667; 19639 t.racute = 333; 19640 t.omacron = 556; 19641 t.Zacute = 611; 19642 t.Zcaron = 611; 19643 t.greaterequal = 549; 19644 t.Eth = 722; 19645 t.Ccedilla = 722; 19646 t.lcommaaccent = 222; 19647 t.tcaron = 317; 19648 t.eogonek = 556; 19649 t.Uogonek = 722; 19650 t.Aacute = 667; 19651 t.Adieresis = 667; 19652 t.egrave = 556; 19653 t.zacute = 500; 19654 t.iogonek = 222; 19655 t.Oacute = 778; 19656 t.oacute = 556; 19657 t.amacron = 556; 19658 t.sacute = 500; 19659 t.idieresis = 278; 19660 t.Ocircumflex = 778; 19661 t.Ugrave = 722; 19662 t.Delta = 612; 19663 t.thorn = 556; 19664 t.twosuperior = 333; 19665 t.Odieresis = 778; 19666 t.mu = 556; 19667 t.igrave = 278; 19668 t.ohungarumlaut = 556; 19669 t.Eogonek = 667; 19670 t.dcroat = 556; 19671 t.threequarters = 834; 19672 t.Scedilla = 667; 19673 t.lcaron = 299; 19674 t.Kcommaaccent = 667; 19675 t.Lacute = 556; 19676 t.trademark = 1000; 19677 t.edotaccent = 556; 19678 t.Igrave = 278; 19679 t.Imacron = 278; 19680 t.Lcaron = 556; 19681 t.onehalf = 834; 19682 t.lessequal = 549; 19683 t.ocircumflex = 556; 19684 t.ntilde = 556; 19685 t.Uhungarumlaut = 722; 19686 t.Eacute = 667; 19687 t.emacron = 556; 19688 t.gbreve = 556; 19689 t.onequarter = 834; 19690 t.Scaron = 667; 19691 t.Scommaaccent = 667; 19692 t.Ohungarumlaut = 778; 19693 t.degree = 400; 19694 t.ograve = 556; 19695 t.Ccaron = 722; 19696 t.ugrave = 556; 19697 t.radical = 453; 19698 t.Dcaron = 722; 19699 t.rcommaaccent = 333; 19700 t.Ntilde = 722; 19701 t.otilde = 556; 19702 t.Rcommaaccent = 722; 19703 t.Lcommaaccent = 556; 19704 t.Atilde = 667; 19705 t.Aogonek = 667; 19706 t.Aring = 667; 19707 t.Otilde = 778; 19708 t.zdotaccent = 500; 19709 t.Ecaron = 667; 19710 t.Iogonek = 278; 19711 t.kcommaaccent = 500; 19712 t.minus = 584; 19713 t.Icircumflex = 278; 19714 t.ncaron = 556; 19715 t.tcommaaccent = 278; 19716 t.logicalnot = 584; 19717 t.odieresis = 556; 19718 t.udieresis = 556; 19719 t.notequal = 549; 19720 t.gcommaaccent = 556; 19721 t.eth = 556; 19722 t.zcaron = 500; 19723 t.ncommaaccent = 556; 19724 t.onesuperior = 333; 19725 t.imacron = 278; 19726 t.Euro = 556; 19727 }); 19728 t.Symbol = getLookupTableFactory(function (t) { 19729 t.space = 250; 19730 t.exclam = 333; 19731 t.universal = 713; 19732 t.numbersign = 500; 19733 t.existential = 549; 19734 t.percent = 833; 19735 t.ampersand = 778; 19736 t.suchthat = 439; 19737 t.parenleft = 333; 19738 t.parenright = 333; 19739 t.asteriskmath = 500; 19740 t.plus = 549; 19741 t.comma = 250; 19742 t.minus = 549; 19743 t.period = 250; 19744 t.slash = 278; 19745 t.zero = 500; 19746 t.one = 500; 19747 t.two = 500; 19748 t.three = 500; 19749 t.four = 500; 19750 t.five = 500; 19751 t.six = 500; 19752 t.seven = 500; 19753 t.eight = 500; 19754 t.nine = 500; 19755 t.colon = 278; 19756 t.semicolon = 278; 19757 t.less = 549; 19758 t.equal = 549; 19759 t.greater = 549; 19760 t.question = 444; 19761 t.congruent = 549; 19762 t.Alpha = 722; 19763 t.Beta = 667; 19764 t.Chi = 722; 19765 t.Delta = 612; 19766 t.Epsilon = 611; 19767 t.Phi = 763; 19768 t.Gamma = 603; 19769 t.Eta = 722; 19770 t.Iota = 333; 19771 t.theta1 = 631; 19772 t.Kappa = 722; 19773 t.Lambda = 686; 19774 t.Mu = 889; 19775 t.Nu = 722; 19776 t.Omicron = 722; 19777 t.Pi = 768; 19778 t.Theta = 741; 19779 t.Rho = 556; 19780 t.Sigma = 592; 19781 t.Tau = 611; 19782 t.Upsilon = 690; 19783 t.sigma1 = 439; 19784 t.Omega = 768; 19785 t.Xi = 645; 19786 t.Psi = 795; 19787 t.Zeta = 611; 19788 t.bracketleft = 333; 19789 t.therefore = 863; 19790 t.bracketright = 333; 19791 t.perpendicular = 658; 19792 t.underscore = 500; 19793 t.radicalex = 500; 19794 t.alpha = 631; 19795 t.beta = 549; 19796 t.chi = 549; 19797 t.delta = 494; 19798 t.epsilon = 439; 19799 t.phi = 521; 19800 t.gamma = 411; 19801 t.eta = 603; 19802 t.iota = 329; 19803 t.phi1 = 603; 19804 t.kappa = 549; 19805 t.lambda = 549; 19806 t.mu = 576; 19807 t.nu = 521; 19808 t.omicron = 549; 19809 t.pi = 549; 19810 t.theta = 521; 19811 t.rho = 549; 19812 t.sigma = 603; 19813 t.tau = 439; 19814 t.upsilon = 576; 19815 t.omega1 = 713; 19816 t.omega = 686; 19817 t.xi = 493; 19818 t.psi = 686; 19819 t.zeta = 494; 19820 t.braceleft = 480; 19821 t.bar = 200; 19822 t.braceright = 480; 19823 t.similar = 549; 19824 t.Euro = 750; 19825 t.Upsilon1 = 620; 19826 t.minute = 247; 19827 t.lessequal = 549; 19828 t.fraction = 167; 19829 t.infinity = 713; 19830 t.florin = 500; 19831 t.club = 753; 19832 t.diamond = 753; 19833 t.heart = 753; 19834 t.spade = 753; 19835 t.arrowboth = 1042; 19836 t.arrowleft = 987; 19837 t.arrowup = 603; 19838 t.arrowright = 987; 19839 t.arrowdown = 603; 19840 t.degree = 400; 19841 t.plusminus = 549; 19842 t.second = 411; 19843 t.greaterequal = 549; 19844 t.multiply = 549; 19845 t.proportional = 713; 19846 t.partialdiff = 494; 19847 t.bullet = 460; 19848 t.divide = 549; 19849 t.notequal = 549; 19850 t.equivalence = 549; 19851 t.approxequal = 549; 19852 t.ellipsis = 1000; 19853 t.arrowvertex = 603; 19854 t.arrowhorizex = 1000; 19855 t.carriagereturn = 658; 19856 t.aleph = 823; 19857 t.Ifraktur = 686; 19858 t.Rfraktur = 795; 19859 t.weierstrass = 987; 19860 t.circlemultiply = 768; 19861 t.circleplus = 768; 19862 t.emptyset = 823; 19863 t.intersection = 768; 19864 t.union = 768; 19865 t.propersuperset = 713; 19866 t.reflexsuperset = 713; 19867 t.notsubset = 713; 19868 t.propersubset = 713; 19869 t.reflexsubset = 713; 19870 t.element = 713; 19871 t.notelement = 713; 19872 t.angle = 768; 19873 t.gradient = 713; 19874 t.registerserif = 790; 19875 t.copyrightserif = 790; 19876 t.trademarkserif = 890; 19877 t.product = 823; 19878 t.radical = 549; 19879 t.dotmath = 250; 19880 t.logicalnot = 713; 19881 t.logicaland = 603; 19882 t.logicalor = 603; 19883 t.arrowdblboth = 1042; 19884 t.arrowdblleft = 987; 19885 t.arrowdblup = 603; 19886 t.arrowdblright = 987; 19887 t.arrowdbldown = 603; 19888 t.lozenge = 494; 19889 t.angleleft = 329; 19890 t.registersans = 790; 19891 t.copyrightsans = 790; 19892 t.trademarksans = 786; 19893 t.summation = 713; 19894 t.parenlefttp = 384; 19895 t.parenleftex = 384; 19896 t.parenleftbt = 384; 19897 t.bracketlefttp = 384; 19898 t.bracketleftex = 384; 19899 t.bracketleftbt = 384; 19900 t.bracelefttp = 494; 19901 t.braceleftmid = 494; 19902 t.braceleftbt = 494; 19903 t.braceex = 494; 19904 t.angleright = 329; 19905 t.integral = 274; 19906 t.integraltp = 686; 19907 t.integralex = 686; 19908 t.integralbt = 686; 19909 t.parenrighttp = 384; 19910 t.parenrightex = 384; 19911 t.parenrightbt = 384; 19912 t.bracketrighttp = 384; 19913 t.bracketrightex = 384; 19914 t.bracketrightbt = 384; 19915 t.bracerighttp = 494; 19916 t.bracerightmid = 494; 19917 t.bracerightbt = 494; 19918 t.apple = 790; 19919 }); 19920 t["Times-Roman"] = getLookupTableFactory(function (t) { 19921 t.space = 250; 19922 t.exclam = 333; 19923 t.quotedbl = 408; 19924 t.numbersign = 500; 19925 t.dollar = 500; 19926 t.percent = 833; 19927 t.ampersand = 778; 19928 t.quoteright = 333; 19929 t.parenleft = 333; 19930 t.parenright = 333; 19931 t.asterisk = 500; 19932 t.plus = 564; 19933 t.comma = 250; 19934 t.hyphen = 333; 19935 t.period = 250; 19936 t.slash = 278; 19937 t.zero = 500; 19938 t.one = 500; 19939 t.two = 500; 19940 t.three = 500; 19941 t.four = 500; 19942 t.five = 500; 19943 t.six = 500; 19944 t.seven = 500; 19945 t.eight = 500; 19946 t.nine = 500; 19947 t.colon = 278; 19948 t.semicolon = 278; 19949 t.less = 564; 19950 t.equal = 564; 19951 t.greater = 564; 19952 t.question = 444; 19953 t.at = 921; 19954 t.A = 722; 19955 t.B = 667; 19956 t.C = 667; 19957 t.D = 722; 19958 t.E = 611; 19959 t.F = 556; 19960 t.G = 722; 19961 t.H = 722; 19962 t.I = 333; 19963 t.J = 389; 19964 t.K = 722; 19965 t.L = 611; 19966 t.M = 889; 19967 t.N = 722; 19968 t.O = 722; 19969 t.P = 556; 19970 t.Q = 722; 19971 t.R = 667; 19972 t.S = 556; 19973 t.T = 611; 19974 t.U = 722; 19975 t.V = 722; 19976 t.W = 944; 19977 t.X = 722; 19978 t.Y = 722; 19979 t.Z = 611; 19980 t.bracketleft = 333; 19981 t.backslash = 278; 19982 t.bracketright = 333; 19983 t.asciicircum = 469; 19984 t.underscore = 500; 19985 t.quoteleft = 333; 19986 t.a = 444; 19987 t.b = 500; 19988 t.c = 444; 19989 t.d = 500; 19990 t.e = 444; 19991 t.f = 333; 19992 t.g = 500; 19993 t.h = 500; 19994 t.i = 278; 19995 t.j = 278; 19996 t.k = 500; 19997 t.l = 278; 19998 t.m = 778; 19999 t.n = 500; 20000 t.o = 500; 20001 t.p = 500; 20002 t.q = 500; 20003 t.r = 333; 20004 t.s = 389; 20005 t.t = 278; 20006 t.u = 500; 20007 t.v = 500; 20008 t.w = 722; 20009 t.x = 500; 20010 t.y = 500; 20011 t.z = 444; 20012 t.braceleft = 480; 20013 t.bar = 200; 20014 t.braceright = 480; 20015 t.asciitilde = 541; 20016 t.exclamdown = 333; 20017 t.cent = 500; 20018 t.sterling = 500; 20019 t.fraction = 167; 20020 t.yen = 500; 20021 t.florin = 500; 20022 t.section = 500; 20023 t.currency = 500; 20024 t.quotesingle = 180; 20025 t.quotedblleft = 444; 20026 t.guillemotleft = 500; 20027 t.guilsinglleft = 333; 20028 t.guilsinglright = 333; 20029 t.fi = 556; 20030 t.fl = 556; 20031 t.endash = 500; 20032 t.dagger = 500; 20033 t.daggerdbl = 500; 20034 t.periodcentered = 250; 20035 t.paragraph = 453; 20036 t.bullet = 350; 20037 t.quotesinglbase = 333; 20038 t.quotedblbase = 444; 20039 t.quotedblright = 444; 20040 t.guillemotright = 500; 20041 t.ellipsis = 1000; 20042 t.perthousand = 1000; 20043 t.questiondown = 444; 20044 t.grave = 333; 20045 t.acute = 333; 20046 t.circumflex = 333; 20047 t.tilde = 333; 20048 t.macron = 333; 20049 t.breve = 333; 20050 t.dotaccent = 333; 20051 t.dieresis = 333; 20052 t.ring = 333; 20053 t.cedilla = 333; 20054 t.hungarumlaut = 333; 20055 t.ogonek = 333; 20056 t.caron = 333; 20057 t.emdash = 1000; 20058 t.AE = 889; 20059 t.ordfeminine = 276; 20060 t.Lslash = 611; 20061 t.Oslash = 722; 20062 t.OE = 889; 20063 t.ordmasculine = 310; 20064 t.ae = 667; 20065 t.dotlessi = 278; 20066 t.lslash = 278; 20067 t.oslash = 500; 20068 t.oe = 722; 20069 t.germandbls = 500; 20070 t.Idieresis = 333; 20071 t.eacute = 444; 20072 t.abreve = 444; 20073 t.uhungarumlaut = 500; 20074 t.ecaron = 444; 20075 t.Ydieresis = 722; 20076 t.divide = 564; 20077 t.Yacute = 722; 20078 t.Acircumflex = 722; 20079 t.aacute = 444; 20080 t.Ucircumflex = 722; 20081 t.yacute = 500; 20082 t.scommaaccent = 389; 20083 t.ecircumflex = 444; 20084 t.Uring = 722; 20085 t.Udieresis = 722; 20086 t.aogonek = 444; 20087 t.Uacute = 722; 20088 t.uogonek = 500; 20089 t.Edieresis = 611; 20090 t.Dcroat = 722; 20091 t.commaaccent = 250; 20092 t.copyright = 760; 20093 t.Emacron = 611; 20094 t.ccaron = 444; 20095 t.aring = 444; 20096 t.Ncommaaccent = 722; 20097 t.lacute = 278; 20098 t.agrave = 444; 20099 t.Tcommaaccent = 611; 20100 t.Cacute = 667; 20101 t.atilde = 444; 20102 t.Edotaccent = 611; 20103 t.scaron = 389; 20104 t.scedilla = 389; 20105 t.iacute = 278; 20106 t.lozenge = 471; 20107 t.Rcaron = 667; 20108 t.Gcommaaccent = 722; 20109 t.ucircumflex = 500; 20110 t.acircumflex = 444; 20111 t.Amacron = 722; 20112 t.rcaron = 333; 20113 t.ccedilla = 444; 20114 t.Zdotaccent = 611; 20115 t.Thorn = 556; 20116 t.Omacron = 722; 20117 t.Racute = 667; 20118 t.Sacute = 556; 20119 t.dcaron = 588; 20120 t.Umacron = 722; 20121 t.uring = 500; 20122 t.threesuperior = 300; 20123 t.Ograve = 722; 20124 t.Agrave = 722; 20125 t.Abreve = 722; 20126 t.multiply = 564; 20127 t.uacute = 500; 20128 t.Tcaron = 611; 20129 t.partialdiff = 476; 20130 t.ydieresis = 500; 20131 t.Nacute = 722; 20132 t.icircumflex = 278; 20133 t.Ecircumflex = 611; 20134 t.adieresis = 444; 20135 t.edieresis = 444; 20136 t.cacute = 444; 20137 t.nacute = 500; 20138 t.umacron = 500; 20139 t.Ncaron = 722; 20140 t.Iacute = 333; 20141 t.plusminus = 564; 20142 t.brokenbar = 200; 20143 t.registered = 760; 20144 t.Gbreve = 722; 20145 t.Idotaccent = 333; 20146 t.summation = 600; 20147 t.Egrave = 611; 20148 t.racute = 333; 20149 t.omacron = 500; 20150 t.Zacute = 611; 20151 t.Zcaron = 611; 20152 t.greaterequal = 549; 20153 t.Eth = 722; 20154 t.Ccedilla = 667; 20155 t.lcommaaccent = 278; 20156 t.tcaron = 326; 20157 t.eogonek = 444; 20158 t.Uogonek = 722; 20159 t.Aacute = 722; 20160 t.Adieresis = 722; 20161 t.egrave = 444; 20162 t.zacute = 444; 20163 t.iogonek = 278; 20164 t.Oacute = 722; 20165 t.oacute = 500; 20166 t.amacron = 444; 20167 t.sacute = 389; 20168 t.idieresis = 278; 20169 t.Ocircumflex = 722; 20170 t.Ugrave = 722; 20171 t.Delta = 612; 20172 t.thorn = 500; 20173 t.twosuperior = 300; 20174 t.Odieresis = 722; 20175 t.mu = 500; 20176 t.igrave = 278; 20177 t.ohungarumlaut = 500; 20178 t.Eogonek = 611; 20179 t.dcroat = 500; 20180 t.threequarters = 750; 20181 t.Scedilla = 556; 20182 t.lcaron = 344; 20183 t.Kcommaaccent = 722; 20184 t.Lacute = 611; 20185 t.trademark = 980; 20186 t.edotaccent = 444; 20187 t.Igrave = 333; 20188 t.Imacron = 333; 20189 t.Lcaron = 611; 20190 t.onehalf = 750; 20191 t.lessequal = 549; 20192 t.ocircumflex = 500; 20193 t.ntilde = 500; 20194 t.Uhungarumlaut = 722; 20195 t.Eacute = 611; 20196 t.emacron = 444; 20197 t.gbreve = 500; 20198 t.onequarter = 750; 20199 t.Scaron = 556; 20200 t.Scommaaccent = 556; 20201 t.Ohungarumlaut = 722; 20202 t.degree = 400; 20203 t.ograve = 500; 20204 t.Ccaron = 667; 20205 t.ugrave = 500; 20206 t.radical = 453; 20207 t.Dcaron = 722; 20208 t.rcommaaccent = 333; 20209 t.Ntilde = 722; 20210 t.otilde = 500; 20211 t.Rcommaaccent = 667; 20212 t.Lcommaaccent = 611; 20213 t.Atilde = 722; 20214 t.Aogonek = 722; 20215 t.Aring = 722; 20216 t.Otilde = 722; 20217 t.zdotaccent = 444; 20218 t.Ecaron = 611; 20219 t.Iogonek = 333; 20220 t.kcommaaccent = 500; 20221 t.minus = 564; 20222 t.Icircumflex = 333; 20223 t.ncaron = 500; 20224 t.tcommaaccent = 278; 20225 t.logicalnot = 564; 20226 t.odieresis = 500; 20227 t.udieresis = 500; 20228 t.notequal = 549; 20229 t.gcommaaccent = 500; 20230 t.eth = 500; 20231 t.zcaron = 444; 20232 t.ncommaaccent = 500; 20233 t.onesuperior = 300; 20234 t.imacron = 278; 20235 t.Euro = 500; 20236 }); 20237 t["Times-Bold"] = getLookupTableFactory(function (t) { 20238 t.space = 250; 20239 t.exclam = 333; 20240 t.quotedbl = 555; 20241 t.numbersign = 500; 20242 t.dollar = 500; 20243 t.percent = 1000; 20244 t.ampersand = 833; 20245 t.quoteright = 333; 20246 t.parenleft = 333; 20247 t.parenright = 333; 20248 t.asterisk = 500; 20249 t.plus = 570; 20250 t.comma = 250; 20251 t.hyphen = 333; 20252 t.period = 250; 20253 t.slash = 278; 20254 t.zero = 500; 20255 t.one = 500; 20256 t.two = 500; 20257 t.three = 500; 20258 t.four = 500; 20259 t.five = 500; 20260 t.six = 500; 20261 t.seven = 500; 20262 t.eight = 500; 20263 t.nine = 500; 20264 t.colon = 333; 20265 t.semicolon = 333; 20266 t.less = 570; 20267 t.equal = 570; 20268 t.greater = 570; 20269 t.question = 500; 20270 t.at = 930; 20271 t.A = 722; 20272 t.B = 667; 20273 t.C = 722; 20274 t.D = 722; 20275 t.E = 667; 20276 t.F = 611; 20277 t.G = 778; 20278 t.H = 778; 20279 t.I = 389; 20280 t.J = 500; 20281 t.K = 778; 20282 t.L = 667; 20283 t.M = 944; 20284 t.N = 722; 20285 t.O = 778; 20286 t.P = 611; 20287 t.Q = 778; 20288 t.R = 722; 20289 t.S = 556; 20290 t.T = 667; 20291 t.U = 722; 20292 t.V = 722; 20293 t.W = 1000; 20294 t.X = 722; 20295 t.Y = 722; 20296 t.Z = 667; 20297 t.bracketleft = 333; 20298 t.backslash = 278; 20299 t.bracketright = 333; 20300 t.asciicircum = 581; 20301 t.underscore = 500; 20302 t.quoteleft = 333; 20303 t.a = 500; 20304 t.b = 556; 20305 t.c = 444; 20306 t.d = 556; 20307 t.e = 444; 20308 t.f = 333; 20309 t.g = 500; 20310 t.h = 556; 20311 t.i = 278; 20312 t.j = 333; 20313 t.k = 556; 20314 t.l = 278; 20315 t.m = 833; 20316 t.n = 556; 20317 t.o = 500; 20318 t.p = 556; 20319 t.q = 556; 20320 t.r = 444; 20321 t.s = 389; 20322 t.t = 333; 20323 t.u = 556; 20324 t.v = 500; 20325 t.w = 722; 20326 t.x = 500; 20327 t.y = 500; 20328 t.z = 444; 20329 t.braceleft = 394; 20330 t.bar = 220; 20331 t.braceright = 394; 20332 t.asciitilde = 520; 20333 t.exclamdown = 333; 20334 t.cent = 500; 20335 t.sterling = 500; 20336 t.fraction = 167; 20337 t.yen = 500; 20338 t.florin = 500; 20339 t.section = 500; 20340 t.currency = 500; 20341 t.quotesingle = 278; 20342 t.quotedblleft = 500; 20343 t.guillemotleft = 500; 20344 t.guilsinglleft = 333; 20345 t.guilsinglright = 333; 20346 t.fi = 556; 20347 t.fl = 556; 20348 t.endash = 500; 20349 t.dagger = 500; 20350 t.daggerdbl = 500; 20351 t.periodcentered = 250; 20352 t.paragraph = 540; 20353 t.bullet = 350; 20354 t.quotesinglbase = 333; 20355 t.quotedblbase = 500; 20356 t.quotedblright = 500; 20357 t.guillemotright = 500; 20358 t.ellipsis = 1000; 20359 t.perthousand = 1000; 20360 t.questiondown = 500; 20361 t.grave = 333; 20362 t.acute = 333; 20363 t.circumflex = 333; 20364 t.tilde = 333; 20365 t.macron = 333; 20366 t.breve = 333; 20367 t.dotaccent = 333; 20368 t.dieresis = 333; 20369 t.ring = 333; 20370 t.cedilla = 333; 20371 t.hungarumlaut = 333; 20372 t.ogonek = 333; 20373 t.caron = 333; 20374 t.emdash = 1000; 20375 t.AE = 1000; 20376 t.ordfeminine = 300; 20377 t.Lslash = 667; 20378 t.Oslash = 778; 20379 t.OE = 1000; 20380 t.ordmasculine = 330; 20381 t.ae = 722; 20382 t.dotlessi = 278; 20383 t.lslash = 278; 20384 t.oslash = 500; 20385 t.oe = 722; 20386 t.germandbls = 556; 20387 t.Idieresis = 389; 20388 t.eacute = 444; 20389 t.abreve = 500; 20390 t.uhungarumlaut = 556; 20391 t.ecaron = 444; 20392 t.Ydieresis = 722; 20393 t.divide = 570; 20394 t.Yacute = 722; 20395 t.Acircumflex = 722; 20396 t.aacute = 500; 20397 t.Ucircumflex = 722; 20398 t.yacute = 500; 20399 t.scommaaccent = 389; 20400 t.ecircumflex = 444; 20401 t.Uring = 722; 20402 t.Udieresis = 722; 20403 t.aogonek = 500; 20404 t.Uacute = 722; 20405 t.uogonek = 556; 20406 t.Edieresis = 667; 20407 t.Dcroat = 722; 20408 t.commaaccent = 250; 20409 t.copyright = 747; 20410 t.Emacron = 667; 20411 t.ccaron = 444; 20412 t.aring = 500; 20413 t.Ncommaaccent = 722; 20414 t.lacute = 278; 20415 t.agrave = 500; 20416 t.Tcommaaccent = 667; 20417 t.Cacute = 722; 20418 t.atilde = 500; 20419 t.Edotaccent = 667; 20420 t.scaron = 389; 20421 t.scedilla = 389; 20422 t.iacute = 278; 20423 t.lozenge = 494; 20424 t.Rcaron = 722; 20425 t.Gcommaaccent = 778; 20426 t.ucircumflex = 556; 20427 t.acircumflex = 500; 20428 t.Amacron = 722; 20429 t.rcaron = 444; 20430 t.ccedilla = 444; 20431 t.Zdotaccent = 667; 20432 t.Thorn = 611; 20433 t.Omacron = 778; 20434 t.Racute = 722; 20435 t.Sacute = 556; 20436 t.dcaron = 672; 20437 t.Umacron = 722; 20438 t.uring = 556; 20439 t.threesuperior = 300; 20440 t.Ograve = 778; 20441 t.Agrave = 722; 20442 t.Abreve = 722; 20443 t.multiply = 570; 20444 t.uacute = 556; 20445 t.Tcaron = 667; 20446 t.partialdiff = 494; 20447 t.ydieresis = 500; 20448 t.Nacute = 722; 20449 t.icircumflex = 278; 20450 t.Ecircumflex = 667; 20451 t.adieresis = 500; 20452 t.edieresis = 444; 20453 t.cacute = 444; 20454 t.nacute = 556; 20455 t.umacron = 556; 20456 t.Ncaron = 722; 20457 t.Iacute = 389; 20458 t.plusminus = 570; 20459 t.brokenbar = 220; 20460 t.registered = 747; 20461 t.Gbreve = 778; 20462 t.Idotaccent = 389; 20463 t.summation = 600; 20464 t.Egrave = 667; 20465 t.racute = 444; 20466 t.omacron = 500; 20467 t.Zacute = 667; 20468 t.Zcaron = 667; 20469 t.greaterequal = 549; 20470 t.Eth = 722; 20471 t.Ccedilla = 722; 20472 t.lcommaaccent = 278; 20473 t.tcaron = 416; 20474 t.eogonek = 444; 20475 t.Uogonek = 722; 20476 t.Aacute = 722; 20477 t.Adieresis = 722; 20478 t.egrave = 444; 20479 t.zacute = 444; 20480 t.iogonek = 278; 20481 t.Oacute = 778; 20482 t.oacute = 500; 20483 t.amacron = 500; 20484 t.sacute = 389; 20485 t.idieresis = 278; 20486 t.Ocircumflex = 778; 20487 t.Ugrave = 722; 20488 t.Delta = 612; 20489 t.thorn = 556; 20490 t.twosuperior = 300; 20491 t.Odieresis = 778; 20492 t.mu = 556; 20493 t.igrave = 278; 20494 t.ohungarumlaut = 500; 20495 t.Eogonek = 667; 20496 t.dcroat = 556; 20497 t.threequarters = 750; 20498 t.Scedilla = 556; 20499 t.lcaron = 394; 20500 t.Kcommaaccent = 778; 20501 t.Lacute = 667; 20502 t.trademark = 1000; 20503 t.edotaccent = 444; 20504 t.Igrave = 389; 20505 t.Imacron = 389; 20506 t.Lcaron = 667; 20507 t.onehalf = 750; 20508 t.lessequal = 549; 20509 t.ocircumflex = 500; 20510 t.ntilde = 556; 20511 t.Uhungarumlaut = 722; 20512 t.Eacute = 667; 20513 t.emacron = 444; 20514 t.gbreve = 500; 20515 t.onequarter = 750; 20516 t.Scaron = 556; 20517 t.Scommaaccent = 556; 20518 t.Ohungarumlaut = 778; 20519 t.degree = 400; 20520 t.ograve = 500; 20521 t.Ccaron = 722; 20522 t.ugrave = 556; 20523 t.radical = 549; 20524 t.Dcaron = 722; 20525 t.rcommaaccent = 444; 20526 t.Ntilde = 722; 20527 t.otilde = 500; 20528 t.Rcommaaccent = 722; 20529 t.Lcommaaccent = 667; 20530 t.Atilde = 722; 20531 t.Aogonek = 722; 20532 t.Aring = 722; 20533 t.Otilde = 778; 20534 t.zdotaccent = 444; 20535 t.Ecaron = 667; 20536 t.Iogonek = 389; 20537 t.kcommaaccent = 556; 20538 t.minus = 570; 20539 t.Icircumflex = 389; 20540 t.ncaron = 556; 20541 t.tcommaaccent = 333; 20542 t.logicalnot = 570; 20543 t.odieresis = 500; 20544 t.udieresis = 556; 20545 t.notequal = 549; 20546 t.gcommaaccent = 500; 20547 t.eth = 500; 20548 t.zcaron = 444; 20549 t.ncommaaccent = 556; 20550 t.onesuperior = 300; 20551 t.imacron = 278; 20552 t.Euro = 500; 20553 }); 20554 t["Times-BoldItalic"] = getLookupTableFactory(function (t) { 20555 t.space = 250; 20556 t.exclam = 389; 20557 t.quotedbl = 555; 20558 t.numbersign = 500; 20559 t.dollar = 500; 20560 t.percent = 833; 20561 t.ampersand = 778; 20562 t.quoteright = 333; 20563 t.parenleft = 333; 20564 t.parenright = 333; 20565 t.asterisk = 500; 20566 t.plus = 570; 20567 t.comma = 250; 20568 t.hyphen = 333; 20569 t.period = 250; 20570 t.slash = 278; 20571 t.zero = 500; 20572 t.one = 500; 20573 t.two = 500; 20574 t.three = 500; 20575 t.four = 500; 20576 t.five = 500; 20577 t.six = 500; 20578 t.seven = 500; 20579 t.eight = 500; 20580 t.nine = 500; 20581 t.colon = 333; 20582 t.semicolon = 333; 20583 t.less = 570; 20584 t.equal = 570; 20585 t.greater = 570; 20586 t.question = 500; 20587 t.at = 832; 20588 t.A = 667; 20589 t.B = 667; 20590 t.C = 667; 20591 t.D = 722; 20592 t.E = 667; 20593 t.F = 667; 20594 t.G = 722; 20595 t.H = 778; 20596 t.I = 389; 20597 t.J = 500; 20598 t.K = 667; 20599 t.L = 611; 20600 t.M = 889; 20601 t.N = 722; 20602 t.O = 722; 20603 t.P = 611; 20604 t.Q = 722; 20605 t.R = 667; 20606 t.S = 556; 20607 t.T = 611; 20608 t.U = 722; 20609 t.V = 667; 20610 t.W = 889; 20611 t.X = 667; 20612 t.Y = 611; 20613 t.Z = 611; 20614 t.bracketleft = 333; 20615 t.backslash = 278; 20616 t.bracketright = 333; 20617 t.asciicircum = 570; 20618 t.underscore = 500; 20619 t.quoteleft = 333; 20620 t.a = 500; 20621 t.b = 500; 20622 t.c = 444; 20623 t.d = 500; 20624 t.e = 444; 20625 t.f = 333; 20626 t.g = 500; 20627 t.h = 556; 20628 t.i = 278; 20629 t.j = 278; 20630 t.k = 500; 20631 t.l = 278; 20632 t.m = 778; 20633 t.n = 556; 20634 t.o = 500; 20635 t.p = 500; 20636 t.q = 500; 20637 t.r = 389; 20638 t.s = 389; 20639 t.t = 278; 20640 t.u = 556; 20641 t.v = 444; 20642 t.w = 667; 20643 t.x = 500; 20644 t.y = 444; 20645 t.z = 389; 20646 t.braceleft = 348; 20647 t.bar = 220; 20648 t.braceright = 348; 20649 t.asciitilde = 570; 20650 t.exclamdown = 389; 20651 t.cent = 500; 20652 t.sterling = 500; 20653 t.fraction = 167; 20654 t.yen = 500; 20655 t.florin = 500; 20656 t.section = 500; 20657 t.currency = 500; 20658 t.quotesingle = 278; 20659 t.quotedblleft = 500; 20660 t.guillemotleft = 500; 20661 t.guilsinglleft = 333; 20662 t.guilsinglright = 333; 20663 t.fi = 556; 20664 t.fl = 556; 20665 t.endash = 500; 20666 t.dagger = 500; 20667 t.daggerdbl = 500; 20668 t.periodcentered = 250; 20669 t.paragraph = 500; 20670 t.bullet = 350; 20671 t.quotesinglbase = 333; 20672 t.quotedblbase = 500; 20673 t.quotedblright = 500; 20674 t.guillemotright = 500; 20675 t.ellipsis = 1000; 20676 t.perthousand = 1000; 20677 t.questiondown = 500; 20678 t.grave = 333; 20679 t.acute = 333; 20680 t.circumflex = 333; 20681 t.tilde = 333; 20682 t.macron = 333; 20683 t.breve = 333; 20684 t.dotaccent = 333; 20685 t.dieresis = 333; 20686 t.ring = 333; 20687 t.cedilla = 333; 20688 t.hungarumlaut = 333; 20689 t.ogonek = 333; 20690 t.caron = 333; 20691 t.emdash = 1000; 20692 t.AE = 944; 20693 t.ordfeminine = 266; 20694 t.Lslash = 611; 20695 t.Oslash = 722; 20696 t.OE = 944; 20697 t.ordmasculine = 300; 20698 t.ae = 722; 20699 t.dotlessi = 278; 20700 t.lslash = 278; 20701 t.oslash = 500; 20702 t.oe = 722; 20703 t.germandbls = 500; 20704 t.Idieresis = 389; 20705 t.eacute = 444; 20706 t.abreve = 500; 20707 t.uhungarumlaut = 556; 20708 t.ecaron = 444; 20709 t.Ydieresis = 611; 20710 t.divide = 570; 20711 t.Yacute = 611; 20712 t.Acircumflex = 667; 20713 t.aacute = 500; 20714 t.Ucircumflex = 722; 20715 t.yacute = 444; 20716 t.scommaaccent = 389; 20717 t.ecircumflex = 444; 20718 t.Uring = 722; 20719 t.Udieresis = 722; 20720 t.aogonek = 500; 20721 t.Uacute = 722; 20722 t.uogonek = 556; 20723 t.Edieresis = 667; 20724 t.Dcroat = 722; 20725 t.commaaccent = 250; 20726 t.copyright = 747; 20727 t.Emacron = 667; 20728 t.ccaron = 444; 20729 t.aring = 500; 20730 t.Ncommaaccent = 722; 20731 t.lacute = 278; 20732 t.agrave = 500; 20733 t.Tcommaaccent = 611; 20734 t.Cacute = 667; 20735 t.atilde = 500; 20736 t.Edotaccent = 667; 20737 t.scaron = 389; 20738 t.scedilla = 389; 20739 t.iacute = 278; 20740 t.lozenge = 494; 20741 t.Rcaron = 667; 20742 t.Gcommaaccent = 722; 20743 t.ucircumflex = 556; 20744 t.acircumflex = 500; 20745 t.Amacron = 667; 20746 t.rcaron = 389; 20747 t.ccedilla = 444; 20748 t.Zdotaccent = 611; 20749 t.Thorn = 611; 20750 t.Omacron = 722; 20751 t.Racute = 667; 20752 t.Sacute = 556; 20753 t.dcaron = 608; 20754 t.Umacron = 722; 20755 t.uring = 556; 20756 t.threesuperior = 300; 20757 t.Ograve = 722; 20758 t.Agrave = 667; 20759 t.Abreve = 667; 20760 t.multiply = 570; 20761 t.uacute = 556; 20762 t.Tcaron = 611; 20763 t.partialdiff = 494; 20764 t.ydieresis = 444; 20765 t.Nacute = 722; 20766 t.icircumflex = 278; 20767 t.Ecircumflex = 667; 20768 t.adieresis = 500; 20769 t.edieresis = 444; 20770 t.cacute = 444; 20771 t.nacute = 556; 20772 t.umacron = 556; 20773 t.Ncaron = 722; 20774 t.Iacute = 389; 20775 t.plusminus = 570; 20776 t.brokenbar = 220; 20777 t.registered = 747; 20778 t.Gbreve = 722; 20779 t.Idotaccent = 389; 20780 t.summation = 600; 20781 t.Egrave = 667; 20782 t.racute = 389; 20783 t.omacron = 500; 20784 t.Zacute = 611; 20785 t.Zcaron = 611; 20786 t.greaterequal = 549; 20787 t.Eth = 722; 20788 t.Ccedilla = 667; 20789 t.lcommaaccent = 278; 20790 t.tcaron = 366; 20791 t.eogonek = 444; 20792 t.Uogonek = 722; 20793 t.Aacute = 667; 20794 t.Adieresis = 667; 20795 t.egrave = 444; 20796 t.zacute = 389; 20797 t.iogonek = 278; 20798 t.Oacute = 722; 20799 t.oacute = 500; 20800 t.amacron = 500; 20801 t.sacute = 389; 20802 t.idieresis = 278; 20803 t.Ocircumflex = 722; 20804 t.Ugrave = 722; 20805 t.Delta = 612; 20806 t.thorn = 500; 20807 t.twosuperior = 300; 20808 t.Odieresis = 722; 20809 t.mu = 576; 20810 t.igrave = 278; 20811 t.ohungarumlaut = 500; 20812 t.Eogonek = 667; 20813 t.dcroat = 500; 20814 t.threequarters = 750; 20815 t.Scedilla = 556; 20816 t.lcaron = 382; 20817 t.Kcommaaccent = 667; 20818 t.Lacute = 611; 20819 t.trademark = 1000; 20820 t.edotaccent = 444; 20821 t.Igrave = 389; 20822 t.Imacron = 389; 20823 t.Lcaron = 611; 20824 t.onehalf = 750; 20825 t.lessequal = 549; 20826 t.ocircumflex = 500; 20827 t.ntilde = 556; 20828 t.Uhungarumlaut = 722; 20829 t.Eacute = 667; 20830 t.emacron = 444; 20831 t.gbreve = 500; 20832 t.onequarter = 750; 20833 t.Scaron = 556; 20834 t.Scommaaccent = 556; 20835 t.Ohungarumlaut = 722; 20836 t.degree = 400; 20837 t.ograve = 500; 20838 t.Ccaron = 667; 20839 t.ugrave = 556; 20840 t.radical = 549; 20841 t.Dcaron = 722; 20842 t.rcommaaccent = 389; 20843 t.Ntilde = 722; 20844 t.otilde = 500; 20845 t.Rcommaaccent = 667; 20846 t.Lcommaaccent = 611; 20847 t.Atilde = 667; 20848 t.Aogonek = 667; 20849 t.Aring = 667; 20850 t.Otilde = 722; 20851 t.zdotaccent = 389; 20852 t.Ecaron = 667; 20853 t.Iogonek = 389; 20854 t.kcommaaccent = 500; 20855 t.minus = 606; 20856 t.Icircumflex = 389; 20857 t.ncaron = 556; 20858 t.tcommaaccent = 278; 20859 t.logicalnot = 606; 20860 t.odieresis = 500; 20861 t.udieresis = 556; 20862 t.notequal = 549; 20863 t.gcommaaccent = 500; 20864 t.eth = 500; 20865 t.zcaron = 389; 20866 t.ncommaaccent = 556; 20867 t.onesuperior = 300; 20868 t.imacron = 278; 20869 t.Euro = 500; 20870 }); 20871 t["Times-Italic"] = getLookupTableFactory(function (t) { 20872 t.space = 250; 20873 t.exclam = 333; 20874 t.quotedbl = 420; 20875 t.numbersign = 500; 20876 t.dollar = 500; 20877 t.percent = 833; 20878 t.ampersand = 778; 20879 t.quoteright = 333; 20880 t.parenleft = 333; 20881 t.parenright = 333; 20882 t.asterisk = 500; 20883 t.plus = 675; 20884 t.comma = 250; 20885 t.hyphen = 333; 20886 t.period = 250; 20887 t.slash = 278; 20888 t.zero = 500; 20889 t.one = 500; 20890 t.two = 500; 20891 t.three = 500; 20892 t.four = 500; 20893 t.five = 500; 20894 t.six = 500; 20895 t.seven = 500; 20896 t.eight = 500; 20897 t.nine = 500; 20898 t.colon = 333; 20899 t.semicolon = 333; 20900 t.less = 675; 20901 t.equal = 675; 20902 t.greater = 675; 20903 t.question = 500; 20904 t.at = 920; 20905 t.A = 611; 20906 t.B = 611; 20907 t.C = 667; 20908 t.D = 722; 20909 t.E = 611; 20910 t.F = 611; 20911 t.G = 722; 20912 t.H = 722; 20913 t.I = 333; 20914 t.J = 444; 20915 t.K = 667; 20916 t.L = 556; 20917 t.M = 833; 20918 t.N = 667; 20919 t.O = 722; 20920 t.P = 611; 20921 t.Q = 722; 20922 t.R = 611; 20923 t.S = 500; 20924 t.T = 556; 20925 t.U = 722; 20926 t.V = 611; 20927 t.W = 833; 20928 t.X = 611; 20929 t.Y = 556; 20930 t.Z = 556; 20931 t.bracketleft = 389; 20932 t.backslash = 278; 20933 t.bracketright = 389; 20934 t.asciicircum = 422; 20935 t.underscore = 500; 20936 t.quoteleft = 333; 20937 t.a = 500; 20938 t.b = 500; 20939 t.c = 444; 20940 t.d = 500; 20941 t.e = 444; 20942 t.f = 278; 20943 t.g = 500; 20944 t.h = 500; 20945 t.i = 278; 20946 t.j = 278; 20947 t.k = 444; 20948 t.l = 278; 20949 t.m = 722; 20950 t.n = 500; 20951 t.o = 500; 20952 t.p = 500; 20953 t.q = 500; 20954 t.r = 389; 20955 t.s = 389; 20956 t.t = 278; 20957 t.u = 500; 20958 t.v = 444; 20959 t.w = 667; 20960 t.x = 444; 20961 t.y = 444; 20962 t.z = 389; 20963 t.braceleft = 400; 20964 t.bar = 275; 20965 t.braceright = 400; 20966 t.asciitilde = 541; 20967 t.exclamdown = 389; 20968 t.cent = 500; 20969 t.sterling = 500; 20970 t.fraction = 167; 20971 t.yen = 500; 20972 t.florin = 500; 20973 t.section = 500; 20974 t.currency = 500; 20975 t.quotesingle = 214; 20976 t.quotedblleft = 556; 20977 t.guillemotleft = 500; 20978 t.guilsinglleft = 333; 20979 t.guilsinglright = 333; 20980 t.fi = 500; 20981 t.fl = 500; 20982 t.endash = 500; 20983 t.dagger = 500; 20984 t.daggerdbl = 500; 20985 t.periodcentered = 250; 20986 t.paragraph = 523; 20987 t.bullet = 350; 20988 t.quotesinglbase = 333; 20989 t.quotedblbase = 556; 20990 t.quotedblright = 556; 20991 t.guillemotright = 500; 20992 t.ellipsis = 889; 20993 t.perthousand = 1000; 20994 t.questiondown = 500; 20995 t.grave = 333; 20996 t.acute = 333; 20997 t.circumflex = 333; 20998 t.tilde = 333; 20999 t.macron = 333; 21000 t.breve = 333; 21001 t.dotaccent = 333; 21002 t.dieresis = 333; 21003 t.ring = 333; 21004 t.cedilla = 333; 21005 t.hungarumlaut = 333; 21006 t.ogonek = 333; 21007 t.caron = 333; 21008 t.emdash = 889; 21009 t.AE = 889; 21010 t.ordfeminine = 276; 21011 t.Lslash = 556; 21012 t.Oslash = 722; 21013 t.OE = 944; 21014 t.ordmasculine = 310; 21015 t.ae = 667; 21016 t.dotlessi = 278; 21017 t.lslash = 278; 21018 t.oslash = 500; 21019 t.oe = 667; 21020 t.germandbls = 500; 21021 t.Idieresis = 333; 21022 t.eacute = 444; 21023 t.abreve = 500; 21024 t.uhungarumlaut = 500; 21025 t.ecaron = 444; 21026 t.Ydieresis = 556; 21027 t.divide = 675; 21028 t.Yacute = 556; 21029 t.Acircumflex = 611; 21030 t.aacute = 500; 21031 t.Ucircumflex = 722; 21032 t.yacute = 444; 21033 t.scommaaccent = 389; 21034 t.ecircumflex = 444; 21035 t.Uring = 722; 21036 t.Udieresis = 722; 21037 t.aogonek = 500; 21038 t.Uacute = 722; 21039 t.uogonek = 500; 21040 t.Edieresis = 611; 21041 t.Dcroat = 722; 21042 t.commaaccent = 250; 21043 t.copyright = 760; 21044 t.Emacron = 611; 21045 t.ccaron = 444; 21046 t.aring = 500; 21047 t.Ncommaaccent = 667; 21048 t.lacute = 278; 21049 t.agrave = 500; 21050 t.Tcommaaccent = 556; 21051 t.Cacute = 667; 21052 t.atilde = 500; 21053 t.Edotaccent = 611; 21054 t.scaron = 389; 21055 t.scedilla = 389; 21056 t.iacute = 278; 21057 t.lozenge = 471; 21058 t.Rcaron = 611; 21059 t.Gcommaaccent = 722; 21060 t.ucircumflex = 500; 21061 t.acircumflex = 500; 21062 t.Amacron = 611; 21063 t.rcaron = 389; 21064 t.ccedilla = 444; 21065 t.Zdotaccent = 556; 21066 t.Thorn = 611; 21067 t.Omacron = 722; 21068 t.Racute = 611; 21069 t.Sacute = 500; 21070 t.dcaron = 544; 21071 t.Umacron = 722; 21072 t.uring = 500; 21073 t.threesuperior = 300; 21074 t.Ograve = 722; 21075 t.Agrave = 611; 21076 t.Abreve = 611; 21077 t.multiply = 675; 21078 t.uacute = 500; 21079 t.Tcaron = 556; 21080 t.partialdiff = 476; 21081 t.ydieresis = 444; 21082 t.Nacute = 667; 21083 t.icircumflex = 278; 21084 t.Ecircumflex = 611; 21085 t.adieresis = 500; 21086 t.edieresis = 444; 21087 t.cacute = 444; 21088 t.nacute = 500; 21089 t.umacron = 500; 21090 t.Ncaron = 667; 21091 t.Iacute = 333; 21092 t.plusminus = 675; 21093 t.brokenbar = 275; 21094 t.registered = 760; 21095 t.Gbreve = 722; 21096 t.Idotaccent = 333; 21097 t.summation = 600; 21098 t.Egrave = 611; 21099 t.racute = 389; 21100 t.omacron = 500; 21101 t.Zacute = 556; 21102 t.Zcaron = 556; 21103 t.greaterequal = 549; 21104 t.Eth = 722; 21105 t.Ccedilla = 667; 21106 t.lcommaaccent = 278; 21107 t.tcaron = 300; 21108 t.eogonek = 444; 21109 t.Uogonek = 722; 21110 t.Aacute = 611; 21111 t.Adieresis = 611; 21112 t.egrave = 444; 21113 t.zacute = 389; 21114 t.iogonek = 278; 21115 t.Oacute = 722; 21116 t.oacute = 500; 21117 t.amacron = 500; 21118 t.sacute = 389; 21119 t.idieresis = 278; 21120 t.Ocircumflex = 722; 21121 t.Ugrave = 722; 21122 t.Delta = 612; 21123 t.thorn = 500; 21124 t.twosuperior = 300; 21125 t.Odieresis = 722; 21126 t.mu = 500; 21127 t.igrave = 278; 21128 t.ohungarumlaut = 500; 21129 t.Eogonek = 611; 21130 t.dcroat = 500; 21131 t.threequarters = 750; 21132 t.Scedilla = 500; 21133 t.lcaron = 300; 21134 t.Kcommaaccent = 667; 21135 t.Lacute = 556; 21136 t.trademark = 980; 21137 t.edotaccent = 444; 21138 t.Igrave = 333; 21139 t.Imacron = 333; 21140 t.Lcaron = 611; 21141 t.onehalf = 750; 21142 t.lessequal = 549; 21143 t.ocircumflex = 500; 21144 t.ntilde = 500; 21145 t.Uhungarumlaut = 722; 21146 t.Eacute = 611; 21147 t.emacron = 444; 21148 t.gbreve = 500; 21149 t.onequarter = 750; 21150 t.Scaron = 500; 21151 t.Scommaaccent = 500; 21152 t.Ohungarumlaut = 722; 21153 t.degree = 400; 21154 t.ograve = 500; 21155 t.Ccaron = 667; 21156 t.ugrave = 500; 21157 t.radical = 453; 21158 t.Dcaron = 722; 21159 t.rcommaaccent = 389; 21160 t.Ntilde = 667; 21161 t.otilde = 500; 21162 t.Rcommaaccent = 611; 21163 t.Lcommaaccent = 556; 21164 t.Atilde = 611; 21165 t.Aogonek = 611; 21166 t.Aring = 611; 21167 t.Otilde = 722; 21168 t.zdotaccent = 389; 21169 t.Ecaron = 611; 21170 t.Iogonek = 333; 21171 t.kcommaaccent = 444; 21172 t.minus = 675; 21173 t.Icircumflex = 333; 21174 t.ncaron = 500; 21175 t.tcommaaccent = 278; 21176 t.logicalnot = 675; 21177 t.odieresis = 500; 21178 t.udieresis = 500; 21179 t.notequal = 549; 21180 t.gcommaaccent = 500; 21181 t.eth = 500; 21182 t.zcaron = 389; 21183 t.ncommaaccent = 500; 21184 t.onesuperior = 300; 21185 t.imacron = 278; 21186 t.Euro = 500; 21187 }); 21188 t.ZapfDingbats = getLookupTableFactory(function (t) { 21189 t.space = 278; 21190 t.a1 = 974; 21191 t.a2 = 961; 21192 t.a202 = 974; 21193 t.a3 = 980; 21194 t.a4 = 719; 21195 t.a5 = 789; 21196 t.a119 = 790; 21197 t.a118 = 791; 21198 t.a117 = 690; 21199 t.a11 = 960; 21200 t.a12 = 939; 21201 t.a13 = 549; 21202 t.a14 = 855; 21203 t.a15 = 911; 21204 t.a16 = 933; 21205 t.a105 = 911; 21206 t.a17 = 945; 21207 t.a18 = 974; 21208 t.a19 = 755; 21209 t.a20 = 846; 21210 t.a21 = 762; 21211 t.a22 = 761; 21212 t.a23 = 571; 21213 t.a24 = 677; 21214 t.a25 = 763; 21215 t.a26 = 760; 21216 t.a27 = 759; 21217 t.a28 = 754; 21218 t.a6 = 494; 21219 t.a7 = 552; 21220 t.a8 = 537; 21221 t.a9 = 577; 21222 t.a10 = 692; 21223 t.a29 = 786; 21224 t.a30 = 788; 21225 t.a31 = 788; 21226 t.a32 = 790; 21227 t.a33 = 793; 21228 t.a34 = 794; 21229 t.a35 = 816; 21230 t.a36 = 823; 21231 t.a37 = 789; 21232 t.a38 = 841; 21233 t.a39 = 823; 21234 t.a40 = 833; 21235 t.a41 = 816; 21236 t.a42 = 831; 21237 t.a43 = 923; 21238 t.a44 = 744; 21239 t.a45 = 723; 21240 t.a46 = 749; 21241 t.a47 = 790; 21242 t.a48 = 792; 21243 t.a49 = 695; 21244 t.a50 = 776; 21245 t.a51 = 768; 21246 t.a52 = 792; 21247 t.a53 = 759; 21248 t.a54 = 707; 21249 t.a55 = 708; 21250 t.a56 = 682; 21251 t.a57 = 701; 21252 t.a58 = 826; 21253 t.a59 = 815; 21254 t.a60 = 789; 21255 t.a61 = 789; 21256 t.a62 = 707; 21257 t.a63 = 687; 21258 t.a64 = 696; 21259 t.a65 = 689; 21260 t.a66 = 786; 21261 t.a67 = 787; 21262 t.a68 = 713; 21263 t.a69 = 791; 21264 t.a70 = 785; 21265 t.a71 = 791; 21266 t.a72 = 873; 21267 t.a73 = 761; 21268 t.a74 = 762; 21269 t.a203 = 762; 21270 t.a75 = 759; 21271 t.a204 = 759; 21272 t.a76 = 892; 21273 t.a77 = 892; 21274 t.a78 = 788; 21275 t.a79 = 784; 21276 t.a81 = 438; 21277 t.a82 = 138; 21278 t.a83 = 277; 21279 t.a84 = 415; 21280 t.a97 = 392; 21281 t.a98 = 392; 21282 t.a99 = 668; 21283 t.a100 = 668; 21284 t.a89 = 390; 21285 t.a90 = 390; 21286 t.a93 = 317; 21287 t.a94 = 317; 21288 t.a91 = 276; 21289 t.a92 = 276; 21290 t.a205 = 509; 21291 t.a85 = 509; 21292 t.a206 = 410; 21293 t.a86 = 410; 21294 t.a87 = 234; 21295 t.a88 = 234; 21296 t.a95 = 334; 21297 t.a96 = 334; 21298 t.a101 = 732; 21299 t.a102 = 544; 21300 t.a103 = 544; 21301 t.a104 = 910; 21302 t.a106 = 667; 21303 t.a107 = 760; 21304 t.a108 = 760; 21305 t.a112 = 776; 21306 t.a111 = 595; 21307 t.a110 = 694; 21308 t.a109 = 626; 21309 t.a120 = 788; 21310 t.a121 = 788; 21311 t.a122 = 788; 21312 t.a123 = 788; 21313 t.a124 = 788; 21314 t.a125 = 788; 21315 t.a126 = 788; 21316 t.a127 = 788; 21317 t.a128 = 788; 21318 t.a129 = 788; 21319 t.a130 = 788; 21320 t.a131 = 788; 21321 t.a132 = 788; 21322 t.a133 = 788; 21323 t.a134 = 788; 21324 t.a135 = 788; 21325 t.a136 = 788; 21326 t.a137 = 788; 21327 t.a138 = 788; 21328 t.a139 = 788; 21329 t.a140 = 788; 21330 t.a141 = 788; 21331 t.a142 = 788; 21332 t.a143 = 788; 21333 t.a144 = 788; 21334 t.a145 = 788; 21335 t.a146 = 788; 21336 t.a147 = 788; 21337 t.a148 = 788; 21338 t.a149 = 788; 21339 t.a150 = 788; 21340 t.a151 = 788; 21341 t.a152 = 788; 21342 t.a153 = 788; 21343 t.a154 = 788; 21344 t.a155 = 788; 21345 t.a156 = 788; 21346 t.a157 = 788; 21347 t.a158 = 788; 21348 t.a159 = 788; 21349 t.a160 = 894; 21350 t.a161 = 838; 21351 t.a163 = 1016; 21352 t.a164 = 458; 21353 t.a196 = 748; 21354 t.a165 = 924; 21355 t.a192 = 748; 21356 t.a166 = 918; 21357 t.a167 = 927; 21358 t.a168 = 928; 21359 t.a169 = 928; 21360 t.a170 = 834; 21361 t.a171 = 873; 21362 t.a172 = 828; 21363 t.a173 = 924; 21364 t.a162 = 924; 21365 t.a174 = 917; 21366 t.a175 = 930; 21367 t.a176 = 931; 21368 t.a177 = 463; 21369 t.a178 = 883; 21370 t.a179 = 836; 21371 t.a193 = 836; 21372 t.a180 = 867; 21373 t.a199 = 867; 21374 t.a181 = 696; 21375 t.a200 = 696; 21376 t.a182 = 874; 21377 t.a201 = 874; 21378 t.a183 = 760; 21379 t.a184 = 946; 21380 t.a197 = 771; 21381 t.a185 = 865; 21382 t.a194 = 771; 21383 t.a198 = 888; 21384 t.a186 = 967; 21385 t.a195 = 888; 21386 t.a187 = 831; 21387 t.a188 = 873; 21388 t.a189 = 927; 21389 t.a190 = 970; 21390 t.a191 = 918; 21391 }); 21392}); 21393const getFontBasicMetrics = getLookupTableFactory(function (t) { 21394 t.Courier = { 21395 ascent: 629, 21396 descent: -157, 21397 capHeight: 562, 21398 xHeight: -426 21399 }; 21400 t["Courier-Bold"] = { 21401 ascent: 629, 21402 descent: -157, 21403 capHeight: 562, 21404 xHeight: 439 21405 }; 21406 t["Courier-Oblique"] = { 21407 ascent: 629, 21408 descent: -157, 21409 capHeight: 562, 21410 xHeight: 426 21411 }; 21412 t["Courier-BoldOblique"] = { 21413 ascent: 629, 21414 descent: -157, 21415 capHeight: 562, 21416 xHeight: 426 21417 }; 21418 t.Helvetica = { 21419 ascent: 718, 21420 descent: -207, 21421 capHeight: 718, 21422 xHeight: 523 21423 }; 21424 t["Helvetica-Bold"] = { 21425 ascent: 718, 21426 descent: -207, 21427 capHeight: 718, 21428 xHeight: 532 21429 }; 21430 t["Helvetica-Oblique"] = { 21431 ascent: 718, 21432 descent: -207, 21433 capHeight: 718, 21434 xHeight: 523 21435 }; 21436 t["Helvetica-BoldOblique"] = { 21437 ascent: 718, 21438 descent: -207, 21439 capHeight: 718, 21440 xHeight: 532 21441 }; 21442 t["Times-Roman"] = { 21443 ascent: 683, 21444 descent: -217, 21445 capHeight: 662, 21446 xHeight: 450 21447 }; 21448 t["Times-Bold"] = { 21449 ascent: 683, 21450 descent: -217, 21451 capHeight: 676, 21452 xHeight: 461 21453 }; 21454 t["Times-Italic"] = { 21455 ascent: 683, 21456 descent: -217, 21457 capHeight: 653, 21458 xHeight: 441 21459 }; 21460 t["Times-BoldItalic"] = { 21461 ascent: 683, 21462 descent: -217, 21463 capHeight: 669, 21464 xHeight: 462 21465 }; 21466 t.Symbol = { 21467 ascent: Math.NaN, 21468 descent: Math.NaN, 21469 capHeight: Math.NaN, 21470 xHeight: Math.NaN 21471 }; 21472 t.ZapfDingbats = { 21473 ascent: Math.NaN, 21474 descent: Math.NaN, 21475 capHeight: Math.NaN, 21476 xHeight: Math.NaN 21477 }; 21478}); 21479 21480;// ./src/core/glyf.js
vendor: 15,406 bytes, lines 21481-22011
21481const ON_CURVE_POINT = 1 << 0; 21482const X_SHORT_VECTOR = 1 << 1; 21483const Y_SHORT_VECTOR = 1 << 2; 21484const REPEAT_FLAG = 1 << 3; 21485const X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR = 1 << 4; 21486const Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR = 1 << 5; 21487const OVERLAP_SIMPLE = 1 << 6; 21488const ARG_1_AND_2_ARE_WORDS = 1 << 0; 21489const ARGS_ARE_XY_VALUES = 1 << 1; 21490const WE_HAVE_A_SCALE = 1 << 3; 21491const MORE_COMPONENTS = 1 << 5; 21492const WE_HAVE_AN_X_AND_Y_SCALE = 1 << 6; 21493const WE_HAVE_A_TWO_BY_TWO = 1 << 7; 21494const WE_HAVE_INSTRUCTIONS = 1 << 8; 21495class GlyfTable { 21496 constructor({ 21497 glyfTable, 21498 isGlyphLocationsLong, 21499 locaTable, 21500 numGlyphs 21501 }) { 21502 this.glyphs = []; 21503 const loca = new DataView(locaTable.buffer, locaTable.byteOffset, locaTable.byteLength); 21504 const glyf = new DataView(glyfTable.buffer, glyfTable.byteOffset, glyfTable.byteLength); 21505 const offsetSize = isGlyphLocationsLong ? 4 : 2; 21506 let prev = isGlyphLocationsLong ? loca.getUint32(0) : 2 * loca.getUint16(0); 21507 let pos = 0; 21508 for (let i = 0; i < numGlyphs; i++) { 21509 pos += offsetSize; 21510 const next = isGlyphLocationsLong ? loca.getUint32(pos) : 2 * loca.getUint16(pos); 21511 if (next === prev) { 21512 this.glyphs.push(new Glyph({})); 21513 continue; 21514 } 21515 const glyph = Glyph.parse(prev, glyf); 21516 this.glyphs.push(glyph); 21517 prev = next; 21518 } 21519 } 21520 getSize() { 21521 return this.glyphs.reduce((a, g) => { 21522 const size = g.getSize(); 21523 return a + (size + 3 & ~3); 21524 }, 0); 21525 } 21526 write() { 21527 const totalSize = this.getSize(); 21528 const glyfTable = new DataView(new ArrayBuffer(totalSize)); 21529 const isLocationLong = totalSize > 0x1fffe; 21530 const offsetSize = isLocationLong ? 4 : 2; 21531 const locaTable = new DataView(new ArrayBuffer((this.glyphs.length + 1) * offsetSize)); 21532 if (isLocationLong) { 21533 locaTable.setUint32(0, 0); 21534 } else { 21535 locaTable.setUint16(0, 0); 21536 } 21537 let pos = 0; 21538 let locaIndex = 0; 21539 for (const glyph of this.glyphs) { 21540 pos += glyph.write(pos, glyfTable); 21541 pos = pos + 3 & ~3; 21542 locaIndex += offsetSize; 21543 if (isLocationLong) { 21544 locaTable.setUint32(locaIndex, pos); 21545 } else { 21546 locaTable.setUint16(locaIndex, pos >> 1); 21547 } 21548 } 21549 return { 21550 isLocationLong, 21551 loca: new Uint8Array(locaTable.buffer), 21552 glyf: new Uint8Array(glyfTable.buffer) 21553 }; 21554 } 21555 scale(factors) { 21556 for (let i = 0, ii = this.glyphs.length; i < ii; i++) { 21557 this.glyphs[i].scale(factors[i]); 21558 } 21559 } 21560} 21561class Glyph { 21562 constructor({ 21563 header = null, 21564 simple = null, 21565 composites = null 21566 }) { 21567 this.header = header; 21568 this.simple = simple; 21569 this.composites = composites; 21570 } 21571 static parse(pos, glyf) { 21572 const [read, header] = GlyphHeader.parse(pos, glyf); 21573 pos += read; 21574 if (header.numberOfContours < 0) { 21575 const composites = []; 21576 while (true) { 21577 const [n, composite] = CompositeGlyph.parse(pos, glyf); 21578 pos += n; 21579 composites.push(composite); 21580 if (!(composite.flags & MORE_COMPONENTS)) { 21581 break; 21582 } 21583 } 21584 return new Glyph({ 21585 header, 21586 composites 21587 }); 21588 } 21589 const simple = SimpleGlyph.parse(pos, glyf, header.numberOfContours); 21590 return new Glyph({ 21591 header, 21592 simple 21593 }); 21594 } 21595 getSize() { 21596 if (!this.header) { 21597 return 0; 21598 } 21599 const size = this.simple ? this.simple.getSize() : this.composites.reduce((a, c) => a + c.getSize(), 0); 21600 return this.header.getSize() + size; 21601 } 21602 write(pos, buf) { 21603 if (!this.header) { 21604 return 0; 21605 } 21606 const spos = pos; 21607 pos += this.header.write(pos, buf); 21608 if (this.simple) { 21609 pos += this.simple.write(pos, buf); 21610 } else { 21611 for (const composite of this.composites) { 21612 pos += composite.write(pos, buf); 21613 } 21614 } 21615 return pos - spos; 21616 } 21617 scale(factor) { 21618 if (!this.header) { 21619 return; 21620 } 21621 const xMiddle = (this.header.xMin + this.header.xMax) / 2; 21622 this.header.scale(xMiddle, factor); 21623 if (this.simple) { 21624 this.simple.scale(xMiddle, factor); 21625 } else { 21626 for (const composite of this.composites) { 21627 composite.scale(xMiddle, factor); 21628 } 21629 } 21630 } 21631} 21632class GlyphHeader { 21633 constructor({ 21634 numberOfContours, 21635 xMin, 21636 yMin, 21637 xMax, 21638 yMax 21639 }) { 21640 this.numberOfContours = numberOfContours; 21641 this.xMin = xMin; 21642 this.yMin = yMin; 21643 this.xMax = xMax; 21644 this.yMax = yMax; 21645 } 21646 static parse(pos, glyf) { 21647 return [10, new GlyphHeader({ 21648 numberOfContours: glyf.getInt16(pos), 21649 xMin: glyf.getInt16(pos + 2), 21650 yMin: glyf.getInt16(pos + 4), 21651 xMax: glyf.getInt16(pos + 6), 21652 yMax: glyf.getInt16(pos + 8) 21653 })]; 21654 } 21655 getSize() { 21656 return 10; 21657 } 21658 write(pos, buf) { 21659 buf.setInt16(pos, this.numberOfContours); 21660 buf.setInt16(pos + 2, this.xMin); 21661 buf.setInt16(pos + 4, this.yMin); 21662 buf.setInt16(pos + 6, this.xMax); 21663 buf.setInt16(pos + 8, this.yMax); 21664 return 10; 21665 } 21666 scale(x, factor) { 21667 this.xMin = Math.round(x + (this.xMin - x) * factor); 21668 this.xMax = Math.round(x + (this.xMax - x) * factor); 21669 } 21670} 21671class Contour { 21672 constructor({ 21673 flags, 21674 xCoordinates, 21675 yCoordinates 21676 }) { 21677 this.xCoordinates = xCoordinates; 21678 this.yCoordinates = yCoordinates; 21679 this.flags = flags; 21680 } 21681} 21682class SimpleGlyph { 21683 constructor({ 21684 contours, 21685 instructions 21686 }) { 21687 this.contours = contours; 21688 this.instructions = instructions; 21689 } 21690 static parse(pos, glyf, numberOfContours) { 21691 const endPtsOfContours = []; 21692 for (let i = 0; i < numberOfContours; i++) { 21693 const endPt = glyf.getUint16(pos); 21694 pos += 2; 21695 endPtsOfContours.push(endPt); 21696 } 21697 const numberOfPt = endPtsOfContours[numberOfContours - 1] + 1; 21698 const instructionLength = glyf.getUint16(pos); 21699 pos += 2; 21700 const instructions = new Uint8Array(glyf).slice(pos, pos + instructionLength); 21701 pos += instructionLength; 21702 const flags = []; 21703 for (let i = 0; i < numberOfPt; pos++, i++) { 21704 let flag = glyf.getUint8(pos); 21705 flags.push(flag); 21706 if (flag & REPEAT_FLAG) { 21707 const count = glyf.getUint8(++pos); 21708 flag ^= REPEAT_FLAG; 21709 for (let m = 0; m < count; m++) { 21710 flags.push(flag); 21711 } 21712 i += count; 21713 } 21714 } 21715 const allXCoordinates = []; 21716 let xCoordinates = []; 21717 let yCoordinates = []; 21718 let pointFlags = []; 21719 const contours = []; 21720 let endPtsOfContoursIndex = 0; 21721 let lastCoordinate = 0; 21722 for (let i = 0; i < numberOfPt; i++) { 21723 const flag = flags[i]; 21724 if (flag & X_SHORT_VECTOR) { 21725 const x = glyf.getUint8(pos++); 21726 lastCoordinate += flag & X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR ? x : -x; 21727 xCoordinates.push(lastCoordinate); 21728 } else if (flag & X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR) { 21729 xCoordinates.push(lastCoordinate); 21730 } else { 21731 lastCoordinate += glyf.getInt16(pos); 21732 pos += 2; 21733 xCoordinates.push(lastCoordinate); 21734 } 21735 if (endPtsOfContours[endPtsOfContoursIndex] === i) { 21736 endPtsOfContoursIndex++; 21737 allXCoordinates.push(xCoordinates); 21738 xCoordinates = []; 21739 } 21740 } 21741 lastCoordinate = 0; 21742 endPtsOfContoursIndex = 0; 21743 for (let i = 0; i < numberOfPt; i++) { 21744 const flag = flags[i]; 21745 if (flag & Y_SHORT_VECTOR) { 21746 const y = glyf.getUint8(pos++); 21747 lastCoordinate += flag & Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR ? y : -y; 21748 yCoordinates.push(lastCoordinate); 21749 } else if (flag & Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR) { 21750 yCoordinates.push(lastCoordinate); 21751 } else { 21752 lastCoordinate += glyf.getInt16(pos); 21753 pos += 2; 21754 yCoordinates.push(lastCoordinate); 21755 } 21756 pointFlags.push(flag & ON_CURVE_POINT | flag & OVERLAP_SIMPLE); 21757 if (endPtsOfContours[endPtsOfContoursIndex] === i) { 21758 xCoordinates = allXCoordinates[endPtsOfContoursIndex]; 21759 endPtsOfContoursIndex++; 21760 contours.push(new Contour({ 21761 flags: pointFlags, 21762 xCoordinates, 21763 yCoordinates 21764 })); 21765 yCoordinates = []; 21766 pointFlags = []; 21767 } 21768 } 21769 return new SimpleGlyph({ 21770 contours, 21771 instructions 21772 }); 21773 } 21774 getSize() { 21775 let size = this.contours.length * 2 + 2 + this.instructions.length; 21776 let lastX = 0; 21777 let lastY = 0; 21778 for (const contour of this.contours) { 21779 size += contour.flags.length; 21780 for (let i = 0, ii = contour.xCoordinates.length; i < ii; i++) { 21781 const x = contour.xCoordinates[i]; 21782 const y = contour.yCoordinates[i]; 21783 let abs = Math.abs(x - lastX); 21784 if (abs > 255) { 21785 size += 2; 21786 } else if (abs > 0) { 21787 size += 1; 21788 } 21789 lastX = x; 21790 abs = Math.abs(y - lastY); 21791 if (abs > 255) { 21792 size += 2; 21793 } else if (abs > 0) { 21794 size += 1; 21795 } 21796 lastY = y; 21797 } 21798 } 21799 return size; 21800 } 21801 write(pos, buf) { 21802 const spos = pos; 21803 const xCoordinates = []; 21804 const yCoordinates = []; 21805 const flags = []; 21806 let lastX = 0; 21807 let lastY = 0; 21808 for (const contour of this.contours) { 21809 for (let i = 0, ii = contour.xCoordinates.length; i < ii; i++) { 21810 let flag = contour.flags[i]; 21811 const x = contour.xCoordinates[i]; 21812 let delta = x - lastX; 21813 if (delta === 0) { 21814 flag |= X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR; 21815 xCoordinates.push(0); 21816 } else { 21817 const abs = Math.abs(delta); 21818 if (abs <= 255) { 21819 flag |= delta >= 0 ? X_SHORT_VECTOR | X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR : X_SHORT_VECTOR; 21820 xCoordinates.push(abs); 21821 } else { 21822 xCoordinates.push(delta); 21823 } 21824 } 21825 lastX = x; 21826 const y = contour.yCoordinates[i]; 21827 delta = y - lastY; 21828 if (delta === 0) { 21829 flag |= Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR; 21830 yCoordinates.push(0); 21831 } else { 21832 const abs = Math.abs(delta); 21833 if (abs <= 255) { 21834 flag |= delta >= 0 ? Y_SHORT_VECTOR | Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR : Y_SHORT_VECTOR; 21835 yCoordinates.push(abs); 21836 } else { 21837 yCoordinates.push(delta); 21838 } 21839 } 21840 lastY = y; 21841 flags.push(flag); 21842 } 21843 buf.setUint16(pos, xCoordinates.length - 1); 21844 pos += 2; 21845 } 21846 buf.setUint16(pos, this.instructions.length); 21847 pos += 2; 21848 if (this.instructions.length) { 21849 new Uint8Array(buf.buffer, 0, buf.buffer.byteLength).set(this.instructions, pos); 21850 pos += this.instructions.length; 21851 } 21852 for (const flag of flags) { 21853 buf.setUint8(pos++, flag); 21854 } 21855 for (let i = 0, ii = xCoordinates.length; i < ii; i++) { 21856 const x = xCoordinates[i]; 21857 const flag = flags[i]; 21858 if (flag & X_SHORT_VECTOR) { 21859 buf.setUint8(pos++, x); 21860 } else if (!(flag & X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR)) { 21861 buf.setInt16(pos, x); 21862 pos += 2; 21863 } 21864 } 21865 for (let i = 0, ii = yCoordinates.length; i < ii; i++) { 21866 const y = yCoordinates[i]; 21867 const flag = flags[i]; 21868 if (flag & Y_SHORT_VECTOR) { 21869 buf.setUint8(pos++, y); 21870 } else if (!(flag & Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR)) { 21871 buf.setInt16(pos, y); 21872 pos += 2; 21873 } 21874 } 21875 return pos - spos; 21876 } 21877 scale(x, factor) { 21878 for (const contour of this.contours) { 21879 if (contour.xCoordinates.length === 0) { 21880 continue; 21881 } 21882 for (let i = 0, ii = contour.xCoordinates.length; i < ii; i++) { 21883 contour.xCoordinates[i] = Math.round(x + (contour.xCoordinates[i] - x) * factor); 21884 } 21885 } 21886 } 21887} 21888class CompositeGlyph { 21889 constructor({ 21890 flags, 21891 glyphIndex, 21892 argument1, 21893 argument2, 21894 transf, 21895 instructions 21896 }) { 21897 this.flags = flags; 21898 this.glyphIndex = glyphIndex; 21899 this.argument1 = argument1; 21900 this.argument2 = argument2; 21901 this.transf = transf; 21902 this.instructions = instructions; 21903 } 21904 static parse(pos, glyf) { 21905 const spos = pos; 21906 const transf = []; 21907 let flags = glyf.getUint16(pos); 21908 const glyphIndex = glyf.getUint16(pos + 2); 21909 pos += 4; 21910 let argument1, argument2; 21911 if (flags & ARG_1_AND_2_ARE_WORDS) { 21912 if (flags & ARGS_ARE_XY_VALUES) { 21913 argument1 = glyf.getInt16(pos); 21914 argument2 = glyf.getInt16(pos + 2); 21915 } else { 21916 argument1 = glyf.getUint16(pos); 21917 argument2 = glyf.getUint16(pos + 2); 21918 } 21919 pos += 4; 21920 flags ^= ARG_1_AND_2_ARE_WORDS; 21921 } else { 21922 if (flags & ARGS_ARE_XY_VALUES) { 21923 argument1 = glyf.getInt8(pos); 21924 argument2 = glyf.getInt8(pos + 1); 21925 } else { 21926 argument1 = glyf.getUint8(pos); 21927 argument2 = glyf.getUint8(pos + 1); 21928 } 21929 pos += 2; 21930 } 21931 if (flags & WE_HAVE_A_SCALE) { 21932 transf.push(glyf.getUint16(pos)); 21933 pos += 2; 21934 } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) { 21935 transf.push(glyf.getUint16(pos), glyf.getUint16(pos + 2)); 21936 pos += 4; 21937 } else if (flags & WE_HAVE_A_TWO_BY_TWO) { 21938 transf.push(glyf.getUint16(pos), glyf.getUint16(pos + 2), glyf.getUint16(pos + 4), glyf.getUint16(pos + 6)); 21939 pos += 8; 21940 } 21941 let instructions = null; 21942 if (flags & WE_HAVE_INSTRUCTIONS) { 21943 const instructionLength = glyf.getUint16(pos); 21944 pos += 2; 21945 instructions = new Uint8Array(glyf).slice(pos, pos + instructionLength); 21946 pos += instructionLength; 21947 } 21948 return [pos - spos, new CompositeGlyph({ 21949 flags, 21950 glyphIndex, 21951 argument1, 21952 argument2, 21953 transf, 21954 instructions 21955 })]; 21956 } 21957 getSize() { 21958 let size = 2 + 2 + this.transf.length * 2; 21959 if (this.flags & WE_HAVE_INSTRUCTIONS) { 21960 size += 2 + this.instructions.length; 21961 } 21962 size += 2; 21963 if (this.flags & 2) { 21964 if (!(this.argument1 >= -128 && this.argument1 <= 127 && this.argument2 >= -128 && this.argument2 <= 127)) { 21965 size += 2; 21966 } 21967 } else if (!(this.argument1 >= 0 && this.argument1 <= 255 && this.argument2 >= 0 && this.argument2 <= 255)) { 21968 size += 2; 21969 } 21970 return size; 21971 } 21972 write(pos, buf) { 21973 const spos = pos; 21974 if (this.flags & ARGS_ARE_XY_VALUES) { 21975 if (!(this.argument1 >= -128 && this.argument1 <= 127 && this.argument2 >= -128 && this.argument2 <= 127)) { 21976 this.flags |= ARG_1_AND_2_ARE_WORDS; 21977 } 21978 } else if (!(this.argument1 >= 0 && this.argument1 <= 255 && this.argument2 >= 0 && this.argument2 <= 255)) { 21979 this.flags |= ARG_1_AND_2_ARE_WORDS; 21980 } 21981 buf.setUint16(pos, this.flags); 21982 buf.setUint16(pos + 2, this.glyphIndex); 21983 pos += 4; 21984 if (this.flags & ARG_1_AND_2_ARE_WORDS) { 21985 if (this.flags & ARGS_ARE_XY_VALUES) { 21986 buf.setInt16(pos, this.argument1); 21987 buf.setInt16(pos + 2, this.argument2); 21988 } else { 21989 buf.setUint16(pos, this.argument1); 21990 buf.setUint16(pos + 2, this.argument2); 21991 } 21992 pos += 4; 21993 } else { 21994 buf.setUint8(pos, this.argument1); 21995 buf.setUint8(pos + 1, this.argument2); 21996 pos += 2; 21997 } 21998 if (this.flags & WE_HAVE_INSTRUCTIONS) { 21999 buf.setUint16(pos, this.instructions.length); 22000 pos += 2; 22001 if (this.instructions.length) { 22002 new Uint8Array(buf.buffer, 0, buf.buffer.byteLength).set(this.instructions, pos); 22003 pos += this.instructions.length; 22004 } 22005 } 22006 return pos - spos; 22007 } 22008 scale(x, factor) {} 22009} 22010 22011;// ./src/core/opentype_file_builder.js
vendor: 29,149 bytes, lines 22011-22975
22011 22012 22013 22014function writeInt16(dest, offset, num) { 22015 dest[offset] = num >> 8 & 0xff; 22016 dest[offset + 1] = num & 0xff; 22017} 22018function writeInt32(dest, offset, num) { 22019 dest[offset] = num >> 24 & 0xff; 22020 dest[offset + 1] = num >> 16 & 0xff; 22021 dest[offset + 2] = num >> 8 & 0xff; 22022 dest[offset + 3] = num & 0xff; 22023} 22024function writeData(dest, offset, data) { 22025 if (data instanceof Uint8Array) { 22026 dest.set(data, offset); 22027 } else if (typeof data === "string") { 22028 for (let i = 0, ii = data.length; i < ii; i++) { 22029 dest[offset++] = data.charCodeAt(i) & 0xff; 22030 } 22031 } else { 22032 for (const num of data) { 22033 dest[offset++] = num & 0xff; 22034 } 22035 } 22036} 22037const OTF_HEADER_SIZE = 12; 22038const OTF_TABLE_ENTRY_SIZE = 16; 22039class OpenTypeFileBuilder { 22040 constructor(sfnt) { 22041 this.sfnt = sfnt; 22042 this.tables = Object.create(null); 22043 } 22044 static getSearchParams(entriesCount, entrySize) { 22045 let maxPower2 = 1, 22046 log2 = 0; 22047 while ((maxPower2 ^ entriesCount) > maxPower2) { 22048 maxPower2 <<= 1; 22049 log2++; 22050 } 22051 const searchRange = maxPower2 * entrySize; 22052 return { 22053 range: searchRange, 22054 entry: log2, 22055 rangeShift: entrySize * entriesCount - searchRange 22056 }; 22057 } 22058 toArray() { 22059 let sfnt = this.sfnt; 22060 const tables = this.tables; 22061 const tablesNames = Object.keys(tables); 22062 tablesNames.sort(); 22063 const numTables = tablesNames.length; 22064 let i, j, jj, table, tableName; 22065 let offset = OTF_HEADER_SIZE + numTables * OTF_TABLE_ENTRY_SIZE; 22066 const tableOffsets = [offset]; 22067 for (i = 0; i < numTables; i++) { 22068 table = tables[tablesNames[i]]; 22069 const paddedLength = (table.length + 3 & ~3) >>> 0; 22070 offset += paddedLength; 22071 tableOffsets.push(offset); 22072 } 22073 const file = new Uint8Array(offset); 22074 for (i = 0; i < numTables; i++) { 22075 table = tables[tablesNames[i]]; 22076 writeData(file, tableOffsets[i], table); 22077 } 22078 if (sfnt === "true") { 22079 sfnt = string32(0x00010000); 22080 } 22081 file[0] = sfnt.charCodeAt(0) & 0xff; 22082 file[1] = sfnt.charCodeAt(1) & 0xff; 22083 file[2] = sfnt.charCodeAt(2) & 0xff; 22084 file[3] = sfnt.charCodeAt(3) & 0xff; 22085 writeInt16(file, 4, numTables); 22086 const searchParams = OpenTypeFileBuilder.getSearchParams(numTables, 16); 22087 writeInt16(file, 6, searchParams.range); 22088 writeInt16(file, 8, searchParams.entry); 22089 writeInt16(file, 10, searchParams.rangeShift); 22090 offset = OTF_HEADER_SIZE; 22091 for (i = 0; i < numTables; i++) { 22092 tableName = tablesNames[i]; 22093 file[offset] = tableName.charCodeAt(0) & 0xff; 22094 file[offset + 1] = tableName.charCodeAt(1) & 0xff; 22095 file[offset + 2] = tableName.charCodeAt(2) & 0xff; 22096 file[offset + 3] = tableName.charCodeAt(3) & 0xff; 22097 let checksum = 0; 22098 for (j = tableOffsets[i], jj = tableOffsets[i + 1]; j < jj; j += 4) { 22099 const quad = readUint32(file, j); 22100 checksum = checksum + quad >>> 0; 22101 } 22102 writeInt32(file, offset + 4, checksum); 22103 writeInt32(file, offset + 8, tableOffsets[i]); 22104 writeInt32(file, offset + 12, tables[tableName].length); 22105 offset += OTF_TABLE_ENTRY_SIZE; 22106 } 22107 return file; 22108 } 22109 addTable(tag, data) { 22110 if (tag in this.tables) { 22111 throw new Error("Table " + tag + " already exists"); 22112 } 22113 this.tables[tag] = data; 22114 } 22115} 22116 22117;// ./src/core/type1_parser.js 22118 22119 22120 22121 22122const HINTING_ENABLED = false; 22123const COMMAND_MAP = { 22124 hstem: [1], 22125 vstem: [3], 22126 vmoveto: [4], 22127 rlineto: [5], 22128 hlineto: [6], 22129 vlineto: [7], 22130 rrcurveto: [8], 22131 callsubr: [10], 22132 flex: [12, 35], 22133 drop: [12, 18], 22134 endchar: [14], 22135 rmoveto: [21], 22136 hmoveto: [22], 22137 vhcurveto: [30], 22138 hvcurveto: [31] 22139}; 22140class Type1CharString { 22141 constructor() { 22142 this.width = 0; 22143 this.lsb = 0; 22144 this.flexing = false; 22145 this.output = []; 22146 this.stack = []; 22147 } 22148 convert(encoded, subrs, seacAnalysisEnabled) { 22149 const count = encoded.length; 22150 let error = false; 22151 let wx, sbx, subrNumber; 22152 for (let i = 0; i < count; i++) { 22153 let value = encoded[i]; 22154 if (value < 32) { 22155 if (value === 12) { 22156 value = (value << 8) + encoded[++i]; 22157 } 22158 switch (value) { 22159 case 1: 22160 if (!HINTING_ENABLED) { 22161 this.stack = []; 22162 break; 22163 } 22164 error = this.executeCommand(2, COMMAND_MAP.hstem); 22165 break; 22166 case 3: 22167 if (!HINTING_ENABLED) { 22168 this.stack = []; 22169 break; 22170 } 22171 error = this.executeCommand(2, COMMAND_MAP.vstem); 22172 break; 22173 case 4: 22174 if (this.flexing) { 22175 if (this.stack.length < 1) { 22176 error = true; 22177 break; 22178 } 22179 const dy = this.stack.pop(); 22180 this.stack.push(0, dy); 22181 break; 22182 } 22183 error = this.executeCommand(1, COMMAND_MAP.vmoveto); 22184 break; 22185 case 5: 22186 error = this.executeCommand(2, COMMAND_MAP.rlineto); 22187 break; 22188 case 6: 22189 error = this.executeCommand(1, COMMAND_MAP.hlineto); 22190 break; 22191 case 7: 22192 error = this.executeCommand(1, COMMAND_MAP.vlineto); 22193 break; 22194 case 8: 22195 error = this.executeCommand(6, COMMAND_MAP.rrcurveto); 22196 break; 22197 case 9: 22198 this.stack = []; 22199 break; 22200 case 10: 22201 if (this.stack.length < 1) { 22202 error = true; 22203 break; 22204 } 22205 subrNumber = this.stack.pop(); 22206 if (!subrs[subrNumber]) { 22207 error = true; 22208 break; 22209 } 22210 error = this.convert(subrs[subrNumber], subrs, seacAnalysisEnabled); 22211 break; 22212 case 11: 22213 return error; 22214 case 13: 22215 if (this.stack.length < 2) { 22216 error = true; 22217 break; 22218 } 22219 wx = this.stack.pop(); 22220 sbx = this.stack.pop(); 22221 this.lsb = sbx; 22222 this.width = wx; 22223 this.stack.push(wx, sbx); 22224 error = this.executeCommand(2, COMMAND_MAP.hmoveto); 22225 break; 22226 case 14: 22227 this.output.push(COMMAND_MAP.endchar[0]); 22228 break; 22229 case 21: 22230 if (this.flexing) { 22231 break; 22232 } 22233 error = this.executeCommand(2, COMMAND_MAP.rmoveto); 22234 break; 22235 case 22: 22236 if (this.flexing) { 22237 this.stack.push(0); 22238 break; 22239 } 22240 error = this.executeCommand(1, COMMAND_MAP.hmoveto); 22241 break; 22242 case 30: 22243 error = this.executeCommand(4, COMMAND_MAP.vhcurveto); 22244 break; 22245 case 31: 22246 error = this.executeCommand(4, COMMAND_MAP.hvcurveto); 22247 break; 22248 case (12 << 8) + 0: 22249 this.stack = []; 22250 break; 22251 case (12 << 8) + 1: 22252 if (!HINTING_ENABLED) { 22253 this.stack = []; 22254 break; 22255 } 22256 error = this.executeCommand(2, COMMAND_MAP.vstem); 22257 break; 22258 case (12 << 8) + 2: 22259 if (!HINTING_ENABLED) { 22260 this.stack = []; 22261 break; 22262 } 22263 error = this.executeCommand(2, COMMAND_MAP.hstem); 22264 break; 22265 case (12 << 8) + 6: 22266 if (seacAnalysisEnabled) { 22267 const asb = this.stack.at(-5); 22268 this.seac = this.stack.splice(-4, 4); 22269 this.seac[0] += this.lsb - asb; 22270 error = this.executeCommand(0, COMMAND_MAP.endchar); 22271 } else { 22272 error = this.executeCommand(4, COMMAND_MAP.endchar); 22273 } 22274 break; 22275 case (12 << 8) + 7: 22276 if (this.stack.length < 4) { 22277 error = true; 22278 break; 22279 } 22280 this.stack.pop(); 22281 wx = this.stack.pop(); 22282 const sby = this.stack.pop(); 22283 sbx = this.stack.pop(); 22284 this.lsb = sbx; 22285 this.width = wx; 22286 this.stack.push(wx, sbx, sby); 22287 error = this.executeCommand(3, COMMAND_MAP.rmoveto); 22288 break; 22289 case (12 << 8) + 12: 22290 if (this.stack.length < 2) { 22291 error = true; 22292 break; 22293 } 22294 const num2 = this.stack.pop(); 22295 const num1 = this.stack.pop(); 22296 this.stack.push(num1 / num2); 22297 break; 22298 case (12 << 8) + 16: 22299 if (this.stack.length < 2) { 22300 error = true; 22301 break; 22302 } 22303 subrNumber = this.stack.pop(); 22304 const numArgs = this.stack.pop(); 22305 if (subrNumber === 0 && numArgs === 3) { 22306 const flexArgs = this.stack.splice(-17, 17); 22307 this.stack.push(flexArgs[2] + flexArgs[0], flexArgs[3] + flexArgs[1], flexArgs[4], flexArgs[5], flexArgs[6], flexArgs[7], flexArgs[8], flexArgs[9], flexArgs[10], flexArgs[11], flexArgs[12], flexArgs[13], flexArgs[14]); 22308 error = this.executeCommand(13, COMMAND_MAP.flex, true); 22309 this.flexing = false; 22310 this.stack.push(flexArgs[15], flexArgs[16]); 22311 } else if (subrNumber === 1 && numArgs === 0) { 22312 this.flexing = true; 22313 } 22314 break; 22315 case (12 << 8) + 17: 22316 break; 22317 case (12 << 8) + 33: 22318 this.stack = []; 22319 break; 22320 default: 22321 warn('Unknown type 1 charstring command of "' + value + '"'); 22322 break; 22323 } 22324 if (error) { 22325 break; 22326 } 22327 continue; 22328 } else if (value <= 246) { 22329 value -= 139; 22330 } else if (value <= 250) { 22331 value = (value - 247) * 256 + encoded[++i] + 108; 22332 } else if (value <= 254) { 22333 value = -((value - 251) * 256) - encoded[++i] - 108; 22334 } else { 22335 value = (encoded[++i] & 0xff) << 24 | (encoded[++i] & 0xff) << 16 | (encoded[++i] & 0xff) << 8 | (encoded[++i] & 0xff) << 0; 22336 } 22337 this.stack.push(value); 22338 } 22339 return error; 22340 } 22341 executeCommand(howManyArgs, command, keepStack) { 22342 const stackLength = this.stack.length; 22343 if (howManyArgs > stackLength) { 22344 return true; 22345 } 22346 const start = stackLength - howManyArgs; 22347 for (let i = start; i < stackLength; i++) { 22348 let value = this.stack[i]; 22349 if (Number.isInteger(value)) { 22350 this.output.push(28, value >> 8 & 0xff, value & 0xff); 22351 } else { 22352 value = 65536 * value | 0; 22353 this.output.push(255, value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff); 22354 } 22355 } 22356 this.output.push(...command); 22357 if (keepStack) { 22358 this.stack.splice(start, howManyArgs); 22359 } else { 22360 this.stack.length = 0; 22361 } 22362 return false; 22363 } 22364} 22365const EEXEC_ENCRYPT_KEY = 55665; 22366const CHAR_STRS_ENCRYPT_KEY = 4330; 22367function isHexDigit(code) { 22368 return code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102; 22369} 22370function decrypt(data, key, discardNumber) { 22371 if (discardNumber >= data.length) { 22372 return new Uint8Array(0); 22373 } 22374 const c1 = 52845, 22375 c2 = 22719; 22376 let r = key | 0, 22377 i, 22378 j; 22379 for (i = 0; i < discardNumber; i++) { 22380 r = (data[i] + r) * c1 + c2 & (1 << 16) - 1; 22381 } 22382 const count = data.length - discardNumber; 22383 const decrypted = new Uint8Array(count); 22384 for (i = discardNumber, j = 0; j < count; i++, j++) { 22385 const value = data[i]; 22386 decrypted[j] = value ^ r >> 8; 22387 r = (value + r) * c1 + c2 & (1 << 16) - 1; 22388 } 22389 return decrypted; 22390} 22391function decryptAscii(data, key, discardNumber) { 22392 const c1 = 52845, 22393 c2 = 22719; 22394 let r = key | 0; 22395 const count = data.length, 22396 maybeLength = count >>> 1; 22397 const decrypted = new Uint8Array(maybeLength); 22398 let i, j; 22399 for (i = 0, j = 0; i < count; i++) { 22400 const digit1 = data[i]; 22401 if (!isHexDigit(digit1)) { 22402 continue; 22403 } 22404 i++; 22405 let digit2; 22406 while (i < count && !isHexDigit(digit2 = data[i])) { 22407 i++; 22408 } 22409 if (i < count) { 22410 const value = parseInt(String.fromCharCode(digit1, digit2), 16); 22411 decrypted[j++] = value ^ r >> 8; 22412 r = (value + r) * c1 + c2 & (1 << 16) - 1; 22413 } 22414 } 22415 return decrypted.slice(discardNumber, j); 22416} 22417function isSpecial(c) { 22418 return c === 0x2f || c === 0x5b || c === 0x5d || c === 0x7b || c === 0x7d || c === 0x28 || c === 0x29; 22419} 22420class Type1Parser { 22421 constructor(stream, encrypted, seacAnalysisEnabled) { 22422 if (encrypted) { 22423 const data = stream.getBytes(); 22424 const isBinary = !((isHexDigit(data[0]) || isWhiteSpace(data[0])) && isHexDigit(data[1]) && isHexDigit(data[2]) && isHexDigit(data[3]) && isHexDigit(data[4]) && isHexDigit(data[5]) && isHexDigit(data[6]) && isHexDigit(data[7])); 22425 stream = new Stream(isBinary ? decrypt(data, EEXEC_ENCRYPT_KEY, 4) : decryptAscii(data, EEXEC_ENCRYPT_KEY, 4)); 22426 } 22427 this.seacAnalysisEnabled = !!seacAnalysisEnabled; 22428 this.stream = stream; 22429 this.nextChar(); 22430 } 22431 readNumberArray() { 22432 this.getToken(); 22433 const array = []; 22434 while (true) { 22435 const token = this.getToken(); 22436 if (token === null || token === "]" || token === "}") { 22437 break; 22438 } 22439 array.push(parseFloat(token || 0)); 22440 } 22441 return array; 22442 } 22443 readNumber() { 22444 const token = this.getToken(); 22445 return parseFloat(token || 0); 22446 } 22447 readInt() { 22448 const token = this.getToken(); 22449 return parseInt(token || 0, 10) | 0; 22450 } 22451 readBoolean() { 22452 const token = this.getToken(); 22453 return token === "true" ? 1 : 0; 22454 } 22455 nextChar() { 22456 return this.currentChar = this.stream.getByte(); 22457 } 22458 prevChar() { 22459 this.stream.skip(-2); 22460 return this.currentChar = this.stream.getByte(); 22461 } 22462 getToken() { 22463 let comment = false; 22464 let ch = this.currentChar; 22465 while (true) { 22466 if (ch === -1) { 22467 return null; 22468 } 22469 if (comment) { 22470 if (ch === 0x0a || ch === 0x0d) { 22471 comment = false; 22472 } 22473 } else if (ch === 0x25) { 22474 comment = true; 22475 } else if (!isWhiteSpace(ch)) { 22476 break; 22477 } 22478 ch = this.nextChar(); 22479 } 22480 if (isSpecial(ch)) { 22481 this.nextChar(); 22482 return String.fromCharCode(ch); 22483 } 22484 let token = ""; 22485 do { 22486 token += String.fromCharCode(ch); 22487 ch = this.nextChar(); 22488 } while (ch >= 0 && !isWhiteSpace(ch) && !isSpecial(ch)); 22489 return token; 22490 } 22491 readCharStrings(bytes, lenIV) { 22492 if (lenIV === -1) { 22493 return bytes; 22494 } 22495 return decrypt(bytes, CHAR_STRS_ENCRYPT_KEY, lenIV); 22496 } 22497 extractFontProgram(properties) { 22498 const stream = this.stream; 22499 const subrs = [], 22500 charstrings = []; 22501 const privateData = Object.create(null); 22502 privateData.lenIV = 4; 22503 const program = { 22504 subrs: [], 22505 charstrings: [], 22506 properties: { 22507 privateData 22508 } 22509 }; 22510 let token, length, data, lenIV; 22511 while ((token = this.getToken()) !== null) { 22512 if (token !== "/") { 22513 continue; 22514 } 22515 token = this.getToken(); 22516 switch (token) { 22517 case "CharStrings": 22518 this.getToken(); 22519 this.getToken(); 22520 this.getToken(); 22521 this.getToken(); 22522 while (true) { 22523 token = this.getToken(); 22524 if (token === null || token === "end") { 22525 break; 22526 } 22527 if (token !== "/") { 22528 continue; 22529 } 22530 const glyph = this.getToken(); 22531 length = this.readInt(); 22532 this.getToken(); 22533 data = length > 0 ? stream.getBytes(length) : new Uint8Array(0); 22534 lenIV = program.properties.privateData.lenIV; 22535 const encoded = this.readCharStrings(data, lenIV); 22536 this.nextChar(); 22537 token = this.getToken(); 22538 if (token === "noaccess") { 22539 this.getToken(); 22540 } else if (token === "/") { 22541 this.prevChar(); 22542 } 22543 charstrings.push({ 22544 glyph, 22545 encoded 22546 }); 22547 } 22548 break; 22549 case "Subrs": 22550 this.readInt(); 22551 this.getToken(); 22552 while (this.getToken() === "dup") { 22553 const index = this.readInt(); 22554 length = this.readInt(); 22555 this.getToken(); 22556 data = length > 0 ? stream.getBytes(length) : new Uint8Array(0); 22557 lenIV = program.properties.privateData.lenIV; 22558 const encoded = this.readCharStrings(data, lenIV); 22559 this.nextChar(); 22560 token = this.getToken(); 22561 if (token === "noaccess") { 22562 this.getToken(); 22563 } 22564 subrs[index] = encoded; 22565 } 22566 break; 22567 case "BlueValues": 22568 case "OtherBlues": 22569 case "FamilyBlues": 22570 case "FamilyOtherBlues": 22571 const blueArray = this.readNumberArray(); 22572 if (blueArray.length > 0 && blueArray.length % 2 === 0 && HINTING_ENABLED) { 22573 program.properties.privateData[token] = blueArray; 22574 } 22575 break; 22576 case "StemSnapH": 22577 case "StemSnapV": 22578 program.properties.privateData[token] = this.readNumberArray(); 22579 break; 22580 case "StdHW": 22581 case "StdVW": 22582 program.properties.privateData[token] = this.readNumberArray()[0]; 22583 break; 22584 case "BlueShift": 22585 case "lenIV": 22586 case "BlueFuzz": 22587 case "BlueScale": 22588 case "LanguageGroup": 22589 program.properties.privateData[token] = this.readNumber(); 22590 break; 22591 case "ExpansionFactor": 22592 program.properties.privateData[token] = this.readNumber() || 0.06; 22593 break; 22594 case "ForceBold": 22595 program.properties.privateData[token] = this.readBoolean(); 22596 break; 22597 } 22598 } 22599 for (const { 22600 encoded, 22601 glyph 22602 } of charstrings) { 22603 const charString = new Type1CharString(); 22604 const error = charString.convert(encoded, subrs, this.seacAnalysisEnabled); 22605 let output = charString.output; 22606 if (error) { 22607 output = [14]; 22608 } 22609 const charStringObject = { 22610 glyphName: glyph, 22611 charstring: output, 22612 width: charString.width, 22613 lsb: charString.lsb, 22614 seac: charString.seac 22615 }; 22616 if (glyph === ".notdef") { 22617 program.charstrings.unshift(charStringObject); 22618 } else { 22619 program.charstrings.push(charStringObject); 22620 } 22621 if (properties.builtInEncoding) { 22622 const index = properties.builtInEncoding.indexOf(glyph); 22623 if (index > -1 && properties.widths[index] === undefined && index >= properties.firstChar && index <= properties.lastChar) { 22624 properties.widths[index] = charString.width; 22625 } 22626 } 22627 } 22628 return program; 22629 } 22630 extractFontHeader(properties) { 22631 let token; 22632 while ((token = this.getToken()) !== null) { 22633 if (token !== "/") { 22634 continue; 22635 } 22636 token = this.getToken(); 22637 switch (token) { 22638 case "FontMatrix": 22639 const matrix = this.readNumberArray(); 22640 properties.fontMatrix = matrix; 22641 break; 22642 case "Encoding": 22643 const encodingArg = this.getToken(); 22644 let encoding; 22645 if (!/^\d+$/.test(encodingArg)) { 22646 encoding = getEncoding(encodingArg); 22647 } else { 22648 encoding = []; 22649 const size = parseInt(encodingArg, 10) | 0; 22650 this.getToken(); 22651 for (let j = 0; j < size; j++) { 22652 token = this.getToken(); 22653 while (token !== "dup" && token !== "def") { 22654 token = this.getToken(); 22655 if (token === null) { 22656 return; 22657 } 22658 } 22659 if (token === "def") { 22660 break; 22661 } 22662 const index = this.readInt(); 22663 this.getToken(); 22664 const glyph = this.getToken(); 22665 encoding[index] = glyph; 22666 this.getToken(); 22667 } 22668 } 22669 properties.builtInEncoding = encoding; 22670 break; 22671 case "FontBBox": 22672 const fontBBox = this.readNumberArray(); 22673 properties.ascent = Math.max(fontBBox[3], fontBBox[1]); 22674 properties.descent = Math.min(fontBBox[1], fontBBox[3]); 22675 properties.ascentScaled = true; 22676 break; 22677 } 22678 } 22679 } 22680} 22681 22682;// ./src/core/type1_font.js 22683 22684 22685 22686 22687 22688 22689function findBlock(streamBytes, signature, startIndex) { 22690 const streamBytesLength = streamBytes.length; 22691 const signatureLength = signature.length; 22692 const scanLength = streamBytesLength - signatureLength; 22693 let i = startIndex, 22694 found = false; 22695 while (i < scanLength) { 22696 let j = 0; 22697 while (j < signatureLength && streamBytes[i + j] === signature[j]) { 22698 j++; 22699 } 22700 if (j >= signatureLength) { 22701 i += j; 22702 while (i < streamBytesLength && isWhiteSpace(streamBytes[i])) { 22703 i++; 22704 } 22705 found = true; 22706 break; 22707 } 22708 i++; 22709 } 22710 return { 22711 found, 22712 length: i 22713 }; 22714} 22715function getHeaderBlock(stream, suggestedLength) { 22716 const EEXEC_SIGNATURE = [0x65, 0x65, 0x78, 0x65, 0x63]; 22717 const streamStartPos = stream.pos; 22718 let headerBytes, headerBytesLength, block; 22719 try { 22720 headerBytes = stream.getBytes(suggestedLength); 22721 headerBytesLength = headerBytes.length; 22722 } catch {} 22723 if (headerBytesLength === suggestedLength) { 22724 block = findBlock(headerBytes, EEXEC_SIGNATURE, suggestedLength - 2 * EEXEC_SIGNATURE.length); 22725 if (block.found && block.length === suggestedLength) { 22726 return { 22727 stream: new Stream(headerBytes), 22728 length: suggestedLength 22729 }; 22730 } 22731 } 22732 warn('Invalid "Length1" property in Type1 font -- trying to recover.'); 22733 stream.pos = streamStartPos; 22734 const SCAN_BLOCK_LENGTH = 2048; 22735 let actualLength; 22736 while (true) { 22737 const scanBytes = stream.peekBytes(SCAN_BLOCK_LENGTH); 22738 block = findBlock(scanBytes, EEXEC_SIGNATURE, 0); 22739 if (block.length === 0) { 22740 break; 22741 } 22742 stream.pos += block.length; 22743 if (block.found) { 22744 actualLength = stream.pos - streamStartPos; 22745 break; 22746 } 22747 } 22748 stream.pos = streamStartPos; 22749 if (actualLength) { 22750 return { 22751 stream: new Stream(stream.getBytes(actualLength)), 22752 length: actualLength 22753 }; 22754 } 22755 warn('Unable to recover "Length1" property in Type1 font -- using as is.'); 22756 return { 22757 stream: new Stream(stream.getBytes(suggestedLength)), 22758 length: suggestedLength 22759 }; 22760} 22761function getEexecBlock(stream, suggestedLength) { 22762 const eexecBytes = stream.getBytes(); 22763 if (eexecBytes.length === 0) { 22764 throw new FormatError("getEexecBlock - no font program found."); 22765 } 22766 return { 22767 stream: new Stream(eexecBytes), 22768 length: eexecBytes.length 22769 }; 22770} 22771class Type1Font { 22772 constructor(name, file, properties) { 22773 const PFB_HEADER_SIZE = 6; 22774 let headerBlockLength = properties.length1; 22775 let eexecBlockLength = properties.length2; 22776 let pfbHeader = file.peekBytes(PFB_HEADER_SIZE); 22777 const pfbHeaderPresent = pfbHeader[0] === 0x80 && pfbHeader[1] === 0x01; 22778 if (pfbHeaderPresent) { 22779 file.skip(PFB_HEADER_SIZE); 22780 headerBlockLength = pfbHeader[5] << 24 | pfbHeader[4] << 16 | pfbHeader[3] << 8 | pfbHeader[2]; 22781 } 22782 const headerBlock = getHeaderBlock(file, headerBlockLength); 22783 const headerBlockParser = new Type1Parser(headerBlock.stream, false, SEAC_ANALYSIS_ENABLED); 22784 headerBlockParser.extractFontHeader(properties); 22785 if (pfbHeaderPresent) { 22786 pfbHeader = file.getBytes(PFB_HEADER_SIZE); 22787 eexecBlockLength = pfbHeader[5] << 24 | pfbHeader[4] << 16 | pfbHeader[3] << 8 | pfbHeader[2]; 22788 } 22789 const eexecBlock = getEexecBlock(file, eexecBlockLength); 22790 const eexecBlockParser = new Type1Parser(eexecBlock.stream, true, SEAC_ANALYSIS_ENABLED); 22791 const data = eexecBlockParser.extractFontProgram(properties); 22792 for (const key in data.properties) { 22793 properties[key] = data.properties[key]; 22794 } 22795 const charstrings = data.charstrings; 22796 const type2Charstrings = this.getType2Charstrings(charstrings); 22797 const subrs = this.getType2Subrs(data.subrs); 22798 this.charstrings = charstrings; 22799 this.data = this.wrap(name, type2Charstrings, this.charstrings, subrs, properties); 22800 this.seacs = this.getSeacs(data.charstrings); 22801 } 22802 get numGlyphs() { 22803 return this.charstrings.length + 1; 22804 } 22805 getCharset() { 22806 const charset = [".notdef"]; 22807 for (const { 22808 glyphName 22809 } of this.charstrings) { 22810 charset.push(glyphName); 22811 } 22812 return charset; 22813 } 22814 getGlyphMapping(properties) { 22815 const charstrings = this.charstrings; 22816 if (properties.composite) { 22817 const charCodeToGlyphId = Object.create(null); 22818 for (let glyphId = 0, charstringsLen = charstrings.length; glyphId < charstringsLen; glyphId++) { 22819 const charCode = properties.cMap.charCodeOf(glyphId); 22820 charCodeToGlyphId[charCode] = glyphId + 1; 22821 } 22822 return charCodeToGlyphId; 22823 } 22824 const glyphNames = [".notdef"]; 22825 let builtInEncoding, glyphId; 22826 for (glyphId = 0; glyphId < charstrings.length; glyphId++) { 22827 glyphNames.push(charstrings[glyphId].glyphName); 22828 } 22829 const encoding = properties.builtInEncoding; 22830 if (encoding) { 22831 builtInEncoding = Object.create(null); 22832 for (const charCode in encoding) { 22833 glyphId = glyphNames.indexOf(encoding[charCode]); 22834 if (glyphId >= 0) { 22835 builtInEncoding[charCode] = glyphId; 22836 } 22837 } 22838 } 22839 return type1FontGlyphMapping(properties, builtInEncoding, glyphNames); 22840 } 22841 hasGlyphId(id) { 22842 if (id < 0 || id >= this.numGlyphs) { 22843 return false; 22844 } 22845 if (id === 0) { 22846 return true; 22847 } 22848 const glyph = this.charstrings[id - 1]; 22849 return glyph.charstring.length > 0; 22850 } 22851 getSeacs(charstrings) { 22852 const seacMap = []; 22853 for (let i = 0, ii = charstrings.length; i < ii; i++) { 22854 const charstring = charstrings[i]; 22855 if (charstring.seac) { 22856 seacMap[i + 1] = charstring.seac; 22857 } 22858 } 22859 return seacMap; 22860 } 22861 getType2Charstrings(type1Charstrings) { 22862 const type2Charstrings = []; 22863 for (const type1Charstring of type1Charstrings) { 22864 type2Charstrings.push(type1Charstring.charstring); 22865 } 22866 return type2Charstrings; 22867 } 22868 getType2Subrs(type1Subrs) { 22869 let bias = 0; 22870 const count = type1Subrs.length; 22871 if (count < 1133) { 22872 bias = 107; 22873 } else if (count < 33769) { 22874 bias = 1131; 22875 } else { 22876 bias = 32768; 22877 } 22878 const type2Subrs = []; 22879 let i; 22880 for (i = 0; i < bias; i++) { 22881 type2Subrs.push([0x0b]); 22882 } 22883 for (i = 0; i < count; i++) { 22884 type2Subrs.push(type1Subrs[i]); 22885 } 22886 return type2Subrs; 22887 } 22888 wrap(name, glyphs, charstrings, subrs, properties) { 22889 const cff = new CFF(); 22890 cff.header = new CFFHeader(1, 0, 4, 4); 22891 cff.names = [name]; 22892 const topDict = new CFFTopDict(); 22893 topDict.setByName("version", 391); 22894 topDict.setByName("Notice", 392); 22895 topDict.setByName("FullName", 393); 22896 topDict.setByName("FamilyName", 394); 22897 topDict.setByName("Weight", 395); 22898 topDict.setByName("Encoding", null); 22899 topDict.setByName("FontMatrix", properties.fontMatrix); 22900 topDict.setByName("FontBBox", properties.bbox); 22901 topDict.setByName("charset", null); 22902 topDict.setByName("CharStrings", null); 22903 topDict.setByName("Private", null); 22904 cff.topDict = topDict; 22905 const strings = new CFFStrings(); 22906 strings.add("Version 0.11"); 22907 strings.add("See original notice"); 22908 strings.add(name); 22909 strings.add(name); 22910 strings.add("Medium"); 22911 cff.strings = strings; 22912 cff.globalSubrIndex = new CFFIndex(); 22913 const count = glyphs.length; 22914 const charsetArray = [".notdef"]; 22915 let i, ii; 22916 for (i = 0; i < count; i++) { 22917 const glyphName = charstrings[i].glyphName; 22918 const index = CFFStandardStrings.indexOf(glyphName); 22919 if (index === -1) { 22920 strings.add(glyphName); 22921 } 22922 charsetArray.push(glyphName); 22923 } 22924 cff.charset = new CFFCharset(false, 0, charsetArray); 22925 const charStringsIndex = new CFFIndex(); 22926 charStringsIndex.add([0x8b, 0x0e]); 22927 for (i = 0; i < count; i++) { 22928 charStringsIndex.add(glyphs[i]); 22929 } 22930 cff.charStrings = charStringsIndex; 22931 const privateDict = new CFFPrivateDict(); 22932 privateDict.setByName("Subrs", null); 22933 const fields = ["BlueValues", "OtherBlues", "FamilyBlues", "FamilyOtherBlues", "StemSnapH", "StemSnapV", "BlueShift", "BlueFuzz", "BlueScale", "LanguageGroup", "ExpansionFactor", "ForceBold", "StdHW", "StdVW"]; 22934 for (i = 0, ii = fields.length; i < ii; i++) { 22935 const field = fields[i]; 22936 if (!(field in properties.privateData)) { 22937 continue; 22938 } 22939 const value = properties.privateData[field]; 22940 if (Array.isArray(value)) { 22941 for (let j = value.length - 1; j > 0; j--) { 22942 value[j] -= value[j - 1]; 22943 } 22944 } 22945 privateDict.setByName(field, value); 22946 } 22947 cff.topDict.privateDict = privateDict; 22948 const subrIndex = new CFFIndex(); 22949 for (i = 0, ii = subrs.length; i < ii; i++) { 22950 subrIndex.add(subrs[i]); 22951 } 22952 privateDict.subrsIndex = subrIndex; 22953 const compiler = new CFFCompiler(cff); 22954 return compiler.compile(); 22955 } 22956} 22957 22958;// ./src/core/fonts.js 22959 22960 22961 22962 22963 22964 22965 22966 22967 22968 22969 22970 22971 22972 22973 22974 22975
22976const PRIVATE_USE_AREAS = [[0xe000, 0xf8ff], [0x100000, 0x10fffd]]; 22977const PDF_GLYPH_SPACE_UNITS = 1000; 22978const EXPORT_DATA_PROPERTIES = ["ascent", "bbox", "black", "bold", "charProcOperatorList", "composite", "cssFontInfo", "data", "defaultVMetrics", "defaultWidth", "descent", "fallbackName", "fontMatrix", "isInvalidPDFjsFont", "isType3Font", "italic", "loadedName", "mimetype", "missingFile", "name", "remeasure", "subtype", "systemFontInfo", "type", "vertical"]; 22979const EXPORT_DATA_EXTRA_PROPERTIES = ["cMap", "defaultEncoding", "differences", "isMonospace", "isSerifFont", "isSymbolicFont", "seacMap", "toFontChar", "toUnicod
vendor: 7,645 bytes, lines 22979-23247
22979e", "vmetrics", "widths"]; 22980function adjustWidths(properties) { 22981 if (!properties.fontMatrix) { 22982 return; 22983 } 22984 if (properties.fontMatrix[0] === FONT_IDENTITY_MATRIX[0]) { 22985 return; 22986 } 22987 const scale = 0.001 / properties.fontMatrix[0]; 22988 const glyphsWidths = properties.widths; 22989 for (const glyph in glyphsWidths) { 22990 glyphsWidths[glyph] *= scale; 22991 } 22992 properties.defaultWidth *= scale; 22993} 22994function adjustTrueTypeToUnicode(properties, isSymbolicFont, nameRecords) { 22995 if (properties.isInternalFont) { 22996 return; 22997 } 22998 if (properties.hasIncludedToUnicodeMap) { 22999 return; 23000 } 23001 if (properties.hasEncoding) { 23002 return; 23003 } 23004 if (properties.toUnicode instanceof IdentityToUnicodeMap) { 23005 return; 23006 } 23007 if (!isSymbolicFont) { 23008 return; 23009 } 23010 if (nameRecords.length === 0) { 23011 return; 23012 } 23013 if (properties.defaultEncoding === WinAnsiEncoding) { 23014 return; 23015 } 23016 for (const r of nameRecords) { 23017 if (!isWinNameRecord(r)) { 23018 return; 23019 } 23020 } 23021 const encoding = WinAnsiEncoding; 23022 const toUnicode = [], 23023 glyphsUnicodeMap = getGlyphsUnicode(); 23024 for (const charCode in encoding) { 23025 const glyphName = encoding[charCode]; 23026 if (glyphName === "") { 23027 continue; 23028 } 23029 const unicode = glyphsUnicodeMap[glyphName]; 23030 if (unicode === undefined) { 23031 continue; 23032 } 23033 toUnicode[charCode] = String.fromCharCode(unicode); 23034 } 23035 if (toUnicode.length > 0) { 23036 properties.toUnicode.amend(toUnicode); 23037 } 23038} 23039function adjustType1ToUnicode(properties, builtInEncoding) { 23040 if (properties.isInternalFont) { 23041 return; 23042 } 23043 if (properties.hasIncludedToUnicodeMap) { 23044 return; 23045 } 23046 if (builtInEncoding === properties.defaultEncoding) { 23047 return; 23048 } 23049 if (properties.toUnicode instanceof IdentityToUnicodeMap) { 23050 return; 23051 } 23052 const toUnicode = [], 23053 glyphsUnicodeMap = getGlyphsUnicode(); 23054 for (const charCode in builtInEncoding) { 23055 if (properties.hasEncoding) { 23056 if (properties.baseEncodingName || properties.differences[charCode] !== undefined) { 23057 continue; 23058 } 23059 } 23060 const glyphName = builtInEncoding[charCode]; 23061 const unicode = getUnicodeForGlyph(glyphName, glyphsUnicodeMap); 23062 if (unicode !== -1) { 23063 toUnicode[charCode] = String.fromCharCode(unicode); 23064 } 23065 } 23066 if (toUnicode.length > 0) { 23067 properties.toUnicode.amend(toUnicode); 23068 } 23069} 23070function amendFallbackToUnicode(properties) { 23071 if (!properties.fallbackToUnicode) { 23072 return; 23073 } 23074 if (properties.toUnicode instanceof IdentityToUnicodeMap) { 23075 return; 23076 } 23077 const toUnicode = []; 23078 for (const charCode in properties.fallbackToUnicode) { 23079 if (properties.toUnicode.has(charCode)) { 23080 continue; 23081 } 23082 toUnicode[charCode] = properties.fallbackToUnicode[charCode]; 23083 } 23084 if (toUnicode.length > 0) { 23085 properties.toUnicode.amend(toUnicode); 23086 } 23087} 23088class fonts_Glyph { 23089 constructor(originalCharCode, fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont) { 23090 this.originalCharCode = originalCharCode; 23091 this.fontChar = fontChar; 23092 this.unicode = unicode; 23093 this.accent = accent; 23094 this.width = width; 23095 this.vmetric = vmetric; 23096 this.operatorListId = operatorListId; 23097 this.isSpace = isSpace; 23098 this.isInFont = isInFont; 23099 } 23100 get category() { 23101 return shadow(this, "category", getCharUnicodeCategory(this.unicode), true); 23102 } 23103} 23104function int16(b0, b1) { 23105 return (b0 << 8) + b1; 23106} 23107function writeSignedInt16(bytes, index, value) { 23108 bytes[index + 1] = value; 23109 bytes[index] = value >>> 8; 23110} 23111function signedInt16(b0, b1) { 23112 const value = (b0 << 8) + b1; 23113 return value & 1 << 15 ? value - 0x10000 : value; 23114} 23115function writeUint32(bytes, index, value) { 23116 bytes[index + 3] = value & 0xff; 23117 bytes[index + 2] = value >>> 8; 23118 bytes[index + 1] = value >>> 16; 23119 bytes[index] = value >>> 24; 23120} 23121function int32(b0, b1, b2, b3) { 23122 return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; 23123} 23124function string16(value) { 23125 return String.fromCharCode(value >> 8 & 0xff, value & 0xff); 23126} 23127function safeString16(value) { 23128 if (value > 0x7fff) { 23129 value = 0x7fff; 23130 } else if (value < -0x8000) { 23131 value = -0x8000; 23132 } 23133 return String.fromCharCode(value >> 8 & 0xff, value & 0xff); 23134} 23135function isTrueTypeFile(file) { 23136 const header = file.peekBytes(4); 23137 return readUint32(header, 0) === 0x00010000 || bytesToString(header) === "true"; 23138} 23139function isTrueTypeCollectionFile(file) { 23140 const header = file.peekBytes(4); 23141 return bytesToString(header) === "ttcf"; 23142} 23143function isOpenTypeFile(file) { 23144 const header = file.peekBytes(4); 23145 return bytesToString(header) === "OTTO"; 23146} 23147function isType1File(file) { 23148 const header = file.peekBytes(2); 23149 if (header[0] === 0x25 && header[1] === 0x21) { 23150 return true; 23151 } 23152 if (header[0] === 0x80 && header[1] === 0x01) { 23153 return true; 23154 } 23155 return false; 23156} 23157function isCFFFile(file) { 23158 const header = file.peekBytes(4); 23159 if (header[0] >= 1 && header[3] >= 1 && header[3] <= 4) { 23160 return true; 23161 } 23162 return false; 23163} 23164function getFontFileType(file, { 23165 type, 23166 subtype, 23167 composite 23168}) { 23169 let fileType, fileSubtype; 23170 if (isTrueTypeFile(file) || isTrueTypeCollectionFile(file)) { 23171 fileType = composite ? "CIDFontType2" : "TrueType"; 23172 } else if (isOpenTypeFile(file)) { 23173 fileType = composite ? "CIDFontType2" : "OpenType"; 23174 } else if (isType1File(file)) { 23175 if (composite) { 23176 fileType = "CIDFontType0"; 23177 } else { 23178 fileType = type === "MMType1" ? "MMType1" : "Type1"; 23179 } 23180 } else if (isCFFFile(file)) { 23181 if (composite) { 23182 fileType = "CIDFontType0"; 23183 fileSubtype = "CIDFontType0C"; 23184 } else { 23185 fileType = type === "MMType1" ? "MMType1" : "Type1"; 23186 fileSubtype = "Type1C"; 23187 } 23188 } else { 23189 warn("getFontFileType: Unable to detect correct font file Type/Subtype."); 23190 fileType = type; 23191 fileSubtype = subtype; 23192 } 23193 return [fileType, fileSubtype]; 23194} 23195function applyStandardFontGlyphMap(map, glyphMap) { 23196 for (const charCode in glyphMap) { 23197 map[+charCode] = glyphMap[charCode]; 23198 } 23199} 23200function buildToFontChar(encoding, glyphsUnicodeMap, differences) { 23201 const toFontChar = []; 23202 let unicode; 23203 for (let i = 0, ii = encoding.length; i < ii; i++) { 23204 unicode = getUnicodeForGlyph(encoding[i], glyphsUnicodeMap); 23205 if (unicode !== -1) { 23206 toFontChar[i] = unicode; 23207 } 23208 } 23209 for (const charCode in differences) { 23210 unicode = getUnicodeForGlyph(differences[charCode], glyphsUnicodeMap); 23211 if (unicode !== -1) { 23212 toFontChar[+charCode] = unicode; 23213 } 23214 } 23215 return toFontChar; 23216} 23217function isMacNameRecord(r) { 23218 return r.platform === 1 && r.encoding === 0 && r.language === 0; 23219} 23220function isWinNameRecord(r) { 23221 return r.platform === 3 && r.encoding === 1 && r.language === 0x409; 23222} 23223function convertCidString(charCode, cid, shouldThrow = false) { 23224 switch (cid.length) { 23225 case 1: 23226 return cid.charCodeAt(0); 23227 case 2: 23228 return cid.charCodeAt(0) << 8 | cid.charCodeAt(1); 23229 } 23230 const msg = `Unsupported CID string (charCode ${charCode}): "${cid}".`; 23231 if (shouldThrow) { 23232 throw new FormatError(msg); 23233 } 23234 warn(msg); 23235 return cid; 23236} 23237function adjustMapping(charCodeToGlyphId, hasGlyph, newGlyphZeroId, toUnicode) { 23238 const newMap = Object.create(null); 23239 const toUnicodeExtraMap = new Map(); 23240 const toFontChar = []; 23241 const usedGlyphIds = new Set(); 23242 let privateUseAreaIndex = 0; 23243 const privateUseOffetStart = PRIVATE_USE_AREAS[privateUseAreaIndex][0]; 23244 let nextAvailableFontCharCode = privateUseOffetStart; 23245 let privateUseOffetEnd = PRIVATE_USE_AREAS[privateUseAreaIndex][1]; 23246 const isInPrivateArea = code => PRIVATE_USE_AREAS[0][0] <= code && code <= PRIVATE_USE_AREAS[0][1] || PRIVATE_USE_AREAS[1][0] <= code && code <= PRIVATE_USE_AREAS[1][1]; 23247
vendor: 15,636 bytes, lines 23247-23673
23247for (const originalCharCode in charCodeToGlyphId) { 23248 let glyphId = charCodeToGlyphId[originalCharCode]; 23249 if (!hasGlyph(glyphId)) { 23250 continue; 23251 } 23252 if (nextAvailableFontCharCode > privateUseOffetEnd) { 23253 privateUseAreaIndex++; 23254 if (privateUseAreaIndex >= PRIVATE_USE_AREAS.length) { 23255 warn("Ran out of space in font private use area."); 23256 break; 23257 } 23258 nextAvailableFontCharCode = PRIVATE_USE_AREAS[privateUseAreaIndex][0]; 23259 privateUseOffetEnd = PRIVATE_USE_AREAS[privateUseAreaIndex][1]; 23260 } 23261 const fontCharCode = nextAvailableFontCharCode++; 23262 if (glyphId === 0) { 23263 glyphId = newGlyphZeroId; 23264 } 23265 let unicode = toUnicode.get(originalCharCode); 23266 if (typeof unicode === "string") { 23267 unicode = unicode.codePointAt(0); 23268 } 23269 if (unicode && !isInPrivateArea(unicode) && !usedGlyphIds.has(glyphId)) { 23270 toUnicodeExtraMap.set(unicode, glyphId); 23271 usedGlyphIds.add(glyphId); 23272 } 23273 newMap[fontCharCode] = glyphId; 23274 toFontChar[originalCharCode] = fontCharCode; 23275 } 23276 return { 23277 toFontChar, 23278 charCodeToGlyphId: newMap, 23279 toUnicodeExtraMap, 23280 nextAvailableFontCharCode 23281 }; 23282} 23283function getRanges(glyphs, toUnicodeExtraMap, numGlyphs) { 23284 const codes = []; 23285 for (const charCode in glyphs) { 23286 if (glyphs[charCode] >= numGlyphs) { 23287 continue; 23288 } 23289 codes.push({ 23290 fontCharCode: charCode | 0, 23291 glyphId: glyphs[charCode] 23292 }); 23293 } 23294 if (toUnicodeExtraMap) { 23295 for (const [unicode, glyphId] of toUnicodeExtraMap) { 23296 if (glyphId >= numGlyphs) { 23297 continue; 23298 } 23299 codes.push({ 23300 fontCharCode: unicode, 23301 glyphId 23302 }); 23303 } 23304 } 23305 if (codes.length === 0) { 23306 codes.push({ 23307 fontCharCode: 0, 23308 glyphId: 0 23309 }); 23310 } 23311 codes.sort(function fontGetRangesSort(a, b) { 23312 return a.fontCharCode - b.fontCharCode; 23313 }); 23314 const ranges = []; 23315 const length = codes.length; 23316 for (let n = 0; n < length;) { 23317 const start = codes[n].fontCharCode; 23318 const codeIndices = [codes[n].glyphId]; 23319 ++n; 23320 let end = start; 23321 while (n < length && end + 1 === codes[n].fontCharCode) { 23322 codeIndices.push(codes[n].glyphId); 23323 ++end; 23324 ++n; 23325 if (end === 0xffff) { 23326 break; 23327 } 23328 } 23329 ranges.push([start, end, codeIndices]); 23330 } 23331 return ranges; 23332} 23333function createCmapTable(glyphs, toUnicodeExtraMap, numGlyphs) { 23334 const ranges = getRanges(glyphs, toUnicodeExtraMap, numGlyphs); 23335 const numTables = ranges.at(-1)[1] > 0xffff ? 2 : 1; 23336 let cmap = "\x00\x00" + string16(numTables) + "\x00\x03" + "\x00\x01" + string32(4 + numTables * 8); 23337 let i, ii, j, jj; 23338 for (i = ranges.length - 1; i >= 0; --i) { 23339 if (ranges[i][0] <= 0xffff) { 23340 break; 23341 } 23342 } 23343 const bmpLength = i + 1; 23344 if (ranges[i][0] < 0xffff && ranges[i][1] === 0xffff) { 23345 ranges[i][1] = 0xfffe; 23346 } 23347 const trailingRangesCount = ranges[i][1] < 0xffff ? 1 : 0; 23348 const segCount = bmpLength + trailingRangesCount; 23349 const searchParams = OpenTypeFileBuilder.getSearchParams(segCount, 2); 23350 let startCount = ""; 23351 let endCount = ""; 23352 let idDeltas = ""; 23353 let idRangeOffsets = ""; 23354 let glyphsIds = ""; 23355 let bias = 0; 23356 let range, start, end, codes; 23357 for (i = 0, ii = bmpLength; i < ii; i++) { 23358 range = ranges[i]; 23359 start = range[0]; 23360 end = range[1]; 23361 startCount += string16(start); 23362 endCount += string16(end); 23363 codes = range[2]; 23364 let contiguous = true; 23365 for (j = 1, jj = codes.length; j < jj; ++j) { 23366 if (codes[j] !== codes[j - 1] + 1) { 23367 contiguous = false; 23368 break; 23369 } 23370 } 23371 if (!contiguous) { 23372 const offset = (segCount - i) * 2 + bias * 2; 23373 bias += end - start + 1; 23374 idDeltas += string16(0); 23375 idRangeOffsets += string16(offset); 23376 for (j = 0, jj = codes.length; j < jj; ++j) { 23377 glyphsIds += string16(codes[j]); 23378 } 23379 } else { 23380 const startCode = codes[0]; 23381 idDeltas += string16(startCode - start & 0xffff); 23382 idRangeOffsets += string16(0); 23383 } 23384 } 23385 if (trailingRangesCount > 0) { 23386 endCount += "\xFF\xFF"; 23387 startCount += "\xFF\xFF"; 23388 idDeltas += "\x00\x01"; 23389 idRangeOffsets += "\x00\x00"; 23390 } 23391 const format314 = "\x00\x00" + string16(2 * segCount) + string16(searchParams.range) + string16(searchParams.entry) + string16(searchParams.rangeShift) + endCount + "\x00\x00" + startCount + idDeltas + idRangeOffsets + glyphsIds; 23392 let format31012 = ""; 23393 let header31012 = ""; 23394 if (numTables > 1) { 23395 cmap += "\x00\x03" + "\x00\x0A" + string32(4 + numTables * 8 + 4 + format314.length); 23396 format31012 = ""; 23397 for (i = 0, ii = ranges.length; i < ii; i++) { 23398 range = ranges[i]; 23399 start = range[0]; 23400 codes = range[2]; 23401 let code = codes[0]; 23402 for (j = 1, jj = codes.length; j < jj; ++j) { 23403 if (codes[j] !== codes[j - 1] + 1) { 23404 end = range[0] + j - 1; 23405 format31012 += string32(start) + string32(end) + string32(code); 23406 start = end + 1; 23407 code = codes[j]; 23408 } 23409 } 23410 format31012 += string32(start) + string32(range[1]) + string32(code); 23411 } 23412 header31012 = "\x00\x0C" + "\x00\x00" + string32(format31012.length + 16) + "\x00\x00\x00\x00" + string32(format31012.length / 12); 23413 } 23414 return cmap + "\x00\x04" + string16(format314.length + 4) + format314 + header31012 + format31012; 23415} 23416function validateOS2Table(os2, file) { 23417 file.pos = (file.start || 0) + os2.offset; 23418 const version = file.getUint16(); 23419 file.skip(60); 23420 const selection = file.getUint16(); 23421 if (version < 4 && selection & 0x0300) { 23422 return false; 23423 } 23424 const firstChar = file.getUint16(); 23425 const lastChar = file.getUint16(); 23426 if (firstChar > lastChar) { 23427 return false; 23428 } 23429 file.skip(6); 23430 const usWinAscent = file.getUint16(); 23431 if (usWinAscent === 0) { 23432 return false; 23433 } 23434 os2.data[8] = os2.data[9] = 0; 23435 return true; 23436} 23437function createOS2Table(properties, charstrings, override) { 23438 override ||= { 23439 unitsPerEm: 0, 23440 yMax: 0, 23441 yMin: 0, 23442 ascent: 0, 23443 descent: 0 23444 }; 23445 let ulUnicodeRange1 = 0; 23446 let ulUnicodeRange2 = 0; 23447 let ulUnicodeRange3 = 0; 23448 let ulUnicodeRange4 = 0; 23449 let firstCharIndex = null; 23450 let lastCharIndex = 0; 23451 let position = -1; 23452 if (charstrings) { 23453 for (let code in charstrings) { 23454 code |= 0; 23455 if (firstCharIndex > code || !firstCharIndex) { 23456 firstCharIndex = code; 23457 } 23458 if (lastCharIndex < code) { 23459 lastCharIndex = code; 23460 } 23461 position = getUnicodeRangeFor(code, position); 23462 if (position < 32) { 23463 ulUnicodeRange1 |= 1 << position; 23464 } else if (position < 64) { 23465 ulUnicodeRange2 |= 1 << position - 32; 23466 } else if (position < 96) { 23467 ulUnicodeRange3 |= 1 << position - 64; 23468 } else if (position < 123) { 23469 ulUnicodeRange4 |= 1 << position - 96; 23470 } else { 23471 throw new FormatError("Unicode ranges Bits > 123 are reserved for internal usage"); 23472 } 23473 } 23474 if (lastCharIndex > 0xffff) { 23475 lastCharIndex = 0xffff; 23476 } 23477 } else { 23478 firstCharIndex = 0; 23479 lastCharIndex = 255; 23480 } 23481 const bbox = properties.bbox || [0, 0, 0, 0]; 23482 const unitsPerEm = override.unitsPerEm || (properties.fontMatrix ? 1 / Math.max(...properties.fontMatrix.slice(0, 4).map(Math.abs)) : 1000); 23483 const scale = properties.ascentScaled ? 1.0 : unitsPerEm / PDF_GLYPH_SPACE_UNITS; 23484 const typoAscent = override.ascent || Math.round(scale * (properties.ascent || bbox[3])); 23485 let typoDescent = override.descent || Math.round(scale * (properties.descent || bbox[1])); 23486 if (typoDescent > 0 && properties.descent > 0 && bbox[1] < 0) { 23487 typoDescent = -typoDescent; 23488 } 23489 const winAscent = override.yMax || typoAscent; 23490 const winDescent = -override.yMin || -typoDescent; 23491 return "\x00\x03" + "\x02\x24" + "\x01\xF4" + "\x00\x05" + "\x00\x00" + "\x02\x8A" + "\x02\xBB" + "\x00\x00" + "\x00\x8C" + "\x02\x8A" + "\x02\xBB" + "\x00\x00" + "\x01\xDF" + "\x00\x31" + "\x01\x02" + "\x00\x00" + "\x00\x00\x06" + String.fromCharCode(properties.fixedPitch ? 0x09 : 0x00) + "\x00\x00\x00\x00\x00\x00" + string32(ulUnicodeRange1) + string32(ulUnicodeRange2) + string32(ulUnicodeRange3) + string32(ulUnicodeRange4) + "\x2A\x32\x31\x2A" + string16(properties.italicAngle ? 1 : 0) + string16(firstCharIndex || properties.firstChar) + string16(lastCharIndex || properties.lastChar) + string16(typoAscent) + string16(typoDescent) + "\x00\x64" + string16(winAscent) + string16(winDescent) + "\x00\x00\x00\x00" + "\x00\x00\x00\x00" + string16(properties.xHeight) + string16(properties.capHeight) + string16(0) + string16(firstCharIndex || properties.firstChar) + "\x00\x03"; 23492} 23493function createPostTable(properties) { 23494 const angle = Math.floor(properties.italicAngle * 2 ** 16); 23495 return "\x00\x03\x00\x00" + string32(angle) + "\x00\x00" + "\x00\x00" + string32(properties.fixedPitch ? 1 : 0) + "\x00\x00\x00\x00" + "\x00\x00\x00\x00" + "\x00\x00\x00\x00" + "\x00\x00\x00\x00"; 23496} 23497function createPostscriptName(name) { 23498 return name.replaceAll(/[^\x21-\x7E]|[[\](){}<>/%]/g, "").slice(0, 63); 23499} 23500function createNameTable(name, proto) { 23501 if (!proto) { 23502 proto = [[], []]; 23503 } 23504 const strings = [proto[0][0] || "Original licence", proto[0][1] || name, proto[0][2] || "Unknown", proto[0][3] || "uniqueID", proto[0][4] || name, proto[0][5] || "Version 0.11", proto[0][6] || createPostscriptName(name), proto[0][7] || "Unknown", proto[0][8] || "Unknown", proto[0][9] || "Unknown"]; 23505 const stringsUnicode = []; 23506 let i, ii, j, jj, str; 23507 for (i = 0, ii = strings.length; i < ii; i++) { 23508 str = proto[1][i] || strings[i]; 23509 const strBufUnicode = []; 23510 for (j = 0, jj = str.length; j < jj; j++) { 23511 strBufUnicode.push(string16(str.charCodeAt(j))); 23512 } 23513 stringsUnicode.push(strBufUnicode.join("")); 23514 } 23515 const names = [strings, stringsUnicode]; 23516 const platforms = ["\x00\x01", "\x00\x03"]; 23517 const encodings = ["\x00\x00", "\x00\x01"]; 23518 const languages = ["\x00\x00", "\x04\x09"]; 23519 const namesRecordCount = strings.length * platforms.length; 23520 let nameTable = "\x00\x00" + string16(namesRecordCount) + string16(namesRecordCount * 12 + 6); 23521 let strOffset = 0; 23522 for (i = 0, ii = platforms.length; i < ii; i++) { 23523 const strs = names[i]; 23524 for (j = 0, jj = strs.length; j < jj; j++) { 23525 str = strs[j]; 23526 const nameRecord = platforms[i] + encodings[i] + languages[i] + string16(j) + string16(str.length) + string16(strOffset); 23527 nameTable += nameRecord; 23528 strOffset += str.length; 23529 } 23530 } 23531 nameTable += strings.join("") + stringsUnicode.join(""); 23532 return nameTable; 23533} 23534class Font { 23535 constructor(name, file, properties) { 23536 this.name = name; 23537 this.psName = null; 23538 this.mimetype = null; 23539 this.disableFontFace = false; 23540 this.loadedName = properties.loadedName; 23541 this.isType3Font = properties.isType3Font; 23542 this.missingFile = false; 23543 this.cssFontInfo = properties.cssFontInfo; 23544 this._charsCache = Object.create(null); 23545 this._glyphCache = Object.create(null); 23546 let isSerifFont = !!(properties.flags & FontFlags.Serif); 23547 if (!isSerifFont && !properties.isSimulatedFlags) { 23548 const baseName = name.replaceAll(/[,_]/g, "-").split("-", 1)[0], 23549 serifFonts = getSerifFonts(); 23550 for (const namePart of baseName.split("+")) { 23551 if (serifFonts[namePart]) { 23552 isSerifFont = true; 23553 break; 23554 } 23555 } 23556 } 23557 this.isSerifFont = isSerifFont; 23558 this.isSymbolicFont = !!(properties.flags & FontFlags.Symbolic); 23559 this.isMonospace = !!(properties.flags & FontFlags.FixedPitch); 23560 let { 23561 type, 23562 subtype 23563 } = properties; 23564 this.type = type; 23565 this.subtype = subtype; 23566 this.systemFontInfo = properties.systemFontInfo; 23567 const matches = name.match(/^InvalidPDFjsFont_(.*)_\d+$/); 23568 this.isInvalidPDFjsFont = !!matches; 23569 if (this.isInvalidPDFjsFont) { 23570 this.fallbackName = matches[1]; 23571 } else if (this.isMonospace) { 23572 this.fallbackName = "monospace"; 23573 } else if (this.isSerifFont) { 23574 this.fallbackName = "serif"; 23575 } else { 23576 this.fallbackName = "sans-serif"; 23577 } 23578 if (this.systemFontInfo?.guessFallback) { 23579 this.systemFontInfo.guessFallback = false; 23580 this.systemFontInfo.css += `,${this.fallbackName}`; 23581 } 23582 this.differences = properties.differences; 23583 this.widths = properties.widths; 23584 this.defaultWidth = properties.defaultWidth; 23585 this.composite = properties.composite; 23586 this.cMap = properties.cMap; 23587 this.capHeight = properties.capHeight / PDF_GLYPH_SPACE_UNITS; 23588 this.ascent = properties.ascent / PDF_GLYPH_SPACE_UNITS; 23589 this.descent = properties.descent / PDF_GLYPH_SPACE_UNITS; 23590 this.lineHeight = this.ascent - this.descent; 23591 this.fontMatrix = properties.fontMatrix; 23592 this.bbox = properties.bbox; 23593 this.defaultEncoding = properties.defaultEncoding; 23594 this.toUnicode = properties.toUnicode; 23595 this.toFontChar = []; 23596 if (properties.type === "Type3") { 23597 for (let charCode = 0; charCode < 256; charCode++) { 23598 this.toFontChar[charCode] = this.differences[charCode] || properties.defaultEncoding[charCode]; 23599 } 23600 return; 23601 } 23602 this.cidEncoding = properties.cidEncoding || ""; 23603 this.vertical = !!properties.vertical; 23604 if (this.vertical) { 23605 this.vmetrics = properties.vmetrics; 23606 this.defaultVMetrics = properties.defaultVMetrics; 23607 } 23608 if (!file || file.isEmpty) { 23609 if (file) { 23610 warn('Font file is empty in "' + name + '" (' + this.loadedName + ")"); 23611 } 23612 this.fallbackToSystemFont(properties); 23613 return; 23614 } 23615 [type, subtype] = getFontFileType(file, properties); 23616 if (type !== this.type || subtype !== this.subtype) { 23617 info("Inconsistent font file Type/SubType, expected: " + `${this.type}/${this.subtype} but found: ${type}/${subtype}.`); 23618 } 23619 let data; 23620 try { 23621 switch (type) { 23622 case "MMType1": 23623 info("MMType1 font (" + name + "), falling back to Type1."); 23624 case "Type1": 23625 case "CIDFontType0": 23626 this.mimetype = "font/opentype"; 23627 const cff = subtype === "Type1C" || subtype === "CIDFontType0C" ? new CFFFont(file, properties) : new Type1Font(name, file, properties); 23628 adjustWidths(properties); 23629 data = this.convert(name, cff, properties); 23630 break; 23631 case "OpenType": 23632 case "TrueType": 23633 case "CIDFontType2": 23634 this.mimetype = "font/opentype"; 23635 data = this.checkAndRepair(name, file, properties); 23636 if (this.isOpenType) { 23637 adjustWidths(properties); 23638 type = "OpenType"; 23639 } 23640 break; 23641 default: 23642 throw new FormatError(`Font ${type} is not supported`); 23643 } 23644 } catch (e) { 23645 warn(e); 23646 this.fallbackToSystemFont(properties); 23647 return; 23648 } 23649 amendFallbackToUnicode(properties); 23650 this.data = data; 23651 this.type = type; 23652 this.subtype = subtype; 23653 this.fontMatrix = properties.fontMatrix; 23654 this.widths = properties.widths; 23655 this.defaultWidth = properties.defaultWidth; 23656 this.toUnicode = properties.toUnicode; 23657 this.seacMap = properties.seacMap; 23658 } 23659 get renderer() { 23660 const renderer = FontRendererFactory.create(this, SEAC_ANALYSIS_ENABLED); 23661 return shadow(this, "renderer", renderer); 23662 } 23663 exportData(extraProperties = false) { 23664 const exportDataProperties = extraProperties ? [...EXPORT_DATA_PROPERTIES, ...EXPORT_DATA_EXTRA_PROPERTIES] : EXPORT_DATA_PROPERTIES; 23665 const data = Object.create(null); 23666 let property, value; 23667 for (property of exportDataProperties) { 23668 value = this[property]; 23669 if (value !== undefined) { 23670 data[property] = value; 23671 } 23672 } 23673 return data
vendor: 15,731 bytes, lines 23673-24124
23673; 23674 } 23675 fallbackToSystemFont(properties) { 23676 this.missingFile = true; 23677 const { 23678 name, 23679 type 23680 } = this; 23681 let fontName = normalizeFontName(name); 23682 const stdFontMap = getStdFontMap(), 23683 nonStdFontMap = getNonStdFontMap(); 23684 const isStandardFont = !!stdFontMap[fontName]; 23685 const isMappedToStandardFont = !!(nonStdFontMap[fontName] && stdFontMap[nonStdFontMap[fontName]]); 23686 fontName = stdFontMap[fontName] || nonStdFontMap[fontName] || fontName; 23687 const fontBasicMetricsMap = getFontBasicMetrics(); 23688 const metrics = fontBasicMetricsMap[fontName]; 23689 if (metrics) { 23690 if (isNaN(this.ascent)) { 23691 this.ascent = metrics.ascent / PDF_GLYPH_SPACE_UNITS; 23692 } 23693 if (isNaN(this.descent)) { 23694 this.descent = metrics.descent / PDF_GLYPH_SPACE_UNITS; 23695 } 23696 if (isNaN(this.capHeight)) { 23697 this.capHeight = metrics.capHeight / PDF_GLYPH_SPACE_UNITS; 23698 } 23699 } 23700 this.bold = /bold/gi.test(fontName); 23701 this.italic = /oblique|italic/gi.test(fontName); 23702 this.black = /Black/g.test(name); 23703 const isNarrow = /Narrow/g.test(name); 23704 this.remeasure = (!isStandardFont || isNarrow) && Object.keys(this.widths).length > 0; 23705 if ((isStandardFont || isMappedToStandardFont) && type === "CIDFontType2" && this.cidEncoding.startsWith("Identity-")) { 23706 const cidToGidMap = properties.cidToGidMap; 23707 const map = []; 23708 applyStandardFontGlyphMap(map, getGlyphMapForStandardFonts()); 23709 if (/Arial-?Black/i.test(name)) { 23710 applyStandardFontGlyphMap(map, getSupplementalGlyphMapForArialBlack()); 23711 } else if (/Calibri/i.test(name)) { 23712 applyStandardFontGlyphMap(map, getSupplementalGlyphMapForCalibri()); 23713 } 23714 if (cidToGidMap) { 23715 for (const charCode in map) { 23716 const cid = map[charCode]; 23717 if (cidToGidMap[cid] !== undefined) { 23718 map[+charCode] = cidToGidMap[cid]; 23719 } 23720 } 23721 if (cidToGidMap.length !== this.toUnicode.length && properties.hasIncludedToUnicodeMap && this.toUnicode instanceof IdentityToUnicodeMap) { 23722 this.toUnicode.forEach(function (charCode, unicodeCharCode) { 23723 const cid = map[charCode]; 23724 if (cidToGidMap[cid] === undefined) { 23725 map[+charCode] = unicodeCharCode; 23726 } 23727 }); 23728 } 23729 } 23730 if (!(this.toUnicode instanceof IdentityToUnicodeMap)) { 23731 this.toUnicode.forEach(function (charCode, unicodeCharCode) { 23732 map[+charCode] = unicodeCharCode; 23733 }); 23734 } 23735 this.toFontChar = map; 23736 this.toUnicode = new ToUnicodeMap(map); 23737 } else if (/Symbol/i.test(fontName)) { 23738 this.toFontChar = buildToFontChar(SymbolSetEncoding, getGlyphsUnicode(), this.differences); 23739 } else if (/Dingbats/i.test(fontName)) { 23740 this.toFontChar = buildToFontChar(ZapfDingbatsEncoding, getDingbatsGlyphsUnicode(), this.differences); 23741 } else if (isStandardFont || isMappedToStandardFont) { 23742 const map = buildToFontChar(this.defaultEncoding, getGlyphsUnicode(), this.differences); 23743 if (type === "CIDFontType2" && !this.cidEncoding.startsWith("Identity-") && !(this.toUnicode instanceof IdentityToUnicodeMap)) { 23744 this.toUnicode.forEach(function (charCode, unicodeCharCode) { 23745 map[+charCode] = unicodeCharCode; 23746 }); 23747 } 23748 this.toFontChar = map; 23749 } else { 23750 const glyphsUnicodeMap = getGlyphsUnicode(); 23751 const map = []; 23752 this.toUnicode.forEach((charCode, unicodeCharCode) => { 23753 if (!this.composite) { 23754 const glyphName = this.differences[charCode] || this.defaultEncoding[charCode]; 23755 const unicode = getUnicodeForGlyph(glyphName, glyphsUnicodeMap); 23756 if (unicode !== -1) { 23757 unicodeCharCode = unicode; 23758 } 23759 } 23760 map[+charCode] = unicodeCharCode; 23761 }); 23762 if (this.composite && this.toUnicode instanceof IdentityToUnicodeMap) { 23763 if (/Tahoma|Verdana/i.test(name)) { 23764 applyStandardFontGlyphMap(map, getGlyphMapForStandardFonts()); 23765 } 23766 } 23767 this.toFontChar = map; 23768 } 23769 amendFallbackToUnicode(properties); 23770 this.loadedName = fontName.split("-", 1)[0]; 23771 } 23772 checkAndRepair(name, font, properties) { 23773 const VALID_TABLES = ["OS/2", "cmap", "head", "hhea", "hmtx", "maxp", "name", "post", "loca", "glyf", "fpgm", "prep", "cvt ", "CFF "]; 23774 function readTables(file, numTables) { 23775 const tables = Object.create(null); 23776 tables["OS/2"] = null; 23777 tables.cmap = null; 23778 tables.head = null; 23779 tables.hhea = null; 23780 tables.hmtx = null; 23781 tables.maxp = null; 23782 tables.name = null; 23783 tables.post = null; 23784 for (let i = 0; i < numTables; i++) { 23785 const table = readTableEntry(file); 23786 if (!VALID_TABLES.includes(table.tag)) { 23787 continue; 23788 } 23789 if (table.length === 0) { 23790 continue; 23791 } 23792 tables[table.tag] = table; 23793 } 23794 return tables; 23795 } 23796 function readTableEntry(file) { 23797 const tag = file.getString(4); 23798 const checksum = file.getInt32() >>> 0; 23799 const offset = file.getInt32() >>> 0; 23800 const length = file.getInt32() >>> 0; 23801 const previousPosition = file.pos; 23802 file.pos = file.start || 0; 23803 file.skip(offset); 23804 const data = file.getBytes(length); 23805 file.pos = previousPosition; 23806 if (tag === "head") { 23807 data[8] = data[9] = data[10] = data[11] = 0; 23808 data[17] |= 0x20; 23809 } 23810 return { 23811 tag, 23812 checksum, 23813 length, 23814 offset, 23815 data 23816 }; 23817 } 23818 function readOpenTypeHeader(ttf) { 23819 return { 23820 version: ttf.getString(4), 23821 numTables: ttf.getUint16(), 23822 searchRange: ttf.getUint16(), 23823 entrySelector: ttf.getUint16(), 23824 rangeShift: ttf.getUint16() 23825 }; 23826 } 23827 function readTrueTypeCollectionHeader(ttc) { 23828 const ttcTag = ttc.getString(4); 23829 assert(ttcTag === "ttcf", "Must be a TrueType Collection font."); 23830 const majorVersion = ttc.getUint16(); 23831 const minorVersion = ttc.getUint16(); 23832 const numFonts = ttc.getInt32() >>> 0; 23833 const offsetTable = []; 23834 for (let i = 0; i < numFonts; i++) { 23835 offsetTable.push(ttc.getInt32() >>> 0); 23836 } 23837 const header = { 23838 ttcTag, 23839 majorVersion, 23840 minorVersion, 23841 numFonts, 23842 offsetTable 23843 }; 23844 switch (majorVersion) { 23845 case 1: 23846 return header; 23847 case 2: 23848 header.dsigTag = ttc.getInt32() >>> 0; 23849 header.dsigLength = ttc.getInt32() >>> 0; 23850 header.dsigOffset = ttc.getInt32() >>> 0; 23851 return header; 23852 } 23853 throw new FormatError(`Invalid TrueType Collection majorVersion: ${majorVersion}.`); 23854 } 23855 function readTrueTypeCollectionData(ttc, fontName) { 23856 const { 23857 numFonts, 23858 offsetTable 23859 } = readTrueTypeCollectionHeader(ttc); 23860 const fontNameParts = fontName.split("+"); 23861 let fallbackData; 23862 for (let i = 0; i < numFonts; i++) { 23863 ttc.pos = (ttc.start || 0) + offsetTable[i]; 23864 const potentialHeader = readOpenTypeHeader(ttc); 23865 const potentialTables = readTables(ttc, potentialHeader.numTables); 23866 if (!potentialTables.name) { 23867 throw new FormatError('TrueType Collection font must contain a "name" table.'); 23868 } 23869 const [nameTable] = readNameTable(potentialTables.name); 23870 for (let j = 0, jj = nameTable.length; j < jj; j++) { 23871 for (let k = 0, kk = nameTable[j].length; k < kk; k++) { 23872 const nameEntry = nameTable[j][k]?.replaceAll(/\s/g, ""); 23873 if (!nameEntry) { 23874 continue; 23875 } 23876 if (nameEntry === fontName) { 23877 return { 23878 header: potentialHeader, 23879 tables: potentialTables 23880 }; 23881 } 23882 if (fontNameParts.length < 2) { 23883 continue; 23884 } 23885 for (const part of fontNameParts) { 23886 if (nameEntry === part) { 23887 fallbackData = { 23888 name: part, 23889 header: potentialHeader, 23890 tables: potentialTables 23891 }; 23892 } 23893 } 23894 } 23895 } 23896 } 23897 if (fallbackData) { 23898 warn(`TrueType Collection does not contain "${fontName}" font, ` + `falling back to "${fallbackData.name}" font instead.`); 23899 return { 23900 header: fallbackData.header, 23901 tables: fallbackData.tables 23902 }; 23903 } 23904 throw new FormatError(`TrueType Collection does not contain "${fontName}" font.`); 23905 } 23906 function readCmapTable(cmap, file, isSymbolicFont, hasEncoding) { 23907 if (!cmap) { 23908 warn("No cmap table available."); 23909 return { 23910 platformId: -1, 23911 encodingId: -1, 23912 mappings: [], 23913 hasShortCmap: false 23914 }; 23915 } 23916 let segment; 23917 let start = (file.start || 0) + cmap.offset; 23918 file.pos = start; 23919 file.skip(2); 23920 const numTables = file.getUint16(); 23921 let potentialTable; 23922 let canBreak = false; 23923 for (let i = 0; i < numTables; i++) { 23924 const platformId = file.getUint16(); 23925 const encodingId = file.getUint16(); 23926 const offset = file.getInt32() >>> 0; 23927 let useTable = false; 23928 if (potentialTable?.platformId === platformId && potentialTable?.encodingId === encodingId) { 23929 continue; 23930 } 23931 if (platformId === 0 && (encodingId === 0 || encodingId === 1 || encodingId === 3)) { 23932 useTable = true; 23933 } else if (platformId === 1 && encodingId === 0) { 23934 useTable = true; 23935 } else if (platformId === 3 && encodingId === 1 && (hasEncoding || !potentialTable)) { 23936 useTable = true; 23937 if (!isSymbolicFont) { 23938 canBreak = true; 23939 } 23940 } else if (isSymbolicFont && platformId === 3 && encodingId === 0) { 23941 useTable = true; 23942 let correctlySorted = true; 23943 if (i < numTables - 1) { 23944 const nextBytes = file.peekBytes(2), 23945 nextPlatformId = int16(nextBytes[0], nextBytes[1]); 23946 if (nextPlatformId < platformId) { 23947 correctlySorted = false; 23948 } 23949 } 23950 if (correctlySorted) { 23951 canBreak = true; 23952 } 23953 } 23954 if (useTable) { 23955 potentialTable = { 23956 platformId, 23957 encodingId, 23958 offset 23959 }; 23960 } 23961 if (canBreak) { 23962 break; 23963 } 23964 } 23965 if (potentialTable) { 23966 file.pos = start + potentialTable.offset; 23967 } 23968 if (!potentialTable || file.peekByte() === -1) { 23969 warn("Could not find a preferred cmap table."); 23970 return { 23971 platformId: -1, 23972 encodingId: -1, 23973 mappings: [], 23974 hasShortCmap: false 23975 }; 23976 } 23977 const format = file.getUint16(); 23978 let hasShortCmap = false; 23979 const mappings = []; 23980 let j, glyphId; 23981 if (format === 0) { 23982 file.skip(2 + 2); 23983 for (j = 0; j < 256; j++) { 23984 const index = file.getByte(); 23985 if (!index) { 23986 continue; 23987 } 23988 mappings.push({ 23989 charCode: j, 23990 glyphId: index 23991 }); 23992 } 23993 hasShortCmap = true; 23994 } else if (format === 2) { 23995 file.skip(2 + 2); 23996 const subHeaderKeys = []; 23997 let maxSubHeaderKey = 0; 23998 for (let i = 0; i < 256; i++) { 23999 const subHeaderKey = file.getUint16() >> 3; 24000 subHeaderKeys.push(subHeaderKey); 24001 maxSubHeaderKey = Math.max(subHeaderKey, maxSubHeaderKey); 24002 } 24003 const subHeaders = []; 24004 for (let i = 0; i <= maxSubHeaderKey; i++) { 24005 subHeaders.push({ 24006 firstCode: file.getUint16(), 24007 entryCount: file.getUint16(), 24008 idDelta: signedInt16(file.getByte(), file.getByte()), 24009 idRangePos: file.pos + file.getUint16() 24010 }); 24011 } 24012 for (let i = 0; i < 256; i++) { 24013 if (subHeaderKeys[i] === 0) { 24014 file.pos = subHeaders[0].idRangePos + 2 * i; 24015 glyphId = file.getUint16(); 24016 mappings.push({ 24017 charCode: i, 24018 glyphId 24019 }); 24020 } else { 24021 const s = subHeaders[subHeaderKeys[i]]; 24022 for (j = 0; j < s.entryCount; j++) { 24023 const charCode = (i << 8) + j + s.firstCode; 24024 file.pos = s.idRangePos + 2 * j; 24025 glyphId = file.getUint16(); 24026 if (glyphId !== 0) { 24027 glyphId = (glyphId + s.idDelta) % 65536; 24028 } 24029 mappings.push({ 24030 charCode, 24031 glyphId 24032 }); 24033 } 24034 } 24035 } 24036 } else if (format === 4) { 24037 file.skip(2 + 2); 24038 const segCount = file.getUint16() >> 1; 24039 file.skip(6); 24040 const segments = []; 24041 let segIndex; 24042 for (segIndex = 0; segIndex < segCount; segIndex++) { 24043 segments.push({ 24044 end: file.getUint16() 24045 }); 24046 } 24047 file.skip(2); 24048 for (segIndex = 0; segIndex < segCount; segIndex++) { 24049 segments[segIndex].start = file.getUint16(); 24050 } 24051 for (segIndex = 0; segIndex < segCount; segIndex++) { 24052 segments[segIndex].delta = file.getUint16(); 24053 } 24054 let offsetsCount = 0, 24055 offsetIndex; 24056 for (segIndex = 0; segIndex < segCount; segIndex++) { 24057 segment = segments[segIndex]; 24058 const rangeOffset = file.getUint16(); 24059 if (!rangeOffset) { 24060 segment.offsetIndex = -1; 24061 continue; 24062 } 24063 offsetIndex = (rangeOffset >> 1) - (segCount - segIndex); 24064 segment.offsetIndex = offsetIndex; 24065 offsetsCount = Math.max(offsetsCount, offsetIndex + segment.end - segment.start + 1); 24066 } 24067 const offsets = []; 24068 for (j = 0; j < offsetsCount; j++) { 24069 offsets.push(file.getUint16()); 24070 } 24071 for (segIndex = 0; segIndex < segCount; segIndex++) { 24072 segment = segments[segIndex]; 24073 start = segment.start; 24074 const end = segment.end; 24075 const delta = segment.delta; 24076 offsetIndex = segment.offsetIndex; 24077 for (j = start; j <= end; j++) { 24078 if (j === 0xffff) { 24079 continue; 24080 } 24081 glyphId = offsetIndex < 0 ? j : offsets[offsetIndex + j - start]; 24082 glyphId = glyphId + delta & 0xffff; 24083 mappings.push({ 24084 charCode: j, 24085 glyphId 24086 }); 24087 } 24088 } 24089 } else if (format === 6) { 24090 file.skip(2 + 2); 24091 const firstCode = file.getUint16(); 24092 const entryCount = file.getUint16(); 24093 for (j = 0; j < entryCount; j++) { 24094 glyphId = file.getUint16(); 24095 const charCode = firstCode + j; 24096 mappings.push({ 24097 charCode, 24098 glyphId 24099 }); 24100 } 24101 } else if (format === 12) { 24102 file.skip(2 + 4 + 4); 24103 const nGroups = file.getInt32() >>> 0; 24104 for (j = 0; j < nGroups; j++) { 24105 const startCharCode = file.getInt32() >>> 0; 24106 const endCharCode = file.getInt32() >>> 0; 24107 let glyphCode = file.getInt32() >>> 0; 24108 for (let charCode = startCharCode; charCode <= endCharCode; charCode++) { 24109 mappings.push({ 24110 charCode, 24111 glyphId: glyphCode++ 24112 }); 24113 } 24114 } 24115 } else { 24116 warn("cmap table has unsupported format: " + format); 24117 return { 24118 platformId: -1, 24119 encodingId: -1, 24120 mappings: [], 24121 hasShortCmap: false 24122 }; 24123 } 24124 mappings.sort(
24124function (a, b) { 24125 return a.charCode - b.charCode; 24126 }); 24127 for (let i = 1; i < mappings.length; i++) { 24128 if (mappings[i - 1].charCode === mappings[i].charCode) { 24129 mappings.splice(i, 1); 24130 i--; 24131 } 24132 } 24133 return { 24134 platformId: potentialTable.platformId, 24135 encodingId: potentialTable.encodingId, 24136 m
vendor: 22,853 bytes, lines 24136-24796
24136appings, 24137 hasShortCmap 24138 }; 24139 } 24140 function sanitizeMetrics(file, header, metrics, headTable, numGlyphs, dupFirstEntry) { 24141 if (!header) { 24142 if (metrics) { 24143 metrics.data = null; 24144 } 24145 return; 24146 } 24147 file.pos = (file.start || 0) + header.offset; 24148 file.pos += 4; 24149 file.pos += 2; 24150 file.pos += 2; 24151 file.pos += 2; 24152 file.pos += 2; 24153 file.pos += 2; 24154 file.pos += 2; 24155 file.pos += 2; 24156 file.pos += 2; 24157 file.pos += 2; 24158 const caretOffset = file.getUint16(); 24159 file.pos += 8; 24160 file.pos += 2; 24161 let numOfMetrics = file.getUint16(); 24162 if (caretOffset !== 0) { 24163 const macStyle = int16(headTable.data[44], headTable.data[45]); 24164 if (!(macStyle & 2)) { 24165 header.data[22] = 0; 24166 header.data[23] = 0; 24167 } 24168 } 24169 if (numOfMetrics > numGlyphs) { 24170 info(`The numOfMetrics (${numOfMetrics}) should not be ` + `greater than the numGlyphs (${numGlyphs}).`); 24171 numOfMetrics = numGlyphs; 24172 header.data[34] = (numOfMetrics & 0xff00) >> 8; 24173 header.data[35] = numOfMetrics & 0x00ff; 24174 } 24175 const numOfSidebearings = numGlyphs - numOfMetrics; 24176 const numMissing = numOfSidebearings - (metrics.length - numOfMetrics * 4 >> 1); 24177 if (numMissing > 0) { 24178 const entries = new Uint8Array(metrics.length + numMissing * 2); 24179 entries.set(metrics.data); 24180 if (dupFirstEntry) { 24181 entries[metrics.length] = metrics.data[2]; 24182 entries[metrics.length + 1] = metrics.data[3]; 24183 } 24184 metrics.data = entries; 24185 } 24186 } 24187 function sanitizeGlyph(source, sourceStart, sourceEnd, dest, destStart, hintsValid) { 24188 const glyphProfile = { 24189 length: 0, 24190 sizeOfInstructions: 0 24191 }; 24192 if (sourceStart < 0 || sourceStart >= source.length || sourceEnd > source.length || sourceEnd - sourceStart <= 12) { 24193 return glyphProfile; 24194 } 24195 const glyf = source.subarray(sourceStart, sourceEnd); 24196 const xMin = signedInt16(glyf[2], glyf[3]); 24197 const yMin = signedInt16(glyf[4], glyf[5]); 24198 const xMax = signedInt16(glyf[6], glyf[7]); 24199 const yMax = signedInt16(glyf[8], glyf[9]); 24200 if (xMin > xMax) { 24201 writeSignedInt16(glyf, 2, xMax); 24202 writeSignedInt16(glyf, 6, xMin); 24203 } 24204 if (yMin > yMax) { 24205 writeSignedInt16(glyf, 4, yMax); 24206 writeSignedInt16(glyf, 8, yMin); 24207 } 24208 const contoursCount = signedInt16(glyf[0], glyf[1]); 24209 if (contoursCount < 0) { 24210 if (contoursCount < -1) { 24211 return glyphProfile; 24212 } 24213 dest.set(glyf, destStart); 24214 glyphProfile.length = glyf.length; 24215 return glyphProfile; 24216 } 24217 let i, 24218 j = 10, 24219 flagsCount = 0; 24220 for (i = 0; i < contoursCount; i++) { 24221 const endPoint = glyf[j] << 8 | glyf[j + 1]; 24222 flagsCount = endPoint + 1; 24223 j += 2; 24224 } 24225 const instructionsStart = j; 24226 const instructionsLength = glyf[j] << 8 | glyf[j + 1]; 24227 glyphProfile.sizeOfInstructions = instructionsLength; 24228 j += 2 + instructionsLength; 24229 const instructionsEnd = j; 24230 let coordinatesLength = 0; 24231 for (i = 0; i < flagsCount; i++) { 24232 const flag = glyf[j++]; 24233 if (flag & 0xc0) { 24234 glyf[j - 1] = flag & 0x3f; 24235 } 24236 let xLength = 2; 24237 if (flag & 2) { 24238 xLength = 1; 24239 } else if (flag & 16) { 24240 xLength = 0; 24241 } 24242 let yLength = 2; 24243 if (flag & 4) { 24244 yLength = 1; 24245 } else if (flag & 32) { 24246 yLength = 0; 24247 } 24248 const xyLength = xLength + yLength; 24249 coordinatesLength += xyLength; 24250 if (flag & 8) { 24251 const repeat = glyf[j++]; 24252 if (repeat === 0) { 24253 glyf[j - 1] ^= 8; 24254 } 24255 i += repeat; 24256 coordinatesLength += repeat * xyLength; 24257 } 24258 } 24259 if (coordinatesLength === 0) { 24260 return glyphProfile; 24261 } 24262 let glyphDataLength = j + coordinatesLength; 24263 if (glyphDataLength > glyf.length) { 24264 return glyphProfile; 24265 } 24266 if (!hintsValid && instructionsLength > 0) { 24267 dest.set(glyf.subarray(0, instructionsStart), destStart); 24268 dest.set([0, 0], destStart + instructionsStart); 24269 dest.set(glyf.subarray(instructionsEnd, glyphDataLength), destStart + instructionsStart + 2); 24270 glyphDataLength -= instructionsLength; 24271 if (glyf.length - glyphDataLength > 3) { 24272 glyphDataLength = glyphDataLength + 3 & ~3; 24273 } 24274 glyphProfile.length = glyphDataLength; 24275 return glyphProfile; 24276 } 24277 if (glyf.length - glyphDataLength > 3) { 24278 glyphDataLength = glyphDataLength + 3 & ~3; 24279 dest.set(glyf.subarray(0, glyphDataLength), destStart); 24280 glyphProfile.length = glyphDataLength; 24281 return glyphProfile; 24282 } 24283 dest.set(glyf, destStart); 24284 glyphProfile.length = glyf.length; 24285 return glyphProfile; 24286 } 24287 function sanitizeHead(head, numGlyphs, locaLength) { 24288 const data = head.data; 24289 const version = int32(data[0], data[1], data[2], data[3]); 24290 if (version >> 16 !== 1) { 24291 info("Attempting to fix invalid version in head table: " + version); 24292 data[0] = 0; 24293 data[1] = 1; 24294 data[2] = 0; 24295 data[3] = 0; 24296 } 24297 const indexToLocFormat = int16(data[50], data[51]); 24298 if (indexToLocFormat < 0 || indexToLocFormat > 1) { 24299 info("Attempting to fix invalid indexToLocFormat in head table: " + indexToLocFormat); 24300 const numGlyphsPlusOne = numGlyphs + 1; 24301 if (locaLength === numGlyphsPlusOne << 1) { 24302 data[50] = 0; 24303 data[51] = 0; 24304 } else if (locaLength === numGlyphsPlusOne << 2) { 24305 data[50] = 0; 24306 data[51] = 1; 24307 } else { 24308 throw new FormatError("Could not fix indexToLocFormat: " + indexToLocFormat); 24309 } 24310 } 24311 } 24312 function sanitizeGlyphLocations(loca, glyf, numGlyphs, isGlyphLocationsLong, hintsValid, dupFirstEntry, maxSizeOfInstructions) { 24313 let itemSize, itemDecode, itemEncode; 24314 if (isGlyphLocationsLong) { 24315 itemSize = 4; 24316 itemDecode = function fontItemDecodeLong(data, offset) { 24317 return data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]; 24318 }; 24319 itemEncode = function fontItemEncodeLong(data, offset, value) { 24320 data[offset] = value >>> 24 & 0xff; 24321 data[offset + 1] = value >> 16 & 0xff; 24322 data[offset + 2] = value >> 8 & 0xff; 24323 data[offset + 3] = value & 0xff; 24324 }; 24325 } else { 24326 itemSize = 2; 24327 itemDecode = function fontItemDecode(data, offset) { 24328 return data[offset] << 9 | data[offset + 1] << 1; 24329 }; 24330 itemEncode = function fontItemEncode(data, offset, value) { 24331 data[offset] = value >> 9 & 0xff; 24332 data[offset + 1] = value >> 1 & 0xff; 24333 }; 24334 } 24335 const numGlyphsOut = dupFirstEntry ? numGlyphs + 1 : numGlyphs; 24336 const locaDataSize = itemSize * (1 + numGlyphsOut); 24337 const locaData = new Uint8Array(locaDataSize); 24338 locaData.set(loca.data.subarray(0, locaDataSize)); 24339 loca.data = locaData; 24340 const oldGlyfData = glyf.data; 24341 const oldGlyfDataLength = oldGlyfData.length; 24342 const newGlyfData = new Uint8Array(oldGlyfDataLength); 24343 let i, j; 24344 const locaEntries = []; 24345 for (i = 0, j = 0; i < numGlyphs + 1; i++, j += itemSize) { 24346 let offset = itemDecode(locaData, j); 24347 if (offset > oldGlyfDataLength) { 24348 offset = oldGlyfDataLength; 24349 } 24350 locaEntries.push({ 24351 index: i, 24352 offset, 24353 endOffset: 0 24354 }); 24355 } 24356 locaEntries.sort((a, b) => a.offset - b.offset); 24357 for (i = 0; i < numGlyphs; i++) { 24358 locaEntries[i].endOffset = locaEntries[i + 1].offset; 24359 } 24360 locaEntries.sort((a, b) => a.index - b.index); 24361 for (i = 0; i < numGlyphs; i++) { 24362 const { 24363 offset, 24364 endOffset 24365 } = locaEntries[i]; 24366 if (offset !== 0 || endOffset !== 0) { 24367 break; 24368 } 24369 const nextOffset = locaEntries[i + 1].offset; 24370 if (nextOffset === 0) { 24371 continue; 24372 } 24373 locaEntries[i].endOffset = nextOffset; 24374 break; 24375 } 24376 const last = locaEntries.at(-2); 24377 if (last.offset !== 0 && last.endOffset === 0) { 24378 last.endOffset = oldGlyfDataLength; 24379 } 24380 const missingGlyphs = Object.create(null); 24381 let writeOffset = 0; 24382 itemEncode(locaData, 0, writeOffset); 24383 for (i = 0, j = itemSize; i < numGlyphs; i++, j += itemSize) { 24384 const glyphProfile = sanitizeGlyph(oldGlyfData, locaEntries[i].offset, locaEntries[i].endOffset, newGlyfData, writeOffset, hintsValid); 24385 const newLength = glyphProfile.length; 24386 if (newLength === 0) { 24387 missingGlyphs[i] = true; 24388 } 24389 if (glyphProfile.sizeOfInstructions > maxSizeOfInstructions) { 24390 maxSizeOfInstructions = glyphProfile.sizeOfInstructions; 24391 } 24392 writeOffset += newLength; 24393 itemEncode(locaData, j, writeOffset); 24394 } 24395 if (writeOffset === 0) { 24396 const simpleGlyph = new Uint8Array([0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0]); 24397 for (i = 0, j = itemSize; i < numGlyphsOut; i++, j += itemSize) { 24398 itemEncode(locaData, j, simpleGlyph.length); 24399 } 24400 glyf.data = simpleGlyph; 24401 } else if (dupFirstEntry) { 24402 const firstEntryLength = itemDecode(locaData, itemSize); 24403 if (newGlyfData.length > firstEntryLength + writeOffset) { 24404 glyf.data = newGlyfData.subarray(0, firstEntryLength + writeOffset); 24405 } else { 24406 glyf.data = new Uint8Array(firstEntryLength + writeOffset); 24407 glyf.data.set(newGlyfData.subarray(0, writeOffset)); 24408 } 24409 glyf.data.set(newGlyfData.subarray(0, firstEntryLength), writeOffset); 24410 itemEncode(loca.data, locaData.length - itemSize, writeOffset + firstEntryLength); 24411 } else { 24412 glyf.data = newGlyfData.subarray(0, writeOffset); 24413 } 24414 return { 24415 missingGlyphs, 24416 maxSizeOfInstructions 24417 }; 24418 } 24419 function readPostScriptTable(post, propertiesObj, maxpNumGlyphs) { 24420 const start = (font.start || 0) + post.offset; 24421 font.pos = start; 24422 const length = post.length, 24423 end = start + length; 24424 const version = font.getInt32(); 24425 font.skip(28); 24426 let glyphNames; 24427 let valid = true; 24428 let i; 24429 switch (version) { 24430 case 0x00010000: 24431 glyphNames = MacStandardGlyphOrdering; 24432 break; 24433 case 0x00020000: 24434 const numGlyphs = font.getUint16(); 24435 if (numGlyphs !== maxpNumGlyphs) { 24436 valid = false; 24437 break; 24438 } 24439 const glyphNameIndexes = []; 24440 for (i = 0; i < numGlyphs; ++i) { 24441 const index = font.getUint16(); 24442 if (index >= 32768) { 24443 valid = false; 24444 break; 24445 } 24446 glyphNameIndexes.push(index); 24447 } 24448 if (!valid) { 24449 break; 24450 } 24451 const customNames = [], 24452 strBuf = []; 24453 while (font.pos < end) { 24454 const stringLength = font.getByte(); 24455 strBuf.length = stringLength; 24456 for (i = 0; i < stringLength; ++i) { 24457 strBuf[i] = String.fromCharCode(font.getByte()); 24458 } 24459 customNames.push(strBuf.join("")); 24460 } 24461 glyphNames = []; 24462 for (i = 0; i < numGlyphs; ++i) { 24463 const j = glyphNameIndexes[i]; 24464 if (j < 258) { 24465 glyphNames.push(MacStandardGlyphOrdering[j]); 24466 continue; 24467 } 24468 glyphNames.push(customNames[j - 258]); 24469 } 24470 break; 24471 case 0x00030000: 24472 break; 24473 default: 24474 warn("Unknown/unsupported post table version " + version); 24475 valid = false; 24476 if (propertiesObj.defaultEncoding) { 24477 glyphNames = propertiesObj.defaultEncoding; 24478 } 24479 break; 24480 } 24481 propertiesObj.glyphNames = glyphNames; 24482 return valid; 24483 } 24484 function readNameTable(nameTable) { 24485 const start = (font.start || 0) + nameTable.offset; 24486 font.pos = start; 24487 const names = [[], []], 24488 records = []; 24489 const length = nameTable.length, 24490 end = start + length; 24491 const format = font.getUint16(); 24492 const FORMAT_0_HEADER_LENGTH = 6; 24493 if (format !== 0 || length < FORMAT_0_HEADER_LENGTH) { 24494 return [names, records]; 24495 } 24496 const numRecords = font.getUint16(); 24497 const stringsStart = font.getUint16(); 24498 const NAME_RECORD_LENGTH = 12; 24499 let i, ii; 24500 for (i = 0; i < numRecords && font.pos + NAME_RECORD_LENGTH <= end; i++) { 24501 const r = { 24502 platform: font.getUint16(), 24503 encoding: font.getUint16(), 24504 language: font.getUint16(), 24505 name: font.getUint16(), 24506 length: font.getUint16(), 24507 offset: font.getUint16() 24508 }; 24509 if (isMacNameRecord(r) || isWinNameRecord(r)) { 24510 records.push(r); 24511 } 24512 } 24513 for (i = 0, ii = records.length; i < ii; i++) { 24514 const record = records[i]; 24515 if (record.length <= 0) { 24516 continue; 24517 } 24518 const pos = start + stringsStart + record.offset; 24519 if (pos + record.length > end) { 24520 continue; 24521 } 24522 font.pos = pos; 24523 const nameIndex = record.name; 24524 if (record.encoding) { 24525 let str = ""; 24526 for (let j = 0, jj = record.length; j < jj; j += 2) { 24527 str += String.fromCharCode(font.getUint16()); 24528 } 24529 names[1][nameIndex] = str; 24530 } else { 24531 names[0][nameIndex] = font.getString(record.length); 24532 } 24533 } 24534 return [names, records]; 24535 } 24536 const TTOpsStackDeltas = [0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -2, -2, 0, 0, -2, -5, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, -1, -1, 1, -1, -999, 0, 1, 0, -1, -2, 0, -1, -2, -1, -1, 0, -1, -1, 0, 0, -999, -999, -1, -1, -1, -1, -2, -999, -2, -2, -999, 0, -2, -2, 0, 0, -2, 0, -2, 0, 0, 0, -2, -1, -1, 1, 1, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, 0, -999, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -999, -999, -999, -999, -999, -1, -1, -2, -2, 0, 0, 0, 0, -1, -1, -999, -2, -2, 0, 0, -1, -2, -2, 0, 0, 0, -1, -1, -1, -2]; 24537 function sanitizeTTProgram(table, ttContext) { 24538 let data = table.data; 24539 let i = 0, 24540 j, 24541 n, 24542 b, 24543 funcId, 24544 pc, 24545 lastEndf = 0, 24546 lastDeff = 0; 24547 const stack = []; 24548 const callstack = []; 24549 const functionsCalled = []; 24550 let tooComplexToFollowFunctions = ttContext.tooComplexToFollowFunctions; 24551 let inFDEF = false, 24552 ifLevel = 0, 24553 inELSE = 0; 24554 for (let ii = data.length; i < ii;) { 24555 const op = data[i++]; 24556 if (op === 0x40) { 24557 n = data[i++]; 24558 if (inFDEF || inELSE) { 24559 i += n; 24560 } else { 24561 for (j = 0; j < n; j++) { 24562 stack.push(data[i++]); 24563 } 24564 } 24565 } else if (op === 0x41) { 24566 n = data[i++]; 24567 if (inFDEF || inELSE) { 24568 i += n * 2; 24569 } else { 24570 for (j = 0; j < n; j++) { 24571 b = data[i++]; 24572 stack.push(b << 8 | data[i++]); 24573 } 24574 } 24575 } else if ((op & 0xf8) === 0xb0) { 24576 n = op - 0xb0 + 1; 24577 if (inFDEF || inELSE) { 24578 i += n; 24579 } else { 24580 for (j = 0; j < n; j++) { 24581 stack.push(data[i++]); 24582 } 24583 } 24584 } else if ((op & 0xf8) === 0xb8) { 24585 n = op - 0xb8 + 1; 24586 if (inFDEF || inELSE) { 24587 i += n * 2; 24588 } else { 24589 for (j = 0; j < n; j++) { 24590 b = data[i++]; 24591 stack.push(signedInt16(b, data[i++])); 24592 } 24593 } 24594 } else if (op === 0x2b && !tooComplexToFollowFunctions) { 24595 if (!inFDEF && !inELSE) { 24596 funcId = stack.at(-1); 24597 if (isNaN(funcId)) { 24598 info("TT: CALL empty stack (or invalid entry)."); 24599 } else { 24600 ttContext.functionsUsed[funcId] = true; 24601 if (funcId in ttContext.functionsStackDeltas) { 24602 const newStackLength = stack.length + ttContext.functionsStackDeltas[funcId]; 24603 if (newStackLength < 0) { 24604 warn("TT: CALL invalid functions stack delta."); 24605 ttContext.hintsValid = false; 24606 return; 24607 } 24608 stack.length = newStackLength; 24609 } else if (funcId in ttContext.functionsDefined && !functionsCalled.includes(funcId)) { 24610 callstack.push({ 24611 data, 24612 i, 24613 stackTop: stack.length - 1 24614 }); 24615 functionsCalled.push(funcId); 24616 pc = ttContext.functionsDefined[funcId]; 24617 if (!pc) { 24618 warn("TT: CALL non-existent function"); 24619 ttContext.hintsValid = false; 24620 return; 24621 } 24622 data = pc.data; 24623 i = pc.i; 24624 } 24625 } 24626 } 24627 } else if (op === 0x2c && !tooComplexToFollowFunctions) { 24628 if (inFDEF || inELSE) { 24629 warn("TT: nested FDEFs not allowed"); 24630 tooComplexToFollowFunctions = true; 24631 } 24632 inFDEF = true; 24633 lastDeff = i; 24634 funcId = stack.pop(); 24635 ttContext.functionsDefined[funcId] = { 24636 data, 24637 i 24638 }; 24639 } else if (op === 0x2d) { 24640 if (inFDEF) { 24641 inFDEF = false; 24642 lastEndf = i; 24643 } else { 24644 pc = callstack.pop(); 24645 if (!pc) { 24646 warn("TT: ENDF bad stack"); 24647 ttContext.hintsValid = false; 24648 return; 24649 } 24650 funcId = functionsCalled.pop(); 24651 data = pc.data; 24652 i = pc.i; 24653 ttContext.functionsStackDeltas[funcId] = stack.length - pc.stackTop; 24654 } 24655 } else if (op === 0x89) { 24656 if (inFDEF || inELSE) { 24657 warn("TT: nested IDEFs not allowed"); 24658 tooComplexToFollowFunctions = true; 24659 } 24660 inFDEF = true; 24661 lastDeff = i; 24662 } else if (op === 0x58) { 24663 ++ifLevel; 24664 } else if (op === 0x1b) { 24665 inELSE = ifLevel; 24666 } else if (op === 0x59) { 24667 if (inELSE === ifLevel) { 24668 inELSE = 0; 24669 } 24670 --ifLevel; 24671 } else if (op === 0x1c) { 24672 if (!inFDEF && !inELSE) { 24673 const offset = stack.at(-1); 24674 if (offset > 0) { 24675 i += offset - 1; 24676 } 24677 } 24678 } 24679 if (!inFDEF && !inELSE) { 24680 let stackDelta = 0; 24681 if (op <= 0x8e) { 24682 stackDelta = TTOpsStackDeltas[op]; 24683 } else if (op >= 0xc0 && op <= 0xdf) { 24684 stackDelta = -1; 24685 } else if (op >= 0xe0) { 24686 stackDelta = -2; 24687 } 24688 if (op >= 0x71 && op <= 0x75) { 24689 n = stack.pop(); 24690 if (!isNaN(n)) { 24691 stackDelta = -n * 2; 24692 } 24693 } 24694 while (stackDelta < 0 && stack.length > 0) { 24695 stack.pop(); 24696 stackDelta++; 24697 } 24698 while (stackDelta > 0) { 24699 stack.push(NaN); 24700 stackDelta--; 24701 } 24702 } 24703 } 24704 ttContext.tooComplexToFollowFunctions = tooComplexToFollowFunctions; 24705 const content = [data]; 24706 if (i > data.length) { 24707 content.push(new Uint8Array(i - data.length)); 24708 } 24709 if (lastDeff > lastEndf) { 24710 warn("TT: complementing a missing function tail"); 24711 content.push(new Uint8Array([0x22, 0x2d])); 24712 } 24713 foldTTTable(table, content); 24714 } 24715 function checkInvalidFunctions(ttContext, maxFunctionDefs) { 24716 if (ttContext.tooComplexToFollowFunctions) { 24717 return; 24718 } 24719 if (ttContext.functionsDefined.length > maxFunctionDefs) { 24720 warn("TT: more functions defined than expected"); 24721 ttContext.hintsValid = false; 24722 return; 24723 } 24724 for (let j = 0, jj = ttContext.functionsUsed.length; j < jj; j++) { 24725 if (j > maxFunctionDefs) { 24726 warn("TT: invalid function id: " + j); 24727 ttContext.hintsValid = false; 24728 return; 24729 } 24730 if (ttContext.functionsUsed[j] && !ttContext.functionsDefined[j]) { 24731 warn("TT: undefined function: " + j); 24732 ttContext.hintsValid = false; 24733 return; 24734 } 24735 } 24736 } 24737 function foldTTTable(table, content) { 24738 if (content.length > 1) { 24739 let newLength = 0; 24740 let j, jj; 24741 for (j = 0, jj = content.length; j < jj; j++) { 24742 newLength += content[j].length; 24743 } 24744 newLength = newLength + 3 & ~3; 24745 const result = new Uint8Array(newLength); 24746 let pos = 0; 24747 for (j = 0, jj = content.length; j < jj; j++) { 24748 result.set(content[j], pos); 24749 pos += content[j].length; 24750 } 24751 table.data = result; 24752 table.length = newLength; 24753 } 24754 } 24755 function sanitizeTTPrograms(fpgm, prep, cvt, maxFunctionDefs) { 24756 const ttContext = { 24757 functionsDefined: [], 24758 functionsUsed: [], 24759 functionsStackDeltas: [], 24760 tooComplexToFollowFunctions: false, 24761 hintsValid: true 24762 }; 24763 if (fpgm) { 24764 sanitizeTTProgram(fpgm, ttContext); 24765 } 24766 if (prep) { 24767 sanitizeTTProgram(prep, ttContext); 24768 } 24769 if (fpgm) { 24770 checkInvalidFunctions(ttContext, maxFunctionDefs); 24771 } 24772 if (cvt && cvt.length & 1) { 24773 const cvtData = new Uint8Array(cvt.length + 1); 24774 cvtData.set(cvt.data); 24775 cvt.data = cvtData; 24776 } 24777 return ttContext.hintsValid; 24778 } 24779 font = new Stream(new Uint8Array(font.getBytes())); 24780 let header, tables; 24781 if (isTrueTypeCollectionFile(font)) { 24782 const ttcData = readTrueTypeCollectionData(font, this.name); 24783 header = ttcData.header; 24784 tables = ttcData.tables; 24785 } else { 24786 header = readOpenTypeHeader(font); 24787 tables = readTables(font, header.numTables); 24788 } 24789 let cff, cffFile; 24790 const isTrueType = !tables["CFF "]; 24791 if (!isTrueType) { 24792 const isComposite = properties.composite && (properties.cidToGidMap?.length > 0 || !(properties.cMap instanceof IdentityCMap)); 24793 if (header.version === "OTTO" && !isComposite || !tables.head || !tables.hhea || !tables.maxp || !tables.post) { 24794 cffFile = new Stream(tables["CFF "].data); 24795 cff = new CFFFont(cffFile, properties); 24796
24796adjustWidths(
vendor: 22,732 bytes, lines 24796-25395
24796properties); 24797 return this.convert(name, cff, properties); 24798 } 24799 delete tables.glyf; 24800 delete tables.loca; 24801 delete tables.fpgm; 24802 delete tables.prep; 24803 delete tables["cvt "]; 24804 this.isOpenType = true; 24805 } else { 24806 if (!tables.loca) { 24807 throw new FormatError('Required "loca" table is not found'); 24808 } 24809 if (!tables.glyf) { 24810 warn('Required "glyf" table is not found -- trying to recover.'); 24811 tables.glyf = { 24812 tag: "glyf", 24813 data: new Uint8Array(0) 24814 }; 24815 } 24816 this.isOpenType = false; 24817 } 24818 if (!tables.maxp) { 24819 throw new FormatError('Required "maxp" table is not found'); 24820 } 24821 font.pos = (font.start || 0) + tables.maxp.offset; 24822 let version = font.getInt32(); 24823 const numGlyphs = font.getUint16(); 24824 if (version !== 0x00010000 && version !== 0x00005000) { 24825 if (tables.maxp.length === 6) { 24826 version = 0x0005000; 24827 } else if (tables.maxp.length >= 32) { 24828 version = 0x00010000; 24829 } else { 24830 throw new FormatError(`"maxp" table has a wrong version number`); 24831 } 24832 writeUint32(tables.maxp.data, 0, version); 24833 } 24834 if (properties.scaleFactors?.length === numGlyphs && isTrueType) { 24835 const { 24836 scaleFactors 24837 } = properties; 24838 const isGlyphLocationsLong = int16(tables.head.data[50], tables.head.data[51]); 24839 const glyphs = new GlyfTable({ 24840 glyfTable: tables.glyf.data, 24841 isGlyphLocationsLong, 24842 locaTable: tables.loca.data, 24843 numGlyphs 24844 }); 24845 glyphs.scale(scaleFactors); 24846 const { 24847 glyf, 24848 loca, 24849 isLocationLong 24850 } = glyphs.write(); 24851 tables.glyf.data = glyf; 24852 tables.loca.data = loca; 24853 if (isLocationLong !== !!isGlyphLocationsLong) { 24854 tables.head.data[50] = 0; 24855 tables.head.data[51] = isLocationLong ? 1 : 0; 24856 } 24857 const metrics = tables.hmtx.data; 24858 for (let i = 0; i < numGlyphs; i++) { 24859 const j = 4 * i; 24860 const advanceWidth = Math.round(scaleFactors[i] * int16(metrics[j], metrics[j + 1])); 24861 metrics[j] = advanceWidth >> 8 & 0xff; 24862 metrics[j + 1] = advanceWidth & 0xff; 24863 const lsb = Math.round(scaleFactors[i] * signedInt16(metrics[j + 2], metrics[j + 3])); 24864 writeSignedInt16(metrics, j + 2, lsb); 24865 } 24866 } 24867 let numGlyphsOut = numGlyphs + 1; 24868 let dupFirstEntry = true; 24869 if (numGlyphsOut > 0xffff) { 24870 dupFirstEntry = false; 24871 numGlyphsOut = numGlyphs; 24872 warn("Not enough space in glyfs to duplicate first glyph."); 24873 } 24874 let maxFunctionDefs = 0; 24875 let maxSizeOfInstructions = 0; 24876 if (version >= 0x00010000 && tables.maxp.length >= 32) { 24877 font.pos += 8; 24878 const maxZones = font.getUint16(); 24879 if (maxZones > 2) { 24880 tables.maxp.data[14] = 0; 24881 tables.maxp.data[15] = 2; 24882 } 24883 font.pos += 4; 24884 maxFunctionDefs = font.getUint16(); 24885 font.pos += 4; 24886 maxSizeOfInstructions = font.getUint16(); 24887 } 24888 tables.maxp.data[4] = numGlyphsOut >> 8; 24889 tables.maxp.data[5] = numGlyphsOut & 255; 24890 const hintsValid = sanitizeTTPrograms(tables.fpgm, tables.prep, tables["cvt "], maxFunctionDefs); 24891 if (!hintsValid) { 24892 delete tables.fpgm; 24893 delete tables.prep; 24894 delete tables["cvt "]; 24895 } 24896 sanitizeMetrics(font, tables.hhea, tables.hmtx, tables.head, numGlyphsOut, dupFirstEntry); 24897 if (!tables.head) { 24898 throw new FormatError('Required "head" table is not found'); 24899 } 24900 sanitizeHead(tables.head, numGlyphs, isTrueType ? tables.loca.length : 0); 24901 let missingGlyphs = Object.create(null); 24902 if (isTrueType) { 24903 const isGlyphLocationsLong = int16(tables.head.data[50], tables.head.data[51]); 24904 const glyphsInfo = sanitizeGlyphLocations(tables.loca, tables.glyf, numGlyphs, isGlyphLocationsLong, hintsValid, dupFirstEntry, maxSizeOfInstructions); 24905 missingGlyphs = glyphsInfo.missingGlyphs; 24906 if (version >= 0x00010000 && tables.maxp.length >= 32) { 24907 tables.maxp.data[26] = glyphsInfo.maxSizeOfInstructions >> 8; 24908 tables.maxp.data[27] = glyphsInfo.maxSizeOfInstructions & 255; 24909 } 24910 } 24911 if (!tables.hhea) { 24912 throw new FormatError('Required "hhea" table is not found'); 24913 } 24914 if (tables.hhea.data[10] === 0 && tables.hhea.data[11] === 0) { 24915 tables.hhea.data[10] = 0xff; 24916 tables.hhea.data[11] = 0xff; 24917 } 24918 const metricsOverride = { 24919 unitsPerEm: int16(tables.head.data[18], tables.head.data[19]), 24920 yMax: signedInt16(tables.head.data[42], tables.head.data[43]), 24921 yMin: signedInt16(tables.head.data[38], tables.head.data[39]), 24922 ascent: signedInt16(tables.hhea.data[4], tables.hhea.data[5]), 24923 descent: signedInt16(tables.hhea.data[6], tables.hhea.data[7]), 24924 lineGap: signedInt16(tables.hhea.data[8], tables.hhea.data[9]) 24925 }; 24926 this.ascent = metricsOverride.ascent / metricsOverride.unitsPerEm; 24927 this.descent = metricsOverride.descent / metricsOverride.unitsPerEm; 24928 this.lineGap = metricsOverride.lineGap / metricsOverride.unitsPerEm; 24929 if (this.cssFontInfo?.lineHeight) { 24930 this.lineHeight = this.cssFontInfo.metrics.lineHeight; 24931 this.lineGap = this.cssFontInfo.metrics.lineGap; 24932 } else { 24933 this.lineHeight = this.ascent - this.descent + this.lineGap; 24934 } 24935 if (tables.post) { 24936 readPostScriptTable(tables.post, properties, numGlyphs); 24937 } 24938 tables.post = { 24939 tag: "post", 24940 data: createPostTable(properties) 24941 }; 24942 const charCodeToGlyphId = Object.create(null); 24943 function hasGlyph(glyphId) { 24944 return !missingGlyphs[glyphId]; 24945 } 24946 if (properties.composite) { 24947 const cidToGidMap = properties.cidToGidMap || []; 24948 const isCidToGidMapEmpty = cidToGidMap.length === 0; 24949 properties.cMap.forEach(function (charCode, cid) { 24950 if (typeof cid === "string") { 24951 cid = convertCidString(charCode, cid, true); 24952 } 24953 if (cid > 0xffff) { 24954 throw new FormatError("Max size of CID is 65,535"); 24955 } 24956 let glyphId = -1; 24957 if (isCidToGidMapEmpty) { 24958 glyphId = cid; 24959 } else if (cidToGidMap[cid] !== undefined) { 24960 glyphId = cidToGidMap[cid]; 24961 } 24962 if (glyphId >= 0 && glyphId < numGlyphs && hasGlyph(glyphId)) { 24963 charCodeToGlyphId[charCode] = glyphId; 24964 } 24965 }); 24966 } else { 24967 const cmapTable = readCmapTable(tables.cmap, font, this.isSymbolicFont, properties.hasEncoding); 24968 const cmapPlatformId = cmapTable.platformId; 24969 const cmapEncodingId = cmapTable.encodingId; 24970 const cmapMappings = cmapTable.mappings; 24971 let baseEncoding = [], 24972 forcePostTable = false; 24973 if (properties.hasEncoding && (properties.baseEncodingName === "MacRomanEncoding" || properties.baseEncodingName === "WinAnsiEncoding")) { 24974 baseEncoding = getEncoding(properties.baseEncodingName); 24975 } 24976 if (properties.hasEncoding && !this.isSymbolicFont && (cmapPlatformId === 3 && cmapEncodingId === 1 || cmapPlatformId === 1 && cmapEncodingId === 0)) { 24977 const glyphsUnicodeMap = getGlyphsUnicode(); 24978 for (let charCode = 0; charCode < 256; charCode++) { 24979 let glyphName; 24980 if (this.differences[charCode] !== undefined) { 24981 glyphName = this.differences[charCode]; 24982 } else if (baseEncoding.length && baseEncoding[charCode] !== "") { 24983 glyphName = baseEncoding[charCode]; 24984 } else { 24985 glyphName = StandardEncoding[charCode]; 24986 } 24987 if (!glyphName) { 24988 continue; 24989 } 24990 const standardGlyphName = recoverGlyphName(glyphName, glyphsUnicodeMap); 24991 let unicodeOrCharCode; 24992 if (cmapPlatformId === 3 && cmapEncodingId === 1) { 24993 unicodeOrCharCode = glyphsUnicodeMap[standardGlyphName]; 24994 } else if (cmapPlatformId === 1 && cmapEncodingId === 0) { 24995 unicodeOrCharCode = MacRomanEncoding.indexOf(standardGlyphName); 24996 } 24997 if (unicodeOrCharCode === undefined) { 24998 if (!properties.glyphNames && properties.hasIncludedToUnicodeMap && !(this.toUnicode instanceof IdentityToUnicodeMap)) { 24999 const unicode = this.toUnicode.get(charCode); 25000 if (unicode) { 25001 unicodeOrCharCode = unicode.codePointAt(0); 25002 } 25003 } 25004 if (unicodeOrCharCode === undefined) { 25005 continue; 25006 } 25007 } 25008 for (const mapping of cmapMappings) { 25009 if (mapping.charCode !== unicodeOrCharCode) { 25010 continue; 25011 } 25012 charCodeToGlyphId[charCode] = mapping.glyphId; 25013 break; 25014 } 25015 } 25016 } else if (cmapPlatformId === 0) { 25017 for (const mapping of cmapMappings) { 25018 charCodeToGlyphId[mapping.charCode] = mapping.glyphId; 25019 } 25020 forcePostTable = true; 25021 } else if (cmapPlatformId === 3 && cmapEncodingId === 0) { 25022 for (const mapping of cmapMappings) { 25023 let charCode = mapping.charCode; 25024 if (charCode >= 0xf000 && charCode <= 0xf0ff) { 25025 charCode &= 0xff; 25026 } 25027 charCodeToGlyphId[charCode] = mapping.glyphId; 25028 } 25029 } else { 25030 for (const mapping of cmapMappings) { 25031 charCodeToGlyphId[mapping.charCode] = mapping.glyphId; 25032 } 25033 } 25034 if (properties.glyphNames && (baseEncoding.length || this.differences.length)) { 25035 for (let i = 0; i < 256; ++i) { 25036 if (!forcePostTable && charCodeToGlyphId[i] !== undefined) { 25037 continue; 25038 } 25039 const glyphName = this.differences[i] || baseEncoding[i]; 25040 if (!glyphName) { 25041 continue; 25042 } 25043 const glyphId = properties.glyphNames.indexOf(glyphName); 25044 if (glyphId > 0 && hasGlyph(glyphId)) { 25045 charCodeToGlyphId[i] = glyphId; 25046 } 25047 } 25048 } 25049 } 25050 if (charCodeToGlyphId.length === 0) { 25051 charCodeToGlyphId[0] = 0; 25052 } 25053 let glyphZeroId = numGlyphsOut - 1; 25054 if (!dupFirstEntry) { 25055 glyphZeroId = 0; 25056 } 25057 if (!properties.cssFontInfo) { 25058 const newMapping = adjustMapping(charCodeToGlyphId, hasGlyph, glyphZeroId, this.toUnicode); 25059 this.toFontChar = newMapping.toFontChar; 25060 tables.cmap = { 25061 tag: "cmap", 25062 data: createCmapTable(newMapping.charCodeToGlyphId, newMapping.toUnicodeExtraMap, numGlyphsOut) 25063 }; 25064 if (!tables["OS/2"] || !validateOS2Table(tables["OS/2"], font)) { 25065 tables["OS/2"] = { 25066 tag: "OS/2", 25067 data: createOS2Table(properties, newMapping.charCodeToGlyphId, metricsOverride) 25068 }; 25069 } 25070 } 25071 if (!isTrueType) { 25072 try { 25073 cffFile = new Stream(tables["CFF "].data); 25074 const parser = new CFFParser(cffFile, properties, SEAC_ANALYSIS_ENABLED); 25075 cff = parser.parse(); 25076 cff.duplicateFirstGlyph(); 25077 const compiler = new CFFCompiler(cff); 25078 tables["CFF "].data = compiler.compile(); 25079 } catch { 25080 warn("Failed to compile font " + properties.loadedName); 25081 } 25082 } 25083 if (!tables.name) { 25084 tables.name = { 25085 tag: "name", 25086 data: createNameTable(this.name) 25087 }; 25088 } else { 25089 const [namePrototype, nameRecords] = readNameTable(tables.name); 25090 tables.name.data = createNameTable(name, namePrototype); 25091 this.psName = namePrototype[0][6] || null; 25092 if (!properties.composite) { 25093 adjustTrueTypeToUnicode(properties, this.isSymbolicFont, nameRecords); 25094 } 25095 } 25096 const builder = new OpenTypeFileBuilder(header.version); 25097 for (const tableTag in tables) { 25098 builder.addTable(tableTag, tables[tableTag].data); 25099 } 25100 return builder.toArray(); 25101 } 25102 convert(fontName, font, properties) { 25103 properties.fixedPitch = false; 25104 if (properties.builtInEncoding) { 25105 adjustType1ToUnicode(properties, properties.builtInEncoding); 25106 } 25107 let glyphZeroId = 1; 25108 if (font instanceof CFFFont) { 25109 glyphZeroId = font.numGlyphs - 1; 25110 } 25111 const mapping = font.getGlyphMapping(properties); 25112 let newMapping = null; 25113 let newCharCodeToGlyphId = mapping; 25114 let toUnicodeExtraMap = null; 25115 if (!properties.cssFontInfo) { 25116 newMapping = adjustMapping(mapping, font.hasGlyphId.bind(font), glyphZeroId, this.toUnicode); 25117 this.toFontChar = newMapping.toFontChar; 25118 newCharCodeToGlyphId = newMapping.charCodeToGlyphId; 25119 toUnicodeExtraMap = newMapping.toUnicodeExtraMap; 25120 } 25121 const numGlyphs = font.numGlyphs; 25122 function getCharCodes(charCodeToGlyphId, glyphId) { 25123 let charCodes = null; 25124 for (const charCode in charCodeToGlyphId) { 25125 if (glyphId === charCodeToGlyphId[charCode]) { 25126 (charCodes ||= []).push(charCode | 0); 25127 } 25128 } 25129 return charCodes; 25130 } 25131 function createCharCode(charCodeToGlyphId, glyphId) { 25132 for (const charCode in charCodeToGlyphId) { 25133 if (glyphId === charCodeToGlyphId[charCode]) { 25134 return charCode | 0; 25135 } 25136 } 25137 newMapping.charCodeToGlyphId[newMapping.nextAvailableFontCharCode] = glyphId; 25138 return newMapping.nextAvailableFontCharCode++; 25139 } 25140 const seacs = font.seacs; 25141 if (newMapping && SEAC_ANALYSIS_ENABLED && seacs?.length) { 25142 const matrix = properties.fontMatrix || FONT_IDENTITY_MATRIX; 25143 const charset = font.getCharset(); 25144 const seacMap = Object.create(null); 25145 for (let glyphId in seacs) { 25146 glyphId |= 0; 25147 const seac = seacs[glyphId]; 25148 const baseGlyphName = StandardEncoding[seac[2]]; 25149 const accentGlyphName = StandardEncoding[seac[3]]; 25150 const baseGlyphId = charset.indexOf(baseGlyphName); 25151 const accentGlyphId = charset.indexOf(accentGlyphName); 25152 if (baseGlyphId < 0 || accentGlyphId < 0) { 25153 continue; 25154 } 25155 const accentOffset = { 25156 x: seac[0] * matrix[0] + seac[1] * matrix[2] + matrix[4], 25157 y: seac[0] * matrix[1] + seac[1] * matrix[3] + matrix[5] 25158 }; 25159 const charCodes = getCharCodes(mapping, glyphId); 25160 if (!charCodes) { 25161 continue; 25162 } 25163 for (const charCode of charCodes) { 25164 const charCodeToGlyphId = newMapping.charCodeToGlyphId; 25165 const baseFontCharCode = createCharCode(charCodeToGlyphId, baseGlyphId); 25166 const accentFontCharCode = createCharCode(charCodeToGlyphId, accentGlyphId); 25167 seacMap[charCode] = { 25168 baseFontCharCode, 25169 accentFontCharCode, 25170 accentOffset 25171 }; 25172 } 25173 } 25174 properties.seacMap = seacMap; 25175 } 25176 const unitsPerEm = properties.fontMatrix ? 1 / Math.max(...properties.fontMatrix.slice(0, 4).map(Math.abs)) : 1000; 25177 const builder = new OpenTypeFileBuilder("\x4F\x54\x54\x4F"); 25178 builder.addTable("CFF ", font.data); 25179 builder.addTable("OS/2", createOS2Table(properties, newCharCodeToGlyphId)); 25180 builder.addTable("cmap", createCmapTable(newCharCodeToGlyphId, toUnicodeExtraMap, numGlyphs)); 25181 builder.addTable("head", "\x00\x01\x00\x00" + "\x00\x00\x10\x00" + "\x00\x00\x00\x00" + "\x5F\x0F\x3C\xF5" + "\x00\x00" + safeString16(unitsPerEm) + "\x00\x00\x00\x00\x9e\x0b\x7e\x27" + "\x00\x00\x00\x00\x9e\x0b\x7e\x27" + "\x00\x00" + safeString16(properties.descent) + "\x0F\xFF" + safeString16(properties.ascent) + string16(properties.italicAngle ? 2 : 0) + "\x00\x11" + "\x00\x00" + "\x00\x00" + "\x00\x00"); 25182 builder.addTable("hhea", "\x00\x01\x00\x00" + safeString16(properties.ascent) + safeString16(properties.descent) + "\x00\x00" + "\xFF\xFF" + "\x00\x00" + "\x00\x00" + "\x00\x00" + safeString16(properties.capHeight) + safeString16(Math.tan(properties.italicAngle) * properties.xHeight) + "\x00\x00" + "\x00\x00" + "\x00\x00" + "\x00\x00" + "\x00\x00" + "\x00\x00" + string16(numGlyphs)); 25183 builder.addTable("hmtx", function fontFieldsHmtx() { 25184 const charstrings = font.charstrings; 25185 const cffWidths = font.cff ? font.cff.widths : null; 25186 let hmtx = "\x00\x00\x00\x00"; 25187 for (let i = 1, ii = numGlyphs; i < ii; i++) { 25188 let width = 0; 25189 if (charstrings) { 25190 const charstring = charstrings[i - 1]; 25191 width = "width" in charstring ? charstring.width : 0; 25192 } else if (cffWidths) { 25193 width = Math.ceil(cffWidths[i] || 0); 25194 } 25195 hmtx += string16(width) + string16(0); 25196 } 25197 return hmtx; 25198 }()); 25199 builder.addTable("maxp", "\x00\x00\x50\x00" + string16(numGlyphs)); 25200 builder.addTable("name", createNameTable(fontName)); 25201 builder.addTable("post", createPostTable(properties)); 25202 return builder.toArray(); 25203 } 25204 get _spaceWidth() { 25205 const possibleSpaceReplacements = ["space", "minus", "one", "i", "I"]; 25206 let width; 25207 for (const glyphName of possibleSpaceReplacements) { 25208 if (glyphName in this.widths) { 25209 width = this.widths[glyphName]; 25210 break; 25211 } 25212 const glyphsUnicodeMap = getGlyphsUnicode(); 25213 const glyphUnicode = glyphsUnicodeMap[glyphName]; 25214 let charcode = 0; 25215 if (this.composite && this.cMap.contains(glyphUnicode)) { 25216 charcode = this.cMap.lookup(glyphUnicode); 25217 if (typeof charcode === "string") { 25218 charcode = convertCidString(glyphUnicode, charcode); 25219 } 25220 } 25221 if (!charcode && this.toUnicode) { 25222 charcode = this.toUnicode.charCodeOf(glyphUnicode); 25223 } 25224 if (charcode <= 0) { 25225 charcode = glyphUnicode; 25226 } 25227 width = this.widths[charcode]; 25228 if (width) { 25229 break; 25230 } 25231 } 25232 return shadow(this, "_spaceWidth", width || this.defaultWidth); 25233 } 25234 _charToGlyph(charcode, isSpace = false) { 25235 let glyph = this._glyphCache[charcode]; 25236 if (glyph?.isSpace === isSpace) { 25237 return glyph; 25238 } 25239 let fontCharCode, width, operatorListId; 25240 let widthCode = charcode; 25241 if (this.cMap?.contains(charcode)) { 25242 widthCode = this.cMap.lookup(charcode); 25243 if (typeof widthCode === "string") { 25244 widthCode = convertCidString(charcode, widthCode); 25245 } 25246 } 25247 width = this.widths[widthCode]; 25248 if (typeof width !== "number") { 25249 width = this.defaultWidth; 25250 } 25251 const vmetric = this.vmetrics?.[widthCode]; 25252 let unicode = this.toUnicode.get(charcode) || charcode; 25253 if (typeof unicode === "number") { 25254 unicode = String.fromCharCode(unicode); 25255 } 25256 let isInFont = this.toFontChar[charcode] !== undefined; 25257 fontCharCode = this.toFontChar[charcode] || charcode; 25258 if (this.missingFile) { 25259 const glyphName = this.differences[charcode] || this.defaultEncoding[charcode]; 25260 if ((glyphName === ".notdef" || glyphName === "") && this.type === "Type1") { 25261 fontCharCode = 0x20; 25262 if (glyphName === "") { 25263 width ||= this._spaceWidth; 25264 unicode = String.fromCharCode(fontCharCode); 25265 } 25266 } 25267 fontCharCode = mapSpecialUnicodeValues(fontCharCode); 25268 } 25269 if (this.isType3Font) { 25270 operatorListId = fontCharCode; 25271 } 25272 let accent = null; 25273 if (this.seacMap?.[charcode]) { 25274 isInFont = true; 25275 const seac = this.seacMap[charcode]; 25276 fontCharCode = seac.baseFontCharCode; 25277 accent = { 25278 fontChar: String.fromCodePoint(seac.accentFontCharCode), 25279 offset: seac.accentOffset 25280 }; 25281 } 25282 let fontChar = ""; 25283 if (typeof fontCharCode === "number") { 25284 if (fontCharCode <= 0x10ffff) { 25285 fontChar = String.fromCodePoint(fontCharCode); 25286 } else { 25287 warn(`charToGlyph - invalid fontCharCode: ${fontCharCode}`); 25288 } 25289 } 25290 if (this.missingFile && this.vertical && fontChar.length === 1) { 25291 const vertical = getVerticalPresentationForm()[fontChar.charCodeAt(0)]; 25292 if (vertical) { 25293 fontChar = unicode = String.fromCharCode(vertical); 25294 } 25295 } 25296 glyph = new fonts_Glyph(charcode, fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont); 25297 return this._glyphCache[charcode] = glyph; 25298 } 25299 charsToGlyphs(chars) { 25300 let glyphs = this._charsCache[chars]; 25301 if (glyphs) { 25302 return glyphs; 25303 } 25304 glyphs = []; 25305 if (this.cMap) { 25306 const c = Object.create(null), 25307 ii = chars.length; 25308 let i = 0; 25309 while (i < ii) { 25310 this.cMap.readCharCode(chars, i, c); 25311 const { 25312 charcode, 25313 length 25314 } = c; 25315 i += length; 25316 const glyph = this._charToGlyph(charcode, length === 1 && chars.charCodeAt(i - 1) === 0x20); 25317 glyphs.push(glyph); 25318 } 25319 } else { 25320 for (let i = 0, ii = chars.length; i < ii; ++i) { 25321 const charcode = chars.charCodeAt(i); 25322 const glyph = this._charToGlyph(charcode, charcode === 0x20); 25323 glyphs.push(glyph); 25324 } 25325 } 25326 return this._charsCache[chars] = glyphs; 25327 } 25328 getCharPositions(chars) { 25329 const positions = []; 25330 if (this.cMap) { 25331 const c = Object.create(null); 25332 let i = 0; 25333 while (i < chars.length) { 25334 this.cMap.readCharCode(chars, i, c); 25335 const length = c.length; 25336 positions.push([i, i + length]); 25337 i += length; 25338 } 25339 } else { 25340 for (let i = 0, ii = chars.length; i < ii; ++i) { 25341 positions.push([i, i + 1]); 25342 } 25343 } 25344 return positions; 25345 } 25346 get glyphCacheValues() { 25347 return Object.values(this._glyphCache); 25348 } 25349 encodeString(str) { 25350 const buffers = []; 25351 const currentBuf = []; 25352 const hasCurrentBufErrors = () => buffers.length % 2 === 1; 25353 const getCharCode = this.toUnicode instanceof IdentityToUnicodeMap ? unicode => this.toUnicode.charCodeOf(unicode) : unicode => this.toUnicode.charCodeOf(String.fromCodePoint(unicode)); 25354 for (let i = 0, ii = str.length; i < ii; i++) { 25355 const unicode = str.codePointAt(i); 25356 if (unicode > 0xd7ff && (unicode < 0xe000 || unicode > 0xfffd)) { 25357 i++; 25358 } 25359 if (this.toUnicode) { 25360 const charCode = getCharCode(unicode); 25361 if (charCode !== -1) { 25362 if (hasCurrentBufErrors()) { 25363 buffers.push(currentBuf.join("")); 25364 currentBuf.length = 0; 25365 } 25366 const charCodeLength = this.cMap ? this.cMap.getCharCodeLength(charCode) : 1; 25367 for (let j = charCodeLength - 1; j >= 0; j--) { 25368 currentBuf.push(String.fromCharCode(charCode >> 8 * j & 0xff)); 25369 } 25370 continue; 25371 } 25372 } 25373 if (!hasCurrentBufErrors()) { 25374 buffers.push(currentBuf.join("")); 25375 currentBuf.length = 0; 25376 } 25377 currentBuf.push(String.fromCodePoint(unicode)); 25378 } 25379 buffers.push(currentBuf.join("")); 25380 return buffers; 25381 } 25382} 25383class ErrorFont { 25384 constructor(error) { 25385 this.error = error; 25386 this.loadedName = "g_font_error"; 25387 this.missingFile = true; 25388 } 25389 charsToGlyphs() { 25390 return []; 25391 } 25392 encodeString(chars) { 25393 return [chars]; 25394 } 25395 exportData(
vendor: 1,578 bytes, lines 25395-25454
25395extraProperties = false) { 25396 return { 25397 error: this.error 25398 }; 25399 } 25400} 25401 25402;// ./src/core/pattern.js 25403 25404 25405 25406 25407const ShadingType = { 25408 FUNCTION_BASED: 1, 25409 AXIAL: 2, 25410 RADIAL: 3, 25411 FREE_FORM_MESH: 4, 25412 LATTICE_FORM_MESH: 5, 25413 COONS_PATCH_MESH: 6, 25414 TENSOR_PATCH_MESH: 7 25415}; 25416class Pattern { 25417 constructor() { 25418 unreachable("Cannot initialize Pattern."); 25419 } 25420 static parseShading(shading, xref, res, pdfFunctionFactory, localColorSpaceCache) { 25421 const dict = shading instanceof BaseStream ? shading.dict : shading; 25422 const type = dict.get("ShadingType"); 25423 try { 25424 switch (type) { 25425 case ShadingType.AXIAL: 25426 case ShadingType.RADIAL: 25427 return new RadialAxialShading(dict, xref, res, pdfFunctionFactory, localColorSpaceCache); 25428 case ShadingType.FREE_FORM_MESH: 25429 case ShadingType.LATTICE_FORM_MESH: 25430 case ShadingType.COONS_PATCH_MESH: 25431 case ShadingType.TENSOR_PATCH_MESH: 25432 return new MeshShading(shading, xref, res, pdfFunctionFactory, localColorSpaceCache); 25433 default: 25434 throw new FormatError("Unsupported ShadingType: " + type); 25435 } 25436 } catch (ex) { 25437 if (ex instanceof MissingDataException) { 25438 throw ex; 25439 } 25440 warn(ex); 25441 return new DummyShading(); 25442 } 25443 } 25444} 25445class BaseShading { 25446 static SMALL_NUMBER = 1e-6; 25447 getIR() { 25448 unreachable("Abstract method `getIR` called."); 25449 } 25450} 25451class RadialAxialShading extends BaseShading { 25452 constructor(dict, xref, resources, pdfFunctionFactory, localColorSpaceCache) { 25453 super(); 25454 this.shadingType = dict.get("ShadingType");
25455 let coordsLen = 0; 25456 if (this.shadingType === ShadingType.AXIAL) { 25457 coordsLen = 4; 25458 } else if (this.shadingType === ShadingType.RADIAL) { 25459 coordsLen = 6; 25460 } 25461 this.coordsArr = dict.getArray("Coords"); 25462 if (!isNumberArray(this.coordsArr, coordsLen)) { 25463 throw new FormatError("RadialAxialShading: Invalid /Coords array."); 25464 } 25465 const cs = ColorSpace.parse({ 25466 cs: dict.getRaw("CS") || dict.getRaw("ColorSpace"), 25467 xref, 25468 resources, 25469 pdfFunctionFactory, 25470 localColorSpaceCache 25471 }); 25472 this.bbox = lookupNormalRect(dict.getArray("BBox"), null); 25473 let t0 = 0.0, 25474 t1 = 1.0; 25475 const domainArr = dict.getArray("Domain"); 25476 if (isNumberArray(domainArr, 2)) { 25477 [t0, t1] = domainArr; 25478 } 25479 let extendStart = false, 25480 extendEnd = false; 25481 const extendArr = dict.getArray("Extend"); 25482 if (isBooleanArray(extendArr, 2)) { 25483 [extendStart, extendEnd] = extendArr; 25484 } 25485 if (this.shadingType === ShadingType.RADIAL && (!extendStart || !extendEnd)) { 25486 const [x1, y1, r1, x2, y2, r2] = this.coordsArr; 25487 const distance = Math.hypot(x1 - x2, y1 - y2); 25488 if (r1 <= r2 + distance && r2 <= r1 + distance) { 25489 warn("Unsupported radial gradient."); 25490 } 25491 } 25492 this.extendStart = extendStart; 25493 this.extendEnd = extendEnd; 25494 const fnObj = dict.getRaw("Function"); 25495 const fn = pdfFunctionFactory.createFromArray(fnObj); 25496 const NUMBER_OF_SAMPLES = 840; 25497 const step = (t1 - t0) / NUMBER_OF_SAMPLES; 25498 const colorStops = this.colorStops = []; 25499 if (t0 >= t1 || step <= 0) { 25500 info("Bad shading domain."); 25501 return; 25502 } 25503 const color = new Float32Array(cs.numComps), 25504 ratio = new Float32Array(1); 25505 let rgbColor; 25506 let iBase = 0; 25507 ratio[0] = t0; 25508 fn(ratio, 0, color, 0); 25509 let rgbBase = cs.getRgb(color, 0); 25510 const cssColorBase = Util.makeHexColor(rgbBase[0], rgbBase[1], rgbBase[2]); 25511 colorStops.push([0, cssColorBase]); 25512 let iPrev = 1; 25513 ratio[0] = t0 + step; 25514 fn(ratio, 0, color, 0); 25515 let rgbPrev = cs.getRgb(color, 0); 25516 let maxSlopeR = rgbPrev[0] - rgbBase[0] + 1; 25517 let maxSlopeG = rgbPrev[1] - rgbBase[1] + 1; 25518 let maxSlopeB = rgbPrev[2] - rgbBase[2] + 1; 25519 let minSlopeR = rgbPrev[0] - rgbBase[0] - 1; 25520 let minSlopeG = rgbPrev[1] - rgbBase[1] - 1; 25521 let minSlopeB = rgbPrev[2] - rgbBase[2] - 1; 25522 for (let i = 2; i < NUMBER_OF_SAMPLES; i++) { 25523 ratio[0] = t0 + i * step; 25524 fn(ratio, 0, color, 0); 25525 rgbColor = cs.getRgb(color, 0); 25526 const run = i - iBase; 25527 maxSlopeR = Math.min(maxSlopeR, (rgbColor[0] - rgbBase[0] + 1) / run); 25528 maxSlopeG = Math.min(maxSlopeG, (rgbColor[1] - rgbBase[1] + 1) / run); 25529 maxSlopeB = Math.min(maxSlopeB, (rgbColor[2] - rgbBase[2] + 1) / run); 25530 minSlopeR = Math.max(minSlopeR, (rgbColor[0] - rgbBase[0] - 1) / run); 25531 minSlopeG = Math.max(minSlopeG, (rgbColor[1] - rgbBase[1] - 1) / run); 25532 minSlopeB = Math.max(minSlopeB, (rgbColor[2] - rgbBase[2] - 1) / run); 25533 const slopesExist = minSlopeR <= maxSlopeR && minSlopeG <= maxSlopeG && minSlopeB <= maxSlopeB; 25534 if (!slopesExist) { 25535 const cssColor = Util.makeHexColor(rgbPrev[0], rgbPrev[1], rgbPrev[2]); 25536 colorStops.push([iPrev / NUMBER_OF_SAMPLES, cssColor]); 25537 maxSlopeR = rgbColor[0] - rgbPrev[0] + 1; 25538 maxSlopeG = rgbColor[1] - rgbPrev[1] + 1; 25539 maxSlopeB = rgbColor[2] - rgbPrev[2] + 1; 25540 minSlopeR = rgbColor[0] - rgbPrev[0] - 1; 25541 minSlopeG = rgbColor[1] - rgbPrev[1] - 1; 25542 minSlopeB = rgbColor[2] - rgbPrev[2] - 1; 25543 iBase = iPrev; 25544 rgbBase = rgbPrev; 25545 } 25546 iPrev = i; 25547 rgbPrev = rgbColor; 25548 } 25549 const cssColor = Util.makeHexColor(rgbPrev[0], rgbPrev[1], rgbPrev[2]); 25550 colorStops.push([1, cssColor]); 25551 let background = "transparent";
vendor: 5,123 bytes, lines 25552-25706
25552 if (dict.has("Background")) { 25553 rgbColor = cs.getRgb(dict.get("Background"), 0); 25554 background = Util.makeHexColor(rgbColor[0], rgbColor[1], rgbColor[2]); 25555 } 25556 if (!extendStart) { 25557 colorStops.unshift([0, background]); 25558 colorStops[1][0] += BaseShading.SMALL_NUMBER; 25559 } 25560 if (!extendEnd) { 25561 colorStops.at(-1)[0] -= BaseShading.SMALL_NUMBER; 25562 colorStops.push([1, background]); 25563 } 25564 this.colorStops = colorStops; 25565 } 25566 getIR() { 25567 const { 25568 coordsArr, 25569 shadingType 25570 } = this; 25571 let type, p0, p1, r0, r1; 25572 if (shadingType === ShadingType.AXIAL) { 25573 p0 = [coordsArr[0], coordsArr[1]]; 25574 p1 = [coordsArr[2], coordsArr[3]]; 25575 r0 = null; 25576 r1 = null; 25577 type = "axial"; 25578 } else if (shadingType === ShadingType.RADIAL) { 25579 p0 = [coordsArr[0], coordsArr[1]]; 25580 p1 = [coordsArr[3], coordsArr[4]]; 25581 r0 = coordsArr[2]; 25582 r1 = coordsArr[5]; 25583 type = "radial"; 25584 } else { 25585 unreachable(`getPattern type unknown: ${shadingType}`); 25586 } 25587 return ["RadialAxial", type, this.bbox, this.colorStops, p0, p1, r0, r1]; 25588 } 25589} 25590class MeshStreamReader { 25591 constructor(stream, context) { 25592 this.stream = stream; 25593 this.context = context; 25594 this.buffer = 0; 25595 this.bufferLength = 0; 25596 const numComps = context.numComps; 25597 this.tmpCompsBuf = new Float32Array(numComps); 25598 const csNumComps = context.colorSpace.numComps; 25599 this.tmpCsCompsBuf = context.colorFn ? new Float32Array(csNumComps) : this.tmpCompsBuf; 25600 } 25601 get hasData() { 25602 if (this.stream.end) { 25603 return this.stream.pos < this.stream.end; 25604 } 25605 if (this.bufferLength > 0) { 25606 return true; 25607 } 25608 const nextByte = this.stream.getByte(); 25609 if (nextByte < 0) { 25610 return false; 25611 } 25612 this.buffer = nextByte; 25613 this.bufferLength = 8; 25614 return true; 25615 } 25616 readBits(n) { 25617 let buffer = this.buffer; 25618 let bufferLength = this.bufferLength; 25619 if (n === 32) { 25620 if (bufferLength === 0) { 25621 return (this.stream.getByte() << 24 | this.stream.getByte() << 16 | this.stream.getByte() << 8 | this.stream.getByte()) >>> 0; 25622 } 25623 buffer = buffer << 24 | this.stream.getByte() << 16 | this.stream.getByte() << 8 | this.stream.getByte(); 25624 const nextByte = this.stream.getByte(); 25625 this.buffer = nextByte & (1 << bufferLength) - 1; 25626 return (buffer << 8 - bufferLength | (nextByte & 0xff) >> bufferLength) >>> 0; 25627 } 25628 if (n === 8 && bufferLength === 0) { 25629 return this.stream.getByte(); 25630 } 25631 while (bufferLength < n) { 25632 buffer = buffer << 8 | this.stream.getByte(); 25633 bufferLength += 8; 25634 } 25635 bufferLength -= n; 25636 this.bufferLength = bufferLength; 25637 this.buffer = buffer & (1 << bufferLength) - 1; 25638 return buffer >> bufferLength; 25639 } 25640 align() { 25641 this.buffer = 0; 25642 this.bufferLength = 0; 25643 } 25644 readFlag() { 25645 return this.readBits(this.context.bitsPerFlag); 25646 } 25647 readCoordinate() { 25648 const bitsPerCoordinate = this.context.bitsPerCoordinate; 25649 const xi = this.readBits(bitsPerCoordinate); 25650 const yi = this.readBits(bitsPerCoordinate); 25651 const decode = this.context.decode; 25652 const scale = bitsPerCoordinate < 32 ? 1 / ((1 << bitsPerCoordinate) - 1) : 2.3283064365386963e-10; 25653 return [xi * scale * (decode[1] - decode[0]) + decode[0], yi * scale * (decode[3] - decode[2]) + decode[2]]; 25654 } 25655 readComponents() { 25656 const numComps = this.context.numComps; 25657 const bitsPerComponent = this.context.bitsPerComponent; 25658 const scale = bitsPerComponent < 32 ? 1 / ((1 << bitsPerComponent) - 1) : 2.3283064365386963e-10; 25659 const decode = this.context.decode; 25660 const components = this.tmpCompsBuf; 25661 for (let i = 0, j = 4; i < numComps; i++, j += 2) { 25662 const ci = this.readBits(bitsPerComponent); 25663 components[i] = ci * scale * (decode[j + 1] - decode[j]) + decode[j]; 25664 } 25665 const color = this.tmpCsCompsBuf; 25666 if (this.context.colorFn) { 25667 this.context.colorFn(components, 0, color, 0); 25668 } 25669 return this.context.colorSpace.getRgb(color, 0); 25670 } 25671} 25672let bCache = Object.create(null); 25673function buildB(count) { 25674 const lut = []; 25675 for (let i = 0; i <= count; i++) { 25676 const t = i / count, 25677 t_ = 1 - t; 25678 lut.push(new Float32Array([t_ ** 3, 3 * t * t_ ** 2, 3 * t ** 2 * t_, t ** 3])); 25679 } 25680 return lut; 25681} 25682function getB(count) { 25683 return bCache[count] ||= buildB(count); 25684} 25685function clearPatternCaches() { 25686 bCache = Object.create(null); 25687} 25688class MeshShading extends BaseShading { 25689 static MIN_SPLIT_PATCH_CHUNKS_AMOUNT = 3; 25690 static MAX_SPLIT_PATCH_CHUNKS_AMOUNT = 20; 25691 static TRIANGLE_DENSITY = 20; 25692 constructor(stream, xref, resources, pdfFunctionFactory, localColorSpaceCache) { 25693 super(); 25694 if (!(stream instanceof BaseStream)) { 25695 throw new FormatError("Mesh data is not a stream"); 25696 } 25697 const dict = stream.dict; 25698 this.shadingType = dict.get("ShadingType"); 25699 this.bbox = lookupNormalRect(dict.getArray("BBox"), null); 25700 const cs = ColorSpace.parse({ 25701 cs: dict.getRaw("CS") || dict.getRaw("ColorSpace"), 25702 xref, 25703 resources, 25704 pdfFunctionFactory, 25705 localColorSpaceCache 25706 });
25707 this.background = dict.has("Background") ? cs.getRgb(dict.get("Background"), 0) : null; 25708 const fnObj = dict.getRaw("Function"); 25709 const fn = fnObj ? pdfFunctionFactory.createFromArray(fnObj
vendor: 11,533 bytes, lines 25709-26069
25709) : null; 25710 this.coords = []; 25711 this.colors = []; 25712 this.figures = []; 25713 const decodeContext = { 25714 bitsPerCoordinate: dict.get("BitsPerCoordinate"), 25715 bitsPerComponent: dict.get("BitsPerComponent"), 25716 bitsPerFlag: dict.get("BitsPerFlag"), 25717 decode: dict.getArray("Decode"), 25718 colorFn: fn, 25719 colorSpace: cs, 25720 numComps: fn ? 1 : cs.numComps 25721 }; 25722 const reader = new MeshStreamReader(stream, decodeContext); 25723 let patchMesh = false; 25724 switch (this.shadingType) { 25725 case ShadingType.FREE_FORM_MESH: 25726 this._decodeType4Shading(reader); 25727 break; 25728 case ShadingType.LATTICE_FORM_MESH: 25729 const verticesPerRow = dict.get("VerticesPerRow") | 0; 25730 if (verticesPerRow < 2) { 25731 throw new FormatError("Invalid VerticesPerRow"); 25732 } 25733 this._decodeType5Shading(reader, verticesPerRow); 25734 break; 25735 case ShadingType.COONS_PATCH_MESH: 25736 this._decodeType6Shading(reader); 25737 patchMesh = true; 25738 break; 25739 case ShadingType.TENSOR_PATCH_MESH: 25740 this._decodeType7Shading(reader); 25741 patchMesh = true; 25742 break; 25743 default: 25744 unreachable("Unsupported mesh type."); 25745 break; 25746 } 25747 if (patchMesh) { 25748 this._updateBounds(); 25749 for (let i = 0, ii = this.figures.length; i < ii; i++) { 25750 this._buildFigureFromPatch(i); 25751 } 25752 } 25753 this._updateBounds(); 25754 this._packData(); 25755 } 25756 _decodeType4Shading(reader) { 25757 const coords = this.coords; 25758 const colors = this.colors; 25759 const operators = []; 25760 const ps = []; 25761 let verticesLeft = 0; 25762 while (reader.hasData) { 25763 const f = reader.readFlag(); 25764 const coord = reader.readCoordinate(); 25765 const color = reader.readComponents(); 25766 if (verticesLeft === 0) { 25767 if (!(0 <= f && f <= 2)) { 25768 throw new FormatError("Unknown type4 flag"); 25769 } 25770 switch (f) { 25771 case 0: 25772 verticesLeft = 3; 25773 break; 25774 case 1: 25775 ps.push(ps.at(-2), ps.at(-1)); 25776 verticesLeft = 1; 25777 break; 25778 case 2: 25779 ps.push(ps.at(-3), ps.at(-1)); 25780 verticesLeft = 1; 25781 break; 25782 } 25783 operators.push(f); 25784 } 25785 ps.push(coords.length); 25786 coords.push(coord); 25787 colors.push(color); 25788 verticesLeft--; 25789 reader.align(); 25790 } 25791 this.figures.push({ 25792 type: "triangles", 25793 coords: new Int32Array(ps), 25794 colors: new Int32Array(ps) 25795 }); 25796 } 25797 _decodeType5Shading(reader, verticesPerRow) { 25798 const coords = this.coords; 25799 const colors = this.colors; 25800 const ps = []; 25801 while (reader.hasData) { 25802 const coord = reader.readCoordinate(); 25803 const color = reader.readComponents(); 25804 ps.push(coords.length); 25805 coords.push(coord); 25806 colors.push(color); 25807 } 25808 this.figures.push({ 25809 type: "lattice", 25810 coords: new Int32Array(ps), 25811 colors: new Int32Array(ps), 25812 verticesPerRow 25813 }); 25814 } 25815 _decodeType6Shading(reader) { 25816 const coords = this.coords; 25817 const colors = this.colors; 25818 const ps = new Int32Array(16); 25819 const cs = new Int32Array(4); 25820 while (reader.hasData) { 25821 const f = reader.readFlag(); 25822 if (!(0 <= f && f <= 3)) { 25823 throw new FormatError("Unknown type6 flag"); 25824 } 25825 const pi = coords.length; 25826 for (let i = 0, ii = f !== 0 ? 8 : 12; i < ii; i++) { 25827 coords.push(reader.readCoordinate()); 25828 } 25829 const ci = colors.length; 25830 for (let i = 0, ii = f !== 0 ? 2 : 4; i < ii; i++) { 25831 colors.push(reader.readComponents()); 25832 } 25833 let tmp1, tmp2, tmp3, tmp4; 25834 switch (f) { 25835 case 0: 25836 ps[12] = pi + 3; 25837 ps[13] = pi + 4; 25838 ps[14] = pi + 5; 25839 ps[15] = pi + 6; 25840 ps[8] = pi + 2; 25841 ps[11] = pi + 7; 25842 ps[4] = pi + 1; 25843 ps[7] = pi + 8; 25844 ps[0] = pi; 25845 ps[1] = pi + 11; 25846 ps[2] = pi + 10; 25847 ps[3] = pi + 9; 25848 cs[2] = ci + 1; 25849 cs[3] = ci + 2; 25850 cs[0] = ci; 25851 cs[1] = ci + 3; 25852 break; 25853 case 1: 25854 tmp1 = ps[12]; 25855 tmp2 = ps[13]; 25856 tmp3 = ps[14]; 25857 tmp4 = ps[15]; 25858 ps[12] = tmp4; 25859 ps[13] = pi + 0; 25860 ps[14] = pi + 1; 25861 ps[15] = pi + 2; 25862 ps[8] = tmp3; 25863 ps[11] = pi + 3; 25864 ps[4] = tmp2; 25865 ps[7] = pi + 4; 25866 ps[0] = tmp1; 25867 ps[1] = pi + 7; 25868 ps[2] = pi + 6; 25869 ps[3] = pi + 5; 25870 tmp1 = cs[2]; 25871 tmp2 = cs[3]; 25872 cs[2] = tmp2; 25873 cs[3] = ci; 25874 cs[0] = tmp1; 25875 cs[1] = ci + 1; 25876 break; 25877 case 2: 25878 tmp1 = ps[15]; 25879 tmp2 = ps[11]; 25880 ps[12] = ps[3]; 25881 ps[13] = pi + 0; 25882 ps[14] = pi + 1; 25883 ps[15] = pi + 2; 25884 ps[8] = ps[7]; 25885 ps[11] = pi + 3; 25886 ps[4] = tmp2; 25887 ps[7] = pi + 4; 25888 ps[0] = tmp1; 25889 ps[1] = pi + 7; 25890 ps[2] = pi + 6; 25891 ps[3] = pi + 5; 25892 tmp1 = cs[3]; 25893 cs[2] = cs[1]; 25894 cs[3] = ci; 25895 cs[0] = tmp1; 25896 cs[1] = ci + 1; 25897 break; 25898 case 3: 25899 ps[12] = ps[0]; 25900 ps[13] = pi + 0; 25901 ps[14] = pi + 1; 25902 ps[15] = pi + 2; 25903 ps[8] = ps[1]; 25904 ps[11] = pi + 3; 25905 ps[4] = ps[2]; 25906 ps[7] = pi + 4; 25907 ps[0] = ps[3]; 25908 ps[1] = pi + 7; 25909 ps[2] = pi + 6; 25910 ps[3] = pi + 5; 25911 cs[2] = cs[0]; 25912 cs[3] = ci; 25913 cs[0] = cs[1]; 25914 cs[1] = ci + 1; 25915 break; 25916 } 25917 ps[5] = coords.length; 25918 coords.push([(-4 * coords[ps[0]][0] - coords[ps[15]][0] + 6 * (coords[ps[4]][0] + coords[ps[1]][0]) - 2 * (coords[ps[12]][0] + coords[ps[3]][0]) + 3 * (coords[ps[13]][0] + coords[ps[7]][0])) / 9, (-4 * coords[ps[0]][1] - coords[ps[15]][1] + 6 * (coords[ps[4]][1] + coords[ps[1]][1]) - 2 * (coords[ps[12]][1] + coords[ps[3]][1]) + 3 * (coords[ps[13]][1] + coords[ps[7]][1])) / 9]); 25919 ps[6] = coords.length; 25920 coords.push([(-4 * coords[ps[3]][0] - coords[ps[12]][0] + 6 * (coords[ps[2]][0] + coords[ps[7]][0]) - 2 * (coords[ps[0]][0] + coords[ps[15]][0]) + 3 * (coords[ps[4]][0] + coords[ps[14]][0])) / 9, (-4 * coords[ps[3]][1] - coords[ps[12]][1] + 6 * (coords[ps[2]][1] + coords[ps[7]][1]) - 2 * (coords[ps[0]][1] + coords[ps[15]][1]) + 3 * (coords[ps[4]][1] + coords[ps[14]][1])) / 9]); 25921 ps[9] = coords.length; 25922 coords.push([(-4 * coords[ps[12]][0] - coords[ps[3]][0] + 6 * (coords[ps[8]][0] + coords[ps[13]][0]) - 2 * (coords[ps[0]][0] + coords[ps[15]][0]) + 3 * (coords[ps[11]][0] + coords[ps[1]][0])) / 9, (-4 * coords[ps[12]][1] - coords[ps[3]][1] + 6 * (coords[ps[8]][1] + coords[ps[13]][1]) - 2 * (coords[ps[0]][1] + coords[ps[15]][1]) + 3 * (coords[ps[11]][1] + coords[ps[1]][1])) / 9]); 25923 ps[10] = coords.length; 25924 coords.push([(-4 * coords[ps[15]][0] - coords[ps[0]][0] + 6 * (coords[ps[11]][0] + coords[ps[14]][0]) - 2 * (coords[ps[12]][0] + coords[ps[3]][0]) + 3 * (coords[ps[2]][0] + coords[ps[8]][0])) / 9, (-4 * coords[ps[15]][1] - coords[ps[0]][1] + 6 * (coords[ps[11]][1] + coords[ps[14]][1]) - 2 * (coords[ps[12]][1] + coords[ps[3]][1]) + 3 * (coords[ps[2]][1] + coords[ps[8]][1])) / 9]); 25925 this.figures.push({ 25926 type: "patch", 25927 coords: new Int32Array(ps), 25928 colors: new Int32Array(cs) 25929 }); 25930 } 25931 } 25932 _decodeType7Shading(reader) { 25933 const coords = this.coords; 25934 const colors = this.colors; 25935 const ps = new Int32Array(16); 25936 const cs = new Int32Array(4); 25937 while (reader.hasData) { 25938 const f = reader.readFlag(); 25939 if (!(0 <= f && f <= 3)) { 25940 throw new FormatError("Unknown type7 flag"); 25941 } 25942 const pi = coords.length; 25943 for (let i = 0, ii = f !== 0 ? 12 : 16; i < ii; i++) { 25944 coords.push(reader.readCoordinate()); 25945 } 25946 const ci = colors.length; 25947 for (let i = 0, ii = f !== 0 ? 2 : 4; i < ii; i++) { 25948 colors.push(reader.readComponents()); 25949 } 25950 let tmp1, tmp2, tmp3, tmp4; 25951 switch (f) { 25952 case 0: 25953 ps[12] = pi + 3; 25954 ps[13] = pi + 4; 25955 ps[14] = pi + 5; 25956 ps[15] = pi + 6; 25957 ps[8] = pi + 2; 25958 ps[9] = pi + 13; 25959 ps[10] = pi + 14; 25960 ps[11] = pi + 7; 25961 ps[4] = pi + 1; 25962 ps[5] = pi + 12; 25963 ps[6] = pi + 15; 25964 ps[7] = pi + 8; 25965 ps[0] = pi; 25966 ps[1] = pi + 11; 25967 ps[2] = pi + 10; 25968 ps[3] = pi + 9; 25969 cs[2] = ci + 1; 25970 cs[3] = ci + 2; 25971 cs[0] = ci; 25972 cs[1] = ci + 3; 25973 break; 25974 case 1: 25975 tmp1 = ps[12]; 25976 tmp2 = ps[13]; 25977 tmp3 = ps[14]; 25978 tmp4 = ps[15]; 25979 ps[12] = tmp4; 25980 ps[13] = pi + 0; 25981 ps[14] = pi + 1; 25982 ps[15] = pi + 2; 25983 ps[8] = tmp3; 25984 ps[9] = pi + 9; 25985 ps[10] = pi + 10; 25986 ps[11] = pi + 3; 25987 ps[4] = tmp2; 25988 ps[5] = pi + 8; 25989 ps[6] = pi + 11; 25990 ps[7] = pi + 4; 25991 ps[0] = tmp1; 25992 ps[1] = pi + 7; 25993 ps[2] = pi + 6; 25994 ps[3] = pi + 5; 25995 tmp1 = cs[2]; 25996 tmp2 = cs[3]; 25997 cs[2] = tmp2; 25998 cs[3] = ci; 25999 cs[0] = tmp1; 26000 cs[1] = ci + 1; 26001 break; 26002 case 2: 26003 tmp1 = ps[15]; 26004 tmp2 = ps[11]; 26005 ps[12] = ps[3]; 26006 ps[13] = pi + 0; 26007 ps[14] = pi + 1; 26008 ps[15] = pi + 2; 26009 ps[8] = ps[7]; 26010 ps[9] = pi + 9; 26011 ps[10] = pi + 10; 26012 ps[11] = pi + 3; 26013 ps[4] = tmp2; 26014 ps[5] = pi + 8; 26015 ps[6] = pi + 11; 26016 ps[7] = pi + 4; 26017 ps[0] = tmp1; 26018 ps[1] = pi + 7; 26019 ps[2] = pi + 6; 26020 ps[3] = pi + 5; 26021 tmp1 = cs[3]; 26022 cs[2] = cs[1]; 26023 cs[3] = ci; 26024 cs[0] = tmp1; 26025 cs[1] = ci + 1; 26026 break; 26027 case 3: 26028 ps[12] = ps[0]; 26029 ps[13] = pi + 0; 26030 ps[14] = pi + 1; 26031 ps[15] = pi + 2; 26032 ps[8] = ps[1]; 26033 ps[9] = pi + 9; 26034 ps[10] = pi + 10; 26035 ps[11] = pi + 3; 26036 ps[4] = ps[2]; 26037 ps[5] = pi + 8; 26038 ps[6] = pi + 11; 26039 ps[7] = pi + 4; 26040 ps[0] = ps[3]; 26041 ps[1] = pi + 7; 26042 ps[2] = pi + 6; 26043 ps[3] = pi + 5; 26044 cs[2] = cs[0]; 26045 cs[3] = ci; 26046 cs[0] = cs[1]; 26047 cs[1] = ci + 1; 26048 break; 26049 } 26050 this.figures.push({ 26051 type: "patch", 26052 coords: new Int32Array(ps), 26053 colors: new Int32Array(cs) 26054 }); 26055 } 26056 } 26057 _buildFigureFromPatch(index) { 26058 const figure = this.figures[index]; 26059 assert(figure.type === "patch", "Unexpected patch mesh figure"); 26060 const coords = this.coords, 26061 colors = this.colors; 26062 const pi = figure.coords; 26063 const ci = figure.colors; 26064 const figureMinX = Math.min(coords[pi[0]][0], coords[pi[3]][0], coords[pi[12]][0], coords[pi[15]][0]); 26065 const figureMinY = Math.min(coords[pi[0]][1], coords[pi[3]][1], coords[pi[12]][1], coords[pi[15]][1]); 26066 const figureMaxX = Math.max(coords[pi[0]][0], coords[pi[3]][0], coords[pi[12]][0], coords[pi[15]][0]); 26067 const figureMaxY = Math.max(coords[pi[0]][1], coords[pi[3]][1], coords[pi[12]][1], coords[pi[15]][1]); 26068 let splitXBy = Math.ceil((figureMaxX - figureMinX) * MeshShading.TRIANGLE_DENSITY / (this.bounds[2] - this.bounds[0])); 26069 splitXBy = Math
26069.max(MeshShading.MIN_SPLIT_PATCH_CHUNKS_AMOUNT, Math.min(MeshShading.MAX_SPLIT_PATCH_CHUNKS_AMOUNT, splitXBy)); 26070 let splitYBy = Math.ceil((figureMaxY - figureMinY) * MeshShading.TRIANGLE_DENSITY / (this.bounds[3] - this.bounds[1])); 26071 splitYBy = Math.max(MeshShading.MIN_SPLIT_PATCH_CHUNKS_AMOUNT, Math.min(MeshShading.MAX_SPLIT_PATCH_CHUNKS_AMOUNT, splitYBy)
vendor: 112,164 bytes, lines 26071-26307
26071); 26072 const verticesPerRow = splitXBy + 1; 26073 const figureCoords = new Int32Array((splitYBy + 1) * verticesPerRow); 26074 const figureColors = new Int32Array((splitYBy + 1) * verticesPerRow); 26075 let k = 0; 26076 const cl = new Uint8Array(3), 26077 cr = new Uint8Array(3); 26078 const c0 = colors[ci[0]], 26079 c1 = colors[ci[1]], 26080 c2 = colors[ci[2]], 26081 c3 = colors[ci[3]]; 26082 const bRow = getB(splitYBy), 26083 bCol = getB(splitXBy); 26084 for (let row = 0; row <= splitYBy; row++) { 26085 cl[0] = (c0[0] * (splitYBy - row) + c2[0] * row) / splitYBy | 0; 26086 cl[1] = (c0[1] * (splitYBy - row) + c2[1] * row) / splitYBy | 0; 26087 cl[2] = (c0[2] * (splitYBy - row) + c2[2] * row) / splitYBy | 0; 26088 cr[0] = (c1[0] * (splitYBy - row) + c3[0] * row) / splitYBy | 0; 26089 cr[1] = (c1[1] * (splitYBy - row) + c3[1] * row) / splitYBy | 0; 26090 cr[2] = (c1[2] * (splitYBy - row) + c3[2] * row) / splitYBy | 0; 26091 for (let col = 0; col <= splitXBy; col++, k++) { 26092 if ((row === 0 || row === splitYBy) && (col === 0 || col === splitXBy)) { 26093 continue; 26094 } 26095 let x = 0, 26096 y = 0; 26097 let q = 0; 26098 for (let i = 0; i <= 3; i++) { 26099 for (let j = 0; j <= 3; j++, q++) { 26100 const m = bRow[row][i] * bCol[col][j]; 26101 x += coords[pi[q]][0] * m; 26102 y += coords[pi[q]][1] * m; 26103 } 26104 } 26105 figureCoords[k] = coords.length; 26106 coords.push([x, y]); 26107 figureColors[k] = colors.length; 26108 const newColor = new Uint8Array(3); 26109 newColor[0] = (cl[0] * (splitXBy - col) + cr[0] * col) / splitXBy | 0; 26110 newColor[1] = (cl[1] * (splitXBy - col) + cr[1] * col) / splitXBy | 0; 26111 newColor[2] = (cl[2] * (splitXBy - col) + cr[2] * col) / splitXBy | 0; 26112 colors.push(newColor); 26113 } 26114 } 26115 figureCoords[0] = pi[0]; 26116 figureColors[0] = ci[0]; 26117 figureCoords[splitXBy] = pi[3]; 26118 figureColors[splitXBy] = ci[1]; 26119 figureCoords[verticesPerRow * splitYBy] = pi[12]; 26120 figureColors[verticesPerRow * splitYBy] = ci[2]; 26121 figureCoords[verticesPerRow * splitYBy + splitXBy] = pi[15]; 26122 figureColors[verticesPerRow * splitYBy + splitXBy] = ci[3]; 26123 this.figures[index] = { 26124 type: "lattice", 26125 coords: figureCoords, 26126 colors: figureColors, 26127 verticesPerRow 26128 }; 26129 } 26130 _updateBounds() { 26131 let minX = this.coords[0][0], 26132 minY = this.coords[0][1], 26133 maxX = minX, 26134 maxY = minY; 26135 for (let i = 1, ii = this.coords.length; i < ii; i++) { 26136 const x = this.coords[i][0], 26137 y = this.coords[i][1]; 26138 minX = minX > x ? x : minX; 26139 minY = minY > y ? y : minY; 26140 maxX = maxX < x ? x : maxX; 26141 maxY = maxY < y ? y : maxY; 26142 } 26143 this.bounds = [minX, minY, maxX, maxY]; 26144 } 26145 _packData() { 26146 let i, ii, j, jj; 26147 const coords = this.coords; 26148 const coordsPacked = new Float32Array(coords.length * 2); 26149 for (i = 0, j = 0, ii = coords.length; i < ii; i++) { 26150 const xy = coords[i]; 26151 coordsPacked[j++] = xy[0]; 26152 coordsPacked[j++] = xy[1]; 26153 } 26154 this.coords = coordsPacked; 26155 const colors = this.colors; 26156 const colorsPacked = new Uint8Array(colors.length * 3); 26157 for (i = 0, j = 0, ii = colors.length; i < ii; i++) { 26158 const c = colors[i]; 26159 colorsPacked[j++] = c[0]; 26160 colorsPacked[j++] = c[1]; 26161 colorsPacked[j++] = c[2]; 26162 } 26163 this.colors = colorsPacked; 26164 const figures = this.figures; 26165 for (i = 0, ii = figures.length; i < ii; i++) { 26166 const figure = figures[i], 26167 ps = figure.coords, 26168 cs = figure.colors; 26169 for (j = 0, jj = ps.length; j < jj; j++) { 26170 ps[j] *= 2; 26171 cs[j] *= 3; 26172 } 26173 } 26174 } 26175 getIR() { 26176 const { 26177 bounds 26178 } = this; 26179 if (bounds[2] - bounds[0] === 0 || bounds[3] - bounds[1] === 0) { 26180 throw new FormatError(`Invalid MeshShading bounds: [${bounds}].`); 26181 } 26182 return ["Mesh", this.shadingType, this.coords, this.colors, this.figures, bounds, this.bbox, this.background]; 26183 } 26184} 26185class DummyShading extends BaseShading { 26186 getIR() { 26187 return ["Dummy"]; 26188 } 26189} 26190function getTilingPatternIR(operatorList, dict, color) { 26191 const matrix = lookupMatrix(dict.getArray("Matrix"), IDENTITY_MATRIX); 26192 const bbox = lookupNormalRect(dict.getArray("BBox"), null); 26193 if (!bbox || bbox[2] - bbox[0] === 0 || bbox[3] - bbox[1] === 0) { 26194 throw new FormatError(`Invalid getTilingPatternIR /BBox array.`); 26195 } 26196 const xstep = dict.get("XStep"); 26197 if (typeof xstep !== "number") { 26198 throw new FormatError(`Invalid getTilingPatternIR /XStep value.`); 26199 } 26200 const ystep = dict.get("YStep"); 26201 if (typeof ystep !== "number") { 26202 throw new FormatError(`Invalid getTilingPatternIR /YStep value.`); 26203 } 26204 const paintType = dict.get("PaintType"); 26205 if (!Number.isInteger(paintType)) { 26206 throw new FormatError(`Invalid getTilingPatternIR /PaintType value.`); 26207 } 26208 const tilingType = dict.get("TilingType"); 26209 if (!Number.isInteger(tilingType)) { 26210 throw new FormatError(`Invalid getTilingPatternIR /TilingType value.`); 26211 } 26212 return ["TilingPattern", color, operatorList, matrix, bbox, xstep, ystep, paintType, tilingType]; 26213} 26214 26215;// ./src/core/calibri_factors.js 26216const CalibriBoldFactors = [1.3877, 1, 1, 1, 0.97801, 0.92482, 0.89552, 0.91133, 0.81988, 0.97566, 0.98152, 0.93548, 0.93548, 1.2798, 0.85284, 0.92794, 1, 0.96134, 1.54657, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.82845, 0.82845, 0.85284, 0.85284, 0.85284, 0.75859, 0.92138, 0.83908, 0.7762, 0.73293, 0.87289, 0.73133, 0.7514, 0.81921, 0.87356, 0.95958, 0.59526, 0.75727, 0.69225, 1.04924, 0.9121, 0.86943, 0.79795, 0.88198, 0.77958, 0.70864, 0.81055, 0.90399, 0.88653, 0.96017, 0.82577, 0.77892, 0.78257, 0.97507, 1.54657, 0.97507, 0.85284, 0.89552, 0.90176, 0.88762, 0.8785, 0.75241, 0.8785, 0.90518, 0.95015, 0.77618, 0.8785, 0.88401, 0.91916, 0.86304, 0.88401, 0.91488, 0.8785, 0.8801, 0.8785, 0.8785, 0.91343, 0.7173, 1.04106, 0.8785, 0.85075, 0.95794, 0.82616, 0.85162, 0.79492, 0.88331, 1.69808, 0.88331, 0.85284, 0.97801, 0.89552, 0.91133, 0.89552, 0.91133, 1.7801, 0.89552, 1.24487, 1.13254, 1.12401, 0.96839, 0.85284, 0.68787, 0.70645, 0.85592, 0.90747, 1.01466, 1.0088, 0.90323, 1, 1.07463, 1, 0.91056, 0.75806, 1.19118, 0.96839, 0.78864, 0.82845, 0.84133, 0.75859, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.77539, 0.73293, 0.73133, 0.73133, 0.73133, 0.73133, 0.95958, 0.95958, 0.95958, 0.95958, 0.88506, 0.9121, 0.86943, 0.86943, 0.86943, 0.86943, 0.86943, 0.85284, 0.87508, 0.90399, 0.90399, 0.90399, 0.90399, 0.77892, 0.79795, 0.90807, 0.88762, 0.88762, 0.88762, 0.88762, 0.88762, 0.88762, 0.8715, 0.75241, 0.90518, 0.90518, 0.90518, 0.90518, 0.88401, 0.88401, 0.88401, 0.88401, 0.8785, 0.8785, 0.8801, 0.8801, 0.8801, 0.8801, 0.8801, 0.90747, 0.89049, 0.8785, 0.8785, 0.8785, 0.8785, 0.85162, 0.8785, 0.85162, 0.83908, 0.88762, 0.83908, 0.88762, 0.83908, 0.88762, 0.73293, 0.75241, 0.73293, 0.75241, 0.73293, 0.75241, 0.73293, 0.75241, 0.87289, 0.83016, 0.88506, 0.93125, 0.73133, 0.90518, 0.73133, 0.90518, 0.73133, 0.90518, 0.73133, 0.90518, 0.73133, 0.90518, 0.81921, 0.77618, 0.81921, 0.77618, 0.81921, 0.77618, 1, 1, 0.87356, 0.8785, 0.91075, 0.89608, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.76229, 0.90167, 0.59526, 0.91916, 1, 1, 0.86304, 0.69225, 0.88401, 1, 1, 0.70424, 0.79468, 0.91926, 0.88175, 0.70823, 0.94903, 0.9121, 0.8785, 1, 1, 0.9121, 0.8785, 0.87802, 0.88656, 0.8785, 0.86943, 0.8801, 0.86943, 0.8801, 0.86943, 0.8801, 0.87402, 0.89291, 0.77958, 0.91343, 1, 1, 0.77958, 0.91343, 0.70864, 0.7173, 0.70864, 0.7173, 0.70864, 0.7173, 0.70864, 0.7173, 1, 1, 0.81055, 0.75841, 0.81055, 1.06452, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.96017, 0.95794, 0.77892, 0.85162, 0.77892, 0.78257, 0.79492, 0.78257, 0.79492, 0.78257, 0.79492, 0.9297, 0.56892, 0.83908, 0.88762, 0.77539, 0.8715, 0.87508, 0.89049, 1, 1, 0.81055, 1.04106, 1.20528, 1.20528, 1, 1.15543, 0.70674, 0.98387, 0.94721, 1.33431, 1.45894, 0.95161, 1.06303, 0.83908, 0.80352, 0.57184, 0.6965, 0.56289, 0.82001, 0.56029, 0.81235, 1.02988, 0.83908, 0.7762, 0.68156, 0.80367, 0.73133, 0.78257, 0.87356, 0.86943, 0.95958, 0.75727, 0.89019, 1.04924, 0.9121, 0.7648, 0.86943, 0.87356, 0.79795, 0.78275, 0.81055, 0.77892, 0.9762, 0.82577, 0.99819, 0.84896, 0.95958, 0.77892, 0.96108, 1.01407, 0.89049, 1.02988, 0.94211, 0.96108, 0.8936, 0.84021, 0.87842, 0.96399, 0.79109, 0.89049, 1.00813, 1.02988, 0.86077, 0.87445, 0.92099, 0.84723, 0.86513, 0.8801, 0.75638, 0.85714, 0.78216, 0.79586, 0.87965, 0.94211, 0.97747, 0.78287, 0.97926, 0.84971, 1.02988, 0.94211, 0.8801, 0.94211, 0.84971, 0.73133, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90264, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90518, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90548, 1, 1, 1, 1, 1, 1, 0.96017, 0.95794, 0.96017, 0.95794, 0.96017, 0.95794, 0.77892, 0.85162, 1, 1, 0.89552, 0.90527, 1, 0.90363, 0.92794, 0.92794, 0.92794, 0.92794, 0.87012, 0.87012, 0.87012, 0.89552, 0.89552, 1.42259, 0.71143, 1.06152, 1, 1, 1.03372, 1.03372, 0.97171, 1.4956, 2.2807, 0.93835, 0.83406, 0.91133, 0.84107, 0.91133, 1, 1, 1, 0.72021, 1, 1.23108, 0.83489, 0.88525, 0.88525, 0.81499, 0.90527, 1.81055, 0.90527, 1.81055, 1.31006, 1.53711, 0.94434, 1.08696, 1, 0.95018, 0.77192, 0.85284, 0.90747, 1.17534, 0.69825, 0.9716, 1.37077, 0.90747, 0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.08004, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90727, 0.90727, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26217const CalibriBoldMetrics = { 26218 lineHeight: 1.2207, 26219 lineGap: 0.2207 26220}; 26221const CalibriBoldItalicFactors = [1.3877, 1, 1, 1, 0.97801, 0.92482, 0.89552, 0.91133, 0.81988, 0.97566, 0.98152, 0.93548, 0.93548, 1.2798, 0.85284, 0.92794, 1, 0.96134, 1.56239, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.82845, 0.82845, 0.85284, 0.85284, 0.85284, 0.75859, 0.92138, 0.83908, 0.7762, 0.71805, 0.87289, 0.73133, 0.7514, 0.81921, 0.87356, 0.95958, 0.59526, 0.75727, 0.69225, 1.04924, 0.90872, 0.85938, 0.79795, 0.87068, 0.77958, 0.69766, 0.81055, 0.90399, 0.88653, 0.96068, 0.82577, 0.77892, 0.78257, 0.97507, 1.529, 0.97507, 0.85284, 0.89552, 0.90176, 0.94908, 0.86411, 0.74012, 0.86411, 0.88323, 0.95015, 0.86411, 0.86331, 0.88401, 0.91916, 0.86304, 0.88401, 0.9039, 0.86331, 0.86331, 0.86411, 0.86411, 0.90464, 0.70852, 1.04106, 0.86331, 0.84372, 0.95794, 0.82616, 0.84548, 0.79492, 0.88331, 1.69808, 0.88331, 0.85284, 0.97801, 0.89552, 0.91133, 0.89552, 0.91133, 1.7801, 0.89552, 1.24487, 1.13254, 1.19129, 0.96839, 0.85284, 0.68787, 0.70645, 0.85592, 0.90747, 1.01466, 1.0088, 0.90323, 1, 1.07463, 1, 0.91056, 0.75806, 1.19118, 0.96839, 0.78864, 0.82845, 0.84133, 0.75859, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.77539, 0.71805, 0.73133, 0.73133, 0.73133, 0.73133, 0.95958, 0.95958, 0.95958, 0.95958, 0.88506, 0.90872, 0.85938, 0.85938, 0.85938, 0.85938, 0.85938, 0.85284, 0.87068, 0.90399, 0.90399, 0.90399, 0.90399, 0.77892, 0.79795, 0.90807, 0.94908, 0.94908, 0.94908, 0.94908, 0.94908, 0.94908, 0.85887, 0.74012, 0.88323, 0.88323, 0.88323, 0.88323, 0.88401, 0.88401, 0.88401, 0.88401, 0.8785, 0.86331, 0.86331, 0.86331, 0.86331, 0.86331, 0.86331, 0.90747, 0.89049, 0.86331, 0.86331, 0.86331, 0.86331, 0.84548, 0.86411, 0.84548, 0.83908, 0.94908, 0.83908, 0.94908, 0.83908, 0.94908, 0.71805, 0.74012, 0.71805, 0.74012, 0.71805, 0.74012, 0.71805, 0.74012, 0.87289, 0.79538, 0.88506, 0.92726, 0.73133, 0.88323, 0.73133, 0.88323, 0.73133, 0.88323, 0.73133, 0.88323, 0.73133, 0.88323, 0.81921, 0.86411, 0.81921, 0.86411, 0.81921, 0.86411, 1, 1, 0.87356, 0.86331, 0.91075, 0.8777, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.76467, 0.90167, 0.59526, 0.91916, 1, 1, 0.86304, 0.69225, 0.88401, 1, 1, 0.70424, 0.77312, 0.91926, 0.88175, 0.70823, 0.94903, 0.90872, 0.86331, 1, 1, 0.90872, 0.86331, 0.86906, 0.88116, 0.86331, 0.85938, 0.86331, 0.85938, 0.86331, 0.85938, 0.86331, 0.87402, 0.86549, 0.77958, 0.90464, 1, 1, 0.77958, 0.90464, 0.69766, 0.70852, 0.69766, 0.70852, 0.69766, 0.70852, 0.69766, 0.70852, 1, 1, 0.81055, 0.75841, 0.81055, 1.06452, 0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.96068, 0.95794, 0.77892, 0.84548, 0.77892, 0.78257, 0.79492, 0.78257, 0.79492, 0.78257, 0.79492, 0.9297, 0.56892, 0.83908, 0.94908, 0.77539, 0.85887, 0.87068, 0.89049, 1, 1, 0.81055, 1.04106, 1.20528, 1.20528, 1, 1.15543, 0.70088, 0.98387, 0.94721, 1.33431, 1.45894, 0.95161, 1.48387, 0.83908, 0.80352, 0.57118, 0.6965, 0.56347, 0.79179, 0.55853, 0.80346, 1.02988, 0.83908, 0.7762, 0.67174, 0.86036, 0.73133, 0.78257, 0.87356, 0.86441, 0.95958, 0.75727, 0.89019, 1.04924, 0.90872, 0.74889, 0.85938, 0.87891, 0.79795, 0.7957, 0.81055, 0.77892, 0.97447, 0.82577, 0.97466, 0.87179, 0.95958, 0.77892, 0.94252, 0.95612, 0.8753, 1.02988, 0.92733, 0.94252, 0.87411, 0.84021, 0.8728, 0.95612, 0.74081, 0.8753, 1.02189, 1.02988, 0.84814, 0.87445, 0.91822, 0.84723, 0.85668, 0.86331, 0.81344, 0.87581, 0.76422, 0.82046, 0.96057, 0.92733, 0.99375, 0.78022, 0.95452, 0.86015, 1.02988, 0.92733, 0.86331, 0.92733, 0.86015, 0.73133, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90631, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.88323, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.85174, 1, 1, 1, 1, 1, 1, 0.96068, 0.95794, 0.96068, 0.95794, 0.96068, 0.95794, 0.77892, 0.84548, 1, 1, 0.89552, 0.90527, 1, 0.90363, 0.92794, 0.92794, 0.92794, 0.89807, 0.87012, 0.87012, 0.87012, 0.89552, 0.89552, 1.42259, 0.71094, 1.06152, 1, 1, 1.03372, 1.03372, 0.97171, 1.4956, 2.2807, 0.92972, 0.83406, 0.91133, 0.83326, 0.91133, 1, 1, 1, 0.72021, 1, 1.23108, 0.83489, 0.88525, 0.88525, 0.81499, 0.90616, 1.81055, 0.90527, 1.81055, 1.3107, 1.53711, 0.94434, 1.08696, 1, 0.95018, 0.77192, 0.85284, 0.90747, 1.17534, 0.69825, 0.9716, 1.37077, 0.90747, 0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.08004, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90727, 0.90727, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26222const CalibriBoldItalicMetrics = { 26223 lineHeight: 1.2207, 26224 lineGap: 0.2207 26225}; 26226const CalibriItalicFactors = [1.3877, 1, 1, 1, 1.17223, 1.1293, 0.89552, 0.91133, 0.80395, 1.02269, 1.15601, 0.91056, 0.91056, 1.2798, 0.85284, 0.89807, 1, 0.90861, 1.39543, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.96309, 0.96309, 0.85284, 0.85284, 0.85284, 0.83319, 0.88071, 0.8675, 0.81552, 0.72346, 0.85193, 0.73206, 0.7522, 0.81105, 0.86275, 0.90685, 0.6377, 0.77892, 0.75593, 1.02638, 0.89249, 0.84118, 0.77452, 0.85374, 0.75186, 0.67789, 0.79776, 0.88844, 0.85066, 0.94309, 0.77818, 0.7306, 0.76659, 1.10369, 1.38313, 1.10369, 1.06139, 0.89552, 0.8739, 0.9245, 0.9245, 0.83203, 0.9245, 0.85865, 1.09842, 0.9245, 0.9245, 1.03297, 1.07692, 0.90918, 1.03297, 0.94959, 0.9245, 0.92274, 0.9245, 0.9245, 1.02933, 0.77832, 1.20562, 0.9245, 0.8916, 0.98986, 0.86621, 0.89453, 0.79004, 0.94152, 1.77256, 0.94152, 0.85284, 0.97801, 0.89552, 0.91133, 0.89552, 0.91133, 1.91729, 0.89552, 1.17889, 1.13254, 1.16359, 0.92098, 0.85284, 0.68787, 0.71353, 0.84737, 0.90747, 1.0088, 1.0044, 0.87683, 1, 1.09091, 1, 0.92229, 0.739, 1.15642, 0.92098, 0.76288, 0.80504, 0.80972, 0.75859, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.76318, 0.72346, 0.73206, 0.73206, 0.73206, 0.73206, 0.90685, 0.90685, 0.90685, 0.90685, 0.86477, 0.89249, 0.84118, 0.84118, 0.84118, 0.84118, 0.84118, 0.85284, 0.84557, 0.88844, 0.88844, 0.88844, 0.88844, 0.7306, 0.77452, 0.86331, 0.9245, 0.9245, 0.9245, 0.9245, 0.9245, 0.9245, 0.84843, 0.83203, 0.85865, 0.85865, 0.85865, 0.85865, 0.82601, 0.82601, 0.82601, 0.82601, 0.94469, 0.9245, 0.92274, 0.92274, 0.92274, 0.92274, 0.92274, 0.90747, 0.86651, 0.9245, 0.9245, 0.9245, 0.9245, 0.89453, 0.9245, 0.89453, 0.8675, 0.9245, 0.8675, 0.9245, 0.8675, 0.9245, 0.72346, 0.83203, 0.72346, 0.83203, 0.72346, 0.83203, 0.72346, 0.83203, 0.85193, 0.8875, 0.86477, 0.99034, 0.73206, 0.85865, 0.73206, 0.85865, 0.73206, 0.85865, 0.73206, 0.85865, 0.73206, 0.85865, 0.81105, 0.9245, 0.81105, 0.9245, 0.81105, 0.9245, 1, 1, 0.86275, 0.9245, 0.90872, 0.93591, 0.90685, 0.82601, 0.90685, 0.82601, 0.90685, 0.82601, 0.90685, 1.03297, 0.90685, 0.82601, 0.77896, 1.05611, 0.6377, 1.07692, 1, 1, 0.90918, 0.75593, 1.03297, 1, 1, 0.76032, 0.9375, 0.98156, 0.93407, 0.77261, 1.11429, 0.89249, 0.9245, 1, 1, 0.89249, 0.9245, 0.92534, 0.86698, 0.9245, 0.84118, 0.92274, 0.84118, 0.92274, 0.84118, 0.92274, 0.8667, 0.86291, 0.75186, 1.02933, 1, 1, 0.75186, 1.02933, 0.67789, 0.77832, 0.67789, 0.77832, 0.67789, 0.77832, 0.67789, 0.77832, 1, 1, 0.79776, 0.97655, 0.79776, 1.23023, 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.94309, 0.98986, 0.7306, 0.89453, 0.7306, 0.76659, 0.79004, 0.76659, 0.79004, 0.76659, 0.79004, 1.09231, 0.54873, 0.8675, 0.9245, 0.76318, 0.84843, 0.84557, 0.86651, 1, 1, 0.79776, 1.20562, 1.18622, 1.18622, 1, 1.1437, 0.67009, 0.96334, 0.93695, 1.35191, 1.40909, 0.95161, 1.48387, 0.8675, 0.90861, 0.6192, 0.7363, 0.64824, 0.82411, 0.56321, 0.85696, 1.23516, 0.8675, 0.81552, 0.7286, 0.84134, 0.73206, 0.76659, 0.86275, 0.84369, 0.90685, 0.77892, 0.85871, 1.02638, 0.89249, 0.75828, 0.84118, 0.85984, 0.77452, 0.76466, 0.79776, 0.7306, 0.90782, 0.77818, 0.903, 0.87291, 0.90685, 0.7306, 0.99058, 1.03667, 0.94635, 1.23516, 0.9849, 0.99058, 0.92393, 0.8916, 0.942, 1.03667, 0.75026, 0.94635, 1.0297, 1.23516, 0.90918, 0.94048, 0.98217, 0.89746, 0.84153, 0.92274, 0.82507, 0.88832, 0.84438, 0.88178, 1.03525, 0.9849, 1.00225, 0.78086, 0.97248, 0.89404, 1.23516, 0.9849, 0.92274, 0.9849, 0.89404, 0.73206, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.89693, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.85865, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90933, 1, 1, 1, 1, 1, 1, 0.94309, 0.98986, 0.94309, 0.98986, 0.94309, 0.98986, 0.7306, 0.89453, 1, 1, 0.89552, 0.90527, 1, 0.90186, 1.12308, 1.12308, 1.12308, 1.12308, 1.2566, 1.2566, 1.2566, 0.89552, 0.89552, 1.42259, 0.68994, 1.03809, 1, 1, 1.0176, 1.0176, 1.11523, 1.4956, 2.01462, 0.97858, 0.82616, 0.91133, 0.83437, 0.91133, 1, 1, 1, 0.70508, 1, 1.23108, 0.79801, 0.84426, 0.84426, 0.774, 0.90572, 1.81055, 0.90749, 1.81055, 1.28809, 1.55469, 0.94434, 1.07806, 1, 0.97094, 0.7589, 0.85284, 0.90747, 1.19658, 0.69825, 0.97622, 1.33512, 0.90747, 0.90747, 0.85284, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.0336, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05859, 1.05859, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26227const CalibriItalicMetrics = { 26228 lineHeight: 1.2207, 26229 lineGap: 0.2207 26230}; 26231const CalibriRegularFactors = [1.3877, 1, 1, 1, 1.17223, 1.1293, 0.89552, 0.91133, 0.80395, 1.02269, 1.15601, 0.91056, 0.91056, 1.2798, 0.85284, 0.89807, 1, 0.90861, 1.39016, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.96309, 0.96309, 0.85284, 0.85284, 0.85284, 0.83319, 0.88071, 0.8675, 0.81552, 0.73834, 0.85193, 0.73206, 0.7522, 0.81105, 0.86275, 0.90685, 0.6377, 0.77892, 0.75593, 1.02638, 0.89385, 0.85122, 0.77452, 0.86503, 0.75186, 0.68887, 0.79776, 0.88844, 0.85066, 0.94258, 0.77818, 0.7306, 0.76659, 1.10369, 1.39016, 1.10369, 1.06139, 0.89552, 0.8739, 0.86128, 0.94469, 0.8457, 0.94469, 0.89464, 1.09842, 0.84636, 0.94469, 1.03297, 1.07692, 0.90918, 1.03297, 0.95897, 0.94469, 0.9482, 0.94469, 0.94469, 1.04692, 0.78223, 1.20562, 0.94469, 0.90332, 0.98986, 0.86621, 0.90527, 0.79004, 0.94152, 1.77256, 0.94152, 0.85284, 0.97801, 0.89552, 0.91133, 0.89552, 0.91133, 1.91729, 0.89552, 1.17889, 1.13254, 1.08707, 0.92098, 0.85284, 0.68787, 0.71353, 0.84737, 0.90747, 1.0088, 1.0044, 0.87683, 1, 1.09091, 1, 0.92229, 0.739, 1.15642, 0.92098, 0.76288, 0.80504, 0.80972, 0.75859, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.76318, 0.73834, 0.73206, 0.73206, 0.73206, 0.73206, 0.90685, 0.90685, 0.90685, 0.90685, 0.86477, 0.89385, 0.85122, 0.85122, 0.85122, 0.85122, 0.85122, 0.85284, 0.85311, 0.88844, 0.88844, 0.88844, 0.88844, 0.7306, 0.77452, 0.86331, 0.86128, 0.86128, 0.86128, 0.86128, 0.86128, 0.86128, 0.8693, 0.8457, 0.89464, 0.89464, 0.89464, 0.89464, 0.82601, 0.82601, 0.82601, 0.82601, 0.94469, 0.94469, 0.9482, 0.9482, 0.9482, 0.9482, 0.9482, 0.90747, 0.86651, 0.94469, 0.94469, 0.94469, 0.94469, 0.90527, 0.94469, 0.90527, 0.8675, 0.86128, 0.8675, 0.86128, 0.8675, 0.86128, 0.73834, 0.8457, 0.73834, 0.8457, 0.73834, 0.8457, 0.73834, 0.8457, 0.85193, 0.92454, 0.86477, 0.9921, 0.73206, 0.89464, 0.73206, 0.89464, 0.73206, 0.89464, 0.73206, 0.89464, 0.73206, 0.89464, 0.81105, 0.84636, 0.81105, 0.84636, 0.81105, 0.84636, 1, 1, 0.86275, 0.94469, 0.90872, 0.95786, 0.90685, 0.82601, 0.90685, 0.82601, 0.90685, 0.82601, 0.90685, 1.03297, 0.90685, 0.82601, 0.77741, 1.05611, 0.6377, 1.07692, 1, 1, 0.90918, 0.75593, 1.03297, 1, 1, 0.76032, 0.90452, 0.98156, 1.11842, 0.77261, 1.11429, 0.89385, 0.94469, 1, 1, 0.89385, 0.94469, 0.95877, 0.86901, 0.94469, 0.85122, 0.9482, 0.85122, 0.9482, 0.85122, 0.9482, 0.8667, 0.90016, 0.75186, 1.04692, 1, 1, 0.75186, 1.04692, 0.68887, 0.78223, 0.68887, 0.78223, 0.68887, 0.78223, 0.68887, 0.78223, 1, 1, 0.79776, 0.92188, 0.79776, 1.23023, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.94258, 0.98986, 0.7306, 0.90527, 0.7306, 0.76659, 0.79004, 0.76659, 0.79004, 0.76659, 0.79004, 1.09231, 0.54873, 0.8675, 0.86128, 0.76318, 0.8693, 0.85311, 0.86651, 1, 1, 0.79776, 1.20562, 1.18622, 1.18622, 1, 1.1437, 0.67742, 0.96334, 0.93695, 1.35191, 1.40909, 0.95161, 1.48387, 0.86686, 0.90861, 0.62267, 0.74359, 0.65649, 0.85498, 0.56963, 0.88254, 1.23516, 0.8675, 0.81552, 0.75443, 0.84503, 0.73206, 0.76659, 0.86275, 0.85122, 0.90685, 0.77892, 0.85746, 1.02638, 0.89385, 0.75657, 0.85122, 0.86275, 0.77452, 0.74171, 0.79776, 0.7306, 0.95165, 0.77818, 0.89772, 0.88831, 0.90685, 0.7306, 0.98142, 1.02191, 0.96576, 1.23516, 0.99018, 0.98142, 0.9236, 0.89258, 0.94035, 1.02191, 0.78848, 0.96576, 0.9561, 1.23516, 0.90918, 0.92578, 0.95424, 0.89746, 0.83969, 0.9482, 0.80113, 0.89442, 0.85208, 0.86155, 0.98022, 0.99018, 1.00452, 0.81209, 0.99247, 0.89181, 1.23516, 0.99018, 0.9482, 0.99018, 0.89181, 0.73206, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.88844, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.89464, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.96766, 1, 1, 1, 1, 1, 1, 0.94258, 0.98986, 0.94258, 0.98986, 0.94258, 0.98986, 0.7306, 0.90527, 1, 1, 0.89552, 0.90527, 1, 0.90186, 1.12308, 1.12308, 1.12308, 1.12308, 1.2566, 1.2566, 1.2566, 0.89552, 0.89552, 1.42259, 0.69043, 1.03809, 1, 1, 1.0176, 1.0176, 1.11523, 1.4956, 2.01462, 0.99331, 0.82616, 0.91133, 0.84286, 0.91133, 1, 1, 1, 0.70508, 1, 1.23108, 0.79801, 0.84426, 0.84426, 0.774, 0.90527, 1.81055, 0.90527, 1.81055, 1.28809, 1.55469, 0.94434, 1.07806, 1, 0.97094, 0.7589, 0.85284, 0.90747, 1.19658, 0.69825, 0.97622, 1.33512, 0.90747, 0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.0336, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05859, 1.05859, 1, 1, 1, 1.07185, 0.99413, 0.96334, 1.08065, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26232const CalibriRegularMetrics = { 26233 lineHeight: 1.2207, 26234 lineGap: 0.2207 26235}; 26236 26237;// ./src/core/helvetica_factors.js 26238const HelveticaBoldFactors = [0.76116, 1, 1, 1.0006, 0.99998, 0.99974, 0.99973, 0.99973, 0.99982, 0.99977, 1.00087, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, 0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 1.00003, 1.00003, 1.00003, 1.00026, 0.9999, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 0.99973, 0.99977, 1.00026, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001, 1.00001, 1.00026, 0.99998, 1.0006, 0.99998, 1.00003, 0.99973, 0.99998, 0.99973, 1.00026, 0.99973, 1.00026, 0.99973, 0.99998, 1.00026, 1.00026, 1.0006, 1.0006, 0.99973, 1.0006, 0.99982, 1.00026, 1.00026, 1.00026, 1.00026, 0.99959, 0.99973, 0.99998, 1.00026, 0.99973, 1.00022, 0.99973, 0.99973, 1, 0.99959, 1.00077, 0.99959, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973, 1.00077, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.99973, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002, 1.00026, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99982, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.06409, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 1.00026, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 1.03374, 0.99977, 1.00026, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.00042, 0.99973, 0.99973, 1.0006, 0.99977, 0.99973, 0.99973, 1.00026, 1.0006, 1.00026, 1.0006, 1.00026, 1.03828, 1.00026, 0.99999, 1.00026, 1.0006, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.9993, 0.9998, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1, 1.00016, 0.99977, 0.99959, 0.99977, 0.99959, 0.99977, 0.99959, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00026, 0.99998, 1.00026, 0.8121, 1.00026, 0.99998, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 1.00016, 1.00022, 1.00001, 0.99973, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 1.0006, 0.99973, 0.99977, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 0.99973, 1.00026, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 1.00034, 0.99977, 1, 0.99997, 1.00026, 1.00078, 1.00036, 0.99973, 1.00013, 1.0006, 0.99977, 0.99977, 0.99988, 0.85148, 1.00001, 1.00026, 0.99977, 1.00022, 1.0006, 0.99977, 1.00001, 0.99999, 0.99977, 1.00069, 1.00022, 0.99977, 1.00001, 0.99984, 1.00026, 1.00001, 1.00024, 1.00001, 0.9999, 1, 1.0006, 1.00001, 1.00041, 0.99962, 1.00026, 1.0006, 0.99995, 1.00041, 0.99942, 0.99973, 0.99927, 1.00082, 0.99902, 1.00026, 1.00087, 1.0006, 1.00069, 0.99973, 0.99867, 0.99973, 0.9993, 1.00026, 1.00049, 1.00056, 1, 0.99988, 0.99935, 0.99995, 0.99954, 1.00055, 0.99945, 1.00032, 1.0006, 0.99995, 1.00026, 0.99995, 1.00032, 1.00001, 1.00008, 0.99971, 1.00019, 0.9994, 1.00001, 1.0006, 1.00044, 0.99973, 1.00023, 1.00047, 1, 0.99942, 0.99561, 0.99989, 1.00035, 0.99977, 1.00035, 0.99977, 1.00019, 0.99944, 1.00001, 1.00021, 0.99926, 1.00035, 1.00035, 0.99942, 1.00048, 0.99999, 0.99977, 1.00022, 1.00035, 1.00001, 0.99977, 1.00026, 0.99989, 1.00057, 1.00001, 0.99936, 1.00052, 1.00012, 0.99996, 1.00043, 1, 1.00035, 0.9994, 0.99976, 1.00035, 0.99973, 1.00052, 1.00041, 1.00119, 1.00037, 0.99973, 1.00002, 0.99986, 1.00041, 1.00041, 0.99902, 0.9996, 1.00034, 0.99999, 1.00026, 0.99999, 1.00026, 0.99973, 1.00052, 0.99973, 1, 0.99973, 1.00041, 1.00075, 0.9994, 1.0003, 0.99999, 1, 1.00041, 0.99955, 1, 0.99915, 0.99973, 0.99973, 1.00026, 1.00119, 0.99955, 0.99973, 1.0006, 0.99911, 1.0006, 1.00026, 0.99972, 1.00026, 0.99902, 1.00041, 0.99973, 0.99999, 1, 1, 1.00038, 1.0005, 1.00016, 1.00022, 1.00016, 1.00022, 1.00016, 1.00022, 1.00001, 0.99973, 1, 1, 0.99973, 1, 1, 0.99955, 1.0006, 1.0006, 1.0006, 1.0006, 1, 1, 1, 0.99973, 0.99973, 0.99972, 1, 1, 1.00106, 0.99999, 0.99998, 0.99998, 0.99999, 0.99998, 1.66475, 1, 0.99973, 0.99973, 1.00023, 0.99973, 0.99971, 1.00047, 1.00023, 1, 0.99991, 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1, 1, 1, 1, 1, 1, 1, 0.99972, 1, 1.20985, 1.39713, 1.00003, 1.00031, 1.00015, 1, 0.99561, 1.00027, 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.99972, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26239const HelveticaBoldMetrics = { 26240 lineHeight: 1.2, 26241 lineGap: 0.2 26242}; 26243const HelveticaBoldItalicFactors = [0.76116, 1, 1, 1.0006, 0.99998, 0.99974, 0.99973, 0.99973, 0.99982, 0.99977, 1.00087, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, 0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 1.00003, 1.00003, 1.00003, 1.00026, 0.9999, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 0.99973, 0.99977, 1.00026, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001, 1.00001, 1.00026, 0.99998, 1.0006, 0.99998, 1.00003, 0.99973, 0.99998, 0.99973, 1.00026, 0.99973, 1.00026, 0.99973, 0.99998, 1.00026, 1.00026, 1.0006, 1.0006, 0.99973, 1.0006, 0.99982, 1.00026, 1.00026, 1.00026, 1.00026, 0.99959, 0.99973, 0.99998, 1.00026, 0.99973, 1.00022, 0.99973, 0.99973, 1, 0.99959, 1.00077, 0.99959, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973, 1.00077, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.99973, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002, 1.00026, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99982, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.06409, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 1.00026, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 1.0044, 0.99977, 1.00026, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99971, 0.99973, 0.99973, 1.0006, 0.99977, 0.99973, 0.99973, 1.00026, 1.0006, 1.00026, 1.0006, 1.00026, 1.01011, 1.00026, 0.99999, 1.00026, 1.0006, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.9993, 0.9998, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1, 1.00016, 0.99977, 0.99959, 0.99977, 0.99959, 0.99977, 0.99959, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00026, 0.99998, 1.00026, 0.8121, 1.00026, 0.99998, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 1.00016, 1.00022, 1.00001, 0.99973, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 1.0006, 0.99973, 0.99977, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 0.99973, 1.00026, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99977, 1, 1, 1.00026, 0.99969, 0.99972, 0.99981, 0.9998, 1.0006, 0.99977, 0.99977, 1.00022, 0.91155, 1.00001, 1.00026, 0.99977, 1.00022, 1.0006, 0.99977, 1.00001, 0.99999, 0.99977, 0.99966, 1.00022, 1.00032, 1.00001, 0.99944, 1.00026, 1.00001, 0.99968, 1.00001, 1.00047, 1, 1.0006, 1.00001, 0.99981, 1.00101, 1.00026, 1.0006, 0.99948, 0.99981, 1.00064, 0.99973, 0.99942, 1.00101, 1.00061, 1.00026, 1.00069, 1.0006, 1.00014, 0.99973, 1.01322, 0.99973, 1.00065, 1.00026, 1.00012, 0.99923, 1, 1.00064, 1.00076, 0.99948, 1.00055, 1.00063, 1.00007, 0.99943, 1.0006, 0.99948, 1.00026, 0.99948, 0.99943, 1.00001, 1.00001, 1.00029, 1.00038, 1.00035, 1.00001, 1.0006, 1.0006, 0.99973, 0.99978, 1.00001, 1.00057, 0.99989, 0.99967, 0.99964, 0.99967, 0.99977, 0.99999, 0.99977, 1.00038, 0.99977, 1.00001, 0.99973, 1.00066, 0.99967, 0.99967, 1.00041, 0.99998, 0.99999, 0.99977, 1.00022, 0.99967, 1.00001, 0.99977, 1.00026, 0.99964, 1.00031, 1.00001, 0.99999, 0.99999, 1, 1.00023, 1, 1, 0.99999, 1.00035, 1.00001, 0.99999, 0.99973, 0.99977, 0.99999, 1.00058, 0.99973, 0.99973, 0.99955, 0.9995, 1.00026, 1.00026, 1.00032, 0.99989, 1.00034, 0.99999, 1.00026, 1.00026, 1.00026, 0.99973, 0.45998, 0.99973, 1.00026, 0.99973, 1.00001, 0.99999, 0.99982, 0.99994, 0.99996, 1, 1.00042, 1.00044, 1.00029, 1.00023, 0.99973, 0.99973, 1.00026, 0.99949, 1.00002, 0.99973, 1.0006, 1.0006, 1.0006, 0.99975, 1.00026, 1.00026, 1.00032, 0.98685, 0.99973, 1.00026, 1, 1, 0.99966, 1.00044, 1.00016, 1.00022, 1.00016, 1.00022, 1.00016, 1.00022, 1.00001, 0.99973, 1, 1, 0.99973, 1, 1, 0.99955, 1.0006, 1.0006, 1.0006, 1.0006, 1, 1, 1, 0.99973, 0.99973, 0.99972, 1, 1, 1.00106, 0.99999, 0.99998, 0.99998, 0.99999, 0.99998, 1.66475, 1, 0.99973, 0.99973, 1, 0.99973, 0.99971, 0.99978, 1, 1, 0.99991, 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1.00098, 1, 1, 1, 1.00049, 1, 1, 0.99972, 1, 1.20985, 1.39713, 1.00003, 1.00031, 1.00015, 1, 0.99561, 1.00027, 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.99972, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26244const HelveticaBoldItalicMetrics = { 26245 lineHeight: 1.35, 26246 lineGap: 0.2 26247}; 26248const HelveticaItalicFactors = [0.76116, 1, 1, 1.0006, 1.0006, 1.00006, 0.99973, 0.99973, 0.99982, 1.00001, 1.00043, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, 0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1, 1.00003, 1.00003, 1.00003, 0.99973, 0.99987, 1.00001, 1.00001, 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 1, 1.00001, 0.99973, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001, 1.00001, 1.00026, 1.0006, 1.0006, 1.0006, 0.99949, 0.99973, 0.99998, 0.99973, 0.99973, 1, 0.99973, 0.99973, 1.0006, 0.99973, 0.99973, 0.99924, 0.99924, 1, 0.99924, 0.99999, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 1.0006, 0.99973, 1, 0.99977, 1, 1, 1, 1.00005, 1.0009, 1.00005, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973, 1.0009, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.9998, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002, 1.00026, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99982, 1, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.06409, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 1, 0.99973, 1, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 0.99977, 1, 0.99977, 1, 0.99977, 1, 0.99977, 1, 0.99977, 1.0288, 0.99977, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99924, 1.0006, 1.0006, 0.99946, 1.00034, 1, 0.99924, 1.00001, 1, 1, 0.99973, 0.99924, 0.99973, 0.99924, 0.99973, 1.06311, 0.99973, 1.00024, 0.99973, 0.99924, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.00041, 0.9998, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1, 1.00016, 0.99977, 0.99998, 0.99977, 0.99998, 0.99977, 0.99998, 1.00001, 1, 1.00001, 1, 1.00001, 1, 1.00001, 1, 1.00026, 1.0006, 1.00026, 0.89547, 1.00026, 1.0006, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.00016, 0.99977, 1.00001, 1, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 0.99924, 0.99973, 1.00001, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 1, 1.00026, 1.0006, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 1.00001, 1, 1.00054, 0.99977, 1.00084, 1.00007, 0.99973, 1.00013, 0.99924, 1.00001, 1.00001, 0.99945, 0.91221, 1.00001, 1.00026, 0.99977, 1.00022, 1.0006, 1.00001, 1.00001, 0.99999, 0.99977, 0.99933, 1.00022, 1.00054, 1.00001, 1.00065, 1.00026, 1.00001, 1.0001, 1.00001, 1.00052, 1, 1.0006, 1.00001, 0.99945, 0.99897, 0.99968, 0.99924, 1.00036, 0.99945, 0.99949, 1, 1.0006, 0.99897, 0.99918, 0.99968, 0.99911, 0.99924, 1, 0.99962, 1.01487, 1, 1.0005, 0.99973, 1.00012, 1.00043, 1, 0.99995, 0.99994, 1.00036, 0.99947, 1.00019, 1.00063, 1.00025, 0.99924, 1.00036, 0.99973, 1.00036, 1.00025, 1.00001, 1.00001, 1.00027, 1.0001, 1.00068, 1.00001, 1.0006, 1.0006, 1, 1.00008, 0.99957, 0.99972, 0.9994, 0.99954, 0.99975, 1.00051, 1.00001, 1.00019, 1.00001, 1.0001, 0.99986, 1.00001, 1.00001, 1.00038, 0.99954, 0.99954, 0.9994, 1.00066, 0.99999, 0.99977, 1.00022, 1.00054, 1.00001, 0.99977, 1.00026, 0.99975, 1.0001, 1.00001, 0.99993, 0.9995, 0.99955, 1.00016, 0.99978, 0.99974, 1.00019, 1.00022, 0.99955, 1.00053, 0.99973, 1.00089, 1.00005, 0.99967, 1.00048, 0.99973, 1.00002, 1.00034, 0.99973, 0.99973, 0.99964, 1.00006, 1.00066, 0.99947, 0.99973, 0.98894, 0.99973, 1, 0.44898, 1, 0.99946, 1, 1.00039, 1.00082, 0.99991, 0.99991, 0.99985, 1.00022, 1.00023, 1.00061, 1.00006, 0.99966, 0.99973, 0.99973, 0.99973, 1.00019, 1.0008, 1, 0.99924, 0.99924, 0.99924, 0.99983, 1.00044, 0.99973, 0.99964, 0.98332, 1, 0.99973, 1, 1, 0.99962, 0.99895, 1.00016, 0.99977, 1.00016, 0.99977, 1.00016, 0.99977, 1.00001, 1, 1, 1, 0.99973, 1, 1, 0.99955, 0.99924, 0.99924, 0.99924, 0.99924, 0.99998, 0.99998, 0.99998, 0.99973, 0.99973, 0.99972, 1, 1, 1.00267, 0.99999, 0.99998, 0.99998, 1, 0.99998, 1.66475, 1, 0.99973, 0.99973, 1.00023, 0.99973, 1.00423, 0.99925, 0.99999, 1, 0.99991, 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1.00049, 1, 1.00245, 1, 1, 1, 1, 0.96329, 1, 1.20985, 1.39713, 1.00003, 0.8254, 1.00015, 1, 1.00035, 1.00027, 1.00031, 1.00031, 1.00003, 1.00031, 1.00031, 0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.95317, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26249const HelveticaItalicMetrics = { 26250 lineHeight: 1.35, 26251 lineGap: 0.2 26252}; 26253const HelveticaRegularFactors = [0.76116, 1, 1, 1.0006, 1.0006, 1.00006, 0.99973, 0.99973, 0.99982, 1.00001, 1.00043, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, 0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1, 1.00003, 1.00003, 1.00003, 0.99973, 0.99987, 1.00001, 1.00001, 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 1, 1.00001, 0.99973, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001, 1.00001, 1.00026, 1.0006, 1.0006, 1.0006, 0.99949, 0.99973, 0.99998, 0.99973, 0.99973, 1, 0.99973, 0.99973, 1.0006, 0.99973, 0.99973, 0.99924, 0.99924, 1, 0.99924, 0.99999, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 1.0006, 0.99973, 1, 0.99977, 1, 1, 1, 1.00005, 1.0009, 1.00005, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973, 1.0009, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.9998, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002, 1.00026, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99982, 1, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.06409, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 1, 0.99973, 1, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 0.99977, 1, 0.99977, 1, 0.99977, 1, 0.99977, 1, 0.99977, 1.04596, 0.99977, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99924, 1.0006, 1.0006, 1.00019, 1.00034, 1, 0.99924, 1.00001, 1, 1, 0.99973, 0.99924, 0.99973, 0.99924, 0.99973, 1.02572, 0.99973, 1.00005, 0.99973, 0.99924, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99999, 0.9998, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1, 1.00016, 0.99977, 0.99998, 0.99977, 0.99998, 0.99977, 0.99998, 1.00001, 1, 1.00001, 1, 1.00001, 1, 1.00001, 1, 1.00026, 1.0006, 1.00026, 0.84533, 1.00026, 1.0006, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.00016, 0.99977, 1.00001, 1, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 0.99924, 0.99973, 1.00001, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 1, 1.00026, 1.0006, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99928, 1, 0.99977, 1.00013, 1.00055, 0.99947, 0.99945, 0.99941, 0.99924, 1.00001, 1.00001, 1.0004, 0.91621, 1.00001, 1.00026, 0.99977, 1.00022, 1.0006, 1.00001, 1.00005, 0.99999, 0.99977, 1.00015, 1.00022, 0.99977, 1.00001, 0.99973, 1.00026, 1.00001, 1.00019, 1.00001, 0.99946, 1, 1.0006, 1.00001, 0.99978, 1.00045, 0.99973, 0.99924, 1.00023, 0.99978, 0.99966, 1, 1.00065, 1.00045, 1.00019, 0.99973, 0.99973, 0.99924, 1, 1, 0.96499, 1, 1.00055, 0.99973, 1.00008, 1.00027, 1, 0.9997, 0.99995, 1.00023, 0.99933, 1.00019, 1.00015, 1.00031, 0.99924, 1.00023, 0.99973, 1.00023, 1.00031, 1.00001, 0.99928, 1.00029, 1.00092, 1.00035, 1.00001, 1.0006, 1.0006, 1, 0.99988, 0.99975, 1, 1.00082, 0.99561, 0.9996, 1.00035, 1.00001, 0.99962, 1.00001, 1.00092, 0.99964, 1.00001, 0.99963, 0.99999, 1.00035, 1.00035, 1.00082, 0.99962, 0.99999, 0.99977, 1.00022, 1.00035, 1.00001, 0.99977, 1.00026, 0.9996, 0.99967, 1.00001, 1.00034, 1.00074, 1.00054, 1.00053, 1.00063, 0.99971, 0.99962, 1.00035, 0.99975, 0.99977, 0.99973, 1.00043, 0.99953, 1.0007, 0.99915, 0.99973, 1.00008, 0.99892, 1.00073, 1.00073, 1.00114, 0.99915, 1.00073, 0.99955, 0.99973, 1.00092, 0.99973, 1, 0.99998, 1, 1.0003, 1, 1.00043, 1.00001, 0.99969, 1.0003, 1, 1.00035, 1.00001, 0.9995, 1, 1.00092, 0.99973, 0.99973, 0.99973, 1.0007, 0.9995, 1, 0.99924, 1.0006, 0.99924, 0.99972, 1.00062, 0.99973, 1.00114, 1.00073, 1, 0.99955, 1, 1, 1.00047, 0.99968, 1.00016, 0.99977, 1.00016, 0.99977, 1.00016, 0.99977, 1.00001, 1, 1, 1, 0.99973, 1, 1, 0.99955, 0.99924, 0.99924, 0.99924, 0.99924, 0.99998, 0.99998, 0.99998, 0.99973, 0.99973, 0.99972, 1, 1, 1.00267, 0.99999, 0.99998, 0.99998, 1, 0.99998, 1.66475, 1, 0.99973, 0.99973, 1.00023, 0.99973, 0.99971, 0.99925, 1.00023, 1, 0.99991, 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1, 1, 1, 1, 1, 1, 1, 0.96329, 1, 1.20985, 1.39713, 1.00003, 0.8254, 1.00015, 1, 1.00035, 1.00027, 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.95317, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26254const HelveticaRegularMetrics = { 26255 lineHeight: 1.2, 26256 lineGap: 0.2 26257}; 26258 26259;// ./src/core/liberationsans_widths.js 26260const LiberationSansBoldWidths = [365, 0, 333, 278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, 333, 584, 584, 584, 611, 975, 722, 722, 722, 722, 667, 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333, 584, 556, 333, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556, 278, 889, 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556, 556, 500, 389, 280, 389, 584, 333, 556, 556, 556, 556, 280, 556, 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, 556, 278, 333, 333, 365, 556, 834, 834, 834, 611, 722, 722, 722, 722, 722, 722, 1000, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556, 556, 556, 278, 278, 278, 278, 611, 611, 611, 611, 611, 611, 611, 549, 611, 611, 611, 611, 611, 556, 611, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 719, 722, 611, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 611, 778, 611, 778, 611, 778, 611, 722, 611, 722, 611, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 785, 556, 556, 278, 722, 556, 556, 611, 278, 611, 278, 611, 385, 611, 479, 611, 278, 722, 611, 722, 611, 722, 611, 708, 723, 611, 778, 611, 778, 611, 778, 611, 1000, 944, 722, 389, 722, 389, 722, 389, 667, 556, 667, 556, 667, 556, 667, 556, 611, 333, 611, 479, 611, 333, 722, 611, 722, 611, 722, 611, 722, 611, 722, 611, 722, 611, 944, 778, 667, 556, 667, 611, 500, 611, 500, 611, 500, 278, 556, 722, 556, 1000, 889, 778, 611, 667, 556, 611, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 465, 722, 333, 853, 906, 474, 825, 927, 838, 278, 722, 722, 601, 719, 667, 611, 722, 778, 278, 722, 667, 833, 722, 644, 778, 722, 667, 600, 611, 667, 821, 667, 809, 802, 278, 667, 615, 451, 611, 278, 582, 615, 610, 556, 606, 475, 460, 611, 541, 278, 558, 556, 612, 556, 445, 611, 766, 619, 520, 684, 446, 582, 715, 576, 753, 845, 278, 582, 611, 582, 845, 667, 669, 885, 567, 711, 667, 278, 276, 556, 1094, 1062, 875, 610, 722, 622, 719, 722, 719, 722, 567, 712, 667, 904, 626, 719, 719, 610, 702, 833, 722, 778, 719, 667, 722, 611, 622, 854, 667, 730, 703, 1005, 1019, 870, 979, 719, 711, 1031, 719, 556, 618, 615, 417, 635, 556, 709, 497, 615, 615, 500, 635, 740, 604, 611, 604, 611, 556, 490, 556, 875, 556, 615, 581, 833, 844, 729, 854, 615, 552, 854, 583, 556, 556, 611, 417, 552, 556, 278, 281, 278, 969, 906, 611, 500, 615, 556, 604, 778, 611, 487, 447, 944, 778, 944, 778, 944, 778, 667, 556, 333, 333, 556, 1000, 1000, 552, 278, 278, 278, 278, 500, 500, 500, 556, 556, 350, 1000, 1000, 240, 479, 333, 333, 604, 333, 167, 396, 556, 556, 1094, 556, 885, 489, 1115, 1000, 768, 600, 834, 834, 834, 834, 1000, 500, 1000, 500, 1000, 500, 500, 494, 612, 823, 713, 584, 549, 713, 979, 722, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354, 1000, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052, 917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 611, 611, 333, 333, 333, 333, 333, 333, 333, 333, 222, 222, 333, 333, 333, 333, 333, 333, 333, 333]; 26261const LiberationSansBoldMapping = [-1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, 538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, 902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813, 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243, 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, 8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, 8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, 8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604, 9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644, 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786, 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836, 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]; 26262const LiberationSansBoldItalicWidths = [365, 0, 333, 278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, 333, 584, 584, 584, 611, 975, 722, 722, 722, 722, 667, 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333, 584, 556, 333, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556, 278, 889, 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556, 556, 500, 389, 280, 389, 584, 333, 556, 556, 556, 556, 280, 556, 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, 556, 278, 333, 333, 365, 556, 834, 834, 834, 611, 722, 722, 722, 722, 722, 722, 1000, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556, 556, 556, 278, 278, 278, 278, 611, 611, 611, 611, 611, 611, 611, 549, 611, 611, 611, 611, 611, 556, 611, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 740, 722, 611, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 611, 778, 611, 778, 611, 778, 611, 722, 611, 722, 611, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 782, 556, 556, 278, 722, 556, 556, 611, 278, 611, 278, 611, 396, 611, 479, 611, 278, 722, 611, 722, 611, 722, 611, 708, 723, 611, 778, 611, 778, 611, 778, 611, 1000, 944, 722, 389, 722, 389, 722, 389, 667, 556, 667, 556, 667, 556, 667, 556, 611, 333, 611, 479, 611, 333, 722, 611, 722, 611, 722, 611, 722, 611, 722, 611, 722, 611, 944, 778, 667, 556, 667, 611, 500, 611, 500, 611, 500, 278, 556, 722, 556, 1000, 889, 778, 611, 667, 556, 611, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 722, 333, 854, 906, 473, 844, 930, 847, 278, 722, 722, 610, 671, 667, 611, 722, 778, 278, 722, 667, 833, 722, 657, 778, 718, 667, 590, 611, 667, 822, 667, 829, 781, 278, 667, 620, 479, 611, 278, 591, 620, 621, 556, 610, 479, 492, 611, 558, 278, 566, 556, 603, 556, 450, 611, 712, 605, 532, 664, 409, 591, 704, 578, 773, 834, 278, 591, 611, 591, 834, 667, 667, 886, 614, 719, 667, 278, 278, 556, 1094, 1042, 854, 622, 719, 677, 719, 722, 708, 722, 614, 722, 667, 927, 643, 719, 719, 615, 687, 833, 722, 778, 719, 667, 722, 611, 677, 781, 667, 729, 708, 979, 989, 854, 1000, 708, 719, 1042, 729, 556, 619, 604, 534, 618, 556, 736, 510, 611, 611, 507, 622, 740, 604, 611, 611, 611, 556, 889, 556, 885, 556, 646, 583, 889, 935, 707, 854, 594, 552, 865, 589, 556, 556, 611, 469, 563, 556, 278, 278, 278, 969, 906, 611, 507, 619, 556, 611, 778, 611, 575, 467, 944, 778, 944, 778, 944, 778, 667, 556, 333, 333, 556, 1000, 1000, 552, 278, 278, 278, 278, 500, 500, 500, 556, 556, 350, 1000, 1000, 240, 479, 333, 333, 604, 333, 167, 396, 556, 556, 1104, 556, 885, 516, 1146, 1000, 768, 600, 834, 834, 834, 834, 999, 500, 1000, 500, 1000, 500, 500, 494, 612, 823, 713, 584, 549, 713, 979, 722, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354, 1000, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052, 917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 611, 611, 333, 333, 333, 333, 333, 333, 333, 333, 222, 222, 333, 333, 333, 333, 333, 333, 333, 333]; 26263const LiberationSansBoldItalicMapping = [-1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, 538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, 902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813, 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243, 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, 8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, 8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, 8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604, 9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644, 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786, 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836, 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]; 26264const LiberationSansItalicWidths = [365, 0, 333, 278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722, 667, 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278, 469, 556, 333, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500, 222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500, 500, 500, 334, 260, 334, 584, 333, 556, 556, 556, 556, 260, 556, 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, 537, 278, 333, 333, 365, 556, 834, 834, 834, 611, 667, 667, 667, 667, 667, 667, 1000, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556, 556, 556, 278, 278, 278, 278, 556, 556, 556, 556, 556, 556, 556, 549, 611, 556, 556, 556, 556, 500, 556, 500, 667, 556, 667, 556, 667, 556, 722, 500, 722, 500, 722, 500, 722, 500, 722, 625, 722, 556, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 556, 778, 556, 778, 556, 778, 556, 722, 556, 722, 556, 278, 278, 278, 278, 278, 278, 278, 222, 278, 278, 733, 444, 500, 222, 667, 500, 500, 556, 222, 556, 222, 556, 281, 556, 400, 556, 222, 722, 556, 722, 556, 722, 556, 615, 723, 556, 778, 556, 778, 556, 778, 556, 1000, 944, 722, 333, 722, 333, 722, 333, 667, 500, 667, 500, 667, 500, 667, 500, 611, 278, 611, 354, 611, 278, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 944, 722, 667, 500, 667, 611, 500, 611, 500, 611, 500, 222, 556, 667, 556, 1000, 889, 778, 611, 667, 500, 611, 278, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 667, 278, 789, 846, 389, 794, 865, 775, 222, 667, 667, 570, 671, 667, 611, 722, 778, 278, 667, 667, 833, 722, 648, 778, 725, 667, 600, 611, 667, 837, 667, 831, 761, 278, 667, 570, 439, 555, 222, 550, 570, 571, 500, 556, 439, 463, 555, 542, 222, 500, 492, 548, 500, 447, 556, 670, 573, 486, 603, 374, 550, 652, 546, 728, 779, 222, 550, 556, 550, 779, 667, 667, 843, 544, 708, 667, 278, 278, 500, 1066, 982, 844, 589, 715, 639, 724, 667, 651, 667, 544, 704, 667, 917, 614, 715, 715, 589, 686, 833, 722, 778, 725, 667, 722, 611, 639, 795, 667, 727, 673, 920, 923, 805, 886, 651, 694, 1022, 682, 556, 562, 522, 493, 553, 556, 688, 465, 556, 556, 472, 564, 686, 550, 556, 556, 556, 500, 833, 500, 835, 500, 572, 518, 830, 851, 621, 736, 526, 492, 752, 534, 556, 556, 556, 378, 496, 500, 222, 222, 222, 910, 828, 556, 472, 565, 500, 556, 778, 556, 492, 339, 944, 722, 944, 722, 944, 722, 667, 500, 333, 333, 556, 1000, 1000, 552, 222, 222, 222, 222, 333, 333, 333, 556, 556, 350, 1000, 1000, 188, 354, 333, 333, 500, 333, 167, 365, 556, 556, 1094, 556, 885, 323, 1083, 1000, 768, 600, 834, 834, 834, 834, 1000, 500, 998, 500, 1000, 500, 500, 494, 612, 823, 713, 584, 549, 713, 979, 719, 274, 549, 549, 584, 549, 549, 604, 584, 604, 604, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354, 1000, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052, 917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 500, 500, 333, 333, 333, 333, 333, 333, 333, 333, 222, 222, 294, 294, 324, 324, 316, 328, 398, 285]; 26265const LiberationSansItalicMapping = [-1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, 538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, 902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813, 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243, 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, 8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, 8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, 8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604, 9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644, 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786, 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836, 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]; 26266const LiberationSansRegularWidths = [365, 0, 333, 278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722, 667, 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278, 469, 556, 333, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500, 222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500, 500, 500, 334, 260, 334, 584, 333, 556, 556, 556, 556, 260, 556, 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, 537, 278, 333, 333, 365, 556, 834, 834, 834, 611, 667, 667, 667, 667, 667, 667, 1000, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556, 556, 556, 278, 278, 278, 278, 556, 556, 556, 556, 556, 556, 556, 549, 611, 556, 556, 556, 556, 500, 556, 500, 667, 556, 667, 556, 667, 556, 722, 500, 722, 500, 722, 500, 722, 500, 722, 615, 722, 556, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 556, 778, 556, 778, 556, 778, 556, 722, 556, 722, 556, 278, 278, 278, 278, 278, 278, 278, 222, 278, 278, 735, 444, 500, 222, 667, 500, 500, 556, 222, 556, 222, 556, 292, 556, 334, 556, 222, 722, 556, 722, 556, 722, 556, 604, 723, 556, 778, 556, 778, 556, 778, 556, 1000, 944, 722, 333, 722, 333, 722, 333, 667, 500, 667, 500, 667, 500, 667, 500, 611, 278, 611, 375, 611, 278, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 944, 722, 667, 500, 667, 611, 500, 611, 500, 611, 500, 222, 556, 667, 556, 1000, 889, 778, 611, 667, 500, 611, 278, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 667, 278, 784, 838, 384, 774, 855, 752, 222, 667, 667, 551, 668, 667, 611, 722, 778, 278, 667, 668, 833, 722, 650, 778, 722, 667, 618, 611, 667, 798, 667, 835, 748, 278, 667, 578, 446, 556, 222, 547, 578, 575, 500, 557, 446, 441, 556, 556, 222, 500, 500, 576, 500, 448, 556, 690, 569, 482, 617, 395, 547, 648, 525, 713, 781, 222, 547, 556, 547, 781, 667, 667, 865, 542, 719, 667, 278, 278, 500, 1057, 1010, 854, 583, 722, 635, 719, 667, 656, 667, 542, 677, 667, 923, 604, 719, 719, 583, 656, 833, 722, 778, 719, 667, 722, 611, 635, 760, 667, 740, 667, 917, 938, 792, 885, 656, 719, 1010, 722, 556, 573, 531, 365, 583, 556, 669, 458, 559, 559, 438, 583, 688, 552, 556, 542, 556, 500, 458, 500, 823, 500, 573, 521, 802, 823, 625, 719, 521, 510, 750, 542, 556, 556, 556, 365, 510, 500, 222, 278, 222, 906, 812, 556, 438, 559, 500, 552, 778, 556, 489, 411, 944, 722, 944, 722, 944, 722, 667, 500, 333, 333, 556, 1000, 1000, 552, 222, 222, 222, 222, 333, 333, 333, 556, 556, 350, 1000, 1000, 188, 354, 333, 333, 500, 333, 167, 365, 556, 556, 1094, 556, 885, 323, 1073, 1000, 768, 600, 834, 834, 834, 834, 1000, 500, 1000, 500, 1000, 500, 500, 494, 612, 823, 713, 584, 549, 713, 979, 719, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354, 1000, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052, 917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 500, 500, 333, 333, 333, 333, 333, 333, 333, 333, 222, 222, 294, 294, 324, 324, 316, 328, 398, 285]; 26267const LiberationSansRegularMapping = [-1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, 538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, 902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813, 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243, 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, 8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, 8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, 8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604, 9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644, 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786, 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836, 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]; 26268 26269;// ./src/core/myriadpro_factors.js 26270const MyriadProBoldFactors = [1.36898, 1, 1, 0.72706, 0.80479, 0.83734, 0.98894, 0.99793, 0.9897, 0.93884, 0.86209, 0.94292, 0.94292, 1.16661, 1.02058, 0.93582, 0.96694, 0.93582, 1.19137, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.78076, 0.78076, 1.02058, 1.02058, 1.02058, 0.72851, 0.78966, 0.90838, 0.83637, 0.82391, 0.96376, 0.80061, 0.86275, 0.8768, 0.95407, 1.0258, 0.73901, 0.85022, 0.83655, 1.0156, 0.95546, 0.92179, 0.87107, 0.92179, 0.82114, 0.8096, 0.89713, 0.94438, 0.95353, 0.94083, 0.91905, 0.90406, 0.9446, 0.94292, 1.18777, 0.94292, 1.02058, 0.89903, 0.90088, 0.94938, 0.97898, 0.81093, 0.97571, 0.94938, 1.024, 0.9577, 0.95933, 0.98621, 1.0474, 0.97455, 0.98981, 0.9672, 0.95933, 0.9446, 0.97898, 0.97407, 0.97646, 0.78036, 1.10208, 0.95442, 0.95298, 0.97579, 0.9332, 0.94039, 0.938, 0.80687, 1.01149, 0.80687, 1.02058, 0.80479, 0.99793, 0.99793, 0.99793, 0.99793, 1.01149, 1.00872, 0.90088, 0.91882, 1.0213, 0.8361, 1.02058, 0.62295, 0.54324, 0.89022, 1.08595, 1, 1, 0.90088, 1, 0.97455, 0.93582, 0.90088, 1, 1.05686, 0.8361, 0.99642, 0.99642, 0.99642, 0.72851, 0.90838, 0.90838, 0.90838, 0.90838, 0.90838, 0.90838, 0.868, 0.82391, 0.80061, 0.80061, 0.80061, 0.80061, 1.0258, 1.0258, 1.0258, 1.0258, 0.97484, 0.95546, 0.92179, 0.92179, 0.92179, 0.92179, 0.92179, 1.02058, 0.92179, 0.94438, 0.94438, 0.94438, 0.94438, 0.90406, 0.86958, 0.98225, 0.94938, 0.94938, 0.94938, 0.94938, 0.94938, 0.94938, 0.9031, 0.81093, 0.94938, 0.94938, 0.94938, 0.94938, 0.98621, 0.98621, 0.98621, 0.98621, 0.93969, 0.95933, 0.9446, 0.9446, 0.9446, 0.9446, 0.9446, 1.08595, 0.9446, 0.95442, 0.95442, 0.95442, 0.95442, 0.94039, 0.97898, 0.94039, 0.90838, 0.94938, 0.90838, 0.94938, 0.90838, 0.94938, 0.82391, 0.81093, 0.82391, 0.81093, 0.82391, 0.81093, 0.82391, 0.81093, 0.96376, 0.84313, 0.97484, 0.97571, 0.80061, 0.94938, 0.80061, 0.94938, 0.80061, 0.94938, 0.80061, 0.94938, 0.80061, 0.94938, 0.8768, 0.9577, 0.8768, 0.9577, 0.8768, 0.9577, 1, 1, 0.95407, 0.95933, 0.97069, 0.95933, 1.0258, 0.98621, 1.0258, 0.98621, 1.0258, 0.98621, 1.0258, 0.98621, 1.0258, 0.98621, 0.887, 1.01591, 0.73901, 1.0474, 1, 1, 0.97455, 0.83655, 0.98981, 1, 1, 0.83655, 0.73977, 0.83655, 0.73903, 0.84638, 1.033, 0.95546, 0.95933, 1, 1, 0.95546, 0.95933, 0.8271, 0.95417, 0.95933, 0.92179, 0.9446, 0.92179, 0.9446, 0.92179, 0.9446, 0.936, 0.91964, 0.82114, 0.97646, 1, 1, 0.82114, 0.97646, 0.8096, 0.78036, 0.8096, 0.78036, 1, 1, 0.8096, 0.78036, 1, 1, 0.89713, 0.77452, 0.89713, 1.10208, 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442, 0.94083, 0.97579, 0.90406, 0.94039, 0.90406, 0.9446, 0.938, 0.9446, 0.938, 0.9446, 0.938, 1, 0.99793, 0.90838, 0.94938, 0.868, 0.9031, 0.92179, 0.9446, 1, 1, 0.89713, 1.10208, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90989, 0.9358, 0.91945, 0.83181, 0.75261, 0.87992, 0.82976, 0.96034, 0.83689, 0.97268, 1.0078, 0.90838, 0.83637, 0.8019, 0.90157, 0.80061, 0.9446, 0.95407, 0.92436, 1.0258, 0.85022, 0.97153, 1.0156, 0.95546, 0.89192, 0.92179, 0.92361, 0.87107, 0.96318, 0.89713, 0.93704, 0.95638, 0.91905, 0.91709, 0.92796, 1.0258, 0.93704, 0.94836, 1.0373, 0.95933, 1.0078, 0.95871, 0.94836, 0.96174, 0.92601, 0.9498, 0.98607, 0.95776, 0.95933, 1.05453, 1.0078, 0.98275, 0.9314, 0.95617, 0.91701, 1.05993, 0.9446, 0.78367, 0.9553, 1, 0.86832, 1.0128, 0.95871, 0.99394, 0.87548, 0.96361, 0.86774, 1.0078, 0.95871, 0.9446, 0.95871, 0.86774, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.94083, 0.97579, 0.94083, 0.97579, 0.94083, 0.97579, 0.90406, 0.94039, 0.96694, 1, 0.89903, 1, 1, 1, 0.93582, 0.93582, 0.93582, 1, 0.908, 0.908, 0.918, 0.94219, 0.94219, 0.96544, 1, 1.285, 1, 1, 0.81079, 0.81079, 1, 1, 0.74854, 1, 1, 1, 1, 0.99793, 1, 1, 1, 0.65, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.17173, 1, 0.80535, 0.76169, 1.02058, 1.0732, 1.05486, 1, 1, 1.30692, 1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.16161, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26271const MyriadProBoldMetrics = { 26272 lineHeight: 1.2, 26273 lineGap: 0.2 26274}; 26275const MyriadProBoldItalicFactors = [1.36898, 1, 1, 0.66227, 0.80779, 0.81625, 0.97276, 0.97276, 0.97733, 0.92222, 0.83266, 0.94292, 0.94292, 1.16148, 1.02058, 0.93582, 0.96694, 0.93582, 1.17337, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.78076, 0.78076, 1.02058, 1.02058, 1.02058, 0.71541, 0.76813, 0.85576, 0.80591, 0.80729, 0.94299, 0.77512, 0.83655, 0.86523, 0.92222, 0.98621, 0.71743, 0.81698, 0.79726, 0.98558, 0.92222, 0.90637, 0.83809, 0.90637, 0.80729, 0.76463, 0.86275, 0.90699, 0.91605, 0.9154, 0.85308, 0.85458, 0.90531, 0.94292, 1.21296, 0.94292, 1.02058, 0.89903, 1.18616, 0.99613, 0.91677, 0.78216, 0.91677, 0.90083, 0.98796, 0.9135, 0.92168, 0.95381, 0.98981, 0.95298, 0.95381, 0.93459, 0.92168, 0.91513, 0.92004, 0.91677, 0.95077, 0.748, 1.04502, 0.91677, 0.92061, 0.94236, 0.89544, 0.89364, 0.9, 0.80687, 0.8578, 0.80687, 1.02058, 0.80779, 0.97276, 0.97276, 0.97276, 0.97276, 0.8578, 0.99973, 1.18616, 0.91339, 1.08074, 0.82891, 1.02058, 0.55509, 0.71526, 0.89022, 1.08595, 1, 1, 1.18616, 1, 0.96736, 0.93582, 1.18616, 1, 1.04864, 0.82711, 0.99043, 0.99043, 0.99043, 0.71541, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576, 0.845, 0.80729, 0.77512, 0.77512, 0.77512, 0.77512, 0.98621, 0.98621, 0.98621, 0.98621, 0.95961, 0.92222, 0.90637, 0.90637, 0.90637, 0.90637, 0.90637, 1.02058, 0.90251, 0.90699, 0.90699, 0.90699, 0.90699, 0.85458, 0.83659, 0.94951, 0.99613, 0.99613, 0.99613, 0.99613, 0.99613, 0.99613, 0.85811, 0.78216, 0.90083, 0.90083, 0.90083, 0.90083, 0.95381, 0.95381, 0.95381, 0.95381, 0.9135, 0.92168, 0.91513, 0.91513, 0.91513, 0.91513, 0.91513, 1.08595, 0.91677, 0.91677, 0.91677, 0.91677, 0.91677, 0.89364, 0.92332, 0.89364, 0.85576, 0.99613, 0.85576, 0.99613, 0.85576, 0.99613, 0.80729, 0.78216, 0.80729, 0.78216, 0.80729, 0.78216, 0.80729, 0.78216, 0.94299, 0.76783, 0.95961, 0.91677, 0.77512, 0.90083, 0.77512, 0.90083, 0.77512, 0.90083, 0.77512, 0.90083, 0.77512, 0.90083, 0.86523, 0.9135, 0.86523, 0.9135, 0.86523, 0.9135, 1, 1, 0.92222, 0.92168, 0.92222, 0.92168, 0.98621, 0.95381, 0.98621, 0.95381, 0.98621, 0.95381, 0.98621, 0.95381, 0.98621, 0.95381, 0.86036, 0.97096, 0.71743, 0.98981, 1, 1, 0.95298, 0.79726, 0.95381, 1, 1, 0.79726, 0.6894, 0.79726, 0.74321, 0.81691, 1.0006, 0.92222, 0.92168, 1, 1, 0.92222, 0.92168, 0.79464, 0.92098, 0.92168, 0.90637, 0.91513, 0.90637, 0.91513, 0.90637, 0.91513, 0.909, 0.87514, 0.80729, 0.95077, 1, 1, 0.80729, 0.95077, 0.76463, 0.748, 0.76463, 0.748, 1, 1, 0.76463, 0.748, 1, 1, 0.86275, 0.72651, 0.86275, 1.04502, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.9154, 0.94236, 0.85458, 0.89364, 0.85458, 0.90531, 0.9, 0.90531, 0.9, 0.90531, 0.9, 1, 0.97276, 0.85576, 0.99613, 0.845, 0.85811, 0.90251, 0.91677, 1, 1, 0.86275, 1.04502, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.00899, 1.30628, 0.85576, 0.80178, 0.66862, 0.7927, 0.69323, 0.88127, 0.72459, 0.89711, 0.95381, 0.85576, 0.80591, 0.7805, 0.94729, 0.77512, 0.90531, 0.92222, 0.90637, 0.98621, 0.81698, 0.92655, 0.98558, 0.92222, 0.85359, 0.90637, 0.90976, 0.83809, 0.94523, 0.86275, 0.83509, 0.93157, 0.85308, 0.83392, 0.92346, 0.98621, 0.83509, 0.92886, 0.91324, 0.92168, 0.95381, 0.90646, 0.92886, 0.90557, 0.86847, 0.90276, 0.91324, 0.86842, 0.92168, 0.99531, 0.95381, 0.9224, 0.85408, 0.92699, 0.86847, 1.0051, 0.91513, 0.80487, 0.93481, 1, 0.88159, 1.05214, 0.90646, 0.97355, 0.81539, 0.89398, 0.85923, 0.95381, 0.90646, 0.91513, 0.90646, 0.85923, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.9154, 0.94236, 0.9154, 0.94236, 0.9154, 0.94236, 0.85458, 0.89364, 0.96694, 1, 0.89903, 1, 1, 1, 0.91782, 0.91782, 0.91782, 1, 0.896, 0.896, 0.896, 0.9332, 0.9332, 0.95973, 1, 1.26, 1, 1, 0.80479, 0.80178, 1, 1, 0.85633, 1, 1, 1, 1, 0.97276, 1, 1, 1, 0.698, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.14542, 1, 0.79199, 0.78694, 1.02058, 1.03493, 1.05486, 1, 1, 1.23026, 1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.20006, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26276const MyriadProBoldItalicMetrics = { 26277 lineHeight: 1.2, 26278 lineGap: 0.2 26279}; 26280const MyriadProItalicFactors = [1.36898, 1, 1, 0.65507, 0.84943, 0.85639, 0.88465, 0.88465, 0.86936, 0.88307, 0.86948, 0.85283, 0.85283, 1.06383, 1.02058, 0.75945, 0.9219, 0.75945, 1.17337, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.75945, 0.75945, 1.02058, 1.02058, 1.02058, 0.69046, 0.70926, 0.85158, 0.77812, 0.76852, 0.89591, 0.70466, 0.76125, 0.80094, 0.86822, 0.83864, 0.728, 0.77212, 0.79475, 0.93637, 0.87514, 0.8588, 0.76013, 0.8588, 0.72421, 0.69866, 0.77598, 0.85991, 0.80811, 0.87832, 0.78112, 0.77512, 0.8562, 1.0222, 1.18417, 1.0222, 1.27014, 0.89903, 1.15012, 0.93859, 0.94399, 0.846, 0.94399, 0.81453, 1.0186, 0.94219, 0.96017, 1.03075, 1.02175, 0.912, 1.03075, 0.96998, 0.96017, 0.93859, 0.94399, 0.94399, 0.95493, 0.746, 1.12658, 0.94578, 0.91, 0.979, 0.882, 0.882, 0.83, 0.85034, 0.83537, 0.85034, 1.02058, 0.70869, 0.88465, 0.88465, 0.88465, 0.88465, 0.83537, 0.90083, 1.15012, 0.9161, 0.94565, 0.73541, 1.02058, 0.53609, 0.69353, 0.79519, 1.08595, 1, 1, 1.15012, 1, 0.91974, 0.75945, 1.15012, 1, 0.9446, 0.73361, 0.9005, 0.9005, 0.9005, 0.62864, 0.85158, 0.85158, 0.85158, 0.85158, 0.85158, 0.85158, 0.773, 0.76852, 0.70466, 0.70466, 0.70466, 0.70466, 0.83864, 0.83864, 0.83864, 0.83864, 0.90561, 0.87514, 0.8588, 0.8588, 0.8588, 0.8588, 0.8588, 1.02058, 0.85751, 0.85991, 0.85991, 0.85991, 0.85991, 0.77512, 0.76013, 0.88075, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, 0.8075, 0.846, 0.81453, 0.81453, 0.81453, 0.81453, 0.82424, 0.82424, 0.82424, 0.82424, 0.9278, 0.96017, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, 1.08595, 0.8562, 0.94578, 0.94578, 0.94578, 0.94578, 0.882, 0.94578, 0.882, 0.85158, 0.93859, 0.85158, 0.93859, 0.85158, 0.93859, 0.76852, 0.846, 0.76852, 0.846, 0.76852, 0.846, 0.76852, 0.846, 0.89591, 0.8544, 0.90561, 0.94399, 0.70466, 0.81453, 0.70466, 0.81453, 0.70466, 0.81453, 0.70466, 0.81453, 0.70466, 0.81453, 0.80094, 0.94219, 0.80094, 0.94219, 0.80094, 0.94219, 1, 1, 0.86822, 0.96017, 0.86822, 0.96017, 0.83864, 0.82424, 0.83864, 0.82424, 0.83864, 0.82424, 0.83864, 1.03075, 0.83864, 0.82424, 0.81402, 1.02738, 0.728, 1.02175, 1, 1, 0.912, 0.79475, 1.03075, 1, 1, 0.79475, 0.83911, 0.79475, 0.66266, 0.80553, 1.06676, 0.87514, 0.96017, 1, 1, 0.87514, 0.96017, 0.86865, 0.87396, 0.96017, 0.8588, 0.93859, 0.8588, 0.93859, 0.8588, 0.93859, 0.867, 0.84759, 0.72421, 0.95493, 1, 1, 0.72421, 0.95493, 0.69866, 0.746, 0.69866, 0.746, 1, 1, 0.69866, 0.746, 1, 1, 0.77598, 0.88417, 0.77598, 1.12658, 0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.87832, 0.979, 0.77512, 0.882, 0.77512, 0.8562, 0.83, 0.8562, 0.83, 0.8562, 0.83, 1, 0.88465, 0.85158, 0.93859, 0.773, 0.8075, 0.85751, 0.8562, 1, 1, 0.77598, 1.12658, 1.15012, 1.15012, 1.15012, 1.15012, 1.15012, 1.15313, 1.15012, 1.15012, 1.15012, 1.08106, 1.03901, 0.85158, 0.77025, 0.62264, 0.7646, 0.65351, 0.86026, 0.69461, 0.89947, 1.03075, 0.85158, 0.77812, 0.76449, 0.88836, 0.70466, 0.8562, 0.86822, 0.8588, 0.83864, 0.77212, 0.85308, 0.93637, 0.87514, 0.82352, 0.8588, 0.85701, 0.76013, 0.89058, 0.77598, 0.8156, 0.82565, 0.78112, 0.77899, 0.89386, 0.83864, 0.8156, 0.9486, 0.92388, 0.96186, 1.03075, 0.91123, 0.9486, 0.93298, 0.878, 0.93942, 0.92388, 0.84596, 0.96186, 0.95119, 1.03075, 0.922, 0.88787, 0.95829, 0.88, 0.93559, 0.93859, 0.78815, 0.93758, 1, 0.89217, 1.03737, 0.91123, 0.93969, 0.77487, 0.85769, 0.86799, 1.03075, 0.91123, 0.93859, 0.91123, 0.86799, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.87832, 0.979, 0.87832, 0.979, 0.87832, 0.979, 0.77512, 0.882, 0.9219, 1, 0.89903, 1, 1, 1, 0.87321, 0.87321, 0.87321, 1, 1.027, 1.027, 1.027, 0.86847, 0.86847, 0.79121, 1, 1.124, 1, 1, 0.73572, 0.73572, 1, 1, 0.85034, 1, 1, 1, 1, 0.88465, 1, 1, 1, 0.669, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.04828, 1, 0.74948, 0.75187, 1.02058, 0.98391, 1.02119, 1, 1, 1.06233, 1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05233, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26281const MyriadProItalicMetrics = { 26282 lineHeight: 1.2, 26283 lineGap: 0.2 26284}; 26285const MyriadProRegularFactors = [1.36898, 1, 1, 0.76305, 0.82784, 0.94935, 0.89364, 0.92241, 0.89073, 0.90706, 0.98472, 0.85283, 0.85283, 1.0664, 1.02058, 0.74505, 0.9219, 0.74505, 1.23456, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.74505, 0.74505, 1.02058, 1.02058, 1.02058, 0.73002, 0.72601, 0.91755, 0.8126, 0.80314, 0.92222, 0.73764, 0.79726, 0.83051, 0.90284, 0.86023, 0.74, 0.8126, 0.84869, 0.96518, 0.91115, 0.8858, 0.79761, 0.8858, 0.74498, 0.73914, 0.81363, 0.89591, 0.83659, 0.89633, 0.85608, 0.8111, 0.90531, 1.0222, 1.22736, 1.0222, 1.27014, 0.89903, 0.90088, 0.86667, 1.0231, 0.896, 1.01411, 0.90083, 1.05099, 1.00512, 0.99793, 1.05326, 1.09377, 0.938, 1.06226, 1.00119, 0.99793, 0.98714, 1.0231, 1.01231, 0.98196, 0.792, 1.19137, 0.99074, 0.962, 1.01915, 0.926, 0.942, 0.856, 0.85034, 0.92006, 0.85034, 1.02058, 0.69067, 0.92241, 0.92241, 0.92241, 0.92241, 0.92006, 0.9332, 0.90088, 0.91882, 0.93484, 0.75339, 1.02058, 0.56866, 0.54324, 0.79519, 1.08595, 1, 1, 0.90088, 1, 0.95325, 0.74505, 0.90088, 1, 0.97198, 0.75339, 0.91009, 0.91009, 0.91009, 0.66466, 0.91755, 0.91755, 0.91755, 0.91755, 0.91755, 0.91755, 0.788, 0.80314, 0.73764, 0.73764, 0.73764, 0.73764, 0.86023, 0.86023, 0.86023, 0.86023, 0.92915, 0.91115, 0.8858, 0.8858, 0.8858, 0.8858, 0.8858, 1.02058, 0.8858, 0.89591, 0.89591, 0.89591, 0.89591, 0.8111, 0.79611, 0.89713, 0.86667, 0.86667, 0.86667, 0.86667, 0.86667, 0.86667, 0.86936, 0.896, 0.90083, 0.90083, 0.90083, 0.90083, 0.84224, 0.84224, 0.84224, 0.84224, 0.97276, 0.99793, 0.98714, 0.98714, 0.98714, 0.98714, 0.98714, 1.08595, 0.89876, 0.99074, 0.99074, 0.99074, 0.99074, 0.942, 1.0231, 0.942, 0.91755, 0.86667, 0.91755, 0.86667, 0.91755, 0.86667, 0.80314, 0.896, 0.80314, 0.896, 0.80314, 0.896, 0.80314, 0.896, 0.92222, 0.93372, 0.92915, 1.01411, 0.73764, 0.90083, 0.73764, 0.90083, 0.73764, 0.90083, 0.73764, 0.90083, 0.73764, 0.90083, 0.83051, 1.00512, 0.83051, 1.00512, 0.83051, 1.00512, 1, 1, 0.90284, 0.99793, 0.90976, 0.99793, 0.86023, 0.84224, 0.86023, 0.84224, 0.86023, 0.84224, 0.86023, 1.05326, 0.86023, 0.84224, 0.82873, 1.07469, 0.74, 1.09377, 1, 1, 0.938, 0.84869, 1.06226, 1, 1, 0.84869, 0.83704, 0.84869, 0.81441, 0.85588, 1.08927, 0.91115, 0.99793, 1, 1, 0.91115, 0.99793, 0.91887, 0.90991, 0.99793, 0.8858, 0.98714, 0.8858, 0.98714, 0.8858, 0.98714, 0.894, 0.91434, 0.74498, 0.98196, 1, 1, 0.74498, 0.98196, 0.73914, 0.792, 0.73914, 0.792, 1, 1, 0.73914, 0.792, 1, 1, 0.81363, 0.904, 0.81363, 1.19137, 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, 0.89633, 1.01915, 0.8111, 0.942, 0.8111, 0.90531, 0.856, 0.90531, 0.856, 0.90531, 0.856, 1, 0.92241, 0.91755, 0.86667, 0.788, 0.86936, 0.8858, 0.89876, 1, 1, 0.81363, 1.19137, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90388, 1.03901, 0.92138, 0.78105, 0.7154, 0.86169, 0.80513, 0.94007, 0.82528, 0.98612, 1.06226, 0.91755, 0.8126, 0.81884, 0.92819, 0.73764, 0.90531, 0.90284, 0.8858, 0.86023, 0.8126, 0.91172, 0.96518, 0.91115, 0.83089, 0.8858, 0.87791, 0.79761, 0.89297, 0.81363, 0.88157, 0.89992, 0.85608, 0.81992, 0.94307, 0.86023, 0.88157, 0.95308, 0.98699, 0.99793, 1.06226, 0.95817, 0.95308, 0.97358, 0.928, 0.98088, 0.98699, 0.92761, 0.99793, 0.96017, 1.06226, 0.986, 0.944, 0.95978, 0.938, 0.96705, 0.98714, 0.80442, 0.98972, 1, 0.89762, 1.04552, 0.95817, 0.99007, 0.87064, 0.91879, 0.88888, 1.06226, 0.95817, 0.98714, 0.95817, 0.88888, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.89633, 1.01915, 0.89633, 1.01915, 0.89633, 1.01915, 0.8111, 0.942, 0.9219, 1, 0.89903, 1, 1, 1, 0.93173, 0.93173, 0.93173, 1, 1.06304, 1.06304, 1.06904, 0.89903, 0.89903, 0.80549, 1, 1.156, 1, 1, 0.76575, 0.76575, 1, 1, 0.72458, 1, 1, 1, 1, 0.92241, 1, 1, 1, 0.619, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.07257, 1, 0.74705, 0.71119, 1.02058, 1.024, 1.02119, 1, 1, 1.1536, 1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05638, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26286const MyriadProRegularMetrics = { 26287 lineHeight: 1.2, 26288 lineGap: 0.2 26289}; 26290 26291;// ./src/core/segoeui_factors.js 26292const SegoeuiBoldFactors = [1.76738, 1, 1, 0.99297, 0.9824, 1.04016, 1.06497, 1.03424, 0.97529, 1.17647, 1.23203, 1.1085, 1.1085, 1.16939, 1.2107, 0.9754, 1.21408, 0.9754, 1.59578, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 0.81378, 0.81378, 1.2107, 1.2107, 1.2107, 0.71703, 0.97847, 0.97363, 0.88776, 0.8641, 1.02096, 0.79795, 0.85132, 0.914, 1.06085, 1.1406, 0.8007, 0.89858, 0.83693, 1.14889, 1.09398, 0.97489, 0.92094, 0.97489, 0.90399, 0.84041, 0.95923, 1.00135, 1, 1.06467, 0.98243, 0.90996, 0.99361, 1.1085, 1.56942, 1.1085, 1.2107, 0.74627, 0.94282, 0.96752, 1.01519, 0.86304, 1.01359, 0.97278, 1.15103, 1.01359, 0.98561, 1.02285, 1.02285, 1.00527, 1.02285, 1.0302, 0.99041, 1.0008, 1.01519, 1.01359, 1.02258, 0.79104, 1.16862, 0.99041, 0.97454, 1.02511, 0.99298, 0.96752, 0.95801, 0.94856, 1.16579, 0.94856, 1.2107, 0.9824, 1.03424, 1.03424, 1, 1.03424, 1.16579, 0.8727, 1.3871, 1.18622, 1.10818, 1.04478, 1.2107, 1.18622, 0.75155, 0.94994, 1.28826, 1.21408, 1.21408, 0.91056, 1, 0.91572, 0.9754, 0.64663, 1.18328, 1.24866, 1.04478, 1.14169, 1.15749, 1.17389, 0.71703, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.93506, 0.8641, 0.79795, 0.79795, 0.79795, 0.79795, 1.1406, 1.1406, 1.1406, 1.1406, 1.02096, 1.09398, 0.97426, 0.97426, 0.97426, 0.97426, 0.97426, 1.2107, 0.97489, 1.00135, 1.00135, 1.00135, 1.00135, 0.90996, 0.92094, 1.02798, 0.96752, 0.96752, 0.96752, 0.96752, 0.96752, 0.96752, 0.93136, 0.86304, 0.97278, 0.97278, 0.97278, 0.97278, 1.02285, 1.02285, 1.02285, 1.02285, 0.97122, 0.99041, 1, 1, 1, 1, 1, 1.28826, 1.0008, 0.99041, 0.99041, 0.99041, 0.99041, 0.96752, 1.01519, 0.96752, 0.97363, 0.96752, 0.97363, 0.96752, 0.97363, 0.96752, 0.8641, 0.86304, 0.8641, 0.86304, 0.8641, 0.86304, 0.8641, 0.86304, 1.02096, 1.03057, 1.02096, 1.03517, 0.79795, 0.97278, 0.79795, 0.97278, 0.79795, 0.97278, 0.79795, 0.97278, 0.79795, 0.97278, 0.914, 1.01359, 0.914, 1.01359, 0.914, 1.01359, 1, 1, 1.06085, 0.98561, 1.06085, 1.00879, 1.1406, 1.02285, 1.1406, 1.02285, 1.1406, 1.02285, 1.1406, 1.02285, 1.1406, 1.02285, 0.97138, 1.08692, 0.8007, 1.02285, 1, 1, 1.00527, 0.83693, 1.02285, 1, 1, 0.83693, 0.9455, 0.83693, 0.90418, 0.83693, 1.13005, 1.09398, 0.99041, 1, 1, 1.09398, 0.99041, 0.96692, 1.09251, 0.99041, 0.97489, 1.0008, 0.97489, 1.0008, 0.97489, 1.0008, 0.93994, 0.97931, 0.90399, 1.02258, 1, 1, 0.90399, 1.02258, 0.84041, 0.79104, 0.84041, 0.79104, 0.84041, 0.79104, 0.84041, 0.79104, 1, 1, 0.95923, 1.07034, 0.95923, 1.16862, 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, 1.06467, 1.02511, 0.90996, 0.96752, 0.90996, 0.99361, 0.95801, 0.99361, 0.95801, 0.99361, 0.95801, 1.07733, 1.03424, 0.97363, 0.96752, 0.93506, 0.93136, 0.97489, 1.0008, 1, 1, 0.95923, 1.16862, 1.15103, 1.15103, 1.01173, 1.03959, 0.75953, 0.81378, 0.79912, 1.15103, 1.21994, 0.95161, 0.87815, 1.01149, 0.81525, 0.7676, 0.98167, 1.01134, 1.02546, 0.84097, 1.03089, 1.18102, 0.97363, 0.88776, 0.85134, 0.97826, 0.79795, 0.99361, 1.06085, 0.97489, 1.1406, 0.89858, 1.0388, 1.14889, 1.09398, 0.86039, 0.97489, 1.0595, 0.92094, 0.94793, 0.95923, 0.90996, 0.99346, 0.98243, 1.02112, 0.95493, 1.1406, 0.90996, 1.03574, 1.02597, 1.0008, 1.18102, 1.06628, 1.03574, 1.0192, 1.01932, 1.00886, 0.97531, 1.0106, 1.0008, 1.13189, 1.18102, 1.02277, 0.98683, 1.0016, 0.99561, 1.07237, 1.0008, 0.90434, 0.99921, 0.93803, 0.8965, 1.23085, 1.06628, 1.04983, 0.96268, 1.0499, 0.98439, 1.18102, 1.06628, 1.0008, 1.06628, 0.98439, 0.79795, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.09466, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.97278, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.02065, 1, 1, 1, 1, 1, 1, 1.06467, 1.02511, 1.06467, 1.02511, 1.06467, 1.02511, 0.90996, 0.96752, 1, 1.21408, 0.89903, 1, 1, 0.75155, 1.04394, 1.04394, 1.04394, 1.04394, 0.98633, 0.98633, 0.98633, 0.73047, 0.73047, 1.20642, 0.91211, 1.25635, 1.222, 1.02956, 1.03372, 1.03372, 0.96039, 1.24633, 1, 1.12454, 0.93503, 1.03424, 1.19687, 1.03424, 1, 1, 1, 0.771, 1, 1, 1.15749, 1.15749, 1.15749, 1.10948, 0.86279, 0.94434, 0.86279, 0.94434, 0.86182, 1, 1, 1.16897, 1, 0.96085, 0.90137, 1.2107, 1.18416, 1.13973, 0.69825, 0.9716, 2.10339, 1.29004, 1.29004, 1.21172, 1.29004, 1.29004, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, 1.18874, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.09193, 1.09193, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26293const SegoeuiBoldMetrics = { 26294 lineHeight: 1.33008, 26295 lineGap: 0 26296}; 26297const SegoeuiBoldItalicFactors = [1.76738, 1, 1, 0.98946, 1.03959, 1.04016, 1.02809, 1.036, 0.97639, 1.10953, 1.23203, 1.11144, 1.11144, 1.16939, 1.21237, 0.9754, 1.21261, 0.9754, 1.59754, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 0.81378, 0.81378, 1.21237, 1.21237, 1.21237, 0.73541, 0.97847, 0.97363, 0.89723, 0.87897, 1.0426, 0.79429, 0.85292, 0.91149, 1.05815, 1.1406, 0.79631, 0.90128, 0.83853, 1.04396, 1.10615, 0.97552, 0.94436, 0.97552, 0.88641, 0.80527, 0.96083, 1.00135, 1, 1.06777, 0.9817, 0.91142, 0.99361, 1.11144, 1.57293, 1.11144, 1.21237, 0.74627, 1.31818, 1.06585, 0.97042, 0.83055, 0.97042, 0.93503, 1.1261, 0.97042, 0.97922, 1.14236, 0.94552, 1.01054, 1.14236, 1.02471, 0.97922, 0.94165, 0.97042, 0.97042, 1.0276, 0.78929, 1.1261, 0.97922, 0.95874, 1.02197, 0.98507, 0.96752, 0.97168, 0.95107, 1.16579, 0.95107, 1.21237, 1.03959, 1.036, 1.036, 1, 1.036, 1.16579, 0.87357, 1.31818, 1.18754, 1.26781, 1.05356, 1.21237, 1.18622, 0.79487, 0.94994, 1.29004, 1.24047, 1.24047, 1.31818, 1, 0.91484, 0.9754, 1.31818, 1.1349, 1.24866, 1.05356, 1.13934, 1.15574, 1.17389, 0.73541, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.94385, 0.87897, 0.79429, 0.79429, 0.79429, 0.79429, 1.1406, 1.1406, 1.1406, 1.1406, 1.0426, 1.10615, 0.97552, 0.97552, 0.97552, 0.97552, 0.97552, 1.21237, 0.97552, 1.00135, 1.00135, 1.00135, 1.00135, 0.91142, 0.94436, 0.98721, 1.06585, 1.06585, 1.06585, 1.06585, 1.06585, 1.06585, 0.96705, 0.83055, 0.93503, 0.93503, 0.93503, 0.93503, 1.14236, 1.14236, 1.14236, 1.14236, 0.93125, 0.97922, 0.94165, 0.94165, 0.94165, 0.94165, 0.94165, 1.29004, 0.94165, 0.97922, 0.97922, 0.97922, 0.97922, 0.96752, 0.97042, 0.96752, 0.97363, 1.06585, 0.97363, 1.06585, 0.97363, 1.06585, 0.87897, 0.83055, 0.87897, 0.83055, 0.87897, 0.83055, 0.87897, 0.83055, 1.0426, 1.0033, 1.0426, 0.97042, 0.79429, 0.93503, 0.79429, 0.93503, 0.79429, 0.93503, 0.79429, 0.93503, 0.79429, 0.93503, 0.91149, 0.97042, 0.91149, 0.97042, 0.91149, 0.97042, 1, 1, 1.05815, 0.97922, 1.05815, 0.97922, 1.1406, 1.14236, 1.1406, 1.14236, 1.1406, 1.14236, 1.1406, 1.14236, 1.1406, 1.14236, 0.97441, 1.04302, 0.79631, 1.01582, 1, 1, 1.01054, 0.83853, 1.14236, 1, 1, 0.83853, 1.09125, 0.83853, 0.90418, 0.83853, 1.19508, 1.10615, 0.97922, 1, 1, 1.10615, 0.97922, 1.01034, 1.10466, 0.97922, 0.97552, 0.94165, 0.97552, 0.94165, 0.97552, 0.94165, 0.91602, 0.91981, 0.88641, 1.0276, 1, 1, 0.88641, 1.0276, 0.80527, 0.78929, 0.80527, 0.78929, 0.80527, 0.78929, 0.80527, 0.78929, 1, 1, 0.96083, 1.05403, 0.95923, 1.16862, 1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.06777, 1.02197, 0.91142, 0.96752, 0.91142, 0.99361, 0.97168, 0.99361, 0.97168, 0.99361, 0.97168, 1.23199, 1.036, 0.97363, 1.06585, 0.94385, 0.96705, 0.97552, 0.94165, 1, 1, 0.96083, 1.1261, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 0.95161, 1.27126, 1.00811, 0.83284, 0.77702, 0.99137, 0.95253, 1.0347, 0.86142, 1.07205, 1.14236, 0.97363, 0.89723, 0.86869, 1.09818, 0.79429, 0.99361, 1.05815, 0.97552, 1.1406, 0.90128, 1.06662, 1.04396, 1.10615, 0.84918, 0.97552, 1.04694, 0.94436, 0.98015, 0.96083, 0.91142, 1.00356, 0.9817, 1.01945, 0.98999, 1.1406, 0.91142, 1.04961, 0.9898, 1.00639, 1.14236, 1.07514, 1.04961, 0.99607, 1.02897, 1.008, 0.9898, 0.95134, 1.00639, 1.11121, 1.14236, 1.00518, 0.97981, 1.02186, 1, 1.08578, 0.94165, 0.99314, 0.98387, 0.93028, 0.93377, 1.35125, 1.07514, 1.10687, 0.93491, 1.04232, 1.00351, 1.14236, 1.07514, 0.94165, 1.07514, 1.00351, 0.79429, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.09097, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.93503, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.96609, 1, 1, 1, 1, 1, 1, 1.06777, 1.02197, 1.06777, 1.02197, 1.06777, 1.02197, 0.91142, 0.96752, 1, 1.21261, 0.89903, 1, 1, 0.75155, 1.04745, 1.04745, 1.04745, 1.04394, 0.98633, 0.98633, 0.98633, 0.72959, 0.72959, 1.20502, 0.91406, 1.26514, 1.222, 1.02956, 1.03372, 1.03372, 0.96039, 1.24633, 1, 1.09125, 0.93327, 1.03336, 1.16541, 1.036, 1, 1, 1, 0.771, 1, 1, 1.15574, 1.15574, 1.15574, 1.15574, 0.86364, 0.94434, 0.86279, 0.94434, 0.86224, 1, 1, 1.16798, 1, 0.96085, 0.90068, 1.21237, 1.18416, 1.13904, 0.69825, 0.9716, 2.10339, 1.29004, 1.29004, 1.21339, 1.29004, 1.29004, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, 1.18775, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.13269, 1.13269, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26298const SegoeuiBoldItalicMetrics = { 26299 lineHeight: 1.33008, 26300 lineGap: 0 26301}; 26302const SegoeuiItalicFactors = [1.76738, 1, 1, 0.98946, 1.14763, 1.05365, 1.06234, 0.96927, 0.92586, 1.15373, 1.18414, 0.91349, 0.91349, 1.07403, 1.17308, 0.78383, 1.20088, 0.78383, 1.42531, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.78383, 0.78383, 1.17308, 1.17308, 1.17308, 0.77349, 0.94565, 0.94729, 0.85944, 0.88506, 0.9858, 0.74817, 0.80016, 0.88449, 0.98039, 0.95782, 0.69238, 0.89898, 0.83231, 0.98183, 1.03989, 0.96924, 0.86237, 0.96924, 0.80595, 0.74524, 0.86091, 0.95402, 0.94143, 0.98448, 0.8858, 0.83089, 0.93285, 1.0949, 1.39016, 1.0949, 1.45994, 0.74627, 1.04839, 0.97454, 0.97454, 0.87207, 0.97454, 0.87533, 1.06151, 0.97454, 1.00176, 1.16484, 1.08132, 0.98047, 1.16484, 1.02989, 1.01054, 0.96225, 0.97454, 0.97454, 1.06598, 0.79004, 1.16344, 1.00351, 0.94629, 0.9973, 0.91016, 0.96777, 0.9043, 0.91082, 0.92481, 0.91082, 1.17308, 0.95748, 0.96927, 0.96927, 1, 0.96927, 0.92481, 0.80597, 1.04839, 1.23393, 1.1781, 0.9245, 1.17308, 1.20808, 0.63218, 0.94261, 1.24822, 1.09971, 1.09971, 1.04839, 1, 0.85273, 0.78032, 1.04839, 1.09971, 1.22326, 0.9245, 1.09836, 1.13525, 1.15222, 0.70424, 0.94729, 0.94729, 0.94729, 0.94729, 0.94729, 0.94729, 0.85498, 0.88506, 0.74817, 0.74817, 0.74817, 0.74817, 0.95782, 0.95782, 0.95782, 0.95782, 0.9858, 1.03989, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, 1.17308, 0.96924, 0.95402, 0.95402, 0.95402, 0.95402, 0.83089, 0.86237, 0.88409, 0.97454, 0.97454, 0.97454, 0.97454, 0.97454, 0.97454, 0.92916, 0.87207, 0.87533, 0.87533, 0.87533, 0.87533, 0.93146, 0.93146, 0.93146, 0.93146, 0.93854, 1.01054, 0.96225, 0.96225, 0.96225, 0.96225, 0.96225, 1.24822, 0.8761, 1.00351, 1.00351, 1.00351, 1.00351, 0.96777, 0.97454, 0.96777, 0.94729, 0.97454, 0.94729, 0.97454, 0.94729, 0.97454, 0.88506, 0.87207, 0.88506, 0.87207, 0.88506, 0.87207, 0.88506, 0.87207, 0.9858, 0.95391, 0.9858, 0.97454, 0.74817, 0.87533, 0.74817, 0.87533, 0.74817, 0.87533, 0.74817, 0.87533, 0.74817, 0.87533, 0.88449, 0.97454, 0.88449, 0.97454, 0.88449, 0.97454, 1, 1, 0.98039, 1.00176, 0.98039, 1.00176, 0.95782, 0.93146, 0.95782, 0.93146, 0.95782, 0.93146, 0.95782, 1.16484, 0.95782, 0.93146, 0.84421, 1.12761, 0.69238, 1.08132, 1, 1, 0.98047, 0.83231, 1.16484, 1, 1, 0.84723, 1.04861, 0.84723, 0.78755, 0.83231, 1.23736, 1.03989, 1.01054, 1, 1, 1.03989, 1.01054, 0.9857, 1.03849, 1.01054, 0.96924, 0.96225, 0.96924, 0.96225, 0.96924, 0.96225, 0.92383, 0.90171, 0.80595, 1.06598, 1, 1, 0.80595, 1.06598, 0.74524, 0.79004, 0.74524, 0.79004, 0.74524, 0.79004, 0.74524, 0.79004, 1, 1, 0.86091, 1.02759, 0.85771, 1.16344, 0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.98448, 0.9973, 0.83089, 0.96777, 0.83089, 0.93285, 0.9043, 0.93285, 0.9043, 0.93285, 0.9043, 1.31868, 0.96927, 0.94729, 0.97454, 0.85498, 0.92916, 0.96924, 0.8761, 1, 1, 0.86091, 1.16344, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 0.81965, 0.81965, 0.94729, 0.78032, 0.71022, 0.90883, 0.84171, 0.99877, 0.77596, 1.05734, 1.2, 0.94729, 0.85944, 0.82791, 0.9607, 0.74817, 0.93285, 0.98039, 0.96924, 0.95782, 0.89898, 0.98316, 0.98183, 1.03989, 0.78614, 0.96924, 0.97642, 0.86237, 0.86075, 0.86091, 0.83089, 0.90082, 0.8858, 0.97296, 1.01284, 0.95782, 0.83089, 1.0976, 1.04, 1.03342, 1.2, 1.0675, 1.0976, 0.98205, 1.03809, 1.05097, 1.04, 0.95364, 1.03342, 1.05401, 1.2, 1.02148, 1.0119, 1.04724, 1.0127, 1.02732, 0.96225, 0.8965, 0.97783, 0.93574, 0.94818, 1.30679, 1.0675, 1.11826, 0.99821, 1.0557, 1.0326, 1.2, 1.0675, 0.96225, 1.0675, 1.0326, 0.74817, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.03754, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.87533, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.98705, 1, 1, 1, 1, 1, 1, 0.98448, 0.9973, 0.98448, 0.9973, 0.98448, 0.9973, 0.83089, 0.96777, 1, 1.20088, 0.89903, 1, 1, 0.75155, 0.94945, 0.94945, 0.94945, 0.94945, 1.12317, 1.12317, 1.12317, 0.67603, 0.67603, 1.15621, 0.73584, 1.21191, 1.22135, 1.06483, 0.94868, 0.94868, 0.95996, 1.24633, 1, 1.07497, 0.87709, 0.96927, 1.01473, 0.96927, 1, 1, 1, 0.77295, 1, 1, 1.09836, 1.09836, 1.09836, 1.01522, 0.86321, 0.94434, 0.8649, 0.94434, 0.86182, 1, 1, 1.083, 1, 0.91578, 0.86438, 1.17308, 1.18416, 1.14589, 0.69825, 0.97622, 1.96791, 1.24822, 1.24822, 1.17308, 1.24822, 1.24822, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, 1.17984, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.10742, 1.10742, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26303const SegoeuiItalicMetrics = { 26304 lineHeight: 1.33008, 26305 lineGap: 0 26306}; 26307const SegoeuiRegularFactors = [1.76738, 1, 1, 0.98594, 1.02285, 1.10454, 1.06234, 0.96927, 0.92037, 1.19985, 1.2046, 0.90616, 0.90616, 1.07152, 1.1714, 0.78032, 1.20088, 0.78032, 1.40246, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.78032, 0.78032, 1.1714, 1.1714, 1.1714, 0.80597, 0.94084, 0.96706, 0.85944, 0.85734, 0.97093, 0.75842, 0.79936, 0.88198, 0.9831, 0.95782, 0.71387, 0.86969, 0.84636, 1.07796, 1.03584, 0.96924, 0.83968, 0.96924, 0.82826, 0.79649, 0.85771, 0.95132, 0.93119, 0.98965, 0.88433, 0.8287, 0.93365, 1.08612, 1.3638, 1.08612, 1.45786, 0.74627, 0.80499, 0.91484, 1.05707, 0.92383, 1.05882, 0.9403, 1.12654, 1.05882, 1.01756, 1.09011, 1.09011, 0.99414, 1.09011, 1.034, 1.01756, 1.05356, 1.05707, 1.05882, 1.04399, 0.84863, 1.21968, 1.01756, 0.95801, 1.00068, 0.91797, 0.96777, 0.9043, 0.90351, 0.92105, 0.90351, 1.1714, 0.85337, 0.96927, 0.96927, 0.99912, 0.96927, 0.92105, 0.80597, 1.2434, 1.20808, 1.05937, 0.90957, 1.1714, 1.20808, 0.75155, 0.94261, 1.24644, 1.09971, 1.09971, 0.84751, 1, 0.85273, 0.78032, 0.61584, 1.05425, 1.17914, 0.90957, 1.08665, 1.11593, 1.14169, 0.73381, 0.96706, 0.96706, 0.96706, 0.96706, 0.96706, 0.96706, 0.86035, 0.85734, 0.75842, 0.75842, 0.75842, 0.75842, 0.95782, 0.95782, 0.95782, 0.95782, 0.97093, 1.03584, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, 1.1714, 0.96924, 0.95132, 0.95132, 0.95132, 0.95132, 0.8287, 0.83968, 0.89049, 0.91484, 0.91484, 0.91484, 0.91484, 0.91484, 0.91484, 0.93575, 0.92383, 0.9403, 0.9403, 0.9403, 0.9403, 0.8717, 0.8717, 0.8717, 0.8717, 1.00527, 1.01756, 1.05356, 1.05356, 1.05356, 1.05356, 1.05356, 1.24644, 0.95923, 1.01756, 1.01756, 1.01756, 1.01756, 0.96777, 1.05707, 0.96777, 0.96706, 0.91484, 0.96706, 0.91484, 0.96706, 0.91484, 0.85734, 0.92383, 0.85734, 0.92383, 0.85734, 0.92383, 0.85734, 0.92383, 0.97093, 1.0969, 0.97093, 1.05882, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842, 0.9403, 0.88198, 1.05882, 0.88198, 1.05882, 0.88198, 1.05882, 1, 1, 0.9831, 1.01756, 0.9831, 1.01756, 0.95782, 0.8717, 0.95782, 0.8717, 0.95782, 0.8717, 0.95782, 1.09011, 0.95782, 0.8717, 0.84784, 1.11551, 0.71387, 1.09011, 1, 1, 0.99414, 0.84636, 1.09011, 1, 1, 0.84636, 1.0536, 0.84636, 0.94298, 0.84636, 1.23297, 1.03584, 1.01756, 1, 1, 1.03584, 1.01756, 1.00323, 1.03444, 1.01756, 0.96924, 1.05356, 0.96924, 1.05356, 0.96924, 1.05356, 0.93066, 0.98293, 0.82826, 1.04399, 1, 1, 0.82826, 1.04399, 0.79649, 0.84863, 0.79649, 0.84863, 0.79649, 0.84863, 0.79649, 0.84863, 1, 1, 0.85771, 1.17318, 0.85771, 1.21968, 0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, 0.98965, 1.00068, 0.8287, 0.96777, 0.8287, 0.93365, 0.9043, 0.93365, 0.9043, 0.93365, 0.9043, 1.08571, 0.96927, 0.96706, 0.91484, 0.86035, 0.93575, 0.96924, 0.95923, 1, 1, 0.85771, 1.21968, 1.11437, 1.11437, 0.93109, 0.91202, 0.60411, 0.84164, 0.55572, 1.01173, 0.97361, 0.81818, 0.81818, 0.96635, 0.78032, 0.72727, 0.92366, 0.98601, 1.03405, 0.77968, 1.09799, 1.2,
vendor: 8,355 bytes, lines 26307-26511
263070.96706, 0.85944, 0.85638, 0.96491, 0.75842, 0.93365, 0.9831, 0.96924, 0.95782, 0.86969, 0.94152, 1.07796, 1.03584, 0.78437, 0.96924, 0.98715, 0.83968, 0.83491, 0.85771, 0.8287, 0.94492, 0.88433, 0.9287, 1.0098, 0.95782, 0.8287, 1.0625, 0.98248, 1.03424, 1.2, 1.01071, 1.0625, 0.95246, 1.03809, 1.04912, 0.98248, 1.00221, 1.03424, 1.05443, 1.2, 1.04785, 0.99609, 1.00169, 1.05176, 0.99346, 1.05356, 0.9087, 1.03004, 0.95542, 0.93117, 1.23362, 1.01071, 1.07831, 1.02512, 1.05205, 1.03502, 1.2, 1.01071, 1.05356, 1.01071, 1.03502, 0.75842, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.03719, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.9403, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.04021, 1, 1, 1, 1, 1, 1, 0.98965, 1.00068, 0.98965, 1.00068, 0.98965, 1.00068, 0.8287, 0.96777, 1, 1.20088, 0.89903, 1, 1, 0.75155, 1.03077, 1.03077, 1.03077, 1.03077, 1.13196, 1.13196, 1.13196, 0.67428, 0.67428, 1.16039, 0.73291, 1.20996, 1.22135, 1.06483, 0.94868, 0.94868, 0.95996, 1.24633, 1, 1.07497, 0.87796, 0.96927, 1.01518, 0.96927, 1, 1, 1, 0.77295, 1, 1, 1.10539, 1.10539, 1.11358, 1.06967, 0.86279, 0.94434, 0.86279, 0.94434, 0.86182, 1, 1, 1.083, 1, 0.91578, 0.86507, 1.1714, 1.18416, 1.14589, 0.69825, 0.97622, 1.9697, 1.24822, 1.24822, 1.17238, 1.24822, 1.24822, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, 1.18083, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.10938, 1.10938, 1, 1, 1, 1.05425, 1.09971, 1.09971, 1.09971, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26308const SegoeuiRegularMetrics = { 26309 lineHeight: 1.33008, 26310 lineGap: 0 26311}; 26312 26313;// ./src/core/xfa_fonts.js 26314 26315 26316 26317 26318 26319 26320 26321 26322const getXFAFontMap = getLookupTableFactory(function (t) { 26323 t["MyriadPro-Regular"] = t["PdfJS-Fallback-Regular"] = { 26324 name: "LiberationSans-Regular", 26325 factors: MyriadProRegularFactors, 26326 baseWidths: LiberationSansRegularWidths, 26327 baseMapping: LiberationSansRegularMapping, 26328 metrics: MyriadProRegularMetrics 26329 }; 26330 t["MyriadPro-Bold"] = t["PdfJS-Fallback-Bold"] = { 26331 name: "LiberationSans-Bold", 26332 factors: MyriadProBoldFactors, 26333 baseWidths: LiberationSansBoldWidths, 26334 baseMapping: LiberationSansBoldMapping, 26335 metrics: MyriadProBoldMetrics 26336 }; 26337 t["MyriadPro-It"] = t["MyriadPro-Italic"] = t["PdfJS-Fallback-Italic"] = { 26338 name: "LiberationSans-Italic", 26339 factors: MyriadProItalicFactors, 26340 baseWidths: LiberationSansItalicWidths, 26341 baseMapping: LiberationSansItalicMapping, 26342 metrics: MyriadProItalicMetrics 26343 }; 26344 t["MyriadPro-BoldIt"] = t["MyriadPro-BoldItalic"] = t["PdfJS-Fallback-BoldItalic"] = { 26345 name: "LiberationSans-BoldItalic", 26346 factors: MyriadProBoldItalicFactors, 26347 baseWidths: LiberationSansBoldItalicWidths, 26348 baseMapping: LiberationSansBoldItalicMapping, 26349 metrics: MyriadProBoldItalicMetrics 26350 }; 26351 t.ArialMT = t.Arial = t["Arial-Regular"] = { 26352 name: "LiberationSans-Regular", 26353 baseWidths: LiberationSansRegularWidths, 26354 baseMapping: LiberationSansRegularMapping 26355 }; 26356 t["Arial-BoldMT"] = t["Arial-Bold"] = { 26357 name: "LiberationSans-Bold", 26358 baseWidths: LiberationSansBoldWidths, 26359 baseMapping: LiberationSansBoldMapping 26360 }; 26361 t["Arial-ItalicMT"] = t["Arial-Italic"] = { 26362 name: "LiberationSans-Italic", 26363 baseWidths: LiberationSansItalicWidths, 26364 baseMapping: LiberationSansItalicMapping 26365 }; 26366 t["Arial-BoldItalicMT"] = t["Arial-BoldItalic"] = { 26367 name: "LiberationSans-BoldItalic", 26368 baseWidths: LiberationSansBoldItalicWidths, 26369 baseMapping: LiberationSansBoldItalicMapping 26370 }; 26371 t["Calibri-Regular"] = { 26372 name: "LiberationSans-Regular", 26373 factors: CalibriRegularFactors, 26374 baseWidths: LiberationSansRegularWidths, 26375 baseMapping: LiberationSansRegularMapping, 26376 metrics: CalibriRegularMetrics 26377 }; 26378 t["Calibri-Bold"] = { 26379 name: "LiberationSans-Bold", 26380 factors: CalibriBoldFactors, 26381 baseWidths: LiberationSansBoldWidths, 26382 baseMapping: LiberationSansBoldMapping, 26383 metrics: CalibriBoldMetrics 26384 }; 26385 t["Calibri-Italic"] = { 26386 name: "LiberationSans-Italic", 26387 factors: CalibriItalicFactors, 26388 baseWidths: LiberationSansItalicWidths, 26389 baseMapping: LiberationSansItalicMapping, 26390 metrics: CalibriItalicMetrics 26391 }; 26392 t["Calibri-BoldItalic"] = { 26393 name: "LiberationSans-BoldItalic", 26394 factors: CalibriBoldItalicFactors, 26395 baseWidths: LiberationSansBoldItalicWidths, 26396 baseMapping: LiberationSansBoldItalicMapping, 26397 metrics: CalibriBoldItalicMetrics 26398 }; 26399 t["Segoeui-Regular"] = { 26400 name: "LiberationSans-Regular", 26401 factors: SegoeuiRegularFactors, 26402 baseWidths: LiberationSansRegularWidths, 26403 baseMapping: LiberationSansRegularMapping, 26404 metrics: SegoeuiRegularMetrics 26405 }; 26406 t["Segoeui-Bold"] = { 26407 name: "LiberationSans-Bold", 26408 factors: SegoeuiBoldFactors, 26409 baseWidths: LiberationSansBoldWidths, 26410 baseMapping: LiberationSansBoldMapping, 26411 metrics: SegoeuiBoldMetrics 26412 }; 26413 t["Segoeui-Italic"] = { 26414 name: "LiberationSans-Italic", 26415 factors: SegoeuiItalicFactors, 26416 baseWidths: LiberationSansItalicWidths, 26417 baseMapping: LiberationSansItalicMapping, 26418 metrics: SegoeuiItalicMetrics 26419 }; 26420 t["Segoeui-BoldItalic"] = { 26421 name: "LiberationSans-BoldItalic", 26422 factors: SegoeuiBoldItalicFactors, 26423 baseWidths: LiberationSansBoldItalicWidths, 26424 baseMapping: LiberationSansBoldItalicMapping, 26425 metrics: SegoeuiBoldItalicMetrics 26426 }; 26427 t["Helvetica-Regular"] = t.Helvetica = { 26428 name: "LiberationSans-Regular", 26429 factors: HelveticaRegularFactors, 26430 baseWidths: LiberationSansRegularWidths, 26431 baseMapping: LiberationSansRegularMapping, 26432 metrics: HelveticaRegularMetrics 26433 }; 26434 t["Helvetica-Bold"] = { 26435 name: "LiberationSans-Bold", 26436 factors: HelveticaBoldFactors, 26437 baseWidths: LiberationSansBoldWidths, 26438 baseMapping: LiberationSansBoldMapping, 26439 metrics: HelveticaBoldMetrics 26440 }; 26441 t["Helvetica-Italic"] = { 26442 name: "LiberationSans-Italic", 26443 factors: HelveticaItalicFactors, 26444 baseWidths: LiberationSansItalicWidths, 26445 baseMapping: LiberationSansItalicMapping, 26446 metrics: HelveticaItalicMetrics 26447 }; 26448 t["Helvetica-BoldItalic"] = { 26449 name: "LiberationSans-BoldItalic", 26450 factors: HelveticaBoldItalicFactors, 26451 baseWidths: LiberationSansBoldItalicWidths, 26452 baseMapping: LiberationSansBoldItalicMapping, 26453 metrics: HelveticaBoldItalicMetrics 26454 }; 26455}); 26456function getXfaFontName(name) { 26457 const fontName = normalizeFontName(name); 26458 const fontMap = getXFAFontMap(); 26459 return fontMap[fontName]; 26460} 26461function getXfaFontWidths(name) { 26462 const info = getXfaFontName(name); 26463 if (!info) { 26464 return null; 26465 } 26466 const { 26467 baseWidths, 26468 baseMapping, 26469 factors 26470 } = info; 26471 const rescaledBaseWidths = !factors ? baseWidths : baseWidths.map((w, i) => w * factors[i]); 26472 let currentCode = -2; 26473 let currentArray; 26474 const newWidths = []; 26475 for (const [unicode, glyphIndex] of baseMapping.map((charUnicode, index) => [charUnicode, index]).sort(([unicode1], [unicode2]) => unicode1 - unicode2)) { 26476 if (unicode === -1) { 26477 continue; 26478 } 26479 if (unicode === currentCode + 1) { 26480 currentArray.push(rescaledBaseWidths[glyphIndex]); 26481 currentCode += 1; 26482 } else { 26483 currentCode = unicode; 26484 currentArray = [rescaledBaseWidths[glyphIndex]]; 26485 newWidths.push(unicode, currentArray); 26486 } 26487 } 26488 return newWidths; 26489} 26490function getXfaFontDict(name) { 26491 const widths = getXfaFontWidths(name); 26492 const dict = new Dict(null); 26493 dict.set("BaseFont", Name.get(name)); 26494 dict.set("Type", Name.get("Font")); 26495 dict.set("Subtype", Name.get("CIDFontType2")); 26496 dict.set("Encoding", Name.get("Identity-H")); 26497 dict.set("CIDToGIDMap", Name.get("Identity")); 26498 dict.set("W", widths); 26499 dict.set("FirstChar", widths[0]); 26500 dict.set("LastChar", widths.at(-2) + widths.at(-1).length - 1); 26501 const descriptor = new Dict(null); 26502 dict.set("FontDescriptor", descriptor); 26503 const systemInfo = new Dict(null); 26504 systemInfo.set("Ordering", "Identity"); 26505 systemInfo.set("Registry", "Adobe"); 26506 systemInfo.set("Supplement", 0); 26507 dict.set("CIDSystemInfo", systemInfo); 26508 return dict; 26509} 26510 26511;// ./src/core/p
26511s_parser.js
vendor: 5,083 bytes, lines 26511-26702
26511 26512 26513 26514 26515class PostScriptParser { 26516 constructor(lexer) { 26517 this.lexer = lexer; 26518 this.operators = []; 26519 this.token = null; 26520 this.prev = null; 26521 } 26522 nextToken() { 26523 this.prev = this.token; 26524 this.token = this.lexer.getToken(); 26525 } 26526 accept(type) { 26527 if (this.token.type === type) { 26528 this.nextToken(); 26529 return true; 26530 } 26531 return false; 26532 } 26533 expect(type) { 26534 if (this.accept(type)) { 26535 return true; 26536 } 26537 throw new FormatError(`Unexpected symbol: found ${this.token.type} expected ${type}.`); 26538 } 26539 parse() { 26540 this.nextToken(); 26541 this.expect(PostScriptTokenTypes.LBRACE); 26542 this.parseBlock(); 26543 this.expect(PostScriptTokenTypes.RBRACE); 26544 return this.operators; 26545 } 26546 parseBlock() { 26547 while (true) { 26548 if (this.accept(PostScriptTokenTypes.NUMBER)) { 26549 this.operators.push(this.prev.value); 26550 } else if (this.accept(PostScriptTokenTypes.OPERATOR)) { 26551 this.operators.push(this.prev.value); 26552 } else if (this.accept(PostScriptTokenTypes.LBRACE)) { 26553 this.parseCondition(); 26554 } else { 26555 return; 26556 } 26557 } 26558 } 26559 parseCondition() { 26560 const conditionLocation = this.operators.length; 26561 this.operators.push(null, null); 26562 this.parseBlock(); 26563 this.expect(PostScriptTokenTypes.RBRACE); 26564 if (this.accept(PostScriptTokenTypes.IF)) { 26565 this.operators[conditionLocation] = this.operators.length; 26566 this.operators[conditionLocation + 1] = "jz"; 26567 } else if (this.accept(PostScriptTokenTypes.LBRACE)) { 26568 const jumpLocation = this.operators.length; 26569 this.operators.push(null, null); 26570 const endOfTrue = this.operators.length; 26571 this.parseBlock(); 26572 this.expect(PostScriptTokenTypes.RBRACE); 26573 this.expect(PostScriptTokenTypes.IFELSE); 26574 this.operators[jumpLocation] = this.operators.length; 26575 this.operators[jumpLocation + 1] = "j"; 26576 this.operators[conditionLocation] = endOfTrue; 26577 this.operators[conditionLocation + 1] = "jz"; 26578 } else { 26579 throw new FormatError("PS Function: error parsing conditional."); 26580 } 26581 } 26582} 26583const PostScriptTokenTypes = { 26584 LBRACE: 0, 26585 RBRACE: 1, 26586 NUMBER: 2, 26587 OPERATOR: 3, 26588 IF: 4, 26589 IFELSE: 5 26590}; 26591class PostScriptToken { 26592 static get opCache() { 26593 return shadow(this, "opCache", Object.create(null)); 26594 } 26595 constructor(type, value) { 26596 this.type = type; 26597 this.value = value; 26598 } 26599 static getOperator(op) { 26600 return PostScriptToken.opCache[op] ||= new PostScriptToken(PostScriptTokenTypes.OPERATOR, op); 26601 } 26602 static get LBRACE() { 26603 return shadow(this, "LBRACE", new PostScriptToken(PostScriptTokenTypes.LBRACE, "{")); 26604 } 26605 static get RBRACE() { 26606 return shadow(this, "RBRACE", new PostScriptToken(PostScriptTokenTypes.RBRACE, "}")); 26607 } 26608 static get IF() { 26609 return shadow(this, "IF", new PostScriptToken(PostScriptTokenTypes.IF, "IF")); 26610 } 26611 static get IFELSE() { 26612 return shadow(this, "IFELSE", new PostScriptToken(PostScriptTokenTypes.IFELSE, "IFELSE")); 26613 } 26614} 26615class PostScriptLexer { 26616 constructor(stream) { 26617 this.stream = stream; 26618 this.nextChar(); 26619 this.strBuf = []; 26620 } 26621 nextChar() { 26622 return this.currentChar = this.stream.getByte(); 26623 } 26624 getToken() { 26625 let comment = false; 26626 let ch = this.currentChar; 26627 while (true) { 26628 if (ch < 0) { 26629 return EOF; 26630 } 26631 if (comment) { 26632 if (ch === 0x0a || ch === 0x0d) { 26633 comment = false; 26634 } 26635 } else if (ch === 0x25) { 26636 comment = true; 26637 } else if (!isWhiteSpace(ch)) { 26638 break; 26639 } 26640 ch = this.nextChar(); 26641 } 26642 switch (ch | 0) { 26643 case 0x30: 26644 case 0x31: 26645 case 0x32: 26646 case 0x33: 26647 case 0x34: 26648 case 0x35: 26649 case 0x36: 26650 case 0x37: 26651 case 0x38: 26652 case 0x39: 26653 case 0x2b: 26654 case 0x2d: 26655 case 0x2e: 26656 return new PostScriptToken(PostScriptTokenTypes.NUMBER, this.getNumber()); 26657 case 0x7b: 26658 this.nextChar(); 26659 return PostScriptToken.LBRACE; 26660 case 0x7d: 26661 this.nextChar(); 26662 return PostScriptToken.RBRACE; 26663 } 26664 const strBuf = this.strBuf; 26665 strBuf.length = 0; 26666 strBuf[0] = String.fromCharCode(ch); 26667 while ((ch = this.nextChar()) >= 0 && (ch >= 0x41 && ch <= 0x5a || ch >= 0x61 && ch <= 0x7a)) { 26668 strBuf.push(String.fromCharCode(ch)); 26669 } 26670 const str = strBuf.join(""); 26671 switch (str.toLowerCase()) { 26672 case "if": 26673 return PostScriptToken.IF; 26674 case "ifelse": 26675 return PostScriptToken.IFELSE; 26676 default: 26677 return PostScriptToken.getOperator(str); 26678 } 26679 } 26680 getNumber() { 26681 let ch = this.currentChar; 26682 const strBuf = this.strBuf; 26683 strBuf.length = 0; 26684 strBuf[0] = String.fromCharCode(ch); 26685 while ((ch = this.nextChar()) >= 0) { 26686 if (ch >= 0x30 && ch <= 0x39 || ch === 0x2d || ch === 0x2e) { 26687 strBuf.push(String.fromCharCode(ch)); 26688 } else { 26689 break; 26690 } 26691 } 26692 const value = parseFloat(strBuf.join("")); 26693 if (isNaN(value)) { 26694 throw new FormatError(`Invalid floating point number: ${value}`); 26695 } 26696 return value; 26697 } 26698} 26699 26700;// ./src/core/image_utils.js 26701 26702
vendor: 3,763 bytes, lines 26703-26854
26703class BaseLocalCache { 26704 constructor(options) { 26705 this._onlyRefs = options?.onlyRefs === true; 26706 if (!this._onlyRefs) { 26707 this._nameRefMap = new Map(); 26708 this._imageMap = new Map(); 26709 } 26710 this._imageCache = new RefSetCache(); 26711 } 26712 getByName(name) { 26713 if (this._onlyRefs) { 26714 unreachable("Should not call `getByName` method."); 26715 } 26716 const ref = this._nameRefMap.get(name); 26717 if (ref) { 26718 return this.getByRef(ref); 26719 } 26720 return this._imageMap.get(name) || null; 26721 } 26722 getByRef(ref) { 26723 return this._imageCache.get(ref) || null; 26724 } 26725 set(name, ref, data) { 26726 unreachable("Abstract method `set` called."); 26727 } 26728} 26729class LocalImageCache extends BaseLocalCache { 26730 set(name, ref = null, data) { 26731 if (typeof name !== "string") { 26732 throw new Error('LocalImageCache.set - expected "name" argument.'); 26733 } 26734 if (ref) { 26735 if (this._imageCache.has(ref)) { 26736 return; 26737 } 26738 this._nameRefMap.set(name, ref); 26739 this._imageCache.put(ref, data); 26740 return; 26741 } 26742 if (this._imageMap.has(name)) { 26743 return; 26744 } 26745 this._imageMap.set(name, data); 26746 } 26747} 26748class LocalColorSpaceCache extends BaseLocalCache { 26749 set(name = null, ref = null, data) { 26750 if (typeof name !== "string" && !ref) { 26751 throw new Error('LocalColorSpaceCache.set - expected "name" and/or "ref" argument.'); 26752 } 26753 if (ref) { 26754 if (this._imageCache.has(ref)) { 26755 return; 26756 } 26757 if (name !== null) { 26758 this._nameRefMap.set(name, ref); 26759 } 26760 this._imageCache.put(ref, data); 26761 return; 26762 } 26763 if (this._imageMap.has(name)) { 26764 return; 26765 } 26766 this._imageMap.set(name, data); 26767 } 26768} 26769class LocalFunctionCache extends BaseLocalCache { 26770 constructor(options) { 26771 super({ 26772 onlyRefs: true 26773 }); 26774 } 26775 set(name = null, ref, data) { 26776 if (!ref) { 26777 throw new Error('LocalFunctionCache.set - expected "ref" argument.'); 26778 } 26779 if (this._imageCache.has(ref)) { 26780 return; 26781 } 26782 this._imageCache.put(ref, data); 26783 } 26784} 26785class LocalGStateCache extends BaseLocalCache { 26786 set(name, ref = null, data) { 26787 if (typeof name !== "string") { 26788 throw new Error('LocalGStateCache.set - expected "name" argument.'); 26789 } 26790 if (ref) { 26791 if (this._imageCache.has(ref)) { 26792 return; 26793 } 26794 this._nameRefMap.set(name, ref); 26795 this._imageCache.put(ref, data); 26796 return; 26797 } 26798 if (this._imageMap.has(name)) { 26799 return; 26800 } 26801 this._imageMap.set(name, data); 26802 } 26803} 26804class LocalTilingPatternCache extends BaseLocalCache { 26805 constructor(options) { 26806 super({ 26807 onlyRefs: true 26808 }); 26809 } 26810 set(name = null, ref, data) { 26811 if (!ref) { 26812 throw new Error('LocalTilingPatternCache.set - expected "ref" argument.'); 26813 } 26814 if (this._imageCache.has(ref)) { 26815 return; 26816 } 26817 this._imageCache.put(ref, data); 26818 } 26819} 26820class RegionalImageCache extends BaseLocalCache { 26821 constructor(options) { 26822 super({ 26823 onlyRefs: true 26824 }); 26825 } 26826 set(name = null, ref, data) { 26827 if (!ref) { 26828 throw new Error('RegionalImageCache.set - expected "ref" argument.'); 26829 } 26830 if (this._imageCache.has(ref)) { 26831 return; 26832 } 26833 this._imageCache.put(ref, data); 26834 } 26835} 26836class GlobalImageCache { 26837 static NUM_PAGES_THRESHOLD = 2; 26838 static MIN_IMAGES_TO_CACHE = 10; 26839 static MAX_BYTE_SIZE = 5 * MAX_IMAGE_SIZE_TO_CACHE; 26840 #decodeFailedSet = new RefSet(); 26841 constructor() { 26842 this._refCache = new RefSetCache(); 26843 this._imageCache = new RefSetCache(); 26844 } 26845 get #byteSize() { 26846 let byteSize = 0; 26847 for (const imageData of this._imageCache) { 26848 byteSize += imageData.byteSize; 26849 } 26850 return byteSize; 26851 } 26852 get #cacheLimitReached() { 26853 if (this._imageCache.size < GlobalImageCache.MIN_IMAGES_TO_CACHE) { 26854 return false;
26855 } 26856 if (this.#byteSize < GlobalImageCache.MAX_BYTE_SIZE) { 26857 return false; 26858 } 26859 return true; 26860 } 26861 shouldCache(ref, pageIndex) { 26862 let pageIndexSet = this._refCache.get(ref); 26863 if (!pageIndexSet) { 26864 pageIndexSet = new Set(); 26865 this._refCache.put(ref, pageIndexSet); 26866 } 26867 pageIndexSet.add(pageIndex); 26868 if (pageIndexSet.size < GlobalImageCache.NUM_PAGES_THRESHOLD) { 26869 return false; 26870 } 26871 if (!this._imageCache.has(ref) && this.#cacheLimitReached) { 26872 return false; 26873 } 26874 return true; 26875 } 26876 addDecodeFailed(ref) { 26877 this.#decodeFailedSet.put(ref); 26878 } 26879 hasDecodeFailed(ref) { 26880 return this.#decodeFailedSet.has(ref); 26881 } 26882 addByteSize(ref, byteSize) { 26883 const imageData = this._imageCache.get(ref); 26884 if (!imageData) { 26885 return; 26886 } 26887 if (imageData.byteSize) { 26888 return; 26889 } 26890 imageData.byteSize = byteSize; 26891 } 26892 getData(ref, pageIndex) { 26893 const pageIndexSet = this._refCache.get(ref); 26894 if (!pageIndexSet) { 26895 return null; 26896 } 26897 if (pageIndexSet.size < GlobalImageCache.NUM_PAGES_THRESHOLD) { 26898 return null; 26899 } 26900 const imageData = this._imageCache.get(ref); 26901 if (!imageData) { 26902 return null; 26903 } 26904 pageIndexSet.add(pageIndex); 26905 return imageData; 26906 } 26907 setData(ref, data) { 26908 if (!this._refCache.has(ref)) { 26909 throw new Error('GlobalImageCache.setData - expected "shouldCache" to have been called.'); 26910 } 26911 if (this._imageCache.has(ref)) { 26912 return; 26913 } 26914 if (this.#cacheLimitReached) { 26915 warn("GlobalImageCache.setData - cache limit reached."); 26916 return; 26917 } 26918 this._imageCache.put(ref, data); 26919 } 26920 clear(onlyData = false) { 26921 if (!onlyData) { 26922 this.#decodeFailedSet.clear(); 26923 this._refCache.clear(); 26924 } 26925 this._imageCache.clear(); 26926 } 26927} 26928 26929;// ./src/core/function.js 26930 26931 26932 26933 26934 26935 26936class PDFFunctionFactory { 26937 constructor({ 26938 xref, 26939 isEvalSupported = true 26940 }) { 26941 this.xref = xref; 26942 this.isEvalSupported = isEvalSupported !== false; 26943 } 26944 create(fn) { 26945 const cachedFunction = this.getCached(fn); 26946 if (cachedFunction) { 26947 return cachedFunction; 26948 } 26949 const parsedFunction = PDFFunction.parse({ 26950 xref: this.xref, 26951 isEvalSupported: this.isEvalSupported, 26952 fn: fn instanceof Ref ? this.xref.fetch(fn) : fn 26953 }); 26954 this._cache(fn, parsedFunction); 26955 return parsedFunction; 26956 } 26957 createFromArray(fnObj) { 26958 const cachedFunction = this.getCached(fnObj); 26959 if (cachedFunction) { 26960 return cachedFunction; 26961 } 26962 const parsedFunction = PDFFunction.parseArray({ 26963 xref: this.xref, 26964 isEvalSupported: this.isEvalSupported, 26965 fnObj: fnObj instanceof Ref ? this.xref.fetch(fnObj) : fnObj 26966 }); 26967 this._cache(fnObj, parsedFunction); 26968 return parsedFunction; 26969 } 26970 getCached(cacheKey) { 26971 let fnRef; 26972 if (cacheKey instanceof Ref) { 26973 fnRef = cacheKey; 26974 } else if (cacheKey instanceof Dict) { 26975 fnRef = cacheKey.objId; 26976 } else if (cacheKey instanceof BaseStream) { 26977 fnRef = cacheKey.dict?.objId; 26978 } 26979 if (fnRef) { 26980 const localFunction = this._localFunctionCache.getByRef(fnRef); 26981 if (localFunction) { 26982 return localFunction; 26983 } 26984 } 26985 return null; 26986 } 26987 _cache(cacheKey, parsedFunction) { 26988 if (!parsedFunction) { 26989 throw new Error('PDFFunctionFactory._cache - expected "parsedFunction" argument.'); 26990 } 26991 let fnRef; 26992 if (cacheKey instanceof Ref) { 26993 fnRef = cacheKey; 26994 } else if (cacheKey instanceof Dict) { 26995 fnRef = cacheKey.objId; 26996 } else if (cacheKey instanceof BaseStream) { 26997 fnRef = cacheKey.dict?.objId; 26998 } 26999 if (fnRef) { 27000 this._localFunctionCache.set(null, fnRef, parsedFunction); 27001 } 27002 } 27003 get _localFunctionCache() { 27004 return shadow(this, "_localFunctionCache", new LocalFunctionCache()); 27005 } 27006} 27007function toNumberArray(arr) { 27008 if (!Array.isArray(arr)) { 27009 return null; 27010 } 27011 if (!isNumberArray(arr, null)) { 27012 return arr.map(x => +x); 27013 } 27014 return arr; 27015} 27016class PDFFunction { 27017 static getSampleArray(size, outputSize, bps, stream) { 27018 let i, ii; 27019 let length = 1; 27020 for (i = 0, ii = size.length; i < ii; i++) { 27021 length *= size[i]; 27022 } 27023 length *= outputSize; 27024 const array = new Array(length);
27025 let codeSize = 0; 27026 let codeBuf = 0; 27027 const sampleMul = 1.0 / (2.0 ** bps - 1); 27028 const strBytes = stream.getBytes((length * bps + 7) / 8); 27029 let strIdx = 0; 27030 for (i = 0; i < length; i++) { 27031 while (codeSize < bps) { 27032 codeBuf <<= 8; 27033 codeBuf |= strBytes[strIdx++]; 27034 codeSize += 8; 27035 } 27036 codeSize -= bps; 27037 array[i] = (codeBuf >> codeSize) * sampleMul; 27038 codeBuf &= (1 << codeSize) - 1; 27039 } 27040 return array; 27041 } 27042 static parse({ 27043 xref, 27044 isEvalSupported, 27045 fn 27046 }) { 27047 const dict = fn.dict || fn; 27048 const typeNum = dict.get("FunctionType"); 27049 switch (typeNum) { 27050 case 0: 27051 return this.constructSampled({ 27052 xref, 27053 isEvalSupported, 27054 fn, 27055 dict 27056 }); 27057 case 1: 27058 break; 27059 case 2: 27060 return this.constructInterpolated({ 27061 xref, 27062 isEvalSupported, 27063 dict 27064 }); 27065 case 3: 27066 return this.constructStiched({ 27067 xref, 27068 isEvalSupported, 27069 dict 27070 }); 27071 case 4: 27072 return this.constructPostScript({ 27073 xref, 27074 isEvalSupported, 27075 fn, 27076 dict 27077 }); 27078 } 27079 throw new FormatError("Unknown type of function"); 27080 } 27081 static parseArray({ 27082 xref, 27083 isEvalSupported, 27084 fnObj 27085 }) { 27086 if (!Array.isArray(fnObj)) { 27087 return this.parse({ 27088 xref, 27089 isEvalSupported, 27090 fn: fnObj 27091 }); 27092 } 27093 const fnArray = []; 27094 for (const fn of fnObj) { 27095 fnArray.push(this.parse({ 27096 xref, 27097 isEvalSupported, 27098 fn: xref.fetchIfRef(fn) 27099 })); 27100 } 27101 return function (src, srcOffset, dest, destOffset) { 27102 for (let i = 0, ii = fnArray.length; i < ii; i++) { 27103 fnArray[i](src, srcOffset, dest, destOffset + i); 27104 } 27105 }; 27106 } 27107 static constructSampled({ 27108 xref, 27109 isEvalSupported, 27110 fn, 27111 dict 27112 }) { 27113 function toMultiArray(arr) { 27114 const inputLength = arr.length; 27115 const out = []; 27116 let index = 0; 27117 for (let i = 0; i < inputLength; i += 2) { 27118 out[index++] = [arr[i], arr[i + 1]]; 27119 } 27120 return out; 27121 } 27122 function interpolate(x, xmin, xmax, ymin, ymax) { 27123 return ymin + (x - xmin) * ((ymax - ymin) / (xmax - xmin)); 27124 } 27125 let domain = toNumberArray(dict.getArray("Domain")); 27126 let range = toNumberArray(dict.getArray("Range")); 27127 if (!domain || !range) { 27128 throw new FormatError("No domain or range"); 27129 } 27130 const inputSize = domain.length / 2; 27131 const outputSize = range.length / 2; 27132 domain = toMultiArray(domain); 27133 range = toMultiArray(range); 27134 const size = toNumberArray(dict.getArray("Size")); 27135 const bps = dict.get("BitsPerSample"); 27136 const order = dict.get("Order") || 1; 27137 if (order !== 1) { 27138 info("No support for cubic spline interpolation: " + order); 27139 } 27140 let encode = toNumberArray(dict.getArray("Encode")); 27141 if (!encode) { 27142 encode = []; 27143 for (let i = 0; i < inputSize; ++i) { 27144 encode.push([0, size[i] - 1]); 27145 } 27146 } else { 27147 encode = toMultiArray(encode); 27148 } 27149 let decode = toNumberArray(dict.getArray("Decode")); 27150 decode = !decode ? range : toMultiArray(decode); 27151 const samples = this.getSampleArray(size, outputSize, bps, fn); 27152 return function constructSampledFn(src, srcOffset, dest, destOffset) { 27153 const cubeVertices = 1 << inputSize; 27154 const cubeN = new Float64Array(cubeVertices); 27155 const cubeVertex = new Uint32Array(cubeVertices); 27156 let i, j; 27157 for (j = 0; j < cubeVertices; j++) { 27158 cubeN[j] = 1; 27159 } 27160 let k = outputSize, 27161 pos = 1; 27162 for (i = 0; i < inputSize; ++i) { 27163 const domain_2i = domain[i][0]; 27164 const domain_2i_1 = domain[i][1]; 27165 const xi = Math.min(Math.max(src[srcOffset + i], domain_2i), domain_2i_1); 27166 let e = interpolate(xi, domain_2i, domain_2i_1, encode[i][0], encode[i][1]); 27167 const size_i = size[i]; 27168 e = Math.min(Math.max(e, 0), size_i - 1); 27169 const e0 = e < size_i - 1 ? Math.floor(e) : e - 1; 27170 const n0 = e0 + 1 - e; 27171 const n1 = e - e0; 27172 const offset0 = e0 * k; 27173 const offset1 = offset0 + k; 27174 for (j = 0; j < cubeVertices; j++) { 27175 if (j & pos) { 27176 cubeN[j] *= n1; 27177 cubeVertex[j] += offset1; 27178 } else { 27179 cubeN[j] *= n0; 27180 cubeVertex[j] += offset0; 27181 } 27182 } 27183 k *= size_i; 27184 pos <<= 1; 27185 } 27186 for (j = 0; j < outputSize; ++j) { 27187 let rj = 0; 27188 for (i = 0; i < cubeVertices; i++) { 27189 rj += samples[cubeVertex[i] + j] * cubeN[i]; 27190 } 27191 rj = interpolate(rj, 0, 1, decode[j][0], decode[j][1]); 27192 dest[destOffset + j] = Math.min(Math.max(rj, range[j][0]), range[j][1]); 27193 } 27194 }; 27195 } 27196 static constructInterpolated({ 27197 xref, 27198 isEvalSupported, 27199 dict 27200 }) { 27201 const c0 = toNumberArray(dict.getArray("C0")) || [0]; 27202 const c1 = toNumberArray(dict.getArray("C1")) || [1]; 27203 const n = dict.get("N"); 27204 const diff = []; 27205 for (let i = 0, ii = c0.length; i < ii; ++i) { 27206 diff.push(c1[i] - c0[i]); 27207 } 27208 const length = diff.length; 27209 return function constructInterpolatedFn(src, srcOffset, dest, destOff
27209set) { 27210 const x = n === 1 ? src[srcOffset] : src[srcOffset] ** n; 27211 for (let j = 0; j < length; ++j) { 27212 dest[destOffset + j] = c0[j] + x * diff[j]; 27213 } 27214 }; 27215 } 27216 static constructStiched({ 27217 xref, 27218 isEvalSupported, 27219 dict 27220 }) { 27221 const domain = toNumberArray(dict.getArray("Domain")); 27222 if (!domain) { 27223 throw new FormatError("No domain"); 27224 } 27225 const inputSize = domain.length / 2; 27226 if (inputSize !== 1) { 27227 throw new FormatError("Bad domain for stiched function"); 27228 } 27229 const fns = []; 27230 for (const fn of dict.get("Functions")) { 27231 fns.push(this.parse({ 27232 xref, 27233 isEvalSupported, 27234 fn: xref.fetchIfRef(fn) 27235 })); 27236 } 27237 const bounds = toNumberArray(dict.getArray("Bounds")); 27238 const encode = toNumberArray(dict.getArray("Encode")); 27239 const tmpBuf = new Float32Array(1); 27240 return function constructStichedFn(src, srcOffset, dest, destOffset) { 27241 const clip = function constructStichedFromIRClip(v, min, max) { 27242 if (v > max) { 27243 v = max; 27244 } else if (v < min) { 27245 v = min; 27246 } 27247 return v; 27248 }; 27249 const v = clip(src[srcOffset], domain[0], domain[1]); 27250 const length = bounds.length; 27251 let i; 27252 for (i = 0; i < length; ++i) { 27253 if (v < bounds[i]) { 27254 break; 27255 } 27256 } 27257 let dmin = domain[0]; 27258 if (i > 0) { 27259 dmin = bounds[i - 1]; 27260 } 27261 let dmax = domain[1]; 27262 if (i < bounds.length) { 27263 dmax = bounds[i]; 27264 } 27265 const rmin = encode[2 * i]; 27266 const rmax = encode[2 * i + 1]; 27267 tmpBuf[0] = dmin === dmax ? rmin : rmin + (v - dmin) * (rmax - rmin) / (dmax - dmin); 27268 fns[i](tmpBuf, 0, dest, destOffset); 27269 }; 27270 } 27271 static constructPostScript({ 27272 xref, 27273 isEvalSupported, 27274 fn, 27275 dict 27276 }) { 27277 const domain = toNumberArray(dict.getArray("Domain")); 27278 const range = toNumberArray(dict.getArray("Range")); 27279 if (!domain) { 27280 throw new FormatError("No domain."); 27281 } 27282 if (!range) { 27283 throw new FormatError("No range."); 27284 } 27285 const lexer = new PostScriptLexer(fn); 27286 const parser = new PostScriptParser(lexer); 27287 const code = parser.parse(); 27288 if (
vendor: 21,370 bytes, lines 27288-27978
27288isEvalSupported && FeatureTest.isEvalSupported) { 27289 const compiled = new PostScriptCompiler().compile(code, domain, range); 27290 if (compiled) { 27291 return new Function("src", "srcOffset", "dest", "destOffset", compiled); 27292 } 27293 } 27294 info("Unable to compile PS function"); 27295 const numOutputs = range.length >> 1; 27296 const numInputs = domain.length >> 1; 27297 const evaluator = new PostScriptEvaluator(code); 27298 const cache = Object.create(null); 27299 const MAX_CACHE_SIZE = 2048 * 4; 27300 let cache_available = MAX_CACHE_SIZE; 27301 const tmpBuf = new Float32Array(numInputs); 27302 return function constructPostScriptFn(src, srcOffset, dest, destOffset) { 27303 let i, value; 27304 let key = ""; 27305 const input = tmpBuf; 27306 for (i = 0; i < numInputs; i++) { 27307 value = src[srcOffset + i]; 27308 input[i] = value; 27309 key += value + "_"; 27310 } 27311 const cachedValue = cache[key]; 27312 if (cachedValue !== undefined) { 27313 dest.set(cachedValue, destOffset); 27314 return; 27315 } 27316 const output = new Float32Array(numOutputs); 27317 const stack = evaluator.execute(input); 27318 const stackIndex = stack.length - numOutputs; 27319 for (i = 0; i < numOutputs; i++) { 27320 value = stack[stackIndex + i]; 27321 let bound = range[i * 2]; 27322 if (value < bound) { 27323 value = bound; 27324 } else { 27325 bound = range[i * 2 + 1]; 27326 if (value > bound) { 27327 value = bound; 27328 } 27329 } 27330 output[i] = value; 27331 } 27332 if (cache_available > 0) { 27333 cache_available--; 27334 cache[key] = output; 27335 } 27336 dest.set(output, destOffset); 27337 }; 27338 } 27339} 27340function isPDFFunction(v) { 27341 let fnDict; 27342 if (v instanceof Dict) { 27343 fnDict = v; 27344 } else if (v instanceof BaseStream) { 27345 fnDict = v.dict; 27346 } else { 27347 return false; 27348 } 27349 return fnDict.has("FunctionType"); 27350} 27351class PostScriptStack { 27352 static MAX_STACK_SIZE = 100; 27353 constructor(initialStack) { 27354 this.stack = initialStack ? Array.from(initialStack) : []; 27355 } 27356 push(value) { 27357 if (this.stack.length >= PostScriptStack.MAX_STACK_SIZE) { 27358 throw new Error("PostScript function stack overflow."); 27359 } 27360 this.stack.push(value); 27361 } 27362 pop() { 27363 if (this.stack.length <= 0) { 27364 throw new Error("PostScript function stack underflow."); 27365 } 27366 return this.stack.pop(); 27367 } 27368 copy(n) { 27369 if (this.stack.length + n >= PostScriptStack.MAX_STACK_SIZE) { 27370 throw new Error("PostScript function stack overflow."); 27371 } 27372 const stack = this.stack; 27373 for (let i = stack.length - n, j = n - 1; j >= 0; j--, i++) { 27374 stack.push(stack[i]); 27375 } 27376 } 27377 index(n) { 27378 this.push(this.stack[this.stack.length - n - 1]); 27379 } 27380 roll(n, p) { 27381 const stack = this.stack; 27382 const l = stack.length - n; 27383 const r = stack.length - 1; 27384 const c = l + (p - Math.floor(p / n) * n); 27385 for (let i = l, j = r; i < j; i++, j--) { 27386 const t = stack[i]; 27387 stack[i] = stack[j]; 27388 stack[j] = t; 27389 } 27390 for (let i = l, j = c - 1; i < j; i++, j--) { 27391 const t = stack[i]; 27392 stack[i] = stack[j]; 27393 stack[j] = t; 27394 } 27395 for (let i = c, j = r; i < j; i++, j--) { 27396 const t = stack[i]; 27397 stack[i] = stack[j]; 27398 stack[j] = t; 27399 } 27400 } 27401} 27402class PostScriptEvaluator { 27403 constructor(operators) { 27404 this.operators = operators; 27405 } 27406 execute(initialStack) { 27407 const stack = new PostScriptStack(initialStack); 27408 let counter = 0; 27409 const operators = this.operators; 27410 const length = operators.length; 27411 let operator, a, b; 27412 while (counter < length) { 27413 operator = operators[counter++]; 27414 if (typeof operator === "number") { 27415 stack.push(operator); 27416 continue; 27417 } 27418 switch (operator) { 27419 case "jz": 27420 b = stack.pop(); 27421 a = stack.pop(); 27422 if (!a) { 27423 counter = b; 27424 } 27425 break; 27426 case "j": 27427 a = stack.pop(); 27428 counter = a; 27429 break; 27430 case "abs": 27431 a = stack.pop(); 27432 stack.push(Math.abs(a)); 27433 break; 27434 case "add": 27435 b = stack.pop(); 27436 a = stack.pop(); 27437 stack.push(a + b); 27438 break; 27439 case "and": 27440 b = stack.pop(); 27441 a = stack.pop(); 27442 if (typeof a === "boolean" && typeof b === "boolean") { 27443 stack.push(a && b); 27444 } else { 27445 stack.push(a & b); 27446 } 27447 break; 27448 case "atan": 27449 b = stack.pop(); 27450 a = stack.pop(); 27451 a = Math.atan2(a, b) / Math.PI * 180; 27452 if (a < 0) { 27453 a += 360; 27454 } 27455 stack.push(a); 27456 break; 27457 case "bitshift": 27458 b = stack.pop(); 27459 a = stack.pop(); 27460 if (a > 0) { 27461 stack.push(a << b); 27462 } else { 27463 stack.push(a >> b); 27464 } 27465 break; 27466 case "ceiling": 27467 a = stack.pop(); 27468 stack.push(Math.ceil(a)); 27469 break; 27470 case "copy": 27471 a = stack.pop(); 27472 stack.copy(a); 27473 break; 27474 case "cos": 27475 a = stack.pop(); 27476 stack.push(Math.cos(a % 360 / 180 * Math.PI)); 27477 break; 27478 case "cvi": 27479 a = stack.pop() | 0; 27480 stack.push(a); 27481 break; 27482 case "cvr": 27483 break; 27484 case "div": 27485 b = stack.pop(); 27486 a = stack.pop(); 27487 stack.push(a / b); 27488 break; 27489 case "dup": 27490 stack.copy(1); 27491 break; 27492 case "eq": 27493 b = stack.pop(); 27494 a = stack.pop(); 27495 stack.push(a === b); 27496 break; 27497 case "exch": 27498 stack.roll(2, 1); 27499 break; 27500 case "exp": 27501 b = stack.pop(); 27502 a = stack.pop(); 27503 stack.push(a ** b); 27504 break; 27505 case "false": 27506 stack.push(false); 27507 break; 27508 case "floor": 27509 a = stack.pop(); 27510 stack.push(Math.floor(a)); 27511 break; 27512 case "ge": 27513 b = stack.pop(); 27514 a = stack.pop(); 27515 stack.push(a >= b); 27516 break; 27517 case "gt": 27518 b = stack.pop(); 27519 a = stack.pop(); 27520 stack.push(a > b); 27521 break; 27522 case "idiv": 27523 b = stack.pop(); 27524 a = stack.pop(); 27525 stack.push(a / b | 0); 27526 break; 27527 case "index": 27528 a = stack.pop(); 27529 stack.index(a); 27530 break; 27531 case "le": 27532 b = stack.pop(); 27533 a = stack.pop(); 27534 stack.push(a <= b); 27535 break; 27536 case "ln": 27537 a = stack.pop(); 27538 stack.push(Math.log(a)); 27539 break; 27540 case "log": 27541 a = stack.pop(); 27542 stack.push(Math.log10(a)); 27543 break; 27544 case "lt": 27545 b = stack.pop(); 27546 a = stack.pop(); 27547 stack.push(a < b); 27548 break; 27549 case "mod": 27550 b = stack.pop(); 27551 a = stack.pop(); 27552 stack.push(a % b); 27553 break; 27554 case "mul": 27555 b = stack.pop(); 27556 a = stack.pop(); 27557 stack.push(a * b); 27558 break; 27559 case "ne": 27560 b = stack.pop(); 27561 a = stack.pop(); 27562 stack.push(a !== b); 27563 break; 27564 case "neg": 27565 a = stack.pop(); 27566 stack.push(-a); 27567 break; 27568 case "not": 27569 a = stack.pop(); 27570 if (typeof a === "boolean") { 27571 stack.push(!a); 27572 } else { 27573 stack.push(~a); 27574 } 27575 break; 27576 case "or": 27577 b = stack.pop(); 27578 a = stack.pop(); 27579 if (typeof a === "boolean" && typeof b === "boolean") { 27580 stack.push(a || b); 27581 } else { 27582 stack.push(a | b); 27583 } 27584 break; 27585 case "pop": 27586 stack.pop(); 27587 break; 27588 case "roll": 27589 b = stack.pop(); 27590 a = stack.pop(); 27591 stack.roll(a, b); 27592 break; 27593 case "round": 27594 a = stack.pop(); 27595 stack.push(Math.round(a)); 27596 break; 27597 case "sin": 27598 a = stack.pop(); 27599 stack.push(Math.sin(a % 360 / 180 * Math.PI)); 27600 break; 27601 case "sqrt": 27602 a = stack.pop(); 27603 stack.push(Math.sqrt(a)); 27604 break; 27605 case "sub": 27606 b = stack.pop(); 27607 a = stack.pop(); 27608 stack.push(a - b); 27609 break; 27610 case "true": 27611 stack.push(true); 27612 break; 27613 case "truncate": 27614 a = stack.pop(); 27615 a = a < 0 ? Math.ceil(a) : Math.floor(a); 27616 stack.push(a); 27617 break; 27618 case "xor": 27619 b = stack.pop(); 27620 a = stack.pop(); 27621 if (typeof a === "boolean" && typeof b === "boolean") { 27622 stack.push(a !== b); 27623 } else { 27624 stack.push(a ^ b); 27625 } 27626 break; 27627 default: 27628 throw new FormatError(`Unknown operator ${operator}`); 27629 } 27630 } 27631 return stack.stack; 27632 } 27633} 27634class AstNode { 27635 constructor(type) { 27636 this.type = type; 27637 } 27638 visit(visitor) { 27639 unreachable("abstract method"); 27640 } 27641} 27642class AstArgument extends AstNode { 27643 constructor(index, min, max) { 27644 super("args"); 27645 this.index = index; 27646 this.min = min; 27647 this.max = max; 27648 } 27649 visit(visitor) { 27650 visitor.visitArgument(this); 27651 } 27652} 27653class AstLiteral extends AstNode { 27654 constructor(number) { 27655 super("literal"); 27656 this.number = number; 27657 this.min = number; 27658 this.max = number; 27659 } 27660 visit(visitor) { 27661 visitor.visitLiteral(this); 27662 } 27663} 27664class AstBinaryOperation extends AstNode { 27665 constructor(op, arg1, arg2, min, max) { 27666 super("binary"); 27667 this.op = op; 27668 this.arg1 = arg1; 27669 this.arg2 = arg2; 27670 this.min = min; 27671 this.max = max; 27672 } 27673 visit(visitor) { 27674 visitor.visitBinaryOperation(this); 27675 } 27676} 27677class AstMin extends AstNode { 27678 constructor(arg, max) { 27679 super("max"); 27680 this.arg = arg; 27681 this.min = arg.min; 27682 this.max = max; 27683 } 27684 visit(visitor) { 27685 visitor.visitMin(this); 27686 } 27687} 27688class AstVariable extends AstNode { 27689 constructor(index, min, max) { 27690 super("var"); 27691 this.index = index; 27692 this.min = min; 27693 this.max = max; 27694 } 27695 visit(visitor) { 27696 visitor.visitVariable(this); 27697 } 27698} 27699class AstVariableDefinition extends AstNode { 27700 constructor(variable, arg) { 27701 super("definition"); 27702 this.variable = variable; 27703 this.arg = arg; 27704 } 27705 visit(visitor) { 27706 visitor.visitVariableDefinition(this); 27707 } 27708} 27709class ExpressionBuilderVisitor { 27710 constructor() { 27711 this.parts = []; 27712 } 27713 visitArgument(arg) { 27714 this.parts.push("Math.max(", arg.min, ", Math.min(", arg.max, ", src[srcOffset + ", arg.index, "]))"); 27715 } 27716 visitVariable(variable) { 27717 this.parts.push("v", variable.index); 27718 } 27719 visitLiteral(literal) { 27720 this.parts.push(literal.number); 27721 } 27722 visitBinaryOperation(operation) { 27723 this.parts.push("("); 27724 operation.arg1.visit(this); 27725 this.parts.push(" ", operation.op, " "); 27726 operation.arg2.visit(this); 27727 this.parts.push(")"); 27728 } 27729 visitVariableDefinition(definition) { 27730 this.parts.push("var "); 27731 definition.variable.visit(this); 27732 this.parts.push(" = "); 27733 definition.arg.visit(this); 27734 this.parts.push(";"); 27735 } 27736 visitMin(max) { 27737 this.parts.push("Math.min("); 27738 max.arg.visit(this); 27739 this.parts.push(", ", max.max, ")"); 27740 } 27741 toString() { 27742 return this.parts.join(""); 27743 } 27744} 27745function buildAddOperation(num1, num2) { 27746 if (num2.type === "literal" && num2.number === 0) { 27747 return num1; 27748 } 27749 if (num1.type === "literal" && num1.number === 0) { 27750 return num2; 27751 } 27752 if (num2.type === "literal" && num1.type === "literal") { 27753 return new AstLiteral(num1.number + num2.number); 27754 } 27755 return new AstBinaryOperation("+", num1, num2, num1.min + num2.min, num1.max + num2.max); 27756} 27757function buildMulOperation(num1, num2) { 27758 if (num2.type === "literal") { 27759 if (num2.number === 0) { 27760 return new AstLiteral(0); 27761 } else if (num2.number === 1) { 27762 return num1; 27763 } else if (num1.type === "literal") { 27764 return new AstLiteral(num1.number * num2.number); 27765 } 27766 } 27767 if (num1.type === "literal") { 27768 if (num1.number === 0) { 27769 return new AstLiteral(0); 27770 } else if (num1.number === 1) { 27771 return num2; 27772 } 27773 } 27774 const min = Math.min(num1.min * num2.min, num1.min * num2.max, num1.max * num2.min, num1.max * num2.max); 27775 const max = Math.max(num1.min * num2.min, num1.min * num2.max, num1.max * num2.min, num1.max * num2.max); 27776 return new AstBinaryOperation("*", num1, num2, min, max); 27777} 27778function buildSubOperation(num1, num2) { 27779 if (num2.type === "literal") { 27780 if (num2.number === 0) { 27781 return num1; 27782 } else if (num1.type === "literal") { 27783 return new AstLiteral(num1.number - num2.number); 27784 } 27785 } 27786 if (num2.type === "binary" && num2.op === "-" && num1.type === "literal" && num1.number === 1 && num2.arg1.type === "literal" && num2.arg1.number === 1) { 27787 return num2.arg2; 27788 } 27789 return new AstBinaryOperation("-", num1, num2, num1.min - num2.max, num1.max - num2.min); 27790} 27791function buildMinOperation(num1, max) { 27792 if (num1.min >= max) { 27793 return new AstLiteral(max); 27794 } else if (num1.max <= max) { 27795 return num1; 27796 } 27797 return new AstMin(num1, max); 27798} 27799class PostScriptCompiler { 27800 compile(code, domain, range) { 27801 const stack = []; 27802 const instructions = []; 27803 const inputSize = domain.length >> 1, 27804 outputSize = range.length >> 1; 27805 let lastRegister = 0; 27806 let n, j; 27807 let num1, num2, ast1, ast2, tmpVar, item; 27808 for (let i = 0; i < inputSize; i++) { 27809 stack.push(new AstArgument(i, domain[i * 2], domain[i * 2 + 1])); 27810 } 27811 for (let i = 0, ii = code.length; i < ii; i++) { 27812 item = code[i]; 27813 if (typeof item === "number") { 27814 stack.push(new AstLiteral(item)); 27815 continue; 27816 } 27817 switch (item) { 27818 case "add": 27819 if (stack.length < 2) { 27820 return null; 27821 } 27822 num2 = stack.pop(); 27823 num1 = stack.pop(); 27824 stack.push(buildAddOperation(num1, num2)); 27825 break; 27826 case "cvr": 27827 if (stack.length < 1) { 27828 return null; 27829 } 27830 break; 27831 case "mul": 27832 if (stack.length < 2) { 27833 return null; 27834 } 27835 num2 = stack.pop(); 27836 num1 = stack.pop(); 27837 stack.push(buildMulOperation(num1, num2)); 27838 break; 27839 case "sub": 27840 if (stack.length < 2) { 27841 return null; 27842 } 27843 num2 = stack.pop(); 27844 num1 = stack.pop(); 27845 stack.push(buildSubOperation(num1, num2)); 27846 break; 27847 case "exch": 27848 if (stack.length < 2) { 27849 return null; 27850 } 27851 ast1 = stack.pop(); 27852 ast2 = stack.pop(); 27853 stack.push(ast1, ast2); 27854 break; 27855 case "pop": 27856 if (stack.length < 1) { 27857 return null; 27858 } 27859 stack.pop(); 27860 break; 27861 case "index": 27862 if (stack.length < 1) { 27863 return null; 27864 } 27865 num1 = stack.pop(); 27866 if (num1.type !== "literal") { 27867 return null; 27868 } 27869 n = num1.number; 27870 if (n < 0 || !Number.isInteger(n) || stack.length < n) { 27871 return null; 27872 } 27873 ast1 = stack[stack.length - n - 1]; 27874 if (ast1.type === "literal" || ast1.type === "var") { 27875 stack.push(ast1); 27876 break; 27877 } 27878 tmpVar = new AstVariable(lastRegister++, ast1.min, ast1.max); 27879 stack[stack.length - n - 1] = tmpVar; 27880 stack.push(tmpVar); 27881 instructions.push(new AstVariableDefinition(tmpVar, ast1)); 27882 break; 27883 case "dup": 27884 if (stack.length < 1) { 27885 return null; 27886 } 27887 if (typeof code[i + 1] === "number" && code[i + 2] === "gt" && code[i + 3] === i + 7 && code[i + 4] === "jz" && code[i + 5] === "pop" && code[i + 6] === code[i + 1]) { 27888 num1 = stack.pop(); 27889 stack.push(buildMinOperation(num1, code[i + 1])); 27890 i += 6; 27891 break; 27892 } 27893 ast1 = stack.at(-1); 27894 if (ast1.type === "literal" || ast1.type === "var") { 27895 stack.push(ast1); 27896 break; 27897 } 27898 tmpVar = new AstVariable(lastRegister++, ast1.min, ast1.max); 27899 stack[stack.length - 1] = tmpVar; 27900 stack.push(tmpVar); 27901 instructions.push(new AstVariableDefinition(tmpVar, ast1)); 27902 break; 27903 case "roll": 27904 if (stack.length < 2) { 27905 return null; 27906 } 27907 num2 = stack.pop(); 27908 num1 = stack.pop(); 27909 if (num2.type !== "literal" || num1.type !== "literal") { 27910 return null; 27911 } 27912 j = num2.number; 27913 n = num1.number; 27914 if (n <= 0 || !Number.isInteger(n) || !Number.isInteger(j) || stack.length < n) { 27915 return null; 27916 } 27917 j = (j % n + n) % n; 27918 if (j === 0) { 27919 break; 27920 } 27921 stack.push(...stack.splice(stack.length - n, n - j)); 27922 break; 27923 default: 27924 return null; 27925 } 27926 } 27927 if (stack.length !== outputSize) { 27928 return null; 27929 } 27930 const result = []; 27931 for (const instruction of instructions) { 27932 const statementBuilder = new ExpressionBuilderVisitor(); 27933 instruction.visit(statementBuilder); 27934 result.push(statementBuilder.toString()); 27935 } 27936 for (let i = 0, ii = stack.length; i < ii; i++) { 27937 const expr = stack[i], 27938 statementBuilder = new ExpressionBuilderVisitor(); 27939 expr.visit(statementBuilder); 27940 const min = range[i * 2], 27941 max = range[i * 2 + 1]; 27942 const out = [statementBuilder.toString()]; 27943 if (min > expr.min) { 27944 out.unshift("Math.max(", min, ", "); 27945 out.push(")"); 27946 } 27947 if (max < expr.max) { 27948 out.unshift("Math.min(", max, ", "); 27949 out.push(")"); 27950 } 27951 out.unshift("dest[destOffset + ", i, "] = "); 27952 out.push(";"); 27953 result.push(out.join("")); 27954 } 27955 return result.join("\n"); 27956 } 27957} 27958 27959;// ./src/core/bidi.js 27960 27961const baseTypes = ["BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "S", "B", "S", "WS", "B", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "B", "B", "B", "S", "WS", "ON", "ON", "ET", "ET", "ET", "ON", "ON", "ON", "ON", "ON", "ES", "CS", "ES", "CS", "CS", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "CS", "ON", "ON", "ON", "ON", "ON", "ON", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "ON", "ON", "ON", "ON", "ON", "ON", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "ON", "ON", "ON", "ON", "BN", "BN", "BN", "BN", "BN", "BN", "B", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "CS", "ON", "ET", "ET", "ET", "ET", "ON", "ON", "ON", "ON", "L", "ON", "ON", "BN", "ON", "ON", "ET", "ET", "EN", "EN", "ON", "L", "ON", "ON", "ON", "EN", "L", "ON", "ON", "ON", "ON", "ON", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "ON", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "ON", "L", "L", "L", "L", "L", "L", "L", "L"]; 27962const arabicTypes = ["AN", "AN", "AN", "AN", "AN", "AN", "ON", "ON", "AL", "ET", "ET", "AL", "CS", "AL", "ON", "ON", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "ET", "AN", "AN", "AL", "AL", "AL", "NSM", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AN", "ON", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "NSM", "NSM", "ON", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "AL", "AL", "AL", "AL", "AL", "AL"]; 27963function isOdd(i) { 27964 return (i & 1) !== 0; 27965} 27966function isEven(i) { 27967 return (i & 1) === 0; 27968} 27969function findUnequal(arr, start, value) { 27970 let j, jj; 27971 for (j = start, jj = arr.length; j < jj; ++j) { 27972 if (arr[j] !== value) { 27973 return j; 27974 } 27975 } 27976 return j; 27977} 27978function
vendor: 417 bytes, lines 27978-27995
27978setValues(arr, start, end, value) { 27979 for (let j = start; j < end; ++j) { 27980 arr[j] = value; 27981 } 27982} 27983function reverseValues(arr, start, end) { 27984 for (let i = start, j = end - 1; i < j; ++i, --j) { 27985 const temp = arr[i]; 27986 arr[i] = arr[j]; 27987 arr[j] = temp; 27988 } 27989} 27990function createBidiText(str, isLTR, vertical = false) { 27991 let dir = "ltr"; 27992 if (vertical) { 27993 dir = "ttb"; 27994 } else if (!isLTR) { 27995 dir = "rtl";
vendor: 4,194 bytes, lines 27996-28163
27996 } 27997 return { 27998 str, 27999 dir 28000 }; 28001} 28002const chars = []; 28003const types = []; 28004function bidi(str, startLevel = -1, vertical = false) { 28005 let isLTR = true; 28006 const strLength = str.length; 28007 if (strLength === 0 || vertical) { 28008 return createBidiText(str, isLTR, vertical); 28009 } 28010 chars.length = strLength; 28011 types.length = strLength; 28012 let numBidi = 0; 28013 let i, ii; 28014 for (i = 0; i < strLength; ++i) { 28015 chars[i] = str.charAt(i); 28016 const charCode = str.charCodeAt(i); 28017 let charType = "L"; 28018 if (charCode <= 0x00ff) { 28019 charType = baseTypes[charCode]; 28020 } else if (0x0590 <= charCode && charCode <= 0x05f4) { 28021 charType = "R"; 28022 } else if (0x0600 <= charCode && charCode <= 0x06ff) { 28023 charType = arabicTypes[charCode & 0xff]; 28024 if (!charType) { 28025 warn("Bidi: invalid Unicode character " + charCode.toString(16)); 28026 } 28027 } else if (0x0700 <= charCode && charCode <= 0x08ac || 0xfb50 <= charCode && charCode <= 0xfdff || 0xfe70 <= charCode && charCode <= 0xfeff) { 28028 charType = "AL"; 28029 } 28030 if (charType === "R" || charType === "AL" || charType === "AN") { 28031 numBidi++; 28032 } 28033 types[i] = charType; 28034 } 28035 if (numBidi === 0) { 28036 isLTR = true; 28037 return createBidiText(str, isLTR); 28038 } 28039 if (startLevel === -1) { 28040 if (numBidi / strLength < 0.3 && strLength > 4) { 28041 isLTR = true; 28042 startLevel = 0; 28043 } else { 28044 isLTR = false; 28045 startLevel = 1; 28046 } 28047 } 28048 const levels = []; 28049 for (i = 0; i < strLength; ++i) { 28050 levels[i] = startLevel; 28051 } 28052 const e = isOdd(startLevel) ? "R" : "L"; 28053 const sor = e; 28054 const eor = sor; 28055 let lastType = sor; 28056 for (i = 0; i < strLength; ++i) { 28057 if (types[i] === "NSM") { 28058 types[i] = lastType; 28059 } else { 28060 lastType = types[i]; 28061 } 28062 } 28063 lastType = sor; 28064 let t; 28065 for (i = 0; i < strLength; ++i) { 28066 t = types[i]; 28067 if (t === "EN") { 28068 types[i] = lastType === "AL" ? "AN" : "EN"; 28069 } else if (t === "R" || t === "L" || t === "AL") { 28070 lastType = t; 28071 } 28072 } 28073 for (i = 0; i < strLength; ++i) { 28074 t = types[i]; 28075 if (t === "AL") { 28076 types[i] = "R"; 28077 } 28078 } 28079 for (i = 1; i < strLength - 1; ++i) { 28080 if (types[i] === "ES" && types[i - 1] === "EN" && types[i + 1] === "EN") { 28081 types[i] = "EN"; 28082 } 28083 if (types[i] === "CS" && (types[i - 1] === "EN" || types[i - 1] === "AN") && types[i + 1] === types[i - 1]) { 28084 types[i] = types[i - 1]; 28085 } 28086 } 28087 for (i = 0; i < strLength; ++i) { 28088 if (types[i] === "EN") { 28089 for (let j = i - 1; j >= 0; --j) { 28090 if (types[j] !== "ET") { 28091 break; 28092 } 28093 types[j] = "EN"; 28094 } 28095 for (let j = i + 1; j < strLength; ++j) { 28096 if (types[j] !== "ET") { 28097 break; 28098 } 28099 types[j] = "EN"; 28100 } 28101 } 28102 } 28103 for (i = 0; i < strLength; ++i) { 28104 t = types[i]; 28105 if (t === "WS" || t === "ES" || t === "ET" || t === "CS") { 28106 types[i] = "ON"; 28107 } 28108 } 28109 lastType = sor; 28110 for (i = 0; i < strLength; ++i) { 28111 t = types[i]; 28112 if (t === "EN") { 28113 types[i] = lastType === "L" ? "L" : "EN"; 28114 } else if (t === "R" || t === "L") { 28115 lastType = t; 28116 } 28117 } 28118 for (i = 0; i < strLength; ++i) { 28119 if (types[i] === "ON") { 28120 const end = findUnequal(types, i + 1, "ON"); 28121 let before = sor; 28122 if (i > 0) { 28123 before = types[i - 1]; 28124 } 28125 let after = eor; 28126 if (end + 1 < strLength) { 28127 after = types[end + 1]; 28128 } 28129 if (before !== "L") { 28130 before = "R"; 28131 } 28132 if (after !== "L") { 28133 after = "R"; 28134 } 28135 if (before === after) { 28136 setValues(types, i, end, before); 28137 } 28138 i = end - 1; 28139 } 28140 } 28141 for (i = 0; i < strLength; ++i) { 28142 if (types[i] === "ON") { 28143 types[i] = e; 28144 } 28145 } 28146 for (i = 0; i < strLength; ++i) { 28147 t = types[i]; 28148 if (isEven(levels[i])) { 28149 if (t === "R") { 28150 levels[i] += 1; 28151 } else if (t === "AN" || t === "EN") { 28152 levels[i] += 2; 28153 } 28154 } else if (t === "L" || t === "AN" || t === "EN") { 28155 levels[i] += 1; 28156 } 28157 } 28158 let highestLevel = -1; 28159 let lowestOddLevel = 99; 28160 let level; 28161 for (i = 0, ii = levels.length; i < ii; ++i) { 28162 level = levels[i]; 28163 if (highestLevel < level) {
vendor: 763 bytes, lines 28164-28195
28164 highestLevel = level; 28165 } 28166 if (lowestOddLevel > level && isOdd(level)) { 28167 lowestOddLevel = level; 28168 } 28169 } 28170 for (level = highestLevel; level >= lowestOddLevel; --level) { 28171 let start = -1; 28172 for (i = 0, ii = levels.length; i < ii; ++i) { 28173 if (levels[i] < level) { 28174 if (start >= 0) { 28175 reverseValues(chars, start, i); 28176 start = -1; 28177 } 28178 } else if (start < 0) { 28179 start = i; 28180 } 28181 } 28182 if (start >= 0) { 28183 reverseValues(chars, start, levels.length); 28184 } 28185 } 28186 for (i = 0, ii = chars.length; i < ii; ++i) { 28187 const ch = chars[i]; 28188 if (ch === "<" || ch === ">") { 28189 chars[i] = ""; 28190 } 28191 } 28192 return createBidiText(chars.join(""), isLTR); 28193} 28194 28195;// ./src/core/font_substitutions.js
vendor: 7,960 bytes, lines 28195-28460
28195 28196 28197 28198 28199const NORMAL = { 28200 style: "normal", 28201 weight: "normal" 28202}; 28203const BOLD = { 28204 style: "normal", 28205 weight: "bold" 28206}; 28207const ITALIC = { 28208 style: "italic", 28209 weight: "normal" 28210}; 28211const BOLDITALIC = { 28212 style: "italic", 28213 weight: "bold" 28214}; 28215const substitutionMap = new Map([["Times-Roman", { 28216 local: ["Times New Roman", "Times-Roman", "Times", "Liberation Serif", "Nimbus Roman", "Nimbus Roman L", "Tinos", "Thorndale", "TeX Gyre Termes", "FreeSerif", "Linux Libertine O", "Libertinus Serif", "DejaVu Serif", "Bitstream Vera Serif", "Ubuntu"], 28217 style: NORMAL, 28218 ultimate: "serif" 28219}], ["Times-Bold", { 28220 alias: "Times-Roman", 28221 style: BOLD, 28222 ultimate: "serif" 28223}], ["Times-Italic", { 28224 alias: "Times-Roman", 28225 style: ITALIC, 28226 ultimate: "serif" 28227}], ["Times-BoldItalic", { 28228 alias: "Times-Roman", 28229 style: BOLDITALIC, 28230 ultimate: "serif" 28231}], ["Helvetica", { 28232 local: ["Helvetica", "Helvetica Neue", "Arial", "Arial Nova", "Liberation Sans", "Arimo", "Nimbus Sans", "Nimbus Sans L", "A030", "TeX Gyre Heros", "FreeSans", "DejaVu Sans", "Albany", "Bitstream Vera Sans", "Arial Unicode MS", "Microsoft Sans Serif", "Apple Symbols", "Cantarell"], 28233 path: "LiberationSans-Regular.ttf", 28234 style: NORMAL, 28235 ultimate: "sans-serif" 28236}], ["Helvetica-Bold", { 28237 alias: "Helvetica", 28238 path: "LiberationSans-Bold.ttf", 28239 style: BOLD, 28240 ultimate: "sans-serif" 28241}], ["Helvetica-Oblique", { 28242 alias: "Helvetica", 28243 path: "LiberationSans-Italic.ttf", 28244 style: ITALIC, 28245 ultimate: "sans-serif" 28246}], ["Helvetica-BoldOblique", { 28247 alias: "Helvetica", 28248 path: "LiberationSans-BoldItalic.ttf", 28249 style: BOLDITALIC, 28250 ultimate: "sans-serif" 28251}], ["Courier", { 28252 local: ["Courier", "Courier New", "Liberation Mono", "Nimbus Mono", "Nimbus Mono L", "Cousine", "Cumberland", "TeX Gyre Cursor", "FreeMono", "Linux Libertine Mono O", "Libertinus Mono"], 28253 style: NORMAL, 28254 ultimate: "monospace" 28255}], ["Courier-Bold", { 28256 alias: "Courier", 28257 style: BOLD, 28258 ultimate: "monospace" 28259}], ["Courier-Oblique", { 28260 alias: "Courier", 28261 style: ITALIC, 28262 ultimate: "monospace" 28263}], ["Courier-BoldOblique", { 28264 alias: "Courier", 28265 style: BOLDITALIC, 28266 ultimate: "monospace" 28267}], ["ArialBlack", { 28268 local: ["Arial Black"], 28269 style: { 28270 style: "normal", 28271 weight: "900" 28272 }, 28273 fallback: "Helvetica-Bold" 28274}], ["ArialBlack-Bold", { 28275 alias: "ArialBlack" 28276}], ["ArialBlack-Italic", { 28277 alias: "ArialBlack", 28278 style: { 28279 style: "italic", 28280 weight: "900" 28281 }, 28282 fallback: "Helvetica-BoldOblique" 28283}], ["ArialBlack-BoldItalic", { 28284 alias: "ArialBlack-Italic" 28285}], ["ArialNarrow", { 28286 local: ["Arial Narrow", "Liberation Sans Narrow", "Helvetica Condensed", "Nimbus Sans Narrow", "TeX Gyre Heros Cn"], 28287 style: NORMAL, 28288 fallback: "Helvetica" 28289}], ["ArialNarrow-Bold", { 28290 alias: "ArialNarrow", 28291 style: BOLD, 28292 fallback: "Helvetica-Bold" 28293}], ["ArialNarrow-Italic", { 28294 alias: "ArialNarrow", 28295 style: ITALIC, 28296 fallback: "Helvetica-Oblique" 28297}], ["ArialNarrow-BoldItalic", { 28298 alias: "ArialNarrow", 28299 style: BOLDITALIC, 28300 fallback: "Helvetica-BoldOblique" 28301}], ["Calibri", { 28302 local: ["Calibri", "Carlito"], 28303 style: NORMAL, 28304 fallback: "Helvetica" 28305}], ["Calibri-Bold", { 28306 alias: "Calibri", 28307 style: BOLD, 28308 fallback: "Helvetica-Bold" 28309}], ["Calibri-Italic", { 28310 alias: "Calibri", 28311 style: ITALIC, 28312 fallback: "Helvetica-Oblique" 28313}], ["Calibri-BoldItalic", { 28314 alias: "Calibri", 28315 style: BOLDITALIC, 28316 fallback: "Helvetica-BoldOblique" 28317}], ["Wingdings", { 28318 local: ["Wingdings", "URW Dingbats"], 28319 style: NORMAL 28320}], ["Wingdings-Regular", { 28321 alias: "Wingdings" 28322}], ["Wingdings-Bold", { 28323 alias: "Wingdings" 28324}]]); 28325const fontAliases = new Map([["Arial-Black", "ArialBlack"]]); 28326function getStyleToAppend(style) { 28327 switch (style) { 28328 case BOLD: 28329 return "Bold"; 28330 case ITALIC: 28331 return "Italic"; 28332 case BOLDITALIC: 28333 return "Bold Italic"; 28334 default: 28335 if (style?.weight === "bold") { 28336 return "Bold"; 28337 } 28338 if (style?.style === "italic") { 28339 return "Italic"; 28340 } 28341 } 28342 return ""; 28343} 28344function getFamilyName(str) { 28345 const keywords = new Set(["thin", "extralight", "ultralight", "demilight", "semilight", "light", "book", "regular", "normal", "medium", "demibold", "semibold", "bold", "extrabold", "ultrabold", "black", "heavy", "extrablack", "ultrablack", "roman", "italic", "oblique", "ultracondensed", "extracondensed", "condensed", "semicondensed", "normal", "semiexpanded", "expanded", "extraexpanded", "ultraexpanded", "bolditalic"]); 28346 return str.split(/[- ,+]+/g).filter(tok => !keywords.has(tok.toLowerCase())).join(" "); 28347} 28348function generateFont({ 28349 alias, 28350 local, 28351 path, 28352 fallback, 28353 style, 28354 ultimate 28355}, src, localFontPath, useFallback = true, usePath = true, append = "") { 28356 const result = { 28357 style: null, 28358 ultimate: null 28359 }; 28360 if (local) { 28361 const extra = append ? ` ${append}` : ""; 28362 for (const name of local) { 28363 src.push(`local(${name}${extra})`); 28364 } 28365 } 28366 if (alias) { 28367 const substitution = substitutionMap.get(alias); 28368 const aliasAppend = append || getStyleToAppend(style); 28369 Object.assign(result, generateFont(substitution, src, localFontPath, useFallback && !fallback, usePath && !path, aliasAppend)); 28370 } 28371 if (style) { 28372 result.style = style; 28373 } 28374 if (ultimate) { 28375 result.ultimate = ultimate; 28376 } 28377 if (useFallback && fallback) { 28378 const fallbackInfo = substitutionMap.get(fallback); 28379 const { 28380 ultimate: fallbackUltimate 28381 } = generateFont(fallbackInfo, src, localFontPath, useFallback, usePath && !path, append); 28382 result.ultimate ||= fallbackUltimate; 28383 } 28384 if (usePath && path && localFontPath) { 28385 src.push(`url(${localFontPath}${path})`); 28386 } 28387 return result; 28388} 28389function getFontSubstitution(systemFontCache, idFactory, localFontPath, baseFontName, standardFontName, type) { 28390 if (baseFontName.startsWith("InvalidPDFjsFont_")) { 28391 return null; 28392 } 28393 if ((type === "TrueType" || type === "Type1") && /^[A-Z]{6}\+/.test(baseFontName)) { 28394 baseFontName = baseFontName.slice(7); 28395 } 28396 baseFontName = normalizeFontName(baseFontName); 28397 const key = baseFontName; 28398 let substitutionInfo = systemFontCache.get(key); 28399 if (substitutionInfo) { 28400 return substitutionInfo; 28401 } 28402 let substitution = substitutionMap.get(baseFontName); 28403 if (!substitution) { 28404 for (const [alias, subst] of fontAliases) { 28405 if (baseFontName.startsWith(alias)) { 28406 baseFontName = `${subst}${baseFontName.substring(alias.length)}`; 28407 substitution = substitutionMap.get(baseFontName); 28408 break; 28409 } 28410 } 28411 } 28412 let mustAddBaseFont = false; 28413 if (!substitution) { 28414 substitution = substitutionMap.get(standardFontName); 28415 mustAddBaseFont = true; 28416 } 28417 const loadedName = `${idFactory.getDocId()}_s${idFactory.createFontId()}`; 28418 if (!substitution) { 28419 if (!validateFontName(baseFontName)) { 28420 warn(`Cannot substitute the font because of its name: ${baseFontName}`); 28421 systemFontCache.set(key, null); 28422 return null; 28423 } 28424 const bold = /bold/gi.test(baseFontName); 28425 const italic = /oblique|italic/gi.test(baseFontName); 28426 const style = bold && italic && BOLDITALIC || bold && BOLD || italic && ITALIC || NORMAL; 28427 substitutionInfo = { 28428 css: `"${getFamilyName(baseFontName)}",${loadedName}`, 28429 guessFallback: true, 28430 loadedName, 28431 baseFontName, 28432 src: `local(${baseFontName})`, 28433 style 28434 }; 28435 systemFontCache.set(key, substitutionInfo); 28436 return substitutionInfo; 28437 } 28438 const src = []; 28439 if (mustAddBaseFont && validateFontName(baseFontName)) { 28440 src.push(`local(${baseFontName})`); 28441 } 28442 const { 28443 style, 28444 ultimate 28445 } = generateFont(substitution, src, localFontPath); 28446 const guessFallback = ultimate === null; 28447 const fallback = guessFallback ? "" : `,${ultimate}`; 28448 substitutionInfo = { 28449 css: `"${getFamilyName(baseFontName)}",${loadedName}${fallback}`, 28450 guessFallback, 28451 loadedName, 28452 baseFontName, 28453 src: src.join(","), 28454 style 28455 }; 28456 systemFontCache.set(key, substitutionInfo); 28457 return substitutionInfo; 28458} 28459 28460;// ./src/
vendor: 2,323 bytes, lines 28460-28533
28460core/image_resizer.js 28461 28462 28463 28464const MIN_IMAGE_DIM = 2048; 28465const MAX_IMAGE_DIM = 65537; 28466const MAX_ERROR = 128; 28467class ImageResizer { 28468 static #goodSquareLength = MIN_IMAGE_DIM; 28469 static #isImageDecoderSupported = FeatureTest.isImageDecoderSupported; 28470 constructor(imgData, isMask) { 28471 this._imgData = imgData; 28472 this._isMask = isMask; 28473 } 28474 static get canUseImageDecoder() { 28475 return shadow(this, "canUseImageDecoder", this.#isImageDecoderSupported ? ImageDecoder.isTypeSupported("image/bmp") : Promise.resolve(false)); 28476 } 28477 static needsToBeResized(width, height) { 28478 if (width <= this.#goodSquareLength && height <= this.#goodSquareLength) { 28479 return false; 28480 } 28481 const { 28482 MAX_DIM 28483 } = this; 28484 if (width > MAX_DIM || height > MAX_DIM) { 28485 return true; 28486 } 28487 const area = width * height; 28488 if (this._hasMaxArea) { 28489 return area > this.MAX_AREA; 28490 } 28491 if (area < this.#goodSquareLength ** 2) { 28492 return false; 28493 } 28494 if (this._areGoodDims(width, height)) { 28495 this.#goodSquareLength = Math.max(this.#goodSquareLength, Math.floor(Math.sqrt(width * height))); 28496 return false; 28497 } 28498 this.#goodSquareLength = this._guessMax(this.#goodSquareLength, MAX_DIM, MAX_ERROR, 0); 28499 const maxArea = this.MAX_AREA = this.#goodSquareLength ** 2; 28500 return area > maxArea; 28501 } 28502 static get MAX_DIM() { 28503 return shadow(this, "MAX_DIM", this._guessMax(MIN_IMAGE_DIM, MAX_IMAGE_DIM, 0, 1)); 28504 } 28505 static get MAX_AREA() { 28506 this._hasMaxArea = true; 28507 return shadow(this, "MAX_AREA", this._guessMax(this.#goodSquareLength, this.MAX_DIM, MAX_ERROR, 0) ** 2); 28508 } 28509 static set MAX_AREA(area) { 28510 if (area >= 0) { 28511 this._hasMaxArea = true; 28512 shadow(this, "MAX_AREA", area); 28513 } 28514 } 28515 static setOptions({ 28516 canvasMaxAreaInBytes = -1, 28517 isImageDecoderSupported = false 28518 }) { 28519 if (!this._hasMaxArea) { 28520 this.MAX_AREA = canvasMaxAreaInBytes >> 2; 28521 } 28522 this.#isImageDecoderSupported = isImageDecoderSupported; 28523 } 28524 static _areGoodDims(width, height) { 28525 try { 28526 const canvas = new OffscreenCanvas(width, height); 28527 const ctx = canvas.getContext("2d"); 28528 ctx.fillRect(0, 0, 1, 1); 28529 const opacity = ctx.getImageData(0, 0, 1, 1).data[3]; 28530 canvas.width = canvas.height = 1; 28531 return opacity !== 0; 28532 } catch { 28533 return false;
vendor: 5,022 bytes, lines 28534-28704
28534 } 28535 } 28536 static _guessMax(start, end, tolerance, defaultHeight) { 28537 while (start + tolerance + 1 < end) { 28538 const middle = Math.floor((start + end) / 2); 28539 const height = defaultHeight || middle; 28540 if (this._areGoodDims(middle, height)) { 28541 start = middle; 28542 } else { 28543 end = middle; 28544 } 28545 } 28546 return start; 28547 } 28548 static async createImage(imgData, isMask = false) { 28549 return new ImageResizer(imgData, isMask)._createImage(); 28550 } 28551 async _createImage() { 28552 const { 28553 _imgData: imgData 28554 } = this; 28555 const { 28556 width, 28557 height 28558 } = imgData; 28559 if (width * height * 4 > MAX_INT_32) { 28560 const result = this.#rescaleImageData(); 28561 if (result) { 28562 return result; 28563 } 28564 } 28565 const data = this._encodeBMP(); 28566 let decoder, imagePromise; 28567 if (await ImageResizer.canUseImageDecoder) { 28568 decoder = new ImageDecoder({ 28569 data, 28570 type: "image/bmp", 28571 preferAnimation: false, 28572 transfer: [data.buffer] 28573 }); 28574 imagePromise = decoder.decode().catch(reason => { 28575 warn(`BMP image decoding failed: ${reason}`); 28576 return createImageBitmap(new Blob([this._encodeBMP().buffer], { 28577 type: "image/bmp" 28578 })); 28579 }).finally(() => { 28580 decoder.close(); 28581 }); 28582 } else { 28583 imagePromise = createImageBitmap(new Blob([data.buffer], { 28584 type: "image/bmp" 28585 })); 28586 } 28587 const { 28588 MAX_AREA, 28589 MAX_DIM 28590 } = ImageResizer; 28591 const minFactor = Math.max(width / MAX_DIM, height / MAX_DIM, Math.sqrt(width * height / MAX_AREA)); 28592 const firstFactor = Math.max(minFactor, 2); 28593 const factor = Math.round(10 * (minFactor + 1.25)) / 10 / firstFactor; 28594 const N = Math.floor(Math.log2(factor)); 28595 const steps = new Array(N + 2).fill(2); 28596 steps[0] = firstFactor; 28597 steps.splice(-1, 1, factor / (1 << N)); 28598 let newWidth = width; 28599 let newHeight = height; 28600 const result = await imagePromise; 28601 let bitmap = result.image || result; 28602 for (const step of steps) { 28603 const prevWidth = newWidth; 28604 const prevHeight = newHeight; 28605 newWidth = Math.floor(newWidth / step) - 1; 28606 newHeight = Math.floor(newHeight / step) - 1; 28607 const canvas = new OffscreenCanvas(newWidth, newHeight); 28608 const ctx = canvas.getContext("2d"); 28609 ctx.drawImage(bitmap, 0, 0, prevWidth, prevHeight, 0, 0, newWidth, newHeight); 28610 bitmap.close(); 28611 bitmap = canvas.transferToImageBitmap(); 28612 } 28613 imgData.data = null; 28614 imgData.bitmap = bitmap; 28615 imgData.width = newWidth; 28616 imgData.height = newHeight; 28617 return imgData; 28618 } 28619 #rescaleImageData() { 28620 const { 28621 _imgData: imgData 28622 } = this; 28623 const { 28624 data, 28625 width, 28626 height, 28627 kind 28628 } = imgData; 28629 const rgbaSize = width * height * 4; 28630 const K = Math.ceil(Math.log2(rgbaSize / MAX_INT_32)); 28631 const newWidth = width >> K; 28632 const newHeight = height >> K; 28633 let rgbaData; 28634 let maxHeight = height; 28635 try { 28636 rgbaData = new Uint8Array(rgbaSize); 28637 } catch { 28638 let n = Math.floor(Math.log2(rgbaSize + 1)); 28639 while (true) { 28640 try { 28641 rgbaData = new Uint8Array(2 ** n - 1); 28642 break; 28643 } catch { 28644 n -= 1; 28645 } 28646 } 28647 maxHeight = Math.floor((2 ** n - 1) / (width * 4)); 28648 const newSize = width * maxHeight * 4; 28649 if (newSize < rgbaData.length) { 28650 rgbaData = new Uint8Array(newSize); 28651 } 28652 } 28653 const src32 = new Uint32Array(rgbaData.buffer); 28654 const dest32 = new Uint32Array(newWidth * newHeight); 28655 let srcPos = 0; 28656 let newIndex = 0; 28657 const step = Math.ceil(height / maxHeight); 28658 const remainder = height % maxHeight === 0 ? height : height % maxHeight; 28659 for (let k = 0; k < step; k++) { 28660 const h = k < step - 1 ? maxHeight : remainder; 28661 ({ 28662 srcPos 28663 } = convertToRGBA({ 28664 kind, 28665 src: data, 28666 dest: src32, 28667 width, 28668 height: h, 28669 inverseDecode: this._isMask, 28670 srcPos 28671 })); 28672 for (let i = 0, ii = h >> K; i < ii; i++) { 28673 const buf = src32.subarray((i << K) * width); 28674 for (let j = 0; j < newWidth; j++) { 28675 dest32[newIndex++] = buf[j << K]; 28676 } 28677 } 28678 } 28679 if (ImageResizer.needsToBeResized(newWidth, newHeight)) { 28680 imgData.data = dest32; 28681 imgData.width = newWidth; 28682 imgData.height = newHeight; 28683 imgData.kind = ImageKind.RGBA_32BPP; 28684 return null; 28685 } 28686 const canvas = new OffscreenCanvas(newWidth, newHeight); 28687 const ctx = canvas.getContext("2d", { 28688 willReadFrequently: true 28689 }); 28690 ctx.putImageData(new ImageData(new Uint8ClampedArray(dest32.buffer), newWidth, newHeight), 0, 0); 28691 imgData.data = null; 28692 imgData.bitmap = canvas.transferToImageBitmap(); 28693 imgData.width = newWidth; 28694 imgData.height = newHeight; 28695 return imgData; 28696 } 28697 _encodeBMP() { 28698 const { 28699 width, 28700 height, 28701 kind 28702 } = this._imgData; 28703 let data = this._imgData.data; 28704 let bitPerPixel;
vendor: 4,860 bytes, lines 28705-28858
28705 let colorTable = new Uint8Array(0); 28706 let maskTable = colorTable; 28707 let compression = 0; 28708 switch (kind) { 28709 case ImageKind.GRAYSCALE_1BPP: 28710 { 28711 bitPerPixel = 1; 28712 colorTable = new Uint8Array(this._isMask ? [255, 255, 255, 255, 0, 0, 0, 0] : [0, 0, 0, 0, 255, 255, 255, 255]); 28713 const rowLen = width + 7 >> 3; 28714 const rowSize = rowLen + 3 & -4; 28715 if (rowLen !== rowSize) { 28716 const newData = new Uint8Array(rowSize * height); 28717 let k = 0; 28718 for (let i = 0, ii = height * rowLen; i < ii; i += rowLen, k += rowSize) { 28719 newData.set(data.subarray(i, i + rowLen), k); 28720 } 28721 data = newData; 28722 } 28723 break; 28724 } 28725 case ImageKind.RGB_24BPP: 28726 { 28727 bitPerPixel = 24; 28728 if (width & 3) { 28729 const rowLen = 3 * width; 28730 const rowSize = rowLen + 3 & -4; 28731 const extraLen = rowSize - rowLen; 28732 const newData = new Uint8Array(rowSize * height); 28733 let k = 0; 28734 for (let i = 0, ii = height * rowLen; i < ii; i += rowLen) { 28735 const row = data.subarray(i, i + rowLen); 28736 for (let j = 0; j < rowLen; j += 3) { 28737 newData[k++] = row[j + 2]; 28738 newData[k++] = row[j + 1]; 28739 newData[k++] = row[j]; 28740 } 28741 k += extraLen; 28742 } 28743 data = newData; 28744 } else { 28745 for (let i = 0, ii = data.length; i < ii; i += 3) { 28746 const tmp = data[i]; 28747 data[i] = data[i + 2]; 28748 data[i + 2] = tmp; 28749 } 28750 } 28751 break; 28752 } 28753 case ImageKind.RGBA_32BPP: 28754 bitPerPixel = 32; 28755 compression = 3; 28756 maskTable = new Uint8Array(4 + 4 + 4 + 4 + 52); 28757 const view = new DataView(maskTable.buffer); 28758 if (FeatureTest.isLittleEndian) { 28759 view.setUint32(0, 0x000000ff, true); 28760 view.setUint32(4, 0x0000ff00, true); 28761 view.setUint32(8, 0x00ff0000, true); 28762 view.setUint32(12, 0xff000000, true); 28763 } else { 28764 view.setUint32(0, 0xff000000, true); 28765 view.setUint32(4, 0x00ff0000, true); 28766 view.setUint32(8, 0x0000ff00, true); 28767 view.setUint32(12, 0x000000ff, true); 28768 } 28769 break; 28770 default: 28771 throw new Error("invalid format"); 28772 } 28773 let i = 0; 28774 const headerLength = 40 + maskTable.length; 28775 const fileLength = 14 + headerLength + colorTable.length + data.length; 28776 const bmpData = new Uint8Array(fileLength); 28777 const view = new DataView(bmpData.buffer); 28778 view.setUint16(i, 0x4d42, true); 28779 i += 2; 28780 view.setUint32(i, fileLength, true); 28781 i += 4; 28782 view.setUint32(i, 0, true); 28783 i += 4; 28784 view.setUint32(i, 14 + headerLength + colorTable.length, true); 28785 i += 4; 28786 view.setUint32(i, headerLength, true); 28787 i += 4; 28788 view.setInt32(i, width, true); 28789 i += 4; 28790 view.setInt32(i, -height, true); 28791 i += 4; 28792 view.setUint16(i, 1, true); 28793 i += 2; 28794 view.setUint16(i, bitPerPixel, true); 28795 i += 2; 28796 view.setUint32(i, compression, true); 28797 i += 4; 28798 view.setUint32(i, 0, true); 28799 i += 4; 28800 view.setInt32(i, 0, true); 28801 i += 4; 28802 view.setInt32(i, 0, true); 28803 i += 4; 28804 view.setUint32(i, colorTable.length / 4, true); 28805 i += 4; 28806 view.setUint32(i, 0, true); 28807 i += 4; 28808 bmpData.set(maskTable, i); 28809 i += maskTable.length; 28810 bmpData.set(colorTable, i); 28811 i += colorTable.length; 28812 bmpData.set(data, i); 28813 return bmpData; 28814 } 28815} 28816 28817;// ./src/shared/murmurhash3.js 28818const SEED = 0xc3d2e1f0; 28819const MASK_HIGH = 0xffff0000; 28820const MASK_LOW = 0xffff; 28821class MurmurHash3_64 { 28822 constructor(seed) { 28823 this.h1 = seed ? seed & 0xffffffff : SEED; 28824 this.h2 = seed ? seed & 0xffffffff : SEED; 28825 } 28826 update(input) { 28827 let data, length; 28828 if (typeof input === "string") { 28829 data = new Uint8Array(input.length * 2); 28830 length = 0; 28831 for (let i = 0, ii = input.length; i < ii; i++) { 28832 const code = input.charCodeAt(i); 28833 if (code <= 0xff) { 28834 data[length++] = code; 28835 } else { 28836 data[length++] = code >>> 8; 28837 data[length++] = code & 0xff; 28838 } 28839 } 28840 } else if (ArrayBuffer.isView(input)) { 28841 data = input.slice(); 28842 length = data.byteLength; 28843 } else { 28844 throw new Error("Invalid data format, must be a string or TypedArray."); 28845 } 28846 const blockCounts = length >> 2; 28847 const tailLength = length - blockCounts * 4; 28848 const dataUint32 = new Uint32Array(data.buffer, 0, blockCounts); 28849 let k1 = 0, 28850 k2 = 0; 28851 let h1 = this.h1, 28852 h2 = this.h2; 28853 const C1 = 0xcc9e2d51, 28854 C2 = 0x1b873593; 28855 const C1_LOW = C1 & MASK_LOW, 28856 C2_LOW = C2 & MASK_LOW; 28857 for (let i = 0; i < blockCounts; i++) { 28858 if (i & 1) {
vendor: 1,644 bytes, lines 28859-28910
28859 k1 = dataUint32[i]; 28860 k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW; 28861 k1 = k1 << 15 | k1 >>> 17; 28862 k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW; 28863 h1 ^= k1; 28864 h1 = h1 << 13 | h1 >>> 19; 28865 h1 = h1 * 5 + 0xe6546b64; 28866 } else { 28867 k2 = dataUint32[i]; 28868 k2 = k2 * C1 & MASK_HIGH | k2 * C1_LOW & MASK_LOW; 28869 k2 = k2 << 15 | k2 >>> 17; 28870 k2 = k2 * C2 & MASK_HIGH | k2 * C2_LOW & MASK_LOW; 28871 h2 ^= k2; 28872 h2 = h2 << 13 | h2 >>> 19; 28873 h2 = h2 * 5 + 0xe6546b64; 28874 } 28875 } 28876 k1 = 0; 28877 switch (tailLength) { 28878 case 3: 28879 k1 ^= data[blockCounts * 4 + 2] << 16; 28880 case 2: 28881 k1 ^= data[blockCounts * 4 + 1] << 8; 28882 case 1: 28883 k1 ^= data[blockCounts * 4]; 28884 k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW; 28885 k1 = k1 << 15 | k1 >>> 17; 28886 k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW; 28887 if (blockCounts & 1) { 28888 h1 ^= k1; 28889 } else { 28890 h2 ^= k1; 28891 } 28892 } 28893 this.h1 = h1; 28894 this.h2 = h2; 28895 } 28896 hexdigest() { 28897 let h1 = this.h1, 28898 h2 = this.h2; 28899 h1 ^= h2 >>> 1; 28900 h1 = h1 * 0xed558ccd & MASK_HIGH | h1 * 0x8ccd & MASK_LOW; 28901 h2 = h2 * 0xff51afd7 & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xafd7ed55 & MASK_HIGH) >>> 16; 28902 h1 ^= h2 >>> 1; 28903 h1 = h1 * 0x1a85ec53 & MASK_HIGH | h1 * 0xec53 & MASK_LOW; 28904 h2 = h2 * 0xc4ceb9fe & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xb9fe1a85 & MASK_HIGH) >>> 16; 28905 h1 ^= h2 >>> 1; 28906 return (h1 >>> 0).toString(16).padStart(8, "0") + (h2 >>> 0).toString(16).padStart(8, "0"); 28907 } 28908} 28909 28910;// ./src/core/operator_list.js
vendor: 12,132 bytes, lines 28910-29229
28910 28911 28912function addState(parentState, pattern, checkFn, iterateFn, processFn) { 28913 let state = parentState; 28914 for (let i = 0, ii = pattern.length - 1; i < ii; i++) { 28915 const item = pattern[i]; 28916 state = state[item] ||= []; 28917 } 28918 state[pattern.at(-1)] = { 28919 checkFn, 28920 iterateFn, 28921 processFn 28922 }; 28923} 28924const InitialState = []; 28925addState(InitialState, [OPS.save, OPS.transform, OPS.paintInlineImageXObject, OPS.restore], null, function iterateInlineImageGroup(context, i) { 28926 const fnArray = context.fnArray; 28927 const iFirstSave = context.iCurr - 3; 28928 const pos = (i - iFirstSave) % 4; 28929 switch (pos) { 28930 case 0: 28931 return fnArray[i] === OPS.save; 28932 case 1: 28933 return fnArray[i] === OPS.transform; 28934 case 2: 28935 return fnArray[i] === OPS.paintInlineImageXObject; 28936 case 3: 28937 return fnArray[i] === OPS.restore; 28938 } 28939 throw new Error(`iterateInlineImageGroup - invalid pos: ${pos}`); 28940}, function foundInlineImageGroup(context, i) { 28941 const MIN_IMAGES_IN_INLINE_IMAGES_BLOCK = 10; 28942 const MAX_IMAGES_IN_INLINE_IMAGES_BLOCK = 200; 28943 const MAX_WIDTH = 1000; 28944 const IMAGE_PADDING = 1; 28945 const fnArray = context.fnArray, 28946 argsArray = context.argsArray; 28947 const curr = context.iCurr; 28948 const iFirstSave = curr - 3; 28949 const iFirstTransform = curr - 2; 28950 const iFirstPIIXO = curr - 1; 28951 const count = Math.min(Math.floor((i - iFirstSave) / 4), MAX_IMAGES_IN_INLINE_IMAGES_BLOCK); 28952 if (count < MIN_IMAGES_IN_INLINE_IMAGES_BLOCK) { 28953 return i - (i - iFirstSave) % 4; 28954 } 28955 let maxX = 0; 28956 const map = []; 28957 let maxLineHeight = 0; 28958 let currentX = IMAGE_PADDING, 28959 currentY = IMAGE_PADDING; 28960 for (let q = 0; q < count; q++) { 28961 const transform = argsArray[iFirstTransform + (q << 2)]; 28962 const img = argsArray[iFirstPIIXO + (q << 2)][0]; 28963 if (currentX + img.width > MAX_WIDTH) { 28964 maxX = Math.max(maxX, currentX); 28965 currentY += maxLineHeight + 2 * IMAGE_PADDING; 28966 currentX = 0; 28967 maxLineHeight = 0; 28968 } 28969 map.push({ 28970 transform, 28971 x: currentX, 28972 y: currentY, 28973 w: img.width, 28974 h: img.height 28975 }); 28976 currentX += img.width + 2 * IMAGE_PADDING; 28977 maxLineHeight = Math.max(maxLineHeight, img.height); 28978 } 28979 const imgWidth = Math.max(maxX, currentX) + IMAGE_PADDING; 28980 const imgHeight = currentY + maxLineHeight + IMAGE_PADDING; 28981 const imgData = new Uint8Array(imgWidth * imgHeight * 4); 28982 const imgRowSize = imgWidth << 2; 28983 for (let q = 0; q < count; q++) { 28984 const data = argsArray[iFirstPIIXO + (q << 2)][0].data; 28985 const rowSize = map[q].w << 2; 28986 let dataOffset = 0; 28987 let offset = map[q].x + map[q].y * imgWidth << 2; 28988 imgData.set(data.subarray(0, rowSize), offset - imgRowSize); 28989 for (let k = 0, kk = map[q].h; k < kk; k++) { 28990 imgData.set(data.subarray(dataOffset, dataOffset + rowSize), offset); 28991 dataOffset += rowSize; 28992 offset += imgRowSize; 28993 } 28994 imgData.set(data.subarray(dataOffset - rowSize, dataOffset), offset); 28995 while (offset >= 0) { 28996 data[offset - 4] = data[offset]; 28997 data[offset - 3] = data[offset + 1]; 28998 data[offset - 2] = data[offset + 2]; 28999 data[offset - 1] = data[offset + 3]; 29000 data[offset + rowSize] = data[offset + rowSize - 4]; 29001 data[offset + rowSize + 1] = data[offset + rowSize - 3]; 29002 data[offset + rowSize + 2] = data[offset + rowSize - 2]; 29003 data[offset + rowSize + 3] = data[offset + rowSize - 1]; 29004 offset -= imgRowSize; 29005 } 29006 } 29007 const img = { 29008 width: imgWidth, 29009 height: imgHeight 29010 }; 29011 if (context.isOffscreenCanvasSupported) { 29012 const canvas = new OffscreenCanvas(imgWidth, imgHeight); 29013 const ctx = canvas.getContext("2d"); 29014 ctx.putImageData(new ImageData(new Uint8ClampedArray(imgData.buffer), imgWidth, imgHeight), 0, 0); 29015 img.bitmap = canvas.transferToImageBitmap(); 29016 img.data = null; 29017 } else { 29018 img.kind = ImageKind.RGBA_32BPP; 29019 img.data = imgData; 29020 } 29021 fnArray.splice(iFirstSave, count * 4, OPS.paintInlineImageXObjectGroup); 29022 argsArray.splice(iFirstSave, count * 4, [img, map]); 29023 return iFirstSave + 1; 29024}); 29025addState(InitialState, [OPS.save, OPS.transform, OPS.paintImageMaskXObject, OPS.restore], null, function iterateImageMaskGroup(context, i) { 29026 const fnArray = context.fnArray; 29027 const iFirstSave = context.iCurr - 3; 29028 const pos = (i - iFirstSave) % 4; 29029 switch (pos) { 29030 case 0: 29031 return fnArray[i] === OPS.save; 29032 case 1: 29033 return fnArray[i] === OPS.transform; 29034 case 2: 29035 return fnArray[i] === OPS.paintImageMaskXObject; 29036 case 3: 29037 return fnArray[i] === OPS.restore; 29038 } 29039 throw new Error(`iterateImageMaskGroup - invalid pos: ${pos}`); 29040}, function foundImageMaskGroup(context, i) { 29041 const MIN_IMAGES_IN_MASKS_BLOCK = 10; 29042 const MAX_IMAGES_IN_MASKS_BLOCK = 100; 29043 const MAX_SAME_IMAGES_IN_MASKS_BLOCK = 1000; 29044 const fnArray = context.fnArray, 29045 argsArray = context.argsArray; 29046 const curr = context.iCurr; 29047 const iFirstSave = curr - 3; 29048 const iFirstTransform = curr - 2; 29049 const iFirstPIMXO = curr - 1; 29050 let count = Math.floor((i - iFirstSave) / 4); 29051 if (count < MIN_IMAGES_IN_MASKS_BLOCK) { 29052 return i - (i - iFirstSave) % 4; 29053 } 29054 let isSameImage = false; 29055 let iTransform, transformArgs; 29056 const firstPIMXOArg0 = argsArray[iFirstPIMXO][0]; 29057 const firstTransformArg0 = argsArray[iFirstTransform][0], 29058 firstTransformArg1 = argsArray[iFirstTransform][1], 29059 firstTransformArg2 = argsArray[iFirstTransform][2], 29060 firstTransformArg3 = argsArray[iFirstTransform][3]; 29061 if (firstTransformArg1 === firstTransformArg2) { 29062 isSameImage = true; 29063 iTransform = iFirstTransform + 4; 29064 let iPIMXO = iFirstPIMXO + 4; 29065 for (let q = 1; q < count; q++, iTransform += 4, iPIMXO += 4) { 29066 transformArgs = argsArray[iTransform]; 29067 if (argsArray[iPIMXO][0] !== firstPIMXOArg0 || transformArgs[0] !== firstTransformArg0 || transformArgs[1] !== firstTransformArg1 || transformArgs[2] !== firstTransformArg2 || transformArgs[3] !== firstTransformArg3) { 29068 if (q < MIN_IMAGES_IN_MASKS_BLOCK) { 29069 isSameImage = false; 29070 } else { 29071 count = q; 29072 } 29073 break; 29074 } 29075 } 29076 } 29077 if (isSameImage) { 29078 count = Math.min(count, MAX_SAME_IMAGES_IN_MASKS_BLOCK); 29079 const positions = new Float32Array(count * 2); 29080 iTransform = iFirstTransform; 29081 for (let q = 0; q < count; q++, iTransform += 4) { 29082 transformArgs = argsArray[iTransform]; 29083 positions[q << 1] = transformArgs[4]; 29084 positions[(q << 1) + 1] = transformArgs[5]; 29085 } 29086 fnArray.splice(iFirstSave, count * 4, OPS.paintImageMaskXObjectRepeat); 29087 argsArray.splice(iFirstSave, count * 4, [firstPIMXOArg0, firstTransformArg0, firstTransformArg1, firstTransformArg2, firstTransformArg3, positions]); 29088 } else { 29089 count = Math.min(count, MAX_IMAGES_IN_MASKS_BLOCK); 29090 const images = []; 29091 for (let q = 0; q < count; q++) { 29092 transformArgs = argsArray[iFirstTransform + (q << 2)]; 29093 const maskParams = argsArray[iFirstPIMXO + (q << 2)][0]; 29094 images.push({ 29095 data: maskParams.data, 29096 width: maskParams.width, 29097 height: maskParams.height, 29098 interpolate: maskParams.interpolate, 29099 count: maskParams.count, 29100 transform: transformArgs 29101 }); 29102 } 29103 fnArray.splice(iFirstSave, count * 4, OPS.paintImageMaskXObjectGroup); 29104 argsArray.splice(iFirstSave, count * 4, [images]); 29105 } 29106 return iFirstSave + 1; 29107}); 29108addState(InitialState, [OPS.save, OPS.transform, OPS.paintImageXObject, OPS.restore], function (context) { 29109 const argsArray = context.argsArray; 29110 const iFirstTransform = context.iCurr - 2; 29111 return argsArray[iFirstTransform][1] === 0 && argsArray[iFirstTransform][2] === 0; 29112}, function iterateImageGroup(context, i) { 29113 const fnArray = context.fnArray, 29114 argsArray = context.argsArray; 29115 const iFirstSave = context.iCurr - 3; 29116 const pos = (i - iFirstSave) % 4; 29117 switch (pos) { 29118 case 0: 29119 return fnArray[i] === OPS.save; 29120 case 1: 29121 if (fnArray[i] !== OPS.transform) { 29122 return false; 29123 } 29124 const iFirstTransform = context.iCurr - 2; 29125 const firstTransformArg0 = argsArray[iFirstTransform][0]; 29126 const firstTransformArg3 = argsArray[iFirstTransform][3]; 29127 if (argsArray[i][0] !== firstTransformArg0 || argsArray[i][1] !== 0 || argsArray[i][2] !== 0 || argsArray[i][3] !== firstTransformArg3) { 29128 return false; 29129 } 29130 return true; 29131 case 2: 29132 if (fnArray[i] !== OPS.paintImageXObject) { 29133 return false; 29134 } 29135 const iFirstPIXO = context.iCurr - 1; 29136 const firstPIXOArg0 = argsArray[iFirstPIXO][0]; 29137 if (argsArray[i][0] !== firstPIXOArg0) { 29138 return false; 29139 } 29140 return true; 29141 case 3: 29142 return fnArray[i] === OPS.restore; 29143 } 29144 throw new Error(`iterateImageGroup - invalid pos: ${pos}`); 29145}, function (context, i) { 29146 const MIN_IMAGES_IN_BLOCK = 3; 29147 const MAX_IMAGES_IN_BLOCK = 1000; 29148 const fnArray = context.fnArray, 29149 argsArray = context.argsArray; 29150 const curr = context.iCurr; 29151 const iFirstSave = curr - 3; 29152 const iFirstTransform = curr - 2; 29153 const iFirstPIXO = curr - 1; 29154 const firstPIXOArg0 = argsArray[iFirstPIXO][0]; 29155 const firstTransformArg0 = argsArray[iFirstTransform][0]; 29156 const firstTransformArg3 = argsArray[iFirstTransform][3]; 29157 const count = Math.min(Math.floor((i - iFirstSave) / 4), MAX_IMAGES_IN_BLOCK); 29158 if (count < MIN_IMAGES_IN_BLOCK) { 29159 return i - (i - iFirstSave) % 4; 29160 } 29161 const positions = new Float32Array(count * 2); 29162 let iTransform = iFirstTransform; 29163 for (let q = 0; q < count; q++, iTransform += 4) { 29164 const transformArgs = argsArray[iTransform]; 29165 positions[q << 1] = transformArgs[4]; 29166 positions[(q << 1) + 1] = transformArgs[5]; 29167 } 29168 const args = [firstPIXOArg0, firstTransformArg0, firstTransformArg3, positions]; 29169 fnArray.splice(iFirstSave, count * 4, OPS.paintImageXObjectRepeat); 29170 argsArray.splice(iFirstSave, count * 4, args); 29171 return iFirstSave + 1; 29172}); 29173addState(InitialState, [OPS.beginText, OPS.setFont, OPS.setTextMatrix, OPS.showText, OPS.endText], null, function iterateShowTextGroup(context, i) { 29174 const fnArray = context.fnArray, 29175 argsArray = context.argsArray; 29176 const iFirstSave = context.iCurr - 4; 29177 const pos = (i - iFirstSave) % 5; 29178 switch (pos) { 29179 case 0: 29180 return fnArray[i] === OPS.beginText; 29181 case 1: 29182 return fnArray[i] === OPS.setFont; 29183 case 2: 29184 return fnArray[i] === OPS.setTextMatrix; 29185 case 3: 29186 if (fnArray[i] !== OPS.showText) { 29187 return false; 29188 } 29189 const iFirstSetFont = context.iCurr - 3; 29190 const firstSetFontArg0 = argsArray[iFirstSetFont][0]; 29191 const firstSetFontArg1 = argsArray[iFirstSetFont][1]; 29192 if (argsArray[i][0] !== firstSetFontArg0 || argsArray[i][1] !== firstSetFontArg1) { 29193 return false; 29194 } 29195 return true; 29196 case 4: 29197 return fnArray[i] === OPS.endText; 29198 } 29199 throw new Error(`iterateShowTextGroup - invalid pos: ${pos}`); 29200}, function (context, i) { 29201 const MIN_CHARS_IN_BLOCK = 3; 29202 const MAX_CHARS_IN_BLOCK = 1000; 29203 const fnArray = context.fnArray, 29204 argsArray = context.argsArray; 29205 const curr = context.iCurr; 29206 const iFirstBeginText = curr - 4; 29207 const iFirstSetFont = curr - 3; 29208 const iFirstSetTextMatrix = curr - 2; 29209 const iFirstShowText = curr - 1; 29210 const iFirstEndText = curr; 29211 const firstSetFontArg0 = argsArray[iFirstSetFont][0]; 29212 const firstSetFontArg1 = argsArray[iFirstSetFont][1]; 29213 let count = Math.min(Math.floor((i - iFirstBeginText) / 5), MAX_CHARS_IN_BLOCK); 29214 if (count < MIN_CHARS_IN_BLOCK) { 29215 return i - (i - iFirstBeginText) % 5; 29216 } 29217 let iFirst = iFirstBeginText; 29218 if (iFirstBeginText >= 4 && fnArray[iFirstBeginText - 4] === fnArray[iFirstSetFont] && fnArray[iFirstBeginText - 3] === fnArray[iFirstSetTextMatrix] && fnArray[iFirstBeginText - 2] === fnArray[iFirstShowText] && fnArray[iFirstBeginText - 1] === fnArray[iFirstEndText] && argsArray[iFirstBeginText - 4][0] === firstSetFontArg0 && argsArray[iFirstBeginText - 4][1] === firstSetFontArg1) { 29219 count++; 29220 iFirst -= 5; 29221 } 29222 let iEndText = iFirst + 4; 29223 for (let q = 1; q < count; q++) { 29224 fnArray.splice(iEndText, 3); 29225 argsArray.splice(iEndText, 3); 29226 iEndText += 2; 29227 } 29228 return iEndText + 1; 29229});
vendor: 10,067 bytes, lines 29230-29600
29230class NullOptimizer { 29231 constructor(queue) { 29232 this.queue = queue; 29233 } 29234 _optimize() {} 29235 push(fn, args) { 29236 this.queue.fnArray.push(fn); 29237 this.queue.argsArray.push(args); 29238 this._optimize(); 29239 } 29240 flush() {} 29241 reset() {} 29242} 29243class QueueOptimizer extends NullOptimizer { 29244 constructor(queue) { 29245 super(queue); 29246 this.state = null; 29247 this.context = { 29248 iCurr: 0, 29249 fnArray: queue.fnArray, 29250 argsArray: queue.argsArray, 29251 isOffscreenCanvasSupported: false 29252 }; 29253 this.match = null; 29254 this.lastProcessed = 0; 29255 } 29256 set isOffscreenCanvasSupported(value) { 29257 this.context.isOffscreenCanvasSupported = value; 29258 } 29259 _optimize() { 29260 const fnArray = this.queue.fnArray; 29261 let i = this.lastProcessed, 29262 ii = fnArray.length; 29263 let state = this.state; 29264 let match = this.match; 29265 if (!state && !match && i + 1 === ii && !InitialState[fnArray[i]]) { 29266 this.lastProcessed = ii; 29267 return; 29268 } 29269 const context = this.context; 29270 while (i < ii) { 29271 if (match) { 29272 const iterate = (0, match.iterateFn)(context, i); 29273 if (iterate) { 29274 i++; 29275 continue; 29276 } 29277 i = (0, match.processFn)(context, i + 1); 29278 ii = fnArray.length; 29279 match = null; 29280 state = null; 29281 if (i >= ii) { 29282 break; 29283 } 29284 } 29285 state = (state || InitialState)[fnArray[i]]; 29286 if (!state || Array.isArray(state)) { 29287 i++; 29288 continue; 29289 } 29290 context.iCurr = i; 29291 i++; 29292 if (state.checkFn && !(0, state.checkFn)(context)) { 29293 state = null; 29294 continue; 29295 } 29296 match = state; 29297 state = null; 29298 } 29299 this.state = state; 29300 this.match = match; 29301 this.lastProcessed = i; 29302 } 29303 flush() { 29304 while (this.match) { 29305 const length = this.queue.fnArray.length; 29306 this.lastProcessed = (0, this.match.processFn)(this.context, length); 29307 this.match = null; 29308 this.state = null; 29309 this._optimize(); 29310 } 29311 } 29312 reset() { 29313 this.state = null; 29314 this.match = null; 29315 this.lastProcessed = 0; 29316 } 29317} 29318class OperatorList { 29319 static CHUNK_SIZE = 1000; 29320 static CHUNK_SIZE_ABOUT = this.CHUNK_SIZE - 5; 29321 constructor(intent = 0, streamSink) { 29322 this._streamSink = streamSink; 29323 this.fnArray = []; 29324 this.argsArray = []; 29325 this.optimizer = streamSink && !(intent & RenderingIntentFlag.OPLIST) ? new QueueOptimizer(this) : new NullOptimizer(this); 29326 this.dependencies = new Set(); 29327 this._totalLength = 0; 29328 this.weight = 0; 29329 this._resolved = streamSink ? null : Promise.resolve(); 29330 } 29331 set isOffscreenCanvasSupported(value) { 29332 this.optimizer.isOffscreenCanvasSupported = value; 29333 } 29334 get length() { 29335 return this.argsArray.length; 29336 } 29337 get ready() { 29338 return this._resolved || this._streamSink.ready; 29339 } 29340 get totalLength() { 29341 return this._totalLength + this.length; 29342 } 29343 addOp(fn, args) { 29344 this.optimizer.push(fn, args); 29345 this.weight++; 29346 if (this._streamSink) { 29347 if (this.weight >= OperatorList.CHUNK_SIZE) { 29348 this.flush(); 29349 } else if (this.weight >= OperatorList.CHUNK_SIZE_ABOUT && (fn === OPS.restore || fn === OPS.endText)) { 29350 this.flush(); 29351 } 29352 } 29353 } 29354 addImageOps(fn, args, optionalContent, hasMask = false) { 29355 if (hasMask) { 29356 this.addOp(OPS.save); 29357 this.addOp(OPS.setGState, [[["SMask", false]]]); 29358 } 29359 if (optionalContent !== undefined) { 29360 this.addOp(OPS.beginMarkedContentProps, ["OC", optionalContent]); 29361 } 29362 this.addOp(fn, args); 29363 if (optionalContent !== undefined) { 29364 this.addOp(OPS.endMarkedContent, []); 29365 } 29366 if (hasMask) { 29367 this.addOp(OPS.restore); 29368 } 29369 } 29370 addDependency(dependency) { 29371 if (this.dependencies.has(dependency)) { 29372 return; 29373 } 29374 this.dependencies.add(dependency); 29375 this.addOp(OPS.dependency, [dependency]); 29376 } 29377 addDependencies(dependencies) { 29378 for (const dependency of dependencies) { 29379 this.addDependency(dependency); 29380 } 29381 } 29382 addOpList(opList) { 29383 if (!(opList instanceof OperatorList)) { 29384 warn('addOpList - ignoring invalid "opList" parameter.'); 29385 return; 29386 } 29387 for (const dependency of opList.dependencies) { 29388 this.dependencies.add(dependency); 29389 } 29390 for (let i = 0, ii = opList.length; i < ii; i++) { 29391 this.addOp(opList.fnArray[i], opList.argsArray[i]); 29392 } 29393 } 29394 getIR() { 29395 return { 29396 fnArray: this.fnArray, 29397 argsArray: this.argsArray, 29398 length: this.length 29399 }; 29400 } 29401 get _transfers() { 29402 const transfers = []; 29403 const { 29404 fnArray, 29405 argsArray, 29406 length 29407 } = this; 29408 for (let i = 0; i < length; i++) { 29409 switch (fnArray[i]) { 29410 case OPS.paintInlineImageXObject: 29411 case OPS.paintInlineImageXObjectGroup: 29412 case OPS.paintImageMaskXObject: 29413 const arg = argsArray[i][0]; 29414 if (!arg.cached && arg.data?.buffer instanceof ArrayBuffer) { 29415 transfers.push(arg.data.buffer); 29416 } 29417 break; 29418 } 29419 } 29420 return transfers; 29421 } 29422 flush(lastChunk = false, separateAnnots = null) { 29423 this.optimizer.flush(); 29424 const length = this.length; 29425 this._totalLength += length; 29426 this._streamSink.enqueue({ 29427 fnArray: this.fnArray, 29428 argsArray: this.argsArray, 29429 lastChunk, 29430 separateAnnots, 29431 length 29432 }, 1, this._transfers); 29433 this.dependencies.clear(); 29434 this.fnArray.length = 0; 29435 this.argsArray.length = 0; 29436 this.weight = 0; 29437 this.optimizer.reset(); 29438 } 29439} 29440 29441;// ./src/core/image.js 29442 29443 29444 29445 29446 29447 29448 29449 29450 29451function decodeAndClamp(value, addend, coefficient, max) { 29452 value = addend + value * coefficient; 29453 if (value < 0) { 29454 value = 0; 29455 } else if (value > max) { 29456 value = max; 29457 } 29458 return value; 29459} 29460function resizeImageMask(src, bpc, w1, h1, w2, h2) { 29461 const length = w2 * h2; 29462 let dest; 29463 if (bpc <= 8) { 29464 dest = new Uint8Array(length); 29465 } else if (bpc <= 16) { 29466 dest = new Uint16Array(length); 29467 } else { 29468 dest = new Uint32Array(length); 29469 } 29470 const xRatio = w1 / w2; 29471 const yRatio = h1 / h2; 29472 let i, 29473 j, 29474 py, 29475 newIndex = 0, 29476 oldIndex; 29477 const xScaled = new Uint16Array(w2); 29478 const w1Scanline = w1; 29479 for (i = 0; i < w2; i++) { 29480 xScaled[i] = Math.floor(i * xRatio); 29481 } 29482 for (i = 0; i < h2; i++) { 29483 py = Math.floor(i * yRatio) * w1Scanline; 29484 for (j = 0; j < w2; j++) { 29485 oldIndex = py + xScaled[j]; 29486 dest[newIndex++] = src[oldIndex]; 29487 } 29488 } 29489 return dest; 29490} 29491class PDFImage { 29492 constructor({ 29493 xref, 29494 res, 29495 image, 29496 isInline = false, 29497 smask = null, 29498 mask = null, 29499 isMask = false, 29500 pdfFunctionFactory, 29501 localColorSpaceCache 29502 }) { 29503 this.image = image; 29504 const dict = image.dict; 29505 const filter = dict.get("F", "Filter"); 29506 let filterName; 29507 if (filter instanceof Name) { 29508 filterName = filter.name; 29509 } else if (Array.isArray(filter)) { 29510 const filterZero = xref.fetchIfRef(filter[0]); 29511 if (filterZero instanceof Name) { 29512 filterName = filterZero.name; 29513 } 29514 } 29515 switch (filterName) { 29516 case "JPXDecode": 29517 ({ 29518 width: image.width, 29519 height: image.height, 29520 componentsCount: image.numComps, 29521 bitsPerComponent: image.bitsPerComponent 29522 } = JpxImage.parseImageProperties(image.stream)); 29523 image.stream.reset(); 29524 this.jpxDecoderOptions = { 29525 numComponents: 0, 29526 isIndexedColormap: false, 29527 smaskInData: dict.has("SMaskInData") 29528 }; 29529 break; 29530 case "JBIG2Decode": 29531 image.bitsPerComponent = 1; 29532 image.numComps = 1; 29533 break; 29534 } 29535 let width = dict.get("W", "Width"); 29536 let height = dict.get("H", "Height"); 29537 if (Number.isInteger(image.width) && image.width > 0 && Number.isInteger(image.height) && image.height > 0 && (image.width !== width || image.height !== height)) { 29538 warn("PDFImage - using the Width/Height of the image data, " + "rather than the image dictionary."); 29539 width = image.width; 29540 height = image.height; 29541 } 29542 if (width < 1 || height < 1) { 29543 throw new FormatError(`Invalid image width: ${width} or height: ${height}`); 29544 } 29545 this.width = width; 29546 this.height = height; 29547 this.interpolate = dict.get("I", "Interpolate"); 29548 this.imageMask = dict.get("IM", "ImageMask") || false; 29549 this.matte = dict.get("Matte") || false; 29550 let bitsPerComponent = image.bitsPerComponent; 29551 if (!bitsPerComponent) { 29552 bitsPerComponent = dict.get("BPC", "BitsPerComponent"); 29553 if (!bitsPerComponent) { 29554 if (this.imageMask) { 29555 bitsPerComponent = 1; 29556 } else { 29557 throw new FormatError(`Bits per component missing in image: ${this.imageMask}`); 29558 } 29559 } 29560 } 29561 this.bpc = bitsPerComponent; 29562 if (!this.imageMask) { 29563 let colorSpace = dict.getRaw("CS") || dict.getRaw("ColorSpace"); 29564 const hasColorSpace = !!colorSpace; 29565 if (!hasColorSpace) { 29566 if (this.jpxDecoderOptions) { 29567 colorSpace = Name.get("DeviceRGBA"); 29568 } else { 29569 switch (image.numComps) { 29570 case 1: 29571 colorSpace = Name.get("DeviceGray"); 29572 break; 29573 case 3: 29574 colorSpace = Name.get("DeviceRGB"); 29575 break; 29576 case 4: 29577 colorSpace = Name.get("DeviceCMYK"); 29578 break; 29579 default: 29580 throw new Error(`Images with ${image.numComps} color components not supported.`); 29581 } 29582 } 29583 } else if (this.jpxDecoderOptions?.smaskInData) { 29584 colorSpace = Name.get("DeviceRGBA"); 29585 } 29586 this.colorSpace = ColorSpace.parse({ 29587 cs: colorSpace, 29588 xref, 29589 resources: isInline ? res : null, 29590 pdfFunctionFactory, 29591 localColorSpaceCache 29592 }); 29593 this.numComps = this.colorSpace.numComps; 29594 if (this.jpxDecoderOptions) { 29595 this.jpxDecoderOptions.numComponents = hasColorSpace ? this.numComp : 0; 29596 this.jpxDecoderOptions.isIndexedColormap = this.colorSpace.name === "Indexed"; 29597 } 29598 } 29599 this.decode = dict.getArray("D", "Decode"); 29600 this.needsDecode = false;
29601 if (this.decode && (this.colorSpace && !this.colorSpace.isDefaultDecode(this.decode, bitsPerComponent) || isMask && !ColorSpace.isDefaultDecode(this.decode, 1))) { 29602 this.needsDecode = true; 29603 const max = (1 << bitsPerComponent) - 1; 29604 this.decodeCoefficients = []; 29605 this.decodeAddends = []; 29606 const isIndexed = this.colorSpace?.name === "Indexed"; 29607 for (let i = 0, j = 0; i < this.decode.length; i += 2, ++j) { 29608 const dmin = this.decode[i]; 29609 const dmax = this.decode[i + 1]; 29610 this.decodeCoefficients[j] = isIndexed ? (dmax - dmin) / max : dmax - dmin; 29611 this.decodeAddends[j] = isIndexed ? dmin : max * dmin; 29612 } 29613 } 29614 if (smask) { 29615 this.smask = new PDFImage({ 29616 xref, 29617 res, 29618 image: smask, 29619 isInline, 29620 pdfFunctionFactory, 29621 localColorSpaceCache 29622 }); 29623 } else if (mask) { 29624 if (mask instanceof BaseStream) { 29625 const maskDict = mask.dict, 29626 imageMask = maskDict.get("IM", "ImageMask"); 29627 if (!imageMask) { 29628 warn("Ignoring /Mask in image without /ImageMask."); 29629 } else { 29630 this.mask = new PDFImage({ 29631 xref, 29632 res, 29633 image: mask, 29634 isInline, 29635 isMask: true, 29636 pdfFunctionFactory, 29637 localColorSpaceCache 29638 }); 29639 } 29640 } else { 29641 this.mask = mask; 29642 } 29643 } 29644 } 29645 static async buildImage({ 29646 xref, 29647 res, 29648 image, 29649 isInline = false, 29650 pdfFunctionFactory, 29651 localColorSpaceCache 29652 }) { 29653 const imageData = image; 29654 let smaskData = null; 29655 let maskData = null; 29656 const smask = image.dict.get("SMask"); 29657 const mask = image.dict.get("Mask"); 29658 if (smask) { 29659 if (smask instanceof BaseStream) { 29660 smaskData = smask; 29661 } else { 29662 warn("Unsupported /SMask format."); 29663 } 29664 } else if (mask) { 29665 if (mask instanceof BaseStream || Array.isArray(mask)) { 29666 maskData = mask; 29667 } else { 29668 warn("Unsupported /Mask format."); 29669 } 29670 } 29671 return new PDFImage({ 29672 xref, 29673 res, 29674 image: imageData, 29675 isInline, 29676 smask: smaskData, 29677 mask: maskData, 29678 pdfFunctionFactory, 29679 localColorSpaceCache 29680 }); 29681 } 29682 static createRawMask({ 29683 imgArray, 29684 width, 29685 height, 29686 imageIsFromDecodeStream, 29687 inverseDecode, 29688 interpolate 29689 }) { 29690 const computedLength = (width + 7 >> 3) * height; 29691 const actualLength = imgArray.byteLength; 29692 const haveFullData = computedLength === actualLength; 29693 let data, i; 29694 if (imageIsFromDecodeStream && (!inverseDecode || haveFullData)) { 29695 data = imgArray; 29696 } else if (!inverseDecode) { 29697 data = new Uint8Array(imgArray); 29698 } else { 29699 data = new Uint8Array(computedLength); 29700 data.set(imgArray); 29701 data.fill(0xff, actualLength); 29702 } 29703 if (inverseDecode) { 29704 for (i = 0; i < actualLength; i++) { 29705 data[i] ^= 0xff; 29706 } 29707 } 29708 return { 29709 data, 29710 width, 29711 height, 29712 interpolate 29713 }; 29714 } 29715 static async createMask({ 29716 imgArray, 29717 width, 29718 height, 29719 imageIsFromDecodeStream, 29720 inverseDecode, 29721 interpolate, 29722 isOffscreenCanvasSupported = false 29723 }) { 29724 const isSingleOpaquePixel = width === 1 && height === 1 && inverseDecode === (imgArray.length === 0 || !!(imgArray[0] & 128)); 29725 if (isSingleOpaquePixel) { 29726 return { 29727 isSingleOpaquePixel 29728 }; 29729 } 29730 if (isOffscreenCanvasSupported) { 29731 if (ImageResizer.needsToBeResized(width, height)) { 29732 const data = new Uint8ClampedArray(width * height * 4); 29733 convertBlackAndWhiteToRGBA({ 29734 src: imgArray, 29735 dest: data, 29736 width, 29737 height, 29738 nonBlackColor: 0, 29739 inverseDecode 29740 }); 29741 return ImageResizer.createImage({ 29742 kind: ImageKind.RGBA_32BPP, 29743 data, 29744 width, 29745 height, 29746 interpolate 29747 }); 29748 } 29749 const canvas = new OffscreenCanvas(width, height); 29750 const ctx = canvas.getContext("2d"); 29751 const imgData = ctx.createImageData(width, height); 29752 convertBlackAndWhiteToRGBA({ 29753 src: imgArray, 29754 dest: imgData.data, 29755 width, 29756 height, 29757 nonBlackColor: 0, 29758 inverseDecode 29759 }); 29760 ctx.putImageData(imgData, 0, 0); 29761 const bitmap = canvas.transferToImageBitmap(); 29762 return { 29763 data: null, 29764 width, 29765 height, 29766 interpolate, 29767 bitmap 29768 }; 29769 } 29770 return this.createRawMask({ 29771 imgArray, 29772 width, 29773 height, 29774 inverseDecode, 29775 imageIsFromDecodeStream, 29776 interpolate 29777 }); 29778 } 29779 get drawWidth() { 29780 return Math.max(this.width, this.smask?.width || 0, this.mask?.width || 0); 29781 } 29782 get drawHeight() { 29783 return Math.max(this.height, this.smask?.height || 0, this.mask?.height || 0
vendor: 595 bytes, lines 29783-29801
29783); 29784 } 29785 decodeBuffer(buffer) { 29786 const bpc = this.bpc; 29787 const numComps = this.numComps; 29788 const decodeAddends = this.decodeAddends; 29789 const decodeCoefficients = this.decodeCoefficients; 29790 const max = (1 << bpc) - 1; 29791 let i, ii; 29792 if (bpc === 1) { 29793 for (i = 0, ii = buffer.length; i < ii; i++) { 29794 buffer[i] = +!buffer[i]; 29795 } 29796 return; 29797 } 29798 let index = 0; 29799 for (i = 0, ii = this.width * this.height; i < ii; i++) { 29800 for (let j = 0; j < numComps; j++) { 29801 buffer[index] = decodeAndClamp(buffer[index], decodeAddends[j], decodeCoefficients[j]
vendor: 13,521 bytes, lines 29801-30254
29801, max); 29802 index++; 29803 } 29804 } 29805 } 29806 getComponents(buffer) { 29807 const bpc = this.bpc; 29808 if (bpc === 8) { 29809 return buffer; 29810 } 29811 const width = this.width; 29812 const height = this.height; 29813 const numComps = this.numComps; 29814 const length = width * height * numComps; 29815 let bufferPos = 0; 29816 let output; 29817 if (bpc <= 8) { 29818 output = new Uint8Array(length); 29819 } else if (bpc <= 16) { 29820 output = new Uint16Array(length); 29821 } else { 29822 output = new Uint32Array(length); 29823 } 29824 const rowComps = width * numComps; 29825 const max = (1 << bpc) - 1; 29826 let i = 0, 29827 ii, 29828 buf; 29829 if (bpc === 1) { 29830 let mask, loop1End, loop2End; 29831 for (let j = 0; j < height; j++) { 29832 loop1End = i + (rowComps & ~7); 29833 loop2End = i + rowComps; 29834 while (i < loop1End) { 29835 buf = buffer[bufferPos++]; 29836 output[i] = buf >> 7 & 1; 29837 output[i + 1] = buf >> 6 & 1; 29838 output[i + 2] = buf >> 5 & 1; 29839 output[i + 3] = buf >> 4 & 1; 29840 output[i + 4] = buf >> 3 & 1; 29841 output[i + 5] = buf >> 2 & 1; 29842 output[i + 6] = buf >> 1 & 1; 29843 output[i + 7] = buf & 1; 29844 i += 8; 29845 } 29846 if (i < loop2End) { 29847 buf = buffer[bufferPos++]; 29848 mask = 128; 29849 while (i < loop2End) { 29850 output[i++] = +!!(buf & mask); 29851 mask >>= 1; 29852 } 29853 } 29854 } 29855 } else { 29856 let bits = 0; 29857 buf = 0; 29858 for (i = 0, ii = length; i < ii; ++i) { 29859 if (i % rowComps === 0) { 29860 buf = 0; 29861 bits = 0; 29862 } 29863 while (bits < bpc) { 29864 buf = buf << 8 | buffer[bufferPos++]; 29865 bits += 8; 29866 } 29867 const remainingBits = bits - bpc; 29868 let value = buf >> remainingBits; 29869 if (value < 0) { 29870 value = 0; 29871 } else if (value > max) { 29872 value = max; 29873 } 29874 output[i] = value; 29875 buf &= (1 << remainingBits) - 1; 29876 bits = remainingBits; 29877 } 29878 } 29879 return output; 29880 } 29881 async fillOpacity(rgbaBuf, width, height, actualHeight, image) { 29882 const smask = this.smask; 29883 const mask = this.mask; 29884 let alphaBuf, sw, sh, i, ii, j; 29885 if (smask) { 29886 sw = smask.width; 29887 sh = smask.height; 29888 alphaBuf = new Uint8ClampedArray(sw * sh); 29889 await smask.fillGrayBuffer(alphaBuf); 29890 if (sw !== width || sh !== height) { 29891 alphaBuf = resizeImageMask(alphaBuf, smask.bpc, sw, sh, width, height); 29892 } 29893 } else if (mask) { 29894 if (mask instanceof PDFImage) { 29895 sw = mask.width; 29896 sh = mask.height; 29897 alphaBuf = new Uint8ClampedArray(sw * sh); 29898 mask.numComps = 1; 29899 await mask.fillGrayBuffer(alphaBuf); 29900 for (i = 0, ii = sw * sh; i < ii; ++i) { 29901 alphaBuf[i] = 255 - alphaBuf[i]; 29902 } 29903 if (sw !== width || sh !== height) { 29904 alphaBuf = resizeImageMask(alphaBuf, mask.bpc, sw, sh, width, height); 29905 } 29906 } else if (Array.isArray(mask)) { 29907 alphaBuf = new Uint8ClampedArray(width * height); 29908 const numComps = this.numComps; 29909 for (i = 0, ii = width * height; i < ii; ++i) { 29910 let opacity = 0; 29911 const imageOffset = i * numComps; 29912 for (j = 0; j < numComps; ++j) { 29913 const color = image[imageOffset + j]; 29914 const maskOffset = j * 2; 29915 if (color < mask[maskOffset] || color > mask[maskOffset + 1]) { 29916 opacity = 255; 29917 break; 29918 } 29919 } 29920 alphaBuf[i] = opacity; 29921 } 29922 } else { 29923 throw new FormatError("Unknown mask format."); 29924 } 29925 } 29926 if (alphaBuf) { 29927 for (i = 0, j = 3, ii = width * actualHeight; i < ii; ++i, j += 4) { 29928 rgbaBuf[j] = alphaBuf[i]; 29929 } 29930 } else { 29931 for (i = 0, j = 3, ii = width * actualHeight; i < ii; ++i, j += 4) { 29932 rgbaBuf[j] = 255; 29933 } 29934 } 29935 } 29936 undoPreblend(buffer, width, height) { 29937 const matte = this.smask?.matte; 29938 if (!matte) { 29939 return; 29940 } 29941 const matteRgb = this.colorSpace.getRgb(matte, 0); 29942 const matteR = matteRgb[0]; 29943 const matteG = matteRgb[1]; 29944 const matteB = matteRgb[2]; 29945 const length = width * height * 4; 29946 for (let i = 0; i < length; i += 4) { 29947 const alpha = buffer[i + 3]; 29948 if (alpha === 0) { 29949 buffer[i] = 255; 29950 buffer[i + 1] = 255; 29951 buffer[i + 2] = 255; 29952 continue; 29953 } 29954 const k = 255 / alpha; 29955 buffer[i] = (buffer[i] - matteR) * k + matteR; 29956 buffer[i + 1] = (buffer[i + 1] - matteG) * k + matteG; 29957 buffer[i + 2] = (buffer[i + 2] - matteB) * k + matteB; 29958 } 29959 } 29960 async createImageData(forceRGBA = false, isOffscreenCanvasSupported = false) { 29961 const drawWidth = this.drawWidth; 29962 const drawHeight = this.drawHeight; 29963 const imgData = { 29964 width: drawWidth, 29965 height: drawHeight, 29966 interpolate: this.interpolate, 29967 kind: 0, 29968 data: null 29969 }; 29970 const numComps = this.numComps; 29971 const originalWidth = this.width; 29972 const originalHeight = this.height; 29973 const bpc = this.bpc; 29974 const rowBytes = originalWidth * numComps * bpc + 7 >> 3; 29975 const mustBeResized = isOffscreenCanvasSupported && ImageResizer.needsToBeResized(drawWidth, drawHeight); 29976 if (!this.smask && !this.mask && this.colorSpace.name === "DeviceRGBA") { 29977 imgData.kind = ImageKind.RGBA_32BPP; 29978 const imgArray = imgData.data = await this.getImageBytes(originalHeight * originalWidth * 4, {}); 29979 if (isOffscreenCanvasSupported) { 29980 if (!mustBeResized) { 29981 return this.createBitmap(ImageKind.RGBA_32BPP, drawWidth, drawHeight, imgArray); 29982 } 29983 return ImageResizer.createImage(imgData, false); 29984 } 29985 return imgData; 29986 } 29987 if (!forceRGBA) { 29988 let kind; 29989 if (this.colorSpace.name === "DeviceGray" && bpc === 1) { 29990 kind = ImageKind.GRAYSCALE_1BPP; 29991 } else if (this.colorSpace.name === "DeviceRGB" && bpc === 8 && !this.needsDecode) { 29992 kind = ImageKind.RGB_24BPP; 29993 } 29994 if (kind && !this.smask && !this.mask && drawWidth === originalWidth && drawHeight === originalHeight) { 29995 const image = await this.#getImage(originalWidth, originalHeight); 29996 if (image) { 29997 return image; 29998 } 29999 const data = await this.getImageBytes(originalHeight * rowBytes, {}); 30000 if (isOffscreenCanvasSupported) { 30001 if (mustBeResized) { 30002 return ImageResizer.createImage({ 30003 data, 30004 kind, 30005 width: drawWidth, 30006 height: drawHeight, 30007 interpolate: this.interpolate 30008 }, this.needsDecode); 30009 } 30010 return this.createBitmap(kind, originalWidth, originalHeight, data); 30011 } 30012 imgData.kind = kind; 30013 imgData.data = data; 30014 if (this.needsDecode) { 30015 assert(kind === ImageKind.GRAYSCALE_1BPP, "PDFImage.createImageData: The image must be grayscale."); 30016 const buffer = imgData.data; 30017 for (let i = 0, ii = buffer.length; i < ii; i++) { 30018 buffer[i] ^= 0xff; 30019 } 30020 } 30021 return imgData; 30022 } 30023 if (this.image instanceof JpegStream && !this.smask && !this.mask && !this.needsDecode) { 30024 let imageLength = originalHeight * rowBytes; 30025 if (isOffscreenCanvasSupported && !mustBeResized) { 30026 let isHandled = false; 30027 switch (this.colorSpace.name) { 30028 case "DeviceGray": 30029 imageLength *= 4; 30030 isHandled = true; 30031 break; 30032 case "DeviceRGB": 30033 imageLength = imageLength / 3 * 4; 30034 isHandled = true; 30035 break; 30036 case "DeviceCMYK": 30037 isHandled = true; 30038 break; 30039 } 30040 if (isHandled) { 30041 const image = await this.#getImage(drawWidth, drawHeight); 30042 if (image) { 30043 return image; 30044 } 30045 const rgba = await this.getImageBytes(imageLength, { 30046 drawWidth, 30047 drawHeight, 30048 forceRGBA: true 30049 }); 30050 return this.createBitmap(ImageKind.RGBA_32BPP, drawWidth, drawHeight, rgba); 30051 } 30052 } else { 30053 switch (this.colorSpace.name) { 30054 case "DeviceGray": 30055 imageLength *= 3; 30056 case "DeviceRGB": 30057 case "DeviceCMYK": 30058 imgData.kind = ImageKind.RGB_24BPP; 30059 imgData.data = await this.getImageBytes(imageLength, { 30060 drawWidth, 30061 drawHeight, 30062 forceRGB: true 30063 }); 30064 if (mustBeResized) { 30065 return ImageResizer.createImage(imgData); 30066 } 30067 return imgData; 30068 } 30069 } 30070 } 30071 } 30072 const imgArray = await this.getImageBytes(originalHeight * rowBytes, { 30073 internal: true 30074 }); 30075 const actualHeight = 0 | imgArray.length / rowBytes * drawHeight / originalHeight; 30076 const comps = this.getComponents(imgArray); 30077 let alpha01, maybeUndoPreblend; 30078 let canvas, ctx, canvasImgData, data; 30079 if (isOffscreenCanvasSupported && !mustBeResized) { 30080 canvas = new OffscreenCanvas(drawWidth, drawHeight); 30081 ctx = canvas.getContext("2d"); 30082 canvasImgData = ctx.createImageData(drawWidth, drawHeight); 30083 data = canvasImgData.data; 30084 } 30085 imgData.kind = ImageKind.RGBA_32BPP; 30086 if (!forceRGBA && !this.smask && !this.mask) { 30087 if (!isOffscreenCanvasSupported || mustBeResized) { 30088 imgData.kind = ImageKind.RGB_24BPP; 30089 data = new Uint8ClampedArray(drawWidth * drawHeight * 3); 30090 alpha01 = 0; 30091 } else { 30092 const arr = new Uint32Array(data.buffer); 30093 arr.fill(FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff); 30094 alpha01 = 1; 30095 } 30096 maybeUndoPreblend = false; 30097 } else { 30098 if (!isOffscreenCanvasSupported || mustBeResized) { 30099 data = new Uint8ClampedArray(drawWidth * drawHeight * 4); 30100 } 30101 alpha01 = 1; 30102 maybeUndoPreblend = true; 30103 await this.fillOpacity(data, drawWidth, drawHeight, actualHeight, comps); 30104 } 30105 if (this.needsDecode) { 30106 this.decodeBuffer(comps); 30107 } 30108 this.colorSpace.fillRgb(data, originalWidth, originalHeight, drawWidth, drawHeight, actualHeight, bpc, comps, alpha01); 30109 if (maybeUndoPreblend) { 30110 this.undoPreblend(data, drawWidth, actualHeight); 30111 } 30112 if (isOffscreenCanvasSupported && !mustBeResized) { 30113 ctx.putImageData(canvasImgData, 0, 0); 30114 const bitmap = canvas.transferToImageBitmap(); 30115 return { 30116 data: null, 30117 width: drawWidth, 30118 height: drawHeight, 30119 bitmap, 30120 interpolate: this.interpolate 30121 }; 30122 } 30123 imgData.data = data; 30124 if (mustBeResized) { 30125 return ImageResizer.createImage(imgData); 30126 } 30127 return imgData; 30128 } 30129 async fillGrayBuffer(buffer) { 30130 const numComps = this.numComps; 30131 if (numComps !== 1) { 30132 throw new FormatError(`Reading gray scale from a color image: ${numComps}`); 30133 } 30134 const width = this.width; 30135 const height = this.height; 30136 const bpc = this.bpc; 30137 const rowBytes = width * numComps * bpc + 7 >> 3; 30138 const imgArray = await this.getImageBytes(height * rowBytes, { 30139 internal: true 30140 }); 30141 const comps = this.getComponents(imgArray); 30142 let i, length; 30143 if (bpc === 1) { 30144 length = width * height; 30145 if (this.needsDecode) { 30146 for (i = 0; i < length; ++i) { 30147 buffer[i] = comps[i] - 1 & 255; 30148 } 30149 } else { 30150 for (i = 0; i < length; ++i) { 30151 buffer[i] = -comps[i] & 255; 30152 } 30153 } 30154 return; 30155 } 30156 if (this.needsDecode) { 30157 this.decodeBuffer(comps); 30158 } 30159 length = width * height; 30160 const scale = 255 / ((1 << bpc) - 1); 30161 for (i = 0; i < length; ++i) { 30162 buffer[i] = scale * comps[i]; 30163 } 30164 } 30165 createBitmap(kind, width, height, src) { 30166 const canvas = new OffscreenCanvas(width, height); 30167 const ctx = canvas.getContext("2d"); 30168 let imgData; 30169 if (kind === ImageKind.RGBA_32BPP) { 30170 imgData = new ImageData(src, width, height); 30171 } else { 30172 imgData = ctx.createImageData(width, height); 30173 convertToRGBA({ 30174 kind, 30175 src, 30176 dest: new Uint32Array(imgData.data.buffer), 30177 width, 30178 height, 30179 inverseDecode: this.needsDecode 30180 }); 30181 } 30182 ctx.putImageData(imgData, 0, 0); 30183 const bitmap = canvas.transferToImageBitmap(); 30184 return { 30185 data: null, 30186 width, 30187 height, 30188 bitmap, 30189 interpolate: this.interpolate 30190 }; 30191 } 30192 async #getImage(width, height) { 30193 const bitmap = await this.image.getTransferableImage(); 30194 if (!bitmap) { 30195 return null; 30196 } 30197 return { 30198 data: null, 30199 width, 30200 height, 30201 bitmap, 30202 interpolate: this.interpolate 30203 }; 30204 } 30205 async getImageBytes(length, { 30206 drawWidth, 30207 drawHeight, 30208 forceRGBA = false, 30209 forceRGB = false, 30210 internal = false 30211 }) { 30212 this.image.reset(); 30213 this.image.drawWidth = drawWidth || this.width; 30214 this.image.drawHeight = drawHeight || this.height; 30215 this.image.forceRGBA = !!forceRGBA; 30216 this.image.forceRGB = !!forceRGB; 30217 const imageBytes = await this.image.getImageData(length, this.jpxDecoderOptions); 30218 if (internal || this.image instanceof DecodeStream) { 30219 return imageBytes; 30220 } 30221 assert(imageBytes instanceof Uint8Array, 'PDFImage.getImageBytes: Unsupported "imageBytes" type.'); 30222 return new Uint8Array(imageBytes); 30223 } 30224} 30225 30226;// ./src/core/evaluator.js 30227 30228 30229 30230 30231 30232 30233 30234 30235 30236 30237 30238 30239 30240 30241 30242 30243 30244 30245 30246 30247 30248 30249 30250 30251 30252 30253 30254
30255const DefaultPartialEvaluatorOptions = Object.freeze({ 30256 maxImageSize: -1, 30257 disableFontFace: false, 30258 ignoreErrors: false, 30259 isEvalSupported: true, 30260 isOffscreenCanvasSupported: false, 30261 isImageDecoderSupported: false, 30262 canvasMaxAreaInBytes: -1, 30263 fontExtraProperties: false, 30264 useSystemFonts: true, 30265 cMapUrl: null, 30266 standardFontDataUrl: null 30267}); 30268const PatternType = { 30269 TILING: 1, 30270 SHADING: 2 30271}; 30272const TEXT_CHUNK_BATCH_SIZE = 10; 30273const deferred = Promise.resolve(); 30274function normalizeBlendMode(value, parsingArray = false) { 30275 if (Array.isArray(value)) { 30276 for (const val of value) { 30277 const maybeBM = normalizeBlendMode(val, true); 30278 if (maybeBM) { 30279 return maybeBM; 30280 } 30281 } 30282 warn(`Unsupported blend mode Array: ${value}`); 30283 return "source-over"; 30284 } 30285 if (!(value instanceof Name)) { 30286 if (parsingArray) { 30287 return null; 30288 } 30289 return "source-over"; 30290 } 30291 switch (value.name) { 30292 case "Normal": 30293 case "Compatible": 30294 return "source-over"; 30295 case "Multiply": 30296 return "multiply"; 30297 case "Screen": 30298 return "screen"; 30299 case "Overlay": 30300 return "overlay"; 30301 case "Darken": 30302 return "darken"; 30303 case "Lighten": 30304 return "lighten"; 30305 case "ColorDodge": 30306 return "color-dodge"; 30307 case "ColorBurn": 30308 return "color-burn"; 30309 case "HardLight": 30310 return "hard-light"; 30311 case "SoftLight": 30312 return "soft-light"; 30313 case "Difference": 30314 return "difference"; 30315 case "Exclusion": 30316 return "exclusion"; 30317 case "Hue": 30318 return "hue"; 30319 case "Saturation": 30320 return "saturation"; 30321 case "Color": 30322 return "color"; 30323 case "Luminosity": 30324 return "luminosity"; 30325 } 30326 if (parsingArray) { 30327 return null; 30328 } 30329 warn(`Unsupported blend mode: ${value.name}`); 30330 return "source-over"; 30331} 30332function addLocallyCachedImageOps(opList, data) { 30333 if (data.objId) { 30334 opList.addDependency(data.objId); 30335 } 30336 opList.addImageOps(data.fn, data.args, data.optionalContent, data.hasMask); 30337 if (data.fn === OPS.paintImageMaskXObject && data.args[0]?.count > 0) {
vendor: 2,256 bytes, lines 30338-30417
30338 data.args[0].count++; 30339 } 30340} 30341class TimeSlotManager { 30342 static TIME_SLOT_DURATION_MS = 20; 30343 static CHECK_TIME_EVERY = 100; 30344 constructor() { 30345 this.reset(); 30346 } 30347 check() { 30348 if (++this.checked < TimeSlotManager.CHECK_TIME_EVERY) { 30349 return false; 30350 } 30351 this.checked = 0; 30352 return this.endTime <= Date.now(); 30353 } 30354 reset() { 30355 this.endTime = Date.now() + TimeSlotManager.TIME_SLOT_DURATION_MS; 30356 this.checked = 0; 30357 } 30358} 30359class PartialEvaluator { 30360 constructor({ 30361 xref, 30362 handler, 30363 pageIndex, 30364 idFactory, 30365 fontCache, 30366 builtInCMapCache, 30367 standardFontDataCache, 30368 globalImageCache, 30369 systemFontCache, 30370 options = null 30371 }) { 30372 this.xref = xref; 30373 this.handler = handler; 30374 this.pageIndex = pageIndex; 30375 this.idFactory = idFactory; 30376 this.fontCache = fontCache; 30377 this.builtInCMapCache = builtInCMapCache; 30378 this.standardFontDataCache = standardFontDataCache; 30379 this.globalImageCache = globalImageCache; 30380 this.systemFontCache = systemFontCache; 30381 this.options = options || DefaultPartialEvaluatorOptions; 30382 this.type3FontRefs = null; 30383 this._regionalImageCache = new RegionalImageCache(); 30384 this._fetchBuiltInCMapBound = this.fetchBuiltInCMap.bind(this); 30385 ImageResizer.setOptions(this.options); 30386 JpegStream.setOptions(this.options); 30387 } 30388 get _pdfFunctionFactory() { 30389 const pdfFunctionFactory = new PDFFunctionFactory({ 30390 xref: this.xref, 30391 isEvalSupported: this.options.isEvalSupported 30392 }); 30393 return shadow(this, "_pdfFunctionFactory", pdfFunctionFactory); 30394 } 30395 get parsingType3Font() { 30396 return !!this.type3FontRefs; 30397 } 30398 clone(newOptions = null) { 30399 const newEvaluator = Object.create(this); 30400 newEvaluator.options = Object.assign(Object.create(null), this.options, newOptions); 30401 return newEvaluator; 30402 } 30403 hasBlendModes(resources, nonBlendModesSet) { 30404 if (!(resources instanceof Dict)) { 30405 return false; 30406 } 30407 if (resources.objId && nonBlendModesSet.has(resources.objId)) { 30408 return false; 30409 } 30410 const processed = new RefSet(nonBlendModesSet); 30411 if (resources.objId) { 30412 processed.put(resources.objId); 30413 } 30414 const nodes = [resources], 30415 xref = this.xref; 30416 while (nodes.length) { 30417 const node = nodes.shift();
30418 const graphicStates = node.get("ExtGState"); 30419 if (graphicStates instanceof Dict) { 30420 for (let graphicState of graphicStates.getRawValues()) { 30421 if (graphicState instanceof Ref) { 30422 if (processed.has(graphicState)) { 30423 continue; 30424 } 30425 try { 30426 graphicState = xref.fetch(graphicState); 30427 } catch (ex) { 30428 processed.put(graphicState); 30429 info(`hasBlendModes - ignoring ExtGState: "${ex}".`); 30430 continue; 30431 } 30432 } 30433 if (!(graphicState instanceof Dict)) { 30434 continue; 30435 } 30436 if (graphicState.objId) { 30437 processed.put(graphicState.objId); 30438 } 30439 const bm = graphicState.get("BM"); 30440 if (bm instanceof Name) { 30441 if (bm.name !== "Normal") { 30442 return true; 30443 } 30444 continue; 30445 } 30446 if (bm !== undefined && Array.isArray(bm)) { 30447 for (const element of bm) { 30448 if (element instanceof Name && element.name !== "Normal") { 30449 return true; 30450 } 30451 } 30452 } 30453 } 30454 } 30455 const xObjects = node.get("XObject"); 30456 if (!(xObjects instanceof Dict)) { 30457 continue; 30458 } 30459 for (let xObject of xObjects.getRawValues()) { 30460 if (xObject instanceof Ref) { 30461 if (processed.has(xObject)) { 30462 continue; 30463 } 30464 try { 30465 xObject = xref.fetch(xObject); 30466 } catch (ex) { 30467 processed.put(xObject); 30468 info(`hasBlendModes - ignoring XObject: "${ex}".`); 30469 continue; 30470 } 30471 } 30472 if (!(xObject instanceof BaseStream)) { 30473 continue; 30474 } 30475 if (xObject.dict.objId) { 30476 processed.put(xObject.dict.objId); 30477 } 30478 const xResources = xObject.dict.get("Resources"); 30479 if (!(xResources instanceof Dict)) { 30480 continue; 30481 } 30482 if (xResources.objId && processed.has(xResources.objId)) { 30483 continue; 30484 } 30485 nodes.push(xResources); 30486 if (xResources.objId) { 30487 processed.put(xResources.objId); 30488 } 30489 } 30490 } 30491 for (const ref of processed) { 30492 nonBlendModesSet.put(ref); 30493 } 30494 return false; 30495 } 30496 async #fetchData(url) { 30497 const response = await fetch(url); 30498 if (!response.ok) { 30499 throw new Error(`Failed to fetch file "${url}" with "${response.statusText}".`); 30500 } 30501 return new Uint8Array(await response.arrayBuffer()); 30502 } 30503 async fetchBuiltInCMap(name) { 30504 const cachedData = this.builtInCMapCache.get(name); 30505 if (cachedData) { 30506 return cachedData; 30507 } 30508 let data; 30509 if (this.options.cMapUrl !== null) { 30510 const cMapData = await this.#fetchData(`${this.options.cMapUrl}${name}.bcmap`); 30511 data = { 30512 cMapData, 30513 isCompressed: true 30514 }; 30515 } else { 30516 data = await this.handler.sendWithPromise("FetchBuiltInCMap", { 30517 name 30518 }); 30519 } 30520 this.builtInCMapCache.set(name, data); 30521 return data; 30522 } 30523 async fetchStandardFontData(name) { 30524 const cachedData = this.standardFontDataCache.get(name); 30525 if (cachedData) { 30526 return new Stream(cachedData); 30527 } 30528 if (this.options.useSystemFonts && name !== "Symbol" && name !== "ZapfDingbats") { 30529 return null; 30530 } 30531 const standardFontNameToFileName = getFontNameToFileMap(), 30532 filename = standardFontNameToFileName[name]; 30533 let data; 30534 try { 30535 if (this.options.standardFontDataUrl !== null) { 30536 data = await this.#fetchData(`${this.options.standardFontDataUrl}${filename}`); 30537 } else { 30538 data = await this.handler.sendWithPromise("FetchStandardFontData", { 30539 filename 30540 }); 30541 } 30542 } catch (ex) { 30543 warn(ex); 30544 return null; 30545 } 30546 this.standardFontDataCache.set(name, data); 30547 return new Stream(data); 30548 } 30549 async buildFormXObject(resources, xobj, smask, operatorList, task, initialState, localColorSpaceCache) { 30550 const dict = xobj.dict; 30551 const matrix = lookupMatrix(dict.getArray("Matrix"), null); 30552 const bbox = lookupNormalRect(dict.getArray("BBox"), null); 30553 let optionalContent, groupOptions; 30554 if (dict.has("OC")) { 30555 optionalContent = await this.parseMarkedContentProps(dict.get("OC"), resources); 30556 } 30557 if (optionalContent !== undefined) { 30558 operatorList.addOp(OPS.beginMarkedContentProps, ["OC", optionalContent]); 30559 } 30560 const group = dict.get("Group"); 30561 if (group) { 30562 groupOptions = { 30563 matrix, 30564 bbox, 30565 smask, 30566 isolated: false, 30567 knockout: false 30568 }; 30569 const groupSubtype = group.get("S"); 30570 let colorSpace = null; 30571 if (isName(groupSubtype, "Transparency")) { 30572 groupOptions.isolated = group.get("I") || false; 30573 groupOptions.knockout = group.get("K") || false; 30574 if (group.has("CS")) { 30575 const cs = group.getRaw("CS"); 30576 const cachedColorSpace = ColorSpace.getCached(cs, this.xref, localColorSpaceCache); 30577 if (cachedColorSpace) { 30578 colorSpace = cachedColorSpace; 30579 } else { 30580 colorSpace = await this.parseColorSpace({ 30581 cs, 30582 resources, 30583 localColorSpaceCache 30584 }); 30585 } 30586 } 30587 } 30588 if (smask?.backdrop) { 30589 colorSpace ||= ColorSpace.singletons.rgb; 30590 smask.backdrop = colorSpace.getRgb(smask.backdrop, 0); 30591 } 30592 operatorList.addOp(OPS.beginGroup, [groupOptions]); 30593 } 30594 const args = group ? [matrix, null] : [matrix, bbox]; 30595 operatorList.addOp(OPS.paintFormXObjectBegin, args); 30596 await this.getOperatorList({ 30597 stream: xobj, 30598 task, 30599 resources: dict.get("Resources") || resources, 30600 operatorList, 30601 initialState 30602 }); 30603 operatorList.addOp(OPS.paintFormXObjectEnd, []); 30604 if (group) { 30605 operatorList.addOp(OPS.endGroup, [groupOptions]); 30606 } 30607 if (optionalContent !== undefined) { 30608 operatorList.addOp(OPS.endMarkedContent, []); 30609 } 30610 } 30611 _sendImgData(objId, imgData, cacheGlobally = false) { 30612 const transfers = imgData ? [imgData.bitmap || imgData.data.buffer] : null; 30613 if (this.parsingType3Font || cacheGlobally) { 30614 return this.handler.send("commonobj", [objId, "Image", imgData], transfers); 30615 } 30616 return this.handler.send("obj", [objId, this.pageIndex, "Image", imgData], transfers); 30617 } 30618 async buildPaintImageXObject({ 30619 resources, 30620 image, 30621 isInline = false, 30622 operatorList, 30623 cacheKey, 30624 localImageCache, 30625 localColorSpaceCache 30626 }) { 30627 const dict = image.dict; 30628 const imageRef = dict.objId; 30629 const w = dict.get("W", "Width"); 30630 const h = dict.get("H", "Height");
30631 if (!(w && typeof w === "number") || !(h && typeof h === "number")) { 30632 warn("Image dimensions are missing, or not numbers."); 30633 return; 30634 } 30635 const maxImageSize = this.options.maxImageSize; 30636 if (maxImageSize !== -1 && w * h > maxImageSize) { 30637 const msg = "Image exceeded maximum allowed size and was removed."; 30638 if (this.options.ignoreErrors) { 30639 warn(msg); 30640 return; 30641 } 30642 throw new Error(msg); 30643 } 30644 let optionalContent; 30645 if (dict.has("OC")) { 30646 optionalContent = await this.parseMarkedContentProps(dict.get("OC"), resources); 30647 } 30648 const imageMask = dict.get("IM", "ImageMask") || false; 30649 let imgData, args; 30650 if (imageMask) { 30651 const interpolate = dict.get("I", "Interpolate"); 30652 const bitStrideLength = w + 7 >> 3; 30653 const imgArray = image.getBytes(bitStrideLength * h); 30654 const decode = dict.getArray("D", "Decode"); 30655 if (this.parsingType3Font) { 30656 imgData = PDFImage.createRawMask({ 30657 imgArray, 30658 width: w, 30659 height: h,
30660 imageIsFromDecodeStream: image instanceof DecodeStream, 30661 inverseDecode: decode?.[0] > 0, 30662 interpolate 30663 }); 30664 imgData.cached = !!cacheKey; 30665 args = [imgData]; 30666 operatorList.addImageOps(OPS.paintImageMaskXObject, args, optionalContent); 30667 if (cacheKey) { 30668 const cacheData = { 30669 fn: OPS.paintImageMaskXObject, 30670 args, 30671 optionalContent 30672 }; 30673 localImageCache.set(cacheKey, imageRef, cacheData); 30674 if (imageRef) { 30675 this._regionalImageCache.set(null, imageRef, cacheData); 30676 } 30677 } 30678 return; 30679 } 30680 imgData = await PDFImage.createMask({ 30681 imgArray, 30682 width: w, 30683 height: h, 30684 imageIsFromDecodeStream: image instanceof DecodeStream, 30685 inverseDecode: decode?.[0] > 0, 30686 interpolate, 30687 isOffscreenCanvasSupported: this.options.isOffscreenCanvasSupported 30688 }); 30689 if (imgData.isSingleOpaquePixel) { 30690 operatorList.addImageOps(OPS.paintSolidColorImageMask, [], optionalContent); 30691 if (cacheKey) { 30692 const cacheData = { 30693 fn: OPS.paintSolidColorImageMask, 30694 args: [], 30695 optionalContent 30696 }; 30697 localImageCache.set(cacheKey, imageRef, cacheData); 30698 if (imageRef) { 30699 this._regionalImageCache.set(null, imageRef, cacheData); 30700 } 30701 } 30702 return; 30703 } 30704 const objId = `mask_${this.idFactory.createObjId()}`; 30705 operatorList.addDependency(objId); 30706 imgData.dataLen = imgData.bitmap ? imgData.width * imgData.height * 4 : imgData.data.length; 30707 this._sendImgData(objId, imgData); 30708 args = [{ 30709 data: objId, 30710 width: imgData.width, 30711 height: imgData.height, 30712 interpolate: imgData.interpolate, 30713 count: 1 30714 }]; 30715 operatorList.addImageOps(OPS.paintImageMaskXObject, args, optionalContent); 30716 if (cacheKey) { 30717 const cacheData = { 30718 objId, 30719 fn: OPS.paintImageMaskXObject, 30720 args, 30721 optionalContent 30722 }; 30723 localImageCache.set(cacheKey, imageRef, cacheData); 30724 if (imageRef) { 30725 this._regionalImageCache.set(null, imageRef, cacheData); 30726 } 30727 } 30728 return; 30729 } 30730 const SMALL_IMAGE_DIMENSIONS = 200; 30731 const hasMask = dict.has("SMask") || dict.has("Mask"); 30732 if (isInline && w + h < SMALL_IMAGE_DIMENSIONS && !hasMask) { 30733 try { 30734 const imageObj = new PDFImage({ 30735 xref: this.xref, 30736 res: resources, 30737 image, 30738 isInline, 30739 pdfFunctionFactory: this._pdfFunctionFactory, 30740 localColorSpaceCache 30741 }); 30742 imgData = await imageObj.createImageData(true, false); 30743 operatorList.isOffscreenCanvasSupported = this.options.isOffscreenCanvasSupported; 30744 operatorList.addImageOps(OPS.paintInlineImageXObject, [imgData], optionalContent); 30745 } catch (reason) { 30746 const msg = `Unable to decode inline image: "${reason}".`; 30747 if (!this.options.ignoreErrors) { 30748 throw new Error(msg); 30749 } 30750 warn(msg); 30751 } 30752 return; 30753 } 30754 let objId = `img_${this.idFactory.createObjId()}`, 30755 cacheGlobally = false; 30756 if (this.parsingType3Font) { 30757 objId = `${this.idFactory.getDocId()}_type3_${objId}`; 30758 } else if (cacheKey && imageRef) { 30759 cacheGlobally = this.globalImageCache.shouldCache(imageRef, this.pageIndex); 30760 if (cacheGlobally) { 30761 assert(!isInline, "Cannot cache an inline image globally."); 30762 objId = `${this.idFactory.getDocId()}_${objId}`; 30763 } 30764 } 30765 operatorList.addDependency(objId); 30766 args = [objId, w, h]; 30767 operatorList.addImageOps(OPS.paintImageXObject, args, optionalContent, hasMask); 30768 if (cacheGlobally) { 30769 if (this.globalImageCache.hasDecodeFailed(imageRef)) { 30770 this.globalImageCache.setData(imageRef, { 30771 objId, 30772 fn: OPS.paintImageXObject, 30773 args, 30774 optionalContent, 30775 hasMask, 30776 byteSize: 0 30777 }); 30778 this._sendImgData(objId, null, cacheGlobally); 30779 return; 30780 } 30781 if (w * h > 250000 || hasMask) {
vendor: 4,189 bytes, lines 30782-30913
30782 const localLength = await this.handler.sendWithPromise("commonobj", [objId, "CopyLocalImage", { 30783 imageRef 30784 }]); 30785 if (localLength) { 30786 this.globalImageCache.setData(imageRef, { 30787 objId, 30788 fn: OPS.paintImageXObject, 30789 args, 30790 optionalContent, 30791 hasMask, 30792 byteSize: 0 30793 }); 30794 this.globalImageCache.addByteSize(imageRef, localLength); 30795 return; 30796 } 30797 } 30798 } 30799 PDFImage.buildImage({ 30800 xref: this.xref, 30801 res: resources, 30802 image, 30803 isInline, 30804 pdfFunctionFactory: this._pdfFunctionFactory, 30805 localColorSpaceCache 30806 }).then(async imageObj => { 30807 imgData = await imageObj.createImageData(false, this.options.isOffscreenCanvasSupported); 30808 imgData.dataLen = imgData.bitmap ? imgData.width * imgData.height * 4 : imgData.data.length; 30809 imgData.ref = imageRef; 30810 if (cacheGlobally) { 30811 this.globalImageCache.addByteSize(imageRef, imgData.dataLen); 30812 } 30813 return this._sendImgData(objId, imgData, cacheGlobally); 30814 }).catch(reason => { 30815 warn(`Unable to decode image "${objId}": "${reason}".`); 30816 if (imageRef) { 30817 this.globalImageCache.addDecodeFailed(imageRef); 30818 } 30819 return this._sendImgData(objId, null, cacheGlobally); 30820 }); 30821 if (cacheKey) { 30822 const cacheData = { 30823 objId, 30824 fn: OPS.paintImageXObject, 30825 args, 30826 optionalContent, 30827 hasMask 30828 }; 30829 localImageCache.set(cacheKey, imageRef, cacheData); 30830 if (imageRef) { 30831 this._regionalImageCache.set(null, imageRef, cacheData); 30832 if (cacheGlobally) { 30833 this.globalImageCache.setData(imageRef, { 30834 objId, 30835 fn: OPS.paintImageXObject, 30836 args, 30837 optionalContent, 30838 hasMask, 30839 byteSize: 0 30840 }); 30841 } 30842 } 30843 } 30844 } 30845 handleSMask(smask, resources, operatorList, task, stateManager, localColorSpaceCache) { 30846 const smaskContent = smask.get("G"); 30847 const smaskOptions = { 30848 subtype: smask.get("S").name, 30849 backdrop: smask.get("BC") 30850 }; 30851 const transferObj = smask.get("TR"); 30852 if (isPDFFunction(transferObj)) { 30853 const transferFn = this._pdfFunctionFactory.create(transferObj); 30854 const transferMap = new Uint8Array(256); 30855 const tmp = new Float32Array(1); 30856 for (let i = 0; i < 256; i++) { 30857 tmp[0] = i / 255; 30858 transferFn(tmp, 0, tmp, 0); 30859 transferMap[i] = tmp[0] * 255 | 0; 30860 } 30861 smaskOptions.transferMap = transferMap; 30862 } 30863 return this.buildFormXObject(resources, smaskContent, smaskOptions, operatorList, task, stateManager.state.clone(), localColorSpaceCache); 30864 } 30865 handleTransferFunction(tr) { 30866 let transferArray; 30867 if (Array.isArray(tr)) { 30868 transferArray = tr; 30869 } else if (isPDFFunction(tr)) { 30870 transferArray = [tr]; 30871 } else { 30872 return null; 30873 } 30874 const transferMaps = []; 30875 let numFns = 0, 30876 numEffectfulFns = 0; 30877 for (const entry of transferArray) { 30878 const transferObj = this.xref.fetchIfRef(entry); 30879 numFns++; 30880 if (isName(transferObj, "Identity")) { 30881 transferMaps.push(null); 30882 continue; 30883 } else if (!isPDFFunction(transferObj)) { 30884 return null; 30885 } 30886 const transferFn = this._pdfFunctionFactory.create(transferObj); 30887 const transferMap = new Uint8Array(256), 30888 tmp = new Float32Array(1); 30889 for (let j = 0; j < 256; j++) { 30890 tmp[0] = j / 255; 30891 transferFn(tmp, 0, tmp, 0); 30892 transferMap[j] = tmp[0] * 255 | 0; 30893 } 30894 transferMaps.push(transferMap); 30895 numEffectfulFns++; 30896 } 30897 if (!(numFns === 1 || numFns === 4)) { 30898 return null; 30899 } 30900 if (numEffectfulFns === 0) { 30901 return null; 30902 } 30903 return transferMaps; 30904 } 30905 handleTilingType(fn, color, resources, pattern, patternDict, operatorList, task, localTilingPatternCache) { 30906 const tilingOpList = new OperatorList(); 30907 const patternResources = Dict.merge({ 30908 xref: this.xref, 30909 dictArray: [patternDict.get("Resources"), resources] 30910 }); 30911 return this.getOperatorList({ 30912 stream: pattern, 30913 task,
30914 resources: patternResources, 30915 operatorList: tilingOpList 30916 }).then(function () { 30917 const operatorListIR = tilingOpList.getIR(); 30918 const tilingPatternIR = getTilingPatternIR(operatorListIR, patternDict, color); 30919 operatorList.addDependencies(tilingOpList.dependencies); 30920 operatorList.addOp(fn, tilingPatternIR); 30921 if (patternDict.objId) { 30922 localTilingPatternCache.set(null, patternDict.objId, { 30923 operatorListIR, 30924 dict: patternDict 30925 }); 30926 } 30927 }).catch(reason => { 30928 if (reason instanceof AbortException) { 30929 return; 30930 } 30931 if (this.options.ignoreErrors) { 30932 warn(`handleTilingType - ignoring pattern: "${reason}".`); 30933 return; 30934 } 30935 throw reason; 30936 }); 30937 } 30938 async handleSetFont(resources, fontArgs, fontRef, operatorList, task, state, fallbackFontDict = null, cssFontInfo = null) { 30939 const fontName = fontArgs?.[0] instanceof Name ? fontArgs[0].name : null; 30940 let translated = await this.loadFont(fontName, fontRef, resources, fallbackFontDict, cssFontInfo); 30941 if (translated.font.isType3Font) { 30942 try { 30943 await translated.loadType3Data(this, resources, task); 30944 operatorList.addDependencies(translated.type3Dependencies); 30945 } catch (reason) { 30946 translated = new TranslatedFont({ 30947 loadedName: "g_font_error", 30948 font: new ErrorFont(`Type3 font load error: ${reason}`), 30949 dict: translated.font, 30950 evaluatorOptions: this.options 30951 }); 30952 } 30953 } 30954 state.font = translated.font; 30955 translated.send(this.handler); 30956 return translated.loadedName; 30957 }
vendor: 36,764 bytes, lines 30958-32006
30958 handleText(chars, state) { 30959 const font = state.font; 30960 const glyphs = font.charsToGlyphs(chars); 30961 if (font.data) { 30962 const isAddToPathSet = !!(state.textRenderingMode & TextRenderingMode.ADD_TO_PATH_FLAG); 30963 if (isAddToPathSet || state.fillColorSpace.name === "Pattern" || font.disableFontFace || this.options.disableFontFace) { 30964 PartialEvaluator.buildFontPaths(font, glyphs, this.handler, this.options); 30965 } 30966 } 30967 return glyphs; 30968 } 30969 ensureStateFont(state) { 30970 if (state.font) { 30971 return; 30972 } 30973 const reason = new FormatError("Missing setFont (Tf) operator before text rendering operator."); 30974 if (this.options.ignoreErrors) { 30975 warn(`ensureStateFont: "${reason}".`); 30976 return; 30977 } 30978 throw reason; 30979 } 30980 async setGState({ 30981 resources, 30982 gState, 30983 operatorList, 30984 cacheKey, 30985 task, 30986 stateManager, 30987 localGStateCache, 30988 localColorSpaceCache 30989 }) { 30990 const gStateRef = gState.objId; 30991 let isSimpleGState = true; 30992 const gStateObj = []; 30993 let promise = Promise.resolve(); 30994 for (const key of gState.getKeys()) { 30995 const value = gState.get(key); 30996 switch (key) { 30997 case "Type": 30998 break; 30999 case "LW": 31000 case "LC": 31001 case "LJ": 31002 case "ML": 31003 case "D": 31004 case "RI": 31005 case "FL": 31006 case "CA": 31007 case "ca": 31008 gStateObj.push([key, value]); 31009 break; 31010 case "Font": 31011 isSimpleGState = false; 31012 promise = promise.then(() => this.handleSetFont(resources, null, value[0], operatorList, task, stateManager.state).then(function (loadedName) { 31013 operatorList.addDependency(loadedName); 31014 gStateObj.push([key, [loadedName, value[1]]]); 31015 })); 31016 break; 31017 case "BM": 31018 gStateObj.push([key, normalizeBlendMode(value)]); 31019 break; 31020 case "SMask": 31021 if (isName(value, "None")) { 31022 gStateObj.push([key, false]); 31023 break; 31024 } 31025 if (value instanceof Dict) { 31026 isSimpleGState = false; 31027 promise = promise.then(() => this.handleSMask(value, resources, operatorList, task, stateManager, localColorSpaceCache)); 31028 gStateObj.push([key, true]); 31029 } else { 31030 warn("Unsupported SMask type"); 31031 } 31032 break; 31033 case "TR": 31034 const transferMaps = this.handleTransferFunction(value); 31035 gStateObj.push([key, transferMaps]); 31036 break; 31037 case "OP": 31038 case "op": 31039 case "OPM": 31040 case "BG": 31041 case "BG2": 31042 case "UCR": 31043 case "UCR2": 31044 case "TR2": 31045 case "HT": 31046 case "SM": 31047 case "SA": 31048 case "AIS": 31049 case "TK": 31050 info("graphic state operator " + key); 31051 break; 31052 default: 31053 info("Unknown graphic state operator " + key); 31054 break; 31055 } 31056 } 31057 await promise; 31058 if (gStateObj.length > 0) { 31059 operatorList.addOp(OPS.setGState, [gStateObj]); 31060 } 31061 if (isSimpleGState) { 31062 localGStateCache.set(cacheKey, gStateRef, gStateObj); 31063 } 31064 } 31065 loadFont(fontName, font, resources, fallbackFontDict = null, cssFontInfo = null) { 31066 const errorFont = async () => { 31067 return new TranslatedFont({ 31068 loadedName: "g_font_error", 31069 font: new ErrorFont(`Font "${fontName}" is not available.`), 31070 dict: font, 31071 evaluatorOptions: this.options 31072 }); 31073 }; 31074 let fontRef; 31075 if (font) { 31076 if (font instanceof Ref) { 31077 fontRef = font; 31078 } 31079 } else { 31080 const fontRes = resources.get("Font"); 31081 if (fontRes) { 31082 fontRef = fontRes.getRaw(fontName); 31083 } 31084 } 31085 if (fontRef) { 31086 if (this.type3FontRefs?.has(fontRef)) { 31087 return errorFont(); 31088 } 31089 if (this.fontCache.has(fontRef)) { 31090 return this.fontCache.get(fontRef); 31091 } 31092 try { 31093 font = this.xref.fetchIfRef(fontRef); 31094 } catch (ex) { 31095 warn(`loadFont - lookup failed: "${ex}".`); 31096 } 31097 } 31098 if (!(font instanceof Dict)) { 31099 if (!this.options.ignoreErrors && !this.parsingType3Font) { 31100 warn(`Font "${fontName}" is not available.`); 31101 return errorFont(); 31102 } 31103 warn(`Font "${fontName}" is not available -- attempting to fallback to a default font.`); 31104 font = fallbackFontDict || PartialEvaluator.fallbackFontDict; 31105 } 31106 if (font.cacheKey && this.fontCache.has(font.cacheKey)) { 31107 return this.fontCache.get(font.cacheKey); 31108 } 31109 const { 31110 promise, 31111 resolve 31112 } = Promise.withResolvers(); 31113 let preEvaluatedFont; 31114 try { 31115 preEvaluatedFont = this.preEvaluateFont(font); 31116 preEvaluatedFont.cssFontInfo = cssFontInfo; 31117 } catch (reason) { 31118 warn(`loadFont - preEvaluateFont failed: "${reason}".`); 31119 return errorFont(); 31120 } 31121 const { 31122 descriptor, 31123 hash 31124 } = preEvaluatedFont; 31125 const fontRefIsRef = fontRef instanceof Ref; 31126 let fontID; 31127 if (hash && descriptor instanceof Dict) { 31128 const fontAliases = descriptor.fontAliases ||= Object.create(null); 31129 if (fontAliases[hash]) { 31130 const aliasFontRef = fontAliases[hash].aliasRef; 31131 if (fontRefIsRef && aliasFontRef && this.fontCache.has(aliasFontRef)) { 31132 this.fontCache.putAlias(fontRef, aliasFontRef); 31133 return this.fontCache.get(fontRef); 31134 } 31135 } else { 31136 fontAliases[hash] = { 31137 fontID: this.idFactory.createFontId() 31138 }; 31139 } 31140 if (fontRefIsRef) { 31141 fontAliases[hash].aliasRef = fontRef; 31142 } 31143 fontID = fontAliases[hash].fontID; 31144 } else { 31145 fontID = this.idFactory.createFontId(); 31146 } 31147 assert(fontID?.startsWith("f"), 'The "fontID" must be (correctly) defined.'); 31148 if (fontRefIsRef) { 31149 this.fontCache.put(fontRef, promise); 31150 } else { 31151 font.cacheKey = `cacheKey_${fontID}`; 31152 this.fontCache.put(font.cacheKey, promise); 31153 } 31154 font.loadedName = `${this.idFactory.getDocId()}_${fontID}`; 31155 this.translateFont(preEvaluatedFont).then(translatedFont => { 31156 resolve(new TranslatedFont({ 31157 loadedName: font.loadedName, 31158 font: translatedFont, 31159 dict: font, 31160 evaluatorOptions: this.options 31161 })); 31162 }).catch(reason => { 31163 warn(`loadFont - translateFont failed: "${reason}".`); 31164 resolve(new TranslatedFont({ 31165 loadedName: font.loadedName, 31166 font: new ErrorFont(reason instanceof Error ? reason.message : reason), 31167 dict: font, 31168 evaluatorOptions: this.options 31169 })); 31170 }); 31171 return promise; 31172 } 31173 buildPath(operatorList, fn, args, parsingText = false) { 31174 const lastIndex = operatorList.length - 1; 31175 if (!args) { 31176 args = []; 31177 } 31178 if (lastIndex < 0 || operatorList.fnArray[lastIndex] !== OPS.constructPath) { 31179 if (parsingText) { 31180 warn(`Encountered path operator "${fn}" inside of a text object.`); 31181 operatorList.addOp(OPS.save, null); 31182 } 31183 let minMax; 31184 switch (fn) { 31185 case OPS.rectangle: 31186 const x = args[0] + args[2]; 31187 const y = args[1] + args[3]; 31188 minMax = [Math.min(args[0], x), Math.min(args[1], y), Math.max(args[0], x), Math.max(args[1], y)]; 31189 break; 31190 case OPS.moveTo: 31191 case OPS.lineTo: 31192 minMax = [args[0], args[1], args[0], args[1]]; 31193 break; 31194 default: 31195 minMax = [Infinity, Infinity, -Infinity, -Infinity]; 31196 break; 31197 } 31198 operatorList.addOp(OPS.constructPath, [[fn], args, minMax]); 31199 if (parsingText) { 31200 operatorList.addOp(OPS.restore, null); 31201 } 31202 } else { 31203 const opArgs = operatorList.argsArray[lastIndex]; 31204 opArgs[0].push(fn); 31205 opArgs[1].push(...args); 31206 const minMax = opArgs[2]; 31207 switch (fn) { 31208 case OPS.rectangle: 31209 const x = args[0] + args[2]; 31210 const y = args[1] + args[3]; 31211 minMax[0] = Math.min(minMax[0], args[0], x); 31212 minMax[1] = Math.min(minMax[1], args[1], y); 31213 minMax[2] = Math.max(minMax[2], args[0], x); 31214 minMax[3] = Math.max(minMax[3], args[1], y); 31215 break; 31216 case OPS.moveTo: 31217 case OPS.lineTo: 31218 minMax[0] = Math.min(minMax[0], args[0]); 31219 minMax[1] = Math.min(minMax[1], args[1]); 31220 minMax[2] = Math.max(minMax[2], args[0]); 31221 minMax[3] = Math.max(minMax[3], args[1]); 31222 break; 31223 } 31224 } 31225 } 31226 parseColorSpace({ 31227 cs, 31228 resources, 31229 localColorSpaceCache 31230 }) { 31231 return ColorSpace.parseAsync({ 31232 cs, 31233 xref: this.xref, 31234 resources, 31235 pdfFunctionFactory: this._pdfFunctionFactory, 31236 localColorSpaceCache 31237 }).catch(reason => { 31238 if (reason instanceof AbortException) { 31239 return null; 31240 } 31241 if (this.options.ignoreErrors) { 31242 warn(`parseColorSpace - ignoring ColorSpace: "${reason}".`); 31243 return null; 31244 } 31245 throw reason; 31246 }); 31247 } 31248 parseShading({ 31249 shading, 31250 resources, 31251 localColorSpaceCache, 31252 localShadingPatternCache 31253 }) { 31254 let id = localShadingPatternCache.get(shading); 31255 if (id) { 31256 return id; 31257 } 31258 let patternIR; 31259 try { 31260 const shadingFill = Pattern.parseShading(shading, this.xref, resources, this._pdfFunctionFactory, localColorSpaceCache); 31261 patternIR = shadingFill.getIR(); 31262 } catch (reason) { 31263 if (reason instanceof AbortException) { 31264 return null; 31265 } 31266 if (this.options.ignoreErrors) { 31267 warn(`parseShading - ignoring shading: "${reason}".`); 31268 localShadingPatternCache.set(shading, null); 31269 return null; 31270 } 31271 throw reason; 31272 } 31273 id = `pattern_${this.idFactory.createObjId()}`; 31274 if (this.parsingType3Font) { 31275 id = `${this.idFactory.getDocId()}_type3_${id}`; 31276 } 31277 localShadingPatternCache.set(shading, id); 31278 if (this.parsingType3Font) { 31279 this.handler.send("commonobj", [id, "Pattern", patternIR]); 31280 } else { 31281 this.handler.send("obj", [id, this.pageIndex, "Pattern", patternIR]); 31282 } 31283 return id; 31284 } 31285 handleColorN(operatorList, fn, args, cs, patterns, resources, task, localColorSpaceCache, localTilingPatternCache, localShadingPatternCache) { 31286 const patternName = args.pop(); 31287 if (patternName instanceof Name) { 31288 const rawPattern = patterns.getRaw(patternName.name); 31289 const localTilingPattern = rawPattern instanceof Ref && localTilingPatternCache.getByRef(rawPattern); 31290 if (localTilingPattern) { 31291 try { 31292 const color = cs.base ? cs.base.getRgb(args, 0) : null; 31293 const tilingPatternIR = getTilingPatternIR(localTilingPattern.operatorListIR, localTilingPattern.dict, color); 31294 operatorList.addOp(fn, tilingPatternIR); 31295 return undefined; 31296 } catch {} 31297 } 31298 const pattern = this.xref.fetchIfRef(rawPattern); 31299 if (pattern) { 31300 const dict = pattern instanceof BaseStream ? pattern.dict : pattern; 31301 const typeNum = dict.get("PatternType"); 31302 if (typeNum === PatternType.TILING) { 31303 const color = cs.base ? cs.base.getRgb(args, 0) : null; 31304 return this.handleTilingType(fn, color, resources, pattern, dict, operatorList, task, localTilingPatternCache); 31305 } else if (typeNum === PatternType.SHADING) { 31306 const shading = dict.get("Shading"); 31307 const objId = this.parseShading({ 31308 shading, 31309 resources, 31310 localColorSpaceCache, 31311 localShadingPatternCache 31312 }); 31313 if (objId) { 31314 const matrix = lookupMatrix(dict.getArray("Matrix"), null); 31315 operatorList.addOp(fn, ["Shading", objId, matrix]); 31316 } 31317 return undefined; 31318 } 31319 throw new FormatError(`Unknown PatternType: ${typeNum}`); 31320 } 31321 } 31322 throw new FormatError(`Unknown PatternName: ${patternName}`); 31323 } 31324 _parseVisibilityExpression(array, nestingCounter, currentResult) { 31325 const MAX_NESTING = 10; 31326 if (++nestingCounter > MAX_NESTING) { 31327 warn("Visibility expression is too deeply nested"); 31328 return; 31329 } 31330 const length = array.length; 31331 const operator = this.xref.fetchIfRef(array[0]); 31332 if (length < 2 || !(operator instanceof Name)) { 31333 warn("Invalid visibility expression"); 31334 return; 31335 } 31336 switch (operator.name) { 31337 case "And": 31338 case "Or": 31339 case "Not": 31340 currentResult.push(operator.name); 31341 break; 31342 default: 31343 warn(`Invalid operator ${operator.name} in visibility expression`); 31344 return; 31345 } 31346 for (let i = 1; i < length; i++) { 31347 const raw = array[i]; 31348 const object = this.xref.fetchIfRef(raw); 31349 if (Array.isArray(object)) { 31350 const nestedResult = []; 31351 currentResult.push(nestedResult); 31352 this._parseVisibilityExpression(object, nestingCounter, nestedResult); 31353 } else if (raw instanceof Ref) { 31354 currentResult.push(raw.toString()); 31355 } 31356 } 31357 } 31358 async parseMarkedContentProps(contentProperties, resources) { 31359 let optionalContent; 31360 if (contentProperties instanceof Name) { 31361 const properties = resources.get("Properties"); 31362 optionalContent = properties.get(contentProperties.name); 31363 } else if (contentProperties instanceof Dict) { 31364 optionalContent = contentProperties; 31365 } else { 31366 throw new FormatError("Optional content properties malformed."); 31367 } 31368 const optionalContentType = optionalContent.get("Type")?.name; 31369 if (optionalContentType === "OCG") { 31370 return { 31371 type: optionalContentType, 31372 id: optionalContent.objId 31373 }; 31374 } else if (optionalContentType === "OCMD") { 31375 const expression = optionalContent.get("VE"); 31376 if (Array.isArray(expression)) { 31377 const result = []; 31378 this._parseVisibilityExpression(expression, 0, result); 31379 if (result.length > 0) { 31380 return { 31381 type: "OCMD", 31382 expression: result 31383 }; 31384 } 31385 } 31386 const optionalContentGroups = optionalContent.get("OCGs"); 31387 if (Array.isArray(optionalContentGroups) || optionalContentGroups instanceof Dict) { 31388 const groupIds = []; 31389 if (Array.isArray(optionalContentGroups)) { 31390 for (const ocg of optionalContentGroups) { 31391 groupIds.push(ocg.toString()); 31392 } 31393 } else { 31394 groupIds.push(optionalContentGroups.objId); 31395 } 31396 return { 31397 type: optionalContentType, 31398 ids: groupIds, 31399 policy: optionalContent.get("P") instanceof Name ? optionalContent.get("P").name : null, 31400 expression: null 31401 }; 31402 } else if (optionalContentGroups instanceof Ref) { 31403 return { 31404 type: optionalContentType, 31405 id: optionalContentGroups.toString() 31406 }; 31407 } 31408 } 31409 return null; 31410 } 31411 getOperatorList({ 31412 stream, 31413 task, 31414 resources, 31415 operatorList, 31416 initialState = null, 31417 fallbackFontDict = null 31418 }) { 31419 resources ||= Dict.empty; 31420 initialState ||= new EvalState(); 31421 if (!operatorList) { 31422 throw new Error('getOperatorList: missing "operatorList" parameter'); 31423 } 31424 const self = this; 31425 const xref = this.xref; 31426 let parsingText = false; 31427 const localImageCache = new LocalImageCache(); 31428 const localColorSpaceCache = new LocalColorSpaceCache(); 31429 const localGStateCache = new LocalGStateCache(); 31430 const localTilingPatternCache = new LocalTilingPatternCache(); 31431 const localShadingPatternCache = new Map(); 31432 const xobjs = resources.get("XObject") || Dict.empty; 31433 const patterns = resources.get("Pattern") || Dict.empty; 31434 const stateManager = new StateManager(initialState); 31435 const preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager); 31436 const timeSlotManager = new TimeSlotManager(); 31437 function closePendingRestoreOPS(argument) { 31438 for (let i = 0, ii = preprocessor.savedStatesDepth; i < ii; i++) { 31439 operatorList.addOp(OPS.restore, []); 31440 } 31441 } 31442 return new Promise(function promiseBody(resolve, reject) { 31443 const next = function (promise) { 31444 Promise.all([promise, operatorList.ready]).then(function () { 31445 try { 31446 promiseBody(resolve, reject); 31447 } catch (ex) { 31448 reject(ex); 31449 } 31450 }, reject); 31451 }; 31452 task.ensureNotTerminated(); 31453 timeSlotManager.reset(); 31454 const operation = {}; 31455 let stop, i, ii, cs, name, isValidName; 31456 while (!(stop = timeSlotManager.check())) { 31457 operation.args = null; 31458 if (!preprocessor.read(operation)) { 31459 break; 31460 } 31461 let args = operation.args; 31462 let fn = operation.fn; 31463 switch (fn | 0) { 31464 case OPS.paintXObject: 31465 isValidName = args[0] instanceof Name; 31466 name = args[0].name; 31467 if (isValidName) { 31468 const localImage = localImageCache.getByName(name); 31469 if (localImage) { 31470 addLocallyCachedImageOps(operatorList, localImage); 31471 args = null; 31472 continue; 31473 } 31474 } 31475 next(new Promise(function (resolveXObject, rejectXObject) { 31476 if (!isValidName) { 31477 throw new FormatError("XObject must be referred to by name."); 31478 } 31479 let xobj = xobjs.getRaw(name); 31480 if (xobj instanceof Ref) { 31481 const localImage = localImageCache.getByRef(xobj) || self._regionalImageCache.getByRef(xobj); 31482 if (localImage) { 31483 addLocallyCachedImageOps(operatorList, localImage); 31484 resolveXObject(); 31485 return; 31486 } 31487 const globalImage = self.globalImageCache.getData(xobj, self.pageIndex); 31488 if (globalImage) { 31489 operatorList.addDependency(globalImage.objId); 31490 operatorList.addImageOps(globalImage.fn, globalImage.args, globalImage.optionalContent, globalImage.hasMask); 31491 resolveXObject(); 31492 return; 31493 } 31494 xobj = xref.fetch(xobj); 31495 } 31496 if (!(xobj instanceof BaseStream)) { 31497 throw new FormatError("XObject should be a stream"); 31498 } 31499 const type = xobj.dict.get("Subtype"); 31500 if (!(type instanceof Name)) { 31501 throw new FormatError("XObject should have a Name subtype"); 31502 } 31503 if (type.name === "Form") { 31504 stateManager.save(); 31505 self.buildFormXObject(resources, xobj, null, operatorList, task, stateManager.state.clone(), localColorSpaceCache).then(function () { 31506 stateManager.restore(); 31507 resolveXObject(); 31508 }, rejectXObject); 31509 return; 31510 } else if (type.name === "Image") { 31511 self.buildPaintImageXObject({ 31512 resources, 31513 image: xobj, 31514 operatorList, 31515 cacheKey: name, 31516 localImageCache, 31517 localColorSpaceCache 31518 }).then(resolveXObject, rejectXObject); 31519 return; 31520 } else if (type.name === "PS") { 31521 info("Ignored XObject subtype PS"); 31522 } else { 31523 throw new FormatError(`Unhandled XObject subtype ${type.name}`); 31524 } 31525 resolveXObject(); 31526 }).catch(function (reason) { 31527 if (reason instanceof AbortException) { 31528 return; 31529 } 31530 if (self.options.ignoreErrors) { 31531 warn(`getOperatorList - ignoring XObject: "${reason}".`); 31532 return; 31533 } 31534 throw reason; 31535 })); 31536 return; 31537 case OPS.setFont: 31538 const fontSize = args[1]; 31539 next(self.handleSetFont(resources, args, null, operatorList, task, stateManager.state, fallbackFontDict).then(function (loadedName) { 31540 operatorList.addDependency(loadedName); 31541 operatorList.addOp(OPS.setFont, [loadedName, fontSize]); 31542 })); 31543 return; 31544 case OPS.beginText: 31545 parsingText = true; 31546 break; 31547 case OPS.endText: 31548 parsingText = false; 31549 break; 31550 case OPS.endInlineImage: 31551 const cacheKey = args[0].cacheKey; 31552 if (cacheKey) { 31553 const localImage = localImageCache.getByName(cacheKey); 31554 if (localImage) { 31555 addLocallyCachedImageOps(operatorList, localImage); 31556 args = null; 31557 continue; 31558 } 31559 } 31560 next(self.buildPaintImageXObject({ 31561 resources, 31562 image: args[0], 31563 isInline: true, 31564 operatorList, 31565 cacheKey, 31566 localImageCache, 31567 localColorSpaceCache 31568 })); 31569 return; 31570 case OPS.showText: 31571 if (!stateManager.state.font) { 31572 self.ensureStateFont(stateManager.state); 31573 continue; 31574 } 31575 args[0] = self.handleText(args[0], stateManager.state); 31576 break; 31577 case OPS.showSpacedText: 31578 if (!stateManager.state.font) { 31579 self.ensureStateFont(stateManager.state); 31580 continue; 31581 } 31582 const combinedGlyphs = [], 31583 state = stateManager.state; 31584 for (const arrItem of args[0]) { 31585 if (typeof arrItem === "string") { 31586 combinedGlyphs.push(...self.handleText(arrItem, state)); 31587 } else if (typeof arrItem === "number") { 31588 combinedGlyphs.push(arrItem); 31589 } 31590 } 31591 args[0] = combinedGlyphs; 31592 fn = OPS.showText; 31593 break; 31594 case OPS.nextLineShowText: 31595 if (!stateManager.state.font) { 31596 self.ensureStateFont(stateManager.state); 31597 continue; 31598 } 31599 operatorList.addOp(OPS.nextLine); 31600 args[0] = self.handleText(args[0], stateManager.state); 31601 fn = OPS.showText; 31602 break; 31603 case OPS.nextLineSetSpacingShowText: 31604 if (!stateManager.state.font) { 31605 self.ensureStateFont(stateManager.state); 31606 continue; 31607 } 31608 operatorList.addOp(OPS.nextLine); 31609 operatorList.addOp(OPS.setWordSpacing, [args.shift()]); 31610 operatorList.addOp(OPS.setCharSpacing, [args.shift()]); 31611 args[0] = self.handleText(args[0], stateManager.state); 31612 fn = OPS.showText; 31613 break; 31614 case OPS.setTextRenderingMode: 31615 stateManager.state.textRenderingMode = args[0]; 31616 break; 31617 case OPS.setFillColorSpace: 31618 { 31619 const cachedColorSpace = ColorSpace.getCached(args[0], xref, localColorSpaceCache); 31620 if (cachedColorSpace) { 31621 stateManager.state.fillColorSpace = cachedColorSpace; 31622 continue; 31623 } 31624 next(self.parseColorSpace({ 31625 cs: args[0], 31626 resources, 31627 localColorSpaceCache 31628 }).then(function (colorSpace) { 31629 stateManager.state.fillColorSpace = colorSpace || ColorSpace.singletons.gray; 31630 })); 31631 return; 31632 } 31633 case OPS.setStrokeColorSpace: 31634 { 31635 const cachedColorSpace = ColorSpace.getCached(args[0], xref, localColorSpaceCache); 31636 if (cachedColorSpace) { 31637 stateManager.state.strokeColorSpace = cachedColorSpace; 31638 continue; 31639 } 31640 next(self.parseColorSpace({ 31641 cs: args[0], 31642 resources, 31643 localColorSpaceCache 31644 }).then(function (colorSpace) { 31645 stateManager.state.strokeColorSpace = colorSpace || ColorSpace.singletons.gray; 31646 })); 31647 return; 31648 } 31649 case OPS.setFillColor: 31650 cs = stateManager.state.fillColorSpace; 31651 args = cs.getRgb(args, 0); 31652 fn = OPS.setFillRGBColor; 31653 break; 31654 case OPS.setStrokeColor: 31655 cs = stateManager.state.strokeColorSpace; 31656 args = cs.getRgb(args, 0); 31657 fn = OPS.setStrokeRGBColor; 31658 break; 31659 case OPS.setFillGray: 31660 stateManager.state.fillColorSpace = ColorSpace.singletons.gray; 31661 args = ColorSpace.singletons.gray.getRgb(args, 0); 31662 fn = OPS.setFillRGBColor; 31663 break; 31664 case OPS.setStrokeGray: 31665 stateManager.state.strokeColorSpace = ColorSpace.singletons.gray; 31666 args = ColorSpace.singletons.gray.getRgb(args, 0); 31667 fn = OPS.setStrokeRGBColor; 31668 break; 31669 case OPS.setFillCMYKColor: 31670 stateManager.state.fillColorSpace = ColorSpace.singletons.cmyk; 31671 args = ColorSpace.singletons.cmyk.getRgb(args, 0); 31672 fn = OPS.setFillRGBColor; 31673 break; 31674 case OPS.setStrokeCMYKColor: 31675 stateManager.state.strokeColorSpace = ColorSpace.singletons.cmyk; 31676 args = ColorSpace.singletons.cmyk.getRgb(args, 0); 31677 fn = OPS.setStrokeRGBColor; 31678 break; 31679 case OPS.setFillRGBColor: 31680 stateManager.state.fillColorSpace = ColorSpace.singletons.rgb; 31681 args = ColorSpace.singletons.rgb.getRgb(args, 0); 31682 break; 31683 case OPS.setStrokeRGBColor: 31684 stateManager.state.strokeColorSpace = ColorSpace.singletons.rgb; 31685 args = ColorSpace.singletons.rgb.getRgb(args, 0); 31686 break; 31687 case OPS.setFillColorN: 31688 cs = stateManager.state.patternFillColorSpace; 31689 if (!cs) { 31690 if (isNumberArray(args, null)) { 31691 args = ColorSpace.singletons.gray.getRgb(args, 0); 31692 fn = OPS.setFillRGBColor; 31693 break; 31694 } 31695 args = []; 31696 fn = OPS.setFillTransparent; 31697 break; 31698 } 31699 if (cs.name === "Pattern") { 31700 next(self.handleColorN(operatorList, OPS.setFillColorN, args, cs, patterns, resources, task, localColorSpaceCache, localTilingPatternCache, localShadingPatternCache)); 31701 return; 31702 } 31703 args = cs.getRgb(args, 0); 31704 fn = OPS.setFillRGBColor; 31705 break; 31706 case OPS.setStrokeColorN: 31707 cs = stateManager.state.patternStrokeColorSpace; 31708 if (!cs) { 31709 if (isNumberArray(args, null)) { 31710 args = ColorSpace.singletons.gray.getRgb(args, 0); 31711 fn = OPS.setStrokeRGBColor; 31712 break; 31713 } 31714 args = []; 31715 fn = OPS.setStrokeTransparent; 31716 break; 31717 } 31718 if (cs.name === "Pattern") { 31719 next(self.handleColorN(operatorList, OPS.setStrokeColorN, args, cs, patterns, resources, task, localColorSpaceCache, localTilingPatternCache, localShadingPatternCache)); 31720 return; 31721 } 31722 args = cs.getRgb(args, 0); 31723 fn = OPS.setStrokeRGBColor; 31724 break; 31725 case OPS.shadingFill: 31726 let shading; 31727 try { 31728 const shadingRes = resources.get("Shading"); 31729 if (!shadingRes) { 31730 throw new FormatError("No shading resource found"); 31731 } 31732 shading = shadingRes.get(args[0].name); 31733 if (!shading) { 31734 throw new FormatError("No shading object found"); 31735 } 31736 } catch (reason) { 31737 if (reason instanceof AbortException) { 31738 continue; 31739 } 31740 if (self.options.ignoreErrors) { 31741 warn(`getOperatorList - ignoring Shading: "${reason}".`); 31742 continue; 31743 } 31744 throw reason; 31745 } 31746 const patternId = self.parseShading({ 31747 shading, 31748 resources, 31749 localColorSpaceCache, 31750 localShadingPatternCache 31751 }); 31752 if (!patternId) { 31753 continue; 31754 } 31755 args = [patternId]; 31756 fn = OPS.shadingFill; 31757 break; 31758 case OPS.setGState: 31759 isValidName = args[0] instanceof Name; 31760 name = args[0].name; 31761 if (isValidName) { 31762 const localGStateObj = localGStateCache.getByName(name); 31763 if (localGStateObj) { 31764 if (localGStateObj.length > 0) { 31765 operatorList.addOp(OPS.setGState, [localGStateObj]); 31766 } 31767 args = null; 31768 continue; 31769 } 31770 } 31771 next(new Promise(function (resolveGState, rejectGState) { 31772 if (!isValidName) { 31773 throw new FormatError("GState must be referred to by name."); 31774 } 31775 const extGState = resources.get("ExtGState"); 31776 if (!(extGState instanceof Dict)) { 31777 throw new FormatError("ExtGState should be a dictionary."); 31778 } 31779 const gState = extGState.get(name); 31780 if (!(gState instanceof Dict)) { 31781 throw new FormatError("GState should be a dictionary."); 31782 } 31783 self.setGState({ 31784 resources, 31785 gState, 31786 operatorList, 31787 cacheKey: name, 31788 task, 31789 stateManager, 31790 localGStateCache, 31791 localColorSpaceCache 31792 }).then(resolveGState, rejectGState); 31793 }).catch(function (reason) { 31794 if (reason instanceof AbortException) { 31795 return; 31796 } 31797 if (self.options.ignoreErrors) { 31798 warn(`getOperatorList - ignoring ExtGState: "${reason}".`); 31799 return; 31800 } 31801 throw reason; 31802 })); 31803 return; 31804 case OPS.moveTo: 31805 case OPS.lineTo: 31806 case OPS.curveTo: 31807 case OPS.curveTo2: 31808 case OPS.curveTo3: 31809 case OPS.closePath: 31810 case OPS.rectangle: 31811 self.buildPath(operatorList, fn, args, parsingText); 31812 continue; 31813 case OPS.markPoint: 31814 case OPS.markPointProps: 31815 case OPS.beginCompat: 31816 case OPS.endCompat: 31817 continue; 31818 case OPS.beginMarkedContentProps: 31819 if (!(args[0] instanceof Name)) { 31820 warn(`Expected name for beginMarkedContentProps arg0=${args[0]}`); 31821 operatorList.addOp(OPS.beginMarkedContentProps, ["OC", null]); 31822 continue; 31823 } 31824 if (args[0].name === "OC") { 31825 next(self.parseMarkedContentProps(args[1], resources).then(data => { 31826 operatorList.addOp(OPS.beginMarkedContentProps, ["OC", data]); 31827 }).catch(reason => { 31828 if (reason instanceof AbortException) { 31829 return; 31830 } 31831 if (self.options.ignoreErrors) { 31832 warn(`getOperatorList - ignoring beginMarkedContentProps: "${reason}".`); 31833 operatorList.addOp(OPS.beginMarkedContentProps, ["OC", null]); 31834 return; 31835 } 31836 throw reason; 31837 })); 31838 return; 31839 } 31840 args = [args[0].name, args[1] instanceof Dict ? args[1].get("MCID") : null]; 31841 break; 31842 case OPS.beginMarkedContent: 31843 case OPS.endMarkedContent: 31844 default: 31845 if (args !== null) { 31846 for (i = 0, ii = args.length; i < ii; i++) { 31847 if (args[i] instanceof Dict) { 31848 break; 31849 } 31850 } 31851 if (i < ii) { 31852 warn("getOperatorList - ignoring operator: " + fn); 31853 continue; 31854 } 31855 } 31856 } 31857 operatorList.addOp(fn, args); 31858 } 31859 if (stop) { 31860 next(deferred); 31861 return; 31862 } 31863 closePendingRestoreOPS(); 31864 resolve(); 31865 }).catch(reason => { 31866 if (reason instanceof AbortException) { 31867 return; 31868 } 31869 if (this.options.ignoreErrors) { 31870 warn(`getOperatorList - ignoring errors during "${task.name}" ` + `task: "${reason}".`); 31871 closePendingRestoreOPS(); 31872 return; 31873 } 31874 throw reason; 31875 }); 31876 } 31877 getTextContent({ 31878 stream, 31879 task, 31880 resources, 31881 stateManager = null, 31882 includeMarkedContent = false, 31883 sink, 31884 seenStyles = new Set(), 31885 viewBox, 31886 lang = null, 31887 markedContentData = null, 31888 disableNormalization = false, 31889 keepWhiteSpace = false 31890 }) { 31891 resources ||= Dict.empty; 31892 stateManager ||= new StateManager(new TextState()); 31893 if (includeMarkedContent) { 31894 markedContentData ||= { 31895 level: 0 31896 }; 31897 } 31898 const textContent = { 31899 items: [], 31900 styles: Object.create(null), 31901 lang 31902 }; 31903 const textContentItem = { 31904 initialized: false, 31905 str: [], 31906 totalWidth: 0, 31907 totalHeight: 0, 31908 width: 0, 31909 height: 0, 31910 vertical: false, 31911 prevTransform: null, 31912 textAdvanceScale: 0, 31913 spaceInFlowMin: 0, 31914 spaceInFlowMax: 0, 31915 trackingSpaceMin: Infinity, 31916 negativeSpaceMax: -Infinity, 31917 notASpace: -Infinity, 31918 transform: null, 31919 fontName: null, 31920 hasEOL: false 31921 }; 31922 const twoLastChars = [" ", " "]; 31923 let twoLastCharsPos = 0; 31924 function saveLastChar(char) { 31925 const nextPos = (twoLastCharsPos + 1) % 2; 31926 const ret = twoLastChars[twoLastCharsPos] !== " " && twoLastChars[nextPos] === " "; 31927 twoLastChars[twoLastCharsPos] = char; 31928 twoLastCharsPos = nextPos; 31929 return !keepWhiteSpace && ret; 31930 } 31931 function shouldAddWhitepsace() { 31932 return !keepWhiteSpace && twoLastChars[twoLastCharsPos] !== " " && twoLastChars[(twoLastCharsPos + 1) % 2] === " "; 31933 } 31934 function resetLastChars() { 31935 twoLastChars[0] = twoLastChars[1] = " "; 31936 twoLastCharsPos = 0; 31937 } 31938 const TRACKING_SPACE_FACTOR = 0.102; 31939 const NOT_A_SPACE_FACTOR = 0.03; 31940 const NEGATIVE_SPACE_FACTOR = -0.2; 31941 const SPACE_IN_FLOW_MIN_FACTOR = 0.102; 31942 const SPACE_IN_FLOW_MAX_FACTOR = 0.6; 31943 const VERTICAL_SHIFT_RATIO = 0.25; 31944 const self = this; 31945 const xref = this.xref; 31946 const showSpacedTextBuffer = []; 31947 let xobjs = null; 31948 const emptyXObjectCache = new LocalImageCache(); 31949 const emptyGStateCache = new LocalGStateCache(); 31950 const preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager); 31951 let textState; 31952 function pushWhitespace({ 31953 width = 0, 31954 height = 0, 31955 transform = textContentItem.prevTransform, 31956 fontName = textContentItem.fontName 31957 }) { 31958 textContent.items.push({ 31959 str: " ", 31960 dir: "ltr", 31961 width, 31962 height, 31963 transform, 31964 fontName, 31965 hasEOL: false 31966 }); 31967 } 31968 function getCurrentTextTransform() { 31969 const font = textState.font; 31970 const tsm = [textState.fontSize * textState.textHScale, 0, 0, textState.fontSize, 0, textState.textRise]; 31971 if (font.isType3Font && (textState.fontSize <= 1 || font.isCharBBox) && !isArrayEqual(textState.fontMatrix, FONT_IDENTITY_MATRIX)) { 31972 const glyphHeight = font.bbox[3] - font.bbox[1]; 31973 if (glyphHeight > 0) { 31974 tsm[3] *= glyphHeight * textState.fontMatrix[3]; 31975 } 31976 } 31977 return Util.transform(textState.ctm, Util.transform(textState.textMatrix, tsm)); 31978 } 31979 function ensureTextContentItem() { 31980 if (textContentItem.initialized) { 31981 return textContentItem; 31982 } 31983 const { 31984 font, 31985 loadedName 31986 } = textState; 31987 if (!seenStyles.has(loadedName)) { 31988 seenStyles.add(loadedName); 31989 textContent.styles[loadedName] = { 31990 fontFamily: font.fallbackName, 31991 ascent: font.ascent, 31992 descent: font.descent, 31993 vertical: font.vertical 31994 }; 31995 if (self.options.fontExtraProperties && font.systemFontInfo) { 31996 const style = textContent.styles[loadedName]; 31997 style.fontSubstitution = font.systemFontInfo.css; 31998 style.fontSubstitutionLoadedName = font.systemFontInfo.loadedName; 31999 } 32000 } 32001 textContentItem.fontName = loadedName; 32002 const trm = textContentItem.transform = getCurrentTextTransform(); 32003 if (!font.vertical) { 32004 textContentItem.width = textContentItem.totalWidth = 0; 32005 textContentItem.height = textContentItem.totalHeight = Math.hypot(trm[2], trm[3]); 32006 textContentItem.vertical = false;
vendor: 1,088 bytes, lines 32007-32030
32007 } else { 32008 textContentItem.width = textContentItem.totalWidth = Math.hypot(trm[0], trm[1]); 32009 textContentItem.height = textContentItem.totalHeight = 0; 32010 textContentItem.vertical = true; 32011 } 32012 const scaleLineX = Math.hypot(textState.textLineMatrix[0], textState.textLineMatrix[1]); 32013 const scaleCtmX = Math.hypot(textState.ctm[0], textState.ctm[1]); 32014 textContentItem.textAdvanceScale = scaleCtmX * scaleLineX; 32015 const { 32016 fontSize 32017 } = textState; 32018 textContentItem.trackingSpaceMin = fontSize * TRACKING_SPACE_FACTOR; 32019 textContentItem.notASpace = fontSize * NOT_A_SPACE_FACTOR; 32020 textContentItem.negativeSpaceMax = fontSize * NEGATIVE_SPACE_FACTOR; 32021 textContentItem.spaceInFlowMin = fontSize * SPACE_IN_FLOW_MIN_FACTOR; 32022 textContentItem.spaceInFlowMax = fontSize * SPACE_IN_FLOW_MAX_FACTOR; 32023 textContentItem.hasEOL = false; 32024 textContentItem.initialized = true; 32025 return textContentItem; 32026 } 32027 function updateAdvanceScale() { 32028 if (!textContentItem.initialized) { 32029 return; 32030 }
vendor: 26,601 bytes, lines 32031-32762
32031 const scaleLineX = Math.hypot(textState.textLineMatrix[0], textState.textLineMatrix[1]); 32032 const scaleCtmX = Math.hypot(textState.ctm[0], textState.ctm[1]); 32033 const scaleFactor = scaleCtmX * scaleLineX; 32034 if (scaleFactor === textContentItem.textAdvanceScale) { 32035 return; 32036 } 32037 if (!textContentItem.vertical) { 32038 textContentItem.totalWidth += textContentItem.width * textContentItem.textAdvanceScale; 32039 textContentItem.width = 0; 32040 } else { 32041 textContentItem.totalHeight += textContentItem.height * textContentItem.textAdvanceScale; 32042 textContentItem.height = 0; 32043 } 32044 textContentItem.textAdvanceScale = scaleFactor; 32045 } 32046 function runBidiTransform(textChunk) { 32047 let text = textChunk.str.join(""); 32048 if (!disableNormalization) { 32049 text = normalizeUnicode(text); 32050 } 32051 const bidiResult = bidi(text, -1, textChunk.vertical); 32052 return { 32053 str: bidiResult.str, 32054 dir: bidiResult.dir, 32055 width: Math.abs(textChunk.totalWidth), 32056 height: Math.abs(textChunk.totalHeight), 32057 transform: textChunk.transform, 32058 fontName: textChunk.fontName, 32059 hasEOL: textChunk.hasEOL 32060 }; 32061 } 32062 async function handleSetFont(fontName, fontRef) { 32063 const translated = await self.loadFont(fontName, fontRef, resources); 32064 if (translated.font.isType3Font) { 32065 try { 32066 await translated.loadType3Data(self, resources, task); 32067 } catch {} 32068 } 32069 textState.loadedName = translated.loadedName; 32070 textState.font = translated.font; 32071 textState.fontMatrix = translated.font.fontMatrix || FONT_IDENTITY_MATRIX; 32072 } 32073 function applyInverseRotation(x, y, matrix) { 32074 const scale = Math.hypot(matrix[0], matrix[1]); 32075 return [(matrix[0] * x + matrix[1] * y) / scale, (matrix[2] * x + matrix[3] * y) / scale]; 32076 } 32077 function compareWithLastPosition(glyphWidth) { 32078 const currentTransform = getCurrentTextTransform(); 32079 let posX = currentTransform[4]; 32080 let posY = currentTransform[5]; 32081 if (textState.font?.vertical) { 32082 if (posX < viewBox[0] || posX > viewBox[2] || posY + glyphWidth < viewBox[1] || posY > viewBox[3]) { 32083 return false; 32084 } 32085 } else if (posX + glyphWidth < viewBox[0] || posX > viewBox[2] || posY < viewBox[1] || posY > viewBox[3]) { 32086 return false; 32087 } 32088 if (!textState.font || !textContentItem.prevTransform) { 32089 return true; 32090 } 32091 let lastPosX = textContentItem.prevTransform[4]; 32092 let lastPosY = textContentItem.prevTransform[5]; 32093 if (lastPosX === posX && lastPosY === posY) { 32094 return true; 32095 } 32096 let rotate = -1; 32097 if (currentTransform[0] && currentTransform[1] === 0 && currentTransform[2] === 0) { 32098 rotate = currentTransform[0] > 0 ? 0 : 180; 32099 } else if (currentTransform[1] && currentTransform[0] === 0 && currentTransform[3] === 0) { 32100 rotate = currentTransform[1] > 0 ? 90 : 270; 32101 } 32102 switch (rotate) { 32103 case 0: 32104 break; 32105 case 90: 32106 [posX, posY] = [posY, posX]; 32107 [lastPosX, lastPosY] = [lastPosY, lastPosX]; 32108 break; 32109 case 180: 32110 [posX, posY, lastPosX, lastPosY] = [-posX, -posY, -lastPosX, -lastPosY]; 32111 break; 32112 case 270: 32113 [posX, posY] = [-posY, -posX]; 32114 [lastPosX, lastPosY] = [-lastPosY, -lastPosX]; 32115 break; 32116 default: 32117 [posX, posY] = applyInverseRotation(posX, posY, currentTransform); 32118 [lastPosX, lastPosY] = applyInverseRotation(lastPosX, lastPosY, textContentItem.prevTransform); 32119 } 32120 if (textState.font.vertical) { 32121 const advanceY = (lastPosY - posY) / textContentItem.textAdvanceScale; 32122 const advanceX = posX - lastPosX; 32123 const textOrientation = Math.sign(textContentItem.height); 32124 if (advanceY < textOrientation * textContentItem.negativeSpaceMax) { 32125 if (Math.abs(advanceX) > 0.5 * textContentItem.width) { 32126 appendEOL(); 32127 return true; 32128 } 32129 resetLastChars(); 32130 flushTextContentItem(); 32131 return true; 32132 } 32133 if (Math.abs(advanceX) > textContentItem.width) { 32134 appendEOL(); 32135 return true; 32136 } 32137 if (advanceY <= textOrientation * textContentItem.notASpace) { 32138 resetLastChars(); 32139 } 32140 if (advanceY <= textOrientation * textContentItem.trackingSpaceMin) { 32141 if (shouldAddWhitepsace()) { 32142 resetLastChars(); 32143 flushTextContentItem(); 32144 pushWhitespace({ 32145 height: Math.abs(advanceY) 32146 }); 32147 } else { 32148 textContentItem.height += advanceY; 32149 } 32150 } else if (!addFakeSpaces(advanceY, textContentItem.prevTransform, textOrientation)) { 32151 if (textContentItem.str.length === 0) { 32152 resetLastChars(); 32153 pushWhitespace({ 32154 height: Math.abs(advanceY) 32155 }); 32156 } else { 32157 textContentItem.height += advanceY; 32158 } 32159 } 32160 if (Math.abs(advanceX) > textContentItem.width * VERTICAL_SHIFT_RATIO) { 32161 flushTextContentItem(); 32162 } 32163 return true; 32164 } 32165 const advanceX = (posX - lastPosX) / textContentItem.textAdvanceScale; 32166 const advanceY = posY - lastPosY; 32167 const textOrientation = Math.sign(textContentItem.width); 32168 if (advanceX < textOrientation * textContentItem.negativeSpaceMax) { 32169 if (Math.abs(advanceY) > 0.5 * textContentItem.height) { 32170 appendEOL(); 32171 return true; 32172 } 32173 resetLastChars(); 32174 flushTextContentItem(); 32175 return true; 32176 } 32177 if (Math.abs(advanceY) > textContentItem.height) { 32178 appendEOL(); 32179 return true; 32180 } 32181 if (advanceX <= textOrientation * textContentItem.notASpace) { 32182 resetLastChars(); 32183 } 32184 if (advanceX <= textOrientation * textContentItem.trackingSpaceMin) { 32185 if (shouldAddWhitepsace()) { 32186 resetLastChars(); 32187 flushTextContentItem(); 32188 pushWhitespace({ 32189 width: Math.abs(advanceX) 32190 }); 32191 } else { 32192 textContentItem.width += advanceX; 32193 } 32194 } else if (!addFakeSpaces(advanceX, textContentItem.prevTransform, textOrientation)) { 32195 if (textContentItem.str.length === 0) { 32196 resetLastChars(); 32197 pushWhitespace({ 32198 width: Math.abs(advanceX) 32199 }); 32200 } else { 32201 textContentItem.width += advanceX; 32202 } 32203 } 32204 if (Math.abs(advanceY) > textContentItem.height * VERTICAL_SHIFT_RATIO) { 32205 flushTextContentItem(); 32206 } 32207 return true; 32208 } 32209 function buildTextContentItem({ 32210 chars, 32211 extraSpacing 32212 }) { 32213 const font = textState.font; 32214 if (!chars) { 32215 const charSpacing = textState.charSpacing + extraSpacing; 32216 if (charSpacing) { 32217 if (!font.vertical) { 32218 textState.translateTextMatrix(charSpacing * textState.textHScale, 0); 32219 } else { 32220 textState.translateTextMatrix(0, -charSpacing); 32221 } 32222 } 32223 if (keepWhiteSpace) { 32224 compareWithLastPosition(0); 32225 } 32226 return; 32227 } 32228 const glyphs = font.charsToGlyphs(chars); 32229 const scale = textState.fontMatrix[0] * textState.fontSize; 32230 for (let i = 0, ii = glyphs.length; i < ii; i++) { 32231 const glyph = glyphs[i]; 32232 const { 32233 category 32234 } = glyph; 32235 if (category.isInvisibleFormatMark) { 32236 continue; 32237 } 32238 let charSpacing = textState.charSpacing + (i + 1 === ii ? extraSpacing : 0); 32239 let glyphWidth = glyph.width; 32240 if (font.vertical) { 32241 glyphWidth = glyph.vmetric ? glyph.vmetric[0] : -glyphWidth; 32242 } 32243 let scaledDim = glyphWidth * scale; 32244 if (!keepWhiteSpace && category.isWhitespace) { 32245 if (!font.vertical) { 32246 charSpacing += scaledDim + textState.wordSpacing; 32247 textState.translateTextMatrix(charSpacing * textState.textHScale, 0); 32248 } else { 32249 charSpacing += -scaledDim + textState.wordSpacing; 32250 textState.translateTextMatrix(0, -charSpacing); 32251 } 32252 saveLastChar(" "); 32253 continue; 32254 } 32255 if (!category.isZeroWidthDiacritic && !compareWithLastPosition(scaledDim)) { 32256 if (!font.vertical) { 32257 textState.translateTextMatrix(scaledDim * textState.textHScale, 0); 32258 } else { 32259 textState.translateTextMatrix(0, scaledDim); 32260 } 32261 continue; 32262 } 32263 const textChunk = ensureTextContentItem(); 32264 if (category.isZeroWidthDiacritic) { 32265 scaledDim = 0; 32266 } 32267 if (!font.vertical) { 32268 scaledDim *= textState.textHScale; 32269 textState.translateTextMatrix(scaledDim, 0); 32270 textChunk.width += scaledDim; 32271 } else { 32272 textState.translateTextMatrix(0, scaledDim); 32273 scaledDim = Math.abs(scaledDim); 32274 textChunk.height += scaledDim; 32275 } 32276 if (scaledDim) { 32277 textChunk.prevTransform = getCurrentTextTransform(); 32278 } 32279 const glyphUnicode = glyph.unicode; 32280 if (saveLastChar(glyphUnicode)) { 32281 textChunk.str.push(" "); 32282 } 32283 textChunk.str.push(glyphUnicode); 32284 if (charSpacing) { 32285 if (!font.vertical) { 32286 textState.translateTextMatrix(charSpacing * textState.textHScale, 0); 32287 } else { 32288 textState.translateTextMatrix(0, -charSpacing); 32289 } 32290 } 32291 } 32292 } 32293 function appendEOL() { 32294 resetLastChars(); 32295 if (textContentItem.initialized) { 32296 textContentItem.hasEOL = true; 32297 flushTextContentItem(); 32298 } else { 32299 textContent.items.push({ 32300 str: "", 32301 dir: "ltr", 32302 width: 0, 32303 height: 0, 32304 transform: getCurrentTextTransform(), 32305 fontName: textState.loadedName, 32306 hasEOL: true 32307 }); 32308 } 32309 } 32310 function addFakeSpaces(width, transf, textOrientation) { 32311 if (textOrientation * textContentItem.spaceInFlowMin <= width && width <= textOrientation * textContentItem.spaceInFlowMax) { 32312 if (textContentItem.initialized) { 32313 resetLastChars(); 32314 textContentItem.str.push(" "); 32315 } 32316 return false; 32317 } 32318 const fontName = textContentItem.fontName; 32319 let height = 0; 32320 if (textContentItem.vertical) { 32321 height = width; 32322 width = 0; 32323 } 32324 flushTextContentItem(); 32325 resetLastChars(); 32326 pushWhitespace({ 32327 width: Math.abs(width), 32328 height: Math.abs(height), 32329 transform: transf || getCurrentTextTransform(), 32330 fontName 32331 }); 32332 return true; 32333 } 32334 function flushTextContentItem() { 32335 if (!textContentItem.initialized || !textContentItem.str) { 32336 return; 32337 } 32338 if (!textContentItem.vertical) { 32339 textContentItem.totalWidth += textContentItem.width * textContentItem.textAdvanceScale; 32340 } else { 32341 textContentItem.totalHeight += textContentItem.height * textContentItem.textAdvanceScale; 32342 } 32343 textContent.items.push(runBidiTransform(textContentItem)); 32344 textContentItem.initialized = false; 32345 textContentItem.str.length = 0; 32346 } 32347 function enqueueChunk(batch = false) { 32348 const length = textContent.items.length; 32349 if (length === 0) { 32350 return; 32351 } 32352 if (batch && length < TEXT_CHUNK_BATCH_SIZE) { 32353 return; 32354 } 32355 sink.enqueue(textContent, length); 32356 textContent.items = []; 32357 textContent.styles = Object.create(null); 32358 } 32359 const timeSlotManager = new TimeSlotManager(); 32360 return new Promise(function promiseBody(resolve, reject) { 32361 const next = function (promise) { 32362 enqueueChunk(true); 32363 Promise.all([promise, sink.ready]).then(function () { 32364 try { 32365 promiseBody(resolve, reject); 32366 } catch (ex) { 32367 reject(ex); 32368 } 32369 }, reject); 32370 }; 32371 task.ensureNotTerminated(); 32372 timeSlotManager.reset(); 32373 const operation = {}; 32374 let stop, 32375 name, 32376 isValidName, 32377 args = []; 32378 while (!(stop = timeSlotManager.check())) { 32379 args.length = 0; 32380 operation.args = args; 32381 if (!preprocessor.read(operation)) { 32382 break; 32383 } 32384 const previousState = textState; 32385 textState = stateManager.state; 32386 const fn = operation.fn; 32387 args = operation.args; 32388 switch (fn | 0) { 32389 case OPS.setFont: 32390 const fontNameArg = args[0].name, 32391 fontSizeArg = args[1]; 32392 if (textState.font && fontNameArg === textState.fontName && fontSizeArg === textState.fontSize) { 32393 break; 32394 } 32395 flushTextContentItem(); 32396 textState.fontName = fontNameArg; 32397 textState.fontSize = fontSizeArg; 32398 next(handleSetFont(fontNameArg, null)); 32399 return; 32400 case OPS.setTextRise: 32401 textState.textRise = args[0]; 32402 break; 32403 case OPS.setHScale: 32404 textState.textHScale = args[0] / 100; 32405 break; 32406 case OPS.setLeading: 32407 textState.leading = args[0]; 32408 break; 32409 case OPS.moveText: 32410 textState.translateTextLineMatrix(args[0], args[1]); 32411 textState.textMatrix = textState.textLineMatrix.slice(); 32412 break; 32413 case OPS.setLeadingMoveText: 32414 textState.leading = -args[1]; 32415 textState.translateTextLineMatrix(args[0], args[1]); 32416 textState.textMatrix = textState.textLineMatrix.slice(); 32417 break; 32418 case OPS.nextLine: 32419 textState.carriageReturn(); 32420 break; 32421 case OPS.setTextMatrix: 32422 textState.setTextMatrix(args[0], args[1], args[2], args[3], args[4], args[5]); 32423 textState.setTextLineMatrix(args[0], args[1], args[2], args[3], args[4], args[5]); 32424 updateAdvanceScale(); 32425 break; 32426 case OPS.setCharSpacing: 32427 textState.charSpacing = args[0]; 32428 break; 32429 case OPS.setWordSpacing: 32430 textState.wordSpacing = args[0]; 32431 break; 32432 case OPS.beginText: 32433 textState.textMatrix = IDENTITY_MATRIX.slice(); 32434 textState.textLineMatrix = IDENTITY_MATRIX.slice(); 32435 break; 32436 case OPS.showSpacedText: 32437 if (!stateManager.state.font) { 32438 self.ensureStateFont(stateManager.state); 32439 continue; 32440 } 32441 const spaceFactor = (textState.font.vertical ? 1 : -1) * textState.fontSize / 1000; 32442 const elements = args[0]; 32443 for (let i = 0, ii = elements.length; i < ii; i++) { 32444 const item = elements[i]; 32445 if (typeof item === "string") { 32446 showSpacedTextBuffer.push(item); 32447 } else if (typeof item === "number" && item !== 0) { 32448 const str = showSpacedTextBuffer.join(""); 32449 showSpacedTextBuffer.length = 0; 32450 buildTextContentItem({ 32451 chars: str, 32452 extraSpacing: item * spaceFactor 32453 }); 32454 } 32455 } 32456 if (showSpacedTextBuffer.length > 0) { 32457 const str = showSpacedTextBuffer.join(""); 32458 showSpacedTextBuffer.length = 0; 32459 buildTextContentItem({ 32460 chars: str, 32461 extraSpacing: 0 32462 }); 32463 } 32464 break; 32465 case OPS.showText: 32466 if (!stateManager.state.font) { 32467 self.ensureStateFont(stateManager.state); 32468 continue; 32469 } 32470 buildTextContentItem({ 32471 chars: args[0], 32472 extraSpacing: 0 32473 }); 32474 break; 32475 case OPS.nextLineShowText: 32476 if (!stateManager.state.font) { 32477 self.ensureStateFont(stateManager.state); 32478 continue; 32479 } 32480 textState.carriageReturn(); 32481 buildTextContentItem({ 32482 chars: args[0], 32483 extraSpacing: 0 32484 }); 32485 break; 32486 case OPS.nextLineSetSpacingShowText: 32487 if (!stateManager.state.font) { 32488 self.ensureStateFont(stateManager.state); 32489 continue; 32490 } 32491 textState.wordSpacing = args[0]; 32492 textState.charSpacing = args[1]; 32493 textState.carriageReturn(); 32494 buildTextContentItem({ 32495 chars: args[2], 32496 extraSpacing: 0 32497 }); 32498 break; 32499 case OPS.paintXObject: 32500 flushTextContentItem(); 32501 xobjs ??= resources.get("XObject") || Dict.empty; 32502 isValidName = args[0] instanceof Name; 32503 name = args[0].name; 32504 if (isValidName && emptyXObjectCache.getByName(name)) { 32505 break; 32506 } 32507 next(new Promise(function (resolveXObject, rejectXObject) { 32508 if (!isValidName) { 32509 throw new FormatError("XObject must be referred to by name."); 32510 } 32511 let xobj = xobjs.getRaw(name); 32512 if (xobj instanceof Ref) { 32513 if (emptyXObjectCache.getByRef(xobj)) { 32514 resolveXObject(); 32515 return; 32516 } 32517 const globalImage = self.globalImageCache.getData(xobj, self.pageIndex); 32518 if (globalImage) { 32519 resolveXObject(); 32520 return; 32521 } 32522 xobj = xref.fetch(xobj); 32523 } 32524 if (!(xobj instanceof BaseStream)) { 32525 throw new FormatError("XObject should be a stream"); 32526 } 32527 const type = xobj.dict.get("Subtype"); 32528 if (!(type instanceof Name)) { 32529 throw new FormatError("XObject should have a Name subtype"); 32530 } 32531 if (type.name !== "Form") { 32532 emptyXObjectCache.set(name, xobj.dict.objId, true); 32533 resolveXObject(); 32534 return; 32535 } 32536 const currentState = stateManager.state.clone(); 32537 const xObjStateManager = new StateManager(currentState); 32538 const matrix = lookupMatrix(xobj.dict.getArray("Matrix"), null); 32539 if (matrix) { 32540 xObjStateManager.transform(matrix); 32541 } 32542 enqueueChunk(); 32543 const sinkWrapper = { 32544 enqueueInvoked: false, 32545 enqueue(chunk, size) { 32546 this.enqueueInvoked = true; 32547 sink.enqueue(chunk, size); 32548 }, 32549 get desiredSize() { 32550 return sink.desiredSize; 32551 }, 32552 get ready() { 32553 return sink.ready; 32554 } 32555 }; 32556 self.getTextContent({ 32557 stream: xobj, 32558 task, 32559 resources: xobj.dict.get("Resources") || resources, 32560 stateManager: xObjStateManager, 32561 includeMarkedContent, 32562 sink: sinkWrapper, 32563 seenStyles, 32564 viewBox, 32565 lang, 32566 markedContentData, 32567 disableNormalization, 32568 keepWhiteSpace 32569 }).then(function () { 32570 if (!sinkWrapper.enqueueInvoked) { 32571 emptyXObjectCache.set(name, xobj.dict.objId, true); 32572 } 32573 resolveXObject(); 32574 }, rejectXObject); 32575 }).catch(function (reason) { 32576 if (reason instanceof AbortException) { 32577 return; 32578 } 32579 if (self.options.ignoreErrors) { 32580 warn(`getTextContent - ignoring XObject: "${reason}".`); 32581 return; 32582 } 32583 throw reason; 32584 })); 32585 return; 32586 case OPS.setGState: 32587 isValidName = args[0] instanceof Name; 32588 name = args[0].name; 32589 if (isValidName && emptyGStateCache.getByName(name)) { 32590 break; 32591 } 32592 next(new Promise(function (resolveGState, rejectGState) { 32593 if (!isValidName) { 32594 throw new FormatError("GState must be referred to by name."); 32595 } 32596 const extGState = resources.get("ExtGState"); 32597 if (!(extGState instanceof Dict)) { 32598 throw new FormatError("ExtGState should be a dictionary."); 32599 } 32600 const gState = extGState.get(name); 32601 if (!(gState instanceof Dict)) { 32602 throw new FormatError("GState should be a dictionary."); 32603 } 32604 const gStateFont = gState.get("Font"); 32605 if (!gStateFont) { 32606 emptyGStateCache.set(name, gState.objId, true); 32607 resolveGState(); 32608 return; 32609 } 32610 flushTextContentItem(); 32611 textState.fontName = null; 32612 textState.fontSize = gStateFont[1]; 32613 handleSetFont(null, gStateFont[0]).then(resolveGState, rejectGState); 32614 }).catch(function (reason) { 32615 if (reason instanceof AbortException) { 32616 return; 32617 } 32618 if (self.options.ignoreErrors) { 32619 warn(`getTextContent - ignoring ExtGState: "${reason}".`); 32620 return; 32621 } 32622 throw reason; 32623 })); 32624 return; 32625 case OPS.beginMarkedContent: 32626 flushTextContentItem(); 32627 if (includeMarkedContent) { 32628 markedContentData.level++; 32629 textContent.items.push({ 32630 type: "beginMarkedContent", 32631 tag: args[0] instanceof Name ? args[0].name : null 32632 }); 32633 } 32634 break; 32635 case OPS.beginMarkedContentProps: 32636 flushTextContentItem(); 32637 if (includeMarkedContent) { 32638 markedContentData.level++; 32639 let mcid = null; 32640 if (args[1] instanceof Dict) { 32641 mcid = args[1].get("MCID"); 32642 } 32643 textContent.items.push({ 32644 type: "beginMarkedContentProps", 32645 id: Number.isInteger(mcid) ? `${self.idFactory.getPageObjId()}_mc${mcid}` : null, 32646 tag: args[0] instanceof Name ? args[0].name : null 32647 }); 32648 } 32649 break; 32650 case OPS.endMarkedContent: 32651 flushTextContentItem(); 32652 if (includeMarkedContent) { 32653 if (markedContentData.level === 0) { 32654 break; 32655 } 32656 markedContentData.level--; 32657 textContent.items.push({ 32658 type: "endMarkedContent" 32659 }); 32660 } 32661 break; 32662 case OPS.restore: 32663 if (previousState && (previousState.font !== textState.font || previousState.fontSize !== textState.fontSize || previousState.fontName !== textState.fontName)) { 32664 flushTextContentItem(); 32665 } 32666 break; 32667 } 32668 if (textContent.items.length >= sink.desiredSize) { 32669 stop = true; 32670 break; 32671 } 32672 } 32673 if (stop) { 32674 next(deferred); 32675 return; 32676 } 32677 flushTextContentItem(); 32678 enqueueChunk(); 32679 resolve(); 32680 }).catch(reason => { 32681 if (reason instanceof AbortException) { 32682 return; 32683 } 32684 if (this.options.ignoreErrors) { 32685 warn(`getTextContent - ignoring errors during "${task.name}" ` + `task: "${reason}".`); 32686 flushTextContentItem(); 32687 enqueueChunk(); 32688 return; 32689 } 32690 throw reason; 32691 }); 32692 } 32693 async extractDataStructures(dict, properties) { 32694 const xref = this.xref; 32695 let cidToGidBytes; 32696 const toUnicodePromise = this.readToUnicode(properties.toUnicode); 32697 if (properties.composite) { 32698 const cidSystemInfo = dict.get("CIDSystemInfo"); 32699 if (cidSystemInfo instanceof Dict) { 32700 properties.cidSystemInfo = { 32701 registry: stringToPDFString(cidSystemInfo.get("Registry")), 32702 ordering: stringToPDFString(cidSystemInfo.get("Ordering")), 32703 supplement: cidSystemInfo.get("Supplement") 32704 }; 32705 } 32706 try { 32707 const cidToGidMap = dict.get("CIDToGIDMap"); 32708 if (cidToGidMap instanceof BaseStream) { 32709 cidToGidBytes = cidToGidMap.getBytes(); 32710 } 32711 } catch (ex) { 32712 if (!this.options.ignoreErrors) { 32713 throw ex; 32714 } 32715 warn(`extractDataStructures - ignoring CIDToGIDMap data: "${ex}".`); 32716 } 32717 } 32718 const differences = []; 32719 let baseEncodingName = null; 32720 let encoding; 32721 if (dict.has("Encoding")) { 32722 encoding = dict.get("Encoding"); 32723 if (encoding instanceof Dict) { 32724 baseEncodingName = encoding.get("BaseEncoding"); 32725 baseEncodingName = baseEncodingName instanceof Name ? baseEncodingName.name : null; 32726 if (encoding.has("Differences")) { 32727 const diffEncoding = encoding.get("Differences"); 32728 let index = 0; 32729 for (const entry of diffEncoding) { 32730 const data = xref.fetchIfRef(entry); 32731 if (typeof data === "number") { 32732 index = data; 32733 } else if (data instanceof Name) { 32734 differences[index++] = data.name; 32735 } else { 32736 throw new FormatError(`Invalid entry in 'Differences' array: ${data}`); 32737 } 32738 } 32739 } 32740 } else if (encoding instanceof Name) { 32741 baseEncodingName = encoding.name; 32742 } else { 32743 const msg = "Encoding is not a Name nor a Dict"; 32744 if (!this.options.ignoreErrors) { 32745 throw new FormatError(msg); 32746 } 32747 warn(msg); 32748 } 32749 if (baseEncodingName !== "MacRomanEncoding" && baseEncodingName !== "MacExpertEncoding" && baseEncodingName !== "WinAnsiEncoding") { 32750 baseEncodingName = null; 32751 } 32752 } 32753 const nonEmbeddedFont = !properties.file || properties.isInternalFont, 32754 isSymbolsFontName = getSymbolsFonts()[properties.name]; 32755 if (baseEncodingName && nonEmbeddedFont && isSymbolsFontName) { 32756 baseEncodingName = null; 32757 } 32758 if (baseEncodingName) { 32759 properties.defaultEncoding = getEncoding(baseEncodingName); 32760 } else { 32761 const isSymbolicFont = !!(properties.flags & FontFlags.Symbolic); 32762 const isNonsymbolicFont = !!(properties.flags & FontFlags.Nonsymbolic);
vendor: 18,001 bytes, lines 32762-33284
32762 32763 encoding = StandardEncoding; 32764 if (properties.type === "TrueType" && !isNonsymbolicFont) { 32765 encoding = WinAnsiEncoding; 32766 } 32767 if (isSymbolicFont || isSymbolsFontName) { 32768 encoding = MacRomanEncoding; 32769 if (nonEmbeddedFont) { 32770 if (/Symbol/i.test(properties.name)) { 32771 encoding = SymbolSetEncoding; 32772 } else if (/Dingbats/i.test(properties.name)) { 32773 encoding = ZapfDingbatsEncoding; 32774 } else if (/Wingdings/i.test(properties.name)) { 32775 encoding = WinAnsiEncoding; 32776 } 32777 } 32778 } 32779 properties.defaultEncoding = encoding; 32780 } 32781 properties.differences = differences; 32782 properties.baseEncodingName = baseEncodingName; 32783 properties.hasEncoding = !!baseEncodingName || differences.length > 0; 32784 properties.dict = dict; 32785 properties.toUnicode = await toUnicodePromise; 32786 const builtToUnicode = await this.buildToUnicode(properties); 32787 properties.toUnicode = builtToUnicode; 32788 if (cidToGidBytes) { 32789 properties.cidToGidMap = this.readCidToGidMap(cidToGidBytes, builtToUnicode); 32790 } 32791 return properties; 32792 } 32793 _simpleFontToUnicode(properties, forceGlyphs = false) { 32794 assert(!properties.composite, "Must be a simple font."); 32795 const toUnicode = []; 32796 const encoding = properties.defaultEncoding.slice(); 32797 const baseEncodingName = properties.baseEncodingName; 32798 const differences = properties.differences; 32799 for (const charcode in differences) { 32800 const glyphName = differences[charcode]; 32801 if (glyphName === ".notdef") { 32802 continue; 32803 } 32804 encoding[charcode] = glyphName; 32805 } 32806 const glyphsUnicodeMap = getGlyphsUnicode(); 32807 for (const charcode in encoding) { 32808 let glyphName = encoding[charcode]; 32809 if (glyphName === "") { 32810 continue; 32811 } 32812 let unicode = glyphsUnicodeMap[glyphName]; 32813 if (unicode !== undefined) { 32814 toUnicode[charcode] = String.fromCharCode(unicode); 32815 continue; 32816 } 32817 let code = 0; 32818 switch (glyphName[0]) { 32819 case "G": 32820 if (glyphName.length === 3) { 32821 code = parseInt(glyphName.substring(1), 16); 32822 } 32823 break; 32824 case "g": 32825 if (glyphName.length === 5) { 32826 code = parseInt(glyphName.substring(1), 16); 32827 } 32828 break; 32829 case "C": 32830 case "c": 32831 if (glyphName.length >= 3 && glyphName.length <= 4) { 32832 const codeStr = glyphName.substring(1); 32833 if (forceGlyphs) { 32834 code = parseInt(codeStr, 16); 32835 break; 32836 } 32837 code = +codeStr; 32838 if (Number.isNaN(code) && Number.isInteger(parseInt(codeStr, 16))) { 32839 return this._simpleFontToUnicode(properties, true); 32840 } 32841 } 32842 break; 32843 case "u": 32844 unicode = getUnicodeForGlyph(glyphName, glyphsUnicodeMap); 32845 if (unicode !== -1) { 32846 code = unicode; 32847 } 32848 break; 32849 default: 32850 switch (glyphName) { 32851 case "f_h": 32852 case "f_t": 32853 case "T_h": 32854 toUnicode[charcode] = glyphName.replaceAll("_", ""); 32855 continue; 32856 } 32857 break; 32858 } 32859 if (code > 0 && code <= 0x10ffff && Number.isInteger(code)) { 32860 if (baseEncodingName && code === +charcode) { 32861 const baseEncoding = getEncoding(baseEncodingName); 32862 if (baseEncoding && (glyphName = baseEncoding[charcode])) { 32863 toUnicode[charcode] = String.fromCharCode(glyphsUnicodeMap[glyphName]); 32864 continue; 32865 } 32866 } 32867 toUnicode[charcode] = String.fromCodePoint(code); 32868 } 32869 } 32870 return toUnicode; 32871 } 32872 async buildToUnicode(properties) { 32873 properties.hasIncludedToUnicodeMap = properties.toUnicode?.length > 0; 32874 if (properties.hasIncludedToUnicodeMap) { 32875 if (!properties.composite && properties.hasEncoding) { 32876 properties.fallbackToUnicode = this._simpleFontToUnicode(properties); 32877 } 32878 return properties.toUnicode; 32879 } 32880 if (!properties.composite) { 32881 return new ToUnicodeMap(this._simpleFontToUnicode(properties)); 32882 } 32883 if (properties.composite && (properties.cMap.builtInCMap && !(properties.cMap instanceof IdentityCMap) || properties.cidSystemInfo?.registry === "Adobe" && (properties.cidSystemInfo.ordering === "GB1" || properties.cidSystemInfo.ordering === "CNS1" || properties.cidSystemInfo.ordering === "Japan1" || properties.cidSystemInfo.ordering === "Korea1"))) { 32884 const { 32885 registry, 32886 ordering 32887 } = properties.cidSystemInfo; 32888 const ucs2CMapName = Name.get(`${registry}-${ordering}-UCS2`); 32889 const ucs2CMap = await CMapFactory.create({ 32890 encoding: ucs2CMapName, 32891 fetchBuiltInCMap: this._fetchBuiltInCMapBound, 32892 useCMap: null 32893 }); 32894 const toUnicode = [], 32895 buf = []; 32896 properties.cMap.forEach(function (charcode, cid) { 32897 if (cid > 0xffff) { 32898 throw new FormatError("Max size of CID is 65,535"); 32899 } 32900 const ucs2 = ucs2CMap.lookup(cid); 32901 if (ucs2) { 32902 buf.length = 0; 32903 for (let i = 0, ii = ucs2.length; i < ii; i += 2) { 32904 buf.push((ucs2.charCodeAt(i) << 8) + ucs2.charCodeAt(i + 1)); 32905 } 32906 toUnicode[charcode] = String.fromCharCode(...buf); 32907 } 32908 }); 32909 return new ToUnicodeMap(toUnicode); 32910 } 32911 return new IdentityToUnicodeMap(properties.firstChar, properties.lastChar); 32912 } 32913 async readToUnicode(cmapObj) { 32914 if (!cmapObj) { 32915 return null; 32916 } 32917 if (cmapObj instanceof Name) { 32918 const cmap = await CMapFactory.create({ 32919 encoding: cmapObj, 32920 fetchBuiltInCMap: this._fetchBuiltInCMapBound, 32921 useCMap: null 32922 }); 32923 if (cmap instanceof IdentityCMap) { 32924 return new IdentityToUnicodeMap(0, 0xffff); 32925 } 32926 return new ToUnicodeMap(cmap.getMap()); 32927 } 32928 if (cmapObj instanceof BaseStream) { 32929 try { 32930 const cmap = await CMapFactory.create({ 32931 encoding: cmapObj, 32932 fetchBuiltInCMap: this._fetchBuiltInCMapBound, 32933 useCMap: null 32934 }); 32935 if (cmap instanceof IdentityCMap) { 32936 return new IdentityToUnicodeMap(0, 0xffff); 32937 } 32938 const map = new Array(cmap.length); 32939 cmap.forEach(function (charCode, token) { 32940 if (typeof token === "number") { 32941 map[charCode] = String.fromCodePoint(token); 32942 return; 32943 } 32944 if (token.length % 2 !== 0) { 32945 token = "\u0000" + token; 32946 } 32947 const str = []; 32948 for (let k = 0; k < token.length; k += 2) { 32949 const w1 = token.charCodeAt(k) << 8 | token.charCodeAt(k + 1); 32950 if ((w1 & 0xf800) !== 0xd800) { 32951 str.push(w1); 32952 continue; 32953 } 32954 k += 2; 32955 const w2 = token.charCodeAt(k) << 8 | token.charCodeAt(k + 1); 32956 str.push(((w1 & 0x3ff) << 10) + (w2 & 0x3ff) + 0x10000); 32957 } 32958 map[charCode] = String.fromCodePoint(...str); 32959 }); 32960 return new ToUnicodeMap(map); 32961 } catch (reason) { 32962 if (reason instanceof AbortException) { 32963 return null; 32964 } 32965 if (this.options.ignoreErrors) { 32966 warn(`readToUnicode - ignoring ToUnicode data: "${reason}".`); 32967 return null; 32968 } 32969 throw reason; 32970 } 32971 } 32972 return null; 32973 } 32974 readCidToGidMap(glyphsData, toUnicode) { 32975 const result = []; 32976 for (let j = 0, jj = glyphsData.length; j < jj; j++) { 32977 const glyphID = glyphsData[j++] << 8 | glyphsData[j]; 32978 const code = j >> 1; 32979 if (glyphID === 0 && !toUnicode.has(code)) { 32980 continue; 32981 } 32982 result[code] = glyphID; 32983 } 32984 return result; 32985 } 32986 extractWidths(dict, descriptor, properties) { 32987 const xref = this.xref; 32988 let glyphsWidths = []; 32989 let defaultWidth = 0; 32990 const glyphsVMetrics = []; 32991 let defaultVMetrics; 32992 if (properties.composite) { 32993 const dw = dict.get("DW"); 32994 defaultWidth = typeof dw === "number" ? Math.ceil(dw) : 1000; 32995 const widths = dict.get("W"); 32996 if (Array.isArray(widths)) { 32997 for (let i = 0, ii = widths.length; i < ii; i++) { 32998 let start = xref.fetchIfRef(widths[i++]); 32999 if (!Number.isInteger(start)) { 33000 break; 33001 } 33002 const code = xref.fetchIfRef(widths[i]); 33003 if (Array.isArray(code)) { 33004 for (const c of code) { 33005 const width = xref.fetchIfRef(c); 33006 if (typeof width === "number") { 33007 glyphsWidths[start] = width; 33008 } 33009 start++; 33010 } 33011 } else if (Number.isInteger(code)) { 33012 const width = xref.fetchIfRef(widths[++i]); 33013 if (typeof width !== "number") { 33014 continue; 33015 } 33016 for (let j = start; j <= code; j++) { 33017 glyphsWidths[j] = width; 33018 } 33019 } else { 33020 break; 33021 } 33022 } 33023 } 33024 if (properties.vertical) { 33025 const dw2 = dict.getArray("DW2"); 33026 let vmetrics = isNumberArray(dw2, 2) ? dw2 : [880, -1000]; 33027 defaultVMetrics = [vmetrics[1], defaultWidth * 0.5, vmetrics[0]]; 33028 vmetrics = dict.get("W2"); 33029 if (Array.isArray(vmetrics)) { 33030 for (let i = 0, ii = vmetrics.length; i < ii; i++) { 33031 let start = xref.fetchIfRef(vmetrics[i++]); 33032 if (!Number.isInteger(start)) { 33033 break; 33034 } 33035 const code = xref.fetchIfRef(vmetrics[i]); 33036 if (Array.isArray(code)) { 33037 for (let j = 0, jj = code.length; j < jj; j++) { 33038 const vmetric = [xref.fetchIfRef(code[j++]), xref.fetchIfRef(code[j++]), xref.fetchIfRef(code[j])]; 33039 if (isNumberArray(vmetric, null)) { 33040 glyphsVMetrics[start] = vmetric; 33041 } 33042 start++; 33043 } 33044 } else if (Number.isInteger(code)) { 33045 const vmetric = [xref.fetchIfRef(vmetrics[++i]), xref.fetchIfRef(vmetrics[++i]), xref.fetchIfRef(vmetrics[++i])]; 33046 if (!isNumberArray(vmetric, null)) { 33047 continue; 33048 } 33049 for (let j = start; j <= code; j++) { 33050 glyphsVMetrics[j] = vmetric; 33051 } 33052 } else { 33053 break; 33054 } 33055 } 33056 } 33057 } 33058 } else { 33059 const widths = dict.get("Widths"); 33060 if (Array.isArray(widths)) { 33061 let j = properties.firstChar; 33062 for (const w of widths) { 33063 const width = xref.fetchIfRef(w); 33064 if (typeof width === "number") { 33065 glyphsWidths[j] = width; 33066 } 33067 j++; 33068 } 33069 const missingWidth = descriptor.get("MissingWidth"); 33070 defaultWidth = typeof missingWidth === "number" ? missingWidth : 0; 33071 } else { 33072 const baseFontName = dict.get("BaseFont"); 33073 if (baseFontName instanceof Name) { 33074 const metrics = this.getBaseFontMetrics(baseFontName.name); 33075 glyphsWidths = this.buildCharCodeToWidth(metrics.widths, properties); 33076 defaultWidth = metrics.defaultWidth; 33077 } 33078 } 33079 } 33080 let isMonospace = true; 33081 let firstWidth = defaultWidth; 33082 for (const glyph in glyphsWidths) { 33083 const glyphWidth = glyphsWidths[glyph]; 33084 if (!glyphWidth) { 33085 continue; 33086 } 33087 if (!firstWidth) { 33088 firstWidth = glyphWidth; 33089 continue; 33090 } 33091 if (firstWidth !== glyphWidth) { 33092 isMonospace = false; 33093 break; 33094 } 33095 } 33096 if (isMonospace) { 33097 properties.flags |= FontFlags.FixedPitch; 33098 } else { 33099 properties.flags &= ~FontFlags.FixedPitch; 33100 } 33101 properties.defaultWidth = defaultWidth; 33102 properties.widths = glyphsWidths; 33103 properties.defaultVMetrics = defaultVMetrics; 33104 properties.vmetrics = glyphsVMetrics; 33105 } 33106 isSerifFont(baseFontName) { 33107 const fontNameWoStyle = baseFontName.split("-", 1)[0]; 33108 return fontNameWoStyle in getSerifFonts() || /serif/gi.test(fontNameWoStyle); 33109 } 33110 getBaseFontMetrics(name) { 33111 let defaultWidth = 0; 33112 let widths = Object.create(null); 33113 let monospace = false; 33114 const stdFontMap = getStdFontMap(); 33115 let lookupName = stdFontMap[name] || name; 33116 const Metrics = getMetrics(); 33117 if (!(lookupName in Metrics)) { 33118 lookupName = this.isSerifFont(name) ? "Times-Roman" : "Helvetica"; 33119 } 33120 const glyphWidths = Metrics[lookupName]; 33121 if (typeof glyphWidths === "number") { 33122 defaultWidth = glyphWidths; 33123 monospace = true; 33124 } else { 33125 widths = glyphWidths(); 33126 } 33127 return { 33128 defaultWidth, 33129 monospace, 33130 widths 33131 }; 33132 } 33133 buildCharCodeToWidth(widthsByGlyphName, properties) { 33134 const widths = Object.create(null); 33135 const differences = properties.differences; 33136 const encoding = properties.defaultEncoding; 33137 for (let charCode = 0; charCode < 256; charCode++) { 33138 if (charCode in differences && widthsByGlyphName[differences[charCode]]) { 33139 widths[charCode] = widthsByGlyphName[differences[charCode]]; 33140 continue; 33141 } 33142 if (charCode in encoding && widthsByGlyphName[encoding[charCode]]) { 33143 widths[charCode] = widthsByGlyphName[encoding[charCode]]; 33144 continue; 33145 } 33146 } 33147 return widths; 33148 } 33149 preEvaluateFont(dict) { 33150 const baseDict = dict; 33151 let type = dict.get("Subtype"); 33152 if (!(type instanceof Name)) { 33153 throw new FormatError("invalid font Subtype"); 33154 } 33155 let composite = false; 33156 let hash; 33157 if (type.name === "Type0") { 33158 const df = dict.get("DescendantFonts"); 33159 if (!df) { 33160 throw new FormatError("Descendant fonts are not specified"); 33161 } 33162 dict = Array.isArray(df) ? this.xref.fetchIfRef(df[0]) : df; 33163 if (!(dict instanceof Dict)) { 33164 throw new FormatError("Descendant font is not a dictionary."); 33165 } 33166 type = dict.get("Subtype"); 33167 if (!(type instanceof Name)) { 33168 throw new FormatError("invalid font Subtype"); 33169 } 33170 composite = true; 33171 } 33172 let firstChar = dict.get("FirstChar"); 33173 if (!Number.isInteger(firstChar)) { 33174 firstChar = 0; 33175 } 33176 let lastChar = dict.get("LastChar"); 33177 if (!Number.isInteger(lastChar)) { 33178 lastChar = composite ? 0xffff : 0xff; 33179 } 33180 const descriptor = dict.get("FontDescriptor"); 33181 const toUnicode = dict.get("ToUnicode") || baseDict.get("ToUnicode"); 33182 if (descriptor) { 33183 hash = new MurmurHash3_64(); 33184 const encoding = baseDict.getRaw("Encoding"); 33185 if (encoding instanceof Name) { 33186 hash.update(encoding.name); 33187 } else if (encoding instanceof Ref) { 33188 hash.update(encoding.toString()); 33189 } else if (encoding instanceof Dict) { 33190 for (const entry of encoding.getRawValues()) { 33191 if (entry instanceof Name) { 33192 hash.update(entry.name); 33193 } else if (entry instanceof Ref) { 33194 hash.update(entry.toString()); 33195 } else if (Array.isArray(entry)) { 33196 const diffLength = entry.length, 33197 diffBuf = new Array(diffLength); 33198 for (let j = 0; j < diffLength; j++) { 33199 const diffEntry = entry[j]; 33200 if (diffEntry instanceof Name) { 33201 diffBuf[j] = diffEntry.name; 33202 } else if (typeof diffEntry === "number" || diffEntry instanceof Ref) { 33203 diffBuf[j] = diffEntry.toString(); 33204 } 33205 } 33206 hash.update(diffBuf.join()); 33207 } 33208 } 33209 } 33210 hash.update(`${firstChar}-${lastChar}`); 33211 if (toUnicode instanceof BaseStream) { 33212 const stream = toUnicode.str || toUnicode; 33213 const uint8array = stream.buffer ? new Uint8Array(stream.buffer.buffer, 0, stream.bufferLength) : new Uint8Array(stream.bytes.buffer, stream.start, stream.end - stream.start); 33214 hash.update(uint8array); 33215 } else if (toUnicode instanceof Name) { 33216 hash.update(toUnicode.name); 33217 } 33218 const widths = dict.get("Widths") || baseDict.get("Widths"); 33219 if (Array.isArray(widths)) { 33220 const widthsBuf = []; 33221 for (const entry of widths) { 33222 if (typeof entry === "number" || entry instanceof Ref) { 33223 widthsBuf.push(entry.toString()); 33224 } 33225 } 33226 hash.update(widthsBuf.join()); 33227 } 33228 if (composite) { 33229 hash.update("compositeFont"); 33230 const compositeWidths = dict.get("W") || baseDict.get("W"); 33231 if (Array.isArray(compositeWidths)) { 33232 const widthsBuf = []; 33233 for (const entry of compositeWidths) { 33234 if (typeof entry === "number" || entry instanceof Ref) { 33235 widthsBuf.push(entry.toString()); 33236 } else if (Array.isArray(entry)) { 33237 const subWidthsBuf = []; 33238 for (const element of entry) { 33239 if (typeof element === "number" || element instanceof Ref) { 33240 subWidthsBuf.push(element.toString()); 33241 } 33242 } 33243 widthsBuf.push(`[${subWidthsBuf.join()}]`); 33244 } 33245 } 33246 hash.update(widthsBuf.join()); 33247 } 33248 const cidToGidMap = dict.getRaw("CIDToGIDMap") || baseDict.getRaw("CIDToGIDMap"); 33249 if (cidToGidMap instanceof Name) { 33250 hash.update(cidToGidMap.name); 33251 } else if (cidToGidMap instanceof Ref) { 33252 hash.update(cidToGidMap.toString()); 33253 } else if (cidToGidMap instanceof BaseStream) { 33254 hash.update(cidToGidMap.peekBytes()); 33255 } 33256 } 33257 } 33258 return { 33259 descriptor, 33260 dict, 33261 baseDict, 33262 composite, 33263 type: type.name, 33264 firstChar, 33265 lastChar, 33266 toUnicode, 33267 hash: hash ? hash.hexdigest() : "" 33268 }; 33269 } 33270 async translateFont({ 33271 descriptor, 33272 dict, 33273 baseDict, 33274 composite, 33275 type, 33276 firstChar, 33277 lastChar, 33278 toUnicode, 33279 cssFontInfo 33280 }) { 33281 const isType3Font = type === "Type3"; 33282 if (!descriptor) { 33283 if (isType3Font) { 33284
vendor: 8,755 bytes, lines 33284-33530
33284const bbox = lookupNormalRect(dict.getArray("FontBBox"), [0, 0, 0, 0]); 33285 descriptor = new Dict(null); 33286 descriptor.set("FontName", Name.get(type)); 33287 descriptor.set("FontBBox", bbox); 33288 } else { 33289 let baseFontName = dict.get("BaseFont"); 33290 if (!(baseFontName instanceof Name)) { 33291 throw new FormatError("Base font is not specified"); 33292 } 33293 baseFontName = baseFontName.name.replaceAll(/[,_]/g, "-"); 33294 const metrics = this.getBaseFontMetrics(baseFontName); 33295 const fontNameWoStyle = baseFontName.split("-", 1)[0]; 33296 const flags = (this.isSerifFont(fontNameWoStyle) ? FontFlags.Serif : 0) | (metrics.monospace ? FontFlags.FixedPitch : 0) | (getSymbolsFonts()[fontNameWoStyle] ? FontFlags.Symbolic : FontFlags.Nonsymbolic); 33297 const properties = { 33298 type, 33299 name: baseFontName, 33300 loadedName: baseDict.loadedName, 33301 systemFontInfo: null, 33302 widths: metrics.widths, 33303 defaultWidth: metrics.defaultWidth, 33304 isSimulatedFlags: true, 33305 flags, 33306 firstChar, 33307 lastChar, 33308 toUnicode, 33309 xHeight: 0, 33310 capHeight: 0, 33311 italicAngle: 0, 33312 isType3Font 33313 }; 33314 const widths = dict.get("Widths"); 33315 const standardFontName = getStandardFontName(baseFontName); 33316 let file = null; 33317 if (standardFontName) { 33318 file = await this.fetchStandardFontData(standardFontName); 33319 properties.isInternalFont = !!file; 33320 } 33321 if (!properties.isInternalFont && this.options.useSystemFonts) { 33322 properties.systemFontInfo = getFontSubstitution(this.systemFontCache, this.idFactory, this.options.standardFontDataUrl, baseFontName, standardFontName, type); 33323 } 33324 const newProperties = await this.extractDataStructures(dict, properties); 33325 if (Array.isArray(widths)) { 33326 const glyphWidths = []; 33327 let j = firstChar; 33328 for (const w of widths) { 33329 const width = this.xref.fetchIfRef(w); 33330 if (typeof width === "number") { 33331 glyphWidths[j] = width; 33332 } 33333 j++; 33334 } 33335 newProperties.widths = glyphWidths; 33336 } else { 33337 newProperties.widths = this.buildCharCodeToWidth(metrics.widths, newProperties); 33338 } 33339 return new Font(baseFontName, file, newProperties); 33340 } 33341 } 33342 let fontName = descriptor.get("FontName"); 33343 let baseFont = dict.get("BaseFont"); 33344 if (typeof fontName === "string") { 33345 fontName = Name.get(fontName); 33346 } 33347 if (typeof baseFont === "string") { 33348 baseFont = Name.get(baseFont); 33349 } 33350 const fontNameStr = fontName?.name; 33351 const baseFontStr = baseFont?.name; 33352 if (!isType3Font && fontNameStr !== baseFontStr) { 33353 info(`The FontDescriptor's FontName is "${fontNameStr}" but ` + `should be the same as the Font's BaseFont "${baseFontStr}".`); 33354 if (fontNameStr && baseFontStr && (baseFontStr.startsWith(fontNameStr) || !isKnownFontName(fontNameStr) && isKnownFontName(baseFontStr))) { 33355 fontName = null; 33356 } 33357 } 33358 fontName ||= baseFont; 33359 if (!(fontName instanceof Name)) { 33360 throw new FormatError("invalid font name"); 33361 } 33362 let fontFile, subtype, length1, length2, length3; 33363 try { 33364 fontFile = descriptor.get("FontFile", "FontFile2", "FontFile3"); 33365 if (fontFile) { 33366 if (!(fontFile instanceof BaseStream)) { 33367 throw new FormatError("FontFile should be a stream"); 33368 } else if (fontFile.isEmpty) { 33369 throw new FormatError("FontFile is empty"); 33370 } 33371 } 33372 } catch (ex) { 33373 if (!this.options.ignoreErrors) { 33374 throw ex; 33375 } 33376 warn(`translateFont - fetching "${fontName.name}" font file: "${ex}".`); 33377 fontFile = null; 33378 } 33379 let isInternalFont = false; 33380 let glyphScaleFactors = null; 33381 let systemFontInfo = null; 33382 if (fontFile) { 33383 if (fontFile.dict) { 33384 const subtypeEntry = fontFile.dict.get("Subtype"); 33385 if (subtypeEntry instanceof Name) { 33386 subtype = subtypeEntry.name; 33387 } 33388 length1 = fontFile.dict.get("Length1"); 33389 length2 = fontFile.dict.get("Length2"); 33390 length3 = fontFile.dict.get("Length3"); 33391 } 33392 } else if (cssFontInfo) { 33393 const standardFontName = getXfaFontName(fontName.name); 33394 if (standardFontName) { 33395 cssFontInfo.fontFamily = `${cssFontInfo.fontFamily}-PdfJS-XFA`; 33396 cssFontInfo.metrics = standardFontName.metrics || null; 33397 glyphScaleFactors = standardFontName.factors || null; 33398 fontFile = await this.fetchStandardFontData(standardFontName.name); 33399 isInternalFont = !!fontFile; 33400 baseDict = dict = getXfaFontDict(fontName.name); 33401 composite = true; 33402 } 33403 } else if (!isType3Font) { 33404 const standardFontName = getStandardFontName(fontName.name); 33405 if (standardFontName) { 33406 fontFile = await this.fetchStandardFontData(standardFontName); 33407 isInternalFont = !!fontFile; 33408 } 33409 if (!isInternalFont && this.options.useSystemFonts) { 33410 systemFontInfo = getFontSubstitution(this.systemFontCache, this.idFactory, this.options.standardFontDataUrl, fontName.name, standardFontName, type); 33411 } 33412 } 33413 const fontMatrix = lookupMatrix(dict.getArray("FontMatrix"), FONT_IDENTITY_MATRIX); 33414 const bbox = lookupNormalRect(descriptor.getArray("FontBBox") || dict.getArray("FontBBox"), undefined); 33415 let ascent = descriptor.get("Ascent"); 33416 if (typeof ascent !== "number") { 33417 ascent = undefined; 33418 } 33419 let descent = descriptor.get("Descent"); 33420 if (typeof descent !== "number") { 33421 descent = undefined; 33422 } 33423 let xHeight = descriptor.get("XHeight"); 33424 if (typeof xHeight !== "number") { 33425 xHeight = 0; 33426 } 33427 let capHeight = descriptor.get("CapHeight"); 33428 if (typeof capHeight !== "number") { 33429 capHeight = 0; 33430 } 33431 let flags = descriptor.get("Flags"); 33432 if (!Number.isInteger(flags)) { 33433 flags = 0; 33434 } 33435 let italicAngle = descriptor.get("ItalicAngle"); 33436 if (typeof italicAngle !== "number") { 33437 italicAngle = 0; 33438 } 33439 const properties = { 33440 type, 33441 name: fontName.name, 33442 subtype, 33443 file: fontFile, 33444 length1, 33445 length2, 33446 length3, 33447 isInternalFont, 33448 loadedName: baseDict.loadedName, 33449 composite, 33450 fixedPitch: false, 33451 fontMatrix, 33452 firstChar, 33453 lastChar, 33454 toUnicode, 33455 bbox, 33456 ascent, 33457 descent, 33458 xHeight, 33459 capHeight, 33460 flags, 33461 italicAngle, 33462 isType3Font, 33463 cssFontInfo, 33464 scaleFactors: glyphScaleFactors, 33465 systemFontInfo 33466 }; 33467 if (composite) { 33468 const cidEncoding = baseDict.get("Encoding"); 33469 if (cidEncoding instanceof Name) { 33470 properties.cidEncoding = cidEncoding.name; 33471 } 33472 const cMap = await CMapFactory.create({ 33473 encoding: cidEncoding, 33474 fetchBuiltInCMap: this._fetchBuiltInCMapBound, 33475 useCMap: null 33476 }); 33477 properties.cMap = cMap; 33478 properties.vertical = properties.cMap.vertical; 33479 } 33480 const newProperties = await this.extractDataStructures(dict, properties); 33481 this.extractWidths(dict, descriptor, newProperties); 33482 return new Font(fontName.name, fontFile, newProperties); 33483 } 33484 static buildFontPaths(font, glyphs, handler, evaluatorOptions) { 33485 function buildPath(fontChar) { 33486 const glyphName = `${font.loadedName}_path_${fontChar}`; 33487 try { 33488 if (font.renderer.hasBuiltPath(fontChar)) { 33489 return; 33490 } 33491 handler.send("commonobj", [glyphName, "FontPath", font.renderer.getPathJs(fontChar)]); 33492 } catch (reason) { 33493 if (evaluatorOptions.ignoreErrors) { 33494 warn(`buildFontPaths - ignoring ${glyphName} glyph: "${reason}".`); 33495 return; 33496 } 33497 throw reason; 33498 } 33499 } 33500 for (const glyph of glyphs) { 33501 buildPath(glyph.fontChar); 33502 const accent = glyph.accent; 33503 if (accent?.fontChar) { 33504 buildPath(accent.fontChar); 33505 } 33506 } 33507 } 33508 static get fallbackFontDict() { 33509 const dict = new Dict(); 33510 dict.set("BaseFont", Name.get("Helvetica")); 33511 dict.set("Type", Name.get("FallbackType")); 33512 dict.set("Subtype", Name.get("FallbackType")); 33513 dict.set("Encoding", Name.get("WinAnsiEncoding")); 33514 return shadow(this, "fallbackFontDict", dict); 33515 } 33516} 33517class TranslatedFont { 33518 constructor({ 33519 loadedName, 33520 font, 33521 dict, 33522 evaluatorOptions 33523 }) { 33524 this.loadedName = loadedName; 33525 this.font = font; 33526 this.dict = dict; 33527 this._evaluatorOptions = evaluatorOptions || DefaultPartialEvaluatorOptions; 33528 this.type3Loaded = null; 33529 this.type3Dependencies = font.isType3Font ? new Set() : null; 33530 this.sent = false;
33531 } 33532 send(handler) { 33533 if (this.sent) { 33534 return; 33535 } 33536 this.sent = true; 33537 handler.send("commonobj", [this.loadedName, "Font", this.font.exportData(this._evaluatorOptions.fontExtraProperties)]); 33538 } 33539 fallback(handler) { 33540 if (!this.font.data) { 33541 return; 33542 } 33543 this.font.disableFontFace = true; 33544 PartialEvaluator.buildFontPaths(this.font, this.font.glyphCacheValues, handler, this._evaluatorOptions); 33545 } 33546 loadType3Data(evaluator, resources, task) { 33547 if (this.type3Loaded) { 33548 return this.type3Loaded; 33549 } 33550 if (!this.font.isType3Font) { 33551 throw new Error("Must be a Type3 font."); 33552 } 33553 const type3Evaluator = evaluator.clone({ 33554 ignoreErrors: false 33555 }); 33556 const type3FontRefs = new RefSet(evaluator.type3FontRefs); 33557 if (this.dict.objId && !type3FontRefs.has(this.dict.objId)) { 33558 type3FontRefs.put(this.dict.objId); 33559 } 33560 type3Evaluator.type3FontRefs = type3FontRefs; 33561 const translatedFont = this.font, 33562 type3Dependencies = this.type3Dependencies; 33563 let loadCharProcsPromise = Promise.resolve(); 33564 const charProcs = this.dict.get("CharProcs"); 33565 const fontResources = this.dict.get("Resources") || resources; 33566 const charProcOperatorList = Object.create(null); 33567 const fontBBox = Util.normalizeRect(translatedFont.bbox || [0, 0, 0, 0]), 33568 width = fontBBox[2] - fontBBox[0], 33569 height = fontBBox[3] - fontBBox[1]; 33570 const fontBBoxSize = Math.hypot(width, height); 33571 for (const key of charProcs.getKeys()) { 33572 loadCharProcsPromise = loadCharProcsPromise.then(() => { 33573 const glyphStream = charProcs.get(key); 33574 const operatorList = new OperatorList(); 33575 return type3Evaluator.getOperatorList({ 33576 stream: glyphStream, 33577 task, 33578 resources: fontResources, 33579 operatorList 33580 }).then(() => { 33581 if (operatorList.fnArray[0] === OPS.setCharWidthAndBounds) { 33582 this._removeType3ColorOperators(operatorList, fontBBoxSize); 33583 } 33584 charProcOperatorList[key] = operatorList.getIR(); 33585 for (const dependency of operatorList.dependencies) { 33586 type3Dependencies.add(dependency); 33587 } 33588 }).catch(function (reason) { 33589 warn(`Type3 font resource "${key}" is not available.`); 33590 const dummyOperatorList = new OperatorList(); 33591 charProcOperatorList[key] = dummyOperatorList.getIR(); 33592 }); 33593 }); 33594 } 33595 this.type3Loaded = loadCharProcsPromise.then(() => { 33596 translatedFont.charProcOperatorList = charProcOperatorList; 33597 if (this._bbox) { 33598 translatedFont.isCharBBox = true; 33599 translatedFont.bbox = this._bbox; 33600 } 33601 }); 33602 return this.type3Loaded; 33603 } 33604 _removeType3ColorOperators(operatorList, fontBBoxSize = NaN) { 33605 const charBBox = Util.normalizeRect(operatorList.argsArray[0].slice(2)), 33606 width = charBBox[2] - charBBox[0], 33607 height = charBBox[3] - charBBox[1]; 33608 const charBBoxSize = Math.hypot(width, height); 33609 if (width === 0 || height === 0) { 33610 operatorList.fnArray.splice(0, 1); 33611 operatorList.argsArray.splice(0, 1); 33612 } else if (fontBBoxSize === 0 || Math.round(charBBoxSize / fontBBoxSize) >= 10) { 33613 if (!this._bbox) { 33614 this._bbox = [Infinity, Infinity, -Infinity, -Infinity]; 33615 } 33616 this._bbox[0] = Math.min(this._bbox[0], charBBox[0]); 33617 this._bbox[1] = Math.min(this._bbox[1], charBBox[1]); 33618 this._bbox[2] = Math.max(this._bbox[2], charBBox[2]); 33619 this._bbox[3] = Math.max(this._bbox[3], charBBox[3]); 33620 } 33621 let i = 0, 33622 ii = operatorList.length; 33623 while (i < ii) { 33624 switch (operatorList.fnArray[i]) { 33625 case OPS.setCharWidthAndBounds: 33626 break; 33627 case OPS.setStrokeColorSpace: 33628 case OPS.setFillColorSpace: 33629 case OPS.setStrokeColor: 33630 case OPS.setStrokeColorN: 33631 case OPS.setFillColor: 33632 case OPS.setFillColorN: 33633 case OPS.setStrokeGray: 33634 case OPS.setFillGray: 33635 case OPS.setStrokeRGBColor: 33636 case OPS.setFillRGBColor: 33637 case OPS.setStrokeCMYKColor: 33638 case OPS.setFillCMYKColor: 33639 case OPS.shadingFill: 33640 case OPS.setRenderingIntent: 33641 operatorList.fnArray.splice(i, 1); 33642 operatorList.argsArray.splice(i, 1); 33643 ii--; 33644 continue; 33645 case OPS.setGState: 33646 const [gStateObj] = operatorList.argsArray[i]; 33647 let j = 0, 33648 jj = gStateObj.length; 33649 while (j < jj) { 33650 const [gStateKey] = gStateObj[j]; 33651 switch (gStateKey) { 33652 case "TR": 33653 case "TR2": 33654 case "HT": 33655 case "BG": 33656 case "BG2": 33657 case "UCR": 33658 case "UCR2": 33659 gStateObj.splice(j, 1); 33660 jj--; 33661 continue; 33662 } 33663 j++; 33664 }
vendor: 2,088 bytes, lines 33664-33752
33664 33665 break; 33666 } 33667 i++; 33668 } 33669 } 33670} 33671class StateManager { 33672 constructor(initialState = new EvalState()) { 33673 this.state = initialState; 33674 this.stateStack = []; 33675 } 33676 save() { 33677 const old = this.state; 33678 this.stateStack.push(this.state); 33679 this.state = old.clone(); 33680 } 33681 restore() { 33682 const prev = this.stateStack.pop(); 33683 if (prev) { 33684 this.state = prev; 33685 } 33686 } 33687 transform(args) { 33688 this.state.ctm = Util.transform(this.state.ctm, args); 33689 } 33690} 33691class TextState { 33692 constructor() { 33693 this.ctm = new Float32Array(IDENTITY_MATRIX); 33694 this.fontName = null; 33695 this.fontSize = 0; 33696 this.loadedName = null; 33697 this.font = null; 33698 this.fontMatrix = FONT_IDENTITY_MATRIX; 33699 this.textMatrix = IDENTITY_MATRIX.slice(); 33700 this.textLineMatrix = IDENTITY_MATRIX.slice(); 33701 this.charSpacing = 0; 33702 this.wordSpacing = 0; 33703 this.leading = 0; 33704 this.textHScale = 1; 33705 this.textRise = 0; 33706 } 33707 setTextMatrix(a, b, c, d, e, f) { 33708 const m = this.textMatrix; 33709 m[0] = a; 33710 m[1] = b; 33711 m[2] = c; 33712 m[3] = d; 33713 m[4] = e; 33714 m[5] = f; 33715 } 33716 setTextLineMatrix(a, b, c, d, e, f) { 33717 const m = this.textLineMatrix; 33718 m[0] = a; 33719 m[1] = b; 33720 m[2] = c; 33721 m[3] = d; 33722 m[4] = e; 33723 m[5] = f; 33724 } 33725 translateTextMatrix(x, y) { 33726 const m = this.textMatrix; 33727 m[4] = m[0] * x + m[2] * y + m[4]; 33728 m[5] = m[1] * x + m[3] * y + m[5]; 33729 } 33730 translateTextLineMatrix(x, y) { 33731 const m = this.textLineMatrix; 33732 m[4] = m[0] * x + m[2] * y + m[4]; 33733 m[5] = m[1] * x + m[3] * y + m[5]; 33734 } 33735 carriageReturn() { 33736 this.translateTextLineMatrix(0, -this.leading); 33737 this.textMatrix = this.textLineMatrix.slice(); 33738 } 33739 clone() { 33740 const clone = Object.create(this); 33741 clone.textMatrix = this.textMatrix.slice(); 33742 clone.textLineMatrix = this.textLineMatrix.slice(); 33743 clone.fontMatrix = this.fontMatrix.slice(); 33744 return clone; 33745 } 33746} 33747class EvalState { 33748 constructor() { 33749 this.ctm = new Float32Array(IDENTITY_MATRIX); 33750 this.font = null; 33751 this.textRenderingMode = TextRenderingMode.FILL; 33752 this._fillColorSpace =
vendor: 8,071 bytes, lines 33752-34152
33752ColorSpace.singletons.gray; 33753 this._strokeColorSpace = ColorSpace.singletons.gray; 33754 this.patternFillColorSpace = null; 33755 this.patternStrokeColorSpace = null; 33756 } 33757 get fillColorSpace() { 33758 return this._fillColorSpace; 33759 } 33760 set fillColorSpace(colorSpace) { 33761 this._fillColorSpace = this.patternFillColorSpace = colorSpace; 33762 } 33763 get strokeColorSpace() { 33764 return this._strokeColorSpace; 33765 } 33766 set strokeColorSpace(colorSpace) { 33767 this._strokeColorSpace = this.patternStrokeColorSpace = colorSpace; 33768 } 33769 clone() { 33770 return Object.create(this); 33771 } 33772} 33773class EvaluatorPreprocessor { 33774 static get opMap() { 33775 return shadow(this, "opMap", Object.assign(Object.create(null), { 33776 w: { 33777 id: OPS.setLineWidth, 33778 numArgs: 1, 33779 variableArgs: false 33780 }, 33781 J: { 33782 id: OPS.setLineCap, 33783 numArgs: 1, 33784 variableArgs: false 33785 }, 33786 j: { 33787 id: OPS.setLineJoin, 33788 numArgs: 1, 33789 variableArgs: false 33790 }, 33791 M: { 33792 id: OPS.setMiterLimit, 33793 numArgs: 1, 33794 variableArgs: false 33795 }, 33796 d: { 33797 id: OPS.setDash, 33798 numArgs: 2, 33799 variableArgs: false 33800 }, 33801 ri: { 33802 id: OPS.setRenderingIntent, 33803 numArgs: 1, 33804 variableArgs: false 33805 }, 33806 i: { 33807 id: OPS.setFlatness, 33808 numArgs: 1, 33809 variableArgs: false 33810 }, 33811 gs: { 33812 id: OPS.setGState, 33813 numArgs: 1, 33814 variableArgs: false 33815 }, 33816 q: { 33817 id: OPS.save, 33818 numArgs: 0, 33819 variableArgs: false 33820 }, 33821 Q: { 33822 id: OPS.restore, 33823 numArgs: 0, 33824 variableArgs: false 33825 }, 33826 cm: { 33827 id: OPS.transform, 33828 numArgs: 6, 33829 variableArgs: false 33830 }, 33831 m: { 33832 id: OPS.moveTo, 33833 numArgs: 2, 33834 variableArgs: false 33835 }, 33836 l: { 33837 id: OPS.lineTo, 33838 numArgs: 2, 33839 variableArgs: false 33840 }, 33841 c: { 33842 id: OPS.curveTo, 33843 numArgs: 6, 33844 variableArgs: false 33845 }, 33846 v: { 33847 id: OPS.curveTo2, 33848 numArgs: 4, 33849 variableArgs: false 33850 }, 33851 y: { 33852 id: OPS.curveTo3, 33853 numArgs: 4, 33854 variableArgs: false 33855 }, 33856 h: { 33857 id: OPS.closePath, 33858 numArgs: 0, 33859 variableArgs: false 33860 }, 33861 re: { 33862 id: OPS.rectangle, 33863 numArgs: 4, 33864 variableArgs: false 33865 }, 33866 S: { 33867 id: OPS.stroke, 33868 numArgs: 0, 33869 variableArgs: false 33870 }, 33871 s: { 33872 id: OPS.closeStroke, 33873 numArgs: 0, 33874 variableArgs: false 33875 }, 33876 f: { 33877 id: OPS.fill, 33878 numArgs: 0, 33879 variableArgs: false 33880 }, 33881 F: { 33882 id: OPS.fill, 33883 numArgs: 0, 33884 variableArgs: false 33885 }, 33886 "f*": { 33887 id: OPS.eoFill, 33888 numArgs: 0, 33889 variableArgs: false 33890 }, 33891 B: { 33892 id: OPS.fillStroke, 33893 numArgs: 0, 33894 variableArgs: false 33895 }, 33896 "B*": { 33897 id: OPS.eoFillStroke, 33898 numArgs: 0, 33899 variableArgs: false 33900 }, 33901 b: { 33902 id: OPS.closeFillStroke, 33903 numArgs: 0, 33904 variableArgs: false 33905 }, 33906 "b*": { 33907 id: OPS.closeEOFillStroke, 33908 numArgs: 0, 33909 variableArgs: false 33910 }, 33911 n: { 33912 id: OPS.endPath, 33913 numArgs: 0, 33914 variableArgs: false 33915 }, 33916 W: { 33917 id: OPS.clip, 33918 numArgs: 0, 33919 variableArgs: false 33920 }, 33921 "W*": { 33922 id: OPS.eoClip, 33923 numArgs: 0, 33924 variableArgs: false 33925 }, 33926 BT: { 33927 id: OPS.beginText, 33928 numArgs: 0, 33929 variableArgs: false 33930 }, 33931 ET: { 33932 id: OPS.endText, 33933 numArgs: 0, 33934 variableArgs: false 33935 }, 33936 Tc: { 33937 id: OPS.setCharSpacing, 33938 numArgs: 1, 33939 variableArgs: false 33940 }, 33941 Tw: { 33942 id: OPS.setWordSpacing, 33943 numArgs: 1, 33944 variableArgs: false 33945 }, 33946 Tz: { 33947 id: OPS.setHScale, 33948 numArgs: 1, 33949 variableArgs: false 33950 }, 33951 TL: { 33952 id: OPS.setLeading, 33953 numArgs: 1, 33954 variableArgs: false 33955 }, 33956 Tf: { 33957 id: OPS.setFont, 33958 numArgs: 2, 33959 variableArgs: false 33960 }, 33961 Tr: { 33962 id: OPS.setTextRenderingMode, 33963 numArgs: 1, 33964 variableArgs: false 33965 }, 33966 Ts: { 33967 id: OPS.setTextRise, 33968 numArgs: 1, 33969 variableArgs: false 33970 }, 33971 Td: { 33972 id: OPS.moveText, 33973 numArgs: 2, 33974 variableArgs: false 33975 }, 33976 TD: { 33977 id: OPS.setLeadingMoveText, 33978 numArgs: 2, 33979 variableArgs: false 33980 }, 33981 Tm: { 33982 id: OPS.setTextMatrix, 33983 numArgs: 6, 33984 variableArgs: false 33985 }, 33986 "T*": { 33987 id: OPS.nextLine, 33988 numArgs: 0, 33989 variableArgs: false 33990 }, 33991 Tj: { 33992 id: OPS.showText, 33993 numArgs: 1, 33994 variableArgs: false 33995 }, 33996 TJ: { 33997 id: OPS.showSpacedText, 33998 numArgs: 1, 33999 variableArgs: false 34000 }, 34001 "'": { 34002 id: OPS.nextLineShowText, 34003 numArgs: 1, 34004 variableArgs: false 34005 }, 34006 '"': { 34007 id: OPS.nextLineSetSpacingShowText, 34008 numArgs: 3, 34009 variableArgs: false 34010 }, 34011 d0: { 34012 id: OPS.setCharWidth, 34013 numArgs: 2, 34014 variableArgs: false 34015 }, 34016 d1: { 34017 id: OPS.setCharWidthAndBounds, 34018 numArgs: 6, 34019 variableArgs: false 34020 }, 34021 CS: { 34022 id: OPS.setStrokeColorSpace, 34023 numArgs: 1, 34024 variableArgs: false 34025 }, 34026 cs: { 34027 id: OPS.setFillColorSpace, 34028 numArgs: 1, 34029 variableArgs: false 34030 }, 34031 SC: { 34032 id: OPS.setStrokeColor, 34033 numArgs: 4, 34034 variableArgs: true 34035 }, 34036 SCN: { 34037 id: OPS.setStrokeColorN, 34038 numArgs: 33, 34039 variableArgs: true 34040 }, 34041 sc: { 34042 id: OPS.setFillColor, 34043 numArgs: 4, 34044 variableArgs: true 34045 }, 34046 scn: { 34047 id: OPS.setFillColorN, 34048 numArgs: 33, 34049 variableArgs: true 34050 }, 34051 G: { 34052 id: OPS.setStrokeGray, 34053 numArgs: 1, 34054 variableArgs: false 34055 }, 34056 g: { 34057 id: OPS.setFillGray, 34058 numArgs: 1, 34059 variableArgs: false 34060 }, 34061 RG: { 34062 id: OPS.setStrokeRGBColor, 34063 numArgs: 3, 34064 variableArgs: false 34065 }, 34066 rg: { 34067 id: OPS.setFillRGBColor, 34068 numArgs: 3, 34069 variableArgs: false 34070 }, 34071 K: { 34072 id: OPS.setStrokeCMYKColor, 34073 numArgs: 4, 34074 variableArgs: false 34075 }, 34076 k: { 34077 id: OPS.setFillCMYKColor, 34078 numArgs: 4, 34079 variableArgs: false 34080 }, 34081 sh: { 34082 id: OPS.shadingFill, 34083 numArgs: 1, 34084 variableArgs: false 34085 }, 34086 BI: { 34087 id: OPS.beginInlineImage, 34088 numArgs: 0, 34089 variableArgs: false 34090 }, 34091 ID: { 34092 id: OPS.beginImageData, 34093 numArgs: 0, 34094 variableArgs: false 34095 }, 34096 EI: { 34097 id: OPS.endInlineImage, 34098 numArgs: 1, 34099 variableArgs: false 34100 }, 34101 Do: { 34102 id: OPS.paintXObject, 34103 numArgs: 1, 34104 variableArgs: false 34105 }, 34106 MP: { 34107 id: OPS.markPoint, 34108 numArgs: 1, 34109 variableArgs: false 34110 }, 34111 DP: { 34112 id: OPS.markPointProps, 34113 numArgs: 2, 34114 variableArgs: false 34115 }, 34116 BMC: { 34117 id: OPS.beginMarkedContent, 34118 numArgs: 1, 34119 variableArgs: false 34120 }, 34121 BDC: { 34122 id: OPS.beginMarkedContentProps, 34123 numArgs: 2, 34124 variableArgs: false 34125 }, 34126 EMC: { 34127 id: OPS.endMarkedContent, 34128 numArgs: 0, 34129 variableArgs: false 34130 }, 34131 BX: { 34132 id: OPS.beginCompat, 34133 numArgs: 0, 34134 variableArgs: false 34135 }, 34136 EX: { 34137 id: OPS.endCompat, 34138 numArgs: 0, 34139 variableArgs: false 34140 }, 34141 BM: null, 34142 BD: null, 34143 true: null, 34144 fa: null, 34145 fal: null, 34146 fals: null, 34147 false: null, 34148 nu: null, 34149 nul: null, 34150 null: null 34151 })); 34152 }
vendor: 4,517 bytes, lines 34153-34313
34153 static MAX_INVALID_PATH_OPS = 10; 34154 constructor(stream, xref, stateManager = new StateManager()) { 34155 this.parser = new Parser({ 34156 lexer: new Lexer(stream, EvaluatorPreprocessor.opMap), 34157 xref 34158 }); 34159 this.stateManager = stateManager; 34160 this.nonProcessedArgs = []; 34161 this._isPathOp = false; 34162 this._numInvalidPathOPS = 0; 34163 } 34164 get savedStatesDepth() { 34165 return this.stateManager.stateStack.length; 34166 } 34167 read(operation) { 34168 let args = operation.args; 34169 while (true) { 34170 const obj = this.parser.getObj(); 34171 if (obj instanceof Cmd) { 34172 const cmd = obj.cmd; 34173 const opSpec = EvaluatorPreprocessor.opMap[cmd]; 34174 if (!opSpec) { 34175 warn(`Unknown command "${cmd}".`); 34176 continue; 34177 } 34178 const fn = opSpec.id; 34179 const numArgs = opSpec.numArgs; 34180 let argsLength = args !== null ? args.length : 0; 34181 if (!this._isPathOp) { 34182 this._numInvalidPathOPS = 0; 34183 } 34184 this._isPathOp = fn >= OPS.moveTo && fn <= OPS.endPath; 34185 if (!opSpec.variableArgs) { 34186 if (argsLength !== numArgs) { 34187 const nonProcessedArgs = this.nonProcessedArgs; 34188 while (argsLength > numArgs) { 34189 nonProcessedArgs.push(args.shift()); 34190 argsLength--; 34191 } 34192 while (argsLength < numArgs && nonProcessedArgs.length !== 0) { 34193 if (args === null) { 34194 args = []; 34195 } 34196 args.unshift(nonProcessedArgs.pop()); 34197 argsLength++; 34198 } 34199 } 34200 if (argsLength < numArgs) { 34201 const partialMsg = `command ${cmd}: expected ${numArgs} args, ` + `but received ${argsLength} args.`; 34202 if (this._isPathOp && ++this._numInvalidPathOPS > EvaluatorPreprocessor.MAX_INVALID_PATH_OPS) { 34203 throw new FormatError(`Invalid ${partialMsg}`); 34204 } 34205 warn(`Skipping ${partialMsg}`); 34206 if (args !== null) { 34207 args.length = 0; 34208 } 34209 continue; 34210 } 34211 } else if (argsLength > numArgs) { 34212 info(`Command ${cmd}: expected [0, ${numArgs}] args, ` + `but received ${argsLength} args.`); 34213 } 34214 this.preprocessCommand(fn, args); 34215 operation.fn = fn; 34216 operation.args = args; 34217 return true; 34218 } 34219 if (obj === EOF) { 34220 return false; 34221 } 34222 if (obj !== null) { 34223 if (args === null) { 34224 args = []; 34225 } 34226 args.push(obj); 34227 if (args.length > 33) { 34228 throw new FormatError("Too many arguments"); 34229 } 34230 } 34231 } 34232 } 34233 preprocessCommand(fn, args) { 34234 switch (fn | 0) { 34235 case OPS.save: 34236 this.stateManager.save(); 34237 break; 34238 case OPS.restore: 34239 this.stateManager.restore(); 34240 break; 34241 case OPS.transform: 34242 this.stateManager.transform(args); 34243 break; 34244 } 34245 } 34246} 34247 34248;// ./src/core/default_appearance.js 34249 34250 34251 34252 34253 34254 34255 34256 34257class DefaultAppearanceEvaluator extends EvaluatorPreprocessor { 34258 constructor(str) { 34259 super(new StringStream(str)); 34260 } 34261 parse() { 34262 const operation = { 34263 fn: 0, 34264 args: [] 34265 }; 34266 const result = { 34267 fontSize: 0, 34268 fontName: "", 34269 fontColor: new Uint8ClampedArray(3) 34270 }; 34271 try { 34272 while (true) { 34273 operation.args.length = 0; 34274 if (!this.read(operation)) { 34275 break; 34276 } 34277 if (this.savedStatesDepth !== 0) { 34278 continue; 34279 } 34280 const { 34281 fn, 34282 args 34283 } = operation; 34284 switch (fn | 0) { 34285 case OPS.setFont: 34286 const [fontName, fontSize] = args; 34287 if (fontName instanceof Name) { 34288 result.fontName = fontName.name; 34289 } 34290 if (typeof fontSize === "number" && fontSize > 0) { 34291 result.fontSize = fontSize; 34292 } 34293 break; 34294 case OPS.setFillRGBColor: 34295 ColorSpace.singletons.rgb.getRgbItem(args, 0, result.fontColor, 0); 34296 break; 34297 case OPS.setFillGray: 34298 ColorSpace.singletons.gray.getRgbItem(args, 0, result.fontColor, 0); 34299 break; 34300 case OPS.setFillCMYKColor: 34301 ColorSpace.singletons.cmyk.getRgbItem(args, 0, result.fontColor, 0); 34302 break; 34303 } 34304 } 34305 } catch (reason) { 34306 warn(`parseDefaultAppearance - ignoring errors: "${reason}".`); 34307 } 34308 return result; 34309 } 34310} 34311function parseDefaultAppearance(str) { 34312 return new DefaultAppearanceEvaluator(str).parse(); 34313}
vendor: 32,567 bytes, lines 34314-35426
34314class AppearanceStreamEvaluator extends EvaluatorPreprocessor { 34315 constructor(stream, evaluatorOptions, xref) { 34316 super(stream); 34317 this.stream = stream; 34318 this.evaluatorOptions = evaluatorOptions; 34319 this.xref = xref; 34320 this.resources = stream.dict?.get("Resources"); 34321 } 34322 parse() { 34323 const operation = { 34324 fn: 0, 34325 args: [] 34326 }; 34327 let result = { 34328 scaleFactor: 1, 34329 fontSize: 0, 34330 fontName: "", 34331 fontColor: new Uint8ClampedArray(3), 34332 fillColorSpace: ColorSpace.singletons.gray 34333 }; 34334 let breakLoop = false; 34335 const stack = []; 34336 try { 34337 while (true) { 34338 operation.args.length = 0; 34339 if (breakLoop || !this.read(operation)) { 34340 break; 34341 } 34342 const { 34343 fn, 34344 args 34345 } = operation; 34346 switch (fn | 0) { 34347 case OPS.save: 34348 stack.push({ 34349 scaleFactor: result.scaleFactor, 34350 fontSize: result.fontSize, 34351 fontName: result.fontName, 34352 fontColor: result.fontColor.slice(), 34353 fillColorSpace: result.fillColorSpace 34354 }); 34355 break; 34356 case OPS.restore: 34357 result = stack.pop() || result; 34358 break; 34359 case OPS.setTextMatrix: 34360 result.scaleFactor *= Math.hypot(args[0], args[1]); 34361 break; 34362 case OPS.setFont: 34363 const [fontName, fontSize] = args; 34364 if (fontName instanceof Name) { 34365 result.fontName = fontName.name; 34366 } 34367 if (typeof fontSize === "number" && fontSize > 0) { 34368 result.fontSize = fontSize * result.scaleFactor; 34369 } 34370 break; 34371 case OPS.setFillColorSpace: 34372 result.fillColorSpace = ColorSpace.parse({ 34373 cs: args[0], 34374 xref: this.xref, 34375 resources: this.resources, 34376 pdfFunctionFactory: this._pdfFunctionFactory, 34377 localColorSpaceCache: this._localColorSpaceCache 34378 }); 34379 break; 34380 case OPS.setFillColor: 34381 const cs = result.fillColorSpace; 34382 cs.getRgbItem(args, 0, result.fontColor, 0); 34383 break; 34384 case OPS.setFillRGBColor: 34385 ColorSpace.singletons.rgb.getRgbItem(args, 0, result.fontColor, 0); 34386 break; 34387 case OPS.setFillGray: 34388 ColorSpace.singletons.gray.getRgbItem(args, 0, result.fontColor, 0); 34389 break; 34390 case OPS.setFillCMYKColor: 34391 ColorSpace.singletons.cmyk.getRgbItem(args, 0, result.fontColor, 0); 34392 break; 34393 case OPS.showText: 34394 case OPS.showSpacedText: 34395 case OPS.nextLineShowText: 34396 case OPS.nextLineSetSpacingShowText: 34397 breakLoop = true; 34398 break; 34399 } 34400 } 34401 } catch (reason) { 34402 warn(`parseAppearanceStream - ignoring errors: "${reason}".`); 34403 } 34404 this.stream.reset(); 34405 delete result.scaleFactor; 34406 delete result.fillColorSpace; 34407 return result; 34408 } 34409 get _localColorSpaceCache() { 34410 return shadow(this, "_localColorSpaceCache", new LocalColorSpaceCache()); 34411 } 34412 get _pdfFunctionFactory() { 34413 const pdfFunctionFactory = new PDFFunctionFactory({ 34414 xref: this.xref, 34415 isEvalSupported: this.evaluatorOptions.isEvalSupported 34416 }); 34417 return shadow(this, "_pdfFunctionFactory", pdfFunctionFactory); 34418 } 34419} 34420function parseAppearanceStream(stream, evaluatorOptions, xref) { 34421 return new AppearanceStreamEvaluator(stream, evaluatorOptions, xref).parse(); 34422} 34423function getPdfColor(color, isFill) { 34424 if (color[0] === color[1] && color[1] === color[2]) { 34425 const gray = color[0] / 255; 34426 return `${numberToString(gray)} ${isFill ? "g" : "G"}`; 34427 } 34428 return Array.from(color, c => numberToString(c / 255)).join(" ") + ` ${isFill ? "rg" : "RG"}`; 34429} 34430function createDefaultAppearance({ 34431 fontSize, 34432 fontName, 34433 fontColor 34434}) { 34435 return `/${escapePDFName(fontName)} ${fontSize} Tf ${getPdfColor(fontColor, true)}`; 34436} 34437class FakeUnicodeFont { 34438 constructor(xref, fontFamily) { 34439 this.xref = xref; 34440 this.widths = null; 34441 this.firstChar = Infinity; 34442 this.lastChar = -Infinity; 34443 this.fontFamily = fontFamily; 34444 const canvas = new OffscreenCanvas(1, 1); 34445 this.ctxMeasure = canvas.getContext("2d", { 34446 willReadFrequently: true 34447 }); 34448 if (!FakeUnicodeFont._fontNameId) { 34449 FakeUnicodeFont._fontNameId = 1; 34450 } 34451 this.fontName = Name.get(`InvalidPDFjsFont_${fontFamily}_${FakeUnicodeFont._fontNameId++}`); 34452 } 34453 get fontDescriptorRef() { 34454 if (!FakeUnicodeFont._fontDescriptorRef) { 34455 const fontDescriptor = new Dict(this.xref); 34456 fontDescriptor.set("Type", Name.get("FontDescriptor")); 34457 fontDescriptor.set("FontName", this.fontName); 34458 fontDescriptor.set("FontFamily", "MyriadPro Regular"); 34459 fontDescriptor.set("FontBBox", [0, 0, 0, 0]); 34460 fontDescriptor.set("FontStretch", Name.get("Normal")); 34461 fontDescriptor.set("FontWeight", 400); 34462 fontDescriptor.set("ItalicAngle", 0); 34463 FakeUnicodeFont._fontDescriptorRef = this.xref.getNewPersistentRef(fontDescriptor); 34464 } 34465 return FakeUnicodeFont._fontDescriptorRef; 34466 } 34467 get descendantFontRef() { 34468 const descendantFont = new Dict(this.xref); 34469 descendantFont.set("BaseFont", this.fontName); 34470 descendantFont.set("Type", Name.get("Font")); 34471 descendantFont.set("Subtype", Name.get("CIDFontType0")); 34472 descendantFont.set("CIDToGIDMap", Name.get("Identity")); 34473 descendantFont.set("FirstChar", this.firstChar); 34474 descendantFont.set("LastChar", this.lastChar); 34475 descendantFont.set("FontDescriptor", this.fontDescriptorRef); 34476 descendantFont.set("DW", 1000); 34477 const widths = []; 34478 const chars = [...this.widths.entries()].sort(); 34479 let currentChar = null; 34480 let currentWidths = null; 34481 for (const [char, width] of chars) { 34482 if (!currentChar) { 34483 currentChar = char; 34484 currentWidths = [width]; 34485 continue; 34486 } 34487 if (char === currentChar + currentWidths.length) { 34488 currentWidths.push(width); 34489 } else { 34490 widths.push(currentChar, currentWidths); 34491 currentChar = char; 34492 currentWidths = [width]; 34493 } 34494 } 34495 if (currentChar) { 34496 widths.push(currentChar, currentWidths); 34497 } 34498 descendantFont.set("W", widths); 34499 const cidSystemInfo = new Dict(this.xref); 34500 cidSystemInfo.set("Ordering", "Identity"); 34501 cidSystemInfo.set("Registry", "Adobe"); 34502 cidSystemInfo.set("Supplement", 0); 34503 descendantFont.set("CIDSystemInfo", cidSystemInfo); 34504 return this.xref.getNewPersistentRef(descendantFont); 34505 } 34506 get baseFontRef() { 34507 const baseFont = new Dict(this.xref); 34508 baseFont.set("BaseFont", this.fontName); 34509 baseFont.set("Type", Name.get("Font")); 34510 baseFont.set("Subtype", Name.get("Type0")); 34511 baseFont.set("Encoding", Name.get("Identity-H")); 34512 baseFont.set("DescendantFonts", [this.descendantFontRef]); 34513 baseFont.set("ToUnicode", Name.get("Identity-H")); 34514 return this.xref.getNewPersistentRef(baseFont); 34515 } 34516 get resources() { 34517 const resources = new Dict(this.xref); 34518 const font = new Dict(this.xref); 34519 font.set(this.fontName.name, this.baseFontRef); 34520 resources.set("Font", font); 34521 return resources; 34522 } 34523 _createContext() { 34524 this.widths = new Map(); 34525 this.ctxMeasure.font = `1000px ${this.fontFamily}`; 34526 return this.ctxMeasure; 34527 } 34528 createFontResources(text) { 34529 const ctx = this._createContext(); 34530 for (const line of text.split(/\r\n?|\n/)) { 34531 for (const char of line.split("")) { 34532 const code = char.charCodeAt(0); 34533 if (this.widths.has(code)) { 34534 continue; 34535 } 34536 const metrics = ctx.measureText(char); 34537 const width = Math.ceil(metrics.width); 34538 this.widths.set(code, width); 34539 this.firstChar = Math.min(code, this.firstChar); 34540 this.lastChar = Math.max(code, this.lastChar); 34541 } 34542 } 34543 return this.resources; 34544 } 34545 static getFirstPositionInfo(rect, rotation, fontSize) { 34546 const [x1, y1, x2, y2] = rect; 34547 let w = x2 - x1; 34548 let h = y2 - y1; 34549 if (rotation % 180 !== 0) { 34550 [w, h] = [h, w]; 34551 } 34552 const lineHeight = LINE_FACTOR * fontSize; 34553 const lineDescent = LINE_DESCENT_FACTOR * fontSize; 34554 return { 34555 coords: [0, h + lineDescent - lineHeight], 34556 bbox: [0, 0, w, h], 34557 matrix: rotation !== 0 ? getRotationMatrix(rotation, h, lineHeight) : undefined 34558 }; 34559 } 34560 createAppearance(text, rect, rotation, fontSize, bgColor, strokeAlpha) { 34561 const ctx = this._createContext(); 34562 const lines = []; 34563 let maxWidth = -Infinity; 34564 for (const line of text.split(/\r\n?|\n/)) { 34565 lines.push(line); 34566 const lineWidth = ctx.measureText(line).width; 34567 maxWidth = Math.max(maxWidth, lineWidth); 34568 for (const code of codePointIter(line)) { 34569 const char = String.fromCodePoint(code); 34570 let width = this.widths.get(code); 34571 if (width === undefined) { 34572 const metrics = ctx.measureText(char); 34573 width = Math.ceil(metrics.width); 34574 this.widths.set(code, width); 34575 this.firstChar = Math.min(code, this.firstChar); 34576 this.lastChar = Math.max(code, this.lastChar); 34577 } 34578 } 34579 } 34580 maxWidth *= fontSize / 1000; 34581 const [x1, y1, x2, y2] = rect; 34582 let w = x2 - x1; 34583 let h = y2 - y1; 34584 if (rotation % 180 !== 0) { 34585 [w, h] = [h, w]; 34586 } 34587 let hscale = 1; 34588 if (maxWidth > w) { 34589 hscale = w / maxWidth; 34590 } 34591 let vscale = 1; 34592 const lineHeight = LINE_FACTOR * fontSize; 34593 const lineDescent = LINE_DESCENT_FACTOR * fontSize; 34594 const maxHeight = lineHeight * lines.length; 34595 if (maxHeight > h) { 34596 vscale = h / maxHeight; 34597 } 34598 const fscale = Math.min(hscale, vscale); 34599 const newFontSize = fontSize * fscale; 34600 const buffer = ["q", `0 0 ${numberToString(w)} ${numberToString(h)} re W n`, `BT`, `1 0 0 1 0 ${numberToString(h + lineDescent)} Tm 0 Tc ${getPdfColor(bgColor, true)}`, `/${this.fontName.name} ${numberToString(newFontSize)} Tf`]; 34601 const { 34602 resources 34603 } = this; 34604 strokeAlpha = typeof strokeAlpha === "number" && strokeAlpha >= 0 && strokeAlpha <= 1 ? strokeAlpha : 1; 34605 if (strokeAlpha !== 1) { 34606 buffer.push("/R0 gs"); 34607 const extGState = new Dict(this.xref); 34608 const r0 = new Dict(this.xref); 34609 r0.set("ca", strokeAlpha); 34610 r0.set("CA", strokeAlpha); 34611 r0.set("Type", Name.get("ExtGState")); 34612 extGState.set("R0", r0); 34613 resources.set("ExtGState", extGState); 34614 } 34615 const vShift = numberToString(lineHeight); 34616 for (const line of lines) { 34617 buffer.push(`0 -${vShift} Td <${stringToUTF16HexString(line)}> Tj`); 34618 } 34619 buffer.push("ET", "Q"); 34620 const appearance = buffer.join("\n"); 34621 const appearanceStreamDict = new Dict(this.xref); 34622 appearanceStreamDict.set("Subtype", Name.get("Form")); 34623 appearanceStreamDict.set("Type", Name.get("XObject")); 34624 appearanceStreamDict.set("BBox", [0, 0, w, h]); 34625 appearanceStreamDict.set("Length", appearance.length); 34626 appearanceStreamDict.set("Resources", resources); 34627 if (rotation) { 34628 const matrix = getRotationMatrix(rotation, w, h); 34629 appearanceStreamDict.set("Matrix", matrix); 34630 } 34631 const ap = new StringStream(appearance); 34632 ap.dict = appearanceStreamDict; 34633 return ap; 34634 } 34635} 34636 34637;// ./src/core/name_number_tree.js 34638 34639 34640class NameOrNumberTree { 34641 constructor(root, xref, type) { 34642 this.root = root; 34643 this.xref = xref; 34644 this._type = type; 34645 } 34646 getAll() { 34647 const map = new Map(); 34648 if (!this.root) { 34649 return map; 34650 } 34651 const xref = this.xref; 34652 const processed = new RefSet(); 34653 processed.put(this.root); 34654 const queue = [this.root]; 34655 while (queue.length > 0) { 34656 const obj = xref.fetchIfRef(queue.shift()); 34657 if (!(obj instanceof Dict)) { 34658 continue; 34659 } 34660 if (obj.has("Kids")) { 34661 const kids = obj.get("Kids"); 34662 if (!Array.isArray(kids)) { 34663 continue; 34664 } 34665 for (const kid of kids) { 34666 if (processed.has(kid)) { 34667 throw new FormatError(`Duplicate entry in "${this._type}" tree.`); 34668 } 34669 queue.push(kid); 34670 processed.put(kid); 34671 } 34672 continue; 34673 } 34674 const entries = obj.get(this._type); 34675 if (!Array.isArray(entries)) { 34676 continue; 34677 } 34678 for (let i = 0, ii = entries.length; i < ii; i += 2) { 34679 map.set(xref.fetchIfRef(entries[i]), xref.fetchIfRef(entries[i + 1])); 34680 } 34681 } 34682 return map; 34683 } 34684 getRaw(key) { 34685 if (!this.root) { 34686 return null; 34687 } 34688 const xref = this.xref; 34689 let kidsOrEntries = xref.fetchIfRef(this.root); 34690 let loopCount = 0; 34691 const MAX_LEVELS = 10; 34692 while (kidsOrEntries.has("Kids")) { 34693 if (++loopCount > MAX_LEVELS) { 34694 warn(`Search depth limit reached for "${this._type}" tree.`); 34695 return null; 34696 } 34697 const kids = kidsOrEntries.get("Kids"); 34698 if (!Array.isArray(kids)) { 34699 return null; 34700 } 34701 let l = 0, 34702 r = kids.length - 1; 34703 while (l <= r) { 34704 const m = l + r >> 1; 34705 const kid = xref.fetchIfRef(kids[m]); 34706 const limits = kid.get("Limits"); 34707 if (key < xref.fetchIfRef(limits[0])) { 34708 r = m - 1; 34709 } else if (key > xref.fetchIfRef(limits[1])) { 34710 l = m + 1; 34711 } else { 34712 kidsOrEntries = kid; 34713 break; 34714 } 34715 } 34716 if (l > r) { 34717 return null; 34718 } 34719 } 34720 const entries = kidsOrEntries.get(this._type); 34721 if (Array.isArray(entries)) { 34722 let l = 0, 34723 r = entries.length - 2; 34724 while (l <= r) { 34725 const tmp = l + r >> 1, 34726 m = tmp + (tmp & 1); 34727 const currentKey = xref.fetchIfRef(entries[m]); 34728 if (key < currentKey) { 34729 r = m - 2; 34730 } else if (key > currentKey) { 34731 l = m + 2; 34732 } else { 34733 return entries[m + 1]; 34734 } 34735 } 34736 } 34737 return null; 34738 } 34739 get(key) { 34740 return this.xref.fetchIfRef(this.getRaw(key)); 34741 } 34742} 34743class NameTree extends NameOrNumberTree { 34744 constructor(root, xref) { 34745 super(root, xref, "Names"); 34746 } 34747} 34748class NumberTree extends NameOrNumberTree { 34749 constructor(root, xref) { 34750 super(root, xref, "Nums"); 34751 } 34752} 34753 34754;// ./src/core/cleanup_helper.js 34755 34756 34757 34758 34759function clearGlobalCaches() { 34760 clearPatternCaches(); 34761 clearPrimitiveCaches(); 34762 clearUnicodeCaches(); 34763 JpxImage.cleanup(); 34764} 34765 34766;// ./src/core/file_spec.js 34767 34768 34769 34770function pickPlatformItem(dict) { 34771 if (!(dict instanceof Dict)) { 34772 return null; 34773 } 34774 if (dict.has("UF")) { 34775 return dict.get("UF"); 34776 } else if (dict.has("F")) { 34777 return dict.get("F"); 34778 } else if (dict.has("Unix")) { 34779 return dict.get("Unix"); 34780 } else if (dict.has("Mac")) { 34781 return dict.get("Mac"); 34782 } else if (dict.has("DOS")) { 34783 return dict.get("DOS"); 34784 } 34785 return null; 34786} 34787function stripPath(str) { 34788 return str.substring(str.lastIndexOf("/") + 1); 34789} 34790class FileSpec { 34791 #contentAvailable = false; 34792 constructor(root, xref, skipContent = false) { 34793 if (!(root instanceof Dict)) { 34794 return; 34795 } 34796 this.xref = xref; 34797 this.root = root; 34798 if (root.has("FS")) { 34799 this.fs = root.get("FS"); 34800 } 34801 if (root.has("RF")) { 34802 warn("Related file specifications are not supported"); 34803 } 34804 if (!skipContent) { 34805 if (root.has("EF")) { 34806 this.#contentAvailable = true; 34807 } else { 34808 warn("Non-embedded file specifications are not supported"); 34809 } 34810 } 34811 } 34812 get filename() { 34813 let filename = ""; 34814 const item = pickPlatformItem(this.root); 34815 if (item && typeof item === "string") { 34816 filename = stringToPDFString(item).replaceAll("\\\\", "\\").replaceAll("\\/", "/").replaceAll("\\", "/"); 34817 } 34818 return shadow(this, "filename", filename || "unnamed"); 34819 } 34820 get content() { 34821 if (!this.#contentAvailable) { 34822 return null; 34823 } 34824 this._contentRef ||= pickPlatformItem(this.root?.get("EF")); 34825 let content = null; 34826 if (this._contentRef) { 34827 const fileObj = this.xref.fetchIfRef(this._contentRef); 34828 if (fileObj instanceof BaseStream) { 34829 content = fileObj.getBytes(); 34830 } else { 34831 warn("Embedded file specification points to non-existing/invalid content"); 34832 } 34833 } else { 34834 warn("Embedded file specification does not have any content"); 34835 } 34836 return content; 34837 } 34838 get description() { 34839 let description = ""; 34840 const desc = this.root?.get("Desc"); 34841 if (desc && typeof desc === "string") { 34842 description = stringToPDFString(desc); 34843 } 34844 return shadow(this, "description", description); 34845 } 34846 get serializable() { 34847 return { 34848 rawFilename: this.filename, 34849 filename: stripPath(this.filename), 34850 content: this.content, 34851 description: this.description 34852 }; 34853 } 34854} 34855 34856;// ./src/core/xml_parser.js 34857 34858const XMLParserErrorCode = { 34859 NoError: 0, 34860 EndOfDocument: -1, 34861 UnterminatedCdat: -2, 34862 UnterminatedXmlDeclaration: -3, 34863 UnterminatedDoctypeDeclaration: -4, 34864 UnterminatedComment: -5, 34865 MalformedElement: -6, 34866 OutOfMemory: -7, 34867 UnterminatedAttributeValue: -8, 34868 UnterminatedElement: -9, 34869 ElementNeverBegun: -10 34870}; 34871function isWhitespace(s, index) { 34872 const ch = s[index]; 34873 return ch === " " || ch === "\n" || ch === "\r" || ch === "\t"; 34874} 34875function isWhitespaceString(s) { 34876 for (let i = 0, ii = s.length; i < ii; i++) { 34877 if (!isWhitespace(s, i)) { 34878 return false; 34879 } 34880 } 34881 return true; 34882} 34883class XMLParserBase { 34884 _resolveEntities(s) { 34885 return s.replaceAll(/&([^;]+);/g, (all, entity) => { 34886 if (entity.substring(0, 2) === "#x") { 34887 return String.fromCodePoint(parseInt(entity.substring(2), 16)); 34888 } else if (entity.substring(0, 1) === "#") { 34889 return String.fromCodePoint(parseInt(entity.substring(1), 10)); 34890 } 34891 switch (entity) { 34892 case "lt": 34893 return "<"; 34894 case "gt": 34895 return ">"; 34896 case "amp": 34897 return "&"; 34898 case "quot": 34899 return '"'; 34900 case "apos": 34901 return "'"; 34902 } 34903 return this.onResolveEntity(entity); 34904 }); 34905 } 34906 _parseContent(s, start) { 34907 const attributes = []; 34908 let pos = start; 34909 function skipWs() { 34910 while (pos < s.length && isWhitespace(s, pos)) { 34911 ++pos; 34912 } 34913 } 34914 while (pos < s.length && !isWhitespace(s, pos) && s[pos] !== ">" && s[pos] !== "/") { 34915 ++pos; 34916 } 34917 const name = s.substring(start, pos); 34918 skipWs(); 34919 while (pos < s.length && s[pos] !== ">" && s[pos] !== "/" && s[pos] !== "?") { 34920 skipWs(); 34921 let attrName = "", 34922 attrValue = ""; 34923 while (pos < s.length && !isWhitespace(s, pos) && s[pos] !== "=") { 34924 attrName += s[pos]; 34925 ++pos; 34926 } 34927 skipWs(); 34928 if (s[pos] !== "=") { 34929 return null; 34930 } 34931 ++pos; 34932 skipWs(); 34933 const attrEndChar = s[pos]; 34934 if (attrEndChar !== '"' && attrEndChar !== "'") { 34935 return null; 34936 } 34937 const attrEndIndex = s.indexOf(attrEndChar, ++pos); 34938 if (attrEndIndex < 0) { 34939 return null; 34940 } 34941 attrValue = s.substring(pos, attrEndIndex); 34942 attributes.push({ 34943 name: attrName, 34944 value: this._resolveEntities(attrValue) 34945 }); 34946 pos = attrEndIndex + 1; 34947 skipWs(); 34948 } 34949 return { 34950 name, 34951 attributes, 34952 parsed: pos - start 34953 }; 34954 } 34955 _parseProcessingInstruction(s, start) { 34956 let pos = start; 34957 function skipWs() { 34958 while (pos < s.length && isWhitespace(s, pos)) { 34959 ++pos; 34960 } 34961 } 34962 while (pos < s.length && !isWhitespace(s, pos) && s[pos] !== ">" && s[pos] !== "?" && s[pos] !== "/") { 34963 ++pos; 34964 } 34965 const name = s.substring(start, pos); 34966 skipWs(); 34967 const attrStart = pos; 34968 while (pos < s.length && (s[pos] !== "?" || s[pos + 1] !== ">")) { 34969 ++pos; 34970 } 34971 const value = s.substring(attrStart, pos); 34972 return { 34973 name, 34974 value, 34975 parsed: pos - start 34976 }; 34977 } 34978 parseXml(s) { 34979 let i = 0; 34980 while (i < s.length) { 34981 const ch = s[i]; 34982 let j = i; 34983 if (ch === "<") { 34984 ++j; 34985 const ch2 = s[j]; 34986 let q; 34987 switch (ch2) { 34988 case "/": 34989 ++j; 34990 q = s.indexOf(">", j); 34991 if (q < 0) { 34992 this.onError(XMLParserErrorCode.UnterminatedElement); 34993 return; 34994 } 34995 this.onEndElement(s.substring(j, q)); 34996 j = q + 1; 34997 break; 34998 case "?": 34999 ++j; 35000 const pi = this._parseProcessingInstruction(s, j); 35001 if (s.substring(j + pi.parsed, j + pi.parsed + 2) !== "?>") { 35002 this.onError(XMLParserErrorCode.UnterminatedXmlDeclaration); 35003 return; 35004 } 35005 this.onPi(pi.name, pi.value); 35006 j += pi.parsed + 2; 35007 break; 35008 case "!": 35009 if (s.substring(j + 1, j + 3) === "--") { 35010 q = s.indexOf("-->", j + 3); 35011 if (q < 0) { 35012 this.onError(XMLParserErrorCode.UnterminatedComment); 35013 return; 35014 } 35015 this.onComment(s.substring(j + 3, q)); 35016 j = q + 3; 35017 } else if (s.substring(j + 1, j + 8) === "[CDATA[") { 35018 q = s.indexOf("]]>", j + 8); 35019 if (q < 0) { 35020 this.onError(XMLParserErrorCode.UnterminatedCdat); 35021 return; 35022 } 35023 this.onCdata(s.substring(j + 8, q)); 35024 j = q + 3; 35025 } else if (s.substring(j + 1, j + 8) === "DOCTYPE") { 35026 const q2 = s.indexOf("[", j + 8); 35027 let complexDoctype = false; 35028 q = s.indexOf(">", j + 8); 35029 if (q < 0) { 35030 this.onError(XMLParserErrorCode.UnterminatedDoctypeDeclaration); 35031 return; 35032 } 35033 if (q2 > 0 && q > q2) { 35034 q = s.indexOf("]>", j + 8); 35035 if (q < 0) { 35036 this.onError(XMLParserErrorCode.UnterminatedDoctypeDeclaration); 35037 return; 35038 } 35039 complexDoctype = true; 35040 } 35041 const doctypeContent = s.substring(j + 8, q + (complexDoctype ? 1 : 0)); 35042 this.onDoctype(doctypeContent); 35043 j = q + (complexDoctype ? 2 : 1); 35044 } else { 35045 this.onError(XMLParserErrorCode.MalformedElement); 35046 return; 35047 } 35048 break; 35049 default: 35050 const content = this._parseContent(s, j); 35051 if (content === null) { 35052 this.onError(XMLParserErrorCode.MalformedElement); 35053 return; 35054 } 35055 let isClosed = false; 35056 if (s.substring(j + content.parsed, j + content.parsed + 2) === "/>") { 35057 isClosed = true; 35058 } else if (s.substring(j + content.parsed, j + content.parsed + 1) !== ">") { 35059 this.onError(XMLParserErrorCode.UnterminatedElement); 35060 return; 35061 } 35062 this.onBeginElement(content.name, content.attributes, isClosed); 35063 j += content.parsed + (isClosed ? 2 : 1); 35064 break; 35065 } 35066 } else { 35067 while (j < s.length && s[j] !== "<") { 35068 j++; 35069 } 35070 const text = s.substring(i, j); 35071 this.onText(this._resolveEntities(text)); 35072 } 35073 i = j; 35074 } 35075 } 35076 onResolveEntity(name) { 35077 return `&${name};`; 35078 } 35079 onPi(name, value) {} 35080 onComment(text) {} 35081 onCdata(text) {} 35082 onDoctype(doctypeContent) {} 35083 onText(text) {} 35084 onBeginElement(name, attributes, isEmpty) {} 35085 onEndElement(name) {} 35086 onError(code) {} 35087} 35088class SimpleDOMNode { 35089 constructor(nodeName, nodeValue) { 35090 this.nodeName = nodeName; 35091 this.nodeValue = nodeValue; 35092 Object.defineProperty(this, "parentNode", { 35093 value: null, 35094 writable: true 35095 }); 35096 } 35097 get firstChild() { 35098 return this.childNodes?.[0]; 35099 } 35100 get nextSibling() { 35101 const childNodes = this.parentNode.childNodes; 35102 if (!childNodes) { 35103 return undefined; 35104 } 35105 const index = childNodes.indexOf(this); 35106 if (index === -1) { 35107 return undefined; 35108 } 35109 return childNodes[index + 1]; 35110 } 35111 get textContent() { 35112 if (!this.childNodes) { 35113 return this.nodeValue || ""; 35114 } 35115 return this.childNodes.map(function (child) { 35116 return child.textContent; 35117 }).join(""); 35118 } 35119 get children() { 35120 return this.childNodes || []; 35121 } 35122 hasChildNodes() { 35123 return this.childNodes?.length > 0; 35124 } 35125 searchNode(paths, pos) { 35126 if (pos >= paths.length) { 35127 return this; 35128 } 35129 const component = paths[pos]; 35130 if (component.name.startsWith("#") && pos < paths.length - 1) { 35131 return this.searchNode(paths, pos + 1); 35132 } 35133 const stack = []; 35134 let node = this; 35135 while (true) { 35136 if (component.name === node.nodeName) { 35137 if (component.pos === 0) { 35138 const res = node.searchNode(paths, pos + 1); 35139 if (res !== null) { 35140 return res; 35141 } 35142 } else if (stack.length === 0) { 35143 return null; 35144 } else { 35145 const [parent] = stack.pop(); 35146 let siblingPos = 0; 35147 for (const child of parent.childNodes) { 35148 if (component.name === child.nodeName) { 35149 if (siblingPos === component.pos) { 35150 return child.searchNode(paths, pos + 1); 35151 } 35152 siblingPos++; 35153 } 35154 } 35155 return node.searchNode(paths, pos + 1); 35156 } 35157 } 35158 if (node.childNodes?.length > 0) { 35159 stack.push([node, 0]); 35160 node = node.childNodes[0]; 35161 } else if (stack.length === 0) { 35162 return null; 35163 } else { 35164 while (stack.length !== 0) { 35165 const [parent, currentPos] = stack.pop(); 35166 const newPos = currentPos + 1; 35167 if (newPos < parent.childNodes.length) { 35168 stack.push([parent, newPos]); 35169 node = parent.childNodes[newPos]; 35170 break; 35171 } 35172 } 35173 if (stack.length === 0) { 35174 return null; 35175 } 35176 } 35177 } 35178 } 35179 dump(buffer) { 35180 if (this.nodeName === "#text") { 35181 buffer.push(encodeToXmlString(this.nodeValue)); 35182 return; 35183 } 35184 buffer.push(`<${this.nodeName}`); 35185 if (this.attributes) { 35186 for (const attribute of this.attributes) { 35187 buffer.push(` ${attribute.name}="${encodeToXmlString(attribute.value)}"`); 35188 } 35189 } 35190 if (this.hasChildNodes()) { 35191 buffer.push(">"); 35192 for (const child of this.childNodes) { 35193 child.dump(buffer); 35194 } 35195 buffer.push(`</${this.nodeName}>`); 35196 } else if (this.nodeValue) { 35197 buffer.push(`>${encodeToXmlString(this.nodeValue)}</${this.nodeName}>`); 35198 } else { 35199 buffer.push("/>"); 35200 } 35201 } 35202} 35203class SimpleXMLParser extends XMLParserBase { 35204 constructor({ 35205 hasAttributes = false, 35206 lowerCaseName = false 35207 }) { 35208 super(); 35209 this._currentFragment = null; 35210 this._stack = null; 35211 this._errorCode = XMLParserErrorCode.NoError; 35212 this._hasAttributes = hasAttributes; 35213 this._lowerCaseName = lowerCaseName; 35214 } 35215 parseFromString(data) { 35216 this._currentFragment = []; 35217 this._stack = []; 35218 this._errorCode = XMLParserErrorCode.NoError; 35219 this.parseXml(data); 35220 if (this._errorCode !== XMLParserErrorCode.NoError) { 35221 return undefined; 35222 } 35223 const [documentElement] = this._currentFragment; 35224 if (!documentElement) { 35225 return undefined; 35226 } 35227 return { 35228 documentElement 35229 }; 35230 } 35231 onText(text) { 35232 if (isWhitespaceString(text)) { 35233 return; 35234 } 35235 const node = new SimpleDOMNode("#text", text); 35236 this._currentFragment.push(node); 35237 } 35238 onCdata(text) { 35239 const node = new SimpleDOMNode("#text", text); 35240 this._currentFragment.push(node); 35241 } 35242 onBeginElement(name, attributes, isEmpty) { 35243 if (this._lowerCaseName) { 35244 name = name.toLowerCase(); 35245 } 35246 const node = new SimpleDOMNode(name); 35247 node.childNodes = []; 35248 if (this._hasAttributes) { 35249 node.attributes = attributes; 35250 } 35251 this._currentFragment.push(node); 35252 if (isEmpty) { 35253 return; 35254 } 35255 this._stack.push(this._currentFragment); 35256 this._currentFragment = node.childNodes; 35257 } 35258 onEndElement(name) { 35259 this._currentFragment = this._stack.pop() || []; 35260 const lastElement = this._currentFragment.at(-1); 35261 if (!lastElement) { 35262 return null; 35263 } 35264 for (const childNode of lastElement.childNodes) { 35265 childNode.parentNode = lastElement; 35266 } 35267 return lastElement; 35268 } 35269 onError(code) { 35270 this._errorCode = code; 35271 } 35272} 35273 35274;// ./src/core/metadata_parser.js 35275 35276class MetadataParser { 35277 constructor(data) { 35278 data = this._repair(data); 35279 const parser = new SimpleXMLParser({ 35280 lowerCaseName: true 35281 }); 35282 const xmlDocument = parser.parseFromString(data); 35283 this._metadataMap = new Map(); 35284 this._data = data; 35285 if (xmlDocument) { 35286 this._parse(xmlDocument); 35287 } 35288 } 35289 _repair(data) { 35290 return data.replace(/^[^<]+/, "").replaceAll(/>\\376\\377([^<]+)/g, function (all, codes) { 35291 const bytes = codes.replaceAll(/\\([0-3])([0-7])([0-7])/g, function (code, d1, d2, d3) { 35292 return String.fromCharCode(d1 * 64 + d2 * 8 + d3 * 1); 35293 }).replaceAll(/&(amp|apos|gt|lt|quot);/g, function (str, name) { 35294 switch (name) { 35295 case "amp": 35296 return "&"; 35297 case "apos": 35298 return "'"; 35299 case "gt": 35300 return ">"; 35301 case "lt": 35302 return "<"; 35303 case "quot": 35304 return '"'; 35305 } 35306 throw new Error(`_repair: ${name} isn't defined.`); 35307 }); 35308 const charBuf = [">"]; 35309 for (let i = 0, ii = bytes.length; i < ii; i += 2) { 35310 const code = bytes.charCodeAt(i) * 256 + bytes.charCodeAt(i + 1); 35311 if (code >= 32 && code < 127 && code !== 60 && code !== 62 && code !== 38) { 35312 charBuf.push(String.fromCharCode(code)); 35313 } else { 35314 charBuf.push("&#x" + (0x10000 + code).toString(16).substring(1) + ";"); 35315 } 35316 } 35317 return charBuf.join(""); 35318 }); 35319 } 35320 _getSequence(entry) { 35321 const name = entry.nodeName; 35322 if (name !== "rdf:bag" && name !== "rdf:seq" && name !== "rdf:alt") { 35323 return null; 35324 } 35325 return entry.childNodes.filter(node => node.nodeName === "rdf:li"); 35326 } 35327 _parseArray(entry) { 35328 if (!entry.hasChildNodes()) { 35329 return; 35330 } 35331 const [seqNode] = entry.childNodes; 35332 const sequence = this._getSequence(seqNode) || []; 35333 this._metadataMap.set(entry.nodeName, sequence.map(node => node.textContent.trim())); 35334 } 35335 _parse(xmlDocument) { 35336 let rdf = xmlDocument.documentElement; 35337 if (rdf.nodeName !== "rdf:rdf") { 35338 rdf = rdf.firstChild; 35339 while (rdf && rdf.nodeName !== "rdf:rdf") { 35340 rdf = rdf.nextSibling; 35341 } 35342 } 35343 if (!rdf || rdf.nodeName !== "rdf:rdf" || !rdf.hasChildNodes()) { 35344 return; 35345 } 35346 for (const desc of rdf.childNodes) { 35347 if (desc.nodeName !== "rdf:description") { 35348 continue; 35349 } 35350 for (const entry of desc.childNodes) { 35351 const name = entry.nodeName; 35352 switch (name) { 35353 case "#text": 35354 continue; 35355 case "dc:creator": 35356 case "dc:subject": 35357 this._parseArray(entry); 35358 continue; 35359 } 35360 this._metadataMap.set(name, entry.textContent.trim()); 35361 } 35362 } 35363 } 35364 get serializable() { 35365 return { 35366 parsedData: this._metadataMap, 35367 rawData: this._data 35368 }; 35369 } 35370} 35371 35372;// ./src/core/struct_tree.js 35373 35374 35375 35376 35377const MAX_DEPTH = 40; 35378const StructElementType = { 35379 PAGE_CONTENT: 1, 35380 STREAM_CONTENT: 2, 35381 OBJECT: 3, 35382 ANNOTATION: 4, 35383 ELEMENT: 5 35384}; 35385class StructTreeRoot { 35386 constructor(rootDict, rootRef) { 35387 this.dict = rootDict; 35388 this.ref = rootRef instanceof Ref ? rootRef : null; 35389 this.roleMap = new Map(); 35390 this.structParentIds = null; 35391 } 35392 init() { 35393 this.readRoleMap(); 35394 } 35395 #addIdToPage(pageRef, id, type) { 35396 if (!(pageRef instanceof Ref) || id < 0) { 35397 return; 35398 } 35399 this.structParentIds ||= new RefSetCache(); 35400 let ids = this.structParentIds.get(pageRef); 35401 if (!ids) { 35402 ids = []; 35403 this.structParentIds.put(pageRef, ids); 35404 } 35405 ids.push([id, type]); 35406 } 35407 addAnnotationIdToPage(pageRef, id) { 35408 this.#addIdToPage(pageRef, id, StructElementType.ANNOTATION); 35409 } 35410 readRoleMap() { 35411 const roleMapDict = this.dict.get("RoleMap"); 35412 if (!(roleMapDict instanceof Dict)) { 35413 return; 35414 } 35415 for (const [key, value] of roleMapDict) { 35416 if (value instanceof Name) { 35417 this.roleMap.set(key, value.name); 35418 } 35419 } 35420 } 35421 static async canCreateStructureTree({ 35422 catalogRef, 35423 pdfManager, 35424 newAnnotationsByPage 35425 }) { 35426 if (!(catalogRef instanceof Ref)) {
vendor: 4,167 bytes, lines 35427-35564
35427 warn("Cannot save the struct tree: no catalog reference."); 35428 return false; 35429 } 35430 let nextKey = 0; 35431 let hasNothingToUpdate = true; 35432 for (const [pageIndex, elements] of newAnnotationsByPage) { 35433 const { 35434 ref: pageRef 35435 } = await pdfManager.getPage(pageIndex); 35436 if (!(pageRef instanceof Ref)) { 35437 warn(`Cannot save the struct tree: page ${pageIndex} has no ref.`); 35438 hasNothingToUpdate = true; 35439 break; 35440 } 35441 for (const element of elements) { 35442 if (element.accessibilityData?.type) { 35443 element.parentTreeId = nextKey++; 35444 hasNothingToUpdate = false; 35445 } 35446 } 35447 } 35448 if (hasNothingToUpdate) { 35449 for (const elements of newAnnotationsByPage.values()) { 35450 for (const element of elements) { 35451 delete element.parentTreeId; 35452 } 35453 } 35454 return false; 35455 } 35456 return true; 35457 } 35458 static async createStructureTree({ 35459 newAnnotationsByPage, 35460 xref, 35461 catalogRef, 35462 pdfManager, 35463 changes 35464 }) { 35465 const root = pdfManager.catalog.cloneDict(); 35466 const cache = new RefSetCache(); 35467 cache.put(catalogRef, root); 35468 const structTreeRootRef = xref.getNewTemporaryRef(); 35469 root.set("StructTreeRoot", structTreeRootRef); 35470 const structTreeRoot = new Dict(xref); 35471 structTreeRoot.set("Type", Name.get("StructTreeRoot")); 35472 const parentTreeRef = xref.getNewTemporaryRef(); 35473 structTreeRoot.set("ParentTree", parentTreeRef); 35474 const kids = []; 35475 structTreeRoot.set("K", kids); 35476 cache.put(structTreeRootRef, structTreeRoot); 35477 const parentTree = new Dict(xref); 35478 const nums = []; 35479 parentTree.set("Nums", nums); 35480 const nextKey = await this.#writeKids({ 35481 newAnnotationsByPage, 35482 structTreeRootRef, 35483 structTreeRoot: null, 35484 kids, 35485 nums, 35486 xref, 35487 pdfManager, 35488 changes, 35489 cache 35490 }); 35491 structTreeRoot.set("ParentTreeNextKey", nextKey); 35492 cache.put(parentTreeRef, parentTree); 35493 for (const [ref, obj] of cache.items()) { 35494 changes.put(ref, { 35495 data: obj 35496 }); 35497 } 35498 } 35499 async canUpdateStructTree({ 35500 pdfManager, 35501 xref, 35502 newAnnotationsByPage 35503 }) { 35504 if (!this.ref) { 35505 warn("Cannot update the struct tree: no root reference."); 35506 return false; 35507 } 35508 let nextKey = this.dict.get("ParentTreeNextKey"); 35509 if (!Number.isInteger(nextKey) || nextKey < 0) { 35510 warn("Cannot update the struct tree: invalid next key."); 35511 return false; 35512 } 35513 const parentTree = this.dict.get("ParentTree"); 35514 if (!(parentTree instanceof Dict)) { 35515 warn("Cannot update the struct tree: ParentTree isn't a dict."); 35516 return false; 35517 } 35518 const nums = parentTree.get("Nums"); 35519 if (!Array.isArray(nums)) { 35520 warn("Cannot update the struct tree: nums isn't an array."); 35521 return false; 35522 } 35523 const numberTree = new NumberTree(parentTree, xref); 35524 for (const pageIndex of newAnnotationsByPage.keys()) { 35525 const { 35526 pageDict 35527 } = await pdfManager.getPage(pageIndex); 35528 if (!pageDict.has("StructParents")) { 35529 continue; 35530 } 35531 const id = pageDict.get("StructParents"); 35532 if (!Number.isInteger(id) || !Array.isArray(numberTree.get(id))) { 35533 warn(`Cannot save the struct tree: page ${pageIndex} has a wrong id.`); 35534 return false; 35535 } 35536 } 35537 let hasNothingToUpdate = true; 35538 for (const [pageIndex, elements] of newAnnotationsByPage) { 35539 const { 35540 pageDict 35541 } = await pdfManager.getPage(pageIndex); 35542 StructTreeRoot.#collectParents({ 35543 elements, 35544 xref: this.dict.xref, 35545 pageDict, 35546 numberTree 35547 }); 35548 for (const element of elements) { 35549 if (element.accessibilityData?.type) { 35550 if (!(element.accessibilityData.structParent >= 0)) { 35551 element.parentTreeId = nextKey++; 35552 } 35553 hasNothingToUpdate = false; 35554 } 35555 } 35556 } 35557 if (hasNothingToUpdate) { 35558 for (const elements of newAnnotationsByPage.values()) { 35559 for (const element of elements) { 35560 delete element.parentTreeId; 35561 delete element.structTreeParent; 35562 } 35563 } 35564 return false;
vendor: 14,929 bytes, lines 35565-36109
35565 } 35566 return true; 35567 } 35568 async updateStructureTree({ 35569 newAnnotationsByPage, 35570 pdfManager, 35571 changes 35572 }) { 35573 const xref = this.dict.xref; 35574 const structTreeRoot = this.dict.clone(); 35575 const structTreeRootRef = this.ref; 35576 const cache = new RefSetCache(); 35577 cache.put(structTreeRootRef, structTreeRoot); 35578 let parentTreeRef = structTreeRoot.getRaw("ParentTree"); 35579 let parentTree; 35580 if (parentTreeRef instanceof Ref) { 35581 parentTree = xref.fetch(parentTreeRef); 35582 } else { 35583 parentTree = parentTreeRef; 35584 parentTreeRef = xref.getNewTemporaryRef(); 35585 structTreeRoot.set("ParentTree", parentTreeRef); 35586 } 35587 parentTree = parentTree.clone(); 35588 cache.put(parentTreeRef, parentTree); 35589 let nums = parentTree.getRaw("Nums"); 35590 let numsRef = null; 35591 if (nums instanceof Ref) { 35592 numsRef = nums; 35593 nums = xref.fetch(numsRef); 35594 } 35595 nums = nums.slice(); 35596 if (!numsRef) { 35597 parentTree.set("Nums", nums); 35598 } 35599 const newNextKey = await StructTreeRoot.#writeKids({ 35600 newAnnotationsByPage, 35601 structTreeRootRef, 35602 structTreeRoot: this, 35603 kids: null, 35604 nums, 35605 xref, 35606 pdfManager, 35607 changes, 35608 cache 35609 }); 35610 if (newNextKey === -1) { 35611 return; 35612 } 35613 structTreeRoot.set("ParentTreeNextKey", newNextKey); 35614 if (numsRef) { 35615 cache.put(numsRef, nums); 35616 } 35617 for (const [ref, obj] of cache.items()) { 35618 changes.put(ref, { 35619 data: obj 35620 }); 35621 } 35622 } 35623 static async #writeKids({ 35624 newAnnotationsByPage, 35625 structTreeRootRef, 35626 structTreeRoot, 35627 kids, 35628 nums, 35629 xref, 35630 pdfManager, 35631 changes, 35632 cache 35633 }) { 35634 const objr = Name.get("OBJR"); 35635 let nextKey = -1; 35636 let structTreePageObjs; 35637 for (const [pageIndex, elements] of newAnnotationsByPage) { 35638 const page = await pdfManager.getPage(pageIndex); 35639 const { 35640 ref: pageRef 35641 } = page; 35642 const isPageRef = pageRef instanceof Ref; 35643 for (const { 35644 accessibilityData, 35645 ref, 35646 parentTreeId, 35647 structTreeParent 35648 } of elements) { 35649 if (!accessibilityData?.type) { 35650 continue; 35651 } 35652 const { 35653 structParent 35654 } = accessibilityData; 35655 if (structTreeRoot && Number.isInteger(structParent) && structParent >= 0) { 35656 let objs = (structTreePageObjs ||= new Map()).get(pageIndex); 35657 if (objs === undefined) { 35658 const structTreePage = new StructTreePage(structTreeRoot, page.pageDict); 35659 objs = structTreePage.collectObjects(pageRef); 35660 structTreePageObjs.set(pageIndex, objs); 35661 } 35662 const objRef = objs?.get(structParent); 35663 if (objRef) { 35664 const tagDict = xref.fetch(objRef).clone(); 35665 StructTreeRoot.#writeProperties(tagDict, accessibilityData); 35666 changes.put(objRef, { 35667 data: tagDict 35668 }); 35669 continue; 35670 } 35671 } 35672 nextKey = Math.max(nextKey, parentTreeId); 35673 const tagRef = xref.getNewTemporaryRef(); 35674 const tagDict = new Dict(xref); 35675 StructTreeRoot.#writeProperties(tagDict, accessibilityData); 35676 await this.#updateParentTag({ 35677 structTreeParent, 35678 tagDict, 35679 newTagRef: tagRef, 35680 structTreeRootRef, 35681 fallbackKids: kids, 35682 xref, 35683 cache 35684 }); 35685 const objDict = new Dict(xref); 35686 tagDict.set("K", objDict); 35687 objDict.set("Type", objr); 35688 if (isPageRef) { 35689 objDict.set("Pg", pageRef); 35690 } 35691 objDict.set("Obj", ref); 35692 cache.put(tagRef, tagDict); 35693 nums.push(parentTreeId, tagRef); 35694 } 35695 } 35696 return nextKey + 1; 35697 } 35698 static #writeProperties(tagDict, { 35699 type, 35700 title, 35701 lang, 35702 alt, 35703 expanded, 35704 actualText 35705 }) { 35706 tagDict.set("S", Name.get(type)); 35707 if (title) { 35708 tagDict.set("T", stringToAsciiOrUTF16BE(title)); 35709 } 35710 if (lang) { 35711 tagDict.set("Lang", stringToAsciiOrUTF16BE(lang)); 35712 } 35713 if (alt) { 35714 tagDict.set("Alt", stringToAsciiOrUTF16BE(alt)); 35715 } 35716 if (expanded) { 35717 tagDict.set("E", stringToAsciiOrUTF16BE(expanded)); 35718 } 35719 if (actualText) { 35720 tagDict.set("ActualText", stringToAsciiOrUTF16BE(actualText)); 35721 } 35722 } 35723 static #collectParents({ 35724 elements, 35725 xref, 35726 pageDict, 35727 numberTree 35728 }) { 35729 const idToElements = new Map(); 35730 for (const element of elements) { 35731 if (element.structTreeParentId) { 35732 const id = parseInt(element.structTreeParentId.split("_mc")[1], 10); 35733 let elems = idToElements.get(id); 35734 if (!elems) { 35735 elems = []; 35736 idToElements.set(id, elems); 35737 } 35738 elems.push(element); 35739 } 35740 } 35741 const id = pageDict.get("StructParents"); 35742 if (!Number.isInteger(id)) { 35743 return; 35744 } 35745 const parentArray = numberTree.get(id); 35746 const updateElement = (kid, pageKid, kidRef) => { 35747 const elems = idToElements.get(kid); 35748 if (elems) { 35749 const parentRef = pageKid.getRaw("P"); 35750 const parentDict = xref.fetchIfRef(parentRef); 35751 if (parentRef instanceof Ref && parentDict instanceof Dict) { 35752 const params = { 35753 ref: kidRef, 35754 dict: pageKid 35755 }; 35756 for (const element of elems) { 35757 element.structTreeParent = params; 35758 } 35759 } 35760 return true; 35761 } 35762 return false; 35763 }; 35764 for (const kidRef of parentArray) { 35765 if (!(kidRef instanceof Ref)) { 35766 continue; 35767 } 35768 const pageKid = xref.fetch(kidRef); 35769 const k = pageKid.get("K"); 35770 if (Number.isInteger(k)) { 35771 updateElement(k, pageKid, kidRef); 35772 continue; 35773 } 35774 if (!Array.isArray(k)) { 35775 continue; 35776 } 35777 for (let kid of k) { 35778 kid = xref.fetchIfRef(kid); 35779 if (Number.isInteger(kid) && updateElement(kid, pageKid, kidRef)) { 35780 break; 35781 } 35782 if (!(kid instanceof Dict)) { 35783 continue; 35784 } 35785 if (!isName(kid.get("Type"), "MCR")) { 35786 break; 35787 } 35788 const mcid = kid.get("MCID"); 35789 if (Number.isInteger(mcid) && updateElement(mcid, pageKid, kidRef)) { 35790 break; 35791 } 35792 } 35793 } 35794 } 35795 static async #updateParentTag({ 35796 structTreeParent, 35797 tagDict, 35798 newTagRef, 35799 structTreeRootRef, 35800 fallbackKids, 35801 xref, 35802 cache 35803 }) { 35804 let ref = null; 35805 let parentRef; 35806 if (structTreeParent) { 35807 ({ 35808 ref 35809 } = structTreeParent); 35810 parentRef = structTreeParent.dict.getRaw("P") || structTreeRootRef; 35811 } else { 35812 parentRef = structTreeRootRef; 35813 } 35814 tagDict.set("P", parentRef); 35815 const parentDict = xref.fetchIfRef(parentRef); 35816 if (!parentDict) { 35817 fallbackKids.push(newTagRef); 35818 return; 35819 } 35820 let cachedParentDict = cache.get(parentRef); 35821 if (!cachedParentDict) { 35822 cachedParentDict = parentDict.clone(); 35823 cache.put(parentRef, cachedParentDict); 35824 } 35825 const parentKidsRaw = cachedParentDict.getRaw("K"); 35826 let cachedParentKids = parentKidsRaw instanceof Ref ? cache.get(parentKidsRaw) : null; 35827 if (!cachedParentKids) { 35828 cachedParentKids = xref.fetchIfRef(parentKidsRaw); 35829 cachedParentKids = Array.isArray(cachedParentKids) ? cachedParentKids.slice() : [parentKidsRaw]; 35830 const parentKidsRef = xref.getNewTemporaryRef(); 35831 cachedParentDict.set("K", parentKidsRef); 35832 cache.put(parentKidsRef, cachedParentKids); 35833 } 35834 const index = cachedParentKids.indexOf(ref); 35835 cachedParentKids.splice(index >= 0 ? index + 1 : cachedParentKids.length, 0, newTagRef); 35836 } 35837} 35838class StructElementNode { 35839 constructor(tree, dict) { 35840 this.tree = tree; 35841 this.dict = dict; 35842 this.kids = []; 35843 this.parseKids(); 35844 } 35845 get role() { 35846 const nameObj = this.dict.get("S"); 35847 const name = nameObj instanceof Name ? nameObj.name : ""; 35848 const { 35849 root 35850 } = this.tree; 35851 if (root.roleMap.has(name)) { 35852 return root.roleMap.get(name); 35853 } 35854 return name; 35855 } 35856 parseKids() { 35857 let pageObjId = null; 35858 const objRef = this.dict.getRaw("Pg"); 35859 if (objRef instanceof Ref) { 35860 pageObjId = objRef.toString(); 35861 } 35862 const kids = this.dict.get("K"); 35863 if (Array.isArray(kids)) { 35864 for (const kid of kids) { 35865 const element = this.parseKid(pageObjId, kid); 35866 if (element) { 35867 this.kids.push(element); 35868 } 35869 } 35870 } else { 35871 const element = this.parseKid(pageObjId, kids); 35872 if (element) { 35873 this.kids.push(element); 35874 } 35875 } 35876 } 35877 parseKid(pageObjId, kid) { 35878 if (Number.isInteger(kid)) { 35879 if (this.tree.pageDict.objId !== pageObjId) { 35880 return null; 35881 } 35882 return new StructElement({ 35883 type: StructElementType.PAGE_CONTENT, 35884 mcid: kid, 35885 pageObjId 35886 }); 35887 } 35888 let kidDict = null; 35889 if (kid instanceof Ref) { 35890 kidDict = this.dict.xref.fetch(kid); 35891 } else if (kid instanceof Dict) { 35892 kidDict = kid; 35893 } 35894 if (!kidDict) { 35895 return null; 35896 } 35897 const pageRef = kidDict.getRaw("Pg"); 35898 if (pageRef instanceof Ref) { 35899 pageObjId = pageRef.toString(); 35900 } 35901 const type = kidDict.get("Type") instanceof Name ? kidDict.get("Type").name : null; 35902 if (type === "MCR") { 35903 if (this.tree.pageDict.objId !== pageObjId) { 35904 return null; 35905 } 35906 const kidRef = kidDict.getRaw("Stm"); 35907 return new StructElement({ 35908 type: StructElementType.STREAM_CONTENT, 35909 refObjId: kidRef instanceof Ref ? kidRef.toString() : null, 35910 pageObjId, 35911 mcid: kidDict.get("MCID") 35912 }); 35913 } 35914 if (type === "OBJR") { 35915 if (this.tree.pageDict.objId !== pageObjId) { 35916 return null; 35917 } 35918 const kidRef = kidDict.getRaw("Obj"); 35919 return new StructElement({ 35920 type: StructElementType.OBJECT, 35921 refObjId: kidRef instanceof Ref ? kidRef.toString() : null, 35922 pageObjId 35923 }); 35924 } 35925 return new StructElement({ 35926 type: StructElementType.ELEMENT, 35927 dict: kidDict 35928 }); 35929 } 35930} 35931class StructElement { 35932 constructor({ 35933 type, 35934 dict = null, 35935 mcid = null, 35936 pageObjId = null, 35937 refObjId = null 35938 }) { 35939 this.type = type; 35940 this.dict = dict; 35941 this.mcid = mcid; 35942 this.pageObjId = pageObjId; 35943 this.refObjId = refObjId; 35944 this.parentNode = null; 35945 } 35946} 35947class StructTreePage { 35948 constructor(structTreeRoot, pageDict) { 35949 this.root = structTreeRoot; 35950 this.rootDict = structTreeRoot ? structTreeRoot.dict : null; 35951 this.pageDict = pageDict; 35952 this.nodes = []; 35953 } 35954 collectObjects(pageRef) { 35955 if (!this.root || !this.rootDict || !(pageRef instanceof Ref)) { 35956 return null; 35957 } 35958 const parentTree = this.rootDict.get("ParentTree"); 35959 if (!parentTree) { 35960 return null; 35961 } 35962 const ids = this.root.structParentIds?.get(pageRef); 35963 if (!ids) { 35964 return null; 35965 } 35966 const map = new Map(); 35967 const numberTree = new NumberTree(parentTree, this.rootDict.xref); 35968 for (const [elemId] of ids) { 35969 const obj = numberTree.getRaw(elemId); 35970 if (obj instanceof Ref) { 35971 map.set(elemId, obj); 35972 } 35973 } 35974 return map; 35975 } 35976 parse(pageRef) { 35977 if (!this.root || !this.rootDict || !(pageRef instanceof Ref)) { 35978 return; 35979 } 35980 const parentTree = this.rootDict.get("ParentTree"); 35981 if (!parentTree) { 35982 return; 35983 } 35984 const id = this.pageDict.get("StructParents"); 35985 const ids = this.root.structParentIds?.get(pageRef); 35986 if (!Number.isInteger(id) && !ids) { 35987 return; 35988 } 35989 const map = new Map(); 35990 const numberTree = new NumberTree(parentTree, this.rootDict.xref); 35991 if (Number.isInteger(id)) { 35992 const parentArray = numberTree.get(id); 35993 if (Array.isArray(parentArray)) { 35994 for (const ref of parentArray) { 35995 if (ref instanceof Ref) { 35996 this.addNode(this.rootDict.xref.fetch(ref), map); 35997 } 35998 } 35999 } 36000 } 36001 if (!ids) { 36002 return; 36003 } 36004 for (const [elemId, type] of ids) { 36005 const obj = numberTree.get(elemId); 36006 if (obj) { 36007 const elem = this.addNode(this.rootDict.xref.fetchIfRef(obj), map); 36008 if (elem?.kids?.length === 1 && elem.kids[0].type === StructElementType.OBJECT) { 36009 elem.kids[0].type = type; 36010 } 36011 } 36012 } 36013 } 36014 addNode(dict, map, level = 0) { 36015 if (level > MAX_DEPTH) { 36016 warn("StructTree MAX_DEPTH reached."); 36017 return null; 36018 } 36019 if (!(dict instanceof Dict)) { 36020 return null; 36021 } 36022 if (map.has(dict)) { 36023 return map.get(dict); 36024 } 36025 const element = new StructElementNode(this, dict); 36026 map.set(dict, element); 36027 const parent = dict.get("P"); 36028 if (!parent || isName(parent.get("Type"), "StructTreeRoot")) { 36029 if (!this.addTopLevelNode(dict, element)) { 36030 map.delete(dict); 36031 } 36032 return element; 36033 } 36034 const parentNode = this.addNode(parent, map, level + 1); 36035 if (!parentNode) { 36036 return element; 36037 } 36038 let save = false; 36039 for (const kid of parentNode.kids) { 36040 if (kid.type === StructElementType.ELEMENT && kid.dict === dict) { 36041 kid.parentNode = element; 36042 save = true; 36043 } 36044 } 36045 if (!save) { 36046 map.delete(dict); 36047 } 36048 return element; 36049 } 36050 addTopLevelNode(dict, element) { 36051 const obj = this.rootDict.get("K"); 36052 if (!obj) { 36053 return false; 36054 } 36055 if (obj instanceof Dict) { 36056 if (obj.objId !== dict.objId) { 36057 return false; 36058 } 36059 this.nodes[0] = element; 36060 return true; 36061 } 36062 if (!Array.isArray(obj)) { 36063 return true; 36064 } 36065 let save = false; 36066 for (let i = 0; i < obj.length; i++) { 36067 const kidRef = obj[i]; 36068 if (kidRef?.toString() === dict.objId) { 36069 this.nodes[i] = element; 36070 save = true; 36071 } 36072 } 36073 return save; 36074 } 36075 get serializable() { 36076 function nodeToSerializable(node, parent, level = 0) { 36077 if (level > MAX_DEPTH) { 36078 warn("StructTree too deep to be fully serialized."); 36079 return; 36080 } 36081 const obj = Object.create(null); 36082 obj.role = node.role; 36083 obj.children = []; 36084 parent.children.push(obj); 36085 let alt = node.dict.get("Alt"); 36086 if (typeof alt !== "string") { 36087 alt = node.dict.get("ActualText"); 36088 } 36089 if (typeof alt === "string") { 36090 obj.alt = stringToPDFString(alt); 36091 } 36092 const a = node.dict.get("A"); 36093 if (a instanceof Dict) { 36094 const bbox = lookupNormalRect(a.getArray("BBox"), null); 36095 if (bbox) { 36096 obj.bbox = bbox; 36097 } else { 36098 const width = a.get("Width"); 36099 const height = a.get("Height"); 36100 if (typeof width === "number" && width > 0 && typeof height === "number" && height > 0) { 36101 obj.bbox = [0, 0, width, height]; 36102 } 36103 } 36104 } 36105 const lang = node.dict.get("Lang"); 36106 if (typeof lang === "string") { 36107 obj.lang = stringToPDFString(lang); 36108 } 36109 for (const kid of node.kids) {
vendor: 3,984 bytes, lines 36110-36264
36110 const kidElement = kid.type === StructElementType.ELEMENT ? kid.parentNode : null; 36111 if (kidElement) { 36112 nodeToSerializable(kidElement, obj, level + 1); 36113 continue; 36114 } else if (kid.type === StructElementType.PAGE_CONTENT || kid.type === StructElementType.STREAM_CONTENT) { 36115 obj.children.push({ 36116 type: "content", 36117 id: `p${kid.pageObjId}_mc${kid.mcid}` 36118 }); 36119 } else if (kid.type === StructElementType.OBJECT) { 36120 obj.children.push({ 36121 type: "object", 36122 id: kid.refObjId 36123 }); 36124 } else if (kid.type === StructElementType.ANNOTATION) { 36125 obj.children.push({ 36126 type: "annotation", 36127 id: `${AnnotationPrefix}${kid.refObjId}` 36128 }); 36129 } 36130 } 36131 } 36132 const root = Object.create(null); 36133 root.children = []; 36134 root.role = "Root"; 36135 for (const child of this.nodes) { 36136 if (!child) { 36137 continue; 36138 } 36139 nodeToSerializable(child, root); 36140 } 36141 return root; 36142 } 36143} 36144 36145;// ./src/core/catalog.js 36146 36147 36148 36149 36150 36151 36152 36153 36154 36155 36156 36157function isValidExplicitDest(dest) { 36158 if (!Array.isArray(dest) || dest.length < 2) { 36159 return false; 36160 } 36161 const [page, zoom, ...args] = dest; 36162 if (!(page instanceof Ref) && !Number.isInteger(page)) { 36163 return false; 36164 } 36165 if (!(zoom instanceof Name)) { 36166 return false; 36167 } 36168 const argsLen = args.length; 36169 let allowNull = true; 36170 switch (zoom.name) { 36171 case "XYZ": 36172 if (argsLen < 2 || argsLen > 3) { 36173 return false; 36174 } 36175 break; 36176 case "Fit": 36177 case "FitB": 36178 return argsLen === 0; 36179 case "FitH": 36180 case "FitBH": 36181 case "FitV": 36182 case "FitBV": 36183 if (argsLen > 1) { 36184 return false; 36185 } 36186 break; 36187 case "FitR": 36188 if (argsLen !== 4) { 36189 return false; 36190 } 36191 allowNull = false; 36192 break; 36193 default: 36194 return false; 36195 } 36196 for (const arg of args) { 36197 if (!(typeof arg === "number" || allowNull && arg === null)) { 36198 return false; 36199 } 36200 } 36201 return true; 36202} 36203function fetchDest(dest) { 36204 if (dest instanceof Dict) { 36205 dest = dest.get("D"); 36206 } 36207 return isValidExplicitDest(dest) ? dest : null; 36208} 36209function fetchRemoteDest(action) { 36210 let dest = action.get("D"); 36211 if (dest) { 36212 if (dest instanceof Name) { 36213 dest = dest.name; 36214 } 36215 if (typeof dest === "string") { 36216 return stringToPDFString(dest); 36217 } else if (isValidExplicitDest(dest)) { 36218 return JSON.stringify(dest); 36219 } 36220 } 36221 return null; 36222} 36223class Catalog { 36224 constructor(pdfManager, xref) { 36225 this.pdfManager = pdfManager; 36226 this.xref = xref; 36227 this._catDict = xref.getCatalogObj(); 36228 if (!(this._catDict instanceof Dict)) { 36229 throw new FormatError("Catalog object is not a dictionary."); 36230 } 36231 this.toplevelPagesDict; 36232 this._actualNumPages = null; 36233 this.fontCache = new RefSetCache(); 36234 this.builtInCMapCache = new Map(); 36235 this.standardFontDataCache = new Map(); 36236 this.globalImageCache = new GlobalImageCache(); 36237 this.pageKidsCountCache = new RefSetCache(); 36238 this.pageIndexCache = new RefSetCache(); 36239 this.pageDictCache = new RefSetCache(); 36240 this.nonBlendModesSet = new RefSet(); 36241 this.systemFontCache = new Map(); 36242 } 36243 cloneDict() { 36244 return this._catDict.clone(); 36245 } 36246 get version() { 36247 const version = this._catDict.get("Version"); 36248 if (version instanceof Name) { 36249 if (PDF_VERSION_REGEXP.test(version.name)) { 36250 return shadow(this, "version", version.name); 36251 } 36252 warn(`Invalid PDF catalog version: ${version.name}`); 36253 } 36254 return shadow(this, "version", null); 36255 } 36256 get lang() { 36257 const lang = this._catDict.get("Lang"); 36258 return shadow(this, "lang", lang && typeof lang === "string" ? stringToPDFString(lang) : null); 36259 } 36260 get needsRendering() { 36261 const needsRendering = this._catDict.get("NeedsRendering"); 36262 return shadow(this, "needsRendering", typeof needsRendering === "boolean" ? needsRendering : false); 36263 } 36264 get collection() {
vendor: 6,900 bytes, lines 36265-36509
36265 let collection = null; 36266 try { 36267 const obj = this._catDict.get("Collection"); 36268 if (obj instanceof Dict && obj.size > 0) { 36269 collection = obj; 36270 } 36271 } catch (ex) { 36272 if (ex instanceof MissingDataException) { 36273 throw ex; 36274 } 36275 info("Cannot fetch Collection entry; assuming no collection is present."); 36276 } 36277 return shadow(this, "collection", collection); 36278 } 36279 get acroForm() { 36280 let acroForm = null; 36281 try { 36282 const obj = this._catDict.get("AcroForm"); 36283 if (obj instanceof Dict && obj.size > 0) { 36284 acroForm = obj; 36285 } 36286 } catch (ex) { 36287 if (ex instanceof MissingDataException) { 36288 throw ex; 36289 } 36290 info("Cannot fetch AcroForm entry; assuming no forms are present."); 36291 } 36292 return shadow(this, "acroForm", acroForm); 36293 } 36294 get acroFormRef() { 36295 const value = this._catDict.getRaw("AcroForm"); 36296 return shadow(this, "acroFormRef", value instanceof Ref ? value : null); 36297 } 36298 get metadata() { 36299 const streamRef = this._catDict.getRaw("Metadata"); 36300 if (!(streamRef instanceof Ref)) { 36301 return shadow(this, "metadata", null); 36302 } 36303 let metadata = null; 36304 try { 36305 const stream = this.xref.fetch(streamRef, !this.xref.encrypt?.encryptMetadata); 36306 if (stream instanceof BaseStream && stream.dict instanceof Dict) { 36307 const type = stream.dict.get("Type"); 36308 const subtype = stream.dict.get("Subtype"); 36309 if (isName(type, "Metadata") && isName(subtype, "XML")) { 36310 const data = stringToUTF8String(stream.getString()); 36311 if (data) { 36312 metadata = new MetadataParser(data).serializable; 36313 } 36314 } 36315 } 36316 } catch (ex) { 36317 if (ex instanceof MissingDataException) { 36318 throw ex; 36319 } 36320 info(`Skipping invalid Metadata: "${ex}".`); 36321 } 36322 return shadow(this, "metadata", metadata); 36323 } 36324 get markInfo() { 36325 let markInfo = null; 36326 try { 36327 markInfo = this._readMarkInfo(); 36328 } catch (ex) { 36329 if (ex instanceof MissingDataException) { 36330 throw ex; 36331 } 36332 warn("Unable to read mark info."); 36333 } 36334 return shadow(this, "markInfo", markInfo); 36335 } 36336 _readMarkInfo() { 36337 const obj = this._catDict.get("MarkInfo"); 36338 if (!(obj instanceof Dict)) { 36339 return null; 36340 } 36341 const markInfo = { 36342 Marked: false, 36343 UserProperties: false, 36344 Suspects: false 36345 }; 36346 for (const key in markInfo) { 36347 const value = obj.get(key); 36348 if (typeof value === "boolean") { 36349 markInfo[key] = value; 36350 } 36351 } 36352 return markInfo; 36353 } 36354 get structTreeRoot() { 36355 let structTree = null; 36356 try { 36357 structTree = this._readStructTreeRoot(); 36358 } catch (ex) { 36359 if (ex instanceof MissingDataException) { 36360 throw ex; 36361 } 36362 warn("Unable read to structTreeRoot info."); 36363 } 36364 return shadow(this, "structTreeRoot", structTree); 36365 } 36366 _readStructTreeRoot() { 36367 const rawObj = this._catDict.getRaw("StructTreeRoot"); 36368 const obj = this.xref.fetchIfRef(rawObj); 36369 if (!(obj instanceof Dict)) { 36370 return null; 36371 } 36372 const root = new StructTreeRoot(obj, rawObj); 36373 root.init(); 36374 return root; 36375 } 36376 get toplevelPagesDict() { 36377 const pagesObj = this._catDict.get("Pages"); 36378 if (!(pagesObj instanceof Dict)) { 36379 throw new FormatError("Invalid top-level pages dictionary."); 36380 } 36381 return shadow(this, "toplevelPagesDict", pagesObj); 36382 } 36383 get documentOutline() { 36384 let obj = null; 36385 try { 36386 obj = this._readDocumentOutline(); 36387 } catch (ex) { 36388 if (ex instanceof MissingDataException) { 36389 throw ex; 36390 } 36391 warn("Unable to read document outline."); 36392 } 36393 return shadow(this, "documentOutline", obj); 36394 } 36395 _readDocumentOutline() { 36396 let obj = this._catDict.get("Outlines"); 36397 if (!(obj instanceof Dict)) { 36398 return null; 36399 } 36400 obj = obj.getRaw("First"); 36401 if (!(obj instanceof Ref)) { 36402 return null; 36403 } 36404 const root = { 36405 items: [] 36406 }; 36407 const queue = [{ 36408 obj, 36409 parent: root 36410 }]; 36411 const processed = new RefSet(); 36412 processed.put(obj); 36413 const xref = this.xref, 36414 blackColor = new Uint8ClampedArray(3); 36415 while (queue.length > 0) { 36416 const i = queue.shift(); 36417 const outlineDict = xref.fetchIfRef(i.obj); 36418 if (outlineDict === null) { 36419 continue; 36420 } 36421 if (!outlineDict.has("Title")) { 36422 warn("Invalid outline item encountered."); 36423 } 36424 const data = { 36425 url: null, 36426 dest: null, 36427 action: null 36428 }; 36429 Catalog.parseDestDictionary({ 36430 destDict: outlineDict, 36431 resultObj: data, 36432 docBaseUrl: this.baseUrl, 36433 docAttachments: this.attachments 36434 }); 36435 const title = outlineDict.get("Title"); 36436 const flags = outlineDict.get("F") || 0; 36437 const color = outlineDict.getArray("C"); 36438 const count = outlineDict.get("Count"); 36439 let rgbColor = blackColor; 36440 if (isNumberArray(color, 3) && (color[0] !== 0 || color[1] !== 0 || color[2] !== 0)) { 36441 rgbColor = ColorSpace.singletons.rgb.getRgb(color, 0); 36442 } 36443 const outlineItem = { 36444 action: data.action, 36445 attachment: data.attachment, 36446 dest: data.dest, 36447 url: data.url, 36448 unsafeUrl: data.unsafeUrl, 36449 newWindow: data.newWindow, 36450 setOCGState: data.setOCGState, 36451 title: typeof title === "string" ? stringToPDFString(title) : "", 36452 color: rgbColor, 36453 count: Number.isInteger(count) ? count : undefined, 36454 bold: !!(flags & 2), 36455 italic: !!(flags & 1), 36456 items: [] 36457 }; 36458 i.parent.items.push(outlineItem); 36459 obj = outlineDict.getRaw("First"); 36460 if (obj instanceof Ref && !processed.has(obj)) { 36461 queue.push({ 36462 obj, 36463 parent: outlineItem 36464 }); 36465 processed.put(obj); 36466 } 36467 obj = outlineDict.getRaw("Next"); 36468 if (obj instanceof Ref && !processed.has(obj)) { 36469 queue.push({ 36470 obj, 36471 parent: i.parent 36472 }); 36473 processed.put(obj); 36474 } 36475 } 36476 return root.items.length > 0 ? root.items : null; 36477 } 36478 get permissions() { 36479 let permissions = null; 36480 try { 36481 permissions = this._readPermissions(); 36482 } catch (ex) { 36483 if (ex instanceof MissingDataException) { 36484 throw ex; 36485 } 36486 warn("Unable to read permissions."); 36487 } 36488 return shadow(this, "permissions", permissions); 36489 } 36490 _readPermissions() { 36491 const encrypt = this.xref.trailer.get("Encrypt"); 36492 if (!(encrypt instanceof Dict)) { 36493 return null; 36494 } 36495 let flags = encrypt.get("P"); 36496 if (typeof flags !== "number") { 36497 return null; 36498 } 36499 flags += 2 ** 32; 36500 const permissions = []; 36501 for (const key in PermissionFlag) { 36502 const value = PermissionFlag[key]; 36503 if (flags & value) { 36504 permissions.push(value); 36505 } 36506 } 36507 return permissions; 36508 } 36509 get optionalContentConfig() {
vendor: 7,954 bytes, lines 36510-36780
36510 let config = null; 36511 try { 36512 const properties = this._catDict.get("OCProperties"); 36513 if (!properties) { 36514 return shadow(this, "optionalContentConfig", null); 36515 } 36516 const defaultConfig = properties.get("D"); 36517 if (!defaultConfig) { 36518 return shadow(this, "optionalContentConfig", null); 36519 } 36520 const groupsData = properties.get("OCGs"); 36521 if (!Array.isArray(groupsData)) { 36522 return shadow(this, "optionalContentConfig", null); 36523 } 36524 const groupRefCache = new RefSetCache(); 36525 for (const groupRef of groupsData) { 36526 if (!(groupRef instanceof Ref) || groupRefCache.has(groupRef)) { 36527 continue; 36528 } 36529 groupRefCache.put(groupRef, this.#readOptionalContentGroup(groupRef)); 36530 } 36531 config = this.#readOptionalContentConfig(defaultConfig, groupRefCache); 36532 } catch (ex) { 36533 if (ex instanceof MissingDataException) { 36534 throw ex; 36535 } 36536 warn(`Unable to read optional content config: ${ex}`); 36537 } 36538 return shadow(this, "optionalContentConfig", config); 36539 } 36540 #readOptionalContentGroup(groupRef) { 36541 const group = this.xref.fetch(groupRef); 36542 const obj = { 36543 id: groupRef.toString(), 36544 name: null, 36545 intent: null, 36546 usage: { 36547 print: null, 36548 view: null 36549 }, 36550 rbGroups: [] 36551 }; 36552 const name = group.get("Name"); 36553 if (typeof name === "string") { 36554 obj.name = stringToPDFString(name); 36555 } 36556 let intent = group.getArray("Intent"); 36557 if (!Array.isArray(intent)) { 36558 intent = [intent]; 36559 } 36560 if (intent.every(i => i instanceof Name)) { 36561 obj.intent = intent.map(i => i.name); 36562 } 36563 const usage = group.get("Usage"); 36564 if (!(usage instanceof Dict)) { 36565 return obj; 36566 } 36567 const usageObj = obj.usage; 36568 const print = usage.get("Print"); 36569 if (print instanceof Dict) { 36570 const printState = print.get("PrintState"); 36571 if (printState instanceof Name) { 36572 switch (printState.name) { 36573 case "ON": 36574 case "OFF": 36575 usageObj.print = { 36576 printState: printState.name 36577 }; 36578 } 36579 } 36580 } 36581 const view = usage.get("View"); 36582 if (view instanceof Dict) { 36583 const viewState = view.get("ViewState"); 36584 if (viewState instanceof Name) { 36585 switch (viewState.name) { 36586 case "ON": 36587 case "OFF": 36588 usageObj.view = { 36589 viewState: viewState.name 36590 }; 36591 } 36592 } 36593 } 36594 return obj; 36595 } 36596 #readOptionalContentConfig(config, groupRefCache) { 36597 function parseOnOff(refs) { 36598 const onParsed = []; 36599 if (Array.isArray(refs)) { 36600 for (const value of refs) { 36601 if (value instanceof Ref && groupRefCache.has(value)) { 36602 onParsed.push(value.toString()); 36603 } 36604 } 36605 } 36606 return onParsed; 36607 } 36608 function parseOrder(refs, nestedLevels = 0) { 36609 if (!Array.isArray(refs)) { 36610 return null; 36611 } 36612 const order = []; 36613 for (const value of refs) { 36614 if (value instanceof Ref && groupRefCache.has(value)) { 36615 parsedOrderRefs.put(value); 36616 order.push(value.toString()); 36617 continue; 36618 } 36619 const nestedOrder = parseNestedOrder(value, nestedLevels); 36620 if (nestedOrder) { 36621 order.push(nestedOrder); 36622 } 36623 } 36624 if (nestedLevels > 0) { 36625 return order; 36626 } 36627 const hiddenGroups = []; 36628 for (const [groupRef] of groupRefCache.items()) { 36629 if (parsedOrderRefs.has(groupRef)) { 36630 continue; 36631 } 36632 hiddenGroups.push(groupRef.toString()); 36633 } 36634 if (hiddenGroups.length) { 36635 order.push({ 36636 name: null, 36637 order: hiddenGroups 36638 }); 36639 } 36640 return order; 36641 } 36642 function parseNestedOrder(ref, nestedLevels) { 36643 if (++nestedLevels > MAX_NESTED_LEVELS) { 36644 warn("parseNestedOrder - reached MAX_NESTED_LEVELS."); 36645 return null; 36646 } 36647 const value = xref.fetchIfRef(ref); 36648 if (!Array.isArray(value)) { 36649 return null; 36650 } 36651 const nestedName = xref.fetchIfRef(value[0]); 36652 if (typeof nestedName !== "string") { 36653 return null; 36654 } 36655 const nestedOrder = parseOrder(value.slice(1), nestedLevels); 36656 if (!nestedOrder?.length) { 36657 return null; 36658 } 36659 return { 36660 name: stringToPDFString(nestedName), 36661 order: nestedOrder 36662 }; 36663 } 36664 function parseRBGroups(rbGroups) { 36665 if (!Array.isArray(rbGroups)) { 36666 return; 36667 } 36668 for (const value of rbGroups) { 36669 const rbGroup = xref.fetchIfRef(value); 36670 if (!Array.isArray(rbGroup) || !rbGroup.length) { 36671 continue; 36672 } 36673 const parsedRbGroup = new Set(); 36674 for (const ref of rbGroup) { 36675 if (ref instanceof Ref && groupRefCache.has(ref) && !parsedRbGroup.has(ref.toString())) { 36676 parsedRbGroup.add(ref.toString()); 36677 groupRefCache.get(ref).rbGroups.push(parsedRbGroup); 36678 } 36679 } 36680 } 36681 } 36682 const xref = this.xref, 36683 parsedOrderRefs = new RefSet(), 36684 MAX_NESTED_LEVELS = 10; 36685 parseRBGroups(config.get("RBGroups")); 36686 return { 36687 name: typeof config.get("Name") === "string" ? stringToPDFString(config.get("Name")) : null, 36688 creator: typeof config.get("Creator") === "string" ? stringToPDFString(config.get("Creator")) : null, 36689 baseState: config.get("BaseState") instanceof Name ? config.get("BaseState").name : null, 36690 on: parseOnOff(config.get("ON")), 36691 off: parseOnOff(config.get("OFF")), 36692 order: parseOrder(config.get("Order")), 36693 groups: [...groupRefCache] 36694 }; 36695 } 36696 setActualNumPages(num = null) { 36697 this._actualNumPages = num; 36698 } 36699 get hasActualNumPages() { 36700 return this._actualNumPages !== null; 36701 } 36702 get _pagesCount() { 36703 const obj = this.toplevelPagesDict.get("Count"); 36704 if (!Number.isInteger(obj)) { 36705 throw new FormatError("Page count in top-level pages dictionary is not an integer."); 36706 } 36707 return shadow(this, "_pagesCount", obj); 36708 } 36709 get numPages() { 36710 return this.hasActualNumPages ? this._actualNumPages : this._pagesCount; 36711 } 36712 get destinations() { 36713 const obj = this._readDests(), 36714 dests = Object.create(null); 36715 if (obj instanceof NameTree) { 36716 for (const [key, value] of obj.getAll()) { 36717 const dest = fetchDest(value); 36718 if (dest) { 36719 dests[stringToPDFString(key)] = dest; 36720 } 36721 } 36722 } else if (obj instanceof Dict) { 36723 for (const [key, value] of obj) { 36724 const dest = fetchDest(value); 36725 if (dest) { 36726 dests[key] = dest; 36727 } 36728 } 36729 } 36730 return shadow(this, "destinations", dests); 36731 } 36732 getDestination(id) { 36733 const obj = this._readDests(); 36734 if (obj instanceof NameTree) { 36735 const dest = fetchDest(obj.get(id)); 36736 if (dest) { 36737 return dest; 36738 } 36739 const allDest = this.destinations[id]; 36740 if (allDest) { 36741 warn(`Found "${id}" at an incorrect position in the NameTree.`); 36742 return allDest; 36743 } 36744 } else if (obj instanceof Dict) { 36745 const dest = fetchDest(obj.get(id)); 36746 if (dest) { 36747 return dest; 36748 } 36749 } 36750 return null; 36751 } 36752 _readDests() { 36753 const obj = this._catDict.get("Names"); 36754 if (obj?.has("Dests")) { 36755 return new NameTree(obj.getRaw("Dests"), this.xref); 36756 } else if (this._catDict.has("Dests")) { 36757 return this._catDict.get("Dests"); 36758 } 36759 return undefined; 36760 } 36761 get pageLabels() { 36762 let obj = null; 36763 try { 36764 obj = this._readPageLabels(); 36765 } catch (ex) { 36766 if (ex instanceof MissingDataException) { 36767 throw ex; 36768 } 36769 warn("Unable to read page labels."); 36770 } 36771 return shadow(this, "pageLabels", obj); 36772 } 36773 _readPageLabels() { 36774 const obj = this._catDict.getRaw("PageLabels"); 36775 if (!obj) { 36776 return null; 36777 } 36778 const pageLabels = new Array(this.numPages); 36779 let style = null, 36780 prefix = "";
vendor: 7,558 bytes, lines 36781-37029
36781 const numberTree = new NumberTree(obj, this.xref); 36782 const nums = numberTree.getAll(); 36783 let currentLabel = "", 36784 currentIndex = 1; 36785 for (let i = 0, ii = this.numPages; i < ii; i++) { 36786 const labelDict = nums.get(i); 36787 if (labelDict !== undefined) { 36788 if (!(labelDict instanceof Dict)) { 36789 throw new FormatError("PageLabel is not a dictionary."); 36790 } 36791 if (labelDict.has("Type") && !isName(labelDict.get("Type"), "PageLabel")) { 36792 throw new FormatError("Invalid type in PageLabel dictionary."); 36793 } 36794 if (labelDict.has("S")) { 36795 const s = labelDict.get("S"); 36796 if (!(s instanceof Name)) { 36797 throw new FormatError("Invalid style in PageLabel dictionary."); 36798 } 36799 style = s.name; 36800 } else { 36801 style = null; 36802 } 36803 if (labelDict.has("P")) { 36804 const p = labelDict.get("P"); 36805 if (typeof p !== "string") { 36806 throw new FormatError("Invalid prefix in PageLabel dictionary."); 36807 } 36808 prefix = stringToPDFString(p); 36809 } else { 36810 prefix = ""; 36811 } 36812 if (labelDict.has("St")) { 36813 const st = labelDict.get("St"); 36814 if (!(Number.isInteger(st) && st >= 1)) { 36815 throw new FormatError("Invalid start in PageLabel dictionary."); 36816 } 36817 currentIndex = st; 36818 } else { 36819 currentIndex = 1; 36820 } 36821 } 36822 switch (style) { 36823 case "D": 36824 currentLabel = currentIndex; 36825 break; 36826 case "R": 36827 case "r": 36828 currentLabel = toRomanNumerals(currentIndex, style === "r"); 36829 break; 36830 case "A": 36831 case "a": 36832 const LIMIT = 26; 36833 const A_UPPER_CASE = 0x41, 36834 A_LOWER_CASE = 0x61; 36835 const baseCharCode = style === "a" ? A_LOWER_CASE : A_UPPER_CASE; 36836 const letterIndex = currentIndex - 1; 36837 const character = String.fromCharCode(baseCharCode + letterIndex % LIMIT); 36838 currentLabel = character.repeat(Math.floor(letterIndex / LIMIT) + 1); 36839 break; 36840 default: 36841 if (style) { 36842 throw new FormatError(`Invalid style "${style}" in PageLabel dictionary.`); 36843 } 36844 currentLabel = ""; 36845 } 36846 pageLabels[i] = prefix + currentLabel; 36847 currentIndex++; 36848 } 36849 return pageLabels; 36850 } 36851 get pageLayout() { 36852 const obj = this._catDict.get("PageLayout"); 36853 let pageLayout = ""; 36854 if (obj instanceof Name) { 36855 switch (obj.name) { 36856 case "SinglePage": 36857 case "OneColumn": 36858 case "TwoColumnLeft": 36859 case "TwoColumnRight": 36860 case "TwoPageLeft": 36861 case "TwoPageRight": 36862 pageLayout = obj.name; 36863 } 36864 } 36865 return shadow(this, "pageLayout", pageLayout); 36866 } 36867 get pageMode() { 36868 const obj = this._catDict.get("PageMode"); 36869 let pageMode = "UseNone"; 36870 if (obj instanceof Name) { 36871 switch (obj.name) { 36872 case "UseNone": 36873 case "UseOutlines": 36874 case "UseThumbs": 36875 case "FullScreen": 36876 case "UseOC": 36877 case "UseAttachments": 36878 pageMode = obj.name; 36879 } 36880 } 36881 return shadow(this, "pageMode", pageMode); 36882 } 36883 get viewerPreferences() { 36884 const obj = this._catDict.get("ViewerPreferences"); 36885 if (!(obj instanceof Dict)) { 36886 return shadow(this, "viewerPreferences", null); 36887 } 36888 let prefs = null; 36889 for (const key of obj.getKeys()) { 36890 const value = obj.get(key); 36891 let prefValue; 36892 switch (key) { 36893 case "HideToolbar": 36894 case "HideMenubar": 36895 case "HideWindowUI": 36896 case "FitWindow": 36897 case "CenterWindow": 36898 case "DisplayDocTitle": 36899 case "PickTrayByPDFSize": 36900 if (typeof value === "boolean") { 36901 prefValue = value; 36902 } 36903 break; 36904 case "NonFullScreenPageMode": 36905 if (value instanceof Name) { 36906 switch (value.name) { 36907 case "UseNone": 36908 case "UseOutlines": 36909 case "UseThumbs": 36910 case "UseOC": 36911 prefValue = value.name; 36912 break; 36913 default: 36914 prefValue = "UseNone"; 36915 } 36916 } 36917 break; 36918 case "Direction": 36919 if (value instanceof Name) { 36920 switch (value.name) { 36921 case "L2R": 36922 case "R2L": 36923 prefValue = value.name; 36924 break; 36925 default: 36926 prefValue = "L2R"; 36927 } 36928 } 36929 break; 36930 case "ViewArea": 36931 case "ViewClip": 36932 case "PrintArea": 36933 case "PrintClip": 36934 if (value instanceof Name) { 36935 switch (value.name) { 36936 case "MediaBox": 36937 case "CropBox": 36938 case "BleedBox": 36939 case "TrimBox": 36940 case "ArtBox": 36941 prefValue = value.name; 36942 break; 36943 default: 36944 prefValue = "CropBox"; 36945 } 36946 } 36947 break; 36948 case "PrintScaling": 36949 if (value instanceof Name) { 36950 switch (value.name) { 36951 case "None": 36952 case "AppDefault": 36953 prefValue = value.name; 36954 break; 36955 default: 36956 prefValue = "AppDefault"; 36957 } 36958 } 36959 break; 36960 case "Duplex": 36961 if (value instanceof Name) { 36962 switch (value.name) { 36963 case "Simplex": 36964 case "DuplexFlipShortEdge": 36965 case "DuplexFlipLongEdge": 36966 prefValue = value.name; 36967 break; 36968 default: 36969 prefValue = "None"; 36970 } 36971 } 36972 break; 36973 case "PrintPageRange": 36974 if (Array.isArray(value) && value.length % 2 === 0) { 36975 const isValid = value.every((page, i, arr) => Number.isInteger(page) && page > 0 && (i === 0 || page >= arr[i - 1]) && page <= this.numPages); 36976 if (isValid) { 36977 prefValue = value; 36978 } 36979 } 36980 break; 36981 case "NumCopies": 36982 if (Number.isInteger(value) && value > 0) { 36983 prefValue = value; 36984 } 36985 break; 36986 default: 36987 warn(`Ignoring non-standard key in ViewerPreferences: ${key}.`); 36988 continue; 36989 } 36990 if (prefValue === undefined) { 36991 warn(`Bad value, for key "${key}", in ViewerPreferences: ${value}.`); 36992 continue; 36993 } 36994 if (!prefs) { 36995 prefs = Object.create(null); 36996 } 36997 prefs[key] = prefValue; 36998 } 36999 return shadow(this, "viewerPreferences", prefs); 37000 } 37001 get openAction() { 37002 const obj = this._catDict.get("OpenAction"); 37003 const openAction = Object.create(null); 37004 if (obj instanceof Dict) { 37005 const destDict = new Dict(this.xref); 37006 destDict.set("A", obj); 37007 const resultObj = { 37008 url: null, 37009 dest: null, 37010 action: null 37011 }; 37012 Catalog.parseDestDictionary({ 37013 destDict, 37014 resultObj 37015 }); 37016 if (Array.isArray(resultObj.dest)) { 37017 openAction.dest = resultObj.dest; 37018 } else if (resultObj.action) { 37019 openAction.action = resultObj.action; 37020 } 37021 } else if (Array.isArray(obj)) { 37022 openAction.dest = obj; 37023 } 37024 return shadow(this, "openAction", objectSize(openAction) > 0 ? openAction : null); 37025 } 37026 get attachments() { 37027 const obj = this._catDict.get("Names"); 37028 let attachments = null; 37029 if (obj instanceof Dict && obj.has("EmbeddedFiles")) {
37030 const nameTree = new NameTree(obj.getRaw("EmbeddedFiles"), this.xref); 37031 for (const [key, value] of nameTree.getAll()) { 37032 const fs = new FileSpec(value, this.xref); 37033 if (!attachments) { 37034 attachments = Object.create(null); 37035 } 37036 attachments[stringToPDFString(key)] = fs.serializable; 37037 } 37038 } 37039 return shadow(this, "attachments", attachments); 37040 } 37041 get xfaImages() { 37042 const obj = this._catDict.get("Names"); 37043 let xfaImages = null; 37044 if (obj instanceof Dict && obj.has("XFAImages")) { 37045 const nameTree = new NameTree(obj.getRaw("XFAImages"), this.xref); 37046 for (const [key, value] of nameTree.getAll()) { 37047 if (!xfaImages) { 37048 xfaImages = new Dict(this.xref); 37049 } 37050 xfaImages.set(stringToPDFString(key), value); 37051 } 37052 } 37053 return shadow(this, "xfaImages", xfaImages); 37054 } 37055 _collectJavaScript() { 37056 const obj = this._catDict.get("Names"); 37057 let javaScript = null; 37058 function appendIfJavaScriptDict(name, jsDict) { 37059 if (!(jsDict instanceof Dict)) { 37060 return; 37061 } 37062 if (!isName(jsDict.get("S"), "JavaScript")) { 37063 return; 37064 } 37065 let js = jsDict.get("JS"); 37066 if (js instanceof BaseStream) { 37067 js = js.getString(); 37068 } else if (typeof js !== "string") { 37069 return; 37070 } 37071 js = stringToPDFString(js).replaceAll("\x00", ""); 37072 if (js) { 37073 (javaScript ||= new Map()).set(name, js); 37074 } 37075 } 37076 if (obj instanceof Dict && obj.has("JavaScript")) { 37077 const nameTree = new NameTree(obj.getRaw("JavaScript"), this.xref); 37078 for (const [key, value] of nameTree.getAll()) { 37079 appendIfJavaScriptDict(stringToPDFString(key), value); 37080 } 37081 } 37082 const openAction = this._catDict.get("OpenAction"); 37083 if (openAction) { 37084 appendIfJavaScriptDict("OpenAction", openAction); 37085 } 37086 return javaScript; 37087 } 37088 get jsActions() { 37089 const javaScript = this._collectJavaScript(); 37090 let actions = collectActions(this.xref, this._catDict, DocumentActionEventType); 37091 if (javaScript) { 37092 actions ||= Object.create(null); 37093 for (const [key, val] of javaScript) { 37094 if (key in actions) { 37095 actions[key].push(val); 37096 } else { 37097 actions[key] = [val]; 37098 } 37099 } 37100 } 37101 return shadow(this, "jsActions", actions); 37102 } 37103 async fontFallback(id, handler) { 37104 const translatedFonts = await Promise.all(this.fontCache); 37105 for (const translatedFont of translatedFonts) { 37106 if (translatedFont.loadedName === id) { 37107 translatedFont.fallback(handler); 37108 return; 37109 } 37110 } 37111 } 37112 async cleanup(manuallyTriggered = false) { 37113 clearGlobalCaches(); 37114 this.globalImageCache.clear(manuallyTriggered); 37115 this.pageKidsCountCache.clear(); 37116 this.pageIndexCache.clear(); 37117 this.pageDictCache.clear(); 37118 this.nonBlendModesSet.clear(); 37119 const translatedFonts = await Promise.all(this.fontCache); 37120 for (const { 37121 dict 37122 } of translatedFonts) { 37123 delete dict.cacheKey; 37124 } 37125 this.fontCache.clear(); 37126 this.builtInCMapCache.clear(); 37127 this.standardFontDataCache.clear(); 37128 this.systemFontCache.clear(); 37129 } 37130 async getPageDict(pageIndex) { 37131 const nodesToVisit = [this.toplevelPagesDict]; 37132 const visitedNodes = new RefSet(); 37133 const pagesRef = this._catDict.getRaw("Pages"); 37134 if (pagesRef instanceof Ref) { 37135 visitedNodes.put(pagesRef); 37136 } 37137 const xref = this.xref, 37138 pageKidsCountCache = this.pageKidsCountCache, 37139 pageIndexCache = this.pageIndexCache, 37140 pageDictCache = this.pageDictCache; 37141 let currentPageIndex = 0; 37142 while (nodesToVisit.length) { 37143 const currentNode = nodesToVisit.pop(); 37144 if (currentNode instanceof Ref) { 37145 const count = pageKidsCountCache.get(currentNode); 37146 if (count >= 0 && currentPageIndex + count <= pageIndex) { 37147 currentPageIndex += count; 37148 continue; 37149 } 37150 if (visitedNodes.has(currentNode)) { 37151 throw new FormatError("Pages tree contains circular reference."); 37152 } 37153 visitedNodes.put(currentNode); 37154 const obj = await (pageDictCache.get(currentNode) || xref.fetchAsync(currentNode)); 37155 if (obj instanceof Dict) { 37156 let type = obj.getRaw("Type"); 37157 if (type instanceof Ref) { 37158 type = await xref.fetchAsync(type); 37159 } 37160 if (isName(type, "Page") || !obj.has("Kids")) { 37161 if (!pageKidsCountCache.has(currentNode)) { 37162 pageKidsCountCache.put(currentNode, 1); 37163 } 37164 if (!pageIndexCache.has(currentNode)) { 37165 pageIndexCache.put(currentNode, currentPageIndex); 37166 } 37167 if (currentPageIndex === pageIndex) { 37168 return [obj, currentNode]; 37169 } 37170 currentPageIndex++; 37171 continue; 37172 } 37173 } 37174 nodesToVisit.push(obj); 37175 continue; 37176 } 37177 if (!(currentNode instanceof Dict)) { 37178 throw new FormatError("Page dictionary kid reference points to wrong type of object."); 37179 } 37180 const { 37181 objId 37182 } = currentNode; 37183 let count = currentNode.getRaw("Count"); 37184 if (count instanceof Ref) { 37185 count = await xref.fetchAsync(count); 37186 } 37187 if (Number.isInteger(count) && count >= 0) {
vendor: 14,715 bytes, lines 37188-37673
37188 if (objId && !pageKidsCountCache.has(objId)) { 37189 pageKidsCountCache.put(objId, count); 37190 } 37191 if (currentPageIndex + count <= pageIndex) { 37192 currentPageIndex += count; 37193 continue; 37194 } 37195 } 37196 let kids = currentNode.getRaw("Kids"); 37197 if (kids instanceof Ref) { 37198 kids = await xref.fetchAsync(kids); 37199 } 37200 if (!Array.isArray(kids)) { 37201 let type = currentNode.getRaw("Type"); 37202 if (type instanceof Ref) { 37203 type = await xref.fetchAsync(type); 37204 } 37205 if (isName(type, "Page") || !currentNode.has("Kids")) { 37206 if (currentPageIndex === pageIndex) { 37207 return [currentNode, null]; 37208 } 37209 currentPageIndex++; 37210 continue; 37211 } 37212 throw new FormatError("Page dictionary kids object is not an array."); 37213 } 37214 for (let last = kids.length - 1; last >= 0; last--) { 37215 const lastKid = kids[last]; 37216 nodesToVisit.push(lastKid); 37217 if (currentNode === this.toplevelPagesDict && lastKid instanceof Ref && !pageDictCache.has(lastKid)) { 37218 pageDictCache.put(lastKid, xref.fetchAsync(lastKid)); 37219 } 37220 } 37221 } 37222 throw new Error(`Page index ${pageIndex} not found.`); 37223 } 37224 async getAllPageDicts(recoveryMode = false) { 37225 const { 37226 ignoreErrors 37227 } = this.pdfManager.evaluatorOptions; 37228 const queue = [{ 37229 currentNode: this.toplevelPagesDict, 37230 posInKids: 0 37231 }]; 37232 const visitedNodes = new RefSet(); 37233 const pagesRef = this._catDict.getRaw("Pages"); 37234 if (pagesRef instanceof Ref) { 37235 visitedNodes.put(pagesRef); 37236 } 37237 const map = new Map(), 37238 xref = this.xref, 37239 pageIndexCache = this.pageIndexCache; 37240 let pageIndex = 0; 37241 function addPageDict(pageDict, pageRef) { 37242 if (pageRef && !pageIndexCache.has(pageRef)) { 37243 pageIndexCache.put(pageRef, pageIndex); 37244 } 37245 map.set(pageIndex++, [pageDict, pageRef]); 37246 } 37247 function addPageError(error) { 37248 if (error instanceof XRefEntryException && !recoveryMode) { 37249 throw error; 37250 } 37251 if (recoveryMode && ignoreErrors && pageIndex === 0) { 37252 warn(`getAllPageDicts - Skipping invalid first page: "${error}".`); 37253 error = Dict.empty; 37254 } 37255 map.set(pageIndex++, [error, null]); 37256 } 37257 while (queue.length > 0) { 37258 const queueItem = queue.at(-1); 37259 const { 37260 currentNode, 37261 posInKids 37262 } = queueItem; 37263 let kids = currentNode.getRaw("Kids"); 37264 if (kids instanceof Ref) { 37265 try { 37266 kids = await xref.fetchAsync(kids); 37267 } catch (ex) { 37268 addPageError(ex); 37269 break; 37270 } 37271 } 37272 if (!Array.isArray(kids)) { 37273 addPageError(new FormatError("Page dictionary kids object is not an array.")); 37274 break; 37275 } 37276 if (posInKids >= kids.length) { 37277 queue.pop(); 37278 continue; 37279 } 37280 const kidObj = kids[posInKids]; 37281 let obj; 37282 if (kidObj instanceof Ref) { 37283 if (visitedNodes.has(kidObj)) { 37284 addPageError(new FormatError("Pages tree contains circular reference.")); 37285 break; 37286 } 37287 visitedNodes.put(kidObj); 37288 try { 37289 obj = await xref.fetchAsync(kidObj); 37290 } catch (ex) { 37291 addPageError(ex); 37292 break; 37293 } 37294 } else { 37295 obj = kidObj; 37296 } 37297 if (!(obj instanceof Dict)) { 37298 addPageError(new FormatError("Page dictionary kid reference points to wrong type of object.")); 37299 break; 37300 } 37301 let type = obj.getRaw("Type"); 37302 if (type instanceof Ref) { 37303 try { 37304 type = await xref.fetchAsync(type); 37305 } catch (ex) { 37306 addPageError(ex); 37307 break; 37308 } 37309 } 37310 if (isName(type, "Page") || !obj.has("Kids")) { 37311 addPageDict(obj, kidObj instanceof Ref ? kidObj : null); 37312 } else { 37313 queue.push({ 37314 currentNode: obj, 37315 posInKids: 0 37316 }); 37317 } 37318 queueItem.posInKids++; 37319 } 37320 return map; 37321 } 37322 getPageIndex(pageRef) { 37323 const cachedPageIndex = this.pageIndexCache.get(pageRef); 37324 if (cachedPageIndex !== undefined) { 37325 return Promise.resolve(cachedPageIndex); 37326 } 37327 const xref = this.xref; 37328 function pagesBeforeRef(kidRef) { 37329 let total = 0, 37330 parentRef; 37331 return xref.fetchAsync(kidRef).then(function (node) { 37332 if (isRefsEqual(kidRef, pageRef) && !isDict(node, "Page") && !(node instanceof Dict && !node.has("Type") && node.has("Contents"))) { 37333 throw new FormatError("The reference does not point to a /Page dictionary."); 37334 } 37335 if (!node) { 37336 return null; 37337 } 37338 if (!(node instanceof Dict)) { 37339 throw new FormatError("Node must be a dictionary."); 37340 } 37341 parentRef = node.getRaw("Parent"); 37342 return node.getAsync("Parent"); 37343 }).then(function (parent) { 37344 if (!parent) { 37345 return null; 37346 } 37347 if (!(parent instanceof Dict)) { 37348 throw new FormatError("Parent must be a dictionary."); 37349 } 37350 return parent.getAsync("Kids"); 37351 }).then(function (kids) { 37352 if (!kids) { 37353 return null; 37354 } 37355 const kidPromises = []; 37356 let found = false; 37357 for (const kid of kids) { 37358 if (!(kid instanceof Ref)) { 37359 throw new FormatError("Kid must be a reference."); 37360 } 37361 if (isRefsEqual(kid, kidRef)) { 37362 found = true; 37363 break; 37364 } 37365 kidPromises.push(xref.fetchAsync(kid).then(function (obj) { 37366 if (!(obj instanceof Dict)) { 37367 throw new FormatError("Kid node must be a dictionary."); 37368 } 37369 if (obj.has("Count")) { 37370 total += obj.get("Count"); 37371 } else { 37372 total++; 37373 } 37374 })); 37375 } 37376 if (!found) { 37377 throw new FormatError("Kid reference not found in parent's kids."); 37378 } 37379 return Promise.all(kidPromises).then(function () { 37380 return [total, parentRef]; 37381 }); 37382 }); 37383 } 37384 let total = 0; 37385 const next = ref => pagesBeforeRef(ref).then(args => { 37386 if (!args) { 37387 this.pageIndexCache.put(pageRef, total); 37388 return total; 37389 } 37390 const [count, parentRef] = args; 37391 total += count; 37392 return next(parentRef); 37393 }); 37394 return next(pageRef); 37395 } 37396 get baseUrl() { 37397 const uri = this._catDict.get("URI"); 37398 if (uri instanceof Dict) { 37399 const base = uri.get("Base"); 37400 if (typeof base === "string") { 37401 const absoluteUrl = createValidAbsoluteUrl(base, null, { 37402 tryConvertEncoding: true 37403 }); 37404 if (absoluteUrl) { 37405 return shadow(this, "baseUrl", absoluteUrl.href); 37406 } 37407 } 37408 } 37409 return shadow(this, "baseUrl", this.pdfManager.docBaseUrl); 37410 } 37411 static parseDestDictionary({ 37412 destDict, 37413 resultObj, 37414 docBaseUrl = null, 37415 docAttachments = null 37416 }) { 37417 if (!(destDict instanceof Dict)) { 37418 warn("parseDestDictionary: `destDict` must be a dictionary."); 37419 return; 37420 } 37421 let action = destDict.get("A"), 37422 url, 37423 dest; 37424 if (!(action instanceof Dict)) { 37425 if (destDict.has("Dest")) { 37426 action = destDict.get("Dest"); 37427 } else { 37428 action = destDict.get("AA"); 37429 if (action instanceof Dict) { 37430 if (action.has("D")) { 37431 action = action.get("D"); 37432 } else if (action.has("U")) { 37433 action = action.get("U"); 37434 } 37435 } 37436 } 37437 } 37438 if (action instanceof Dict) { 37439 const actionType = action.get("S"); 37440 if (!(actionType instanceof Name)) { 37441 warn("parseDestDictionary: Invalid type in Action dictionary."); 37442 return; 37443 } 37444 const actionName = actionType.name; 37445 switch (actionName) { 37446 case "ResetForm": 37447 const flags = action.get("Flags"); 37448 const include = ((typeof flags === "number" ? flags : 0) & 1) === 0; 37449 const fields = []; 37450 const refs = []; 37451 for (const obj of action.get("Fields") || []) { 37452 if (obj instanceof Ref) { 37453 refs.push(obj.toString()); 37454 } else if (typeof obj === "string") { 37455 fields.push(stringToPDFString(obj)); 37456 } 37457 } 37458 resultObj.resetForm = { 37459 fields, 37460 refs, 37461 include 37462 }; 37463 break; 37464 case "URI": 37465 url = action.get("URI"); 37466 if (url instanceof Name) { 37467 url = "/" + url.name; 37468 } 37469 break; 37470 case "GoTo": 37471 dest = action.get("D"); 37472 break; 37473 case "Launch": 37474 case "GoToR": 37475 const urlDict = action.get("F"); 37476 if (urlDict instanceof Dict) { 37477 const fs = new FileSpec(urlDict, null, true); 37478 const { 37479 rawFilename 37480 } = fs.serializable; 37481 url = rawFilename; 37482 } else if (typeof urlDict === "string") { 37483 url = urlDict; 37484 } 37485 const remoteDest = fetchRemoteDest(action); 37486 if (remoteDest && typeof url === "string") { 37487 url = url.split("#", 1)[0] + "#" + remoteDest; 37488 } 37489 const newWindow = action.get("NewWindow"); 37490 if (typeof newWindow === "boolean") { 37491 resultObj.newWindow = newWindow; 37492 } 37493 break; 37494 case "GoToE": 37495 const target = action.get("T"); 37496 let attachment; 37497 if (docAttachments && target instanceof Dict) { 37498 const relationship = target.get("R"); 37499 const name = target.get("N"); 37500 if (isName(relationship, "C") && typeof name === "string") { 37501 attachment = docAttachments[stringToPDFString(name)]; 37502 } 37503 } 37504 if (attachment) { 37505 resultObj.attachment = attachment; 37506 const attachmentDest = fetchRemoteDest(action); 37507 if (attachmentDest) { 37508 resultObj.attachmentDest = attachmentDest; 37509 } 37510 } else { 37511 warn(`parseDestDictionary - unimplemented "GoToE" action.`); 37512 } 37513 break; 37514 case "Named": 37515 const namedAction = action.get("N"); 37516 if (namedAction instanceof Name) { 37517 resultObj.action = namedAction.name; 37518 } 37519 break; 37520 case "SetOCGState": 37521 const state = action.get("State"); 37522 const preserveRB = action.get("PreserveRB"); 37523 if (!Array.isArray(state) || state.length === 0) { 37524 break; 37525 } 37526 const stateArr = []; 37527 for (const elem of state) { 37528 if (elem instanceof Name) { 37529 switch (elem.name) { 37530 case "ON": 37531 case "OFF": 37532 case "Toggle": 37533 stateArr.push(elem.name); 37534 break; 37535 } 37536 } else if (elem instanceof Ref) { 37537 stateArr.push(elem.toString()); 37538 } 37539 } 37540 if (stateArr.length !== state.length) { 37541 break; 37542 } 37543 resultObj.setOCGState = { 37544 state: stateArr, 37545 preserveRB: typeof preserveRB === "boolean" ? preserveRB : true 37546 }; 37547 break; 37548 case "JavaScript": 37549 const jsAction = action.get("JS"); 37550 let js; 37551 if (jsAction instanceof BaseStream) { 37552 js = jsAction.getString(); 37553 } else if (typeof jsAction === "string") { 37554 js = jsAction; 37555 } 37556 const jsURL = js && recoverJsURL(stringToPDFString(js)); 37557 if (jsURL) { 37558 url = jsURL.url; 37559 resultObj.newWindow = jsURL.newWindow; 37560 break; 37561 } 37562 default: 37563 if (actionName === "JavaScript" || actionName === "SubmitForm") { 37564 break; 37565 } 37566 warn(`parseDestDictionary - unsupported action: "${actionName}".`); 37567 break; 37568 } 37569 } else if (destDict.has("Dest")) { 37570 dest = destDict.get("Dest"); 37571 } 37572 if (typeof url === "string") { 37573 const absoluteUrl = createValidAbsoluteUrl(url, docBaseUrl, { 37574 addDefaultProtocol: true, 37575 tryConvertEncoding: true 37576 }); 37577 if (absoluteUrl) { 37578 resultObj.url = absoluteUrl.href; 37579 } 37580 resultObj.unsafeUrl = url; 37581 } 37582 if (dest) { 37583 if (dest instanceof Name) { 37584 dest = dest.name; 37585 } 37586 if (typeof dest === "string") { 37587 resultObj.dest = stringToPDFString(dest); 37588 } else if (isValidExplicitDest(dest)) { 37589 resultObj.dest = dest; 37590 } 37591 } 37592 } 37593} 37594 37595;// ./src/core/object_loader.js 37596 37597 37598 37599 37600function mayHaveChildren(value) { 37601 return value instanceof Ref || value instanceof Dict || value instanceof BaseStream || Array.isArray(value); 37602} 37603function addChildren(node, nodesToVisit) { 37604 if (node instanceof Dict) { 37605 node = node.getRawValues(); 37606 } else if (node instanceof BaseStream) { 37607 node = node.dict.getRawValues(); 37608 } else if (!Array.isArray(node)) { 37609 return; 37610 } 37611 for (const rawValue of node) { 37612 if (mayHaveChildren(rawValue)) { 37613 nodesToVisit.push(rawValue); 37614 } 37615 } 37616} 37617class ObjectLoader { 37618 constructor(dict, keys, xref) { 37619 this.dict = dict; 37620 this.keys = keys; 37621 this.xref = xref; 37622 this.refSet = null; 37623 } 37624 async load() { 37625 if (this.xref.stream.isDataLoaded) { 37626 return undefined; 37627 } 37628 const { 37629 keys, 37630 dict 37631 } = this; 37632 this.refSet = new RefSet(); 37633 const nodesToVisit = []; 37634 for (const key of keys) { 37635 const rawValue = dict.getRaw(key); 37636 if (rawValue !== undefined) { 37637 nodesToVisit.push(rawValue); 37638 } 37639 } 37640 return this._walk(nodesToVisit); 37641 } 37642 async _walk(nodesToVisit) { 37643 const nodesToRevisit = []; 37644 const pendingRequests = []; 37645 while (nodesToVisit.length) { 37646 let currentNode = nodesToVisit.pop(); 37647 if (currentNode instanceof Ref) { 37648 if (this.refSet.has(currentNode)) { 37649 continue; 37650 } 37651 try { 37652 this.refSet.put(currentNode); 37653 currentNode = this.xref.fetch(currentNode); 37654 } catch (ex) { 37655 if (!(ex instanceof MissingDataException)) { 37656 warn(`ObjectLoader._walk - requesting all data: "${ex}".`); 37657 this.refSet = null; 37658 const { 37659 manager 37660 } = this.xref.stream; 37661 return manager.requestAllChunks(); 37662 } 37663 nodesToRevisit.push(currentNode); 37664 pendingRequests.push({ 37665 begin: ex.begin, 37666 end: ex.end 37667 }); 37668 } 37669 } 37670 if (currentNode instanceof BaseStream) { 37671 const baseStreams = currentNode.getBaseStreams(); 37672 if (baseStreams) { 37673 let foundMissingData = false;
vendor: 4,499 bytes, lines 37674-37843
37674 for (const stream of baseStreams) { 37675 if (stream.isDataLoaded) { 37676 continue; 37677 } 37678 foundMissingData = true; 37679 pendingRequests.push({ 37680 begin: stream.start, 37681 end: stream.end 37682 }); 37683 } 37684 if (foundMissingData) { 37685 nodesToRevisit.push(currentNode); 37686 } 37687 } 37688 } 37689 addChildren(currentNode, nodesToVisit); 37690 } 37691 if (pendingRequests.length) { 37692 await this.xref.stream.manager.requestRanges(pendingRequests); 37693 for (const node of nodesToRevisit) { 37694 if (node instanceof Ref) { 37695 this.refSet.remove(node); 37696 } 37697 } 37698 return this._walk(nodesToRevisit); 37699 } 37700 this.refSet = null; 37701 return undefined; 37702 } 37703} 37704 37705;// ./src/core/xfa/symbol_utils.js 37706const $acceptWhitespace = Symbol(); 37707const $addHTML = Symbol(); 37708const $appendChild = Symbol(); 37709const $childrenToHTML = Symbol(); 37710const $clean = Symbol(); 37711const $cleanPage = Symbol(); 37712const $cleanup = Symbol(); 37713const $clone = Symbol(); 37714const $consumed = Symbol(); 37715const $content = Symbol("content"); 37716const $data = Symbol("data"); 37717const $dump = Symbol(); 37718const $extra = Symbol("extra"); 37719const $finalize = Symbol(); 37720const $flushHTML = Symbol(); 37721const $getAttributeIt = Symbol(); 37722const $getAttributes = Symbol(); 37723const $getAvailableSpace = Symbol(); 37724const $getChildrenByClass = Symbol(); 37725const $getChildrenByName = Symbol(); 37726const $getChildrenByNameIt = Symbol(); 37727const $getDataValue = Symbol(); 37728const $getExtra = Symbol(); 37729const $getRealChildrenByNameIt = Symbol(); 37730const $getChildren = Symbol(); 37731const $getContainedChildren = Symbol(); 37732const $getNextPage = Symbol(); 37733const $getSubformParent = Symbol(); 37734const $getParent = Symbol(); 37735const $getTemplateRoot = Symbol(); 37736const $globalData = Symbol(); 37737const $hasSettableValue = Symbol(); 37738const $ids = Symbol(); 37739const $indexOf = Symbol(); 37740const $insertAt = Symbol(); 37741const $isCDATAXml = Symbol(); 37742const $isBindable = Symbol(); 37743const $isDataValue = Symbol(); 37744const $isDescendent = Symbol(); 37745const $isNsAgnostic = Symbol(); 37746const $isSplittable = Symbol(); 37747const $isThereMoreWidth = Symbol(); 37748const $isTransparent = Symbol(); 37749const $isUsable = Symbol(); 37750const $lastAttribute = Symbol(); 37751const $namespaceId = Symbol("namespaceId"); 37752const $nodeName = Symbol("nodeName"); 37753const $nsAttributes = Symbol(); 37754const $onChild = Symbol(); 37755const $onChildCheck = Symbol(); 37756const $onText = Symbol(); 37757const $pushGlyphs = Symbol(); 37758const $popPara = Symbol(); 37759const $pushPara = Symbol(); 37760const $removeChild = Symbol(); 37761const $root = Symbol("root"); 37762const $resolvePrototypes = Symbol(); 37763const $searchNode = Symbol(); 37764const $setId = Symbol(); 37765const $setSetAttributes = Symbol(); 37766const $setValue = Symbol(); 37767const $tabIndex = Symbol(); 37768const $text = Symbol(); 37769const $toPages = Symbol(); 37770const $toHTML = Symbol(); 37771const $toString = Symbol(); 37772const $toStyle = Symbol(); 37773const $uid = Symbol("uid"); 37774 37775;// ./src/core/xfa/namespaces.js 37776const $buildXFAObject = Symbol(); 37777const NamespaceIds = { 37778 config: { 37779 id: 0, 37780 check: ns => ns.startsWith("http://www.xfa.org/schema/xci/") 37781 }, 37782 connectionSet: { 37783 id: 1, 37784 check: ns => ns.startsWith("http://www.xfa.org/schema/xfa-connection-set/") 37785 }, 37786 datasets: { 37787 id: 2, 37788 check: ns => ns.startsWith("http://www.xfa.org/schema/xfa-data/") 37789 }, 37790 form: { 37791 id: 3, 37792 check: ns => ns.startsWith("http://www.xfa.org/schema/xfa-form/") 37793 }, 37794 localeSet: { 37795 id: 4, 37796 check: ns => ns.startsWith("http://www.xfa.org/schema/xfa-locale-set/") 37797 }, 37798 pdf: { 37799 id: 5, 37800 check: ns => ns === "http://ns.adobe.com/xdp/pdf/" 37801 }, 37802 signature: { 37803 id: 6, 37804 check: ns => ns === "http://www.w3.org/2000/09/xmldsig#" 37805 }, 37806 sourceSet: { 37807 id: 7, 37808 check: ns => ns.startsWith("http://www.xfa.org/schema/xfa-source-set/") 37809 }, 37810 stylesheet: { 37811 id: 8, 37812 check: ns => ns === "http://www.w3.org/1999/XSL/Transform" 37813 }, 37814 template: { 37815 id: 9, 37816 check: ns => ns.startsWith("http://www.xfa.org/schema/xfa-template/") 37817 }, 37818 xdc: { 37819 id: 10, 37820 check: ns => ns.startsWith("http://www.xfa.org/schema/xdc/") 37821 }, 37822 xdp: { 37823 id: 11, 37824 check: ns => ns === "http://ns.adobe.com/xdp/" 37825 }, 37826 xfdf: { 37827 id: 12, 37828 check: ns => ns === "http://ns.adobe.com/xfdf/" 37829 }, 37830 xhtml: { 37831 id: 13, 37832 check: ns => ns === "http://www.w3.org/1999/xhtml" 37833 }, 37834 xmpmeta: { 37835 id: 14, 37836 check: ns => ns === "http://ns.adobe.com/xmpmeta/" 37837 } 37838}; 37839 37840;// ./src/core/xfa/utils.js 37841 37842const dimConverters = { 37843 pt: x => x,
vendor: 10,488 bytes, lines 37844-38267
37844 cm: x => x / 2.54 * 72, 37845 mm: x => x / (10 * 2.54) * 72, 37846 in: x => x * 72, 37847 px: x => x 37848}; 37849const measurementPattern = /([+-]?\d+\.?\d*)(.*)/; 37850function stripQuotes(str) { 37851 if (str.startsWith("'") || str.startsWith('"')) { 37852 return str.slice(1, -1); 37853 } 37854 return str; 37855} 37856function getInteger({ 37857 data, 37858 defaultValue, 37859 validate 37860}) { 37861 if (!data) { 37862 return defaultValue; 37863 } 37864 data = data.trim(); 37865 const n = parseInt(data, 10); 37866 if (!isNaN(n) && validate(n)) { 37867 return n; 37868 } 37869 return defaultValue; 37870} 37871function getFloat({ 37872 data, 37873 defaultValue, 37874 validate 37875}) { 37876 if (!data) { 37877 return defaultValue; 37878 } 37879 data = data.trim(); 37880 const n = parseFloat(data); 37881 if (!isNaN(n) && validate(n)) { 37882 return n; 37883 } 37884 return defaultValue; 37885} 37886function getKeyword({ 37887 data, 37888 defaultValue, 37889 validate 37890}) { 37891 if (!data) { 37892 return defaultValue; 37893 } 37894 data = data.trim(); 37895 if (validate(data)) { 37896 return data; 37897 } 37898 return defaultValue; 37899} 37900function getStringOption(data, options) { 37901 return getKeyword({ 37902 data, 37903 defaultValue: options[0], 37904 validate: k => options.includes(k) 37905 }); 37906} 37907function getMeasurement(str, def = "0") { 37908 def ||= "0"; 37909 if (!str) { 37910 return getMeasurement(def); 37911 } 37912 const match = str.trim().match(measurementPattern); 37913 if (!match) { 37914 return getMeasurement(def); 37915 } 37916 const [, valueStr, unit] = match; 37917 const value = parseFloat(valueStr); 37918 if (isNaN(value)) { 37919 return getMeasurement(def); 37920 } 37921 if (value === 0) { 37922 return 0; 37923 } 37924 const conv = dimConverters[unit]; 37925 if (conv) { 37926 return conv(value); 37927 } 37928 return value; 37929} 37930function getRatio(data) { 37931 if (!data) { 37932 return { 37933 num: 1, 37934 den: 1 37935 }; 37936 } 37937 const ratio = data.trim().split(/\s*:\s*/).map(x => parseFloat(x)).filter(x => !isNaN(x)); 37938 if (ratio.length === 1) { 37939 ratio.push(1); 37940 } 37941 if (ratio.length === 0) { 37942 return { 37943 num: 1, 37944 den: 1 37945 }; 37946 } 37947 const [num, den] = ratio; 37948 return { 37949 num, 37950 den 37951 }; 37952} 37953function getRelevant(data) { 37954 if (!data) { 37955 return []; 37956 } 37957 return data.trim().split(/\s+/).map(e => ({ 37958 excluded: e[0] === "-", 37959 viewname: e.substring(1) 37960 })); 37961} 37962function getColor(data, def = [0, 0, 0]) { 37963 let [r, g, b] = def; 37964 if (!data) { 37965 return { 37966 r, 37967 g, 37968 b 37969 }; 37970 } 37971 const color = data.trim().split(/\s*,\s*/).map(c => Math.min(Math.max(0, parseInt(c.trim(), 10)), 255)).map(c => isNaN(c) ? 0 : c); 37972 if (color.length < 3) { 37973 return { 37974 r, 37975 g, 37976 b 37977 }; 37978 } 37979 [r, g, b] = color; 37980 return { 37981 r, 37982 g, 37983 b 37984 }; 37985} 37986function getBBox(data) { 37987 const def = -1; 37988 if (!data) { 37989 return { 37990 x: def, 37991 y: def, 37992 width: def, 37993 height: def 37994 }; 37995 } 37996 const bbox = data.trim().split(/\s*,\s*/).map(m => getMeasurement(m, "-1")); 37997 if (bbox.length < 4 || bbox[2] < 0 || bbox[3] < 0) { 37998 return { 37999 x: def, 38000 y: def, 38001 width: def, 38002 height: def 38003 }; 38004 } 38005 const [x, y, width, height] = bbox; 38006 return { 38007 x, 38008 y, 38009 width, 38010 height 38011 }; 38012} 38013class HTMLResult { 38014 static get FAILURE() { 38015 return shadow(this, "FAILURE", new HTMLResult(false, null, null, null)); 38016 } 38017 static get EMPTY() { 38018 return shadow(this, "EMPTY", new HTMLResult(true, null, null, null)); 38019 } 38020 constructor(success, html, bbox, breakNode) { 38021 this.success = success; 38022 this.html = html; 38023 this.bbox = bbox; 38024 this.breakNode = breakNode; 38025 } 38026 isBreak() { 38027 return !!this.breakNode; 38028 } 38029 static breakNode(node) { 38030 return new HTMLResult(false, null, null, node); 38031 } 38032 static success(html, bbox = null) { 38033 return new HTMLResult(true, html, bbox, null); 38034 } 38035} 38036 38037;// ./src/core/xfa/fonts.js 38038 38039 38040 38041class FontFinder { 38042 constructor(pdfFonts) { 38043 this.fonts = new Map(); 38044 this.cache = new Map(); 38045 this.warned = new Set(); 38046 this.defaultFont = null; 38047 this.add(pdfFonts); 38048 } 38049 add(pdfFonts, reallyMissingFonts = null) { 38050 for (const pdfFont of pdfFonts) { 38051 this.addPdfFont(pdfFont); 38052 } 38053 for (const pdfFont of this.fonts.values()) { 38054 if (!pdfFont.regular) { 38055 pdfFont.regular = pdfFont.italic || pdfFont.bold || pdfFont.bolditalic; 38056 } 38057 } 38058 if (!reallyMissingFonts || reallyMissingFonts.size === 0) { 38059 return; 38060 } 38061 const myriad = this.fonts.get("PdfJS-Fallback-PdfJS-XFA"); 38062 for (const missing of reallyMissingFonts) { 38063 this.fonts.set(missing, myriad); 38064 } 38065 } 38066 addPdfFont(pdfFont) { 38067 const cssFontInfo = pdfFont.cssFontInfo; 38068 const name = cssFontInfo.fontFamily; 38069 let font = this.fonts.get(name); 38070 if (!font) { 38071 font = Object.create(null); 38072 this.fonts.set(name, font); 38073 if (!this.defaultFont) { 38074 this.defaultFont = font; 38075 } 38076 } 38077 let property = ""; 38078 const fontWeight = parseFloat(cssFontInfo.fontWeight); 38079 if (parseFloat(cssFontInfo.italicAngle) !== 0) { 38080 property = fontWeight >= 700 ? "bolditalic" : "italic"; 38081 } else if (fontWeight >= 700) { 38082 property = "bold"; 38083 } 38084 if (!property) { 38085 if (pdfFont.name.includes("Bold") || pdfFont.psName?.includes("Bold")) { 38086 property = "bold"; 38087 } 38088 if (pdfFont.name.includes("Italic") || pdfFont.name.endsWith("It") || pdfFont.psName?.includes("Italic") || pdfFont.psName?.endsWith("It")) { 38089 property += "italic"; 38090 } 38091 } 38092 if (!property) { 38093 property = "regular"; 38094 } 38095 font[property] = pdfFont; 38096 } 38097 getDefault() { 38098 return this.defaultFont; 38099 } 38100 find(fontName, mustWarn = true) { 38101 let font = this.fonts.get(fontName) || this.cache.get(fontName); 38102 if (font) { 38103 return font; 38104 } 38105 const pattern = /,|-|_| |bolditalic|bold|italic|regular|it/gi; 38106 let name = fontName.replaceAll(pattern, ""); 38107 font = this.fonts.get(name); 38108 if (font) { 38109 this.cache.set(fontName, font); 38110 return font; 38111 } 38112 name = name.toLowerCase(); 38113 const maybe = []; 38114 for (const [family, pdfFont] of this.fonts.entries()) { 38115 if (family.replaceAll(pattern, "").toLowerCase().startsWith(name)) { 38116 maybe.push(pdfFont); 38117 } 38118 } 38119 if (maybe.length === 0) { 38120 for (const [, pdfFont] of this.fonts.entries()) { 38121 if (pdfFont.regular.name?.replaceAll(pattern, "").toLowerCase().startsWith(name)) { 38122 maybe.push(pdfFont); 38123 } 38124 } 38125 } 38126 if (maybe.length === 0) { 38127 name = name.replaceAll(/psmt|mt/gi, ""); 38128 for (const [family, pdfFont] of this.fonts.entries()) { 38129 if (family.replaceAll(pattern, "").toLowerCase().startsWith(name)) { 38130 maybe.push(pdfFont); 38131 } 38132 } 38133 } 38134 if (maybe.length === 0) { 38135 for (const pdfFont of this.fonts.values()) { 38136 if (pdfFont.regular.name?.replaceAll(pattern, "").toLowerCase().startsWith(name)) { 38137 maybe.push(pdfFont); 38138 } 38139 } 38140 } 38141 if (maybe.length >= 1) { 38142 if (maybe.length !== 1 && mustWarn) { 38143 warn(`XFA - Too many choices to guess the correct font: ${fontName}`); 38144 } 38145 this.cache.set(fontName, maybe[0]); 38146 return maybe[0]; 38147 } 38148 if (mustWarn && !this.warned.has(fontName)) { 38149 this.warned.add(fontName); 38150 warn(`XFA - Cannot find the font: ${fontName}`); 38151 } 38152 return null; 38153 } 38154} 38155function selectFont(xfaFont, typeface) { 38156 if (xfaFont.posture === "italic") { 38157 if (xfaFont.weight === "bold") { 38158 return typeface.bolditalic; 38159 } 38160 return typeface.italic; 38161 } else if (xfaFont.weight === "bold") { 38162 return typeface.bold; 38163 } 38164 return typeface.regular; 38165} 38166function fonts_getMetrics(xfaFont, real = false) { 38167 let pdfFont = null; 38168 if (xfaFont) { 38169 const name = stripQuotes(xfaFont.typeface); 38170 const typeface = xfaFont[$globalData].fontFinder.find(name); 38171 pdfFont = selectFont(xfaFont, typeface); 38172 } 38173 if (!pdfFont) { 38174 return { 38175 lineHeight: 12, 38176 lineGap: 2, 38177 lineNoGap: 10 38178 }; 38179 } 38180 const size = xfaFont.size || 10; 38181 const lineHeight = pdfFont.lineHeight ? Math.max(real ? 0 : 1.2, pdfFont.lineHeight) : 1.2; 38182 const lineGap = pdfFont.lineGap === undefined ? 0.2 : pdfFont.lineGap; 38183 return { 38184 lineHeight: lineHeight * size, 38185 lineGap: lineGap * size, 38186 lineNoGap: Math.max(1, lineHeight - lineGap) * size 38187 }; 38188} 38189 38190;// ./src/core/xfa/text.js 38191 38192const WIDTH_FACTOR = 1.02; 38193class FontInfo { 38194 constructor(xfaFont, margin, lineHeight, fontFinder) { 38195 this.lineHeight = lineHeight; 38196 this.paraMargin = margin || { 38197 top: 0, 38198 bottom: 0, 38199 left: 0, 38200 right: 0 38201 }; 38202 if (!xfaFont) { 38203 [this.pdfFont, this.xfaFont] = this.defaultFont(fontFinder); 38204 return; 38205 } 38206 this.xfaFont = { 38207 typeface: xfaFont.typeface, 38208 posture: xfaFont.posture, 38209 weight: xfaFont.weight, 38210 size: xfaFont.size, 38211 letterSpacing: xfaFont.letterSpacing 38212 }; 38213 const typeface = fontFinder.find(xfaFont.typeface); 38214 if (!typeface) { 38215 [this.pdfFont, this.xfaFont] = this.defaultFont(fontFinder); 38216 return; 38217 } 38218 this.pdfFont = selectFont(xfaFont, typeface); 38219 if (!this.pdfFont) { 38220 [this.pdfFont, this.xfaFont] = this.defaultFont(fontFinder); 38221 } 38222 } 38223 defaultFont(fontFinder) { 38224 const font = fontFinder.find("Helvetica", false) || fontFinder.find("Myriad Pro", false) || fontFinder.find("Arial", false) || fontFinder.getDefault(); 38225 if (font?.regular) { 38226 const pdfFont = font.regular; 38227 const info = pdfFont.cssFontInfo; 38228 const xfaFont = { 38229 typeface: info.fontFamily, 38230 posture: "normal", 38231 weight: "normal", 38232 size: 10, 38233 letterSpacing: 0 38234 }; 38235 return [pdfFont, xfaFont]; 38236 } 38237 const xfaFont = { 38238 typeface: "Courier", 38239 posture: "normal", 38240 weight: "normal", 38241 size: 10, 38242 letterSpacing: 0 38243 }; 38244 return [null, xfaFont]; 38245 } 38246} 38247class FontSelector { 38248 constructor(defaultXfaFont, defaultParaMargin, defaultLineHeight, fontFinder) { 38249 this.fontFinder = fontFinder; 38250 this.stack = [new FontInfo(defaultXfaFont, defaultParaMargin, defaultLineHeight, fontFinder)]; 38251 } 38252 pushData(xfaFont, margin, lineHeight) { 38253 const lastFont = this.stack.at(-1); 38254 for (const name of ["typeface", "posture", "weight", "size", "letterSpacing"]) { 38255 if (!xfaFont[name]) { 38256 xfaFont[name] = lastFont.xfaFont[name]; 38257 } 38258 } 38259 for (const name of ["top", "bottom", "left", "right"]) { 38260 if (isNaN(margin[name])) { 38261 margin[name] = lastFont.paraMargin[name]; 38262 } 38263 } 38264 const fontInfo = new FontInfo(xfaFont, margin, lineHeight || lastFont.lineHeight, this.fontFinder); 38265 if (!fontInfo.pdfFont) { 38266 fontInfo.pdfFont = lastFont.pdfFont; 38267 }
vendor: 7,962 bytes, lines 38267-38527
38267 38268 this.stack.push(fontInfo); 38269 } 38270 popFont() { 38271 this.stack.pop(); 38272 } 38273 topFont() { 38274 return this.stack.at(-1); 38275 } 38276} 38277class TextMeasure { 38278 constructor(defaultXfaFont, defaultParaMargin, defaultLineHeight, fonts) { 38279 this.glyphs = []; 38280 this.fontSelector = new FontSelector(defaultXfaFont, defaultParaMargin, defaultLineHeight, fonts); 38281 this.extraHeight = 0; 38282 } 38283 pushData(xfaFont, margin, lineHeight) { 38284 this.fontSelector.pushData(xfaFont, margin, lineHeight); 38285 } 38286 popFont(xfaFont) { 38287 return this.fontSelector.popFont(); 38288 } 38289 addPara() { 38290 const lastFont = this.fontSelector.topFont(); 38291 this.extraHeight += lastFont.paraMargin.top + lastFont.paraMargin.bottom; 38292 } 38293 addString(str) { 38294 if (!str) { 38295 return; 38296 } 38297 const lastFont = this.fontSelector.topFont(); 38298 const fontSize = lastFont.xfaFont.size; 38299 if (lastFont.pdfFont) { 38300 const letterSpacing = lastFont.xfaFont.letterSpacing; 38301 const pdfFont = lastFont.pdfFont; 38302 const fontLineHeight = pdfFont.lineHeight || 1.2; 38303 const lineHeight = lastFont.lineHeight || Math.max(1.2, fontLineHeight) * fontSize; 38304 const lineGap = pdfFont.lineGap === undefined ? 0.2 : pdfFont.lineGap; 38305 const noGap = fontLineHeight - lineGap; 38306 const firstLineHeight = Math.max(1, noGap) * fontSize; 38307 const scale = fontSize / 1000; 38308 const fallbackWidth = pdfFont.defaultWidth || pdfFont.charsToGlyphs(" ")[0].width; 38309 for (const line of str.split(/[\u2029\n]/)) { 38310 const encodedLine = pdfFont.encodeString(line).join(""); 38311 const glyphs = pdfFont.charsToGlyphs(encodedLine); 38312 for (const glyph of glyphs) { 38313 const width = glyph.width || fallbackWidth; 38314 this.glyphs.push([width * scale + letterSpacing, lineHeight, firstLineHeight, glyph.unicode, false]); 38315 } 38316 this.glyphs.push([0, 0, 0, "\n", true]); 38317 } 38318 this.glyphs.pop(); 38319 return; 38320 } 38321 for (const line of str.split(/[\u2029\n]/)) { 38322 for (const char of line.split("")) { 38323 this.glyphs.push([fontSize, 1.2 * fontSize, fontSize, char, false]); 38324 } 38325 this.glyphs.push([0, 0, 0, "\n", true]); 38326 } 38327 this.glyphs.pop(); 38328 } 38329 compute(maxWidth) { 38330 let lastSpacePos = -1, 38331 lastSpaceWidth = 0, 38332 width = 0, 38333 height = 0, 38334 currentLineWidth = 0, 38335 currentLineHeight = 0; 38336 let isBroken = false; 38337 let isFirstLine = true; 38338 for (let i = 0, ii = this.glyphs.length; i < ii; i++) { 38339 const [glyphWidth, lineHeight, firstLineHeight, char, isEOL] = this.glyphs[i]; 38340 const isSpace = char === " "; 38341 const glyphHeight = isFirstLine ? firstLineHeight : lineHeight; 38342 if (isEOL) { 38343 width = Math.max(width, currentLineWidth); 38344 currentLineWidth = 0; 38345 height += currentLineHeight; 38346 currentLineHeight = glyphHeight; 38347 lastSpacePos = -1; 38348 lastSpaceWidth = 0; 38349 isFirstLine = false; 38350 continue; 38351 } 38352 if (isSpace) { 38353 if (currentLineWidth + glyphWidth > maxWidth) { 38354 width = Math.max(width, currentLineWidth); 38355 currentLineWidth = 0; 38356 height += currentLineHeight; 38357 currentLineHeight = glyphHeight; 38358 lastSpacePos = -1; 38359 lastSpaceWidth = 0; 38360 isBroken = true; 38361 isFirstLine = false; 38362 } else { 38363 currentLineHeight = Math.max(glyphHeight, currentLineHeight); 38364 lastSpaceWidth = currentLineWidth; 38365 currentLineWidth += glyphWidth; 38366 lastSpacePos = i; 38367 } 38368 continue; 38369 } 38370 if (currentLineWidth + glyphWidth > maxWidth) { 38371 height += currentLineHeight; 38372 currentLineHeight = glyphHeight; 38373 if (lastSpacePos !== -1) { 38374 i = lastSpacePos; 38375 width = Math.max(width, lastSpaceWidth); 38376 currentLineWidth = 0; 38377 lastSpacePos = -1; 38378 lastSpaceWidth = 0; 38379 } else { 38380 width = Math.max(width, currentLineWidth); 38381 currentLineWidth = glyphWidth; 38382 } 38383 isBroken = true; 38384 isFirstLine = false; 38385 continue; 38386 } 38387 currentLineWidth += glyphWidth; 38388 currentLineHeight = Math.max(glyphHeight, currentLineHeight); 38389 } 38390 width = Math.max(width, currentLineWidth); 38391 height += currentLineHeight + this.extraHeight; 38392 return { 38393 width: WIDTH_FACTOR * width, 38394 height, 38395 isBroken 38396 }; 38397 } 38398} 38399 38400;// ./src/core/xfa/som.js 38401 38402 38403const namePattern = /^[^.[]+/; 38404const indexPattern = /^[^\]]+/; 38405const operators = { 38406 dot: 0, 38407 dotDot: 1, 38408 dotHash: 2, 38409 dotBracket: 3, 38410 dotParen: 4 38411}; 38412const shortcuts = new Map([["$data", (root, current) => root.datasets ? root.datasets.data : root], ["$record", (root, current) => (root.datasets ? root.datasets.data : root)[$getChildren]()[0]], ["$template", (root, current) => root.template], ["$connectionSet", (root, current) => root.connectionSet], ["$form", (root, current) => root.form], ["$layout", (root, current) => root.layout], ["$host", (root, current) => root.host], ["$dataWindow", (root, current) => root.dataWindow], ["$event", (root, current) => root.event], ["!", (root, current) => root.datasets], ["$xfa", (root, current) => root], ["xfa", (root, current) => root], ["$", (root, current) => current]]); 38413const somCache = new WeakMap(); 38414function parseIndex(index) { 38415 index = index.trim(); 38416 if (index === "*") { 38417 return Infinity; 38418 } 38419 return parseInt(index, 10) || 0; 38420} 38421function parseExpression(expr, dotDotAllowed, noExpr = true) { 38422 let match = expr.match(namePattern); 38423 if (!match) { 38424 return null; 38425 } 38426 let [name] = match; 38427 const parsed = [{ 38428 name, 38429 cacheName: "." + name, 38430 index: 0, 38431 js: null, 38432 formCalc: null, 38433 operator: operators.dot 38434 }]; 38435 let pos = name.length; 38436 while (pos < expr.length) { 38437 const spos = pos; 38438 const char = expr.charAt(pos++); 38439 if (char === "[") { 38440 match = expr.slice(pos).match(indexPattern); 38441 if (!match) { 38442 warn("XFA - Invalid index in SOM expression"); 38443 return null; 38444 } 38445 parsed.at(-1).index = parseIndex(match[0]); 38446 pos += match[0].length + 1; 38447 continue; 38448 } 38449 let operator; 38450 switch (expr.charAt(pos)) { 38451 case ".": 38452 if (!dotDotAllowed) { 38453 return null; 38454 } 38455 pos++; 38456 operator = operators.dotDot; 38457 break; 38458 case "#": 38459 pos++; 38460 operator = operators.dotHash; 38461 break; 38462 case "[": 38463 if (noExpr) { 38464 warn("XFA - SOM expression contains a FormCalc subexpression which is not supported for now."); 38465 return null; 38466 } 38467 operator = operators.dotBracket; 38468 break; 38469 case "(": 38470 if (noExpr) { 38471 warn("XFA - SOM expression contains a JavaScript subexpression which is not supported for now."); 38472 return null; 38473 } 38474 operator = operators.dotParen; 38475 break; 38476 default: 38477 operator = operators.dot; 38478 break; 38479 } 38480 match = expr.slice(pos).match(namePattern); 38481 if (!match) { 38482 break; 38483 } 38484 [name] = match; 38485 pos += name.length; 38486 parsed.push({ 38487 name, 38488 cacheName: expr.slice(spos, pos), 38489 operator, 38490 index: 0, 38491 js: null, 38492 formCalc: null 38493 }); 38494 } 38495 return parsed; 38496} 38497function searchNode(root, container, expr, dotDotAllowed = true, useCache = true) { 38498 const parsed = parseExpression(expr, dotDotAllowed); 38499 if (!parsed) { 38500 return null; 38501 } 38502 const fn = shortcuts.get(parsed[0].name); 38503 let i = 0; 38504 let isQualified; 38505 if (fn) { 38506 isQualified = true; 38507 root = [fn(root, container)]; 38508 i = 1; 38509 } else { 38510 isQualified = container === null; 38511 root = [container || root]; 38512 } 38513 for (let ii = parsed.length; i < ii; i++) { 38514 const { 38515 name, 38516 cacheName, 38517 operator, 38518 index 38519 } = parsed[i]; 38520 const nodes = []; 38521 for (const node of root) { 38522 if (!node.isXFAObject) { 38523 continue; 38524 } 38525 let children, cached; 38526 if (useCache) { 38527 cached = somCache.get
vendor: 2,760 bytes, lines 38527-38633
38527(node); 38528 if (!cached) { 38529 cached = new Map(); 38530 somCache.set(node, cached); 38531 } 38532 children = cached.get(cacheName); 38533 } 38534 if (!children) { 38535 switch (operator) { 38536 case operators.dot: 38537 children = node[$getChildrenByName](name, false); 38538 break; 38539 case operators.dotDot: 38540 children = node[$getChildrenByName](name, true); 38541 break; 38542 case operators.dotHash: 38543 children = node[$getChildrenByClass](name); 38544 children = children.isXFAObjectArray ? children.children : [children]; 38545 break; 38546 default: 38547 break; 38548 } 38549 if (useCache) { 38550 cached.set(cacheName, children); 38551 } 38552 } 38553 if (children.length > 0) { 38554 nodes.push(children); 38555 } 38556 } 38557 if (nodes.length === 0 && !isQualified && i === 0) { 38558 const parent = container[$getParent](); 38559 container = parent; 38560 if (!container) { 38561 return null; 38562 } 38563 i = -1; 38564 root = [container]; 38565 continue; 38566 } 38567 root = isFinite(index) ? nodes.filter(node => index < node.length).map(node => node[index]) : nodes.flat(); 38568 } 38569 if (root.length === 0) { 38570 return null; 38571 } 38572 return root; 38573} 38574function createDataNode(root, container, expr) { 38575 const parsed = parseExpression(expr); 38576 if (!parsed) { 38577 return null; 38578 } 38579 if (parsed.some(x => x.operator === operators.dotDot)) { 38580 return null; 38581 } 38582 const fn = shortcuts.get(parsed[0].name); 38583 let i = 0; 38584 if (fn) { 38585 root = fn(root, container); 38586 i = 1; 38587 } else { 38588 root = container || root; 38589 } 38590 for (let ii = parsed.length; i < ii; i++) { 38591 const { 38592 name, 38593 operator, 38594 index 38595 } = parsed[i]; 38596 if (!isFinite(index)) { 38597 parsed[i].index = 0; 38598 return root.createNodes(parsed.slice(i)); 38599 } 38600 let children; 38601 switch (operator) { 38602 case operators.dot: 38603 children = root[$getChildrenByName](name, false); 38604 break; 38605 case operators.dotDot: 38606 children = root[$getChildrenByName](name, true); 38607 break; 38608 case operators.dotHash: 38609 children = root[$getChildrenByClass](name); 38610 children = children.isXFAObjectArray ? children.children : [children]; 38611 break; 38612 default: 38613 break; 38614 } 38615 if (children.length === 0) { 38616 return root.createNodes(parsed.slice(i)); 38617 } 38618 if (index < children.length) { 38619 const child = children[index]; 38620 if (!child.isXFAObject) { 38621 warn(`XFA - Cannot create a node.`); 38622 return null; 38623 } 38624 root = child; 38625 } else { 38626 parsed[i].index = index - children.length; 38627 return root.createNodes(parsed.slice(i)); 38628 } 38629 } 38630 return null; 38631} 38632 38633;// ./src/core/xfa/xfa_object.js
vendor: 21,619 bytes, lines 38633-39446
38633 38634 38635 38636 38637 38638 38639 38640const _applyPrototype = Symbol(); 38641const _attributes = Symbol(); 38642const _attributeNames = Symbol(); 38643const _children = Symbol("_children"); 38644const _cloneAttribute = Symbol(); 38645const _dataValue = Symbol(); 38646const _defaultValue = Symbol(); 38647const _filteredChildrenGenerator = Symbol(); 38648const _getPrototype = Symbol(); 38649const _getUnsetAttributes = Symbol(); 38650const _hasChildren = Symbol(); 38651const _max = Symbol(); 38652const _options = Symbol(); 38653const _parent = Symbol("parent"); 38654const _resolvePrototypesHelper = Symbol(); 38655const _setAttributes = Symbol(); 38656const _validator = Symbol(); 38657let uid = 0; 38658const NS_DATASETS = NamespaceIds.datasets.id; 38659class XFAObject { 38660 constructor(nsId, name, hasChildren = false) { 38661 this[$namespaceId] = nsId; 38662 this[$nodeName] = name; 38663 this[_hasChildren] = hasChildren; 38664 this[_parent] = null; 38665 this[_children] = []; 38666 this[$uid] = `${name}${uid++}`; 38667 this[$globalData] = null; 38668 } 38669 get isXFAObject() { 38670 return true; 38671 } 38672 get isXFAObjectArray() { 38673 return false; 38674 } 38675 createNodes(path) { 38676 let root = this, 38677 node = null; 38678 for (const { 38679 name, 38680 index 38681 } of path) { 38682 for (let i = 0, ii = isFinite(index) ? index : 0; i <= ii; i++) { 38683 const nsId = root[$namespaceId] === NS_DATASETS ? -1 : root[$namespaceId]; 38684 node = new XmlObject(nsId, name); 38685 root[$appendChild](node); 38686 } 38687 root = node; 38688 } 38689 return node; 38690 } 38691 [$onChild](child) { 38692 if (!this[_hasChildren] || !this[$onChildCheck](child)) { 38693 return false; 38694 } 38695 const name = child[$nodeName]; 38696 const node = this[name]; 38697 if (node instanceof XFAObjectArray) { 38698 if (node.push(child)) { 38699 this[$appendChild](child); 38700 return true; 38701 } 38702 } else { 38703 if (node !== null) { 38704 this[$removeChild](node); 38705 } 38706 this[name] = child; 38707 this[$appendChild](child); 38708 return true; 38709 } 38710 let id = ""; 38711 if (this.id) { 38712 id = ` (id: ${this.id})`; 38713 } else if (this.name) { 38714 id = ` (name: ${this.name} ${this.h.value})`; 38715 } 38716 warn(`XFA - node "${this[$nodeName]}"${id} has already enough "${name}"!`); 38717 return false; 38718 } 38719 [$onChildCheck](child) { 38720 return this.hasOwnProperty(child[$nodeName]) && child[$namespaceId] === this[$namespaceId]; 38721 } 38722 [$isNsAgnostic]() { 38723 return false; 38724 } 38725 [$acceptWhitespace]() { 38726 return false; 38727 } 38728 [$isCDATAXml]() { 38729 return false; 38730 } 38731 [$isBindable]() { 38732 return false; 38733 } 38734 [$popPara]() { 38735 if (this.para) { 38736 this[$getTemplateRoot]()[$extra].paraStack.pop(); 38737 } 38738 } 38739 [$pushPara]() { 38740 this[$getTemplateRoot]()[$extra].paraStack.push(this.para); 38741 } 38742 [$setId](ids) { 38743 if (this.id && this[$namespaceId] === NamespaceIds.template.id) { 38744 ids.set(this.id, this); 38745 } 38746 } 38747 [$getTemplateRoot]() { 38748 return this[$globalData].template; 38749 } 38750 [$isSplittable]() { 38751 return false; 38752 } 38753 [$isThereMoreWidth]() { 38754 return false; 38755 } 38756 [$appendChild](child) { 38757 child[_parent] = this; 38758 this[_children].push(child); 38759 if (!child[$globalData] && this[$globalData]) { 38760 child[$globalData] = this[$globalData]; 38761 } 38762 } 38763 [$removeChild](child) { 38764 const i = this[_children].indexOf(child); 38765 this[_children].splice(i, 1); 38766 } 38767 [$hasSettableValue]() { 38768 return this.hasOwnProperty("value"); 38769 } 38770 [$setValue](_) {} 38771 [$onText](_) {} 38772 [$finalize]() {} 38773 [$clean](builder) { 38774 delete this[_hasChildren]; 38775 if (this[$cleanup]) { 38776 builder.clean(this[$cleanup]); 38777 delete this[$cleanup]; 38778 } 38779 } 38780 [$indexOf](child) { 38781 return this[_children].indexOf(child); 38782 } 38783 [$insertAt](i, child) { 38784 child[_parent] = this; 38785 this[_children].splice(i, 0, child); 38786 if (!child[$globalData] && this[$globalData]) { 38787 child[$globalData] = this[$globalData]; 38788 } 38789 } 38790 [$isTransparent]() { 38791 return !this.name; 38792 } 38793 [$lastAttribute]() { 38794 return ""; 38795 } 38796 [$text]() { 38797 if (this[_children].length === 0) { 38798 return this[$content]; 38799 } 38800 return this[_children].map(c => c[$text]()).join(""); 38801 } 38802 get [_attributeNames]() { 38803 const proto = Object.getPrototypeOf(this); 38804 if (!proto._attributes) { 38805 const attributes = proto._attributes = new Set(); 38806 for (const name of Object.getOwnPropertyNames(this)) { 38807 if (this[name] === null || this[name] instanceof XFAObject || this[name] instanceof XFAObjectArray) { 38808 break; 38809 } 38810 attributes.add(name); 38811 } 38812 } 38813 return shadow(this, _attributeNames, proto._attributes); 38814 } 38815 [$isDescendent](parent) { 38816 let node = this; 38817 while (node) { 38818 if (node === parent) { 38819 return true; 38820 } 38821 node = node[$getParent](); 38822 } 38823 return false; 38824 } 38825 [$getParent]() { 38826 return this[_parent]; 38827 } 38828 [$getSubformParent]() { 38829 return this[$getParent](); 38830 } 38831 [$getChildren](name = null) { 38832 if (!name) { 38833 return this[_children]; 38834 } 38835 return this[name]; 38836 } 38837 [$dump]() { 38838 const dumped = Object.create(null); 38839 if (this[$content]) { 38840 dumped.$content = this[$content]; 38841 } 38842 for (const name of Object.getOwnPropertyNames(this)) { 38843 const value = this[name]; 38844 if (value === null) { 38845 continue; 38846 } 38847 if (value instanceof XFAObject) { 38848 dumped[name] = value[$dump](); 38849 } else if (value instanceof XFAObjectArray) { 38850 if (!value.isEmpty()) { 38851 dumped[name] = value.dump(); 38852 } 38853 } else { 38854 dumped[name] = value; 38855 } 38856 } 38857 return dumped; 38858 } 38859 [$toStyle]() { 38860 return null; 38861 } 38862 [$toHTML]() { 38863 return HTMLResult.EMPTY; 38864 } 38865 *[$getContainedChildren]() { 38866 for (const node of this[$getChildren]()) { 38867 yield node; 38868 } 38869 } 38870 *[_filteredChildrenGenerator](filter, include) { 38871 for (const node of this[$getContainedChildren]()) { 38872 if (!filter || include === filter.has(node[$nodeName])) { 38873 const availableSpace = this[$getAvailableSpace](); 38874 const res = node[$toHTML](availableSpace); 38875 if (!res.success) { 38876 this[$extra].failingNode = node; 38877 } 38878 yield res; 38879 } 38880 } 38881 } 38882 [$flushHTML]() { 38883 return null; 38884 } 38885 [$addHTML](html, bbox) { 38886 this[$extra].children.push(html); 38887 } 38888 [$getAvailableSpace]() {} 38889 [$childrenToHTML]({ 38890 filter = null, 38891 include = true 38892 }) { 38893 if (!this[$extra].generator) { 38894 this[$extra].generator = this[_filteredChildrenGenerator](filter, include); 38895 } else { 38896 const availableSpace = this[$getAvailableSpace](); 38897 const res = this[$extra].failingNode[$toHTML](availableSpace); 38898 if (!res.success) { 38899 return res; 38900 } 38901 if (res.html) { 38902 this[$addHTML](res.html, res.bbox); 38903 } 38904 delete this[$extra].failingNode; 38905 } 38906 while (true) { 38907 const gen = this[$extra].generator.next(); 38908 if (gen.done) { 38909 break; 38910 } 38911 const res = gen.value; 38912 if (!res.success) { 38913 return res; 38914 } 38915 if (res.html) { 38916 this[$addHTML](res.html, res.bbox); 38917 } 38918 } 38919 this[$extra].generator = null; 38920 return HTMLResult.EMPTY; 38921 } 38922 [$setSetAttributes](attributes) { 38923 this[_setAttributes] = new Set(Object.keys(attributes)); 38924 } 38925 [_getUnsetAttributes](protoAttributes) { 38926 const allAttr = this[_attributeNames]; 38927 const setAttr = this[_setAttributes]; 38928 return [...protoAttributes].filter(x => allAttr.has(x) && !setAttr.has(x)); 38929 } 38930 [$resolvePrototypes](ids, ancestors = new Set()) { 38931 for (const child of this[_children]) { 38932 child[_resolvePrototypesHelper](ids, ancestors); 38933 } 38934 } 38935 [_resolvePrototypesHelper](ids, ancestors) { 38936 const proto = this[_getPrototype](ids, ancestors); 38937 if (proto) { 38938 this[_applyPrototype](proto, ids, ancestors); 38939 } else { 38940 this[$resolvePrototypes](ids, ancestors); 38941 } 38942 } 38943 [_getPrototype](ids, ancestors) { 38944 const { 38945 use, 38946 usehref 38947 } = this; 38948 if (!use && !usehref) { 38949 return null; 38950 } 38951 let proto = null; 38952 let somExpression = null; 38953 let id = null; 38954 let ref = use; 38955 if (usehref) { 38956 ref = usehref; 38957 if (usehref.startsWith("#som(") && usehref.endsWith(")")) { 38958 somExpression = usehref.slice("#som(".length, -1); 38959 } else if (usehref.startsWith(".#som(") && usehref.endsWith(")")) { 38960 somExpression = usehref.slice(".#som(".length, -1); 38961 } else if (usehref.startsWith("#")) { 38962 id = usehref.slice(1); 38963 } else if (usehref.startsWith(".#")) { 38964 id = usehref.slice(2); 38965 } 38966 } else if (use.startsWith("#")) { 38967 id = use.slice(1); 38968 } else { 38969 somExpression = use; 38970 } 38971 this.use = this.usehref = ""; 38972 if (id) { 38973 proto = ids.get(id); 38974 } else { 38975 proto = searchNode(ids.get($root), this, somExpression, true, false); 38976 if (proto) { 38977 proto = proto[0]; 38978 } 38979 } 38980 if (!proto) { 38981 warn(`XFA - Invalid prototype reference: ${ref}.`); 38982 return null; 38983 } 38984 if (proto[$nodeName] !== this[$nodeName]) { 38985 warn(`XFA - Incompatible prototype: ${proto[$nodeName]} !== ${this[$nodeName]}.`); 38986 return null; 38987 } 38988 if (ancestors.has(proto)) { 38989 warn(`XFA - Cycle detected in prototypes use.`); 38990 return null; 38991 } 38992 ancestors.add(proto); 38993 const protoProto = proto[_getPrototype](ids, ancestors); 38994 if (protoProto) { 38995 proto[_applyPrototype](protoProto, ids, ancestors); 38996 } 38997 proto[$resolvePrototypes](ids, ancestors); 38998 ancestors.delete(proto); 38999 return proto; 39000 } 39001 [_applyPrototype](proto, ids, ancestors) { 39002 if (ancestors.has(proto)) { 39003 warn(`XFA - Cycle detected in prototypes use.`); 39004 return; 39005 } 39006 if (!this[$content] && proto[$content]) { 39007 this[$content] = proto[$content]; 39008 } 39009 const newAncestors = new Set(ancestors); 39010 newAncestors.add(proto); 39011 for (const unsetAttrName of this[_getUnsetAttributes](proto[_setAttributes])) { 39012 this[unsetAttrName] = proto[unsetAttrName]; 39013 if (this[_setAttributes]) { 39014 this[_setAttributes].add(unsetAttrName); 39015 } 39016 } 39017 for (const name of Object.getOwnPropertyNames(this)) { 39018 if (this[_attributeNames].has(name)) { 39019 continue; 39020 } 39021 const value = this[name]; 39022 const protoValue = proto[name]; 39023 if (value instanceof XFAObjectArray) { 39024 for (const child of value[_children]) { 39025 child[_resolvePrototypesHelper](ids, ancestors); 39026 } 39027 for (let i = value[_children].length, ii = protoValue[_children].length; i < ii; i++) { 39028 const child = proto[_children][i][$clone](); 39029 if (value.push(child)) { 39030 child[_parent] = this; 39031 this[_children].push(child); 39032 child[_resolvePrototypesHelper](ids, ancestors); 39033 } else { 39034 break; 39035 } 39036 } 39037 continue; 39038 } 39039 if (value !== null) { 39040 value[$resolvePrototypes](ids, ancestors); 39041 if (protoValue) { 39042 value[_applyPrototype](protoValue, ids, ancestors); 39043 } 39044 continue; 39045 } 39046 if (protoValue !== null) { 39047 const child = protoValue[$clone](); 39048 child[_parent] = this; 39049 this[name] = child; 39050 this[_children].push(child); 39051 child[_resolvePrototypesHelper](ids, ancestors); 39052 } 39053 } 39054 } 39055 static [_cloneAttribute](obj) { 39056 if (Array.isArray(obj)) { 39057 return obj.map(x => XFAObject[_cloneAttribute](x)); 39058 } 39059 if (typeof obj === "object" && obj !== null) { 39060 return Object.assign({}, obj); 39061 } 39062 return obj; 39063 } 39064 [$clone]() { 39065 const clone = Object.create(Object.getPrototypeOf(this)); 39066 for (const $symbol of Object.getOwnPropertySymbols(this)) { 39067 try { 39068 clone[$symbol] = this[$symbol]; 39069 } catch { 39070 shadow(clone, $symbol, this[$symbol]); 39071 } 39072 } 39073 clone[$uid] = `${clone[$nodeName]}${uid++}`; 39074 clone[_children] = []; 39075 for (const name of Object.getOwnPropertyNames(this)) { 39076 if (this[_attributeNames].has(name)) { 39077 clone[name] = XFAObject[_cloneAttribute](this[name]); 39078 continue; 39079 } 39080 const value = this[name]; 39081 clone[name] = value instanceof XFAObjectArray ? new XFAObjectArray(value[_max]) : null; 39082 } 39083 for (const child of this[_children]) { 39084 const name = child[$nodeName]; 39085 const clonedChild = child[$clone](); 39086 clone[_children].push(clonedChild); 39087 clonedChild[_parent] = clone; 39088 if (clone[name] === null) { 39089 clone[name] = clonedChild; 39090 } else { 39091 clone[name][_children].push(clonedChild); 39092 } 39093 } 39094 return clone; 39095 } 39096 [$getChildren](name = null) { 39097 if (!name) { 39098 return this[_children]; 39099 } 39100 return this[_children].filter(c => c[$nodeName] === name); 39101 } 39102 [$getChildrenByClass](name) { 39103 return this[name]; 39104 } 39105 [$getChildrenByName](name, allTransparent, first = true) { 39106 return Array.from(this[$getChildrenByNameIt](name, allTransparent, first)); 39107 } 39108 *[$getChildrenByNameIt](name, allTransparent, first = true) { 39109 if (name === "parent") { 39110 yield this[_parent]; 39111 return; 39112 } 39113 for (const child of this[_children]) { 39114 if (child[$nodeName] === name) { 39115 yield child; 39116 } 39117 if (child.name === name) { 39118 yield child; 39119 } 39120 if (allTransparent || child[$isTransparent]()) { 39121 yield* child[$getChildrenByNameIt](name, allTransparent, false); 39122 } 39123 } 39124 if (first && this[_attributeNames].has(name)) { 39125 yield new XFAAttribute(this, name, this[name]); 39126 } 39127 } 39128} 39129class XFAObjectArray { 39130 constructor(max = Infinity) { 39131 this[_max] = max; 39132 this[_children] = []; 39133 } 39134 get isXFAObject() { 39135 return false; 39136 } 39137 get isXFAObjectArray() { 39138 return true; 39139 } 39140 push(child) { 39141 const len = this[_children].length; 39142 if (len <= this[_max]) { 39143 this[_children].push(child); 39144 return true; 39145 } 39146 warn(`XFA - node "${child[$nodeName]}" accepts no more than ${this[_max]} children`); 39147 return false; 39148 } 39149 isEmpty() { 39150 return this[_children].length === 0; 39151 } 39152 dump() { 39153 return this[_children].length === 1 ? this[_children][0][$dump]() : this[_children].map(x => x[$dump]()); 39154 } 39155 [$clone]() { 39156 const clone = new XFAObjectArray(this[_max]); 39157 clone[_children] = this[_children].map(c => c[$clone]()); 39158 return clone; 39159 } 39160 get children() { 39161 return this[_children]; 39162 } 39163 clear() { 39164 this[_children].length = 0; 39165 } 39166} 39167class XFAAttribute { 39168 constructor(node, name, value) { 39169 this[_parent] = node; 39170 this[$nodeName] = name; 39171 this[$content] = value; 39172 this[$consumed] = false; 39173 this[$uid] = `attribute${uid++}`; 39174 } 39175 [$getParent]() { 39176 return this[_parent]; 39177 } 39178 [$isDataValue]() { 39179 return true; 39180 } 39181 [$getDataValue]() { 39182 return this[$content].trim(); 39183 } 39184 [$setValue](value) { 39185 value = value.value || ""; 39186 this[$content] = value.toString(); 39187 } 39188 [$text]() { 39189 return this[$content]; 39190 } 39191 [$isDescendent](parent) { 39192 return this[_parent] === parent || this[_parent][$isDescendent](parent); 39193 } 39194} 39195class XmlObject extends XFAObject { 39196 constructor(nsId, name, attributes = {}) { 39197 super(nsId, name); 39198 this[$content] = ""; 39199 this[_dataValue] = null; 39200 if (name !== "#text") { 39201 const map = new Map(); 39202 this[_attributes] = map; 39203 for (const [attrName, value] of Object.entries(attributes)) { 39204 map.set(attrName, new XFAAttribute(this, attrName, value)); 39205 } 39206 if (attributes.hasOwnProperty($nsAttributes)) { 39207 const dataNode = attributes[$nsAttributes].xfa.dataNode; 39208 if (dataNode !== undefined) { 39209 if (dataNode === "dataGroup") { 39210 this[_dataValue] = false; 39211 } else if (dataNode === "dataValue") { 39212 this[_dataValue] = true; 39213 } 39214 } 39215 } 39216 } 39217 this[$consumed] = false; 39218 } 39219 [$toString](buf) { 39220 const tagName = this[$nodeName]; 39221 if (tagName === "#text") { 39222 buf.push(encodeToXmlString(this[$content])); 39223 return; 39224 } 39225 const utf8TagName = utf8StringToString(tagName); 39226 const prefix = this[$namespaceId] === NS_DATASETS ? "xfa:" : ""; 39227 buf.push(`<${prefix}${utf8TagName}`); 39228 for (const [name, value] of this[_attributes].entries()) { 39229 const utf8Name = utf8StringToString(name); 39230 buf.push(` ${utf8Name}="${encodeToXmlString(value[$content])}"`); 39231 } 39232 if (this[_dataValue] !== null) { 39233 if (this[_dataValue]) { 39234 buf.push(` xfa:dataNode="dataValue"`); 39235 } else { 39236 buf.push(` xfa:dataNode="dataGroup"`); 39237 } 39238 } 39239 if (!this[$content] && this[_children].length === 0) { 39240 buf.push("/>"); 39241 return; 39242 } 39243 buf.push(">"); 39244 if (this[$content]) { 39245 if (typeof this[$content] === "string") { 39246 buf.push(encodeToXmlString(this[$content])); 39247 } else { 39248 this[$content][$toString](buf); 39249 } 39250 } else { 39251 for (const child of this[_children]) { 39252 child[$toString](buf); 39253 } 39254 } 39255 buf.push(`</${prefix}${utf8TagName}>`); 39256 } 39257 [$onChild](child) { 39258 if (this[$content]) { 39259 const node = new XmlObject(this[$namespaceId], "#text"); 39260 this[$appendChild](node); 39261 node[$content] = this[$content]; 39262 this[$content] = ""; 39263 } 39264 this[$appendChild](child); 39265 return true; 39266 } 39267 [$onText](str) { 39268 this[$content] += str; 39269 } 39270 [$finalize]() { 39271 if (this[$content] && this[_children].length > 0) { 39272 const node = new XmlObject(this[$namespaceId], "#text"); 39273 this[$appendChild](node); 39274 node[$content] = this[$content]; 39275 delete this[$content]; 39276 } 39277 } 39278 [$toHTML]() { 39279 if (this[$nodeName] === "#text") { 39280 return HTMLResult.success({ 39281 name: "#text", 39282 value: this[$content] 39283 }); 39284 } 39285 return HTMLResult.EMPTY; 39286 } 39287 [$getChildren](name = null) { 39288 if (!name) { 39289 return this[_children]; 39290 } 39291 return this[_children].filter(c => c[$nodeName] === name); 39292 } 39293 [$getAttributes]() { 39294 return this[_attributes]; 39295 } 39296 [$getChildrenByClass](name) { 39297 const value = this[_attributes].get(name); 39298 if (value !== undefined) { 39299 return value; 39300 } 39301 return this[$getChildren](name); 39302 } 39303 *[$getChildrenByNameIt](name, allTransparent) { 39304 const value = this[_attributes].get(name); 39305 if (value) { 39306 yield value; 39307 } 39308 for (const child of this[_children]) { 39309 if (child[$nodeName] === name) { 39310 yield child; 39311 } 39312 if (allTransparent) { 39313 yield* child[$getChildrenByNameIt](name, allTransparent); 39314 } 39315 } 39316 } 39317 *[$getAttributeIt](name, skipConsumed) { 39318 const value = this[_attributes].get(name); 39319 if (value && (!skipConsumed || !value[$consumed])) { 39320 yield value; 39321 } 39322 for (const child of this[_children]) { 39323 yield* child[$getAttributeIt](name, skipConsumed); 39324 } 39325 } 39326 *[$getRealChildrenByNameIt](name, allTransparent, skipConsumed) { 39327 for (const child of this[_children]) { 39328 if (child[$nodeName] === name && (!skipConsumed || !child[$consumed])) { 39329 yield child; 39330 } 39331 if (allTransparent) { 39332 yield* child[$getRealChildrenByNameIt](name, allTransparent, skipConsumed); 39333 } 39334 } 39335 } 39336 [$isDataValue]() { 39337 if (this[_dataValue] === null) { 39338 return this[_children].length === 0 || this[_children][0][$namespaceId] === NamespaceIds.xhtml.id; 39339 } 39340 return this[_dataValue]; 39341 } 39342 [$getDataValue]() { 39343 if (this[_dataValue] === null) { 39344 if (this[_children].length === 0) { 39345 return this[$content].trim(); 39346 } 39347 if (this[_children][0][$namespaceId] === NamespaceIds.xhtml.id) { 39348 return this[_children][0][$text]().trim(); 39349 } 39350 return null; 39351 } 39352 return this[$content].trim(); 39353 } 39354 [$setValue](value) { 39355 value = value.value || ""; 39356 this[$content] = value.toString(); 39357 } 39358 [$dump](hasNS = false) { 39359 const dumped = Object.create(null); 39360 if (hasNS) { 39361 dumped.$ns = this[$namespaceId]; 39362 } 39363 if (this[$content]) { 39364 dumped.$content = this[$content]; 39365 } 39366 dumped.$name = this[$nodeName]; 39367 dumped.children = []; 39368 for (const child of this[_children]) { 39369 dumped.children.push(child[$dump](hasNS)); 39370 } 39371 dumped.attributes = Object.create(null); 39372 for (const [name, value] of this[_attributes]) { 39373 dumped.attributes[name] = value[$content]; 39374 } 39375 return dumped; 39376 } 39377} 39378class ContentObject extends XFAObject { 39379 constructor(nsId, name) { 39380 super(nsId, name); 39381 this[$content] = ""; 39382 } 39383 [$onText](text) { 39384 this[$content] += text; 39385 } 39386 [$finalize]() {} 39387} 39388class OptionObject extends ContentObject { 39389 constructor(nsId, name, options) { 39390 super(nsId, name); 39391 this[_options] = options; 39392 } 39393 [$finalize]() { 39394 this[$content] = getKeyword({ 39395 data: this[$content], 39396 defaultValue: this[_options][0], 39397 validate: k => this[_options].includes(k) 39398 }); 39399 } 39400 [$clean](builder) { 39401 super[$clean](builder); 39402 delete this[_options]; 39403 } 39404} 39405class StringObject extends ContentObject { 39406 [$finalize]() { 39407 this[$content] = this[$content].trim(); 39408 } 39409} 39410class IntegerObject extends ContentObject { 39411 constructor(nsId, name, defaultValue, validator) { 39412 super(nsId, name); 39413 this[_defaultValue] = defaultValue; 39414 this[_validator] = validator; 39415 } 39416 [$finalize]() { 39417 this[$content] = getInteger({ 39418 data: this[$content], 39419 defaultValue: this[_defaultValue], 39420 validate: this[_validator] 39421 }); 39422 } 39423 [$clean](builder) { 39424 super[$clean](builder); 39425 delete this[_defaultValue]; 39426 delete this[_validator]; 39427 } 39428} 39429class Option01 extends IntegerObject { 39430 constructor(nsId, name) { 39431 super(nsId, name, 0, n => n === 1); 39432 } 39433} 39434class Option10 extends IntegerObject { 39435 constructor(nsId, name) { 39436 super(nsId, name, 1, n => n === 0); 39437 } 39438} 39439 39440;// ./src/core/xfa/html_utils.js 39441 39442 39443 39444 39445 39446
vendor: 18,262 bytes, lines 39447-40089
39447function measureToString(m) { 39448 if (typeof m === "string") { 39449 return "0px"; 39450 } 39451 return Number.isInteger(m) ? `${m}px` : `${m.toFixed(2)}px`; 39452} 39453const converters = { 39454 anchorType(node, style) { 39455 const parent = node[$getSubformParent](); 39456 if (!parent || parent.layout && parent.layout !== "position") { 39457 return; 39458 } 39459 if (!("transform" in style)) { 39460 style.transform = ""; 39461 } 39462 switch (node.anchorType) { 39463 case "bottomCenter": 39464 style.transform += "translate(-50%, -100%)"; 39465 break; 39466 case "bottomLeft": 39467 style.transform += "translate(0,-100%)"; 39468 break; 39469 case "bottomRight": 39470 style.transform += "translate(-100%,-100%)"; 39471 break; 39472 case "middleCenter": 39473 style.transform += "translate(-50%,-50%)"; 39474 break; 39475 case "middleLeft": 39476 style.transform += "translate(0,-50%)"; 39477 break; 39478 case "middleRight": 39479 style.transform += "translate(-100%,-50%)"; 39480 break; 39481 case "topCenter": 39482 style.transform += "translate(-50%,0)"; 39483 break; 39484 case "topRight": 39485 style.transform += "translate(-100%,0)"; 39486 break; 39487 } 39488 }, 39489 dimensions(node, style) { 39490 const parent = node[$getSubformParent](); 39491 let width = node.w; 39492 const height = node.h; 39493 if (parent.layout?.includes("row")) { 39494 const extra = parent[$extra]; 39495 const colSpan = node.colSpan; 39496 let w; 39497 if (colSpan === -1) { 39498 w = extra.columnWidths.slice(extra.currentColumn).reduce((a, x) => a + x, 0); 39499 extra.currentColumn = 0; 39500 } else { 39501 w = extra.columnWidths.slice(extra.currentColumn, extra.currentColumn + colSpan).reduce((a, x) => a + x, 0); 39502 extra.currentColumn = (extra.currentColumn + node.colSpan) % extra.columnWidths.length; 39503 } 39504 if (!isNaN(w)) { 39505 width = node.w = w; 39506 } 39507 } 39508 style.width = width !== "" ? measureToString(width) : "auto"; 39509 style.height = height !== "" ? measureToString(height) : "auto"; 39510 }, 39511 position(node, style) { 39512 const parent = node[$getSubformParent](); 39513 if (parent?.layout && parent.layout !== "position") { 39514 return; 39515 } 39516 style.position = "absolute"; 39517 style.left = measureToString(node.x); 39518 style.top = measureToString(node.y); 39519 }, 39520 rotate(node, style) { 39521 if (node.rotate) { 39522 if (!("transform" in style)) { 39523 style.transform = ""; 39524 } 39525 style.transform += `rotate(-${node.rotate}deg)`; 39526 style.transformOrigin = "top left"; 39527 } 39528 }, 39529 presence(node, style) { 39530 switch (node.presence) { 39531 case "invisible": 39532 style.visibility = "hidden"; 39533 break; 39534 case "hidden": 39535 case "inactive": 39536 style.display = "none"; 39537 break; 39538 } 39539 }, 39540 hAlign(node, style) { 39541 if (node[$nodeName] === "para") { 39542 switch (node.hAlign) { 39543 case "justifyAll": 39544 style.textAlign = "justify-all"; 39545 break; 39546 case "radix": 39547 style.textAlign = "left"; 39548 break; 39549 default: 39550 style.textAlign = node.hAlign; 39551 } 39552 } else { 39553 switch (node.hAlign) { 39554 case "left": 39555 style.alignSelf = "start"; 39556 break; 39557 case "center": 39558 style.alignSelf = "center"; 39559 break; 39560 case "right": 39561 style.alignSelf = "end"; 39562 break; 39563 } 39564 } 39565 }, 39566 margin(node, style) { 39567 if (node.margin) { 39568 style.margin = node.margin[$toStyle]().margin; 39569 } 39570 } 39571}; 39572function setMinMaxDimensions(node, style) { 39573 const parent = node[$getSubformParent](); 39574 if (parent.layout === "position") { 39575 if (node.minW > 0) { 39576 style.minWidth = measureToString(node.minW); 39577 } 39578 if (node.maxW > 0) { 39579 style.maxWidth = measureToString(node.maxW); 39580 } 39581 if (node.minH > 0) { 39582 style.minHeight = measureToString(node.minH); 39583 } 39584 if (node.maxH > 0) { 39585 style.maxHeight = measureToString(node.maxH); 39586 } 39587 } 39588} 39589function layoutText(text, xfaFont, margin, lineHeight, fontFinder, width) { 39590 const measure = new TextMeasure(xfaFont, margin, lineHeight, fontFinder); 39591 if (typeof text === "string") { 39592 measure.addString(text); 39593 } else { 39594 text[$pushGlyphs](measure); 39595 } 39596 return measure.compute(width); 39597} 39598function layoutNode(node, availableSpace) { 39599 let height = null; 39600 let width = null; 39601 let isBroken = false; 39602 if ((!node.w || !node.h) && node.value) { 39603 let marginH = 0; 39604 let marginV = 0; 39605 if (node.margin) { 39606 marginH = node.margin.leftInset + node.margin.rightInset; 39607 marginV = node.margin.topInset + node.margin.bottomInset; 39608 } 39609 let lineHeight = null; 39610 let margin = null; 39611 if (node.para) { 39612 margin = Object.create(null); 39613 lineHeight = node.para.lineHeight === "" ? null : node.para.lineHeight; 39614 margin.top = node.para.spaceAbove === "" ? 0 : node.para.spaceAbove; 39615 margin.bottom = node.para.spaceBelow === "" ? 0 : node.para.spaceBelow; 39616 margin.left = node.para.marginLeft === "" ? 0 : node.para.marginLeft; 39617 margin.right = node.para.marginRight === "" ? 0 : node.para.marginRight; 39618 } 39619 let font = node.font; 39620 if (!font) { 39621 const root = node[$getTemplateRoot](); 39622 let parent = node[$getParent](); 39623 while (parent && parent !== root) { 39624 if (parent.font) { 39625 font = parent.font; 39626 break; 39627 } 39628 parent = parent[$getParent](); 39629 } 39630 } 39631 const maxWidth = (node.w || availableSpace.width) - marginH; 39632 const fontFinder = node[$globalData].fontFinder; 39633 if (node.value.exData && node.value.exData[$content] && node.value.exData.contentType === "text/html") { 39634 const res = layoutText(node.value.exData[$content], font, margin, lineHeight, fontFinder, maxWidth); 39635 width = res.width; 39636 height = res.height; 39637 isBroken = res.isBroken; 39638 } else { 39639 const text = node.value[$text](); 39640 if (text) { 39641 const res = layoutText(text, font, margin, lineHeight, fontFinder, maxWidth); 39642 width = res.width; 39643 height = res.height; 39644 isBroken = res.isBroken; 39645 } 39646 } 39647 if (width !== null && !node.w) { 39648 width += marginH; 39649 } 39650 if (height !== null && !node.h) { 39651 height += marginV; 39652 } 39653 } 39654 return { 39655 w: width, 39656 h: height, 39657 isBroken 39658 }; 39659} 39660function computeBbox(node, html, availableSpace) { 39661 let bbox; 39662 if (node.w !== "" && node.h !== "") { 39663 bbox = [node.x, node.y, node.w, node.h]; 39664 } else { 39665 if (!availableSpace) { 39666 return null; 39667 } 39668 let width = node.w; 39669 if (width === "") { 39670 if (node.maxW === 0) { 39671 const parent = node[$getSubformParent](); 39672 width = parent.layout === "position" && parent.w !== "" ? 0 : node.minW; 39673 } else { 39674 width = Math.min(node.maxW, availableSpace.width); 39675 } 39676 html.attributes.style.width = measureToString(width); 39677 } 39678 let height = node.h; 39679 if (height === "") { 39680 if (node.maxH === 0) { 39681 const parent = node[$getSubformParent](); 39682 height = parent.layout === "position" && parent.h !== "" ? 0 : node.minH; 39683 } else { 39684 height = Math.min(node.maxH, availableSpace.height); 39685 } 39686 html.attributes.style.height = measureToString(height); 39687 } 39688 bbox = [node.x, node.y, width, height]; 39689 } 39690 return bbox; 39691} 39692function fixDimensions(node) { 39693 const parent = node[$getSubformParent](); 39694 if (parent.layout?.includes("row")) { 39695 const extra = parent[$extra]; 39696 const colSpan = node.colSpan; 39697 let width; 39698 if (colSpan === -1) { 39699 width = extra.columnWidths.slice(extra.currentColumn).reduce((a, w) => a + w, 0); 39700 } else { 39701 width = extra.columnWidths.slice(extra.currentColumn, extra.currentColumn + colSpan).reduce((a, w) => a + w, 0); 39702 } 39703 if (!isNaN(width)) { 39704 node.w = width; 39705 } 39706 } 39707 if (parent.layout && parent.layout !== "position") { 39708 node.x = node.y = 0; 39709 } 39710 if (node.layout === "table") { 39711 if (node.w === "" && Array.isArray(node.columnWidths)) { 39712 node.w = node.columnWidths.reduce((a, x) => a + x, 0); 39713 } 39714 } 39715} 39716function layoutClass(node) { 39717 switch (node.layout) { 39718 case "position": 39719 return "xfaPosition"; 39720 case "lr-tb": 39721 return "xfaLrTb"; 39722 case "rl-row": 39723 return "xfaRlRow"; 39724 case "rl-tb": 39725 return "xfaRlTb"; 39726 case "row": 39727 return "xfaRow"; 39728 case "table": 39729 return "xfaTable"; 39730 case "tb": 39731 return "xfaTb"; 39732 default: 39733 return "xfaPosition"; 39734 } 39735} 39736function toStyle(node, ...names) { 39737 const style = Object.create(null); 39738 for (const name of names) { 39739 const value = node[name]; 39740 if (value === null) { 39741 continue; 39742 } 39743 if (converters.hasOwnProperty(name)) { 39744 converters[name](node, style); 39745 continue; 39746 } 39747 if (value instanceof XFAObject) { 39748 const newStyle = value[$toStyle](); 39749 if (newStyle) { 39750 Object.assign(style, newStyle); 39751 } else { 39752 warn(`(DEBUG) - XFA - style for ${name} not implemented yet`); 39753 } 39754 } 39755 } 39756 return style; 39757} 39758function createWrapper(node, html) { 39759 const { 39760 attributes 39761 } = html; 39762 const { 39763 style 39764 } = attributes; 39765 const wrapper = { 39766 name: "div", 39767 attributes: { 39768 class: ["xfaWrapper"], 39769 style: Object.create(null) 39770 }, 39771 children: [] 39772 }; 39773 attributes.class.push("xfaWrapped"); 39774 if (node.border) { 39775 const { 39776 widths, 39777 insets 39778 } = node.border[$extra]; 39779 let width, height; 39780 let top = insets[0]; 39781 let left = insets[3]; 39782 const insetsH = insets[0] + insets[2]; 39783 const insetsW = insets[1] + insets[3]; 39784 switch (node.border.hand) { 39785 case "even": 39786 top -= widths[0] / 2; 39787 left -= widths[3] / 2; 39788 width = `calc(100% + ${(widths[1] + widths[3]) / 2 - insetsW}px)`; 39789 height = `calc(100% + ${(widths[0] + widths[2]) / 2 - insetsH}px)`; 39790 break; 39791 case "left": 39792 top -= widths[0]; 39793 left -= widths[3]; 39794 width = `calc(100% + ${widths[1] + widths[3] - insetsW}px)`; 39795 height = `calc(100% + ${widths[0] + widths[2] - insetsH}px)`; 39796 break; 39797 case "right": 39798 width = insetsW ? `calc(100% - ${insetsW}px)` : "100%"; 39799 height = insetsH ? `calc(100% - ${insetsH}px)` : "100%"; 39800 break; 39801 } 39802 const classNames = ["xfaBorder"]; 39803 if (isPrintOnly(node.border)) { 39804 classNames.push("xfaPrintOnly"); 39805 } 39806 const border = { 39807 name: "div", 39808 attributes: { 39809 class: classNames, 39810 style: { 39811 top: `${top}px`, 39812 left: `${left}px`, 39813 width, 39814 height 39815 } 39816 }, 39817 children: [] 39818 }; 39819 for (const key of ["border", "borderWidth", "borderColor", "borderRadius", "borderStyle"]) { 39820 if (style[key] !== undefined) { 39821 border.attributes.style[key] = style[key]; 39822 delete style[key]; 39823 } 39824 } 39825 wrapper.children.push(border, html); 39826 } else { 39827 wrapper.children.push(html); 39828 } 39829 for (const key of ["background", "backgroundClip", "top", "left", "width", "height", "minWidth", "minHeight", "maxWidth", "maxHeight", "transform", "transformOrigin", "visibility"]) { 39830 if (style[key] !== undefined) { 39831 wrapper.attributes.style[key] = style[key]; 39832 delete style[key]; 39833 } 39834 } 39835 wrapper.attributes.style.position = style.position === "absolute" ? "absolute" : "relative"; 39836 delete style.position; 39837 if (style.alignSelf) { 39838 wrapper.attributes.style.alignSelf = style.alignSelf; 39839 delete style.alignSelf; 39840 } 39841 return wrapper; 39842} 39843function fixTextIndent(styles) { 39844 const indent = getMeasurement(styles.textIndent, "0px"); 39845 if (indent >= 0) { 39846 return; 39847 } 39848 const align = styles.textAlign === "right" ? "right" : "left"; 39849 const name = "padding" + (align === "left" ? "Left" : "Right"); 39850 const padding = getMeasurement(styles[name], "0px"); 39851 styles[name] = `${padding - indent}px`; 39852} 39853function setAccess(node, classNames) { 39854 switch (node.access) { 39855 case "nonInteractive": 39856 classNames.push("xfaNonInteractive"); 39857 break; 39858 case "readOnly": 39859 classNames.push("xfaReadOnly"); 39860 break; 39861 case "protected": 39862 classNames.push("xfaDisabled"); 39863 break; 39864 } 39865} 39866function isPrintOnly(node) { 39867 return node.relevant.length > 0 && !node.relevant[0].excluded && node.relevant[0].viewname === "print"; 39868} 39869function getCurrentPara(node) { 39870 const stack = node[$getTemplateRoot]()[$extra].paraStack; 39871 return stack.length ? stack.at(-1) : null; 39872} 39873function setPara(node, nodeStyle, value) { 39874 if (value.attributes.class?.includes("xfaRich")) { 39875 if (nodeStyle) { 39876 if (node.h === "") { 39877 nodeStyle.height = "auto"; 39878 } 39879 if (node.w === "") { 39880 nodeStyle.width = "auto"; 39881 } 39882 } 39883 const para = getCurrentPara(node); 39884 if (para) { 39885 const valueStyle = value.attributes.style; 39886 valueStyle.display = "flex"; 39887 valueStyle.flexDirection = "column"; 39888 switch (para.vAlign) { 39889 case "top": 39890 valueStyle.justifyContent = "start"; 39891 break; 39892 case "bottom": 39893 valueStyle.justifyContent = "end"; 39894 break; 39895 case "middle": 39896 valueStyle.justifyContent = "center"; 39897 break; 39898 } 39899 const paraStyle = para[$toStyle](); 39900 for (const [key, val] of Object.entries(paraStyle)) { 39901 if (!(key in valueStyle)) { 39902 valueStyle[key] = val; 39903 } 39904 } 39905 } 39906 } 39907} 39908function setFontFamily(xfaFont, node, fontFinder, style) { 39909 if (!fontFinder) { 39910 delete style.fontFamily; 39911 return; 39912 } 39913 const name = stripQuotes(xfaFont.typeface); 39914 style.fontFamily = `"${name}"`; 39915 const typeface = fontFinder.find(name); 39916 if (typeface) { 39917 const { 39918 fontFamily 39919 } = typeface.regular.cssFontInfo; 39920 if (fontFamily !== name) { 39921 style.fontFamily = `"${fontFamily}"`; 39922 } 39923 const para = getCurrentPara(node); 39924 if (para && para.lineHeight !== "") { 39925 return; 39926 } 39927 if (style.lineHeight) { 39928 return; 39929 } 39930 const pdfFont = selectFont(xfaFont, typeface); 39931 if (pdfFont) { 39932 style.lineHeight = Math.max(1.2, pdfFont.lineHeight); 39933 } 39934 } 39935} 39936function fixURL(str) { 39937 const absoluteUrl = createValidAbsoluteUrl(str, null, { 39938 addDefaultProtocol: true, 39939 tryConvertEncoding: true 39940 }); 39941 return absoluteUrl ? absoluteUrl.href : null; 39942} 39943 39944;// ./src/core/xfa/layout.js 39945 39946 39947function createLine(node, children) { 39948 return { 39949 name: "div", 39950 attributes: { 39951 class: [node.layout === "lr-tb" ? "xfaLr" : "xfaRl"] 39952 }, 39953 children 39954 }; 39955} 39956function flushHTML(node) { 39957 if (!node[$extra]) { 39958 return null; 39959 } 39960 const attributes = node[$extra].attributes; 39961 const html = { 39962 name: "div", 39963 attributes, 39964 children: node[$extra].children 39965 }; 39966 if (node[$extra].failingNode) { 39967 const htmlFromFailing = node[$extra].failingNode[$flushHTML](); 39968 if (htmlFromFailing) { 39969 if (node.layout.endsWith("-tb")) { 39970 html.children.push(createLine(node, [htmlFromFailing])); 39971 } else { 39972 html.children.push(htmlFromFailing); 39973 } 39974 } 39975 } 39976 if (html.children.length === 0) { 39977 return null; 39978 } 39979 return html; 39980} 39981function addHTML(node, html, bbox) { 39982 const extra = node[$extra]; 39983 const availableSpace = extra.availableSpace; 39984 const [x, y, w, h] = bbox; 39985 switch (node.layout) { 39986 case "position": 39987 { 39988 extra.width = Math.max(extra.width, x + w); 39989 extra.height = Math.max(extra.height, y + h); 39990 extra.children.push(html); 39991 break; 39992 } 39993 case "lr-tb": 39994 case "rl-tb": 39995 if (!extra.line || extra.attempt === 1) { 39996 extra.line = createLine(node, []); 39997 extra.children.push(extra.line); 39998 extra.numberInLine = 0; 39999 } 40000 extra.numberInLine += 1; 40001 extra.line.children.push(html); 40002 if (extra.attempt === 0) { 40003 extra.currentWidth += w; 40004 extra.height = Math.max(extra.height, extra.prevHeight + h); 40005 } else { 40006 extra.currentWidth = w; 40007 extra.prevHeight = extra.height; 40008 extra.height += h; 40009 extra.attempt = 0; 40010 } 40011 extra.width = Math.max(extra.width, extra.currentWidth); 40012 break; 40013 case "rl-row": 40014 case "row": 40015 { 40016 extra.children.push(html); 40017 extra.width += w; 40018 extra.height = Math.max(extra.height, h); 40019 const height = measureToString(extra.height); 40020 for (const child of extra.children) { 40021 child.attributes.style.height = height; 40022 } 40023 break; 40024 } 40025 case "table": 40026 { 40027 extra.width = Math.min(availableSpace.width, Math.max(extra.width, w)); 40028 extra.height += h; 40029 extra.children.push(html); 40030 break; 40031 } 40032 case "tb": 40033 { 40034 extra.width = Math.min(availableSpace.width, Math.max(extra.width, w)); 40035 extra.height += h; 40036 extra.children.push(html); 40037 break; 40038 } 40039 } 40040} 40041function getAvailableSpace(node) { 40042 const availableSpace = node[$extra].availableSpace; 40043 const marginV = node.margin ? node.margin.topInset + node.margin.bottomInset : 0; 40044 const marginH = node.margin ? node.margin.leftInset + node.margin.rightInset : 0; 40045 switch (node.layout) { 40046 case "lr-tb": 40047 case "rl-tb": 40048 if (node[$extra].attempt === 0) { 40049 return { 40050 width: availableSpace.width - marginH - node[$extra].currentWidth, 40051 height: availableSpace.height - marginV - node[$extra].prevHeight 40052 }; 40053 } 40054 return { 40055 width: availableSpace.width - marginH, 40056 height: availableSpace.height - marginV - node[$extra].height 40057 }; 40058 case "rl-row": 40059 case "row": 40060 const width = node[$extra].columnWidths.slice(node[$extra].currentColumn).reduce((a, x) => a + x); 40061 return { 40062 width, 40063 height: availableSpace.height - marginH 40064 }; 40065 case "table": 40066 case "tb": 40067 return { 40068 width: availableSpace.width - marginH, 40069 height: availableSpace.height - marginV - node[$extra].height 40070 }; 40071 case "position": 40072 default: 40073 return availableSpace; 40074 } 40075} 40076function getTransformedBBox(node) { 40077 let w = node.w === "" ? NaN : node.w; 40078 let h = node.h === "" ? NaN : node.h; 40079 let [centerX, centerY] = [0, 0]; 40080 switch (node.anchorType || "") { 40081 case "bottomCenter": 40082 [centerX, centerY] = [w / 2, h]; 40083 break; 40084 case "bottomLeft": 40085 [centerX, centerY] = [0, h]; 40086 break; 40087 case "bottomRight": 40088 [centerX, centerY] = [w, h]; 40089 break;
vendor: 3,398 bytes, lines 40090-40212
40090 case "middleCenter": 40091 [centerX, centerY] = [w / 2, h / 2]; 40092 break; 40093 case "middleLeft": 40094 [centerX, centerY] = [0, h / 2]; 40095 break; 40096 case "middleRight": 40097 [centerX, centerY] = [w, h / 2]; 40098 break; 40099 case "topCenter": 40100 [centerX, centerY] = [w / 2, 0]; 40101 break; 40102 case "topRight": 40103 [centerX, centerY] = [w, 0]; 40104 break; 40105 } 40106 let x, y; 40107 switch (node.rotate || 0) { 40108 case 0: 40109 [x, y] = [-centerX, -centerY]; 40110 break; 40111 case 90: 40112 [x, y] = [-centerY, centerX]; 40113 [w, h] = [h, -w]; 40114 break; 40115 case 180: 40116 [x, y] = [centerX, centerY]; 40117 [w, h] = [-w, -h]; 40118 break; 40119 case 270: 40120 [x, y] = [centerY, -centerX]; 40121 [w, h] = [-h, w]; 40122 break; 40123 } 40124 return [node.x + x + Math.min(0, w), node.y + y + Math.min(0, h), Math.abs(w), Math.abs(h)]; 40125} 40126function checkDimensions(node, space) { 40127 if (node[$getTemplateRoot]()[$extra].firstUnsplittable === null) { 40128 return true; 40129 } 40130 if (node.w === 0 || node.h === 0) { 40131 return true; 40132 } 40133 const ERROR = 2; 40134 const parent = node[$getSubformParent](); 40135 const attempt = parent[$extra]?.attempt || 0; 40136 const [, y, w, h] = getTransformedBBox(node); 40137 switch (parent.layout) { 40138 case "lr-tb": 40139 case "rl-tb": 40140 if (attempt === 0) { 40141 if (!node[$getTemplateRoot]()[$extra].noLayoutFailure) { 40142 if (node.h !== "" && Math.round(h - space.height) > ERROR) { 40143 return false; 40144 } 40145 if (node.w !== "") { 40146 if (Math.round(w - space.width) <= ERROR) { 40147 return true; 40148 } 40149 if (parent[$extra].numberInLine === 0) { 40150 return space.height > ERROR; 40151 } 40152 return false; 40153 } 40154 return space.width > ERROR; 40155 } 40156 if (node.w !== "") { 40157 return Math.round(w - space.width) <= ERROR; 40158 } 40159 return space.width > ERROR; 40160 } 40161 if (node[$getTemplateRoot]()[$extra].noLayoutFailure) { 40162 return true; 40163 } 40164 if (node.h !== "" && Math.round(h - space.height) > ERROR) { 40165 return false; 40166 } 40167 if (node.w === "" || Math.round(w - space.width) <= ERROR) { 40168 return space.height > ERROR; 40169 } 40170 if (parent[$isThereMoreWidth]()) { 40171 return false; 40172 } 40173 return space.height > ERROR; 40174 case "table": 40175 case "tb": 40176 if (node[$getTemplateRoot]()[$extra].noLayoutFailure) { 40177 return true; 40178 } 40179 if (node.h !== "" && !node[$isSplittable]()) { 40180 return Math.round(h - space.height) <= ERROR; 40181 } 40182 if (node.w === "" || Math.round(w - space.width) <= ERROR) { 40183 return space.height > ERROR; 40184 } 40185 if (parent[$isThereMoreWidth]()) { 40186 return false; 40187 } 40188 return space.height > ERROR; 40189 case "position": 40190 if (node[$getTemplateRoot]()[$extra].noLayoutFailure) { 40191 return true; 40192 } 40193 if (node.h === "" || Math.round(h + y - space.height) <= ERROR) { 40194 return true; 40195 } 40196 const area = node[$getTemplateRoot]()[$extra].currentContentArea; 40197 return h + y > area.h; 40198 case "rl-row": 40199 case "row": 40200 if (node[$getTemplateRoot]()[$extra].noLayoutFailure) { 40201 return true; 40202 } 40203 if (node.h !== "") { 40204 return Math.round(h - space.height) <= ERROR; 40205 } 40206 return true; 40207 default: 40208 return true; 40209 } 40210} 40211 40212;// ./src/core/xfa/template.js
vendor: 27,594 bytes, lines 40212-41102
40212 40213 40214 40215 40216 40217 40218 40219 40220 40221 40222 40223const TEMPLATE_NS_ID = NamespaceIds.template.id; 40224const SVG_NS = "http://www.w3.org/2000/svg"; 40225const MAX_ATTEMPTS_FOR_LRTB_LAYOUT = 2; 40226const MAX_EMPTY_PAGES = 3; 40227const DEFAULT_TAB_INDEX = 5000; 40228const HEADING_PATTERN = /^H(\d+)$/; 40229const MIMES = new Set(["image/gif", "image/jpeg", "image/jpg", "image/pjpeg", "image/png", "image/apng", "image/x-png", "image/bmp", "image/x-ms-bmp", "image/tiff", "image/tif", "application/octet-stream"]); 40230const IMAGES_HEADERS = [[[0x42, 0x4d], "image/bmp"], [[0xff, 0xd8, 0xff], "image/jpeg"], [[0x49, 0x49, 0x2a, 0x00], "image/tiff"], [[0x4d, 0x4d, 0x00, 0x2a], "image/tiff"], [[0x47, 0x49, 0x46, 0x38, 0x39, 0x61], "image/gif"], [[0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a], "image/png"]]; 40231function getBorderDims(node) { 40232 if (!node || !node.border) { 40233 return { 40234 w: 0, 40235 h: 0 40236 }; 40237 } 40238 const borderExtra = node.border[$getExtra](); 40239 if (!borderExtra) { 40240 return { 40241 w: 0, 40242 h: 0 40243 }; 40244 } 40245 return { 40246 w: borderExtra.widths[0] + borderExtra.widths[2] + borderExtra.insets[0] + borderExtra.insets[2], 40247 h: borderExtra.widths[1] + borderExtra.widths[3] + borderExtra.insets[1] + borderExtra.insets[3] 40248 }; 40249} 40250function hasMargin(node) { 40251 return node.margin && (node.margin.topInset || node.margin.rightInset || node.margin.bottomInset || node.margin.leftInset); 40252} 40253function _setValue(templateNode, value) { 40254 if (!templateNode.value) { 40255 const nodeValue = new Value({}); 40256 templateNode[$appendChild](nodeValue); 40257 templateNode.value = nodeValue; 40258 } 40259 templateNode.value[$setValue](value); 40260} 40261function* getContainedChildren(node) { 40262 for (const child of node[$getChildren]()) { 40263 if (child instanceof SubformSet) { 40264 yield* child[$getContainedChildren](); 40265 continue; 40266 } 40267 yield child; 40268 } 40269} 40270function isRequired(node) { 40271 return node.validate?.nullTest === "error"; 40272} 40273function setTabIndex(node) { 40274 while (node) { 40275 if (!node.traversal) { 40276 node[$tabIndex] = node[$getParent]()[$tabIndex]; 40277 return; 40278 } 40279 if (node[$tabIndex]) { 40280 return; 40281 } 40282 let next = null; 40283 for (const child of node.traversal[$getChildren]()) { 40284 if (child.operation === "next") { 40285 next = child; 40286 break; 40287 } 40288 } 40289 if (!next || !next.ref) { 40290 node[$tabIndex] = node[$getParent]()[$tabIndex]; 40291 return; 40292 } 40293 const root = node[$getTemplateRoot](); 40294 node[$tabIndex] = ++root[$tabIndex]; 40295 const ref = root[$searchNode](next.ref, node); 40296 if (!ref) { 40297 return; 40298 } 40299 node = ref[0]; 40300 } 40301} 40302function applyAssist(obj, attributes) { 40303 const assist = obj.assist; 40304 if (assist) { 40305 const assistTitle = assist[$toHTML](); 40306 if (assistTitle) { 40307 attributes.title = assistTitle; 40308 } 40309 const role = assist.role; 40310 const match = role.match(HEADING_PATTERN); 40311 if (match) { 40312 const ariaRole = "heading"; 40313 const ariaLevel = match[1]; 40314 attributes.role = ariaRole; 40315 attributes["aria-level"] = ariaLevel; 40316 } 40317 } 40318 if (obj.layout === "table") { 40319 attributes.role = "table"; 40320 } else if (obj.layout === "row") { 40321 attributes.role = "row"; 40322 } else { 40323 const parent = obj[$getParent](); 40324 if (parent.layout === "row") { 40325 attributes.role = parent.assist?.role === "TH" ? "columnheader" : "cell"; 40326 } 40327 } 40328} 40329function ariaLabel(obj) { 40330 if (!obj.assist) { 40331 return null; 40332 } 40333 const assist = obj.assist; 40334 if (assist.speak && assist.speak[$content] !== "") { 40335 return assist.speak[$content]; 40336 } 40337 if (assist.toolTip) { 40338 return assist.toolTip[$content]; 40339 } 40340 return null; 40341} 40342function valueToHtml(value) { 40343 return HTMLResult.success({ 40344 name: "div", 40345 attributes: { 40346 class: ["xfaRich"], 40347 style: Object.create(null) 40348 }, 40349 children: [{ 40350 name: "span", 40351 attributes: { 40352 style: Object.create(null) 40353 }, 40354 value 40355 }] 40356 }); 40357} 40358function setFirstUnsplittable(node) { 40359 const root = node[$getTemplateRoot](); 40360 if (root[$extra].firstUnsplittable === null) { 40361 root[$extra].firstUnsplittable = node; 40362 root[$extra].noLayoutFailure = true; 40363 } 40364} 40365function unsetFirstUnsplittable(node) { 40366 const root = node[$getTemplateRoot](); 40367 if (root[$extra].firstUnsplittable === node) { 40368 root[$extra].noLayoutFailure = false; 40369 } 40370} 40371function handleBreak(node) { 40372 if (node[$extra]) { 40373 return false; 40374 } 40375 node[$extra] = Object.create(null); 40376 if (node.targetType === "auto") { 40377 return false; 40378 } 40379 const root = node[$getTemplateRoot](); 40380 let target = null; 40381 if (node.target) { 40382 target = root[$searchNode](node.target, node[$getParent]()); 40383 if (!target) { 40384 return false; 40385 } 40386 target = target[0]; 40387 } 40388 const { 40389 currentPageArea, 40390 currentContentArea 40391 } = root[$extra]; 40392 if (node.targetType === "pageArea") { 40393 if (!(target instanceof PageArea)) { 40394 target = null; 40395 } 40396 if (node.startNew) { 40397 node[$extra].target = target || currentPageArea; 40398 return true; 40399 } else if (target && target !== currentPageArea) { 40400 node[$extra].target = target; 40401 return true; 40402 } 40403 return false; 40404 } 40405 if (!(target instanceof ContentArea)) { 40406 target = null; 40407 } 40408 const pageArea = target && target[$getParent](); 40409 let index; 40410 let nextPageArea = pageArea; 40411 if (node.startNew) { 40412 if (target) { 40413 const contentAreas = pageArea.contentArea.children; 40414 const indexForCurrent = contentAreas.indexOf(currentContentArea); 40415 const indexForTarget = contentAreas.indexOf(target); 40416 if (indexForCurrent !== -1 && indexForCurrent < indexForTarget) { 40417 nextPageArea = null; 40418 } 40419 index = indexForTarget - 1; 40420 } else { 40421 index = currentPageArea.contentArea.children.indexOf(currentContentArea); 40422 } 40423 } else if (target && target !== currentContentArea) { 40424 const contentAreas = pageArea.contentArea.children; 40425 index = contentAreas.indexOf(target) - 1; 40426 nextPageArea = pageArea === currentPageArea ? null : pageArea; 40427 } else { 40428 return false; 40429 } 40430 node[$extra].target = nextPageArea; 40431 node[$extra].index = index; 40432 return true; 40433} 40434function handleOverflow(node, extraNode, space) { 40435 const root = node[$getTemplateRoot](); 40436 const saved = root[$extra].noLayoutFailure; 40437 const savedMethod = extraNode[$getSubformParent]; 40438 extraNode[$getSubformParent] = () => node; 40439 root[$extra].noLayoutFailure = true; 40440 const res = extraNode[$toHTML](space); 40441 node[$addHTML](res.html, res.bbox); 40442 root[$extra].noLayoutFailure = saved; 40443 extraNode[$getSubformParent] = savedMethod; 40444} 40445class AppearanceFilter extends StringObject { 40446 constructor(attributes) { 40447 super(TEMPLATE_NS_ID, "appearanceFilter"); 40448 this.id = attributes.id || ""; 40449 this.type = getStringOption(attributes.type, ["optional", "required"]); 40450 this.use = attributes.use || ""; 40451 this.usehref = attributes.usehref || ""; 40452 } 40453} 40454class Arc extends XFAObject { 40455 constructor(attributes) { 40456 super(TEMPLATE_NS_ID, "arc", true); 40457 this.circular = getInteger({ 40458 data: attributes.circular, 40459 defaultValue: 0, 40460 validate: x => x === 1 40461 }); 40462 this.hand = getStringOption(attributes.hand, ["even", "left", "right"]); 40463 this.id = attributes.id || ""; 40464 this.startAngle = getFloat({ 40465 data: attributes.startAngle, 40466 defaultValue: 0, 40467 validate: x => true 40468 }); 40469 this.sweepAngle = getFloat({ 40470 data: attributes.sweepAngle, 40471 defaultValue: 360, 40472 validate: x => true 40473 }); 40474 this.use = attributes.use || ""; 40475 this.usehref = attributes.usehref || ""; 40476 this.edge = null; 40477 this.fill = null; 40478 } 40479 [$toHTML]() { 40480 const edge = this.edge || new Edge({}); 40481 const edgeStyle = edge[$toStyle](); 40482 const style = Object.create(null); 40483 if (this.fill?.presence === "visible") { 40484 Object.assign(style, this.fill[$toStyle]()); 40485 } else { 40486 style.fill = "transparent"; 40487 } 40488 style.strokeWidth = measureToString(edge.presence === "visible" ? edge.thickness : 0); 40489 style.stroke = edgeStyle.color; 40490 let arc; 40491 const attributes = { 40492 xmlns: SVG_NS, 40493 style: { 40494 width: "100%", 40495 height: "100%", 40496 overflow: "visible" 40497 } 40498 }; 40499 if (this.sweepAngle === 360) { 40500 arc = { 40501 name: "ellipse", 40502 attributes: { 40503 xmlns: SVG_NS, 40504 cx: "50%", 40505 cy: "50%", 40506 rx: "50%", 40507 ry: "50%", 40508 style 40509 } 40510 }; 40511 } else { 40512 const startAngle = this.startAngle * Math.PI / 180; 40513 const sweepAngle = this.sweepAngle * Math.PI / 180; 40514 const largeArc = this.sweepAngle > 180 ? 1 : 0; 40515 const [x1, y1, x2, y2] = [50 * (1 + Math.cos(startAngle)), 50 * (1 - Math.sin(startAngle)), 50 * (1 + Math.cos(startAngle + sweepAngle)), 50 * (1 - Math.sin(startAngle + sweepAngle))]; 40516 arc = { 40517 name: "path", 40518 attributes: { 40519 xmlns: SVG_NS, 40520 d: `M ${x1} ${y1} A 50 50 0 ${largeArc} 0 ${x2} ${y2}`, 40521 vectorEffect: "non-scaling-stroke", 40522 style 40523 } 40524 }; 40525 Object.assign(attributes, { 40526 viewBox: "0 0 100 100", 40527 preserveAspectRatio: "none" 40528 }); 40529 } 40530 const svg = { 40531 name: "svg", 40532 children: [arc], 40533 attributes 40534 }; 40535 const parent = this[$getParent]()[$getParent](); 40536 if (hasMargin(parent)) { 40537 return HTMLResult.success({ 40538 name: "div", 40539 attributes: { 40540 style: { 40541 display: "inline", 40542 width: "100%", 40543 height: "100%" 40544 } 40545 }, 40546 children: [svg] 40547 }); 40548 } 40549 svg.attributes.style.position = "absolute"; 40550 return HTMLResult.success(svg); 40551 } 40552} 40553class Area extends XFAObject { 40554 constructor(attributes) { 40555 super(TEMPLATE_NS_ID, "area", true); 40556 this.colSpan = getInteger({ 40557 data: attributes.colSpan, 40558 defaultValue: 1, 40559 validate: n => n >= 1 || n === -1 40560 }); 40561 this.id = attributes.id || ""; 40562 this.name = attributes.name || ""; 40563 this.relevant = getRelevant(attributes.relevant); 40564 this.use = attributes.use || ""; 40565 this.usehref = attributes.usehref || ""; 40566 this.x = getMeasurement(attributes.x, "0pt"); 40567 this.y = getMeasurement(attributes.y, "0pt"); 40568 this.desc = null; 40569 this.extras = null; 40570 this.area = new XFAObjectArray(); 40571 this.draw = new XFAObjectArray(); 40572 this.exObject = new XFAObjectArray(); 40573 this.exclGroup = new XFAObjectArray(); 40574 this.field = new XFAObjectArray(); 40575 this.subform = new XFAObjectArray(); 40576 this.subformSet = new XFAObjectArray(); 40577 } 40578 *[$getContainedChildren]() { 40579 yield* getContainedChildren(this); 40580 } 40581 [$isTransparent]() { 40582 return true; 40583 } 40584 [$isBindable]() { 40585 return true; 40586 } 40587 [$addHTML](html, bbox) { 40588 const [x, y, w, h] = bbox; 40589 this[$extra].width = Math.max(this[$extra].width, x + w); 40590 this[$extra].height = Math.max(this[$extra].height, y + h); 40591 this[$extra].children.push(html); 40592 } 40593 [$getAvailableSpace]() { 40594 return this[$extra].availableSpace; 40595 } 40596 [$toHTML](availableSpace) { 40597 const style = toStyle(this, "position"); 40598 const attributes = { 40599 style, 40600 id: this[$uid], 40601 class: ["xfaArea"] 40602 }; 40603 if (isPrintOnly(this)) { 40604 attributes.class.push("xfaPrintOnly"); 40605 } 40606 if (this.name) { 40607 attributes.xfaName = this.name; 40608 } 40609 const children = []; 40610 this[$extra] = { 40611 children, 40612 width: 0, 40613 height: 0, 40614 availableSpace 40615 }; 40616 const result = this[$childrenToHTML]({ 40617 filter: new Set(["area", "draw", "field", "exclGroup", "subform", "subformSet"]), 40618 include: true 40619 }); 40620 if (!result.success) { 40621 if (result.isBreak()) { 40622 return result; 40623 } 40624 delete this[$extra]; 40625 return HTMLResult.FAILURE; 40626 } 40627 style.width = measureToString(this[$extra].width); 40628 style.height = measureToString(this[$extra].height); 40629 const html = { 40630 name: "div", 40631 attributes, 40632 children 40633 }; 40634 const bbox = [this.x, this.y, this[$extra].width, this[$extra].height]; 40635 delete this[$extra]; 40636 return HTMLResult.success(html, bbox); 40637 } 40638} 40639class Assist extends XFAObject { 40640 constructor(attributes) { 40641 super(TEMPLATE_NS_ID, "assist", true); 40642 this.id = attributes.id || ""; 40643 this.role = attributes.role || ""; 40644 this.use = attributes.use || ""; 40645 this.usehref = attributes.usehref || ""; 40646 this.speak = null; 40647 this.toolTip = null; 40648 } 40649 [$toHTML]() { 40650 return this.toolTip?.[$content] || null; 40651 } 40652} 40653class Barcode extends XFAObject { 40654 constructor(attributes) { 40655 super(TEMPLATE_NS_ID, "barcode", true); 40656 this.charEncoding = getKeyword({ 40657 data: attributes.charEncoding ? attributes.charEncoding.toLowerCase() : "", 40658 defaultValue: "", 40659 validate: k => ["utf-8", "big-five", "fontspecific", "gbk", "gb-18030", "gb-2312", "ksc-5601", "none", "shift-jis", "ucs-2", "utf-16"].includes(k) || k.match(/iso-8859-\d{2}/) 40660 }); 40661 this.checksum = getStringOption(attributes.checksum, ["none", "1mod10", "1mod10_1mod11", "2mod10", "auto"]); 40662 this.dataColumnCount = getInteger({ 40663 data: attributes.dataColumnCount, 40664 defaultValue: -1, 40665 validate: x => x >= 0 40666 }); 40667 this.dataLength = getInteger({ 40668 data: attributes.dataLength, 40669 defaultValue: -1, 40670 validate: x => x >= 0 40671 }); 40672 this.dataPrep = getStringOption(attributes.dataPrep, ["none", "flateCompress"]); 40673 this.dataRowCount = getInteger({ 40674 data: attributes.dataRowCount, 40675 defaultValue: -1, 40676 validate: x => x >= 0 40677 }); 40678 this.endChar = attributes.endChar || ""; 40679 this.errorCorrectionLevel = getInteger({ 40680 data: attributes.errorCorrectionLevel, 40681 defaultValue: -1, 40682 validate: x => x >= 0 && x <= 8 40683 }); 40684 this.id = attributes.id || ""; 40685 this.moduleHeight = getMeasurement(attributes.moduleHeight, "5mm"); 40686 this.moduleWidth = getMeasurement(attributes.moduleWidth, "0.25mm"); 40687 this.printCheckDigit = getInteger({ 40688 data: attributes.printCheckDigit, 40689 defaultValue: 0, 40690 validate: x => x === 1 40691 }); 40692 this.rowColumnRatio = getRatio(attributes.rowColumnRatio); 40693 this.startChar = attributes.startChar || ""; 40694 this.textLocation = getStringOption(attributes.textLocation, ["below", "above", "aboveEmbedded", "belowEmbedded", "none"]); 40695 this.truncate = getInteger({ 40696 data: attributes.truncate, 40697 defaultValue: 0, 40698 validate: x => x === 1 40699 }); 40700 this.type = getStringOption(attributes.type ? attributes.type.toLowerCase() : "", ["aztec", "codabar", "code2of5industrial", "code2of5interleaved", "code2of5matrix", "code2of5standard", "code3of9", "code3of9extended", "code11", "code49", "code93", "code128", "code128a", "code128b", "code128c", "code128sscc", "datamatrix", "ean8", "ean8add2", "ean8add5", "ean13", "ean13add2", "ean13add5", "ean13pwcd", "fim", "logmars", "maxicode", "msi", "pdf417", "pdf417macro", "plessey", "postauscust2", "postauscust3", "postausreplypaid", "postausstandard", "postukrm4scc", "postusdpbc", "postusimb", "postusstandard", "postus5zip", "qrcode", "rfid", "rss14", "rss14expanded", "rss14limited", "rss14stacked", "rss14stackedomni", "rss14truncated", "telepen", "ucc128", "ucc128random", "ucc128sscc", "upca", "upcaadd2", "upcaadd5", "upcapwcd", "upce", "upceadd2", "upceadd5", "upcean2", "upcean5", "upsmaxicode"]); 40701 this.upsMode = getStringOption(attributes.upsMode, ["usCarrier", "internationalCarrier", "secureSymbol", "standardSymbol"]); 40702 this.use = attributes.use || ""; 40703 this.usehref = attributes.usehref || ""; 40704 this.wideNarrowRatio = getRatio(attributes.wideNarrowRatio); 40705 this.encrypt = null; 40706 this.extras = null; 40707 } 40708} 40709class Bind extends XFAObject { 40710 constructor(attributes) { 40711 super(TEMPLATE_NS_ID, "bind", true); 40712 this.match = getStringOption(attributes.match, ["once", "dataRef", "global", "none"]); 40713 this.ref = attributes.ref || ""; 40714 this.picture = null; 40715 } 40716} 40717class BindItems extends XFAObject { 40718 constructor(attributes) { 40719 super(TEMPLATE_NS_ID, "bindItems"); 40720 this.connection = attributes.connection || ""; 40721 this.labelRef = attributes.labelRef || ""; 40722 this.ref = attributes.ref || ""; 40723 this.valueRef = attributes.valueRef || ""; 40724 } 40725} 40726class Bookend extends XFAObject { 40727 constructor(attributes) { 40728 super(TEMPLATE_NS_ID, "bookend"); 40729 this.id = attributes.id || ""; 40730 this.leader = attributes.leader || ""; 40731 this.trailer = attributes.trailer || ""; 40732 this.use = attributes.use || ""; 40733 this.usehref = attributes.usehref || ""; 40734 } 40735} 40736class BooleanElement extends Option01 { 40737 constructor(attributes) { 40738 super(TEMPLATE_NS_ID, "boolean"); 40739 this.id = attributes.id || ""; 40740 this.name = attributes.name || ""; 40741 this.use = attributes.use || ""; 40742 this.usehref = attributes.usehref || ""; 40743 } 40744 [$toHTML](availableSpace) { 40745 return valueToHtml(this[$content] === 1 ? "1" : "0"); 40746 } 40747} 40748class Border extends XFAObject { 40749 constructor(attributes) { 40750 super(TEMPLATE_NS_ID, "border", true); 40751 this.break = getStringOption(attributes.break, ["close", "open"]); 40752 this.hand = getStringOption(attributes.hand, ["even", "left", "right"]); 40753 this.id = attributes.id || ""; 40754 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 40755 this.relevant = getRelevant(attributes.relevant); 40756 this.use = attributes.use || ""; 40757 this.usehref = attributes.usehref || ""; 40758 this.corner = new XFAObjectArray(4); 40759 this.edge = new XFAObjectArray(4); 40760 this.extras = null; 40761 this.fill = null; 40762 this.margin = null; 40763 } 40764 [$getExtra]() { 40765 if (!this[$extra]) { 40766 const edges = this.edge.children.slice(); 40767 if (edges.length < 4) { 40768 const defaultEdge = edges.at(-1) || new Edge({}); 40769 for (let i = edges.length; i < 4; i++) { 40770 edges.push(defaultEdge); 40771 } 40772 } 40773 const widths = edges.map(edge => edge.thickness); 40774 const insets = [0, 0, 0, 0]; 40775 if (this.margin) { 40776 insets[0] = this.margin.topInset; 40777 insets[1] = this.margin.rightInset; 40778 insets[2] = this.margin.bottomInset; 40779 insets[3] = this.margin.leftInset; 40780 } 40781 this[$extra] = { 40782 widths, 40783 insets, 40784 edges 40785 }; 40786 } 40787 return this[$extra]; 40788 } 40789 [$toStyle]() { 40790 const { 40791 edges 40792 } = this[$getExtra](); 40793 const edgeStyles = edges.map(node => { 40794 const style = node[$toStyle](); 40795 style.color ||= "#000000"; 40796 return style; 40797 }); 40798 const style = Object.create(null); 40799 if (this.margin) { 40800 Object.assign(style, this.margin[$toStyle]()); 40801 } 40802 if (this.fill?.presence === "visible") { 40803 Object.assign(style, this.fill[$toStyle]()); 40804 } 40805 if (this.corner.children.some(node => node.radius !== 0)) { 40806 const cornerStyles = this.corner.children.map(node => node[$toStyle]()); 40807 if (cornerStyles.length === 2 || cornerStyles.length === 3) { 40808 const last = cornerStyles.at(-1); 40809 for (let i = cornerStyles.length; i < 4; i++) { 40810 cornerStyles.push(last); 40811 } 40812 } 40813 style.borderRadius = cornerStyles.map(s => s.radius).join(" "); 40814 } 40815 switch (this.presence) { 40816 case "invisible": 40817 case "hidden": 40818 style.borderStyle = ""; 40819 break; 40820 case "inactive": 40821 style.borderStyle = "none"; 40822 break; 40823 default: 40824 style.borderStyle = edgeStyles.map(s => s.style).join(" "); 40825 break; 40826 } 40827 style.borderWidth = edgeStyles.map(s => s.width).join(" "); 40828 style.borderColor = edgeStyles.map(s => s.color).join(" "); 40829 return style; 40830 } 40831} 40832class Break extends XFAObject { 40833 constructor(attributes) { 40834 super(TEMPLATE_NS_ID, "break", true); 40835 this.after = getStringOption(attributes.after, ["auto", "contentArea", "pageArea", "pageEven", "pageOdd"]); 40836 this.afterTarget = attributes.afterTarget || ""; 40837 this.before = getStringOption(attributes.before, ["auto", "contentArea", "pageArea", "pageEven", "pageOdd"]); 40838 this.beforeTarget = attributes.beforeTarget || ""; 40839 this.bookendLeader = attributes.bookendLeader || ""; 40840 this.bookendTrailer = attributes.bookendTrailer || ""; 40841 this.id = attributes.id || ""; 40842 this.overflowLeader = attributes.overflowLeader || ""; 40843 this.overflowTarget = attributes.overflowTarget || ""; 40844 this.overflowTrailer = attributes.overflowTrailer || ""; 40845 this.startNew = getInteger({ 40846 data: attributes.startNew, 40847 defaultValue: 0, 40848 validate: x => x === 1 40849 }); 40850 this.use = attributes.use || ""; 40851 this.usehref = attributes.usehref || ""; 40852 this.extras = null; 40853 } 40854} 40855class BreakAfter extends XFAObject { 40856 constructor(attributes) { 40857 super(TEMPLATE_NS_ID, "breakAfter", true); 40858 this.id = attributes.id || ""; 40859 this.leader = attributes.leader || ""; 40860 this.startNew = getInteger({ 40861 data: attributes.startNew, 40862 defaultValue: 0, 40863 validate: x => x === 1 40864 }); 40865 this.target = attributes.target || ""; 40866 this.targetType = getStringOption(attributes.targetType, ["auto", "contentArea", "pageArea"]); 40867 this.trailer = attributes.trailer || ""; 40868 this.use = attributes.use || ""; 40869 this.usehref = attributes.usehref || ""; 40870 this.script = null; 40871 } 40872} 40873class BreakBefore extends XFAObject { 40874 constructor(attributes) { 40875 super(TEMPLATE_NS_ID, "breakBefore", true); 40876 this.id = attributes.id || ""; 40877 this.leader = attributes.leader || ""; 40878 this.startNew = getInteger({ 40879 data: attributes.startNew, 40880 defaultValue: 0, 40881 validate: x => x === 1 40882 }); 40883 this.target = attributes.target || ""; 40884 this.targetType = getStringOption(attributes.targetType, ["auto", "contentArea", "pageArea"]); 40885 this.trailer = attributes.trailer || ""; 40886 this.use = attributes.use || ""; 40887 this.usehref = attributes.usehref || ""; 40888 this.script = null; 40889 } 40890 [$toHTML](availableSpace) { 40891 this[$extra] = {}; 40892 return HTMLResult.FAILURE; 40893 } 40894} 40895class Button extends XFAObject { 40896 constructor(attributes) { 40897 super(TEMPLATE_NS_ID, "button", true); 40898 this.highlight = getStringOption(attributes.highlight, ["inverted", "none", "outline", "push"]); 40899 this.id = attributes.id || ""; 40900 this.use = attributes.use || ""; 40901 this.usehref = attributes.usehref || ""; 40902 this.extras = null; 40903 } 40904 [$toHTML](availableSpace) { 40905 const parent = this[$getParent](); 40906 const grandpa = parent[$getParent](); 40907 const htmlButton = { 40908 name: "button", 40909 attributes: { 40910 id: this[$uid], 40911 class: ["xfaButton"], 40912 style: {} 40913 }, 40914 children: [] 40915 }; 40916 for (const event of grandpa.event.children) { 40917 if (event.activity !== "click" || !event.script) { 40918 continue; 40919 } 40920 const jsURL = recoverJsURL(event.script[$content]); 40921 if (!jsURL) { 40922 continue; 40923 } 40924 const href = fixURL(jsURL.url); 40925 if (!href) { 40926 continue; 40927 } 40928 htmlButton.children.push({ 40929 name: "a", 40930 attributes: { 40931 id: "link" + this[$uid], 40932 href, 40933 newWindow: jsURL.newWindow, 40934 class: ["xfaLink"], 40935 style: {} 40936 }, 40937 children: [] 40938 }); 40939 } 40940 return HTMLResult.success(htmlButton); 40941 } 40942} 40943class Calculate extends XFAObject { 40944 constructor(attributes) { 40945 super(TEMPLATE_NS_ID, "calculate", true); 40946 this.id = attributes.id || ""; 40947 this.override = getStringOption(attributes.override, ["disabled", "error", "ignore", "warning"]); 40948 this.use = attributes.use || ""; 40949 this.usehref = attributes.usehref || ""; 40950 this.extras = null; 40951 this.message = null; 40952 this.script = null; 40953 } 40954} 40955class Caption extends XFAObject { 40956 constructor(attributes) { 40957 super(TEMPLATE_NS_ID, "caption", true); 40958 this.id = attributes.id || ""; 40959 this.placement = getStringOption(attributes.placement, ["left", "bottom", "inline", "right", "top"]); 40960 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 40961 this.reserve = Math.ceil(getMeasurement(attributes.reserve)); 40962 this.use = attributes.use || ""; 40963 this.usehref = attributes.usehref || ""; 40964 this.extras = null; 40965 this.font = null; 40966 this.margin = null; 40967 this.para = null; 40968 this.value = null; 40969 } 40970 [$setValue](value) { 40971 _setValue(this, value); 40972 } 40973 [$getExtra](availableSpace) { 40974 if (!this[$extra]) { 40975 let { 40976 width, 40977 height 40978 } = availableSpace; 40979 switch (this.placement) { 40980 case "left": 40981 case "right": 40982 case "inline": 40983 width = this.reserve <= 0 ? width : this.reserve; 40984 break; 40985 case "top": 40986 case "bottom": 40987 height = this.reserve <= 0 ? height : this.reserve; 40988 break; 40989 } 40990 this[$extra] = layoutNode(this, { 40991 width, 40992 height 40993 }); 40994 } 40995 return this[$extra]; 40996 } 40997 [$toHTML](availableSpace) { 40998 if (!this.value) { 40999 return HTMLResult.EMPTY; 41000 } 41001 this[$pushPara](); 41002 const value = this.value[$toHTML](availableSpace).html; 41003 if (!value) { 41004 this[$popPara](); 41005 return HTMLResult.EMPTY; 41006 } 41007 const savedReserve = this.reserve; 41008 if (this.reserve <= 0) { 41009 const { 41010 w, 41011 h 41012 } = this[$getExtra](availableSpace); 41013 switch (this.placement) { 41014 case "left": 41015 case "right": 41016 case "inline": 41017 this.reserve = w; 41018 break; 41019 case "top": 41020 case "bottom": 41021 this.reserve = h; 41022 break; 41023 } 41024 } 41025 const children = []; 41026 if (typeof value === "string") { 41027 children.push({ 41028 name: "#text", 41029 value 41030 }); 41031 } else { 41032 children.push(value); 41033 } 41034 const style = toStyle(this, "font", "margin", "visibility"); 41035 switch (this.placement) { 41036 case "left": 41037 case "right": 41038 if (this.reserve > 0) { 41039 style.width = measureToString(this.reserve); 41040 } 41041 break; 41042 case "top": 41043 case "bottom": 41044 if (this.reserve > 0) { 41045 style.height = measureToString(this.reserve); 41046 } 41047 break; 41048 } 41049 setPara(this, null, value); 41050 this[$popPara](); 41051 this.reserve = savedReserve; 41052 return HTMLResult.success({ 41053 name: "div", 41054 attributes: { 41055 style, 41056 class: ["xfaCaption"] 41057 }, 41058 children 41059 }); 41060 } 41061} 41062class Certificate extends StringObject { 41063 constructor(attributes) { 41064 super(TEMPLATE_NS_ID, "certificate"); 41065 this.id = attributes.id || ""; 41066 this.name = attributes.name || ""; 41067 this.use = attributes.use || ""; 41068 this.usehref = attributes.usehref || ""; 41069 } 41070} 41071class Certificates extends XFAObject { 41072 constructor(attributes) { 41073 super(TEMPLATE_NS_ID, "certificates", true); 41074 this.credentialServerPolicy = getStringOption(attributes.credentialServerPolicy, ["optional", "required"]); 41075 this.id = attributes.id || ""; 41076 this.url = attributes.url || ""; 41077 this.urlPolicy = attributes.urlPolicy || ""; 41078 this.use = attributes.use || ""; 41079 this.usehref = attributes.usehref || ""; 41080 this.encryption = null; 41081 this.issuers = null; 41082 this.keyUsage = null; 41083 this.oids = null; 41084 this.signing = null; 41085 this.subjectDNs = null; 41086 } 41087} 41088class CheckButton extends XFAObject { 41089 constructor(attributes) { 41090 super(TEMPLATE_NS_ID, "checkButton", true); 41091 this.id = attributes.id || ""; 41092 this.mark = getStringOption(attributes.mark, ["default", "check", "circle", "cross", "diamond", "square", "star"]); 41093 this.shape = getStringOption(attributes.shape, ["square", "round"]); 41094 this.size = getMeasurement(attributes.size, "10pt"); 41095 this.use = attributes.use || ""; 41096 this.usehref = attributes.usehref || ""; 41097 this.border = null; 41098 this.extras = null; 41099 this.margin = null; 41100 } 41101 [$toHTML](availableSpace) { 41102 const style = toStyle(
vendor: 2,525 bytes, lines 41102-41183
41102"margin"); 41103 const size = measureToString(this.size); 41104 style.width = style.height = size; 41105 let type; 41106 let className; 41107 let groupId; 41108 const field = this[$getParent]()[$getParent](); 41109 const items = field.items.children.length && field.items.children[0][$toHTML]().html || []; 41110 const exportedValue = { 41111 on: (items[0] !== undefined ? items[0] : "on").toString(), 41112 off: (items[1] !== undefined ? items[1] : "off").toString() 41113 }; 41114 const value = field.value?.[$text]() || "off"; 41115 const checked = value === exportedValue.on || undefined; 41116 const container = field[$getSubformParent](); 41117 const fieldId = field[$uid]; 41118 let dataId; 41119 if (container instanceof ExclGroup) { 41120 groupId = container[$uid]; 41121 type = "radio"; 41122 className = "xfaRadio"; 41123 dataId = container[$data]?.[$uid] || container[$uid]; 41124 } else { 41125 type = "checkbox"; 41126 className = "xfaCheckbox"; 41127 dataId = field[$data]?.[$uid] || field[$uid]; 41128 } 41129 const input = { 41130 name: "input", 41131 attributes: { 41132 class: [className], 41133 style, 41134 fieldId, 41135 dataId, 41136 type, 41137 checked, 41138 xfaOn: exportedValue.on, 41139 xfaOff: exportedValue.off, 41140 "aria-label": ariaLabel(field), 41141 "aria-required": false 41142 } 41143 }; 41144 if (groupId) { 41145 input.attributes.name = groupId; 41146 } 41147 if (isRequired(field)) { 41148 input.attributes["aria-required"] = true; 41149 input.attributes.required = true; 41150 } 41151 return HTMLResult.success({ 41152 name: "label", 41153 attributes: { 41154 class: ["xfaLabel"] 41155 }, 41156 children: [input] 41157 }); 41158 } 41159} 41160class ChoiceList extends XFAObject { 41161 constructor(attributes) { 41162 super(TEMPLATE_NS_ID, "choiceList", true); 41163 this.commitOn = getStringOption(attributes.commitOn, ["select", "exit"]); 41164 this.id = attributes.id || ""; 41165 this.open = getStringOption(attributes.open, ["userControl", "always", "multiSelect", "onEntry"]); 41166 this.textEntry = getInteger({ 41167 data: attributes.textEntry, 41168 defaultValue: 0, 41169 validate: x => x === 1 41170 }); 41171 this.use = attributes.use || ""; 41172 this.usehref = attributes.usehref || ""; 41173 this.border = null; 41174 this.extras = null; 41175 this.margin = null; 41176 } 41177 [$toHTML](availableSpace) { 41178 const style = toStyle(this, "border", "margin"); 41179 const ui = this[$getParent](); 41180 const field = ui[$getParent](); 41181 const fontSize = field.font?.size || 10; 41182 const optionStyle = { 41183 fontSize: `calc(${fontSize}px * var(-
vendor: 24,362 bytes, lines 41183-41929
41183-scale-factor))` 41184 }; 41185 const children = []; 41186 if (field.items.children.length > 0) { 41187 const items = field.items; 41188 let displayedIndex = 0; 41189 let saveIndex = 0; 41190 if (items.children.length === 2) { 41191 displayedIndex = items.children[0].save; 41192 saveIndex = 1 - displayedIndex; 41193 } 41194 const displayed = items.children[displayedIndex][$toHTML]().html; 41195 const values = items.children[saveIndex][$toHTML]().html; 41196 let selected = false; 41197 const value = field.value?.[$text]() || ""; 41198 for (let i = 0, ii = displayed.length; i < ii; i++) { 41199 const option = { 41200 name: "option", 41201 attributes: { 41202 value: values[i] || displayed[i], 41203 style: optionStyle 41204 }, 41205 value: displayed[i] 41206 }; 41207 if (values[i] === value) { 41208 option.attributes.selected = selected = true; 41209 } 41210 children.push(option); 41211 } 41212 if (!selected) { 41213 children.splice(0, 0, { 41214 name: "option", 41215 attributes: { 41216 hidden: true, 41217 selected: true 41218 }, 41219 value: " " 41220 }); 41221 } 41222 } 41223 const selectAttributes = { 41224 class: ["xfaSelect"], 41225 fieldId: field[$uid], 41226 dataId: field[$data]?.[$uid] || field[$uid], 41227 style, 41228 "aria-label": ariaLabel(field), 41229 "aria-required": false 41230 }; 41231 if (isRequired(field)) { 41232 selectAttributes["aria-required"] = true; 41233 selectAttributes.required = true; 41234 } 41235 if (this.open === "multiSelect") { 41236 selectAttributes.multiple = true; 41237 } 41238 return HTMLResult.success({ 41239 name: "label", 41240 attributes: { 41241 class: ["xfaLabel"] 41242 }, 41243 children: [{ 41244 name: "select", 41245 children, 41246 attributes: selectAttributes 41247 }] 41248 }); 41249 } 41250} 41251class Color extends XFAObject { 41252 constructor(attributes) { 41253 super(TEMPLATE_NS_ID, "color", true); 41254 this.cSpace = getStringOption(attributes.cSpace, ["SRGB"]); 41255 this.id = attributes.id || ""; 41256 this.use = attributes.use || ""; 41257 this.usehref = attributes.usehref || ""; 41258 this.value = attributes.value ? getColor(attributes.value) : ""; 41259 this.extras = null; 41260 } 41261 [$hasSettableValue]() { 41262 return false; 41263 } 41264 [$toStyle]() { 41265 return this.value ? Util.makeHexColor(this.value.r, this.value.g, this.value.b) : null; 41266 } 41267} 41268class Comb extends XFAObject { 41269 constructor(attributes) { 41270 super(TEMPLATE_NS_ID, "comb"); 41271 this.id = attributes.id || ""; 41272 this.numberOfCells = getInteger({ 41273 data: attributes.numberOfCells, 41274 defaultValue: 0, 41275 validate: x => x >= 0 41276 }); 41277 this.use = attributes.use || ""; 41278 this.usehref = attributes.usehref || ""; 41279 } 41280} 41281class Connect extends XFAObject { 41282 constructor(attributes) { 41283 super(TEMPLATE_NS_ID, "connect", true); 41284 this.connection = attributes.connection || ""; 41285 this.id = attributes.id || ""; 41286 this.ref = attributes.ref || ""; 41287 this.usage = getStringOption(attributes.usage, ["exportAndImport", "exportOnly", "importOnly"]); 41288 this.use = attributes.use || ""; 41289 this.usehref = attributes.usehref || ""; 41290 this.picture = null; 41291 } 41292} 41293class ContentArea extends XFAObject { 41294 constructor(attributes) { 41295 super(TEMPLATE_NS_ID, "contentArea", true); 41296 this.h = getMeasurement(attributes.h); 41297 this.id = attributes.id || ""; 41298 this.name = attributes.name || ""; 41299 this.relevant = getRelevant(attributes.relevant); 41300 this.use = attributes.use || ""; 41301 this.usehref = attributes.usehref || ""; 41302 this.w = getMeasurement(attributes.w); 41303 this.x = getMeasurement(attributes.x, "0pt"); 41304 this.y = getMeasurement(attributes.y, "0pt"); 41305 this.desc = null; 41306 this.extras = null; 41307 } 41308 [$toHTML](availableSpace) { 41309 const left = measureToString(this.x); 41310 const top = measureToString(this.y); 41311 const style = { 41312 left, 41313 top, 41314 width: measureToString(this.w), 41315 height: measureToString(this.h) 41316 }; 41317 const classNames = ["xfaContentarea"]; 41318 if (isPrintOnly(this)) { 41319 classNames.push("xfaPrintOnly"); 41320 } 41321 return HTMLResult.success({ 41322 name: "div", 41323 children: [], 41324 attributes: { 41325 style, 41326 class: classNames, 41327 id: this[$uid] 41328 } 41329 }); 41330 } 41331} 41332class Corner extends XFAObject { 41333 constructor(attributes) { 41334 super(TEMPLATE_NS_ID, "corner", true); 41335 this.id = attributes.id || ""; 41336 this.inverted = getInteger({ 41337 data: attributes.inverted, 41338 defaultValue: 0, 41339 validate: x => x === 1 41340 }); 41341 this.join = getStringOption(attributes.join, ["square", "round"]); 41342 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 41343 this.radius = getMeasurement(attributes.radius); 41344 this.stroke = getStringOption(attributes.stroke, ["solid", "dashDot", "dashDotDot", "dashed", "dotted", "embossed", "etched", "lowered", "raised"]); 41345 this.thickness = getMeasurement(attributes.thickness, "0.5pt"); 41346 this.use = attributes.use || ""; 41347 this.usehref = attributes.usehref || ""; 41348 this.color = null; 41349 this.extras = null; 41350 } 41351 [$toStyle]() { 41352 const style = toStyle(this, "visibility"); 41353 style.radius = measureToString(this.join === "square" ? 0 : this.radius); 41354 return style; 41355 } 41356} 41357class DateElement extends ContentObject { 41358 constructor(attributes) { 41359 super(TEMPLATE_NS_ID, "date"); 41360 this.id = attributes.id || ""; 41361 this.name = attributes.name || ""; 41362 this.use = attributes.use || ""; 41363 this.usehref = attributes.usehref || ""; 41364 } 41365 [$finalize]() { 41366 const date = this[$content].trim(); 41367 this[$content] = date ? new Date(date) : null; 41368 } 41369 [$toHTML](availableSpace) { 41370 return valueToHtml(this[$content] ? this[$content].toString() : ""); 41371 } 41372} 41373class DateTime extends ContentObject { 41374 constructor(attributes) { 41375 super(TEMPLATE_NS_ID, "dateTime"); 41376 this.id = attributes.id || ""; 41377 this.name = attributes.name || ""; 41378 this.use = attributes.use || ""; 41379 this.usehref = attributes.usehref || ""; 41380 } 41381 [$finalize]() { 41382 const date = this[$content].trim(); 41383 this[$content] = date ? new Date(date) : null; 41384 } 41385 [$toHTML](availableSpace) { 41386 return valueToHtml(this[$content] ? this[$content].toString() : ""); 41387 } 41388} 41389class DateTimeEdit extends XFAObject { 41390 constructor(attributes) { 41391 super(TEMPLATE_NS_ID, "dateTimeEdit", true); 41392 this.hScrollPolicy = getStringOption(attributes.hScrollPolicy, ["auto", "off", "on"]); 41393 this.id = attributes.id || ""; 41394 this.picker = getStringOption(attributes.picker, ["host", "none"]); 41395 this.use = attributes.use || ""; 41396 this.usehref = attributes.usehref || ""; 41397 this.border = null; 41398 this.comb = null; 41399 this.extras = null; 41400 this.margin = null; 41401 } 41402 [$toHTML](availableSpace) { 41403 const style = toStyle(this, "border", "font", "margin"); 41404 const field = this[$getParent]()[$getParent](); 41405 const html = { 41406 name: "input", 41407 attributes: { 41408 type: "text", 41409 fieldId: field[$uid], 41410 dataId: field[$data]?.[$uid] || field[$uid], 41411 class: ["xfaTextfield"], 41412 style, 41413 "aria-label": ariaLabel(field), 41414 "aria-required": false 41415 } 41416 }; 41417 if (isRequired(field)) { 41418 html.attributes["aria-required"] = true; 41419 html.attributes.required = true; 41420 } 41421 return HTMLResult.success({ 41422 name: "label", 41423 attributes: { 41424 class: ["xfaLabel"] 41425 }, 41426 children: [html] 41427 }); 41428 } 41429} 41430class Decimal extends ContentObject { 41431 constructor(attributes) { 41432 super(TEMPLATE_NS_ID, "decimal"); 41433 this.fracDigits = getInteger({ 41434 data: attributes.fracDigits, 41435 defaultValue: 2, 41436 validate: x => true 41437 }); 41438 this.id = attributes.id || ""; 41439 this.leadDigits = getInteger({ 41440 data: attributes.leadDigits, 41441 defaultValue: -1, 41442 validate: x => true 41443 }); 41444 this.name = attributes.name || ""; 41445 this.use = attributes.use || ""; 41446 this.usehref = attributes.usehref || ""; 41447 } 41448 [$finalize]() { 41449 const number = parseFloat(this[$content].trim()); 41450 this[$content] = isNaN(number) ? null : number; 41451 } 41452 [$toHTML](availableSpace) { 41453 return valueToHtml(this[$content] !== null ? this[$content].toString() : ""); 41454 } 41455} 41456class DefaultUi extends XFAObject { 41457 constructor(attributes) { 41458 super(TEMPLATE_NS_ID, "defaultUi", true); 41459 this.id = attributes.id || ""; 41460 this.use = attributes.use || ""; 41461 this.usehref = attributes.usehref || ""; 41462 this.extras = null; 41463 } 41464} 41465class Desc extends XFAObject { 41466 constructor(attributes) { 41467 super(TEMPLATE_NS_ID, "desc", true); 41468 this.id = attributes.id || ""; 41469 this.use = attributes.use || ""; 41470 this.usehref = attributes.usehref || ""; 41471 this.boolean = new XFAObjectArray(); 41472 this.date = new XFAObjectArray(); 41473 this.dateTime = new XFAObjectArray(); 41474 this.decimal = new XFAObjectArray(); 41475 this.exData = new XFAObjectArray(); 41476 this.float = new XFAObjectArray(); 41477 this.image = new XFAObjectArray(); 41478 this.integer = new XFAObjectArray(); 41479 this.text = new XFAObjectArray(); 41480 this.time = new XFAObjectArray(); 41481 } 41482} 41483class DigestMethod extends OptionObject { 41484 constructor(attributes) { 41485 super(TEMPLATE_NS_ID, "digestMethod", ["", "SHA1", "SHA256", "SHA512", "RIPEMD160"]); 41486 this.id = attributes.id || ""; 41487 this.use = attributes.use || ""; 41488 this.usehref = attributes.usehref || ""; 41489 } 41490} 41491class DigestMethods extends XFAObject { 41492 constructor(attributes) { 41493 super(TEMPLATE_NS_ID, "digestMethods", true); 41494 this.id = attributes.id || ""; 41495 this.type = getStringOption(attributes.type, ["optional", "required"]); 41496 this.use = attributes.use || ""; 41497 this.usehref = attributes.usehref || ""; 41498 this.digestMethod = new XFAObjectArray(); 41499 } 41500} 41501class Draw extends XFAObject { 41502 constructor(attributes) { 41503 super(TEMPLATE_NS_ID, "draw", true); 41504 this.anchorType = getStringOption(attributes.anchorType, ["topLeft", "bottomCenter", "bottomLeft", "bottomRight", "middleCenter", "middleLeft", "middleRight", "topCenter", "topRight"]); 41505 this.colSpan = getInteger({ 41506 data: attributes.colSpan, 41507 defaultValue: 1, 41508 validate: n => n >= 1 || n === -1 41509 }); 41510 this.h = attributes.h ? getMeasurement(attributes.h) : ""; 41511 this.hAlign = getStringOption(attributes.hAlign, ["left", "center", "justify", "justifyAll", "radix", "right"]); 41512 this.id = attributes.id || ""; 41513 this.locale = attributes.locale || ""; 41514 this.maxH = getMeasurement(attributes.maxH, "0pt"); 41515 this.maxW = getMeasurement(attributes.maxW, "0pt"); 41516 this.minH = getMeasurement(attributes.minH, "0pt"); 41517 this.minW = getMeasurement(attributes.minW, "0pt"); 41518 this.name = attributes.name || ""; 41519 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 41520 this.relevant = getRelevant(attributes.relevant); 41521 this.rotate = getInteger({ 41522 data: attributes.rotate, 41523 defaultValue: 0, 41524 validate: x => x % 90 === 0 41525 }); 41526 this.use = attributes.use || ""; 41527 this.usehref = attributes.usehref || ""; 41528 this.w = attributes.w ? getMeasurement(attributes.w) : ""; 41529 this.x = getMeasurement(attributes.x, "0pt"); 41530 this.y = getMeasurement(attributes.y, "0pt"); 41531 this.assist = null; 41532 this.border = null; 41533 this.caption = null; 41534 this.desc = null; 41535 this.extras = null; 41536 this.font = null; 41537 this.keep = null; 41538 this.margin = null; 41539 this.para = null; 41540 this.traversal = null; 41541 this.ui = null; 41542 this.value = null; 41543 this.setProperty = new XFAObjectArray(); 41544 } 41545 [$setValue](value) { 41546 _setValue(this, value); 41547 } 41548 [$toHTML](availableSpace) { 41549 setTabIndex(this); 41550 if (this.presence === "hidden" || this.presence === "inactive") { 41551 return HTMLResult.EMPTY; 41552 } 41553 fixDimensions(this); 41554 this[$pushPara](); 41555 const savedW = this.w; 41556 const savedH = this.h; 41557 const { 41558 w, 41559 h, 41560 isBroken 41561 } = layoutNode(this, availableSpace); 41562 if (w && this.w === "") { 41563 if (isBroken && this[$getSubformParent]()[$isThereMoreWidth]()) { 41564 this[$popPara](); 41565 return HTMLResult.FAILURE; 41566 } 41567 this.w = w; 41568 } 41569 if (h && this.h === "") { 41570 this.h = h; 41571 } 41572 setFirstUnsplittable(this); 41573 if (!checkDimensions(this, availableSpace)) { 41574 this.w = savedW; 41575 this.h = savedH; 41576 this[$popPara](); 41577 return HTMLResult.FAILURE; 41578 } 41579 unsetFirstUnsplittable(this); 41580 const style = toStyle(this, "font", "hAlign", "dimensions", "position", "presence", "rotate", "anchorType", "border", "margin"); 41581 setMinMaxDimensions(this, style); 41582 if (style.margin) { 41583 style.padding = style.margin; 41584 delete style.margin; 41585 } 41586 const classNames = ["xfaDraw"]; 41587 if (this.font) { 41588 classNames.push("xfaFont"); 41589 } 41590 if (isPrintOnly(this)) { 41591 classNames.push("xfaPrintOnly"); 41592 } 41593 const attributes = { 41594 style, 41595 id: this[$uid], 41596 class: classNames 41597 }; 41598 if (this.name) { 41599 attributes.xfaName = this.name; 41600 } 41601 const html = { 41602 name: "div", 41603 attributes, 41604 children: [] 41605 }; 41606 applyAssist(this, attributes); 41607 const bbox = computeBbox(this, html, availableSpace); 41608 const value = this.value ? this.value[$toHTML](availableSpace).html : null; 41609 if (value === null) { 41610 this.w = savedW; 41611 this.h = savedH; 41612 this[$popPara](); 41613 return HTMLResult.success(createWrapper(this, html), bbox); 41614 } 41615 html.children.push(value); 41616 setPara(this, style, value); 41617 this.w = savedW; 41618 this.h = savedH; 41619 this[$popPara](); 41620 return HTMLResult.success(createWrapper(this, html), bbox); 41621 } 41622} 41623class Edge extends XFAObject { 41624 constructor(attributes) { 41625 super(TEMPLATE_NS_ID, "edge", true); 41626 this.cap = getStringOption(attributes.cap, ["square", "butt", "round"]); 41627 this.id = attributes.id || ""; 41628 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 41629 this.stroke = getStringOption(attributes.stroke, ["solid", "dashDot", "dashDotDot", "dashed", "dotted", "embossed", "etched", "lowered", "raised"]); 41630 this.thickness = getMeasurement(attributes.thickness, "0.5pt"); 41631 this.use = attributes.use || ""; 41632 this.usehref = attributes.usehref || ""; 41633 this.color = null; 41634 this.extras = null; 41635 } 41636 [$toStyle]() { 41637 const style = toStyle(this, "visibility"); 41638 Object.assign(style, { 41639 linecap: this.cap, 41640 width: measureToString(this.thickness), 41641 color: this.color ? this.color[$toStyle]() : "#000000", 41642 style: "" 41643 }); 41644 if (this.presence !== "visible") { 41645 style.style = "none"; 41646 } else { 41647 switch (this.stroke) { 41648 case "solid": 41649 style.style = "solid"; 41650 break; 41651 case "dashDot": 41652 style.style = "dashed"; 41653 break; 41654 case "dashDotDot": 41655 style.style = "dashed"; 41656 break; 41657 case "dashed": 41658 style.style = "dashed"; 41659 break; 41660 case "dotted": 41661 style.style = "dotted"; 41662 break; 41663 case "embossed": 41664 style.style = "ridge"; 41665 break; 41666 case "etched": 41667 style.style = "groove"; 41668 break; 41669 case "lowered": 41670 style.style = "inset"; 41671 break; 41672 case "raised": 41673 style.style = "outset"; 41674 break; 41675 } 41676 } 41677 return style; 41678 } 41679} 41680class Encoding extends OptionObject { 41681 constructor(attributes) { 41682 super(TEMPLATE_NS_ID, "encoding", ["adbe.x509.rsa_sha1", "adbe.pkcs7.detached", "adbe.pkcs7.sha1"]); 41683 this.id = attributes.id || ""; 41684 this.use = attributes.use || ""; 41685 this.usehref = attributes.usehref || ""; 41686 } 41687} 41688class Encodings extends XFAObject { 41689 constructor(attributes) { 41690 super(TEMPLATE_NS_ID, "encodings", true); 41691 this.id = attributes.id || ""; 41692 this.type = getStringOption(attributes.type, ["optional", "required"]); 41693 this.use = attributes.use || ""; 41694 this.usehref = attributes.usehref || ""; 41695 this.encoding = new XFAObjectArray(); 41696 } 41697} 41698class Encrypt extends XFAObject { 41699 constructor(attributes) { 41700 super(TEMPLATE_NS_ID, "encrypt", true); 41701 this.id = attributes.id || ""; 41702 this.use = attributes.use || ""; 41703 this.usehref = attributes.usehref || ""; 41704 this.certificate = null; 41705 } 41706} 41707class EncryptData extends XFAObject { 41708 constructor(attributes) { 41709 super(TEMPLATE_NS_ID, "encryptData", true); 41710 this.id = attributes.id || ""; 41711 this.operation = getStringOption(attributes.operation, ["encrypt", "decrypt"]); 41712 this.target = attributes.target || ""; 41713 this.use = attributes.use || ""; 41714 this.usehref = attributes.usehref || ""; 41715 this.filter = null; 41716 this.manifest = null; 41717 } 41718} 41719class Encryption extends XFAObject { 41720 constructor(attributes) { 41721 super(TEMPLATE_NS_ID, "encryption", true); 41722 this.id = attributes.id || ""; 41723 this.type = getStringOption(attributes.type, ["optional", "required"]); 41724 this.use = attributes.use || ""; 41725 this.usehref = attributes.usehref || ""; 41726 this.certificate = new XFAObjectArray(); 41727 } 41728} 41729class EncryptionMethod extends OptionObject { 41730 constructor(attributes) { 41731 super(TEMPLATE_NS_ID, "encryptionMethod", ["", "AES256-CBC", "TRIPLEDES-CBC", "AES128-CBC", "AES192-CBC"]); 41732 this.id = attributes.id || ""; 41733 this.use = attributes.use || ""; 41734 this.usehref = attributes.usehref || ""; 41735 } 41736} 41737class EncryptionMethods extends XFAObject { 41738 constructor(attributes) { 41739 super(TEMPLATE_NS_ID, "encryptionMethods", true); 41740 this.id = attributes.id || ""; 41741 this.type = getStringOption(attributes.type, ["optional", "required"]); 41742 this.use = attributes.use || ""; 41743 this.usehref = attributes.usehref || ""; 41744 this.encryptionMethod = new XFAObjectArray(); 41745 } 41746} 41747class Event extends XFAObject { 41748 constructor(attributes) { 41749 super(TEMPLATE_NS_ID, "event", true); 41750 this.activity = getStringOption(attributes.activity, ["click", "change", "docClose", "docReady", "enter", "exit", "full", "indexChange", "initialize", "mouseDown", "mouseEnter", "mouseExit", "mouseUp", "postExecute", "postOpen", "postPrint", "postSave", "postSign", "postSubmit", "preExecute", "preOpen", "prePrint", "preSave", "preSign", "preSubmit", "ready", "validationState"]); 41751 this.id = attributes.id || ""; 41752 this.listen = getStringOption(attributes.listen, ["refOnly", "refAndDescendents"]); 41753 this.name = attributes.name || ""; 41754 this.ref = attributes.ref || ""; 41755 this.use = attributes.use || ""; 41756 this.usehref = attributes.usehref || ""; 41757 this.extras = null; 41758 this.encryptData = null; 41759 this.execute = null; 41760 this.script = null; 41761 this.signData = null; 41762 this.submit = null; 41763 } 41764} 41765class ExData extends ContentObject { 41766 constructor(attributes) { 41767 super(TEMPLATE_NS_ID, "exData"); 41768 this.contentType = attributes.contentType || ""; 41769 this.href = attributes.href || ""; 41770 this.id = attributes.id || ""; 41771 this.maxLength = getInteger({ 41772 data: attributes.maxLength, 41773 defaultValue: -1, 41774 validate: x => x >= -1 41775 }); 41776 this.name = attributes.name || ""; 41777 this.rid = attributes.rid || ""; 41778 this.transferEncoding = getStringOption(attributes.transferEncoding, ["none", "base64", "package"]); 41779 this.use = attributes.use || ""; 41780 this.usehref = attributes.usehref || ""; 41781 } 41782 [$isCDATAXml]() { 41783 return this.contentType === "text/html"; 41784 } 41785 [$onChild](child) { 41786 if (this.contentType === "text/html" && child[$namespaceId] === NamespaceIds.xhtml.id) { 41787 this[$content] = child; 41788 return true; 41789 } 41790 if (this.contentType === "text/xml") { 41791 this[$content] = child; 41792 return true; 41793 } 41794 return false; 41795 } 41796 [$toHTML](availableSpace) { 41797 if (this.contentType !== "text/html" || !this[$content]) { 41798 return HTMLResult.EMPTY; 41799 } 41800 return this[$content][$toHTML](availableSpace); 41801 } 41802} 41803class ExObject extends XFAObject { 41804 constructor(attributes) { 41805 super(TEMPLATE_NS_ID, "exObject", true); 41806 this.archive = attributes.archive || ""; 41807 this.classId = attributes.classId || ""; 41808 this.codeBase = attributes.codeBase || ""; 41809 this.codeType = attributes.codeType || ""; 41810 this.id = attributes.id || ""; 41811 this.name = attributes.name || ""; 41812 this.use = attributes.use || ""; 41813 this.usehref = attributes.usehref || ""; 41814 this.extras = null; 41815 this.boolean = new XFAObjectArray(); 41816 this.date = new XFAObjectArray(); 41817 this.dateTime = new XFAObjectArray(); 41818 this.decimal = new XFAObjectArray(); 41819 this.exData = new XFAObjectArray(); 41820 this.exObject = new XFAObjectArray(); 41821 this.float = new XFAObjectArray(); 41822 this.image = new XFAObjectArray(); 41823 this.integer = new XFAObjectArray(); 41824 this.text = new XFAObjectArray(); 41825 this.time = new XFAObjectArray(); 41826 } 41827} 41828class ExclGroup extends XFAObject { 41829 constructor(attributes) { 41830 super(TEMPLATE_NS_ID, "exclGroup", true); 41831 this.access = getStringOption(attributes.access, ["open", "nonInteractive", "protected", "readOnly"]); 41832 this.accessKey = attributes.accessKey || ""; 41833 this.anchorType = getStringOption(attributes.anchorType, ["topLeft", "bottomCenter", "bottomLeft", "bottomRight", "middleCenter", "middleLeft", "middleRight", "topCenter", "topRight"]); 41834 this.colSpan = getInteger({ 41835 data: attributes.colSpan, 41836 defaultValue: 1, 41837 validate: n => n >= 1 || n === -1 41838 }); 41839 this.h = attributes.h ? getMeasurement(attributes.h) : ""; 41840 this.hAlign = getStringOption(attributes.hAlign, ["left", "center", "justify", "justifyAll", "radix", "right"]); 41841 this.id = attributes.id || ""; 41842 this.layout = getStringOption(attributes.layout, ["position", "lr-tb", "rl-row", "rl-tb", "row", "table", "tb"]); 41843 this.maxH = getMeasurement(attributes.maxH, "0pt"); 41844 this.maxW = getMeasurement(attributes.maxW, "0pt"); 41845 this.minH = getMeasurement(attributes.minH, "0pt"); 41846 this.minW = getMeasurement(attributes.minW, "0pt"); 41847 this.name = attributes.name || ""; 41848 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 41849 this.relevant = getRelevant(attributes.relevant); 41850 this.use = attributes.use || ""; 41851 this.usehref = attributes.usehref || ""; 41852 this.w = attributes.w ? getMeasurement(attributes.w) : ""; 41853 this.x = getMeasurement(attributes.x, "0pt"); 41854 this.y = getMeasurement(attributes.y, "0pt"); 41855 this.assist = null; 41856 this.bind = null; 41857 this.border = null; 41858 this.calculate = null; 41859 this.caption = null; 41860 this.desc = null; 41861 this.extras = null; 41862 this.margin = null; 41863 this.para = null; 41864 this.traversal = null; 41865 this.validate = null; 41866 this.connect = new XFAObjectArray(); 41867 this.event = new XFAObjectArray(); 41868 this.field = new XFAObjectArray(); 41869 this.setProperty = new XFAObjectArray(); 41870 } 41871 [$isBindable]() { 41872 return true; 41873 } 41874 [$hasSettableValue]() { 41875 return true; 41876 } 41877 [$setValue](value) { 41878 for (const field of this.field.children) { 41879 if (!field.value) { 41880 const nodeValue = new Value({}); 41881 field[$appendChild](nodeValue); 41882 field.value = nodeValue; 41883 } 41884 field.value[$setValue](value); 41885 } 41886 } 41887 [$isThereMoreWidth]() { 41888 return this.layout.endsWith("-tb") && this[$extra].attempt === 0 && this[$extra].numberInLine > 0 || this[$getParent]()[$isThereMoreWidth](); 41889 } 41890 [$isSplittable]() { 41891 const parent = this[$getSubformParent](); 41892 if (!parent[$isSplittable]()) { 41893 return false; 41894 } 41895 if (this[$extra]._isSplittable !== undefined) { 41896 return this[$extra]._isSplittable; 41897 } 41898 if (this.layout === "position" || this.layout.includes("row")) { 41899 this[$extra]._isSplittable = false; 41900 return false; 41901 } 41902 if (parent.layout?.endsWith("-tb") && parent[$extra].numberInLine !== 0) { 41903 return false; 41904 } 41905 this[$extra]._isSplittable = true; 41906 return true; 41907 } 41908 [$flushHTML]() { 41909 return flushHTML(this); 41910 } 41911 [$addHTML](html, bbox) { 41912 addHTML(this, html, bbox); 41913 } 41914 [$getAvailableSpace]() { 41915 return getAvailableSpace(this); 41916 } 41917 [$toHTML](availableSpace) { 41918 setTabIndex(this); 41919 if (this.presence === "hidden" || this.presence === "inactive" || this.h === 0 || this.w === 0) { 41920 return HTMLResult.EMPTY; 41921 } 41922 fixDimensions(this); 41923 const children = []; 41924 const attributes = { 41925 id: this[$uid], 41926 class: [] 41927 }; 41928 setAccess(this, attributes.class); 41929
vendor: 7,481 bytes, lines 41929-42153
41929if (!this[$extra]) { 41930 this[$extra] = Object.create(null); 41931 } 41932 Object.assign(this[$extra], { 41933 children, 41934 attributes, 41935 attempt: 0, 41936 line: null, 41937 numberInLine: 0, 41938 availableSpace: { 41939 width: Math.min(this.w || Infinity, availableSpace.width), 41940 height: Math.min(this.h || Infinity, availableSpace.height) 41941 }, 41942 width: 0, 41943 height: 0, 41944 prevHeight: 0, 41945 currentWidth: 0 41946 }); 41947 const isSplittable = this[$isSplittable](); 41948 if (!isSplittable) { 41949 setFirstUnsplittable(this); 41950 } 41951 if (!checkDimensions(this, availableSpace)) { 41952 return HTMLResult.FAILURE; 41953 } 41954 const filter = new Set(["field"]); 41955 if (this.layout.includes("row")) { 41956 const columnWidths = this[$getSubformParent]().columnWidths; 41957 if (Array.isArray(columnWidths) && columnWidths.length > 0) { 41958 this[$extra].columnWidths = columnWidths; 41959 this[$extra].currentColumn = 0; 41960 } 41961 } 41962 const style = toStyle(this, "anchorType", "dimensions", "position", "presence", "border", "margin", "hAlign"); 41963 const classNames = ["xfaExclgroup"]; 41964 const cl = layoutClass(this); 41965 if (cl) { 41966 classNames.push(cl); 41967 } 41968 if (isPrintOnly(this)) { 41969 classNames.push("xfaPrintOnly"); 41970 } 41971 attributes.style = style; 41972 attributes.class = classNames; 41973 if (this.name) { 41974 attributes.xfaName = this.name; 41975 } 41976 this[$pushPara](); 41977 const isLrTb = this.layout === "lr-tb" || this.layout === "rl-tb"; 41978 const maxRun = isLrTb ? MAX_ATTEMPTS_FOR_LRTB_LAYOUT : 1; 41979 for (; this[$extra].attempt < maxRun; this[$extra].attempt++) { 41980 if (isLrTb && this[$extra].attempt === MAX_ATTEMPTS_FOR_LRTB_LAYOUT - 1) { 41981 this[$extra].numberInLine = 0; 41982 } 41983 const result = this[$childrenToHTML]({ 41984 filter, 41985 include: true 41986 }); 41987 if (result.success) { 41988 break; 41989 } 41990 if (result.isBreak()) { 41991 this[$popPara](); 41992 return result; 41993 } 41994 if (isLrTb && this[$extra].attempt === 0 && this[$extra].numberInLine === 0 && !this[$getTemplateRoot]()[$extra].noLayoutFailure) { 41995 this[$extra].attempt = maxRun; 41996 break; 41997 } 41998 } 41999 this[$popPara](); 42000 if (!isSplittable) { 42001 unsetFirstUnsplittable(this); 42002 } 42003 if (this[$extra].attempt === maxRun) { 42004 if (!isSplittable) { 42005 delete this[$extra]; 42006 } 42007 return HTMLResult.FAILURE; 42008 } 42009 let marginH = 0; 42010 let marginV = 0; 42011 if (this.margin) { 42012 marginH = this.margin.leftInset + this.margin.rightInset; 42013 marginV = this.margin.topInset + this.margin.bottomInset; 42014 } 42015 const width = Math.max(this[$extra].width + marginH, this.w || 0); 42016 const height = Math.max(this[$extra].height + marginV, this.h || 0); 42017 const bbox = [this.x, this.y, width, height]; 42018 if (this.w === "") { 42019 style.width = measureToString(width); 42020 } 42021 if (this.h === "") { 42022 style.height = measureToString(height); 42023 } 42024 const html = { 42025 name: "div", 42026 attributes, 42027 children 42028 }; 42029 applyAssist(this, attributes); 42030 delete this[$extra]; 42031 return HTMLResult.success(createWrapper(this, html), bbox); 42032 } 42033} 42034class Execute extends XFAObject { 42035 constructor(attributes) { 42036 super(TEMPLATE_NS_ID, "execute"); 42037 this.connection = attributes.connection || ""; 42038 this.executeType = getStringOption(attributes.executeType, ["import", "remerge"]); 42039 this.id = attributes.id || ""; 42040 this.runAt = getStringOption(attributes.runAt, ["client", "both", "server"]); 42041 this.use = attributes.use || ""; 42042 this.usehref = attributes.usehref || ""; 42043 } 42044} 42045class Extras extends XFAObject { 42046 constructor(attributes) { 42047 super(TEMPLATE_NS_ID, "extras", true); 42048 this.id = attributes.id || ""; 42049 this.name = attributes.name || ""; 42050 this.use = attributes.use || ""; 42051 this.usehref = attributes.usehref || ""; 42052 this.boolean = new XFAObjectArray(); 42053 this.date = new XFAObjectArray(); 42054 this.dateTime = new XFAObjectArray(); 42055 this.decimal = new XFAObjectArray(); 42056 this.exData = new XFAObjectArray(); 42057 this.extras = new XFAObjectArray(); 42058 this.float = new XFAObjectArray(); 42059 this.image = new XFAObjectArray(); 42060 this.integer = new XFAObjectArray(); 42061 this.text = new XFAObjectArray(); 42062 this.time = new XFAObjectArray(); 42063 } 42064} 42065class Field extends XFAObject { 42066 constructor(attributes) { 42067 super(TEMPLATE_NS_ID, "field", true); 42068 this.access = getStringOption(attributes.access, ["open", "nonInteractive", "protected", "readOnly"]); 42069 this.accessKey = attributes.accessKey || ""; 42070 this.anchorType = getStringOption(attributes.anchorType, ["topLeft", "bottomCenter", "bottomLeft", "bottomRight", "middleCenter", "middleLeft", "middleRight", "topCenter", "topRight"]); 42071 this.colSpan = getInteger({ 42072 data: attributes.colSpan, 42073 defaultValue: 1, 42074 validate: n => n >= 1 || n === -1 42075 }); 42076 this.h = attributes.h ? getMeasurement(attributes.h) : ""; 42077 this.hAlign = getStringOption(attributes.hAlign, ["left", "center", "justify", "justifyAll", "radix", "right"]); 42078 this.id = attributes.id || ""; 42079 this.locale = attributes.locale || ""; 42080 this.maxH = getMeasurement(attributes.maxH, "0pt"); 42081 this.maxW = getMeasurement(attributes.maxW, "0pt"); 42082 this.minH = getMeasurement(attributes.minH, "0pt"); 42083 this.minW = getMeasurement(attributes.minW, "0pt"); 42084 this.name = attributes.name || ""; 42085 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 42086 this.relevant = getRelevant(attributes.relevant); 42087 this.rotate = getInteger({ 42088 data: attributes.rotate, 42089 defaultValue: 0, 42090 validate: x => x % 90 === 0 42091 }); 42092 this.use = attributes.use || ""; 42093 this.usehref = attributes.usehref || ""; 42094 this.w = attributes.w ? getMeasurement(attributes.w) : ""; 42095 this.x = getMeasurement(attributes.x, "0pt"); 42096 this.y = getMeasurement(attributes.y, "0pt"); 42097 this.assist = null; 42098 this.bind = null; 42099 this.border = null; 42100 this.calculate = null; 42101 this.caption = null; 42102 this.desc = null; 42103 this.extras = null; 42104 this.font = null; 42105 this.format = null; 42106 this.items = new XFAObjectArray(2); 42107 this.keep = null; 42108 this.margin = null; 42109 this.para = null; 42110 this.traversal = null; 42111 this.ui = null; 42112 this.validate = null; 42113 this.value = null; 42114 this.bindItems = new XFAObjectArray(); 42115 this.connect = new XFAObjectArray(); 42116 this.event = new XFAObjectArray(); 42117 this.setProperty = new XFAObjectArray(); 42118 } 42119 [$isBindable]() { 42120 return true; 42121 } 42122 [$setValue](value) { 42123 _setValue(this, value); 42124 } 42125 [$toHTML](availableSpace) { 42126 setTabIndex(this); 42127 if (!this.ui) { 42128 this.ui = new Ui({}); 42129 this.ui[$globalData] = this[$globalData]; 42130 this[$appendChild](this.ui); 42131 let node; 42132 switch (this.items.children.length) { 42133 case 0: 42134 node = new TextEdit({}); 42135 this.ui.textEdit = node; 42136 break; 42137 case 1: 42138 node = new CheckButton({}); 42139 this.ui.checkButton = node; 42140 break; 42141 case 2: 42142 node = new ChoiceList({}); 42143 this.ui.choiceList = node; 42144 break; 42145 } 42146 this.ui[$appendChild](node); 42147 } 42148 if (!this.ui || this.presence === "hidden" || this.presence === "inactive" || this.h === 0 || this.w === 0) { 42149 return HTMLResult.EMPTY; 42150 } 42151 if (this.caption) { 42152 delete this.caption[$extra]; 42153 }
vendor: 6,269 bytes, lines 42154-42359
42154 this[$pushPara](); 42155 const caption = this.caption ? this.caption[$toHTML](availableSpace).html : null; 42156 const savedW = this.w; 42157 const savedH = this.h; 42158 let marginH = 0; 42159 let marginV = 0; 42160 if (this.margin) { 42161 marginH = this.margin.leftInset + this.margin.rightInset; 42162 marginV = this.margin.topInset + this.margin.bottomInset; 42163 } 42164 let borderDims = null; 42165 if (this.w === "" || this.h === "") { 42166 let width = null; 42167 let height = null; 42168 let uiW = 0; 42169 let uiH = 0; 42170 if (this.ui.checkButton) { 42171 uiW = uiH = this.ui.checkButton.size; 42172 } else { 42173 const { 42174 w, 42175 h 42176 } = layoutNode(this, availableSpace); 42177 if (w !== null) { 42178 uiW = w; 42179 uiH = h; 42180 } else { 42181 uiH = fonts_getMetrics(this.font, true).lineNoGap; 42182 } 42183 } 42184 borderDims = getBorderDims(this.ui[$getExtra]()); 42185 uiW += borderDims.w; 42186 uiH += borderDims.h; 42187 if (this.caption) { 42188 const { 42189 w, 42190 h, 42191 isBroken 42192 } = this.caption[$getExtra](availableSpace); 42193 if (isBroken && this[$getSubformParent]()[$isThereMoreWidth]()) { 42194 this[$popPara](); 42195 return HTMLResult.FAILURE; 42196 } 42197 width = w; 42198 height = h; 42199 switch (this.caption.placement) { 42200 case "left": 42201 case "right": 42202 case "inline": 42203 width += uiW; 42204 break; 42205 case "top": 42206 case "bottom": 42207 height += uiH; 42208 break; 42209 } 42210 } else { 42211 width = uiW; 42212 height = uiH; 42213 } 42214 if (width && this.w === "") { 42215 width += marginH; 42216 this.w = Math.min(this.maxW <= 0 ? Infinity : this.maxW, this.minW + 1 < width ? width : this.minW); 42217 } 42218 if (height && this.h === "") { 42219 height += marginV; 42220 this.h = Math.min(this.maxH <= 0 ? Infinity : this.maxH, this.minH + 1 < height ? height : this.minH); 42221 } 42222 } 42223 this[$popPara](); 42224 fixDimensions(this); 42225 setFirstUnsplittable(this); 42226 if (!checkDimensions(this, availableSpace)) { 42227 this.w = savedW; 42228 this.h = savedH; 42229 this[$popPara](); 42230 return HTMLResult.FAILURE; 42231 } 42232 unsetFirstUnsplittable(this); 42233 const style = toStyle(this, "font", "dimensions", "position", "rotate", "anchorType", "presence", "margin", "hAlign"); 42234 setMinMaxDimensions(this, style); 42235 const classNames = ["xfaField"]; 42236 if (this.font) { 42237 classNames.push("xfaFont"); 42238 } 42239 if (isPrintOnly(this)) { 42240 classNames.push("xfaPrintOnly"); 42241 } 42242 const attributes = { 42243 style, 42244 id: this[$uid], 42245 class: classNames 42246 }; 42247 if (style.margin) { 42248 style.padding = style.margin; 42249 delete style.margin; 42250 } 42251 setAccess(this, classNames); 42252 if (this.name) { 42253 attributes.xfaName = this.name; 42254 } 42255 const children = []; 42256 const html = { 42257 name: "div", 42258 attributes, 42259 children 42260 }; 42261 applyAssist(this, attributes); 42262 const borderStyle = this.border ? this.border[$toStyle]() : null; 42263 const bbox = computeBbox(this, html, availableSpace); 42264 const ui = this.ui[$toHTML]().html; 42265 if (!ui) { 42266 Object.assign(style, borderStyle); 42267 return HTMLResult.success(createWrapper(this, html), bbox); 42268 } 42269 if (this[$tabIndex]) { 42270 if (ui.children?.[0]) { 42271 ui.children[0].attributes.tabindex = this[$tabIndex]; 42272 } else { 42273 ui.attributes.tabindex = this[$tabIndex]; 42274 } 42275 } 42276 if (!ui.attributes.style) { 42277 ui.attributes.style = Object.create(null); 42278 } 42279 let aElement = null; 42280 if (this.ui.button) { 42281 if (ui.children.length === 1) { 42282 [aElement] = ui.children.splice(0, 1); 42283 } 42284 Object.assign(ui.attributes.style, borderStyle); 42285 } else { 42286 Object.assign(style, borderStyle); 42287 } 42288 children.push(ui); 42289 if (this.value) { 42290 if (this.ui.imageEdit) { 42291 ui.children.push(this.value[$toHTML]().html); 42292 } else if (!this.ui.button) { 42293 let value = ""; 42294 if (this.value.exData) { 42295 value = this.value.exData[$text](); 42296 } else if (this.value.text) { 42297 value = this.value.text[$getExtra](); 42298 } else { 42299 const htmlValue = this.value[$toHTML]().html; 42300 if (htmlValue !== null) { 42301 value = htmlValue.children[0].value; 42302 } 42303 } 42304 if (this.ui.textEdit && this.value.text?.maxChars) { 42305 ui.children[0].attributes.maxLength = this.value.text.maxChars; 42306 } 42307 if (value) { 42308 if (this.ui.numericEdit) { 42309 value = parseFloat(value); 42310 value = isNaN(value) ? "" : value.toString(); 42311 } 42312 if (ui.children[0].name === "textarea") { 42313 ui.children[0].attributes.textContent = value; 42314 } else { 42315 ui.children[0].attributes.value = value; 42316 } 42317 } 42318 } 42319 } 42320 if (!this.ui.imageEdit && ui.children?.[0] && this.h) { 42321 borderDims = borderDims || getBorderDims(this.ui[$getExtra]()); 42322 let captionHeight = 0; 42323 if (this.caption && ["top", "bottom"].includes(this.caption.placement)) { 42324 captionHeight = this.caption.reserve; 42325 if (captionHeight <= 0) { 42326 captionHeight = this.caption[$getExtra](availableSpace).h; 42327 } 42328 const inputHeight = this.h - captionHeight - marginV - borderDims.h; 42329 ui.children[0].attributes.style.height = measureToString(inputHeight); 42330 } else { 42331 ui.children[0].attributes.style.height = "100%"; 42332 } 42333 } 42334 if (aElement) { 42335 ui.children.push(aElement); 42336 } 42337 if (!caption) { 42338 if (ui.attributes.class) { 42339 ui.attributes.class.push("xfaLeft"); 42340 } 42341 this.w = savedW; 42342 this.h = savedH; 42343 return HTMLResult.success(createWrapper(this, html), bbox); 42344 } 42345 if (this.ui.button) { 42346 if (style.padding) { 42347 delete style.padding; 42348 } 42349 if (caption.name === "div") { 42350 caption.name = "span"; 42351 } 42352 ui.children.push(caption); 42353 return HTMLResult.success(html, bbox); 42354 } else if (this.ui.checkButton) { 42355 caption.attributes.class[0] = "xfaCaptionForCheckButton"; 42356 } 42357 if (!ui.attributes.class) { 42358 ui.attributes.class = []; 42359 }
vendor: 9,071 bytes, lines 42359-42641
42359 42360 ui.children.splice(0, 0, caption); 42361 switch (this.caption.placement) { 42362 case "left": 42363 ui.attributes.class.push("xfaLeft"); 42364 break; 42365 case "right": 42366 ui.attributes.class.push("xfaRight"); 42367 break; 42368 case "top": 42369 ui.attributes.class.push("xfaTop"); 42370 break; 42371 case "bottom": 42372 ui.attributes.class.push("xfaBottom"); 42373 break; 42374 case "inline": 42375 ui.attributes.class.push("xfaLeft"); 42376 break; 42377 } 42378 this.w = savedW; 42379 this.h = savedH; 42380 return HTMLResult.success(createWrapper(this, html), bbox); 42381 } 42382} 42383class Fill extends XFAObject { 42384 constructor(attributes) { 42385 super(TEMPLATE_NS_ID, "fill", true); 42386 this.id = attributes.id || ""; 42387 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 42388 this.use = attributes.use || ""; 42389 this.usehref = attributes.usehref || ""; 42390 this.color = null; 42391 this.extras = null; 42392 this.linear = null; 42393 this.pattern = null; 42394 this.radial = null; 42395 this.solid = null; 42396 this.stipple = null; 42397 } 42398 [$toStyle]() { 42399 const parent = this[$getParent](); 42400 const grandpa = parent[$getParent](); 42401 const ggrandpa = grandpa[$getParent](); 42402 const style = Object.create(null); 42403 let propName = "color"; 42404 let altPropName = propName; 42405 if (parent instanceof Border) { 42406 propName = "background-color"; 42407 altPropName = "background"; 42408 if (ggrandpa instanceof Ui) { 42409 style.backgroundColor = "white"; 42410 } 42411 } 42412 if (parent instanceof Rectangle || parent instanceof Arc) { 42413 propName = altPropName = "fill"; 42414 style.fill = "white"; 42415 } 42416 for (const name of Object.getOwnPropertyNames(this)) { 42417 if (name === "extras" || name === "color") { 42418 continue; 42419 } 42420 const obj = this[name]; 42421 if (!(obj instanceof XFAObject)) { 42422 continue; 42423 } 42424 const color = obj[$toStyle](this.color); 42425 if (color) { 42426 style[color.startsWith("#") ? propName : altPropName] = color; 42427 } 42428 return style; 42429 } 42430 if (this.color?.value) { 42431 const color = this.color[$toStyle](); 42432 style[color.startsWith("#") ? propName : altPropName] = color; 42433 } 42434 return style; 42435 } 42436} 42437class Filter extends XFAObject { 42438 constructor(attributes) { 42439 super(TEMPLATE_NS_ID, "filter", true); 42440 this.addRevocationInfo = getStringOption(attributes.addRevocationInfo, ["", "required", "optional", "none"]); 42441 this.id = attributes.id || ""; 42442 this.name = attributes.name || ""; 42443 this.use = attributes.use || ""; 42444 this.usehref = attributes.usehref || ""; 42445 this.version = getInteger({ 42446 data: this.version, 42447 defaultValue: 5, 42448 validate: x => x >= 1 && x <= 5 42449 }); 42450 this.appearanceFilter = null; 42451 this.certificates = null; 42452 this.digestMethods = null; 42453 this.encodings = null; 42454 this.encryptionMethods = null; 42455 this.handler = null; 42456 this.lockDocument = null; 42457 this.mdp = null; 42458 this.reasons = null; 42459 this.timeStamp = null; 42460 } 42461} 42462class Float extends ContentObject { 42463 constructor(attributes) { 42464 super(TEMPLATE_NS_ID, "float"); 42465 this.id = attributes.id || ""; 42466 this.name = attributes.name || ""; 42467 this.use = attributes.use || ""; 42468 this.usehref = attributes.usehref || ""; 42469 } 42470 [$finalize]() { 42471 const number = parseFloat(this[$content].trim()); 42472 this[$content] = isNaN(number) ? null : number; 42473 } 42474 [$toHTML](availableSpace) { 42475 return valueToHtml(this[$content] !== null ? this[$content].toString() : ""); 42476 } 42477} 42478class template_Font extends XFAObject { 42479 constructor(attributes) { 42480 super(TEMPLATE_NS_ID, "font", true); 42481 this.baselineShift = getMeasurement(attributes.baselineShift); 42482 this.fontHorizontalScale = getFloat({ 42483 data: attributes.fontHorizontalScale, 42484 defaultValue: 100, 42485 validate: x => x >= 0 42486 }); 42487 this.fontVerticalScale = getFloat({ 42488 data: attributes.fontVerticalScale, 42489 defaultValue: 100, 42490 validate: x => x >= 0 42491 }); 42492 this.id = attributes.id || ""; 42493 this.kerningMode = getStringOption(attributes.kerningMode, ["none", "pair"]); 42494 this.letterSpacing = getMeasurement(attributes.letterSpacing, "0"); 42495 this.lineThrough = getInteger({ 42496 data: attributes.lineThrough, 42497 defaultValue: 0, 42498 validate: x => x === 1 || x === 2 42499 }); 42500 this.lineThroughPeriod = getStringOption(attributes.lineThroughPeriod, ["all", "word"]); 42501 this.overline = getInteger({ 42502 data: attributes.overline, 42503 defaultValue: 0, 42504 validate: x => x === 1 || x === 2 42505 }); 42506 this.overlinePeriod = getStringOption(attributes.overlinePeriod, ["all", "word"]); 42507 this.posture = getStringOption(attributes.posture, ["normal", "italic"]); 42508 this.size = getMeasurement(attributes.size, "10pt"); 42509 this.typeface = attributes.typeface || "Courier"; 42510 this.underline = getInteger({ 42511 data: attributes.underline, 42512 defaultValue: 0, 42513 validate: x => x === 1 || x === 2 42514 }); 42515 this.underlinePeriod = getStringOption(attributes.underlinePeriod, ["all", "word"]); 42516 this.use = attributes.use || ""; 42517 this.usehref = attributes.usehref || ""; 42518 this.weight = getStringOption(attributes.weight, ["normal", "bold"]); 42519 this.extras = null; 42520 this.fill = null; 42521 } 42522 [$clean](builder) { 42523 super[$clean](builder); 42524 this[$globalData].usedTypefaces.add(this.typeface); 42525 } 42526 [$toStyle]() { 42527 const style = toStyle(this, "fill"); 42528 const color = style.color; 42529 if (color) { 42530 if (color === "#000000") { 42531 delete style.color; 42532 } else if (!color.startsWith("#")) { 42533 style.background = color; 42534 style.backgroundClip = "text"; 42535 style.color = "transparent"; 42536 } 42537 } 42538 if (this.baselineShift) { 42539 style.verticalAlign = measureToString(this.baselineShift); 42540 } 42541 style.fontKerning = this.kerningMode === "none" ? "none" : "normal"; 42542 style.letterSpacing = measureToString(this.letterSpacing); 42543 if (this.lineThrough !== 0) { 42544 style.textDecoration = "line-through"; 42545 if (this.lineThrough === 2) { 42546 style.textDecorationStyle = "double"; 42547 } 42548 } 42549 if (this.overline !== 0) { 42550 style.textDecoration = "overline"; 42551 if (this.overline === 2) { 42552 style.textDecorationStyle = "double"; 42553 } 42554 } 42555 style.fontStyle = this.posture; 42556 style.fontSize = measureToString(0.99 * this.size); 42557 setFontFamily(this, this, this[$globalData].fontFinder, style); 42558 if (this.underline !== 0) { 42559 style.textDecoration = "underline"; 42560 if (this.underline === 2) { 42561 style.textDecorationStyle = "double"; 42562 } 42563 } 42564 style.fontWeight = this.weight; 42565 return style; 42566 } 42567} 42568class Format extends XFAObject { 42569 constructor(attributes) { 42570 super(TEMPLATE_NS_ID, "format", true); 42571 this.id = attributes.id || ""; 42572 this.use = attributes.use || ""; 42573 this.usehref = attributes.usehref || ""; 42574 this.extras = null; 42575 this.picture = null; 42576 } 42577} 42578class Handler extends StringObject { 42579 constructor(attributes) { 42580 super(TEMPLATE_NS_ID, "handler"); 42581 this.id = attributes.id || ""; 42582 this.type = getStringOption(attributes.type, ["optional", "required"]); 42583 this.use = attributes.use || ""; 42584 this.usehref = attributes.usehref || ""; 42585 } 42586} 42587class Hyphenation extends XFAObject { 42588 constructor(attributes) { 42589 super(TEMPLATE_NS_ID, "hyphenation"); 42590 this.excludeAllCaps = getInteger({ 42591 data: attributes.excludeAllCaps, 42592 defaultValue: 0, 42593 validate: x => x === 1 42594 }); 42595 this.excludeInitialCap = getInteger({ 42596 data: attributes.excludeInitialCap, 42597 defaultValue: 0, 42598 validate: x => x === 1 42599 }); 42600 this.hyphenate = getInteger({ 42601 data: attributes.hyphenate, 42602 defaultValue: 0, 42603 validate: x => x === 1 42604 }); 42605 this.id = attributes.id || ""; 42606 this.pushCharacterCount = getInteger({ 42607 data: attributes.pushCharacterCount, 42608 defaultValue: 3, 42609 validate: x => x >= 0 42610 }); 42611 this.remainCharacterCount = getInteger({ 42612 data: attributes.remainCharacterCount, 42613 defaultValue: 3, 42614 validate: x => x >= 0 42615 }); 42616 this.use = attributes.use || ""; 42617 this.usehref = attributes.usehref || ""; 42618 this.wordCharacterCount = getInteger({ 42619 data: attributes.wordCharacterCount, 42620 defaultValue: 7, 42621 validate: x => x >= 0 42622 }); 42623 } 42624} 42625class Image extends StringObject { 42626 constructor(attributes) { 42627 super(TEMPLATE_NS_ID, "image"); 42628 this.aspect = getStringOption(attributes.aspect, ["fit", "actual", "height", "none", "width"]); 42629 this.contentType = attributes.contentType || ""; 42630 this.href = attributes.href || ""; 42631 this.id = attributes.id || ""; 42632 this.name = attributes.name || ""; 42633 this.transferEncoding = getStringOption(attributes.transferEncoding, ["base64", "none", "package"]); 42634 this.use = attributes.use || ""; 42635 this.usehref = attributes.usehref || ""; 42636 } 42637 [$toHTML]() { 42638 if (this.contentType && !MIMES.has(this.contentType.toLowerCase())) { 42639 return HTMLResult.EMPTY; 42640 } 42641 let buffer = this[$globalData].images
vendor: 13,023 bytes, lines 42641-43051
42641 && this[$globalData].images.get(this.href); 42642 if (!buffer && (this.href || !this[$content])) { 42643 return HTMLResult.EMPTY; 42644 } 42645 if (!buffer && this.transferEncoding === "base64") { 42646 buffer = fromBase64Util(this[$content]); 42647 } 42648 if (!buffer) { 42649 return HTMLResult.EMPTY; 42650 } 42651 if (!this.contentType) { 42652 for (const [header, type] of IMAGES_HEADERS) { 42653 if (buffer.length > header.length && header.every((x, i) => x === buffer[i])) { 42654 this.contentType = type; 42655 break; 42656 } 42657 } 42658 if (!this.contentType) { 42659 return HTMLResult.EMPTY; 42660 } 42661 } 42662 const blob = new Blob([buffer], { 42663 type: this.contentType 42664 }); 42665 let style; 42666 switch (this.aspect) { 42667 case "fit": 42668 case "actual": 42669 break; 42670 case "height": 42671 style = { 42672 height: "100%", 42673 objectFit: "fill" 42674 }; 42675 break; 42676 case "none": 42677 style = { 42678 width: "100%", 42679 height: "100%", 42680 objectFit: "fill" 42681 }; 42682 break; 42683 case "width": 42684 style = { 42685 width: "100%", 42686 objectFit: "fill" 42687 }; 42688 break; 42689 } 42690 const parent = this[$getParent](); 42691 return HTMLResult.success({ 42692 name: "img", 42693 attributes: { 42694 class: ["xfaImage"], 42695 style, 42696 src: URL.createObjectURL(blob), 42697 alt: parent ? ariaLabel(parent[$getParent]()) : null 42698 } 42699 }); 42700 } 42701} 42702class ImageEdit extends XFAObject { 42703 constructor(attributes) { 42704 super(TEMPLATE_NS_ID, "imageEdit", true); 42705 this.data = getStringOption(attributes.data, ["link", "embed"]); 42706 this.id = attributes.id || ""; 42707 this.use = attributes.use || ""; 42708 this.usehref = attributes.usehref || ""; 42709 this.border = null; 42710 this.extras = null; 42711 this.margin = null; 42712 } 42713 [$toHTML](availableSpace) { 42714 if (this.data === "embed") { 42715 return HTMLResult.success({ 42716 name: "div", 42717 children: [], 42718 attributes: {} 42719 }); 42720 } 42721 return HTMLResult.EMPTY; 42722 } 42723} 42724class Integer extends ContentObject { 42725 constructor(attributes) { 42726 super(TEMPLATE_NS_ID, "integer"); 42727 this.id = attributes.id || ""; 42728 this.name = attributes.name || ""; 42729 this.use = attributes.use || ""; 42730 this.usehref = attributes.usehref || ""; 42731 } 42732 [$finalize]() { 42733 const number = parseInt(this[$content].trim(), 10); 42734 this[$content] = isNaN(number) ? null : number; 42735 } 42736 [$toHTML](availableSpace) { 42737 return valueToHtml(this[$content] !== null ? this[$content].toString() : ""); 42738 } 42739} 42740class Issuers extends XFAObject { 42741 constructor(attributes) { 42742 super(TEMPLATE_NS_ID, "issuers", true); 42743 this.id = attributes.id || ""; 42744 this.type = getStringOption(attributes.type, ["optional", "required"]); 42745 this.use = attributes.use || ""; 42746 this.usehref = attributes.usehref || ""; 42747 this.certificate = new XFAObjectArray(); 42748 } 42749} 42750class Items extends XFAObject { 42751 constructor(attributes) { 42752 super(TEMPLATE_NS_ID, "items", true); 42753 this.id = attributes.id || ""; 42754 this.name = attributes.name || ""; 42755 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 42756 this.ref = attributes.ref || ""; 42757 this.save = getInteger({ 42758 data: attributes.save, 42759 defaultValue: 0, 42760 validate: x => x === 1 42761 }); 42762 this.use = attributes.use || ""; 42763 this.usehref = attributes.usehref || ""; 42764 this.boolean = new XFAObjectArray(); 42765 this.date = new XFAObjectArray(); 42766 this.dateTime = new XFAObjectArray(); 42767 this.decimal = new XFAObjectArray(); 42768 this.exData = new XFAObjectArray(); 42769 this.float = new XFAObjectArray(); 42770 this.image = new XFAObjectArray(); 42771 this.integer = new XFAObjectArray(); 42772 this.text = new XFAObjectArray(); 42773 this.time = new XFAObjectArray(); 42774 } 42775 [$toHTML]() { 42776 const output = []; 42777 for (const child of this[$getChildren]()) { 42778 output.push(child[$text]()); 42779 } 42780 return HTMLResult.success(output); 42781 } 42782} 42783class Keep extends XFAObject { 42784 constructor(attributes) { 42785 super(TEMPLATE_NS_ID, "keep", true); 42786 this.id = attributes.id || ""; 42787 const options = ["none", "contentArea", "pageArea"]; 42788 this.intact = getStringOption(attributes.intact, options); 42789 this.next = getStringOption(attributes.next, options); 42790 this.previous = getStringOption(attributes.previous, options); 42791 this.use = attributes.use || ""; 42792 this.usehref = attributes.usehref || ""; 42793 this.extras = null; 42794 } 42795} 42796class KeyUsage extends XFAObject { 42797 constructor(attributes) { 42798 super(TEMPLATE_NS_ID, "keyUsage"); 42799 const options = ["", "yes", "no"]; 42800 this.crlSign = getStringOption(attributes.crlSign, options); 42801 this.dataEncipherment = getStringOption(attributes.dataEncipherment, options); 42802 this.decipherOnly = getStringOption(attributes.decipherOnly, options); 42803 this.digitalSignature = getStringOption(attributes.digitalSignature, options); 42804 this.encipherOnly = getStringOption(attributes.encipherOnly, options); 42805 this.id = attributes.id || ""; 42806 this.keyAgreement = getStringOption(attributes.keyAgreement, options); 42807 this.keyCertSign = getStringOption(attributes.keyCertSign, options); 42808 this.keyEncipherment = getStringOption(attributes.keyEncipherment, options); 42809 this.nonRepudiation = getStringOption(attributes.nonRepudiation, options); 42810 this.type = getStringOption(attributes.type, ["optional", "required"]); 42811 this.use = attributes.use || ""; 42812 this.usehref = attributes.usehref || ""; 42813 } 42814} 42815class Line extends XFAObject { 42816 constructor(attributes) { 42817 super(TEMPLATE_NS_ID, "line", true); 42818 this.hand = getStringOption(attributes.hand, ["even", "left", "right"]); 42819 this.id = attributes.id || ""; 42820 this.slope = getStringOption(attributes.slope, ["\\", "/"]); 42821 this.use = attributes.use || ""; 42822 this.usehref = attributes.usehref || ""; 42823 this.edge = null; 42824 } 42825 [$toHTML]() { 42826 const parent = this[$getParent]()[$getParent](); 42827 const edge = this.edge || new Edge({}); 42828 const edgeStyle = edge[$toStyle](); 42829 const style = Object.create(null); 42830 const thickness = edge.presence === "visible" ? edge.thickness : 0; 42831 style.strokeWidth = measureToString(thickness); 42832 style.stroke = edgeStyle.color; 42833 let x1, y1, x2, y2; 42834 let width = "100%"; 42835 let height = "100%"; 42836 if (parent.w <= thickness) { 42837 [x1, y1, x2, y2] = ["50%", 0, "50%", "100%"]; 42838 width = style.strokeWidth; 42839 } else if (parent.h <= thickness) { 42840 [x1, y1, x2, y2] = [0, "50%", "100%", "50%"]; 42841 height = style.strokeWidth; 42842 } else if (this.slope === "\\") { 42843 [x1, y1, x2, y2] = [0, 0, "100%", "100%"]; 42844 } else { 42845 [x1, y1, x2, y2] = [0, "100%", "100%", 0]; 42846 } 42847 const line = { 42848 name: "line", 42849 attributes: { 42850 xmlns: SVG_NS, 42851 x1, 42852 y1, 42853 x2, 42854 y2, 42855 style 42856 } 42857 }; 42858 const svg = { 42859 name: "svg", 42860 children: [line], 42861 attributes: { 42862 xmlns: SVG_NS, 42863 width, 42864 height, 42865 style: { 42866 overflow: "visible" 42867 } 42868 } 42869 }; 42870 if (hasMargin(parent)) { 42871 return HTMLResult.success({ 42872 name: "div", 42873 attributes: { 42874 style: { 42875 display: "inline", 42876 width: "100%", 42877 height: "100%" 42878 } 42879 }, 42880 children: [svg] 42881 }); 42882 } 42883 svg.attributes.style.position = "absolute"; 42884 return HTMLResult.success(svg); 42885 } 42886} 42887class Linear extends XFAObject { 42888 constructor(attributes) { 42889 super(TEMPLATE_NS_ID, "linear", true); 42890 this.id = attributes.id || ""; 42891 this.type = getStringOption(attributes.type, ["toRight", "toBottom", "toLeft", "toTop"]); 42892 this.use = attributes.use || ""; 42893 this.usehref = attributes.usehref || ""; 42894 this.color = null; 42895 this.extras = null; 42896 } 42897 [$toStyle](startColor) { 42898 startColor = startColor ? startColor[$toStyle]() : "#FFFFFF"; 42899 const transf = this.type.replace(/([RBLT])/, " $1").toLowerCase(); 42900 const endColor = this.color ? this.color[$toStyle]() : "#000000"; 42901 return `linear-gradient(${transf}, ${startColor}, ${endColor})`; 42902 } 42903} 42904class LockDocument extends ContentObject { 42905 constructor(attributes) { 42906 super(TEMPLATE_NS_ID, "lockDocument"); 42907 this.id = attributes.id || ""; 42908 this.type = getStringOption(attributes.type, ["optional", "required"]); 42909 this.use = attributes.use || ""; 42910 this.usehref = attributes.usehref || ""; 42911 } 42912 [$finalize]() { 42913 this[$content] = getStringOption(this[$content], ["auto", "0", "1"]); 42914 } 42915} 42916class Manifest extends XFAObject { 42917 constructor(attributes) { 42918 super(TEMPLATE_NS_ID, "manifest", true); 42919 this.action = getStringOption(attributes.action, ["include", "all", "exclude"]); 42920 this.id = attributes.id || ""; 42921 this.name = attributes.name || ""; 42922 this.use = attributes.use || ""; 42923 this.usehref = attributes.usehref || ""; 42924 this.extras = null; 42925 this.ref = new XFAObjectArray(); 42926 } 42927} 42928class Margin extends XFAObject { 42929 constructor(attributes) { 42930 super(TEMPLATE_NS_ID, "margin", true); 42931 this.bottomInset = getMeasurement(attributes.bottomInset, "0"); 42932 this.id = attributes.id || ""; 42933 this.leftInset = getMeasurement(attributes.leftInset, "0"); 42934 this.rightInset = getMeasurement(attributes.rightInset, "0"); 42935 this.topInset = getMeasurement(attributes.topInset, "0"); 42936 this.use = attributes.use || ""; 42937 this.usehref = attributes.usehref || ""; 42938 this.extras = null; 42939 } 42940 [$toStyle]() { 42941 return { 42942 margin: measureToString(this.topInset) + " " + measureToString(this.rightInset) + " " + measureToString(this.bottomInset) + " " + measureToString(this.leftInset) 42943 }; 42944 } 42945} 42946class Mdp extends XFAObject { 42947 constructor(attributes) { 42948 super(TEMPLATE_NS_ID, "mdp"); 42949 this.id = attributes.id || ""; 42950 this.permissions = getInteger({ 42951 data: attributes.permissions, 42952 defaultValue: 2, 42953 validate: x => x === 1 || x === 3 42954 }); 42955 this.signatureType = getStringOption(attributes.signatureType, ["filler", "author"]); 42956 this.use = attributes.use || ""; 42957 this.usehref = attributes.usehref || ""; 42958 } 42959} 42960class Medium extends XFAObject { 42961 constructor(attributes) { 42962 super(TEMPLATE_NS_ID, "medium"); 42963 this.id = attributes.id || ""; 42964 this.imagingBBox = getBBox(attributes.imagingBBox); 42965 this.long = getMeasurement(attributes.long); 42966 this.orientation = getStringOption(attributes.orientation, ["portrait", "landscape"]); 42967 this.short = getMeasurement(attributes.short); 42968 this.stock = attributes.stock || ""; 42969 this.trayIn = getStringOption(attributes.trayIn, ["auto", "delegate", "pageFront"]); 42970 this.trayOut = getStringOption(attributes.trayOut, ["auto", "delegate"]); 42971 this.use = attributes.use || ""; 42972 this.usehref = attributes.usehref || ""; 42973 } 42974} 42975class Message extends XFAObject { 42976 constructor(attributes) { 42977 super(TEMPLATE_NS_ID, "message", true); 42978 this.id = attributes.id || ""; 42979 this.use = attributes.use || ""; 42980 this.usehref = attributes.usehref || ""; 42981 this.text = new XFAObjectArray(); 42982 } 42983} 42984class NumericEdit extends XFAObject { 42985 constructor(attributes) { 42986 super(TEMPLATE_NS_ID, "numericEdit", true); 42987 this.hScrollPolicy = getStringOption(attributes.hScrollPolicy, ["auto", "off", "on"]); 42988 this.id = attributes.id || ""; 42989 this.use = attributes.use || ""; 42990 this.usehref = attributes.usehref || ""; 42991 this.border = null; 42992 this.comb = null; 42993 this.extras = null; 42994 this.margin = null; 42995 } 42996 [$toHTML](availableSpace) { 42997 const style = toStyle(this, "border", "font", "margin"); 42998 const field = this[$getParent]()[$getParent](); 42999 const html = { 43000 name: "input", 43001 attributes: { 43002 type: "text", 43003 fieldId: field[$uid], 43004 dataId: field[$data]?.[$uid] || field[$uid], 43005 class: ["xfaTextfield"], 43006 style, 43007 "aria-label": ariaLabel(field), 43008 "aria-required": false 43009 } 43010 }; 43011 if (isRequired(field)) { 43012 html.attributes["aria-required"] = true; 43013 html.attributes.required = true; 43014 } 43015 return HTMLResult.success({ 43016 name: "label", 43017 attributes: { 43018 class: ["xfaLabel"] 43019 }, 43020 children: [html] 43021 }); 43022 } 43023} 43024class Occur extends XFAObject { 43025 constructor(attributes) { 43026 super(TEMPLATE_NS_ID, "occur", true); 43027 this.id = attributes.id || ""; 43028 this.initial = attributes.initial !== "" ? getInteger({ 43029 data: attributes.initial, 43030 defaultValue: "", 43031 validate: x => true 43032 }) : ""; 43033 this.max = attributes.max !== "" ? getInteger({ 43034 data: attributes.max, 43035 defaultValue: 1, 43036 validate: x => true 43037 }) : ""; 43038 this.min = attributes.min !== "" ? getInteger({ 43039 data: attributes.min, 43040 defaultValue: 1, 43041 validate: x => true 43042 }) : ""; 43043 this.use = attributes.use || ""; 43044 this.usehref = attributes.usehref || ""; 43045 this.extras = null; 43046 } 43047 [$clean]() { 43048 const parent = this[$getParent](); 43049 const originalMin = this.min; 43050 if (this.min === "") { 43051 this.min = parent insta
vendor: 6,256 bytes, lines 43051-43261
43051nceof PageArea || parent instanceof PageSet ? 0 : 1; 43052 } 43053 if (this.max === "") { 43054 if (originalMin === "") { 43055 this.max = parent instanceof PageArea || parent instanceof PageSet ? -1 : 1; 43056 } else { 43057 this.max = this.min; 43058 } 43059 } 43060 if (this.max !== -1 && this.max < this.min) { 43061 this.max = this.min; 43062 } 43063 if (this.initial === "") { 43064 this.initial = parent instanceof Template ? 1 : this.min; 43065 } 43066 } 43067} 43068class Oid extends StringObject { 43069 constructor(attributes) { 43070 super(TEMPLATE_NS_ID, "oid"); 43071 this.id = attributes.id || ""; 43072 this.name = attributes.name || ""; 43073 this.use = attributes.use || ""; 43074 this.usehref = attributes.usehref || ""; 43075 } 43076} 43077class Oids extends XFAObject { 43078 constructor(attributes) { 43079 super(TEMPLATE_NS_ID, "oids", true); 43080 this.id = attributes.id || ""; 43081 this.type = getStringOption(attributes.type, ["optional", "required"]); 43082 this.use = attributes.use || ""; 43083 this.usehref = attributes.usehref || ""; 43084 this.oid = new XFAObjectArray(); 43085 } 43086} 43087class Overflow extends XFAObject { 43088 constructor(attributes) { 43089 super(TEMPLATE_NS_ID, "overflow"); 43090 this.id = attributes.id || ""; 43091 this.leader = attributes.leader || ""; 43092 this.target = attributes.target || ""; 43093 this.trailer = attributes.trailer || ""; 43094 this.use = attributes.use || ""; 43095 this.usehref = attributes.usehref || ""; 43096 } 43097 [$getExtra]() { 43098 if (!this[$extra]) { 43099 const parent = this[$getParent](); 43100 const root = this[$getTemplateRoot](); 43101 const target = root[$searchNode](this.target, parent); 43102 const leader = root[$searchNode](this.leader, parent); 43103 const trailer = root[$searchNode](this.trailer, parent); 43104 this[$extra] = { 43105 target: target?.[0] || null, 43106 leader: leader?.[0] || null, 43107 trailer: trailer?.[0] || null, 43108 addLeader: false, 43109 addTrailer: false 43110 }; 43111 } 43112 return this[$extra]; 43113 } 43114} 43115class PageArea extends XFAObject { 43116 constructor(attributes) { 43117 super(TEMPLATE_NS_ID, "pageArea", true); 43118 this.blankOrNotBlank = getStringOption(attributes.blankOrNotBlank, ["any", "blank", "notBlank"]); 43119 this.id = attributes.id || ""; 43120 this.initialNumber = getInteger({ 43121 data: attributes.initialNumber, 43122 defaultValue: 1, 43123 validate: x => true 43124 }); 43125 this.name = attributes.name || ""; 43126 this.numbered = getInteger({ 43127 data: attributes.numbered, 43128 defaultValue: 1, 43129 validate: x => true 43130 }); 43131 this.oddOrEven = getStringOption(attributes.oddOrEven, ["any", "even", "odd"]); 43132 this.pagePosition = getStringOption(attributes.pagePosition, ["any", "first", "last", "only", "rest"]); 43133 this.relevant = getRelevant(attributes.relevant); 43134 this.use = attributes.use || ""; 43135 this.usehref = attributes.usehref || ""; 43136 this.desc = null; 43137 this.extras = null; 43138 this.medium = null; 43139 this.occur = null; 43140 this.area = new XFAObjectArray(); 43141 this.contentArea = new XFAObjectArray(); 43142 this.draw = new XFAObjectArray(); 43143 this.exclGroup = new XFAObjectArray(); 43144 this.field = new XFAObjectArray(); 43145 this.subform = new XFAObjectArray(); 43146 } 43147 [$isUsable]() { 43148 if (!this[$extra]) { 43149 this[$extra] = { 43150 numberOfUse: 0 43151 }; 43152 return true; 43153 } 43154 return !this.occur || this.occur.max === -1 || this[$extra].numberOfUse < this.occur.max; 43155 } 43156 [$cleanPage]() { 43157 delete this[$extra]; 43158 } 43159 [$getNextPage]() { 43160 if (!this[$extra]) { 43161 this[$extra] = { 43162 numberOfUse: 0 43163 }; 43164 } 43165 const parent = this[$getParent](); 43166 if (parent.relation === "orderedOccurrence") { 43167 if (this[$isUsable]()) { 43168 this[$extra].numberOfUse += 1; 43169 return this; 43170 } 43171 } 43172 return parent[$getNextPage](); 43173 } 43174 [$getAvailableSpace]() { 43175 return this[$extra].space || { 43176 width: 0, 43177 height: 0 43178 }; 43179 } 43180 [$toHTML]() { 43181 if (!this[$extra]) { 43182 this[$extra] = { 43183 numberOfUse: 1 43184 }; 43185 } 43186 const children = []; 43187 this[$extra].children = children; 43188 const style = Object.create(null); 43189 if (this.medium && this.medium.short && this.medium.long) { 43190 style.width = measureToString(this.medium.short); 43191 style.height = measureToString(this.medium.long); 43192 this[$extra].space = { 43193 width: this.medium.short, 43194 height: this.medium.long 43195 }; 43196 if (this.medium.orientation === "landscape") { 43197 const x = style.width; 43198 style.width = style.height; 43199 style.height = x; 43200 this[$extra].space = { 43201 width: this.medium.long, 43202 height: this.medium.short 43203 }; 43204 } 43205 } else { 43206 warn("XFA - No medium specified in pageArea: please file a bug."); 43207 } 43208 this[$childrenToHTML]({ 43209 filter: new Set(["area", "draw", "field", "subform"]), 43210 include: true 43211 }); 43212 this[$childrenToHTML]({ 43213 filter: new Set(["contentArea"]), 43214 include: true 43215 }); 43216 return HTMLResult.success({ 43217 name: "div", 43218 children, 43219 attributes: { 43220 class: ["xfaPage"], 43221 id: this[$uid], 43222 style, 43223 xfaName: this.name 43224 } 43225 }); 43226 } 43227} 43228class PageSet extends XFAObject { 43229 constructor(attributes) { 43230 super(TEMPLATE_NS_ID, "pageSet", true); 43231 this.duplexImposition = getStringOption(attributes.duplexImposition, ["longEdge", "shortEdge"]); 43232 this.id = attributes.id || ""; 43233 this.name = attributes.name || ""; 43234 this.relation = getStringOption(attributes.relation, ["orderedOccurrence", "duplexPaginated", "simplexPaginated"]); 43235 this.relevant = getRelevant(attributes.relevant); 43236 this.use = attributes.use || ""; 43237 this.usehref = attributes.usehref || ""; 43238 this.extras = null; 43239 this.occur = null; 43240 this.pageArea = new XFAObjectArray(); 43241 this.pageSet = new XFAObjectArray(); 43242 } 43243 [$cleanPage]() { 43244 for (const page of this.pageArea.children) { 43245 page[$cleanPage](); 43246 } 43247 for (const page of this.pageSet.children) { 43248 page[$cleanPage](); 43249 } 43250 } 43251 [$isUsable]() { 43252 return !this.occur || this.occur.max === -1 || this[$extra].numberOfUse < this.occur.max; 43253 } 43254 [$getNextPage]() { 43255 if (!this[$extra]) { 43256 this[$extra] = { 43257 numberOfUse: 1, 43258 pageIndex: -1, 43259 pageSetIndex: -1 43260 }; 43261 }
vendor: 23,889 bytes, lines 43261-43919
43261 43262 if (this.relation === "orderedOccurrence") { 43263 if (this[$extra].pageIndex + 1 < this.pageArea.children.length) { 43264 this[$extra].pageIndex += 1; 43265 const pageArea = this.pageArea.children[this[$extra].pageIndex]; 43266 return pageArea[$getNextPage](); 43267 } 43268 if (this[$extra].pageSetIndex + 1 < this.pageSet.children.length) { 43269 this[$extra].pageSetIndex += 1; 43270 return this.pageSet.children[this[$extra].pageSetIndex][$getNextPage](); 43271 } 43272 if (this[$isUsable]()) { 43273 this[$extra].numberOfUse += 1; 43274 this[$extra].pageIndex = -1; 43275 this[$extra].pageSetIndex = -1; 43276 return this[$getNextPage](); 43277 } 43278 const parent = this[$getParent](); 43279 if (parent instanceof PageSet) { 43280 return parent[$getNextPage](); 43281 } 43282 this[$cleanPage](); 43283 return this[$getNextPage](); 43284 } 43285 const pageNumber = this[$getTemplateRoot]()[$extra].pageNumber; 43286 const parity = pageNumber % 2 === 0 ? "even" : "odd"; 43287 const position = pageNumber === 0 ? "first" : "rest"; 43288 let page = this.pageArea.children.find(p => p.oddOrEven === parity && p.pagePosition === position); 43289 if (page) { 43290 return page; 43291 } 43292 page = this.pageArea.children.find(p => p.oddOrEven === "any" && p.pagePosition === position); 43293 if (page) { 43294 return page; 43295 } 43296 page = this.pageArea.children.find(p => p.oddOrEven === "any" && p.pagePosition === "any"); 43297 if (page) { 43298 return page; 43299 } 43300 return this.pageArea.children[0]; 43301 } 43302} 43303class Para extends XFAObject { 43304 constructor(attributes) { 43305 super(TEMPLATE_NS_ID, "para", true); 43306 this.hAlign = getStringOption(attributes.hAlign, ["left", "center", "justify", "justifyAll", "radix", "right"]); 43307 this.id = attributes.id || ""; 43308 this.lineHeight = attributes.lineHeight ? getMeasurement(attributes.lineHeight, "0pt") : ""; 43309 this.marginLeft = attributes.marginLeft ? getMeasurement(attributes.marginLeft, "0pt") : ""; 43310 this.marginRight = attributes.marginRight ? getMeasurement(attributes.marginRight, "0pt") : ""; 43311 this.orphans = getInteger({ 43312 data: attributes.orphans, 43313 defaultValue: 0, 43314 validate: x => x >= 0 43315 }); 43316 this.preserve = attributes.preserve || ""; 43317 this.radixOffset = attributes.radixOffset ? getMeasurement(attributes.radixOffset, "0pt") : ""; 43318 this.spaceAbove = attributes.spaceAbove ? getMeasurement(attributes.spaceAbove, "0pt") : ""; 43319 this.spaceBelow = attributes.spaceBelow ? getMeasurement(attributes.spaceBelow, "0pt") : ""; 43320 this.tabDefault = attributes.tabDefault ? getMeasurement(this.tabDefault) : ""; 43321 this.tabStops = (attributes.tabStops || "").trim().split(/\s+/).map((x, i) => i % 2 === 1 ? getMeasurement(x) : x); 43322 this.textIndent = attributes.textIndent ? getMeasurement(attributes.textIndent, "0pt") : ""; 43323 this.use = attributes.use || ""; 43324 this.usehref = attributes.usehref || ""; 43325 this.vAlign = getStringOption(attributes.vAlign, ["top", "bottom", "middle"]); 43326 this.widows = getInteger({ 43327 data: attributes.widows, 43328 defaultValue: 0, 43329 validate: x => x >= 0 43330 }); 43331 this.hyphenation = null; 43332 } 43333 [$toStyle]() { 43334 const style = toStyle(this, "hAlign"); 43335 if (this.marginLeft !== "") { 43336 style.paddingLeft = measureToString(this.marginLeft); 43337 } 43338 if (this.marginRight !== "") { 43339 style.paddingRight = measureToString(this.marginRight); 43340 } 43341 if (this.spaceAbove !== "") { 43342 style.paddingTop = measureToString(this.spaceAbove); 43343 } 43344 if (this.spaceBelow !== "") { 43345 style.paddingBottom = measureToString(this.spaceBelow); 43346 } 43347 if (this.textIndent !== "") { 43348 style.textIndent = measureToString(this.textIndent); 43349 fixTextIndent(style); 43350 } 43351 if (this.lineHeight > 0) { 43352 style.lineHeight = measureToString(this.lineHeight); 43353 } 43354 if (this.tabDefault !== "") { 43355 style.tabSize = measureToString(this.tabDefault); 43356 } 43357 if (this.tabStops.length > 0) {} 43358 if (this.hyphenatation) { 43359 Object.assign(style, this.hyphenatation[$toStyle]()); 43360 } 43361 return style; 43362 } 43363} 43364class PasswordEdit extends XFAObject { 43365 constructor(attributes) { 43366 super(TEMPLATE_NS_ID, "passwordEdit", true); 43367 this.hScrollPolicy = getStringOption(attributes.hScrollPolicy, ["auto", "off", "on"]); 43368 this.id = attributes.id || ""; 43369 this.passwordChar = attributes.passwordChar || "*"; 43370 this.use = attributes.use || ""; 43371 this.usehref = attributes.usehref || ""; 43372 this.border = null; 43373 this.extras = null; 43374 this.margin = null; 43375 } 43376} 43377class template_Pattern extends XFAObject { 43378 constructor(attributes) { 43379 super(TEMPLATE_NS_ID, "pattern", true); 43380 this.id = attributes.id || ""; 43381 this.type = getStringOption(attributes.type, ["crossHatch", "crossDiagonal", "diagonalLeft", "diagonalRight", "horizontal", "vertical"]); 43382 this.use = attributes.use || ""; 43383 this.usehref = attributes.usehref || ""; 43384 this.color = null; 43385 this.extras = null; 43386 } 43387 [$toStyle](startColor) { 43388 startColor = startColor ? startColor[$toStyle]() : "#FFFFFF"; 43389 const endColor = this.color ? this.color[$toStyle]() : "#000000"; 43390 const width = 5; 43391 const cmd = "repeating-linear-gradient"; 43392 const colors = `${startColor},${startColor} ${width}px,${endColor} ${width}px,${endColor} ${2 * width}px`; 43393 switch (this.type) { 43394 case "crossHatch": 43395 return `${cmd}(to top,${colors}) ${cmd}(to right,${colors})`; 43396 case "crossDiagonal": 43397 return `${cmd}(45deg,${colors}) ${cmd}(-45deg,${colors})`; 43398 case "diagonalLeft": 43399 return `${cmd}(45deg,${colors})`; 43400 case "diagonalRight": 43401 return `${cmd}(-45deg,${colors})`; 43402 case "horizontal": 43403 return `${cmd}(to top,${colors})`; 43404 case "vertical": 43405 return `${cmd}(to right,${colors})`; 43406 } 43407 return ""; 43408 } 43409} 43410class Picture extends StringObject { 43411 constructor(attributes) { 43412 super(TEMPLATE_NS_ID, "picture"); 43413 this.id = attributes.id || ""; 43414 this.use = attributes.use || ""; 43415 this.usehref = attributes.usehref || ""; 43416 } 43417} 43418class Proto extends XFAObject { 43419 constructor(attributes) { 43420 super(TEMPLATE_NS_ID, "proto", true); 43421 this.appearanceFilter = new XFAObjectArray(); 43422 this.arc = new XFAObjectArray(); 43423 this.area = new XFAObjectArray(); 43424 this.assist = new XFAObjectArray(); 43425 this.barcode = new XFAObjectArray(); 43426 this.bindItems = new XFAObjectArray(); 43427 this.bookend = new XFAObjectArray(); 43428 this.boolean = new XFAObjectArray(); 43429 this.border = new XFAObjectArray(); 43430 this.break = new XFAObjectArray(); 43431 this.breakAfter = new XFAObjectArray(); 43432 this.breakBefore = new XFAObjectArray(); 43433 this.button = new XFAObjectArray(); 43434 this.calculate = new XFAObjectArray(); 43435 this.caption = new XFAObjectArray(); 43436 this.certificate = new XFAObjectArray(); 43437 this.certificates = new XFAObjectArray(); 43438 this.checkButton = new XFAObjectArray(); 43439 this.choiceList = new XFAObjectArray(); 43440 this.color = new XFAObjectArray(); 43441 this.comb = new XFAObjectArray(); 43442 this.connect = new XFAObjectArray(); 43443 this.contentArea = new XFAObjectArray(); 43444 this.corner = new XFAObjectArray(); 43445 this.date = new XFAObjectArray(); 43446 this.dateTime = new XFAObjectArray(); 43447 this.dateTimeEdit = new XFAObjectArray(); 43448 this.decimal = new XFAObjectArray(); 43449 this.defaultUi = new XFAObjectArray(); 43450 this.desc = new XFAObjectArray(); 43451 this.digestMethod = new XFAObjectArray(); 43452 this.digestMethods = new XFAObjectArray(); 43453 this.draw = new XFAObjectArray(); 43454 this.edge = new XFAObjectArray(); 43455 this.encoding = new XFAObjectArray(); 43456 this.encodings = new XFAObjectArray(); 43457 this.encrypt = new XFAObjectArray(); 43458 this.encryptData = new XFAObjectArray(); 43459 this.encryption = new XFAObjectArray(); 43460 this.encryptionMethod = new XFAObjectArray(); 43461 this.encryptionMethods = new XFAObjectArray(); 43462 this.event = new XFAObjectArray(); 43463 this.exData = new XFAObjectArray(); 43464 this.exObject = new XFAObjectArray(); 43465 this.exclGroup = new XFAObjectArray(); 43466 this.execute = new XFAObjectArray(); 43467 this.extras = new XFAObjectArray(); 43468 this.field = new XFAObjectArray(); 43469 this.fill = new XFAObjectArray(); 43470 this.filter = new XFAObjectArray(); 43471 this.float = new XFAObjectArray(); 43472 this.font = new XFAObjectArray(); 43473 this.format = new XFAObjectArray(); 43474 this.handler = new XFAObjectArray(); 43475 this.hyphenation = new XFAObjectArray(); 43476 this.image = new XFAObjectArray(); 43477 this.imageEdit = new XFAObjectArray(); 43478 this.integer = new XFAObjectArray(); 43479 this.issuers = new XFAObjectArray(); 43480 this.items = new XFAObjectArray(); 43481 this.keep = new XFAObjectArray(); 43482 this.keyUsage = new XFAObjectArray(); 43483 this.line = new XFAObjectArray(); 43484 this.linear = new XFAObjectArray(); 43485 this.lockDocument = new XFAObjectArray(); 43486 this.manifest = new XFAObjectArray(); 43487 this.margin = new XFAObjectArray(); 43488 this.mdp = new XFAObjectArray(); 43489 this.medium = new XFAObjectArray(); 43490 this.message = new XFAObjectArray(); 43491 this.numericEdit = new XFAObjectArray(); 43492 this.occur = new XFAObjectArray(); 43493 this.oid = new XFAObjectArray(); 43494 this.oids = new XFAObjectArray(); 43495 this.overflow = new XFAObjectArray(); 43496 this.pageArea = new XFAObjectArray(); 43497 this.pageSet = new XFAObjectArray(); 43498 this.para = new XFAObjectArray(); 43499 this.passwordEdit = new XFAObjectArray(); 43500 this.pattern = new XFAObjectArray(); 43501 this.picture = new XFAObjectArray(); 43502 this.radial = new XFAObjectArray(); 43503 this.reason = new XFAObjectArray(); 43504 this.reasons = new XFAObjectArray(); 43505 this.rectangle = new XFAObjectArray(); 43506 this.ref = new XFAObjectArray(); 43507 this.script = new XFAObjectArray(); 43508 this.setProperty = new XFAObjectArray(); 43509 this.signData = new XFAObjectArray(); 43510 this.signature = new XFAObjectArray(); 43511 this.signing = new XFAObjectArray(); 43512 this.solid = new XFAObjectArray(); 43513 this.speak = new XFAObjectArray(); 43514 this.stipple = new XFAObjectArray(); 43515 this.subform = new XFAObjectArray(); 43516 this.subformSet = new XFAObjectArray(); 43517 this.subjectDN = new XFAObjectArray(); 43518 this.subjectDNs = new XFAObjectArray(); 43519 this.submit = new XFAObjectArray(); 43520 this.text = new XFAObjectArray(); 43521 this.textEdit = new XFAObjectArray(); 43522 this.time = new XFAObjectArray(); 43523 this.timeStamp = new XFAObjectArray(); 43524 this.toolTip = new XFAObjectArray(); 43525 this.traversal = new XFAObjectArray(); 43526 this.traverse = new XFAObjectArray(); 43527 this.ui = new XFAObjectArray(); 43528 this.validate = new XFAObjectArray(); 43529 this.value = new XFAObjectArray(); 43530 this.variables = new XFAObjectArray(); 43531 } 43532} 43533class Radial extends XFAObject { 43534 constructor(attributes) { 43535 super(TEMPLATE_NS_ID, "radial", true); 43536 this.id = attributes.id || ""; 43537 this.type = getStringOption(attributes.type, ["toEdge", "toCenter"]); 43538 this.use = attributes.use || ""; 43539 this.usehref = attributes.usehref || ""; 43540 this.color = null; 43541 this.extras = null; 43542 } 43543 [$toStyle](startColor) { 43544 startColor = startColor ? startColor[$toStyle]() : "#FFFFFF"; 43545 const endColor = this.color ? this.color[$toStyle]() : "#000000"; 43546 const colors = this.type === "toEdge" ? `${startColor},${endColor}` : `${endColor},${startColor}`; 43547 return `radial-gradient(circle at center, ${colors})`; 43548 } 43549} 43550class Reason extends StringObject { 43551 constructor(attributes) { 43552 super(TEMPLATE_NS_ID, "reason"); 43553 this.id = attributes.id || ""; 43554 this.name = attributes.name || ""; 43555 this.use = attributes.use || ""; 43556 this.usehref = attributes.usehref || ""; 43557 } 43558} 43559class Reasons extends XFAObject { 43560 constructor(attributes) { 43561 super(TEMPLATE_NS_ID, "reasons", true); 43562 this.id = attributes.id || ""; 43563 this.type = getStringOption(attributes.type, ["optional", "required"]); 43564 this.use = attributes.use || ""; 43565 this.usehref = attributes.usehref || ""; 43566 this.reason = new XFAObjectArray(); 43567 } 43568} 43569class Rectangle extends XFAObject { 43570 constructor(attributes) { 43571 super(TEMPLATE_NS_ID, "rectangle", true); 43572 this.hand = getStringOption(attributes.hand, ["even", "left", "right"]); 43573 this.id = attributes.id || ""; 43574 this.use = attributes.use || ""; 43575 this.usehref = attributes.usehref || ""; 43576 this.corner = new XFAObjectArray(4); 43577 this.edge = new XFAObjectArray(4); 43578 this.fill = null; 43579 } 43580 [$toHTML]() { 43581 const edge = this.edge.children.length ? this.edge.children[0] : new Edge({}); 43582 const edgeStyle = edge[$toStyle](); 43583 const style = Object.create(null); 43584 if (this.fill?.presence === "visible") { 43585 Object.assign(style, this.fill[$toStyle]()); 43586 } else { 43587 style.fill = "transparent"; 43588 } 43589 style.strokeWidth = measureToString(edge.presence === "visible" ? edge.thickness : 0); 43590 style.stroke = edgeStyle.color; 43591 const corner = this.corner.children.length ? this.corner.children[0] : new Corner({}); 43592 const cornerStyle = corner[$toStyle](); 43593 const rect = { 43594 name: "rect", 43595 attributes: { 43596 xmlns: SVG_NS, 43597 width: "100%", 43598 height: "100%", 43599 x: 0, 43600 y: 0, 43601 rx: cornerStyle.radius, 43602 ry: cornerStyle.radius, 43603 style 43604 } 43605 }; 43606 const svg = { 43607 name: "svg", 43608 children: [rect], 43609 attributes: { 43610 xmlns: SVG_NS, 43611 style: { 43612 overflow: "visible" 43613 }, 43614 width: "100%", 43615 height: "100%" 43616 } 43617 }; 43618 const parent = this[$getParent]()[$getParent](); 43619 if (hasMargin(parent)) { 43620 return HTMLResult.success({ 43621 name: "div", 43622 attributes: { 43623 style: { 43624 display: "inline", 43625 width: "100%", 43626 height: "100%" 43627 } 43628 }, 43629 children: [svg] 43630 }); 43631 } 43632 svg.attributes.style.position = "absolute"; 43633 return HTMLResult.success(svg); 43634 } 43635} 43636class RefElement extends StringObject { 43637 constructor(attributes) { 43638 super(TEMPLATE_NS_ID, "ref"); 43639 this.id = attributes.id || ""; 43640 this.use = attributes.use || ""; 43641 this.usehref = attributes.usehref || ""; 43642 } 43643} 43644class Script extends StringObject { 43645 constructor(attributes) { 43646 super(TEMPLATE_NS_ID, "script"); 43647 this.binding = attributes.binding || ""; 43648 this.contentType = attributes.contentType || ""; 43649 this.id = attributes.id || ""; 43650 this.name = attributes.name || ""; 43651 this.runAt = getStringOption(attributes.runAt, ["client", "both", "server"]); 43652 this.use = attributes.use || ""; 43653 this.usehref = attributes.usehref || ""; 43654 } 43655} 43656class SetProperty extends XFAObject { 43657 constructor(attributes) { 43658 super(TEMPLATE_NS_ID, "setProperty"); 43659 this.connection = attributes.connection || ""; 43660 this.ref = attributes.ref || ""; 43661 this.target = attributes.target || ""; 43662 } 43663} 43664class SignData extends XFAObject { 43665 constructor(attributes) { 43666 super(TEMPLATE_NS_ID, "signData", true); 43667 this.id = attributes.id || ""; 43668 this.operation = getStringOption(attributes.operation, ["sign", "clear", "verify"]); 43669 this.ref = attributes.ref || ""; 43670 this.target = attributes.target || ""; 43671 this.use = attributes.use || ""; 43672 this.usehref = attributes.usehref || ""; 43673 this.filter = null; 43674 this.manifest = null; 43675 } 43676} 43677class Signature extends XFAObject { 43678 constructor(attributes) { 43679 super(TEMPLATE_NS_ID, "signature", true); 43680 this.id = attributes.id || ""; 43681 this.type = getStringOption(attributes.type, ["PDF1.3", "PDF1.6"]); 43682 this.use = attributes.use || ""; 43683 this.usehref = attributes.usehref || ""; 43684 this.border = null; 43685 this.extras = null; 43686 this.filter = null; 43687 this.manifest = null; 43688 this.margin = null; 43689 } 43690} 43691class Signing extends XFAObject { 43692 constructor(attributes) { 43693 super(TEMPLATE_NS_ID, "signing", true); 43694 this.id = attributes.id || ""; 43695 this.type = getStringOption(attributes.type, ["optional", "required"]); 43696 this.use = attributes.use || ""; 43697 this.usehref = attributes.usehref || ""; 43698 this.certificate = new XFAObjectArray(); 43699 } 43700} 43701class Solid extends XFAObject { 43702 constructor(attributes) { 43703 super(TEMPLATE_NS_ID, "solid", true); 43704 this.id = attributes.id || ""; 43705 this.use = attributes.use || ""; 43706 this.usehref = attributes.usehref || ""; 43707 this.extras = null; 43708 } 43709 [$toStyle](startColor) { 43710 return startColor ? startColor[$toStyle]() : "#FFFFFF"; 43711 } 43712} 43713class Speak extends StringObject { 43714 constructor(attributes) { 43715 super(TEMPLATE_NS_ID, "speak"); 43716 this.disable = getInteger({ 43717 data: attributes.disable, 43718 defaultValue: 0, 43719 validate: x => x === 1 43720 }); 43721 this.id = attributes.id || ""; 43722 this.priority = getStringOption(attributes.priority, ["custom", "caption", "name", "toolTip"]); 43723 this.rid = attributes.rid || ""; 43724 this.use = attributes.use || ""; 43725 this.usehref = attributes.usehref || ""; 43726 } 43727} 43728class Stipple extends XFAObject { 43729 constructor(attributes) { 43730 super(TEMPLATE_NS_ID, "stipple", true); 43731 this.id = attributes.id || ""; 43732 this.rate = getInteger({ 43733 data: attributes.rate, 43734 defaultValue: 50, 43735 validate: x => x >= 0 && x <= 100 43736 }); 43737 this.use = attributes.use || ""; 43738 this.usehref = attributes.usehref || ""; 43739 this.color = null; 43740 this.extras = null; 43741 } 43742 [$toStyle](bgColor) { 43743 const alpha = this.rate / 100; 43744 return Util.makeHexColor(Math.round(bgColor.value.r * (1 - alpha) + this.value.r * alpha), Math.round(bgColor.value.g * (1 - alpha) + this.value.g * alpha), Math.round(bgColor.value.b * (1 - alpha) + this.value.b * alpha)); 43745 } 43746} 43747class Subform extends XFAObject { 43748 constructor(attributes) { 43749 super(TEMPLATE_NS_ID, "subform", true); 43750 this.access = getStringOption(attributes.access, ["open", "nonInteractive", "protected", "readOnly"]); 43751 this.allowMacro = getInteger({ 43752 data: attributes.allowMacro, 43753 defaultValue: 0, 43754 validate: x => x === 1 43755 }); 43756 this.anchorType = getStringOption(attributes.anchorType, ["topLeft", "bottomCenter", "bottomLeft", "bottomRight", "middleCenter", "middleLeft", "middleRight", "topCenter", "topRight"]); 43757 this.colSpan = getInteger({ 43758 data: attributes.colSpan, 43759 defaultValue: 1, 43760 validate: n => n >= 1 || n === -1 43761 }); 43762 this.columnWidths = (attributes.columnWidths || "").trim().split(/\s+/).map(x => x === "-1" ? -1 : getMeasurement(x)); 43763 this.h = attributes.h ? getMeasurement(attributes.h) : ""; 43764 this.hAlign = getStringOption(attributes.hAlign, ["left", "center", "justify", "justifyAll", "radix", "right"]); 43765 this.id = attributes.id || ""; 43766 this.layout = getStringOption(attributes.layout, ["position", "lr-tb", "rl-row", "rl-tb", "row", "table", "tb"]); 43767 this.locale = attributes.locale || ""; 43768 this.maxH = getMeasurement(attributes.maxH, "0pt"); 43769 this.maxW = getMeasurement(attributes.maxW, "0pt"); 43770 this.mergeMode = getStringOption(attributes.mergeMode, ["consumeData", "matchTemplate"]); 43771 this.minH = getMeasurement(attributes.minH, "0pt"); 43772 this.minW = getMeasurement(attributes.minW, "0pt"); 43773 this.name = attributes.name || ""; 43774 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 43775 this.relevant = getRelevant(attributes.relevant); 43776 this.restoreState = getStringOption(attributes.restoreState, ["manual", "auto"]); 43777 this.scope = getStringOption(attributes.scope, ["name", "none"]); 43778 this.use = attributes.use || ""; 43779 this.usehref = attributes.usehref || ""; 43780 this.w = attributes.w ? getMeasurement(attributes.w) : ""; 43781 this.x = getMeasurement(attributes.x, "0pt"); 43782 this.y = getMeasurement(attributes.y, "0pt"); 43783 this.assist = null; 43784 this.bind = null; 43785 this.bookend = null; 43786 this.border = null; 43787 this.break = null; 43788 this.calculate = null; 43789 this.desc = null; 43790 this.extras = null; 43791 this.keep = null; 43792 this.margin = null; 43793 this.occur = null; 43794 this.overflow = null; 43795 this.pageSet = null; 43796 this.para = null; 43797 this.traversal = null; 43798 this.validate = null; 43799 this.variables = null; 43800 this.area = new XFAObjectArray(); 43801 this.breakAfter = new XFAObjectArray(); 43802 this.breakBefore = new XFAObjectArray(); 43803 this.connect = new XFAObjectArray(); 43804 this.draw = new XFAObjectArray(); 43805 this.event = new XFAObjectArray(); 43806 this.exObject = new XFAObjectArray(); 43807 this.exclGroup = new XFAObjectArray(); 43808 this.field = new XFAObjectArray(); 43809 this.proto = new XFAObjectArray(); 43810 this.setProperty = new XFAObjectArray(); 43811 this.subform = new XFAObjectArray(); 43812 this.subformSet = new XFAObjectArray(); 43813 } 43814 [$getSubformParent]() { 43815 const parent = this[$getParent](); 43816 if (parent instanceof SubformSet) { 43817 return parent[$getSubformParent](); 43818 } 43819 return parent; 43820 } 43821 [$isBindable]() { 43822 return true; 43823 } 43824 [$isThereMoreWidth]() { 43825 return this.layout.endsWith("-tb") && this[$extra].attempt === 0 && this[$extra].numberInLine > 0 || this[$getParent]()[$isThereMoreWidth](); 43826 } 43827 *[$getContainedChildren]() { 43828 yield* getContainedChildren(this); 43829 } 43830 [$flushHTML]() { 43831 return flushHTML(this); 43832 } 43833 [$addHTML](html, bbox) { 43834 addHTML(this, html, bbox); 43835 } 43836 [$getAvailableSpace]() { 43837 return getAvailableSpace(this); 43838 } 43839 [$isSplittable]() { 43840 const parent = this[$getSubformParent](); 43841 if (!parent[$isSplittable]()) { 43842 return false; 43843 } 43844 if (this[$extra]._isSplittable !== undefined) { 43845 return this[$extra]._isSplittable; 43846 } 43847 if (this.layout === "position" || this.layout.includes("row")) { 43848 this[$extra]._isSplittable = false; 43849 return false; 43850 } 43851 if (this.keep && this.keep.intact !== "none") { 43852 this[$extra]._isSplittable = false; 43853 return false; 43854 } 43855 if (parent.layout?.endsWith("-tb") && parent[$extra].numberInLine !== 0) { 43856 return false; 43857 } 43858 this[$extra]._isSplittable = true; 43859 return true; 43860 } 43861 [$toHTML](availableSpace) { 43862 setTabIndex(this); 43863 if (this.break) { 43864 if (this.break.after !== "auto" || this.break.afterTarget !== "") { 43865 const node = new BreakAfter({ 43866 targetType: this.break.after, 43867 target: this.break.afterTarget, 43868 startNew: this.break.startNew.toString() 43869 }); 43870 node[$globalData] = this[$globalData]; 43871 this[$appendChild](node); 43872 this.breakAfter.push(node); 43873 } 43874 if (this.break.before !== "auto" || this.break.beforeTarget !== "") { 43875 const node = new BreakBefore({ 43876 targetType: this.break.before, 43877 target: this.break.beforeTarget, 43878 startNew: this.break.startNew.toString() 43879 }); 43880 node[$globalData] = this[$globalData]; 43881 this[$appendChild](node); 43882 this.breakBefore.push(node); 43883 } 43884 if (this.break.overflowTarget !== "") { 43885 const node = new Overflow({ 43886 target: this.break.overflowTarget, 43887 leader: this.break.overflowLeader, 43888 trailer: this.break.overflowTrailer 43889 }); 43890 node[$globalData] = this[$globalData]; 43891 this[$appendChild](node); 43892 this.overflow.push(node); 43893 } 43894 this[$removeChild](this.break); 43895 this.break = null; 43896 } 43897 if (this.presence === "hidden" || this.presence === "inactive") { 43898 return HTMLResult.EMPTY; 43899 } 43900 if (this.breakBefore.children.length > 1 || this.breakAfter.children.length > 1) { 43901 warn("XFA - Several breakBefore or breakAfter in subforms: please file a bug."); 43902 } 43903 if (this.breakBefore.children.length >= 1) { 43904 const breakBefore = this.breakBefore.children[0]; 43905 if (handleBreak(breakBefore)) { 43906 return HTMLResult.breakNode(breakBefore); 43907 } 43908 } 43909 if (this[$extra]?.afterBreakAfter) { 43910 return HTMLResult.EMPTY; 43911 } 43912 fixDimensions(this); 43913 const children = []; 43914 const attributes = { 43915 id: this[$uid], 43916 class: [] 43917 }; 43918 setAccess(this, attributes.class); 43919
vendor: 9,700 bytes, lines 43919-44213
43919if (!this[$extra]) { 43920 this[$extra] = Object.create(null); 43921 } 43922 Object.assign(this[$extra], { 43923 children, 43924 line: null, 43925 attributes, 43926 attempt: 0, 43927 numberInLine: 0, 43928 availableSpace: { 43929 width: Math.min(this.w || Infinity, availableSpace.width), 43930 height: Math.min(this.h || Infinity, availableSpace.height) 43931 }, 43932 width: 0, 43933 height: 0, 43934 prevHeight: 0, 43935 currentWidth: 0 43936 }); 43937 const root = this[$getTemplateRoot](); 43938 const savedNoLayoutFailure = root[$extra].noLayoutFailure; 43939 const isSplittable = this[$isSplittable](); 43940 if (!isSplittable) { 43941 setFirstUnsplittable(this); 43942 } 43943 if (!checkDimensions(this, availableSpace)) { 43944 return HTMLResult.FAILURE; 43945 } 43946 const filter = new Set(["area", "draw", "exclGroup", "field", "subform", "subformSet"]); 43947 if (this.layout.includes("row")) { 43948 const columnWidths = this[$getSubformParent]().columnWidths; 43949 if (Array.isArray(columnWidths) && columnWidths.length > 0) { 43950 this[$extra].columnWidths = columnWidths; 43951 this[$extra].currentColumn = 0; 43952 } 43953 } 43954 const style = toStyle(this, "anchorType", "dimensions", "position", "presence", "border", "margin", "hAlign"); 43955 const classNames = ["xfaSubform"]; 43956 const cl = layoutClass(this); 43957 if (cl) { 43958 classNames.push(cl); 43959 } 43960 attributes.style = style; 43961 attributes.class = classNames; 43962 if (this.name) { 43963 attributes.xfaName = this.name; 43964 } 43965 if (this.overflow) { 43966 const overflowExtra = this.overflow[$getExtra](); 43967 if (overflowExtra.addLeader) { 43968 overflowExtra.addLeader = false; 43969 handleOverflow(this, overflowExtra.leader, availableSpace); 43970 } 43971 } 43972 this[$pushPara](); 43973 const isLrTb = this.layout === "lr-tb" || this.layout === "rl-tb"; 43974 const maxRun = isLrTb ? MAX_ATTEMPTS_FOR_LRTB_LAYOUT : 1; 43975 for (; this[$extra].attempt < maxRun; this[$extra].attempt++) { 43976 if (isLrTb && this[$extra].attempt === MAX_ATTEMPTS_FOR_LRTB_LAYOUT - 1) { 43977 this[$extra].numberInLine = 0; 43978 } 43979 const result = this[$childrenToHTML]({ 43980 filter, 43981 include: true 43982 }); 43983 if (result.success) { 43984 break; 43985 } 43986 if (result.isBreak()) { 43987 this[$popPara](); 43988 return result; 43989 } 43990 if (isLrTb && this[$extra].attempt === 0 && this[$extra].numberInLine === 0 && !root[$extra].noLayoutFailure) { 43991 this[$extra].attempt = maxRun; 43992 break; 43993 } 43994 } 43995 this[$popPara](); 43996 if (!isSplittable) { 43997 unsetFirstUnsplittable(this); 43998 } 43999 root[$extra].noLayoutFailure = savedNoLayoutFailure; 44000 if (this[$extra].attempt === maxRun) { 44001 if (this.overflow) { 44002 this[$getTemplateRoot]()[$extra].overflowNode = this.overflow; 44003 } 44004 if (!isSplittable) { 44005 delete this[$extra]; 44006 } 44007 return HTMLResult.FAILURE; 44008 } 44009 if (this.overflow) { 44010 const overflowExtra = this.overflow[$getExtra](); 44011 if (overflowExtra.addTrailer) { 44012 overflowExtra.addTrailer = false; 44013 handleOverflow(this, overflowExtra.trailer, availableSpace); 44014 } 44015 } 44016 let marginH = 0; 44017 let marginV = 0; 44018 if (this.margin) { 44019 marginH = this.margin.leftInset + this.margin.rightInset; 44020 marginV = this.margin.topInset + this.margin.bottomInset; 44021 } 44022 const width = Math.max(this[$extra].width + marginH, this.w || 0); 44023 const height = Math.max(this[$extra].height + marginV, this.h || 0); 44024 const bbox = [this.x, this.y, width, height]; 44025 if (this.w === "") { 44026 style.width = measureToString(width); 44027 } 44028 if (this.h === "") { 44029 style.height = measureToString(height); 44030 } 44031 if ((style.width === "0px" || style.height === "0px") && children.length === 0) { 44032 return HTMLResult.EMPTY; 44033 } 44034 const html = { 44035 name: "div", 44036 attributes, 44037 children 44038 }; 44039 applyAssist(this, attributes); 44040 const result = HTMLResult.success(createWrapper(this, html), bbox); 44041 if (this.breakAfter.children.length >= 1) { 44042 const breakAfter = this.breakAfter.children[0]; 44043 if (handleBreak(breakAfter)) { 44044 this[$extra].afterBreakAfter = result; 44045 return HTMLResult.breakNode(breakAfter); 44046 } 44047 } 44048 delete this[$extra]; 44049 return result; 44050 } 44051} 44052class SubformSet extends XFAObject { 44053 constructor(attributes) { 44054 super(TEMPLATE_NS_ID, "subformSet", true); 44055 this.id = attributes.id || ""; 44056 this.name = attributes.name || ""; 44057 this.relation = getStringOption(attributes.relation, ["ordered", "choice", "unordered"]); 44058 this.relevant = getRelevant(attributes.relevant); 44059 this.use = attributes.use || ""; 44060 this.usehref = attributes.usehref || ""; 44061 this.bookend = null; 44062 this.break = null; 44063 this.desc = null; 44064 this.extras = null; 44065 this.occur = null; 44066 this.overflow = null; 44067 this.breakAfter = new XFAObjectArray(); 44068 this.breakBefore = new XFAObjectArray(); 44069 this.subform = new XFAObjectArray(); 44070 this.subformSet = new XFAObjectArray(); 44071 } 44072 *[$getContainedChildren]() { 44073 yield* getContainedChildren(this); 44074 } 44075 [$getSubformParent]() { 44076 let parent = this[$getParent](); 44077 while (!(parent instanceof Subform)) { 44078 parent = parent[$getParent](); 44079 } 44080 return parent; 44081 } 44082 [$isBindable]() { 44083 return true; 44084 } 44085} 44086class SubjectDN extends ContentObject { 44087 constructor(attributes) { 44088 super(TEMPLATE_NS_ID, "subjectDN"); 44089 this.delimiter = attributes.delimiter || ","; 44090 this.id = attributes.id || ""; 44091 this.name = attributes.name || ""; 44092 this.use = attributes.use || ""; 44093 this.usehref = attributes.usehref || ""; 44094 } 44095 [$finalize]() { 44096 this[$content] = new Map(this[$content].split(this.delimiter).map(kv => { 44097 kv = kv.split("=", 2); 44098 kv[0] = kv[0].trim(); 44099 return kv; 44100 })); 44101 } 44102} 44103class SubjectDNs extends XFAObject { 44104 constructor(attributes) { 44105 super(TEMPLATE_NS_ID, "subjectDNs", true); 44106 this.id = attributes.id || ""; 44107 this.type = getStringOption(attributes.type, ["optional", "required"]); 44108 this.use = attributes.use || ""; 44109 this.usehref = attributes.usehref || ""; 44110 this.subjectDN = new XFAObjectArray(); 44111 } 44112} 44113class Submit extends XFAObject { 44114 constructor(attributes) { 44115 super(TEMPLATE_NS_ID, "submit", true); 44116 this.embedPDF = getInteger({ 44117 data: attributes.embedPDF, 44118 defaultValue: 0, 44119 validate: x => x === 1 44120 }); 44121 this.format = getStringOption(attributes.format, ["xdp", "formdata", "pdf", "urlencoded", "xfd", "xml"]); 44122 this.id = attributes.id || ""; 44123 this.target = attributes.target || ""; 44124 this.textEncoding = getKeyword({ 44125 data: attributes.textEncoding ? attributes.textEncoding.toLowerCase() : "", 44126 defaultValue: "", 44127 validate: k => ["utf-8", "big-five", "fontspecific", "gbk", "gb-18030", "gb-2312", "ksc-5601", "none", "shift-jis", "ucs-2", "utf-16"].includes(k) || k.match(/iso-8859-\d{2}/) 44128 }); 44129 this.use = attributes.use || ""; 44130 this.usehref = attributes.usehref || ""; 44131 this.xdpContent = attributes.xdpContent || ""; 44132 this.encrypt = null; 44133 this.encryptData = new XFAObjectArray(); 44134 this.signData = new XFAObjectArray(); 44135 } 44136} 44137class Template extends XFAObject { 44138 constructor(attributes) { 44139 super(TEMPLATE_NS_ID, "template", true); 44140 this.baseProfile = getStringOption(attributes.baseProfile, ["full", "interactiveForms"]); 44141 this.extras = null; 44142 this.subform = new XFAObjectArray(); 44143 } 44144 [$finalize]() { 44145 if (this.subform.children.length === 0) { 44146 warn("XFA - No subforms in template node."); 44147 } 44148 if (this.subform.children.length >= 2) { 44149 warn("XFA - Several subforms in template node: please file a bug."); 44150 } 44151 this[$tabIndex] = DEFAULT_TAB_INDEX; 44152 } 44153 [$isSplittable]() { 44154 return true; 44155 } 44156 [$searchNode](expr, container) { 44157 if (expr.startsWith("#")) { 44158 return [this[$ids].get(expr.slice(1))]; 44159 } 44160 return searchNode(this, container, expr, true, true); 44161 } 44162 *[$toPages]() { 44163 if (!this.subform.children.length) { 44164 return HTMLResult.success({ 44165 name: "div", 44166 children: [] 44167 }); 44168 } 44169 this[$extra] = { 44170 overflowNode: null, 44171 firstUnsplittable: null, 44172 currentContentArea: null, 44173 currentPageArea: null, 44174 noLayoutFailure: false, 44175 pageNumber: 1, 44176 pagePosition: "first", 44177 oddOrEven: "odd", 44178 blankOrNotBlank: "nonBlank", 44179 paraStack: [] 44180 }; 44181 const root = this.subform.children[0]; 44182 root.pageSet[$cleanPage](); 44183 const pageAreas = root.pageSet.pageArea.children; 44184 const mainHtml = { 44185 name: "div", 44186 children: [] 44187 }; 44188 let pageArea = null; 44189 let breakBefore = null; 44190 let breakBeforeTarget = null; 44191 if (root.breakBefore.children.length >= 1) { 44192 breakBefore = root.breakBefore.children[0]; 44193 breakBeforeTarget = breakBefore.target; 44194 } else if (root.subform.children.length >= 1 && root.subform.children[0].breakBefore.children.length >= 1) { 44195 breakBefore = root.subform.children[0].breakBefore.children[0]; 44196 breakBeforeTarget = breakBefore.target; 44197 } else if (root.break?.beforeTarget) { 44198 breakBefore = root.break; 44199 breakBeforeTarget = breakBefore.beforeTarget; 44200 } else if (root.subform.children.length >= 1 && root.subform.children[0].break?.beforeTarget) { 44201 breakBefore = root.subform.children[0].break; 44202 breakBeforeTarget = breakBefore.beforeTarget; 44203 } 44204 if (breakBefore) { 44205 const target = this[$searchNode](breakBeforeTarget, breakBefore[$getParent]()); 44206 if (target instanceof PageArea) { 44207 pageArea = target; 44208 breakBefore[$extra] = {}; 44209 } 44210 } 44211 if (!pageArea) { 44212 pageArea = pageAreas[0]; 44213 }
vendor: 5,944 bytes, lines 44213-44396
44213 44214 pageArea[$extra] = { 44215 numberOfUse: 1 44216 }; 44217 const pageAreaParent = pageArea[$getParent](); 44218 pageAreaParent[$extra] = { 44219 numberOfUse: 1, 44220 pageIndex: pageAreaParent.pageArea.children.indexOf(pageArea), 44221 pageSetIndex: 0 44222 }; 44223 let targetPageArea; 44224 let leader = null; 44225 let trailer = null; 44226 let hasSomething = true; 44227 let hasSomethingCounter = 0; 44228 let startIndex = 0; 44229 while (true) { 44230 if (!hasSomething) { 44231 mainHtml.children.pop(); 44232 if (++hasSomethingCounter === MAX_EMPTY_PAGES) { 44233 warn("XFA - Something goes wrong: please file a bug."); 44234 return mainHtml; 44235 } 44236 } else { 44237 hasSomethingCounter = 0; 44238 } 44239 targetPageArea = null; 44240 this[$extra].currentPageArea = pageArea; 44241 const page = pageArea[$toHTML]().html; 44242 mainHtml.children.push(page); 44243 if (leader) { 44244 this[$extra].noLayoutFailure = true; 44245 page.children.push(leader[$toHTML](pageArea[$extra].space).html); 44246 leader = null; 44247 } 44248 if (trailer) { 44249 this[$extra].noLayoutFailure = true; 44250 page.children.push(trailer[$toHTML](pageArea[$extra].space).html); 44251 trailer = null; 44252 } 44253 const contentAreas = pageArea.contentArea.children; 44254 const htmlContentAreas = page.children.filter(node => node.attributes.class.includes("xfaContentarea")); 44255 hasSomething = false; 44256 this[$extra].firstUnsplittable = null; 44257 this[$extra].noLayoutFailure = false; 44258 const flush = index => { 44259 const html = root[$flushHTML](); 44260 if (html) { 44261 hasSomething ||= html.children?.length > 0; 44262 htmlContentAreas[index].children.push(html); 44263 } 44264 }; 44265 for (let i = startIndex, ii = contentAreas.length; i < ii; i++) { 44266 const contentArea = this[$extra].currentContentArea = contentAreas[i]; 44267 const space = { 44268 width: contentArea.w, 44269 height: contentArea.h 44270 }; 44271 startIndex = 0; 44272 if (leader) { 44273 htmlContentAreas[i].children.push(leader[$toHTML](space).html); 44274 leader = null; 44275 } 44276 if (trailer) { 44277 htmlContentAreas[i].children.push(trailer[$toHTML](space).html); 44278 trailer = null; 44279 } 44280 const html = root[$toHTML](space); 44281 if (html.success) { 44282 if (html.html) { 44283 hasSomething ||= html.html.children?.length > 0; 44284 htmlContentAreas[i].children.push(html.html); 44285 } else if (!hasSomething && mainHtml.children.length > 1) { 44286 mainHtml.children.pop(); 44287 } 44288 return mainHtml; 44289 } 44290 if (html.isBreak()) { 44291 const node = html.breakNode; 44292 flush(i); 44293 if (node.targetType === "auto") { 44294 continue; 44295 } 44296 if (node.leader) { 44297 leader = this[$searchNode](node.leader, node[$getParent]()); 44298 leader = leader ? leader[0] : null; 44299 } 44300 if (node.trailer) { 44301 trailer = this[$searchNode](node.trailer, node[$getParent]()); 44302 trailer = trailer ? trailer[0] : null; 44303 } 44304 if (node.targetType === "pageArea") { 44305 targetPageArea = node[$extra].target; 44306 i = Infinity; 44307 } else if (!node[$extra].target) { 44308 i = node[$extra].index; 44309 } else { 44310 targetPageArea = node[$extra].target; 44311 startIndex = node[$extra].index + 1; 44312 i = Infinity; 44313 } 44314 continue; 44315 } 44316 if (this[$extra].overflowNode) { 44317 const node = this[$extra].overflowNode; 44318 this[$extra].overflowNode = null; 44319 const overflowExtra = node[$getExtra](); 44320 const target = overflowExtra.target; 44321 overflowExtra.addLeader = overflowExtra.leader !== null; 44322 overflowExtra.addTrailer = overflowExtra.trailer !== null; 44323 flush(i); 44324 const currentIndex = i; 44325 i = Infinity; 44326 if (target instanceof PageArea) { 44327 targetPageArea = target; 44328 } else if (target instanceof ContentArea) { 44329 const index = contentAreas.indexOf(target); 44330 if (index !== -1) { 44331 if (index > currentIndex) { 44332 i = index - 1; 44333 } else { 44334 startIndex = index; 44335 } 44336 } else { 44337 targetPageArea = target[$getParent](); 44338 startIndex = targetPageArea.contentArea.children.indexOf(target); 44339 } 44340 } 44341 continue; 44342 } 44343 flush(i); 44344 } 44345 this[$extra].pageNumber += 1; 44346 if (targetPageArea) { 44347 if (targetPageArea[$isUsable]()) { 44348 targetPageArea[$extra].numberOfUse += 1; 44349 } else { 44350 targetPageArea = null; 44351 } 44352 } 44353 pageArea = targetPageArea || pageArea[$getNextPage](); 44354 yield null; 44355 } 44356 } 44357} 44358class Text extends ContentObject { 44359 constructor(attributes) { 44360 super(TEMPLATE_NS_ID, "text"); 44361 this.id = attributes.id || ""; 44362 this.maxChars = getInteger({ 44363 data: attributes.maxChars, 44364 defaultValue: 0, 44365 validate: x => x >= 0 44366 }); 44367 this.name = attributes.name || ""; 44368 this.rid = attributes.rid || ""; 44369 this.use = attributes.use || ""; 44370 this.usehref = attributes.usehref || ""; 44371 } 44372 [$acceptWhitespace]() { 44373 return true; 44374 } 44375 [$onChild](child) { 44376 if (child[$namespaceId] === NamespaceIds.xhtml.id) { 44377 this[$content] = child; 44378 return true; 44379 } 44380 warn(`XFA - Invalid content in Text: ${child[$nodeName]}.`); 44381 return false; 44382 } 44383 [$onText](str) { 44384 if (this[$content] instanceof XFAObject) { 44385 return; 44386 } 44387 super[$onText](str); 44388 } 44389 [$finalize]() { 44390 if (typeof this[$content] === "string") { 44391 this[$content] = this[$content].replaceAll("\r\n", "\n"); 44392 } 44393 } 44394 [$getExtra]() { 44395 if (typeof this[$content] === "string") { 44396 return this[$content].split(/[\u2029\u2028\n]/).
44396reduce((acc, line) => { 44397 if (line) { 44398 acc.push(line); 44399 } 44400 return acc; 44401 }, []).join("\n"); 44402 } 44403 return this[$content][$text](); 44404 } 44405 [$toHTML](availableSpace) { 44406 if (typeof this[$content] === "string") { 44407 const html = valueToHtml(this[$content]).html; 44408 if (this[$content].includes("\u2029")) { 44409 html.name = "div"; 44410 html.children = []; 44411 this[$content].split("\u2029").map(para => para.split(/[\u2028\n]/).reduce((acc, line) => { 44412 acc.push({ 44413 name: "span", 44414 value: line 44415 }, { 44416 name: "br" 44417 }); 44418 return acc; 44419 }, [
vendor: 29,528 bytes, lines 44419-45511
44419])).forEach(lines => { 44420 html.children.push({ 44421 name: "p", 44422 children: lines 44423 }); 44424 }); 44425 } else if (/[\u2028\n]/.test(this[$content])) { 44426 html.name = "div"; 44427 html.children = []; 44428 this[$content].split(/[\u2028\n]/).forEach(line => { 44429 html.children.push({ 44430 name: "span", 44431 value: line 44432 }, { 44433 name: "br" 44434 }); 44435 }); 44436 } 44437 return HTMLResult.success(html); 44438 } 44439 return this[$content][$toHTML](availableSpace); 44440 } 44441} 44442class TextEdit extends XFAObject { 44443 constructor(attributes) { 44444 super(TEMPLATE_NS_ID, "textEdit", true); 44445 this.allowRichText = getInteger({ 44446 data: attributes.allowRichText, 44447 defaultValue: 0, 44448 validate: x => x === 1 44449 }); 44450 this.hScrollPolicy = getStringOption(attributes.hScrollPolicy, ["auto", "off", "on"]); 44451 this.id = attributes.id || ""; 44452 this.multiLine = getInteger({ 44453 data: attributes.multiLine, 44454 defaultValue: "", 44455 validate: x => x === 0 || x === 1 44456 }); 44457 this.use = attributes.use || ""; 44458 this.usehref = attributes.usehref || ""; 44459 this.vScrollPolicy = getStringOption(attributes.vScrollPolicy, ["auto", "off", "on"]); 44460 this.border = null; 44461 this.comb = null; 44462 this.extras = null; 44463 this.margin = null; 44464 } 44465 [$toHTML](availableSpace) { 44466 const style = toStyle(this, "border", "font", "margin"); 44467 let html; 44468 const field = this[$getParent]()[$getParent](); 44469 if (this.multiLine === "") { 44470 this.multiLine = field instanceof Draw ? 1 : 0; 44471 } 44472 if (this.multiLine === 1) { 44473 html = { 44474 name: "textarea", 44475 attributes: { 44476 dataId: field[$data]?.[$uid] || field[$uid], 44477 fieldId: field[$uid], 44478 class: ["xfaTextfield"], 44479 style, 44480 "aria-label": ariaLabel(field), 44481 "aria-required": false 44482 } 44483 }; 44484 } else { 44485 html = { 44486 name: "input", 44487 attributes: { 44488 type: "text", 44489 dataId: field[$data]?.[$uid] || field[$uid], 44490 fieldId: field[$uid], 44491 class: ["xfaTextfield"], 44492 style, 44493 "aria-label": ariaLabel(field), 44494 "aria-required": false 44495 } 44496 }; 44497 } 44498 if (isRequired(field)) { 44499 html.attributes["aria-required"] = true; 44500 html.attributes.required = true; 44501 } 44502 return HTMLResult.success({ 44503 name: "label", 44504 attributes: { 44505 class: ["xfaLabel"] 44506 }, 44507 children: [html] 44508 }); 44509 } 44510} 44511class Time extends StringObject { 44512 constructor(attributes) { 44513 super(TEMPLATE_NS_ID, "time"); 44514 this.id = attributes.id || ""; 44515 this.name = attributes.name || ""; 44516 this.use = attributes.use || ""; 44517 this.usehref = attributes.usehref || ""; 44518 } 44519 [$finalize]() { 44520 const date = this[$content].trim(); 44521 this[$content] = date ? new Date(date) : null; 44522 } 44523 [$toHTML](availableSpace) { 44524 return valueToHtml(this[$content] ? this[$content].toString() : ""); 44525 } 44526} 44527class TimeStamp extends XFAObject { 44528 constructor(attributes) { 44529 super(TEMPLATE_NS_ID, "timeStamp"); 44530 this.id = attributes.id || ""; 44531 this.server = attributes.server || ""; 44532 this.type = getStringOption(attributes.type, ["optional", "required"]); 44533 this.use = attributes.use || ""; 44534 this.usehref = attributes.usehref || ""; 44535 } 44536} 44537class ToolTip extends StringObject { 44538 constructor(attributes) { 44539 super(TEMPLATE_NS_ID, "toolTip"); 44540 this.id = attributes.id || ""; 44541 this.rid = attributes.rid || ""; 44542 this.use = attributes.use || ""; 44543 this.usehref = attributes.usehref || ""; 44544 } 44545} 44546class Traversal extends XFAObject { 44547 constructor(attributes) { 44548 super(TEMPLATE_NS_ID, "traversal", true); 44549 this.id = attributes.id || ""; 44550 this.use = attributes.use || ""; 44551 this.usehref = attributes.usehref || ""; 44552 this.extras = null; 44553 this.traverse = new XFAObjectArray(); 44554 } 44555} 44556class Traverse extends XFAObject { 44557 constructor(attributes) { 44558 super(TEMPLATE_NS_ID, "traverse", true); 44559 this.id = attributes.id || ""; 44560 this.operation = getStringOption(attributes.operation, ["next", "back", "down", "first", "left", "right", "up"]); 44561 this.ref = attributes.ref || ""; 44562 this.use = attributes.use || ""; 44563 this.usehref = attributes.usehref || ""; 44564 this.extras = null; 44565 this.script = null; 44566 } 44567 get name() { 44568 return this.operation; 44569 } 44570 [$isTransparent]() { 44571 return false; 44572 } 44573} 44574class Ui extends XFAObject { 44575 constructor(attributes) { 44576 super(TEMPLATE_NS_ID, "ui", true); 44577 this.id = attributes.id || ""; 44578 this.use = attributes.use || ""; 44579 this.usehref = attributes.usehref || ""; 44580 this.extras = null; 44581 this.picture = null; 44582 this.barcode = null; 44583 this.button = null; 44584 this.checkButton = null; 44585 this.choiceList = null; 44586 this.dateTimeEdit = null; 44587 this.defaultUi = null; 44588 this.imageEdit = null; 44589 this.numericEdit = null; 44590 this.passwordEdit = null; 44591 this.signature = null; 44592 this.textEdit = null; 44593 } 44594 [$getExtra]() { 44595 if (this[$extra] === undefined) { 44596 for (const name of Object.getOwnPropertyNames(this)) { 44597 if (name === "extras" || name === "picture") { 44598 continue; 44599 } 44600 const obj = this[name]; 44601 if (!(obj instanceof XFAObject)) { 44602 continue; 44603 } 44604 this[$extra] = obj; 44605 return obj; 44606 } 44607 this[$extra] = null; 44608 } 44609 return this[$extra]; 44610 } 44611 [$toHTML](availableSpace) { 44612 const obj = this[$getExtra](); 44613 if (obj) { 44614 return obj[$toHTML](availableSpace); 44615 } 44616 return HTMLResult.EMPTY; 44617 } 44618} 44619class Validate extends XFAObject { 44620 constructor(attributes) { 44621 super(TEMPLATE_NS_ID, "validate", true); 44622 this.formatTest = getStringOption(attributes.formatTest, ["warning", "disabled", "error"]); 44623 this.id = attributes.id || ""; 44624 this.nullTest = getStringOption(attributes.nullTest, ["disabled", "error", "warning"]); 44625 this.scriptTest = getStringOption(attributes.scriptTest, ["error", "disabled", "warning"]); 44626 this.use = attributes.use || ""; 44627 this.usehref = attributes.usehref || ""; 44628 this.extras = null; 44629 this.message = null; 44630 this.picture = null; 44631 this.script = null; 44632 } 44633} 44634class Value extends XFAObject { 44635 constructor(attributes) { 44636 super(TEMPLATE_NS_ID, "value", true); 44637 this.id = attributes.id || ""; 44638 this.override = getInteger({ 44639 data: attributes.override, 44640 defaultValue: 0, 44641 validate: x => x === 1 44642 }); 44643 this.relevant = getRelevant(attributes.relevant); 44644 this.use = attributes.use || ""; 44645 this.usehref = attributes.usehref || ""; 44646 this.arc = null; 44647 this.boolean = null; 44648 this.date = null; 44649 this.dateTime = null; 44650 this.decimal = null; 44651 this.exData = null; 44652 this.float = null; 44653 this.image = null; 44654 this.integer = null; 44655 this.line = null; 44656 this.rectangle = null; 44657 this.text = null; 44658 this.time = null; 44659 } 44660 [$setValue](value) { 44661 const parent = this[$getParent](); 44662 if (parent instanceof Field) { 44663 if (parent.ui?.imageEdit) { 44664 if (!this.image) { 44665 this.image = new Image({}); 44666 this[$appendChild](this.image); 44667 } 44668 this.image[$content] = value[$content]; 44669 return; 44670 } 44671 } 44672 const valueName = value[$nodeName]; 44673 if (this[valueName] !== null) { 44674 this[valueName][$content] = value[$content]; 44675 return; 44676 } 44677 for (const name of Object.getOwnPropertyNames(this)) { 44678 const obj = this[name]; 44679 if (obj instanceof XFAObject) { 44680 this[name] = null; 44681 this[$removeChild](obj); 44682 } 44683 } 44684 this[value[$nodeName]] = value; 44685 this[$appendChild](value); 44686 } 44687 [$text]() { 44688 if (this.exData) { 44689 if (typeof this.exData[$content] === "string") { 44690 return this.exData[$content].trim(); 44691 } 44692 return this.exData[$content][$text]().trim(); 44693 } 44694 for (const name of Object.getOwnPropertyNames(this)) { 44695 if (name === "image") { 44696 continue; 44697 } 44698 const obj = this[name]; 44699 if (obj instanceof XFAObject) { 44700 return (obj[$content] || "").toString().trim(); 44701 } 44702 } 44703 return null; 44704 } 44705 [$toHTML](availableSpace) { 44706 for (const name of Object.getOwnPropertyNames(this)) { 44707 const obj = this[name]; 44708 if (!(obj instanceof XFAObject)) { 44709 continue; 44710 } 44711 return obj[$toHTML](availableSpace); 44712 } 44713 return HTMLResult.EMPTY; 44714 } 44715} 44716class Variables extends XFAObject { 44717 constructor(attributes) { 44718 super(TEMPLATE_NS_ID, "variables", true); 44719 this.id = attributes.id || ""; 44720 this.use = attributes.use || ""; 44721 this.usehref = attributes.usehref || ""; 44722 this.boolean = new XFAObjectArray(); 44723 this.date = new XFAObjectArray(); 44724 this.dateTime = new XFAObjectArray(); 44725 this.decimal = new XFAObjectArray(); 44726 this.exData = new XFAObjectArray(); 44727 this.float = new XFAObjectArray(); 44728 this.image = new XFAObjectArray(); 44729 this.integer = new XFAObjectArray(); 44730 this.manifest = new XFAObjectArray(); 44731 this.script = new XFAObjectArray(); 44732 this.text = new XFAObjectArray(); 44733 this.time = new XFAObjectArray(); 44734 } 44735 [$isTransparent]() { 44736 return true; 44737 } 44738} 44739class TemplateNamespace { 44740 static [$buildXFAObject](name, attributes) { 44741 if (TemplateNamespace.hasOwnProperty(name)) { 44742 const node = TemplateNamespace[name](attributes); 44743 node[$setSetAttributes](attributes); 44744 return node; 44745 } 44746 return undefined; 44747 } 44748 static appearanceFilter(attrs) { 44749 return new AppearanceFilter(attrs); 44750 } 44751 static arc(attrs) { 44752 return new Arc(attrs); 44753 } 44754 static area(attrs) { 44755 return new Area(attrs); 44756 } 44757 static assist(attrs) { 44758 return new Assist(attrs); 44759 } 44760 static barcode(attrs) { 44761 return new Barcode(attrs); 44762 } 44763 static bind(attrs) { 44764 return new Bind(attrs); 44765 } 44766 static bindItems(attrs) { 44767 return new BindItems(attrs); 44768 } 44769 static bookend(attrs) { 44770 return new Bookend(attrs); 44771 } 44772 static boolean(attrs) { 44773 return new BooleanElement(attrs); 44774 } 44775 static border(attrs) { 44776 return new Border(attrs); 44777 } 44778 static break(attrs) { 44779 return new Break(attrs); 44780 } 44781 static breakAfter(attrs) { 44782 return new BreakAfter(attrs); 44783 } 44784 static breakBefore(attrs) { 44785 return new BreakBefore(attrs); 44786 } 44787 static button(attrs) { 44788 return new Button(attrs); 44789 } 44790 static calculate(attrs) { 44791 return new Calculate(attrs); 44792 } 44793 static caption(attrs) { 44794 return new Caption(attrs); 44795 } 44796 static certificate(attrs) { 44797 return new Certificate(attrs); 44798 } 44799 static certificates(attrs) { 44800 return new Certificates(attrs); 44801 } 44802 static checkButton(attrs) { 44803 return new CheckButton(attrs); 44804 } 44805 static choiceList(attrs) { 44806 return new ChoiceList(attrs); 44807 } 44808 static color(attrs) { 44809 return new Color(attrs); 44810 } 44811 static comb(attrs) { 44812 return new Comb(attrs); 44813 } 44814 static connect(attrs) { 44815 return new Connect(attrs); 44816 } 44817 static contentArea(attrs) { 44818 return new ContentArea(attrs); 44819 } 44820 static corner(attrs) { 44821 return new Corner(attrs); 44822 } 44823 static date(attrs) { 44824 return new DateElement(attrs); 44825 } 44826 static dateTime(attrs) { 44827 return new DateTime(attrs); 44828 } 44829 static dateTimeEdit(attrs) { 44830 return new DateTimeEdit(attrs); 44831 } 44832 static decimal(attrs) { 44833 return new Decimal(attrs); 44834 } 44835 static defaultUi(attrs) { 44836 return new DefaultUi(attrs); 44837 } 44838 static desc(attrs) { 44839 return new Desc(attrs); 44840 } 44841 static digestMethod(attrs) { 44842 return new DigestMethod(attrs); 44843 } 44844 static digestMethods(attrs) { 44845 return new DigestMethods(attrs); 44846 } 44847 static draw(attrs) { 44848 return new Draw(attrs); 44849 } 44850 static edge(attrs) { 44851 return new Edge(attrs); 44852 } 44853 static encoding(attrs) { 44854 return new Encoding(attrs); 44855 } 44856 static encodings(attrs) { 44857 return new Encodings(attrs); 44858 } 44859 static encrypt(attrs) { 44860 return new Encrypt(attrs); 44861 } 44862 static encryptData(attrs) { 44863 return new EncryptData(attrs); 44864 } 44865 static encryption(attrs) { 44866 return new Encryption(attrs); 44867 } 44868 static encryptionMethod(attrs) { 44869 return new EncryptionMethod(attrs); 44870 } 44871 static encryptionMethods(attrs) { 44872 return new EncryptionMethods(attrs); 44873 } 44874 static event(attrs) { 44875 return new Event(attrs); 44876 } 44877 static exData(attrs) { 44878 return new ExData(attrs); 44879 } 44880 static exObject(attrs) { 44881 return new ExObject(attrs); 44882 } 44883 static exclGroup(attrs) { 44884 return new ExclGroup(attrs); 44885 } 44886 static execute(attrs) { 44887 return new Execute(attrs); 44888 } 44889 static extras(attrs) { 44890 return new Extras(attrs); 44891 } 44892 static field(attrs) { 44893 return new Field(attrs); 44894 } 44895 static fill(attrs) { 44896 return new Fill(attrs); 44897 } 44898 static filter(attrs) { 44899 return new Filter(attrs); 44900 } 44901 static float(attrs) { 44902 return new Float(attrs); 44903 } 44904 static font(attrs) { 44905 return new template_Font(attrs); 44906 } 44907 static format(attrs) { 44908 return new Format(attrs); 44909 } 44910 static handler(attrs) { 44911 return new Handler(attrs); 44912 } 44913 static hyphenation(attrs) { 44914 return new Hyphenation(attrs); 44915 } 44916 static image(attrs) { 44917 return new Image(attrs); 44918 } 44919 static imageEdit(attrs) { 44920 return new ImageEdit(attrs); 44921 } 44922 static integer(attrs) { 44923 return new Integer(attrs); 44924 } 44925 static issuers(attrs) { 44926 return new Issuers(attrs); 44927 } 44928 static items(attrs) { 44929 return new Items(attrs); 44930 } 44931 static keep(attrs) { 44932 return new Keep(attrs); 44933 } 44934 static keyUsage(attrs) { 44935 return new KeyUsage(attrs); 44936 } 44937 static line(attrs) { 44938 return new Line(attrs); 44939 } 44940 static linear(attrs) { 44941 return new Linear(attrs); 44942 } 44943 static lockDocument(attrs) { 44944 return new LockDocument(attrs); 44945 } 44946 static manifest(attrs) { 44947 return new Manifest(attrs); 44948 } 44949 static margin(attrs) { 44950 return new Margin(attrs); 44951 } 44952 static mdp(attrs) { 44953 return new Mdp(attrs); 44954 } 44955 static medium(attrs) { 44956 return new Medium(attrs); 44957 } 44958 static message(attrs) { 44959 return new Message(attrs); 44960 } 44961 static numericEdit(attrs) { 44962 return new NumericEdit(attrs); 44963 } 44964 static occur(attrs) { 44965 return new Occur(attrs); 44966 } 44967 static oid(attrs) { 44968 return new Oid(attrs); 44969 } 44970 static oids(attrs) { 44971 return new Oids(attrs); 44972 } 44973 static overflow(attrs) { 44974 return new Overflow(attrs); 44975 } 44976 static pageArea(attrs) { 44977 return new PageArea(attrs); 44978 } 44979 static pageSet(attrs) { 44980 return new PageSet(attrs); 44981 } 44982 static para(attrs) { 44983 return new Para(attrs); 44984 } 44985 static passwordEdit(attrs) { 44986 return new PasswordEdit(attrs); 44987 } 44988 static pattern(attrs) { 44989 return new template_Pattern(attrs); 44990 } 44991 static picture(attrs) { 44992 return new Picture(attrs); 44993 } 44994 static proto(attrs) { 44995 return new Proto(attrs); 44996 } 44997 static radial(attrs) { 44998 return new Radial(attrs); 44999 } 45000 static reason(attrs) { 45001 return new Reason(attrs); 45002 } 45003 static reasons(attrs) { 45004 return new Reasons(attrs); 45005 } 45006 static rectangle(attrs) { 45007 return new Rectangle(attrs); 45008 } 45009 static ref(attrs) { 45010 return new RefElement(attrs); 45011 } 45012 static script(attrs) { 45013 return new Script(attrs); 45014 } 45015 static setProperty(attrs) { 45016 return new SetProperty(attrs); 45017 } 45018 static signData(attrs) { 45019 return new SignData(attrs); 45020 } 45021 static signature(attrs) { 45022 return new Signature(attrs); 45023 } 45024 static signing(attrs) { 45025 return new Signing(attrs); 45026 } 45027 static solid(attrs) { 45028 return new Solid(attrs); 45029 } 45030 static speak(attrs) { 45031 return new Speak(attrs); 45032 } 45033 static stipple(attrs) { 45034 return new Stipple(attrs); 45035 } 45036 static subform(attrs) { 45037 return new Subform(attrs); 45038 } 45039 static subformSet(attrs) { 45040 return new SubformSet(attrs); 45041 } 45042 static subjectDN(attrs) { 45043 return new SubjectDN(attrs); 45044 } 45045 static subjectDNs(attrs) { 45046 return new SubjectDNs(attrs); 45047 } 45048 static submit(attrs) { 45049 return new Submit(attrs); 45050 } 45051 static template(attrs) { 45052 return new Template(attrs); 45053 } 45054 static text(attrs) { 45055 return new Text(attrs); 45056 } 45057 static textEdit(attrs) { 45058 return new TextEdit(attrs); 45059 } 45060 static time(attrs) { 45061 return new Time(attrs); 45062 } 45063 static timeStamp(attrs) { 45064 return new TimeStamp(attrs); 45065 } 45066 static toolTip(attrs) { 45067 return new ToolTip(attrs); 45068 } 45069 static traversal(attrs) { 45070 return new Traversal(attrs); 45071 } 45072 static traverse(attrs) { 45073 return new Traverse(attrs); 45074 } 45075 static ui(attrs) { 45076 return new Ui(attrs); 45077 } 45078 static validate(attrs) { 45079 return new Validate(attrs); 45080 } 45081 static value(attrs) { 45082 return new Value(attrs); 45083 } 45084 static variables(attrs) { 45085 return new Variables(attrs); 45086 } 45087} 45088 45089;// ./src/core/xfa/bind.js 45090 45091 45092 45093 45094 45095 45096const bind_NS_DATASETS = NamespaceIds.datasets.id; 45097function createText(content) { 45098 const node = new Text({}); 45099 node[$content] = content; 45100 return node; 45101} 45102class Binder { 45103 constructor(root) { 45104 this.root = root; 45105 this.datasets = root.datasets; 45106 this.data = root.datasets?.data || new XmlObject(NamespaceIds.datasets.id, "data"); 45107 this.emptyMerge = this.data[$getChildren]().length === 0; 45108 this.root.form = this.form = root.template[$clone](); 45109 } 45110 _isConsumeData() { 45111 return !this.emptyMerge && this._mergeMode; 45112 } 45113 _isMatchTemplate() { 45114 return !this._isConsumeData(); 45115 } 45116 bind() { 45117 this._bindElement(this.form, this.data); 45118 return this.form; 45119 } 45120 getData() { 45121 return this.data; 45122 } 45123 _bindValue(formNode, data, picture) { 45124 formNode[$data] = data; 45125 if (formNode[$hasSettableValue]()) { 45126 if (data[$isDataValue]()) { 45127 const value = data[$getDataValue](); 45128 formNode[$setValue](createText(value)); 45129 } else if (formNode instanceof Field && formNode.ui?.choiceList?.open === "multiSelect") { 45130 const value = data[$getChildren]().map(child => child[$content].trim()).join("\n"); 45131 formNode[$setValue](createText(value)); 45132 } else if (this._isConsumeData()) { 45133 warn(`XFA - Nodes haven't the same type.`); 45134 } 45135 } else if (!data[$isDataValue]() || this._isMatchTemplate()) { 45136 this._bindElement(formNode, data); 45137 } else { 45138 warn(`XFA - Nodes haven't the same type.`); 45139 } 45140 } 45141 _findDataByNameToConsume(name, isValue, dataNode, global) { 45142 if (!name) { 45143 return null; 45144 } 45145 let generator, match; 45146 for (let i = 0; i < 3; i++) { 45147 generator = dataNode[$getRealChildrenByNameIt](name, false, true); 45148 while (true) { 45149 match = generator.next().value; 45150 if (!match) { 45151 break; 45152 } 45153 if (isValue === match[$isDataValue]()) { 45154 return match; 45155 } 45156 } 45157 if (dataNode[$namespaceId] === NamespaceIds.datasets.id && dataNode[$nodeName] === "data") { 45158 break; 45159 } 45160 dataNode = dataNode[$getParent](); 45161 } 45162 if (!global) { 45163 return null; 45164 } 45165 generator = this.data[$getRealChildrenByNameIt](name, true, false); 45166 match = generator.next().value; 45167 if (match) { 45168 return match; 45169 } 45170 generator = this.data[$getAttributeIt](name, true); 45171 match = generator.next().value; 45172 if (match?.[$isDataValue]()) { 45173 return match; 45174 } 45175 return null; 45176 } 45177 _setProperties(formNode, dataNode) { 45178 if (!formNode.hasOwnProperty("setProperty")) { 45179 return; 45180 } 45181 for (const { 45182 ref, 45183 target, 45184 connection 45185 } of formNode.setProperty.children) { 45186 if (connection) { 45187 continue; 45188 } 45189 if (!ref) { 45190 continue; 45191 } 45192 const nodes = searchNode(this.root, dataNode, ref, false, false); 45193 if (!nodes) { 45194 warn(`XFA - Invalid reference: ${ref}.`); 45195 continue; 45196 } 45197 const [node] = nodes; 45198 if (!node[$isDescendent](this.data)) { 45199 warn(`XFA - Invalid node: must be a data node.`); 45200 continue; 45201 } 45202 const targetNodes = searchNode(this.root, formNode, target, false, false); 45203 if (!targetNodes) { 45204 warn(`XFA - Invalid target: ${target}.`); 45205 continue; 45206 } 45207 const [targetNode] = targetNodes; 45208 if (!targetNode[$isDescendent](formNode)) { 45209 warn(`XFA - Invalid target: must be a property or subproperty.`); 45210 continue; 45211 } 45212 const targetParent = targetNode[$getParent](); 45213 if (targetNode instanceof SetProperty || targetParent instanceof SetProperty) { 45214 warn(`XFA - Invalid target: cannot be a setProperty or one of its properties.`); 45215 continue; 45216 } 45217 if (targetNode instanceof BindItems || targetParent instanceof BindItems) { 45218 warn(`XFA - Invalid target: cannot be a bindItems or one of its properties.`); 45219 continue; 45220 } 45221 const content = node[$text](); 45222 const name = targetNode[$nodeName]; 45223 if (targetNode instanceof XFAAttribute) { 45224 const attrs = Object.create(null); 45225 attrs[name] = content; 45226 const obj = Reflect.construct(Object.getPrototypeOf(targetParent).constructor, [attrs]); 45227 targetParent[name] = obj[name]; 45228 continue; 45229 } 45230 if (!targetNode.hasOwnProperty($content)) { 45231 warn(`XFA - Invalid node to use in setProperty`); 45232 continue; 45233 } 45234 targetNode[$data] = node; 45235 targetNode[$content] = content; 45236 targetNode[$finalize](); 45237 } 45238 } 45239 _bindItems(formNode, dataNode) { 45240 if (!formNode.hasOwnProperty("items") || !formNode.hasOwnProperty("bindItems") || formNode.bindItems.isEmpty()) { 45241 return; 45242 } 45243 for (const item of formNode.items.children) { 45244 formNode[$removeChild](item); 45245 } 45246 formNode.items.clear(); 45247 const labels = new Items({}); 45248 const values = new Items({}); 45249 formNode[$appendChild](labels); 45250 formNode.items.push(labels); 45251 formNode[$appendChild](values); 45252 formNode.items.push(values); 45253 for (const { 45254 ref, 45255 labelRef, 45256 valueRef, 45257 connection 45258 } of formNode.bindItems.children) { 45259 if (connection) { 45260 continue; 45261 } 45262 if (!ref) { 45263 continue; 45264 } 45265 const nodes = searchNode(this.root, dataNode, ref, false, false); 45266 if (!nodes) { 45267 warn(`XFA - Invalid reference: ${ref}.`); 45268 continue; 45269 } 45270 for (const node of nodes) { 45271 if (!node[$isDescendent](this.datasets)) { 45272 warn(`XFA - Invalid ref (${ref}): must be a datasets child.`); 45273 continue; 45274 } 45275 const labelNodes = searchNode(this.root, node, labelRef, true, false); 45276 if (!labelNodes) { 45277 warn(`XFA - Invalid label: ${labelRef}.`); 45278 continue; 45279 } 45280 const [labelNode] = labelNodes; 45281 if (!labelNode[$isDescendent](this.datasets)) { 45282 warn(`XFA - Invalid label: must be a datasets child.`); 45283 continue; 45284 } 45285 const valueNodes = searchNode(this.root, node, valueRef, true, false); 45286 if (!valueNodes) { 45287 warn(`XFA - Invalid value: ${valueRef}.`); 45288 continue; 45289 } 45290 const [valueNode] = valueNodes; 45291 if (!valueNode[$isDescendent](this.datasets)) { 45292 warn(`XFA - Invalid value: must be a datasets child.`); 45293 continue; 45294 } 45295 const label = createText(labelNode[$text]()); 45296 const value = createText(valueNode[$text]()); 45297 labels[$appendChild](label); 45298 labels.text.push(label); 45299 values[$appendChild](value); 45300 values.text.push(value); 45301 } 45302 } 45303 } 45304 _bindOccurrences(formNode, matches, picture) { 45305 let baseClone; 45306 if (matches.length > 1) { 45307 baseClone = formNode[$clone](); 45308 baseClone[$removeChild](baseClone.occur); 45309 baseClone.occur = null; 45310 } 45311 this._bindValue(formNode, matches[0], picture); 45312 this._setProperties(formNode, matches[0]); 45313 this._bindItems(formNode, matches[0]); 45314 if (matches.length === 1) { 45315 return; 45316 } 45317 const parent = formNode[$getParent](); 45318 const name = formNode[$nodeName]; 45319 const pos = parent[$indexOf](formNode); 45320 for (let i = 1, ii = matches.length; i < ii; i++) { 45321 const match = matches[i]; 45322 const clone = baseClone[$clone](); 45323 parent[name].push(clone); 45324 parent[$insertAt](pos + i, clone); 45325 this._bindValue(clone, match, picture); 45326 this._setProperties(clone, match); 45327 this._bindItems(clone, match); 45328 } 45329 } 45330 _createOccurrences(formNode) { 45331 if (!this.emptyMerge) { 45332 return; 45333 } 45334 const { 45335 occur 45336 } = formNode; 45337 if (!occur || occur.initial <= 1) { 45338 return; 45339 } 45340 const parent = formNode[$getParent](); 45341 const name = formNode[$nodeName]; 45342 if (!(parent[name] instanceof XFAObjectArray)) { 45343 return; 45344 } 45345 let currentNumber; 45346 if (formNode.name) { 45347 currentNumber = parent[name].children.filter(e => e.name === formNode.name).length; 45348 } else { 45349 currentNumber = parent[name].children.length; 45350 } 45351 const pos = parent[$indexOf](formNode) + 1; 45352 const ii = occur.initial - currentNumber; 45353 if (ii) { 45354 const nodeClone = formNode[$clone](); 45355 nodeClone[$removeChild](nodeClone.occur); 45356 nodeClone.occur = null; 45357 parent[name].push(nodeClone); 45358 parent[$insertAt](pos, nodeClone); 45359 for (let i = 1; i < ii; i++) { 45360 const clone = nodeClone[$clone](); 45361 parent[name].push(clone); 45362 parent[$insertAt](pos + i, clone); 45363 } 45364 } 45365 } 45366 _getOccurInfo(formNode) { 45367 const { 45368 name, 45369 occur 45370 } = formNode; 45371 if (!occur || !name) { 45372 return [1, 1]; 45373 } 45374 const max = occur.max === -1 ? Infinity : occur.max; 45375 return [occur.min, max]; 45376 } 45377 _setAndBind(formNode, dataNode) { 45378 this._setProperties(formNode, dataNode); 45379 this._bindItems(formNode, dataNode); 45380 this._bindElement(formNode, dataNode); 45381 } 45382 _bindElement(formNode, dataNode) { 45383 const uselessNodes = []; 45384 this._createOccurrences(formNode); 45385 for (const child of formNode[$getChildren]()) { 45386 if (child[$data]) { 45387 continue; 45388 } 45389 if (this._mergeMode === undefined && child[$nodeName] === "subform") { 45390 this._mergeMode = child.mergeMode === "consumeData"; 45391 const dataChildren = dataNode[$getChildren](); 45392 if (dataChildren.length > 0) { 45393 this._bindOccurrences(child, [dataChildren[0]], null); 45394 } else if (this.emptyMerge) { 45395 const nsId = dataNode[$namespaceId] === bind_NS_DATASETS ? -1 : dataNode[$namespaceId]; 45396 const dataChild = child[$data] = new XmlObject(nsId, child.name || "root"); 45397 dataNode[$appendChild](dataChild); 45398 this._bindElement(child, dataChild); 45399 } 45400 continue; 45401 } 45402 if (!child[$isBindable]()) { 45403 continue; 45404 } 45405 let global = false; 45406 let picture = null; 45407 let ref = null; 45408 let match = null; 45409 if (child.bind) { 45410 switch (child.bind.match) { 45411 case "none": 45412 this._setAndBind(child, dataNode); 45413 continue; 45414 case "global": 45415 global = true; 45416 break; 45417 case "dataRef": 45418 if (!child.bind.ref) { 45419 warn(`XFA - ref is empty in node ${child[$nodeName]}.`); 45420 this._setAndBind(child, dataNode); 45421 continue; 45422 } 45423 ref = child.bind.ref; 45424 break; 45425 default: 45426 break; 45427 } 45428 if (child.bind.picture) { 45429 picture = child.bind.picture[$content]; 45430 } 45431 } 45432 const [min, max] = this._getOccurInfo(child); 45433 if (ref) { 45434 match = searchNode(this.root, dataNode, ref, true, false); 45435 if (match === null) { 45436 match = createDataNode(this.data, dataNode, ref); 45437 if (!match) { 45438 continue; 45439 } 45440 if (this._isConsumeData()) { 45441 match[$consumed] = true; 45442 } 45443 this._setAndBind(child, match); 45444 continue; 45445 } else { 45446 if (this._isConsumeData()) { 45447 match = match.filter(node => !node[$consumed]); 45448 } 45449 if (match.length > max) { 45450 match = match.slice(0, max); 45451 } else if (match.length === 0) { 45452 match = null; 45453 } 45454 if (match && this._isConsumeData()) { 45455 match.forEach(node => { 45456 node[$consumed] = true; 45457 }); 45458 } 45459 } 45460 } else { 45461 if (!child.name) { 45462 this._setAndBind(child, dataNode); 45463 continue; 45464 } 45465 if (this._isConsumeData()) { 45466 const matches = []; 45467 while (matches.length < max) { 45468 const found = this._findDataByNameToConsume(child.name, child[$hasSettableValue](), dataNode, global); 45469 if (!found) { 45470 break; 45471 } 45472 found[$consumed] = true; 45473 matches.push(found); 45474 } 45475 match = matches.length > 0 ? matches : null; 45476 } else { 45477 match = dataNode[$getRealChildrenByNameIt](child.name, false, this.emptyMerge).next().value; 45478 if (!match) { 45479 if (min === 0) { 45480 uselessNodes.push(child); 45481 continue; 45482 } 45483 const nsId = dataNode[$namespaceId] === bind_NS_DATASETS ? -1 : dataNode[$namespaceId]; 45484 match = child[$data] = new XmlObject(nsId, child.name); 45485 if (this.emptyMerge) { 45486 match[$consumed] = true; 45487 } 45488 dataNode[$appendChild](match); 45489 this._setAndBind(child, match); 45490 continue; 45491 } 45492 if (this.emptyMerge) { 45493 match[$consumed] = true; 45494 } 45495 match = [match]; 45496 } 45497 } 45498 if (match) { 45499 this._bindOccurrences(child, match, picture); 45500 } else if (min > 0) { 45501 this._setAndBind(child, dataNode); 45502 } else { 45503 uselessNodes.push(child); 45504 } 45505 } 45506 uselessNodes.forEach(node => node[$getParent]()[$removeChild](node)); 45507 } 45508} 45509 45510;// ./src/core/xfa/data.js 45511
vendor: 25,289 bytes, lines 45512-46455
45512class DataHandler { 45513 constructor(root, data) { 45514 this.data = data; 45515 this.dataset = root.datasets || null; 45516 } 45517 serialize(storage) { 45518 const stack = [[-1, this.data[$getChildren]()]]; 45519 while (stack.length > 0) { 45520 const last = stack.at(-1); 45521 const [i, children] = last; 45522 if (i + 1 === children.length) { 45523 stack.pop(); 45524 continue; 45525 } 45526 const child = children[++last[0]]; 45527 const storageEntry = storage.get(child[$uid]); 45528 if (storageEntry) { 45529 child[$setValue](storageEntry); 45530 } else { 45531 const attributes = child[$getAttributes](); 45532 for (const value of attributes.values()) { 45533 const entry = storage.get(value[$uid]); 45534 if (entry) { 45535 value[$setValue](entry); 45536 break; 45537 } 45538 } 45539 } 45540 const nodes = child[$getChildren](); 45541 if (nodes.length > 0) { 45542 stack.push([-1, nodes]); 45543 } 45544 } 45545 const buf = [`<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">`]; 45546 if (this.dataset) { 45547 for (const child of this.dataset[$getChildren]()) { 45548 if (child[$nodeName] !== "data") { 45549 child[$toString](buf); 45550 } 45551 } 45552 } 45553 this.data[$toString](buf); 45554 buf.push("</xfa:datasets>"); 45555 return buf.join(""); 45556 } 45557} 45558 45559;// ./src/core/xfa/config.js 45560 45561 45562 45563 45564 45565const CONFIG_NS_ID = NamespaceIds.config.id; 45566class Acrobat extends XFAObject { 45567 constructor(attributes) { 45568 super(CONFIG_NS_ID, "acrobat", true); 45569 this.acrobat7 = null; 45570 this.autoSave = null; 45571 this.common = null; 45572 this.validate = null; 45573 this.validateApprovalSignatures = null; 45574 this.submitUrl = new XFAObjectArray(); 45575 } 45576} 45577class Acrobat7 extends XFAObject { 45578 constructor(attributes) { 45579 super(CONFIG_NS_ID, "acrobat7", true); 45580 this.dynamicRender = null; 45581 } 45582} 45583class ADBE_JSConsole extends OptionObject { 45584 constructor(attributes) { 45585 super(CONFIG_NS_ID, "ADBE_JSConsole", ["delegate", "Enable", "Disable"]); 45586 } 45587} 45588class ADBE_JSDebugger extends OptionObject { 45589 constructor(attributes) { 45590 super(CONFIG_NS_ID, "ADBE_JSDebugger", ["delegate", "Enable", "Disable"]); 45591 } 45592} 45593class AddSilentPrint extends Option01 { 45594 constructor(attributes) { 45595 super(CONFIG_NS_ID, "addSilentPrint"); 45596 } 45597} 45598class AddViewerPreferences extends Option01 { 45599 constructor(attributes) { 45600 super(CONFIG_NS_ID, "addViewerPreferences"); 45601 } 45602} 45603class AdjustData extends Option10 { 45604 constructor(attributes) { 45605 super(CONFIG_NS_ID, "adjustData"); 45606 } 45607} 45608class AdobeExtensionLevel extends IntegerObject { 45609 constructor(attributes) { 45610 super(CONFIG_NS_ID, "adobeExtensionLevel", 0, n => n >= 1 && n <= 8); 45611 } 45612} 45613class Agent extends XFAObject { 45614 constructor(attributes) { 45615 super(CONFIG_NS_ID, "agent", true); 45616 this.name = attributes.name ? attributes.name.trim() : ""; 45617 this.common = new XFAObjectArray(); 45618 } 45619} 45620class AlwaysEmbed extends ContentObject { 45621 constructor(attributes) { 45622 super(CONFIG_NS_ID, "alwaysEmbed"); 45623 } 45624} 45625class Amd extends StringObject { 45626 constructor(attributes) { 45627 super(CONFIG_NS_ID, "amd"); 45628 } 45629} 45630class config_Area extends XFAObject { 45631 constructor(attributes) { 45632 super(CONFIG_NS_ID, "area"); 45633 this.level = getInteger({ 45634 data: attributes.level, 45635 defaultValue: 0, 45636 validate: n => n >= 1 && n <= 3 45637 }); 45638 this.name = getStringOption(attributes.name, ["", "barcode", "coreinit", "deviceDriver", "font", "general", "layout", "merge", "script", "signature", "sourceSet", "templateCache"]); 45639 } 45640} 45641class Attributes extends OptionObject { 45642 constructor(attributes) { 45643 super(CONFIG_NS_ID, "attributes", ["preserve", "delegate", "ignore"]); 45644 } 45645} 45646class AutoSave extends OptionObject { 45647 constructor(attributes) { 45648 super(CONFIG_NS_ID, "autoSave", ["disabled", "enabled"]); 45649 } 45650} 45651class Base extends StringObject { 45652 constructor(attributes) { 45653 super(CONFIG_NS_ID, "base"); 45654 } 45655} 45656class BatchOutput extends XFAObject { 45657 constructor(attributes) { 45658 super(CONFIG_NS_ID, "batchOutput"); 45659 this.format = getStringOption(attributes.format, ["none", "concat", "zip", "zipCompress"]); 45660 } 45661} 45662class BehaviorOverride extends ContentObject { 45663 constructor(attributes) { 45664 super(CONFIG_NS_ID, "behaviorOverride"); 45665 } 45666 [$finalize]() { 45667 this[$content] = new Map(this[$content].trim().split(/\s+/).filter(x => x.includes(":")).map(x => x.split(":", 2))); 45668 } 45669} 45670class Cache extends XFAObject { 45671 constructor(attributes) { 45672 super(CONFIG_NS_ID, "cache", true); 45673 this.templateCache = null; 45674 } 45675} 45676class Change extends Option01 { 45677 constructor(attributes) { 45678 super(CONFIG_NS_ID, "change"); 45679 } 45680} 45681class Common extends XFAObject { 45682 constructor(attributes) { 45683 super(CONFIG_NS_ID, "common", true); 45684 this.data = null; 45685 this.locale = null; 45686 this.localeSet = null; 45687 this.messaging = null; 45688 this.suppressBanner = null; 45689 this.template = null; 45690 this.validationMessaging = null; 45691 this.versionControl = null; 45692 this.log = new XFAObjectArray(); 45693 } 45694} 45695class Compress extends XFAObject { 45696 constructor(attributes) { 45697 super(CONFIG_NS_ID, "compress"); 45698 this.scope = getStringOption(attributes.scope, ["imageOnly", "document"]); 45699 } 45700} 45701class CompressLogicalStructure extends Option01 { 45702 constructor(attributes) { 45703 super(CONFIG_NS_ID, "compressLogicalStructure"); 45704 } 45705} 45706class CompressObjectStream extends Option10 { 45707 constructor(attributes) { 45708 super(CONFIG_NS_ID, "compressObjectStream"); 45709 } 45710} 45711class Compression extends XFAObject { 45712 constructor(attributes) { 45713 super(CONFIG_NS_ID, "compression", true); 45714 this.compressLogicalStructure = null; 45715 this.compressObjectStream = null; 45716 this.level = null; 45717 this.type = null; 45718 } 45719} 45720class Config extends XFAObject { 45721 constructor(attributes) { 45722 super(CONFIG_NS_ID, "config", true); 45723 this.acrobat = null; 45724 this.present = null; 45725 this.trace = null; 45726 this.agent = new XFAObjectArray(); 45727 } 45728} 45729class Conformance extends OptionObject { 45730 constructor(attributes) { 45731 super(CONFIG_NS_ID, "conformance", ["A", "B"]); 45732 } 45733} 45734class ContentCopy extends Option01 { 45735 constructor(attributes) { 45736 super(CONFIG_NS_ID, "contentCopy"); 45737 } 45738} 45739class Copies extends IntegerObject { 45740 constructor(attributes) { 45741 super(CONFIG_NS_ID, "copies", 1, n => n >= 1); 45742 } 45743} 45744class Creator extends StringObject { 45745 constructor(attributes) { 45746 super(CONFIG_NS_ID, "creator"); 45747 } 45748} 45749class CurrentPage extends IntegerObject { 45750 constructor(attributes) { 45751 super(CONFIG_NS_ID, "currentPage", 0, n => n >= 0); 45752 } 45753} 45754class Data extends XFAObject { 45755 constructor(attributes) { 45756 super(CONFIG_NS_ID, "data", true); 45757 this.adjustData = null; 45758 this.attributes = null; 45759 this.incrementalLoad = null; 45760 this.outputXSL = null; 45761 this.range = null; 45762 this.record = null; 45763 this.startNode = null; 45764 this.uri = null; 45765 this.window = null; 45766 this.xsl = null; 45767 this.excludeNS = new XFAObjectArray(); 45768 this.transform = new XFAObjectArray(); 45769 } 45770} 45771class Debug extends XFAObject { 45772 constructor(attributes) { 45773 super(CONFIG_NS_ID, "debug", true); 45774 this.uri = null; 45775 } 45776} 45777class DefaultTypeface extends ContentObject { 45778 constructor(attributes) { 45779 super(CONFIG_NS_ID, "defaultTypeface"); 45780 this.writingScript = getStringOption(attributes.writingScript, ["*", "Arabic", "Cyrillic", "EastEuropeanRoman", "Greek", "Hebrew", "Japanese", "Korean", "Roman", "SimplifiedChinese", "Thai", "TraditionalChinese", "Vietnamese"]); 45781 } 45782} 45783class Destination extends OptionObject { 45784 constructor(attributes) { 45785 super(CONFIG_NS_ID, "destination", ["pdf", "pcl", "ps", "webClient", "zpl"]); 45786 } 45787} 45788class DocumentAssembly extends Option01 { 45789 constructor(attributes) { 45790 super(CONFIG_NS_ID, "documentAssembly"); 45791 } 45792} 45793class Driver extends XFAObject { 45794 constructor(attributes) { 45795 super(CONFIG_NS_ID, "driver", true); 45796 this.name = attributes.name ? attributes.name.trim() : ""; 45797 this.fontInfo = null; 45798 this.xdc = null; 45799 } 45800} 45801class DuplexOption extends OptionObject { 45802 constructor(attributes) { 45803 super(CONFIG_NS_ID, "duplexOption", ["simplex", "duplexFlipLongEdge", "duplexFlipShortEdge"]); 45804 } 45805} 45806class DynamicRender extends OptionObject { 45807 constructor(attributes) { 45808 super(CONFIG_NS_ID, "dynamicRender", ["forbidden", "required"]); 45809 } 45810} 45811class Embed extends Option01 { 45812 constructor(attributes) { 45813 super(CONFIG_NS_ID, "embed"); 45814 } 45815} 45816class config_Encrypt extends Option01 { 45817 constructor(attributes) { 45818 super(CONFIG_NS_ID, "encrypt"); 45819 } 45820} 45821class config_Encryption extends XFAObject { 45822 constructor(attributes) { 45823 super(CONFIG_NS_ID, "encryption", true); 45824 this.encrypt = null; 45825 this.encryptionLevel = null; 45826 this.permissions = null; 45827 } 45828} 45829class EncryptionLevel extends OptionObject { 45830 constructor(attributes) { 45831 super(CONFIG_NS_ID, "encryptionLevel", ["40bit", "128bit"]); 45832 } 45833} 45834class Enforce extends StringObject { 45835 constructor(attributes) { 45836 super(CONFIG_NS_ID, "enforce"); 45837 } 45838} 45839class Equate extends XFAObject { 45840 constructor(attributes) { 45841 super(CONFIG_NS_ID, "equate"); 45842 this.force = getInteger({ 45843 data: attributes.force, 45844 defaultValue: 1, 45845 validate: n => n === 0 45846 }); 45847 this.from = attributes.from || ""; 45848 this.to = attributes.to || ""; 45849 } 45850} 45851class EquateRange extends XFAObject { 45852 constructor(attributes) { 45853 super(CONFIG_NS_ID, "equateRange"); 45854 this.from = attributes.from || ""; 45855 this.to = attributes.to || ""; 45856 this._unicodeRange = attributes.unicodeRange || ""; 45857 } 45858 get unicodeRange() { 45859 const ranges = []; 45860 const unicodeRegex = /U\+([0-9a-fA-F]+)/; 45861 const unicodeRange = this._unicodeRange; 45862 for (let range of unicodeRange.split(",").map(x => x.trim()).filter(x => !!x)) { 45863 range = range.split("-", 2).map(x => { 45864 const found = x.match(unicodeRegex); 45865 if (!found) { 45866 return 0; 45867 } 45868 return parseInt(found[1], 16); 45869 }); 45870 if (range.length === 1) { 45871 range.push(range[0]); 45872 } 45873 ranges.push(range); 45874 } 45875 return shadow(this, "unicodeRange", ranges); 45876 } 45877} 45878class Exclude extends ContentObject { 45879 constructor(attributes) { 45880 super(CONFIG_NS_ID, "exclude"); 45881 } 45882 [$finalize]() { 45883 this[$content] = this[$content].trim().split(/\s+/).filter(x => x && ["calculate", "close", "enter", "exit", "initialize", "ready", "validate"].includes(x)); 45884 } 45885} 45886class ExcludeNS extends StringObject { 45887 constructor(attributes) { 45888 super(CONFIG_NS_ID, "excludeNS"); 45889 } 45890} 45891class FlipLabel extends OptionObject { 45892 constructor(attributes) { 45893 super(CONFIG_NS_ID, "flipLabel", ["usePrinterSetting", "on", "off"]); 45894 } 45895} 45896class config_FontInfo extends XFAObject { 45897 constructor(attributes) { 45898 super(CONFIG_NS_ID, "fontInfo", true); 45899 this.embed = null; 45900 this.map = null; 45901 this.subsetBelow = null; 45902 this.alwaysEmbed = new XFAObjectArray(); 45903 this.defaultTypeface = new XFAObjectArray(); 45904 this.neverEmbed = new XFAObjectArray(); 45905 } 45906} 45907class FormFieldFilling extends Option01 { 45908 constructor(attributes) { 45909 super(CONFIG_NS_ID, "formFieldFilling"); 45910 } 45911} 45912class GroupParent extends StringObject { 45913 constructor(attributes) { 45914 super(CONFIG_NS_ID, "groupParent"); 45915 } 45916} 45917class IfEmpty extends OptionObject { 45918 constructor(attributes) { 45919 super(CONFIG_NS_ID, "ifEmpty", ["dataValue", "dataGroup", "ignore", "remove"]); 45920 } 45921} 45922class IncludeXDPContent extends StringObject { 45923 constructor(attributes) { 45924 super(CONFIG_NS_ID, "includeXDPContent"); 45925 } 45926} 45927class IncrementalLoad extends OptionObject { 45928 constructor(attributes) { 45929 super(CONFIG_NS_ID, "incrementalLoad", ["none", "forwardOnly"]); 45930 } 45931} 45932class IncrementalMerge extends Option01 { 45933 constructor(attributes) { 45934 super(CONFIG_NS_ID, "incrementalMerge"); 45935 } 45936} 45937class Interactive extends Option01 { 45938 constructor(attributes) { 45939 super(CONFIG_NS_ID, "interactive"); 45940 } 45941} 45942class Jog extends OptionObject { 45943 constructor(attributes) { 45944 super(CONFIG_NS_ID, "jog", ["usePrinterSetting", "none", "pageSet"]); 45945 } 45946} 45947class LabelPrinter extends XFAObject { 45948 constructor(attributes) { 45949 super(CONFIG_NS_ID, "labelPrinter", true); 45950 this.name = getStringOption(attributes.name, ["zpl", "dpl", "ipl", "tcpl"]); 45951 this.batchOutput = null; 45952 this.flipLabel = null; 45953 this.fontInfo = null; 45954 this.xdc = null; 45955 } 45956} 45957class Layout extends OptionObject { 45958 constructor(attributes) { 45959 super(CONFIG_NS_ID, "layout", ["paginate", "panel"]); 45960 } 45961} 45962class Level extends IntegerObject { 45963 constructor(attributes) { 45964 super(CONFIG_NS_ID, "level", 0, n => n > 0); 45965 } 45966} 45967class Linearized extends Option01 { 45968 constructor(attributes) { 45969 super(CONFIG_NS_ID, "linearized"); 45970 } 45971} 45972class Locale extends StringObject { 45973 constructor(attributes) { 45974 super(CONFIG_NS_ID, "locale"); 45975 } 45976} 45977class LocaleSet extends StringObject { 45978 constructor(attributes) { 45979 super(CONFIG_NS_ID, "localeSet"); 45980 } 45981} 45982class Log extends XFAObject { 45983 constructor(attributes) { 45984 super(CONFIG_NS_ID, "log", true); 45985 this.mode = null; 45986 this.threshold = null; 45987 this.to = null; 45988 this.uri = null; 45989 } 45990} 45991class MapElement extends XFAObject { 45992 constructor(attributes) { 45993 super(CONFIG_NS_ID, "map", true); 45994 this.equate = new XFAObjectArray(); 45995 this.equateRange = new XFAObjectArray(); 45996 } 45997} 45998class MediumInfo extends XFAObject { 45999 constructor(attributes) { 46000 super(CONFIG_NS_ID, "mediumInfo", true); 46001 this.map = null; 46002 } 46003} 46004class config_Message extends XFAObject { 46005 constructor(attributes) { 46006 super(CONFIG_NS_ID, "message", true); 46007 this.msgId = null; 46008 this.severity = null; 46009 } 46010} 46011class Messaging extends XFAObject { 46012 constructor(attributes) { 46013 super(CONFIG_NS_ID, "messaging", true); 46014 this.message = new XFAObjectArray(); 46015 } 46016} 46017class Mode extends OptionObject { 46018 constructor(attributes) { 46019 super(CONFIG_NS_ID, "mode", ["append", "overwrite"]); 46020 } 46021} 46022class ModifyAnnots extends Option01 { 46023 constructor(attributes) { 46024 super(CONFIG_NS_ID, "modifyAnnots"); 46025 } 46026} 46027class MsgId extends IntegerObject { 46028 constructor(attributes) { 46029 super(CONFIG_NS_ID, "msgId", 1, n => n >= 1); 46030 } 46031} 46032class NameAttr extends StringObject { 46033 constructor(attributes) { 46034 super(CONFIG_NS_ID, "nameAttr"); 46035 } 46036} 46037class NeverEmbed extends ContentObject { 46038 constructor(attributes) { 46039 super(CONFIG_NS_ID, "neverEmbed"); 46040 } 46041} 46042class NumberOfCopies extends IntegerObject { 46043 constructor(attributes) { 46044 super(CONFIG_NS_ID, "numberOfCopies", null, n => n >= 2 && n <= 5); 46045 } 46046} 46047class OpenAction extends XFAObject { 46048 constructor(attributes) { 46049 super(CONFIG_NS_ID, "openAction", true); 46050 this.destination = null; 46051 } 46052} 46053class Output extends XFAObject { 46054 constructor(attributes) { 46055 super(CONFIG_NS_ID, "output", true); 46056 this.to = null; 46057 this.type = null; 46058 this.uri = null; 46059 } 46060} 46061class OutputBin extends StringObject { 46062 constructor(attributes) { 46063 super(CONFIG_NS_ID, "outputBin"); 46064 } 46065} 46066class OutputXSL extends XFAObject { 46067 constructor(attributes) { 46068 super(CONFIG_NS_ID, "outputXSL", true); 46069 this.uri = null; 46070 } 46071} 46072class Overprint extends OptionObject { 46073 constructor(attributes) { 46074 super(CONFIG_NS_ID, "overprint", ["none", "both", "draw", "field"]); 46075 } 46076} 46077class Packets extends StringObject { 46078 constructor(attributes) { 46079 super(CONFIG_NS_ID, "packets"); 46080 } 46081 [$finalize]() { 46082 if (this[$content] === "*") { 46083 return; 46084 } 46085 this[$content] = this[$content].trim().split(/\s+/).filter(x => ["config", "datasets", "template", "xfdf", "xslt"].includes(x)); 46086 } 46087} 46088class PageOffset extends XFAObject { 46089 constructor(attributes) { 46090 super(CONFIG_NS_ID, "pageOffset"); 46091 this.x = getInteger({ 46092 data: attributes.x, 46093 defaultValue: "useXDCSetting", 46094 validate: n => true 46095 }); 46096 this.y = getInteger({ 46097 data: attributes.y, 46098 defaultValue: "useXDCSetting", 46099 validate: n => true 46100 }); 46101 } 46102} 46103class PageRange extends StringObject { 46104 constructor(attributes) { 46105 super(CONFIG_NS_ID, "pageRange"); 46106 } 46107 [$finalize]() { 46108 const numbers = this[$content].trim().split(/\s+/).map(x => parseInt(x, 10)); 46109 const ranges = []; 46110 for (let i = 0, ii = numbers.length; i < ii; i += 2) { 46111 ranges.push(numbers.slice(i, i + 2)); 46112 } 46113 this[$content] = ranges; 46114 } 46115} 46116class Pagination extends OptionObject { 46117 constructor(attributes) { 46118 super(CONFIG_NS_ID, "pagination", ["simplex", "duplexShortEdge", "duplexLongEdge"]); 46119 } 46120} 46121class PaginationOverride extends OptionObject { 46122 constructor(attributes) { 46123 super(CONFIG_NS_ID, "paginationOverride", ["none", "forceDuplex", "forceDuplexLongEdge", "forceDuplexShortEdge", "forceSimplex"]); 46124 } 46125} 46126class Part extends IntegerObject { 46127 constructor(attributes) { 46128 super(CONFIG_NS_ID, "part", 1, n => false); 46129 } 46130} 46131class Pcl extends XFAObject { 46132 constructor(attributes) { 46133 super(CONFIG_NS_ID, "pcl", true); 46134 this.name = attributes.name || ""; 46135 this.batchOutput = null; 46136 this.fontInfo = null; 46137 this.jog = null; 46138 this.mediumInfo = null; 46139 this.outputBin = null; 46140 this.pageOffset = null; 46141 this.staple = null; 46142 this.xdc = null; 46143 } 46144} 46145class Pdf extends XFAObject { 46146 constructor(attributes) { 46147 super(CONFIG_NS_ID, "pdf", true); 46148 this.name = attributes.name || ""; 46149 this.adobeExtensionLevel = null; 46150 this.batchOutput = null; 46151 this.compression = null; 46152 this.creator = null; 46153 this.encryption = null; 46154 this.fontInfo = null; 46155 this.interactive = null; 46156 this.linearized = null; 46157 this.openAction = null; 46158 this.pdfa = null; 46159 this.producer = null; 46160 this.renderPolicy = null; 46161 this.scriptModel = null; 46162 this.silentPrint = null; 46163 this.submitFormat = null; 46164 this.tagged = null; 46165 this.version = null; 46166 this.viewerPreferences = null; 46167 this.xdc = null; 46168 } 46169} 46170class Pdfa extends XFAObject { 46171 constructor(attributes) { 46172 super(CONFIG_NS_ID, "pdfa", true); 46173 this.amd = null; 46174 this.conformance = null; 46175 this.includeXDPContent = null; 46176 this.part = null; 46177 } 46178} 46179class Permissions extends XFAObject { 46180 constructor(attributes) { 46181 super(CONFIG_NS_ID, "permissions", true); 46182 this.accessibleContent = null; 46183 this.change = null; 46184 this.contentCopy = null; 46185 this.documentAssembly = null; 46186 this.formFieldFilling = null; 46187 this.modifyAnnots = null; 46188 this.plaintextMetadata = null; 46189 this.print = null; 46190 this.printHighQuality = null; 46191 } 46192} 46193class PickTrayByPDFSize extends Option01 { 46194 constructor(attributes) { 46195 super(CONFIG_NS_ID, "pickTrayByPDFSize"); 46196 } 46197} 46198class config_Picture extends StringObject { 46199 constructor(attributes) { 46200 super(CONFIG_NS_ID, "picture"); 46201 } 46202} 46203class PlaintextMetadata extends Option01 { 46204 constructor(attributes) { 46205 super(CONFIG_NS_ID, "plaintextMetadata"); 46206 } 46207} 46208class Presence extends OptionObject { 46209 constructor(attributes) { 46210 super(CONFIG_NS_ID, "presence", ["preserve", "dissolve", "dissolveStructure", "ignore", "remove"]); 46211 } 46212} 46213class Present extends XFAObject { 46214 constructor(attributes) { 46215 super(CONFIG_NS_ID, "present", true); 46216 this.behaviorOverride = null; 46217 this.cache = null; 46218 this.common = null; 46219 this.copies = null; 46220 this.destination = null; 46221 this.incrementalMerge = null; 46222 this.layout = null; 46223 this.output = null; 46224 this.overprint = null; 46225 this.pagination = null; 46226 this.paginationOverride = null; 46227 this.script = null; 46228 this.validate = null; 46229 this.xdp = null; 46230 this.driver = new XFAObjectArray(); 46231 this.labelPrinter = new XFAObjectArray(); 46232 this.pcl = new XFAObjectArray(); 46233 this.pdf = new XFAObjectArray(); 46234 this.ps = new XFAObjectArray(); 46235 this.submitUrl = new XFAObjectArray(); 46236 this.webClient = new XFAObjectArray(); 46237 this.zpl = new XFAObjectArray(); 46238 } 46239} 46240class Print extends Option01 { 46241 constructor(attributes) { 46242 super(CONFIG_NS_ID, "print"); 46243 } 46244} 46245class PrintHighQuality extends Option01 { 46246 constructor(attributes) { 46247 super(CONFIG_NS_ID, "printHighQuality"); 46248 } 46249} 46250class PrintScaling extends OptionObject { 46251 constructor(attributes) { 46252 super(CONFIG_NS_ID, "printScaling", ["appdefault", "noScaling"]); 46253 } 46254} 46255class PrinterName extends StringObject { 46256 constructor(attributes) { 46257 super(CONFIG_NS_ID, "printerName"); 46258 } 46259} 46260class Producer extends StringObject { 46261 constructor(attributes) { 46262 super(CONFIG_NS_ID, "producer"); 46263 } 46264} 46265class Ps extends XFAObject { 46266 constructor(attributes) { 46267 super(CONFIG_NS_ID, "ps", true); 46268 this.name = attributes.name || ""; 46269 this.batchOutput = null; 46270 this.fontInfo = null; 46271 this.jog = null; 46272 this.mediumInfo = null; 46273 this.outputBin = null; 46274 this.staple = null; 46275 this.xdc = null; 46276 } 46277} 46278class Range extends ContentObject { 46279 constructor(attributes) { 46280 super(CONFIG_NS_ID, "range"); 46281 } 46282 [$finalize]() { 46283 this[$content] = this[$content].trim().split(/\s*,\s*/, 2).map(range => range.split("-").map(x => parseInt(x.trim(), 10))).filter(range => range.every(x => !isNaN(x))).map(range => { 46284 if (range.length === 1) { 46285 range.push(range[0]); 46286 } 46287 return range; 46288 }); 46289 } 46290} 46291class Record extends ContentObject { 46292 constructor(attributes) { 46293 super(CONFIG_NS_ID, "record"); 46294 } 46295 [$finalize]() { 46296 this[$content] = this[$content].trim(); 46297 const n = parseInt(this[$content], 10); 46298 if (!isNaN(n) && n >= 0) { 46299 this[$content] = n; 46300 } 46301 } 46302} 46303class Relevant extends ContentObject { 46304 constructor(attributes) { 46305 super(CONFIG_NS_ID, "relevant"); 46306 } 46307 [$finalize]() { 46308 this[$content] = this[$content].trim().split(/\s+/); 46309 } 46310} 46311class Rename extends ContentObject { 46312 constructor(attributes) { 46313 super(CONFIG_NS_ID, "rename"); 46314 } 46315 [$finalize]() { 46316 this[$content] = this[$content].trim(); 46317 if (this[$content].toLowerCase().startsWith("xml") || new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*", "u").test(this[$content])) { 46318 warn("XFA - Rename: invalid XFA name"); 46319 } 46320 } 46321} 46322class RenderPolicy extends OptionObject { 46323 constructor(attributes) { 46324 super(CONFIG_NS_ID, "renderPolicy", ["server", "client"]); 46325 } 46326} 46327class RunScripts extends OptionObject { 46328 constructor(attributes) { 46329 super(CONFIG_NS_ID, "runScripts", ["both", "client", "none", "server"]); 46330 } 46331} 46332class config_Script extends XFAObject { 46333 constructor(attributes) { 46334 super(CONFIG_NS_ID, "script", true); 46335 this.currentPage = null; 46336 this.exclude = null; 46337 this.runScripts = null; 46338 } 46339} 46340class ScriptModel extends OptionObject { 46341 constructor(attributes) { 46342 super(CONFIG_NS_ID, "scriptModel", ["XFA", "none"]); 46343 } 46344} 46345class Severity extends OptionObject { 46346 constructor(attributes) { 46347 super(CONFIG_NS_ID, "severity", ["ignore", "error", "information", "trace", "warning"]); 46348 } 46349} 46350class SilentPrint extends XFAObject { 46351 constructor(attributes) { 46352 super(CONFIG_NS_ID, "silentPrint", true); 46353 this.addSilentPrint = null; 46354 this.printerName = null; 46355 } 46356} 46357class Staple extends XFAObject { 46358 constructor(attributes) { 46359 super(CONFIG_NS_ID, "staple"); 46360 this.mode = getStringOption(attributes.mode, ["usePrinterSetting", "on", "off"]); 46361 } 46362} 46363class StartNode extends StringObject { 46364 constructor(attributes) { 46365 super(CONFIG_NS_ID, "startNode"); 46366 } 46367} 46368class StartPage extends IntegerObject { 46369 constructor(attributes) { 46370 super(CONFIG_NS_ID, "startPage", 0, n => true); 46371 } 46372} 46373class SubmitFormat extends OptionObject { 46374 constructor(attributes) { 46375 super(CONFIG_NS_ID, "submitFormat", ["html", "delegate", "fdf", "xml", "pdf"]); 46376 } 46377} 46378class SubmitUrl extends StringObject { 46379 constructor(attributes) { 46380 super(CONFIG_NS_ID, "submitUrl"); 46381 } 46382} 46383class SubsetBelow extends IntegerObject { 46384 constructor(attributes) { 46385 super(CONFIG_NS_ID, "subsetBelow", 100, n => n >= 0 && n <= 100); 46386 } 46387} 46388class SuppressBanner extends Option01 { 46389 constructor(attributes) { 46390 super(CONFIG_NS_ID, "suppressBanner"); 46391 } 46392} 46393class Tagged extends Option01 { 46394 constructor(attributes) { 46395 super(CONFIG_NS_ID, "tagged"); 46396 } 46397} 46398class config_Template extends XFAObject { 46399 constructor(attributes) { 46400 super(CONFIG_NS_ID, "template", true); 46401 this.base = null; 46402 this.relevant = null; 46403 this.startPage = null; 46404 this.uri = null; 46405 this.xsl = null; 46406 } 46407} 46408class Threshold extends OptionObject { 46409 constructor(attributes) { 46410 super(CONFIG_NS_ID, "threshold", ["trace", "error", "information", "warning"]); 46411 } 46412} 46413class To extends OptionObject { 46414 constructor(attributes) { 46415 super(CONFIG_NS_ID, "to", ["null", "memory", "stderr", "stdout", "system", "uri"]); 46416 } 46417} 46418class TemplateCache extends XFAObject { 46419 constructor(attributes) { 46420 super(CONFIG_NS_ID, "templateCache"); 46421 this.maxEntries = getInteger({ 46422 data: attributes.maxEntries, 46423 defaultValue: 5, 46424 validate: n => n >= 0 46425 }); 46426 } 46427} 46428class Trace extends XFAObject { 46429 constructor(attributes) { 46430 super(CONFIG_NS_ID, "trace", true); 46431 this.area = new XFAObjectArray(); 46432 } 46433} 46434class Transform extends XFAObject { 46435 constructor(attributes) { 46436 super(CONFIG_NS_ID, "transform", true); 46437 this.groupParent = null; 46438 this.ifEmpty = null; 46439 this.nameAttr = null; 46440 this.picture = null; 46441 this.presence = null; 46442 this.rename = null; 46443 this.whitespace = null; 46444 } 46445} 46446class Type extends OptionObject { 46447 constructor(attributes) { 46448 super(CONFIG_NS_ID, "type", ["none", "ascii85", "asciiHex", "ccittfax", "flate", "lzw", "runLength", "native", "xdp", "mergedXDP"]); 46449 } 46450} 46451class Uri extends StringObject { 46452 constructor(attributes) { 46453 super(CONFIG_NS_ID, "uri"); 46454 } 46455}
vendor: 2,195 bytes, lines 46456-46519
46456class config_Validate extends OptionObject { 46457 constructor(attributes) { 46458 super(CONFIG_NS_ID, "validate", ["preSubmit", "prePrint", "preExecute", "preSave"]); 46459 } 46460} 46461class ValidateApprovalSignatures extends ContentObject { 46462 constructor(attributes) { 46463 super(CONFIG_NS_ID, "validateApprovalSignatures"); 46464 } 46465 [$finalize]() { 46466 this[$content] = this[$content].trim().split(/\s+/).filter(x => ["docReady", "postSign"].includes(x)); 46467 } 46468} 46469class ValidationMessaging extends OptionObject { 46470 constructor(attributes) { 46471 super(CONFIG_NS_ID, "validationMessaging", ["allMessagesIndividually", "allMessagesTogether", "firstMessageOnly", "noMessages"]); 46472 } 46473} 46474class Version extends OptionObject { 46475 constructor(attributes) { 46476 super(CONFIG_NS_ID, "version", ["1.7", "1.6", "1.5", "1.4", "1.3", "1.2"]); 46477 } 46478} 46479class VersionControl extends XFAObject { 46480 constructor(attributes) { 46481 super(CONFIG_NS_ID, "VersionControl"); 46482 this.outputBelow = getStringOption(attributes.outputBelow, ["warn", "error", "update"]); 46483 this.sourceAbove = getStringOption(attributes.sourceAbove, ["warn", "error"]); 46484 this.sourceBelow = getStringOption(attributes.sourceBelow, ["update", "maintain"]); 46485 } 46486} 46487class ViewerPreferences extends XFAObject { 46488 constructor(attributes) { 46489 super(CONFIG_NS_ID, "viewerPreferences", true); 46490 this.ADBE_JSConsole = null; 46491 this.ADBE_JSDebugger = null; 46492 this.addViewerPreferences = null; 46493 this.duplexOption = null; 46494 this.enforce = null; 46495 this.numberOfCopies = null; 46496 this.pageRange = null; 46497 this.pickTrayByPDFSize = null; 46498 this.printScaling = null; 46499 } 46500} 46501class WebClient extends XFAObject { 46502 constructor(attributes) { 46503 super(CONFIG_NS_ID, "webClient", true); 46504 this.name = attributes.name ? attributes.name.trim() : ""; 46505 this.fontInfo = null; 46506 this.xdc = null; 46507 } 46508} 46509class Whitespace extends OptionObject { 46510 constructor(attributes) { 46511 super(CONFIG_NS_ID, "whitespace", ["preserve", "ltrim", "normalize", "rtrim", "trim"]); 46512 } 46513} 46514class Window extends ContentObject { 46515 constructor(attributes) { 46516 super(CONFIG_NS_ID, "window"); 46517 } 46518 [$finalize]() { 46519 const pair = this[$content].trim().split(/\s*,\s*/, 2).map(x => parseInt(x
vendor: 24,460 bytes, lines 46519-47518
46519, 10)); 46520 if (pair.some(x => isNaN(x))) { 46521 this[$content] = [0, 0]; 46522 return; 46523 } 46524 if (pair.length === 1) { 46525 pair.push(pair[0]); 46526 } 46527 this[$content] = pair; 46528 } 46529} 46530class Xdc extends XFAObject { 46531 constructor(attributes) { 46532 super(CONFIG_NS_ID, "xdc", true); 46533 this.uri = new XFAObjectArray(); 46534 this.xsl = new XFAObjectArray(); 46535 } 46536} 46537class Xdp extends XFAObject { 46538 constructor(attributes) { 46539 super(CONFIG_NS_ID, "xdp", true); 46540 this.packets = null; 46541 } 46542} 46543class Xsl extends XFAObject { 46544 constructor(attributes) { 46545 super(CONFIG_NS_ID, "xsl", true); 46546 this.debug = null; 46547 this.uri = null; 46548 } 46549} 46550class Zpl extends XFAObject { 46551 constructor(attributes) { 46552 super(CONFIG_NS_ID, "zpl", true); 46553 this.name = attributes.name ? attributes.name.trim() : ""; 46554 this.batchOutput = null; 46555 this.flipLabel = null; 46556 this.fontInfo = null; 46557 this.xdc = null; 46558 } 46559} 46560class ConfigNamespace { 46561 static [$buildXFAObject](name, attributes) { 46562 if (ConfigNamespace.hasOwnProperty(name)) { 46563 return ConfigNamespace[name](attributes); 46564 } 46565 return undefined; 46566 } 46567 static acrobat(attrs) { 46568 return new Acrobat(attrs); 46569 } 46570 static acrobat7(attrs) { 46571 return new Acrobat7(attrs); 46572 } 46573 static ADBE_JSConsole(attrs) { 46574 return new ADBE_JSConsole(attrs); 46575 } 46576 static ADBE_JSDebugger(attrs) { 46577 return new ADBE_JSDebugger(attrs); 46578 } 46579 static addSilentPrint(attrs) { 46580 return new AddSilentPrint(attrs); 46581 } 46582 static addViewerPreferences(attrs) { 46583 return new AddViewerPreferences(attrs); 46584 } 46585 static adjustData(attrs) { 46586 return new AdjustData(attrs); 46587 } 46588 static adobeExtensionLevel(attrs) { 46589 return new AdobeExtensionLevel(attrs); 46590 } 46591 static agent(attrs) { 46592 return new Agent(attrs); 46593 } 46594 static alwaysEmbed(attrs) { 46595 return new AlwaysEmbed(attrs); 46596 } 46597 static amd(attrs) { 46598 return new Amd(attrs); 46599 } 46600 static area(attrs) { 46601 return new config_Area(attrs); 46602 } 46603 static attributes(attrs) { 46604 return new Attributes(attrs); 46605 } 46606 static autoSave(attrs) { 46607 return new AutoSave(attrs); 46608 } 46609 static base(attrs) { 46610 return new Base(attrs); 46611 } 46612 static batchOutput(attrs) { 46613 return new BatchOutput(attrs); 46614 } 46615 static behaviorOverride(attrs) { 46616 return new BehaviorOverride(attrs); 46617 } 46618 static cache(attrs) { 46619 return new Cache(attrs); 46620 } 46621 static change(attrs) { 46622 return new Change(attrs); 46623 } 46624 static common(attrs) { 46625 return new Common(attrs); 46626 } 46627 static compress(attrs) { 46628 return new Compress(attrs); 46629 } 46630 static compressLogicalStructure(attrs) { 46631 return new CompressLogicalStructure(attrs); 46632 } 46633 static compressObjectStream(attrs) { 46634 return new CompressObjectStream(attrs); 46635 } 46636 static compression(attrs) { 46637 return new Compression(attrs); 46638 } 46639 static config(attrs) { 46640 return new Config(attrs); 46641 } 46642 static conformance(attrs) { 46643 return new Conformance(attrs); 46644 } 46645 static contentCopy(attrs) { 46646 return new ContentCopy(attrs); 46647 } 46648 static copies(attrs) { 46649 return new Copies(attrs); 46650 } 46651 static creator(attrs) { 46652 return new Creator(attrs); 46653 } 46654 static currentPage(attrs) { 46655 return new CurrentPage(attrs); 46656 } 46657 static data(attrs) { 46658 return new Data(attrs); 46659 } 46660 static debug(attrs) { 46661 return new Debug(attrs); 46662 } 46663 static defaultTypeface(attrs) { 46664 return new DefaultTypeface(attrs); 46665 } 46666 static destination(attrs) { 46667 return new Destination(attrs); 46668 } 46669 static documentAssembly(attrs) { 46670 return new DocumentAssembly(attrs); 46671 } 46672 static driver(attrs) { 46673 return new Driver(attrs); 46674 } 46675 static duplexOption(attrs) { 46676 return new DuplexOption(attrs); 46677 } 46678 static dynamicRender(attrs) { 46679 return new DynamicRender(attrs); 46680 } 46681 static embed(attrs) { 46682 return new Embed(attrs); 46683 } 46684 static encrypt(attrs) { 46685 return new config_Encrypt(attrs); 46686 } 46687 static encryption(attrs) { 46688 return new config_Encryption(attrs); 46689 } 46690 static encryptionLevel(attrs) { 46691 return new EncryptionLevel(attrs); 46692 } 46693 static enforce(attrs) { 46694 return new Enforce(attrs); 46695 } 46696 static equate(attrs) { 46697 return new Equate(attrs); 46698 } 46699 static equateRange(attrs) { 46700 return new EquateRange(attrs); 46701 } 46702 static exclude(attrs) { 46703 return new Exclude(attrs); 46704 } 46705 static excludeNS(attrs) { 46706 return new ExcludeNS(attrs); 46707 } 46708 static flipLabel(attrs) { 46709 return new FlipLabel(attrs); 46710 } 46711 static fontInfo(attrs) { 46712 return new config_FontInfo(attrs); 46713 } 46714 static formFieldFilling(attrs) { 46715 return new FormFieldFilling(attrs); 46716 } 46717 static groupParent(attrs) { 46718 return new GroupParent(attrs); 46719 } 46720 static ifEmpty(attrs) { 46721 return new IfEmpty(attrs); 46722 } 46723 static includeXDPContent(attrs) { 46724 return new IncludeXDPContent(attrs); 46725 } 46726 static incrementalLoad(attrs) { 46727 return new IncrementalLoad(attrs); 46728 } 46729 static incrementalMerge(attrs) { 46730 return new IncrementalMerge(attrs); 46731 } 46732 static interactive(attrs) { 46733 return new Interactive(attrs); 46734 } 46735 static jog(attrs) { 46736 return new Jog(attrs); 46737 } 46738 static labelPrinter(attrs) { 46739 return new LabelPrinter(attrs); 46740 } 46741 static layout(attrs) { 46742 return new Layout(attrs); 46743 } 46744 static level(attrs) { 46745 return new Level(attrs); 46746 } 46747 static linearized(attrs) { 46748 return new Linearized(attrs); 46749 } 46750 static locale(attrs) { 46751 return new Locale(attrs); 46752 } 46753 static localeSet(attrs) { 46754 return new LocaleSet(attrs); 46755 } 46756 static log(attrs) { 46757 return new Log(attrs); 46758 } 46759 static map(attrs) { 46760 return new MapElement(attrs); 46761 } 46762 static mediumInfo(attrs) { 46763 return new MediumInfo(attrs); 46764 } 46765 static message(attrs) { 46766 return new config_Message(attrs); 46767 } 46768 static messaging(attrs) { 46769 return new Messaging(attrs); 46770 } 46771 static mode(attrs) { 46772 return new Mode(attrs); 46773 } 46774 static modifyAnnots(attrs) { 46775 return new ModifyAnnots(attrs); 46776 } 46777 static msgId(attrs) { 46778 return new MsgId(attrs); 46779 } 46780 static nameAttr(attrs) { 46781 return new NameAttr(attrs); 46782 } 46783 static neverEmbed(attrs) { 46784 return new NeverEmbed(attrs); 46785 } 46786 static numberOfCopies(attrs) { 46787 return new NumberOfCopies(attrs); 46788 } 46789 static openAction(attrs) { 46790 return new OpenAction(attrs); 46791 } 46792 static output(attrs) { 46793 return new Output(attrs); 46794 } 46795 static outputBin(attrs) { 46796 return new OutputBin(attrs); 46797 } 46798 static outputXSL(attrs) { 46799 return new OutputXSL(attrs); 46800 } 46801 static overprint(attrs) { 46802 return new Overprint(attrs); 46803 } 46804 static packets(attrs) { 46805 return new Packets(attrs); 46806 } 46807 static pageOffset(attrs) { 46808 return new PageOffset(attrs); 46809 } 46810 static pageRange(attrs) { 46811 return new PageRange(attrs); 46812 } 46813 static pagination(attrs) { 46814 return new Pagination(attrs); 46815 } 46816 static paginationOverride(attrs) { 46817 return new PaginationOverride(attrs); 46818 } 46819 static part(attrs) { 46820 return new Part(attrs); 46821 } 46822 static pcl(attrs) { 46823 return new Pcl(attrs); 46824 } 46825 static pdf(attrs) { 46826 return new Pdf(attrs); 46827 } 46828 static pdfa(attrs) { 46829 return new Pdfa(attrs); 46830 } 46831 static permissions(attrs) { 46832 return new Permissions(attrs); 46833 } 46834 static pickTrayByPDFSize(attrs) { 46835 return new PickTrayByPDFSize(attrs); 46836 } 46837 static picture(attrs) { 46838 return new config_Picture(attrs); 46839 } 46840 static plaintextMetadata(attrs) { 46841 return new PlaintextMetadata(attrs); 46842 } 46843 static presence(attrs) { 46844 return new Presence(attrs); 46845 } 46846 static present(attrs) { 46847 return new Present(attrs); 46848 } 46849 static print(attrs) { 46850 return new Print(attrs); 46851 } 46852 static printHighQuality(attrs) { 46853 return new PrintHighQuality(attrs); 46854 } 46855 static printScaling(attrs) { 46856 return new PrintScaling(attrs); 46857 } 46858 static printerName(attrs) { 46859 return new PrinterName(attrs); 46860 } 46861 static producer(attrs) { 46862 return new Producer(attrs); 46863 } 46864 static ps(attrs) { 46865 return new Ps(attrs); 46866 } 46867 static range(attrs) { 46868 return new Range(attrs); 46869 } 46870 static record(attrs) { 46871 return new Record(attrs); 46872 } 46873 static relevant(attrs) { 46874 return new Relevant(attrs); 46875 } 46876 static rename(attrs) { 46877 return new Rename(attrs); 46878 } 46879 static renderPolicy(attrs) { 46880 return new RenderPolicy(attrs); 46881 } 46882 static runScripts(attrs) { 46883 return new RunScripts(attrs); 46884 } 46885 static script(attrs) { 46886 return new config_Script(attrs); 46887 } 46888 static scriptModel(attrs) { 46889 return new ScriptModel(attrs); 46890 } 46891 static severity(attrs) { 46892 return new Severity(attrs); 46893 } 46894 static silentPrint(attrs) { 46895 return new SilentPrint(attrs); 46896 } 46897 static staple(attrs) { 46898 return new Staple(attrs); 46899 } 46900 static startNode(attrs) { 46901 return new StartNode(attrs); 46902 } 46903 static startPage(attrs) { 46904 return new StartPage(attrs); 46905 } 46906 static submitFormat(attrs) { 46907 return new SubmitFormat(attrs); 46908 } 46909 static submitUrl(attrs) { 46910 return new SubmitUrl(attrs); 46911 } 46912 static subsetBelow(attrs) { 46913 return new SubsetBelow(attrs); 46914 } 46915 static suppressBanner(attrs) { 46916 return new SuppressBanner(attrs); 46917 } 46918 static tagged(attrs) { 46919 return new Tagged(attrs); 46920 } 46921 static template(attrs) { 46922 return new config_Template(attrs); 46923 } 46924 static templateCache(attrs) { 46925 return new TemplateCache(attrs); 46926 } 46927 static threshold(attrs) { 46928 return new Threshold(attrs); 46929 } 46930 static to(attrs) { 46931 return new To(attrs); 46932 } 46933 static trace(attrs) { 46934 return new Trace(attrs); 46935 } 46936 static transform(attrs) { 46937 return new Transform(attrs); 46938 } 46939 static type(attrs) { 46940 return new Type(attrs); 46941 } 46942 static uri(attrs) { 46943 return new Uri(attrs); 46944 } 46945 static validate(attrs) { 46946 return new config_Validate(attrs); 46947 } 46948 static validateApprovalSignatures(attrs) { 46949 return new ValidateApprovalSignatures(attrs); 46950 } 46951 static validationMessaging(attrs) { 46952 return new ValidationMessaging(attrs); 46953 } 46954 static version(attrs) { 46955 return new Version(attrs); 46956 } 46957 static versionControl(attrs) { 46958 return new VersionControl(attrs); 46959 } 46960 static viewerPreferences(attrs) { 46961 return new ViewerPreferences(attrs); 46962 } 46963 static webClient(attrs) { 46964 return new WebClient(attrs); 46965 } 46966 static whitespace(attrs) { 46967 return new Whitespace(attrs); 46968 } 46969 static window(attrs) { 46970 return new Window(attrs); 46971 } 46972 static xdc(attrs) { 46973 return new Xdc(attrs); 46974 } 46975 static xdp(attrs) { 46976 return new Xdp(attrs); 46977 } 46978 static xsl(attrs) { 46979 return new Xsl(attrs); 46980 } 46981 static zpl(attrs) { 46982 return new Zpl(attrs); 46983 } 46984} 46985 46986;// ./src/core/xfa/connection_set.js 46987 46988 46989const CONNECTION_SET_NS_ID = NamespaceIds.connectionSet.id; 46990class ConnectionSet extends XFAObject { 46991 constructor(attributes) { 46992 super(CONNECTION_SET_NS_ID, "connectionSet", true); 46993 this.wsdlConnection = new XFAObjectArray(); 46994 this.xmlConnection = new XFAObjectArray(); 46995 this.xsdConnection = new XFAObjectArray(); 46996 } 46997} 46998class EffectiveInputPolicy extends XFAObject { 46999 constructor(attributes) { 47000 super(CONNECTION_SET_NS_ID, "effectiveInputPolicy"); 47001 this.id = attributes.id || ""; 47002 this.name = attributes.name || ""; 47003 this.use = attributes.use || ""; 47004 this.usehref = attributes.usehref || ""; 47005 } 47006} 47007class EffectiveOutputPolicy extends XFAObject { 47008 constructor(attributes) { 47009 super(CONNECTION_SET_NS_ID, "effectiveOutputPolicy"); 47010 this.id = attributes.id || ""; 47011 this.name = attributes.name || ""; 47012 this.use = attributes.use || ""; 47013 this.usehref = attributes.usehref || ""; 47014 } 47015} 47016class Operation extends StringObject { 47017 constructor(attributes) { 47018 super(CONNECTION_SET_NS_ID, "operation"); 47019 this.id = attributes.id || ""; 47020 this.input = attributes.input || ""; 47021 this.name = attributes.name || ""; 47022 this.output = attributes.output || ""; 47023 this.use = attributes.use || ""; 47024 this.usehref = attributes.usehref || ""; 47025 } 47026} 47027class RootElement extends StringObject { 47028 constructor(attributes) { 47029 super(CONNECTION_SET_NS_ID, "rootElement"); 47030 this.id = attributes.id || ""; 47031 this.name = attributes.name || ""; 47032 this.use = attributes.use || ""; 47033 this.usehref = attributes.usehref || ""; 47034 } 47035} 47036class SoapAction extends StringObject { 47037 constructor(attributes) { 47038 super(CONNECTION_SET_NS_ID, "soapAction"); 47039 this.id = attributes.id || ""; 47040 this.name = attributes.name || ""; 47041 this.use = attributes.use || ""; 47042 this.usehref = attributes.usehref || ""; 47043 } 47044} 47045class SoapAddress extends StringObject { 47046 constructor(attributes) { 47047 super(CONNECTION_SET_NS_ID, "soapAddress"); 47048 this.id = attributes.id || ""; 47049 this.name = attributes.name || ""; 47050 this.use = attributes.use || ""; 47051 this.usehref = attributes.usehref || ""; 47052 } 47053} 47054class connection_set_Uri extends StringObject { 47055 constructor(attributes) { 47056 super(CONNECTION_SET_NS_ID, "uri"); 47057 this.id = attributes.id || ""; 47058 this.name = attributes.name || ""; 47059 this.use = attributes.use || ""; 47060 this.usehref = attributes.usehref || ""; 47061 } 47062} 47063class WsdlAddress extends StringObject { 47064 constructor(attributes) { 47065 super(CONNECTION_SET_NS_ID, "wsdlAddress"); 47066 this.id = attributes.id || ""; 47067 this.name = attributes.name || ""; 47068 this.use = attributes.use || ""; 47069 this.usehref = attributes.usehref || ""; 47070 } 47071} 47072class WsdlConnection extends XFAObject { 47073 constructor(attributes) { 47074 super(CONNECTION_SET_NS_ID, "wsdlConnection", true); 47075 this.dataDescription = attributes.dataDescription || ""; 47076 this.name = attributes.name || ""; 47077 this.effectiveInputPolicy = null; 47078 this.effectiveOutputPolicy = null; 47079 this.operation = null; 47080 this.soapAction = null; 47081 this.soapAddress = null; 47082 this.wsdlAddress = null; 47083 } 47084} 47085class XmlConnection extends XFAObject { 47086 constructor(attributes) { 47087 super(CONNECTION_SET_NS_ID, "xmlConnection", true); 47088 this.dataDescription = attributes.dataDescription || ""; 47089 this.name = attributes.name || ""; 47090 this.uri = null; 47091 } 47092} 47093class XsdConnection extends XFAObject { 47094 constructor(attributes) { 47095 super(CONNECTION_SET_NS_ID, "xsdConnection", true); 47096 this.dataDescription = attributes.dataDescription || ""; 47097 this.name = attributes.name || ""; 47098 this.rootElement = null; 47099 this.uri = null; 47100 } 47101} 47102class ConnectionSetNamespace { 47103 static [$buildXFAObject](name, attributes) { 47104 if (ConnectionSetNamespace.hasOwnProperty(name)) { 47105 return ConnectionSetNamespace[name](attributes); 47106 } 47107 return undefined; 47108 } 47109 static connectionSet(attrs) { 47110 return new ConnectionSet(attrs); 47111 } 47112 static effectiveInputPolicy(attrs) { 47113 return new EffectiveInputPolicy(attrs); 47114 } 47115 static effectiveOutputPolicy(attrs) { 47116 return new EffectiveOutputPolicy(attrs); 47117 } 47118 static operation(attrs) { 47119 return new Operation(attrs); 47120 } 47121 static rootElement(attrs) { 47122 return new RootElement(attrs); 47123 } 47124 static soapAction(attrs) { 47125 return new SoapAction(attrs); 47126 } 47127 static soapAddress(attrs) { 47128 return new SoapAddress(attrs); 47129 } 47130 static uri(attrs) { 47131 return new connection_set_Uri(attrs); 47132 } 47133 static wsdlAddress(attrs) { 47134 return new WsdlAddress(attrs); 47135 } 47136 static wsdlConnection(attrs) { 47137 return new WsdlConnection(attrs); 47138 } 47139 static xmlConnection(attrs) { 47140 return new XmlConnection(attrs); 47141 } 47142 static xsdConnection(attrs) { 47143 return new XsdConnection(attrs); 47144 } 47145} 47146 47147;// ./src/core/xfa/datasets.js 47148 47149 47150 47151const DATASETS_NS_ID = NamespaceIds.datasets.id; 47152class datasets_Data extends XmlObject { 47153 constructor(attributes) { 47154 super(DATASETS_NS_ID, "data", attributes); 47155 } 47156 [$isNsAgnostic]() { 47157 return true; 47158 } 47159} 47160class Datasets extends XFAObject { 47161 constructor(attributes) { 47162 super(DATASETS_NS_ID, "datasets", true); 47163 this.data = null; 47164 this.Signature = null; 47165 } 47166 [$onChild](child) { 47167 const name = child[$nodeName]; 47168 if (name === "data" && child[$namespaceId] === DATASETS_NS_ID || name === "Signature" && child[$namespaceId] === NamespaceIds.signature.id) { 47169 this[name] = child; 47170 } 47171 this[$appendChild](child); 47172 } 47173} 47174class DatasetsNamespace { 47175 static [$buildXFAObject](name, attributes) { 47176 if (DatasetsNamespace.hasOwnProperty(name)) { 47177 return DatasetsNamespace[name](attributes); 47178 } 47179 return undefined; 47180 } 47181 static datasets(attributes) { 47182 return new Datasets(attributes); 47183 } 47184 static data(attributes) { 47185 return new datasets_Data(attributes); 47186 } 47187} 47188 47189;// ./src/core/xfa/locale_set.js 47190 47191 47192 47193const LOCALE_SET_NS_ID = NamespaceIds.localeSet.id; 47194class CalendarSymbols extends XFAObject { 47195 constructor(attributes) { 47196 super(LOCALE_SET_NS_ID, "calendarSymbols", true); 47197 this.name = "gregorian"; 47198 this.dayNames = new XFAObjectArray(2); 47199 this.eraNames = null; 47200 this.meridiemNames = null; 47201 this.monthNames = new XFAObjectArray(2); 47202 } 47203} 47204class CurrencySymbol extends StringObject { 47205 constructor(attributes) { 47206 super(LOCALE_SET_NS_ID, "currencySymbol"); 47207 this.name = getStringOption(attributes.name, ["symbol", "isoname", "decimal"]); 47208 } 47209} 47210class CurrencySymbols extends XFAObject { 47211 constructor(attributes) { 47212 super(LOCALE_SET_NS_ID, "currencySymbols", true); 47213 this.currencySymbol = new XFAObjectArray(3); 47214 } 47215} 47216class DatePattern extends StringObject { 47217 constructor(attributes) { 47218 super(LOCALE_SET_NS_ID, "datePattern"); 47219 this.name = getStringOption(attributes.name, ["full", "long", "med", "short"]); 47220 } 47221} 47222class DatePatterns extends XFAObject { 47223 constructor(attributes) { 47224 super(LOCALE_SET_NS_ID, "datePatterns", true); 47225 this.datePattern = new XFAObjectArray(4); 47226 } 47227} 47228class DateTimeSymbols extends ContentObject { 47229 constructor(attributes) { 47230 super(LOCALE_SET_NS_ID, "dateTimeSymbols"); 47231 } 47232} 47233class Day extends StringObject { 47234 constructor(attributes) { 47235 super(LOCALE_SET_NS_ID, "day"); 47236 } 47237} 47238class DayNames extends XFAObject { 47239 constructor(attributes) { 47240 super(LOCALE_SET_NS_ID, "dayNames", true); 47241 this.abbr = getInteger({ 47242 data: attributes.abbr, 47243 defaultValue: 0, 47244 validate: x => x === 1 47245 }); 47246 this.day = new XFAObjectArray(7); 47247 } 47248} 47249class Era extends StringObject { 47250 constructor(attributes) { 47251 super(LOCALE_SET_NS_ID, "era"); 47252 } 47253} 47254class EraNames extends XFAObject { 47255 constructor(attributes) { 47256 super(LOCALE_SET_NS_ID, "eraNames", true); 47257 this.era = new XFAObjectArray(2); 47258 } 47259} 47260class locale_set_Locale extends XFAObject { 47261 constructor(attributes) { 47262 super(LOCALE_SET_NS_ID, "locale", true); 47263 this.desc = attributes.desc || ""; 47264 this.name = "isoname"; 47265 this.calendarSymbols = null; 47266 this.currencySymbols = null; 47267 this.datePatterns = null; 47268 this.dateTimeSymbols = null; 47269 this.numberPatterns = null; 47270 this.numberSymbols = null; 47271 this.timePatterns = null; 47272 this.typeFaces = null; 47273 } 47274} 47275class locale_set_LocaleSet extends XFAObject { 47276 constructor(attributes) { 47277 super(LOCALE_SET_NS_ID, "localeSet", true); 47278 this.locale = new XFAObjectArray(); 47279 } 47280} 47281class Meridiem extends StringObject { 47282 constructor(attributes) { 47283 super(LOCALE_SET_NS_ID, "meridiem"); 47284 } 47285} 47286class MeridiemNames extends XFAObject { 47287 constructor(attributes) { 47288 super(LOCALE_SET_NS_ID, "meridiemNames", true); 47289 this.meridiem = new XFAObjectArray(2); 47290 } 47291} 47292class Month extends StringObject { 47293 constructor(attributes) { 47294 super(LOCALE_SET_NS_ID, "month"); 47295 } 47296} 47297class MonthNames extends XFAObject { 47298 constructor(attributes) { 47299 super(LOCALE_SET_NS_ID, "monthNames", true); 47300 this.abbr = getInteger({ 47301 data: attributes.abbr, 47302 defaultValue: 0, 47303 validate: x => x === 1 47304 }); 47305 this.month = new XFAObjectArray(12); 47306 } 47307} 47308class NumberPattern extends StringObject { 47309 constructor(attributes) { 47310 super(LOCALE_SET_NS_ID, "numberPattern"); 47311 this.name = getStringOption(attributes.name, ["full", "long", "med", "short"]); 47312 } 47313} 47314class NumberPatterns extends XFAObject { 47315 constructor(attributes) { 47316 super(LOCALE_SET_NS_ID, "numberPatterns", true); 47317 this.numberPattern = new XFAObjectArray(4); 47318 } 47319} 47320class NumberSymbol extends StringObject { 47321 constructor(attributes) { 47322 super(LOCALE_SET_NS_ID, "numberSymbol"); 47323 this.name = getStringOption(attributes.name, ["decimal", "grouping", "percent", "minus", "zero"]); 47324 } 47325} 47326class NumberSymbols extends XFAObject { 47327 constructor(attributes) { 47328 super(LOCALE_SET_NS_ID, "numberSymbols", true); 47329 this.numberSymbol = new XFAObjectArray(5); 47330 } 47331} 47332class TimePattern extends StringObject { 47333 constructor(attributes) { 47334 super(LOCALE_SET_NS_ID, "timePattern"); 47335 this.name = getStringOption(attributes.name, ["full", "long", "med", "short"]); 47336 } 47337} 47338class TimePatterns extends XFAObject { 47339 constructor(attributes) { 47340 super(LOCALE_SET_NS_ID, "timePatterns", true); 47341 this.timePattern = new XFAObjectArray(4); 47342 } 47343} 47344class TypeFace extends XFAObject { 47345 constructor(attributes) { 47346 super(LOCALE_SET_NS_ID, "typeFace", true); 47347 this.name = attributes.name | ""; 47348 } 47349} 47350class TypeFaces extends XFAObject { 47351 constructor(attributes) { 47352 super(LOCALE_SET_NS_ID, "typeFaces", true); 47353 this.typeFace = new XFAObjectArray(); 47354 } 47355} 47356class LocaleSetNamespace { 47357 static [$buildXFAObject](name, attributes) { 47358 if (LocaleSetNamespace.hasOwnProperty(name)) { 47359 return LocaleSetNamespace[name](attributes); 47360 } 47361 return undefined; 47362 } 47363 static calendarSymbols(attrs) { 47364 return new CalendarSymbols(attrs); 47365 } 47366 static currencySymbol(attrs) { 47367 return new CurrencySymbol(attrs); 47368 } 47369 static currencySymbols(attrs) { 47370 return new CurrencySymbols(attrs); 47371 } 47372 static datePattern(attrs) { 47373 return new DatePattern(attrs); 47374 } 47375 static datePatterns(attrs) { 47376 return new DatePatterns(attrs); 47377 } 47378 static dateTimeSymbols(attrs) { 47379 return new DateTimeSymbols(attrs); 47380 } 47381 static day(attrs) { 47382 return new Day(attrs); 47383 } 47384 static dayNames(attrs) { 47385 return new DayNames(attrs); 47386 } 47387 static era(attrs) { 47388 return new Era(attrs); 47389 } 47390 static eraNames(attrs) { 47391 return new EraNames(attrs); 47392 } 47393 static locale(attrs) { 47394 return new locale_set_Locale(attrs); 47395 } 47396 static localeSet(attrs) { 47397 return new locale_set_LocaleSet(attrs); 47398 } 47399 static meridiem(attrs) { 47400 return new Meridiem(attrs); 47401 } 47402 static meridiemNames(attrs) { 47403 return new MeridiemNames(attrs); 47404 } 47405 static month(attrs) { 47406 return new Month(attrs); 47407 } 47408 static monthNames(attrs) { 47409 return new MonthNames(attrs); 47410 } 47411 static numberPattern(attrs) { 47412 return new NumberPattern(attrs); 47413 } 47414 static numberPatterns(attrs) { 47415 return new NumberPatterns(attrs); 47416 } 47417 static numberSymbol(attrs) { 47418 return new NumberSymbol(attrs); 47419 } 47420 static numberSymbols(attrs) { 47421 return new NumberSymbols(attrs); 47422 } 47423 static timePattern(attrs) { 47424 return new TimePattern(attrs); 47425 } 47426 static timePatterns(attrs) { 47427 return new TimePatterns(attrs); 47428 } 47429 static typeFace(attrs) { 47430 return new TypeFace(attrs); 47431 } 47432 static typeFaces(attrs) { 47433 return new TypeFaces(attrs); 47434 } 47435} 47436 47437;// ./src/core/xfa/signature.js 47438 47439 47440const SIGNATURE_NS_ID = NamespaceIds.signature.id; 47441class signature_Signature extends XFAObject { 47442 constructor(attributes) { 47443 super(SIGNATURE_NS_ID, "signature", true); 47444 } 47445} 47446class SignatureNamespace { 47447 static [$buildXFAObject](name, attributes) { 47448 if (SignatureNamespace.hasOwnProperty(name)) { 47449 return SignatureNamespace[name](attributes); 47450 } 47451 return undefined; 47452 } 47453 static signature(attributes) { 47454 return new signature_Signature(attributes); 47455 } 47456} 47457 47458;// ./src/core/xfa/stylesheet.js 47459 47460 47461const STYLESHEET_NS_ID = NamespaceIds.stylesheet.id; 47462class Stylesheet extends XFAObject { 47463 constructor(attributes) { 47464 super(STYLESHEET_NS_ID, "stylesheet", true); 47465 } 47466} 47467class StylesheetNamespace { 47468 static [$buildXFAObject](name, attributes) { 47469 if (StylesheetNamespace.hasOwnProperty(name)) { 47470 return StylesheetNamespace[name](attributes); 47471 } 47472 return undefined; 47473 } 47474 static stylesheet(attributes) { 47475 return new Stylesheet(attributes); 47476 } 47477} 47478 47479;// ./src/core/xfa/xdp.js 47480 47481 47482 47483const XDP_NS_ID = NamespaceIds.xdp.id; 47484class xdp_Xdp extends XFAObject { 47485 constructor(attributes) { 47486 super(XDP_NS_ID, "xdp", true); 47487 this.uuid = attributes.uuid || ""; 47488 this.timeStamp = attributes.timeStamp || ""; 47489 this.config = null; 47490 this.connectionSet = null; 47491 this.datasets = null; 47492 this.localeSet = null; 47493 this.stylesheet = new XFAObjectArray(); 47494 this.template = null; 47495 } 47496 [$onChildCheck](child) { 47497 const ns = NamespaceIds[child[$nodeName]]; 47498 return ns && child[$namespaceId] === ns.id; 47499 } 47500} 47501class XdpNamespace { 47502 static [$buildXFAObject](name, attributes) { 47503 if (XdpNamespace.hasOwnProperty(name)) { 47504 return XdpNamespace[name](attributes); 47505 } 47506 return undefined; 47507 } 47508 static xdp(attributes) { 47509 return new xdp_Xdp(attributes); 47510 } 47511} 47512 47513;// ./src/core/xfa/xhtml.js 47514 47515 47516 47517 47518
vendor: 1,826 bytes, lines 47519-47525
47519const XHTML_NS_ID = NamespaceIds.xhtml.id; 47520const $richText = Symbol(); 47521const VALID_STYLES = new Set(["color", "font", "font-family", "font-size", "font-stretch", "font-style", "font-weight", "margin", "margin-bottom", "margin-left", "margin-right", "margin-top", "letter-spacing", "line-height", "orphans", "page-break-after", "page-break-before", "page-break-inside", "tab-interval", "tab-stop", "text-align", "text-decoration", "text-indent", "vertical-align", "widows", "kerning-mode", "xfa-font-horizontal-scale", "xfa-font-vertical-scale", "xfa-spacerun", "xfa-tab-stops"]); 47522const StyleMapping = new Map([["page-break-after", "breakAfter"], ["page-break-before", "breakBefore"], ["page-break-inside", "breakInside"], ["kerning-mode", value => value === "none" ? "none" : "normal"], ["xfa-font-horizontal-scale", value => `scaleX(${Math.max(0, Math.min(parseInt(value) / 100)).toFixed(2)})`], ["xfa-font-vertical-scale", value => `scaleY(${Math.max(0, Math.min(parseInt(value) / 100)).toFixed(2)})`], ["xfa-spacerun", ""], ["xfa-tab-stops", ""], ["font-size", (value, original) => { 47523 value = original.fontSize = Math.abs(getMeasurement(value)); 47524 return measureToString(0.99 * value); 47525}], ["letter-spacing", value => measureToString(getMeasurement(value))], ["line-height", value => measureToString(getMeasurement(value))], ["margin", value => measureToString(getMeasurement(value))], ["margin-bottom", value => measureToString(getMeasurement(value))], ["margin-left", value => measureToString(getMeasurement(value))], ["margin-right", value => measureToString(getMeasurement(value))], ["margin-top", value => measureToString(getMeasurement(value))], ["text-indent", value => measureToString(getMeasurement(value))], ["font-family", value => value], ["vertical-align", value => measureToString(getMeasurement(value))]]);
vendor: 33,504 bytes, lines 47526-48737
47526const spacesRegExp = /\s+/g; 47527const crlfRegExp = /[\r\n]+/g; 47528const crlfForRichTextRegExp = /\r\n?/g; 47529function mapStyle(styleStr, node, richText) { 47530 const style = Object.create(null); 47531 if (!styleStr) { 47532 return style; 47533 } 47534 const original = Object.create(null); 47535 for (const [key, value] of styleStr.split(";").map(s => s.split(":", 2))) { 47536 const mapping = StyleMapping.get(key); 47537 if (mapping === "") { 47538 continue; 47539 } 47540 let newValue = value; 47541 if (mapping) { 47542 newValue = typeof mapping === "string" ? mapping : mapping(value, original); 47543 } 47544 if (key.endsWith("scale")) { 47545 style.transform = style.transform ? `${style[key]} ${newValue}` : newValue; 47546 } else { 47547 style[key.replaceAll(/-([a-zA-Z])/g, (_, x) => x.toUpperCase())] = newValue; 47548 } 47549 } 47550 if (style.fontFamily) { 47551 setFontFamily({ 47552 typeface: style.fontFamily, 47553 weight: style.fontWeight || "normal", 47554 posture: style.fontStyle || "normal", 47555 size: original.fontSize || 0 47556 }, node, node[$globalData].fontFinder, style); 47557 } 47558 if (richText && style.verticalAlign && style.verticalAlign !== "0px" && style.fontSize) { 47559 const SUB_SUPER_SCRIPT_FACTOR = 0.583; 47560 const VERTICAL_FACTOR = 0.333; 47561 const fontSize = getMeasurement(style.fontSize); 47562 style.fontSize = measureToString(fontSize * SUB_SUPER_SCRIPT_FACTOR); 47563 style.verticalAlign = measureToString(Math.sign(getMeasurement(style.verticalAlign)) * fontSize * VERTICAL_FACTOR); 47564 } 47565 if (richText && style.fontSize) { 47566 style.fontSize = `calc(${style.fontSize} * var(--scale-factor))`; 47567 } 47568 fixTextIndent(style); 47569 return style; 47570} 47571function checkStyle(node) { 47572 if (!node.style) { 47573 return ""; 47574 } 47575 return node.style.trim().split(/\s*;\s*/).filter(s => !!s).map(s => s.split(/\s*:\s*/, 2)).filter(([key, value]) => { 47576 if (key === "font-family") { 47577 node[$globalData].usedTypefaces.add(value); 47578 } 47579 return VALID_STYLES.has(key); 47580 }).map(kv => kv.join(":")).join(";"); 47581} 47582const NoWhites = new Set(["body", "html"]); 47583class XhtmlObject extends XmlObject { 47584 constructor(attributes, name) { 47585 super(XHTML_NS_ID, name); 47586 this[$richText] = false; 47587 this.style = attributes.style || ""; 47588 } 47589 [$clean](builder) { 47590 super[$clean](builder); 47591 this.style = checkStyle(this); 47592 } 47593 [$acceptWhitespace]() { 47594 return !NoWhites.has(this[$nodeName]); 47595 } 47596 [$onText](str, richText = false) { 47597 if (!richText) { 47598 str = str.replaceAll(crlfRegExp, ""); 47599 if (!this.style.includes("xfa-spacerun:yes")) { 47600 str = str.replaceAll(spacesRegExp, " "); 47601 } 47602 } else { 47603 this[$richText] = true; 47604 } 47605 if (str) { 47606 this[$content] += str; 47607 } 47608 } 47609 [$pushGlyphs](measure, mustPop = true) { 47610 const xfaFont = Object.create(null); 47611 const margin = { 47612 top: NaN, 47613 bottom: NaN, 47614 left: NaN, 47615 right: NaN 47616 }; 47617 let lineHeight = null; 47618 for (const [key, value] of this.style.split(";").map(s => s.split(":", 2))) { 47619 switch (key) { 47620 case "font-family": 47621 xfaFont.typeface = stripQuotes(value); 47622 break; 47623 case "font-size": 47624 xfaFont.size = getMeasurement(value); 47625 break; 47626 case "font-weight": 47627 xfaFont.weight = value; 47628 break; 47629 case "font-style": 47630 xfaFont.posture = value; 47631 break; 47632 case "letter-spacing": 47633 xfaFont.letterSpacing = getMeasurement(value); 47634 break; 47635 case "margin": 47636 const values = value.split(/ \t/).map(x => getMeasurement(x)); 47637 switch (values.length) { 47638 case 1: 47639 margin.top = margin.bottom = margin.left = margin.right = values[0]; 47640 break; 47641 case 2: 47642 margin.top = margin.bottom = values[0]; 47643 margin.left = margin.right = values[1]; 47644 break; 47645 case 3: 47646 margin.top = values[0]; 47647 margin.bottom = values[2]; 47648 margin.left = margin.right = values[1]; 47649 break; 47650 case 4: 47651 margin.top = values[0]; 47652 margin.left = values[1]; 47653 margin.bottom = values[2]; 47654 margin.right = values[3]; 47655 break; 47656 } 47657 break; 47658 case "margin-top": 47659 margin.top = getMeasurement(value); 47660 break; 47661 case "margin-bottom": 47662 margin.bottom = getMeasurement(value); 47663 break; 47664 case "margin-left": 47665 margin.left = getMeasurement(value); 47666 break; 47667 case "margin-right": 47668 margin.right = getMeasurement(value); 47669 break; 47670 case "line-height": 47671 lineHeight = getMeasurement(value); 47672 break; 47673 } 47674 } 47675 measure.pushData(xfaFont, margin, lineHeight); 47676 if (this[$content]) { 47677 measure.addString(this[$content]); 47678 } else { 47679 for (const child of this[$getChildren]()) { 47680 if (child[$nodeName] === "#text") { 47681 measure.addString(child[$content]); 47682 continue; 47683 } 47684 child[$pushGlyphs](measure); 47685 } 47686 } 47687 if (mustPop) { 47688 measure.popFont(); 47689 } 47690 } 47691 [$toHTML](availableSpace) { 47692 const children = []; 47693 this[$extra] = { 47694 children 47695 }; 47696 this[$childrenToHTML]({}); 47697 if (children.length === 0 && !this[$content]) { 47698 return HTMLResult.EMPTY; 47699 } 47700 let value; 47701 if (this[$richText]) { 47702 value = this[$content] ? this[$content].replaceAll(crlfForRichTextRegExp, "\n") : undefined; 47703 } else { 47704 value = this[$content] || undefined; 47705 } 47706 return HTMLResult.success({ 47707 name: this[$nodeName], 47708 attributes: { 47709 href: this.href, 47710 style: mapStyle(this.style, this, this[$richText]) 47711 }, 47712 children, 47713 value 47714 }); 47715 } 47716} 47717class A extends XhtmlObject { 47718 constructor(attributes) { 47719 super(attributes, "a"); 47720 this.href = fixURL(attributes.href) || ""; 47721 } 47722} 47723class B extends XhtmlObject { 47724 constructor(attributes) { 47725 super(attributes, "b"); 47726 } 47727 [$pushGlyphs](measure) { 47728 measure.pushFont({ 47729 weight: "bold" 47730 }); 47731 super[$pushGlyphs](measure); 47732 measure.popFont(); 47733 } 47734} 47735class Body extends XhtmlObject { 47736 constructor(attributes) { 47737 super(attributes, "body"); 47738 } 47739 [$toHTML](availableSpace) { 47740 const res = super[$toHTML](availableSpace); 47741 const { 47742 html 47743 } = res; 47744 if (!html) { 47745 return HTMLResult.EMPTY; 47746 } 47747 html.name = "div"; 47748 html.attributes.class = ["xfaRich"]; 47749 return res; 47750 } 47751} 47752class Br extends XhtmlObject { 47753 constructor(attributes) { 47754 super(attributes, "br"); 47755 } 47756 [$text]() { 47757 return "\n"; 47758 } 47759 [$pushGlyphs](measure) { 47760 measure.addString("\n"); 47761 } 47762 [$toHTML](availableSpace) { 47763 return HTMLResult.success({ 47764 name: "br" 47765 }); 47766 } 47767} 47768class Html extends XhtmlObject { 47769 constructor(attributes) { 47770 super(attributes, "html"); 47771 } 47772 [$toHTML](availableSpace) { 47773 const children = []; 47774 this[$extra] = { 47775 children 47776 }; 47777 this[$childrenToHTML]({}); 47778 if (children.length === 0) { 47779 return HTMLResult.success({ 47780 name: "div", 47781 attributes: { 47782 class: ["xfaRich"], 47783 style: {} 47784 }, 47785 value: this[$content] || "" 47786 }); 47787 } 47788 if (children.length === 1) { 47789 const child = children[0]; 47790 if (child.attributes?.class.includes("xfaRich")) { 47791 return HTMLResult.success(child); 47792 } 47793 } 47794 return HTMLResult.success({ 47795 name: "div", 47796 attributes: { 47797 class: ["xfaRich"], 47798 style: {} 47799 }, 47800 children 47801 }); 47802 } 47803} 47804class I extends XhtmlObject { 47805 constructor(attributes) { 47806 super(attributes, "i"); 47807 } 47808 [$pushGlyphs](measure) { 47809 measure.pushFont({ 47810 posture: "italic" 47811 }); 47812 super[$pushGlyphs](measure); 47813 measure.popFont(); 47814 } 47815} 47816class Li extends XhtmlObject { 47817 constructor(attributes) { 47818 super(attributes, "li"); 47819 } 47820} 47821class Ol extends XhtmlObject { 47822 constructor(attributes) { 47823 super(attributes, "ol"); 47824 } 47825} 47826class P extends XhtmlObject { 47827 constructor(attributes) { 47828 super(attributes, "p"); 47829 } 47830 [$pushGlyphs](measure) { 47831 super[$pushGlyphs](measure, false); 47832 measure.addString("\n"); 47833 measure.addPara(); 47834 measure.popFont(); 47835 } 47836 [$text]() { 47837 const siblings = this[$getParent]()[$getChildren](); 47838 if (siblings.at(-1) === this) { 47839 return super[$text](); 47840 } 47841 return super[$text]() + "\n"; 47842 } 47843} 47844class Span extends XhtmlObject { 47845 constructor(attributes) { 47846 super(attributes, "span"); 47847 } 47848} 47849class Sub extends XhtmlObject { 47850 constructor(attributes) { 47851 super(attributes, "sub"); 47852 } 47853} 47854class Sup extends XhtmlObject { 47855 constructor(attributes) { 47856 super(attributes, "sup"); 47857 } 47858} 47859class Ul extends XhtmlObject { 47860 constructor(attributes) { 47861 super(attributes, "ul"); 47862 } 47863} 47864class XhtmlNamespace { 47865 static [$buildXFAObject](name, attributes) { 47866 if (XhtmlNamespace.hasOwnProperty(name)) { 47867 return XhtmlNamespace[name](attributes); 47868 } 47869 return undefined; 47870 } 47871 static a(attributes) { 47872 return new A(attributes); 47873 } 47874 static b(attributes) { 47875 return new B(attributes); 47876 } 47877 static body(attributes) { 47878 return new Body(attributes); 47879 } 47880 static br(attributes) { 47881 return new Br(attributes); 47882 } 47883 static html(attributes) { 47884 return new Html(attributes); 47885 } 47886 static i(attributes) { 47887 return new I(attributes); 47888 } 47889 static li(attributes) { 47890 return new Li(attributes); 47891 } 47892 static ol(attributes) { 47893 return new Ol(attributes); 47894 } 47895 static p(attributes) { 47896 return new P(attributes); 47897 } 47898 static span(attributes) { 47899 return new Span(attributes); 47900 } 47901 static sub(attributes) { 47902 return new Sub(attributes); 47903 } 47904 static sup(attributes) { 47905 return new Sup(attributes); 47906 } 47907 static ul(attributes) { 47908 return new Ul(attributes); 47909 } 47910} 47911 47912;// ./src/core/xfa/setup.js 47913 47914 47915 47916 47917 47918 47919 47920 47921 47922const NamespaceSetUp = { 47923 config: ConfigNamespace, 47924 connection: ConnectionSetNamespace, 47925 datasets: DatasetsNamespace, 47926 localeSet: LocaleSetNamespace, 47927 signature: SignatureNamespace, 47928 stylesheet: StylesheetNamespace, 47929 template: TemplateNamespace, 47930 xdp: XdpNamespace, 47931 xhtml: XhtmlNamespace 47932}; 47933 47934;// ./src/core/xfa/unknown.js 47935 47936 47937class UnknownNamespace { 47938 constructor(nsId) { 47939 this.namespaceId = nsId; 47940 } 47941 [$buildXFAObject](name, attributes) { 47942 return new XmlObject(this.namespaceId, name, attributes); 47943 } 47944} 47945 47946;// ./src/core/xfa/builder.js 47947 47948 47949 47950 47951 47952 47953 47954class Root extends XFAObject { 47955 constructor(ids) { 47956 super(-1, "root", Object.create(null)); 47957 this.element = null; 47958 this[$ids] = ids; 47959 } 47960 [$onChild](child) { 47961 this.element = child; 47962 return true; 47963 } 47964 [$finalize]() { 47965 super[$finalize](); 47966 if (this.element.template instanceof Template) { 47967 this[$ids].set($root, this.element); 47968 this.element.template[$resolvePrototypes](this[$ids]); 47969 this.element.template[$ids] = this[$ids]; 47970 } 47971 } 47972} 47973class Empty extends XFAObject { 47974 constructor() { 47975 super(-1, "", Object.create(null)); 47976 } 47977 [$onChild](_) { 47978 return false; 47979 } 47980} 47981class Builder { 47982 constructor(rootNameSpace = null) { 47983 this._namespaceStack = []; 47984 this._nsAgnosticLevel = 0; 47985 this._namespacePrefixes = new Map(); 47986 this._namespaces = new Map(); 47987 this._nextNsId = Math.max(...Object.values(NamespaceIds).map(({ 47988 id 47989 }) => id)); 47990 this._currentNamespace = rootNameSpace || new UnknownNamespace(++this._nextNsId); 47991 } 47992 buildRoot(ids) { 47993 return new Root(ids); 47994 } 47995 build({ 47996 nsPrefix, 47997 name, 47998 attributes, 47999 namespace, 48000 prefixes 48001 }) { 48002 const hasNamespaceDef = namespace !== null; 48003 if (hasNamespaceDef) { 48004 this._namespaceStack.push(this._currentNamespace); 48005 this._currentNamespace = this._searchNamespace(namespace); 48006 } 48007 if (prefixes) { 48008 this._addNamespacePrefix(prefixes); 48009 } 48010 if (attributes.hasOwnProperty($nsAttributes)) { 48011 const dataTemplate = NamespaceSetUp.datasets; 48012 const nsAttrs = attributes[$nsAttributes]; 48013 let xfaAttrs = null; 48014 for (const [ns, attrs] of Object.entries(nsAttrs)) { 48015 const nsToUse = this._getNamespaceToUse(ns); 48016 if (nsToUse === dataTemplate) { 48017 xfaAttrs = { 48018 xfa: attrs 48019 }; 48020 break; 48021 } 48022 } 48023 if (xfaAttrs) { 48024 attributes[$nsAttributes] = xfaAttrs; 48025 } else { 48026 delete attributes[$nsAttributes]; 48027 } 48028 } 48029 const namespaceToUse = this._getNamespaceToUse(nsPrefix); 48030 const node = namespaceToUse?.[$buildXFAObject](name, attributes) || new Empty(); 48031 if (node[$isNsAgnostic]()) { 48032 this._nsAgnosticLevel++; 48033 } 48034 if (hasNamespaceDef || prefixes || node[$isNsAgnostic]()) { 48035 node[$cleanup] = { 48036 hasNamespace: hasNamespaceDef, 48037 prefixes, 48038 nsAgnostic: node[$isNsAgnostic]() 48039 }; 48040 } 48041 return node; 48042 } 48043 isNsAgnostic() { 48044 return this._nsAgnosticLevel > 0; 48045 } 48046 _searchNamespace(nsName) { 48047 let ns = this._namespaces.get(nsName); 48048 if (ns) { 48049 return ns; 48050 } 48051 for (const [name, { 48052 check 48053 }] of Object.entries(NamespaceIds)) { 48054 if (check(nsName)) { 48055 ns = NamespaceSetUp[name]; 48056 if (ns) { 48057 this._namespaces.set(nsName, ns); 48058 return ns; 48059 } 48060 break; 48061 } 48062 } 48063 ns = new UnknownNamespace(++this._nextNsId); 48064 this._namespaces.set(nsName, ns); 48065 return ns; 48066 } 48067 _addNamespacePrefix(prefixes) { 48068 for (const { 48069 prefix, 48070 value 48071 } of prefixes) { 48072 const namespace = this._searchNamespace(value); 48073 let prefixStack = this._namespacePrefixes.get(prefix); 48074 if (!prefixStack) { 48075 prefixStack = []; 48076 this._namespacePrefixes.set(prefix, prefixStack); 48077 } 48078 prefixStack.push(namespace); 48079 } 48080 } 48081 _getNamespaceToUse(prefix) { 48082 if (!prefix) { 48083 return this._currentNamespace; 48084 } 48085 const prefixStack = this._namespacePrefixes.get(prefix); 48086 if (prefixStack?.length > 0) { 48087 return prefixStack.at(-1); 48088 } 48089 warn(`Unknown namespace prefix: ${prefix}.`); 48090 return null; 48091 } 48092 clean(data) { 48093 const { 48094 hasNamespace, 48095 prefixes, 48096 nsAgnostic 48097 } = data; 48098 if (hasNamespace) { 48099 this._currentNamespace = this._namespaceStack.pop(); 48100 } 48101 if (prefixes) { 48102 prefixes.forEach(({ 48103 prefix 48104 }) => { 48105 this._namespacePrefixes.get(prefix).pop(); 48106 }); 48107 } 48108 if (nsAgnostic) { 48109 this._nsAgnosticLevel--; 48110 } 48111 } 48112} 48113 48114;// ./src/core/xfa/parser.js 48115 48116 48117 48118 48119class XFAParser extends XMLParserBase { 48120 constructor(rootNameSpace = null, richText = false) { 48121 super(); 48122 this._builder = new Builder(rootNameSpace); 48123 this._stack = []; 48124 this._globalData = { 48125 usedTypefaces: new Set() 48126 }; 48127 this._ids = new Map(); 48128 this._current = this._builder.buildRoot(this._ids); 48129 this._errorCode = XMLParserErrorCode.NoError; 48130 this._whiteRegex = /^\s+$/; 48131 this._nbsps = /\xa0+/g; 48132 this._richText = richText; 48133 } 48134 parse(data) { 48135 this.parseXml(data); 48136 if (this._errorCode !== XMLParserErrorCode.NoError) { 48137 return undefined; 48138 } 48139 this._current[$finalize](); 48140 return this._current.element; 48141 } 48142 onText(text) { 48143 text = text.replace(this._nbsps, match => match.slice(1) + " "); 48144 if (this._richText || this._current[$acceptWhitespace]()) { 48145 this._current[$onText](text, this._richText); 48146 return; 48147 } 48148 if (this._whiteRegex.test(text)) { 48149 return; 48150 } 48151 this._current[$onText](text.trim()); 48152 } 48153 onCdata(text) { 48154 this._current[$onText](text); 48155 } 48156 _mkAttributes(attributes, tagName) { 48157 let namespace = null; 48158 let prefixes = null; 48159 const attributeObj = Object.create({}); 48160 for (const { 48161 name, 48162 value 48163 } of attributes) { 48164 if (name === "xmlns") { 48165 if (!namespace) { 48166 namespace = value; 48167 } else { 48168 warn(`XFA - multiple namespace definition in <${tagName}>`); 48169 } 48170 } else if (name.startsWith("xmlns:")) { 48171 const prefix = name.substring("xmlns:".length); 48172 if (!prefixes) { 48173 prefixes = []; 48174 } 48175 prefixes.push({ 48176 prefix, 48177 value 48178 }); 48179 } else { 48180 const i = name.indexOf(":"); 48181 if (i === -1) { 48182 attributeObj[name] = value; 48183 } else { 48184 let nsAttrs = attributeObj[$nsAttributes]; 48185 if (!nsAttrs) { 48186 nsAttrs = attributeObj[$nsAttributes] = Object.create(null); 48187 } 48188 const [ns, attrName] = [name.slice(0, i), name.slice(i + 1)]; 48189 const attrs = nsAttrs[ns] ||= Object.create(null); 48190 attrs[attrName] = value; 48191 } 48192 } 48193 } 48194 return [namespace, prefixes, attributeObj]; 48195 } 48196 _getNameAndPrefix(name, nsAgnostic) { 48197 const i = name.indexOf(":"); 48198 if (i === -1) { 48199 return [name, null]; 48200 } 48201 return [name.substring(i + 1), nsAgnostic ? "" : name.substring(0, i)]; 48202 } 48203 onBeginElement(tagName, attributes, isEmpty) { 48204 const [namespace, prefixes, attributesObj] = this._mkAttributes(attributes, tagName); 48205 const [name, nsPrefix] = this._getNameAndPrefix(tagName, this._builder.isNsAgnostic()); 48206 const node = this._builder.build({ 48207 nsPrefix, 48208 name, 48209 attributes: attributesObj, 48210 namespace, 48211 prefixes 48212 }); 48213 node[$globalData] = this._globalData; 48214 if (isEmpty) { 48215 node[$finalize](); 48216 if (this._current[$onChild](node)) { 48217 node[$setId](this._ids); 48218 } 48219 node[$clean](this._builder); 48220 return; 48221 } 48222 this._stack.push(this._current); 48223 this._current = node; 48224 } 48225 onEndElement(name) { 48226 const node = this._current; 48227 if (node[$isCDATAXml]() && typeof node[$content] === "string") { 48228 const parser = new XFAParser(); 48229 parser._globalData = this._globalData; 48230 const root = parser.parse(node[$content]); 48231 node[$content] = null; 48232 node[$onChild](root); 48233 } 48234 node[$finalize](); 48235 this._current = this._stack.pop(); 48236 if (this._current[$onChild](node)) { 48237 node[$setId](this._ids); 48238 } 48239 node[$clean](this._builder); 48240 } 48241 onError(code) { 48242 this._errorCode = code; 48243 } 48244} 48245 48246;// ./src/core/xfa/factory.js 48247 48248 48249 48250 48251 48252 48253 48254 48255class XFAFactory { 48256 constructor(data) { 48257 try { 48258 this.root = new XFAParser().parse(XFAFactory._createDocument(data)); 48259 const binder = new Binder(this.root); 48260 this.form = binder.bind(); 48261 this.dataHandler = new DataHandler(this.root, binder.getData()); 48262 this.form[$globalData].template = this.form; 48263 } catch (e) { 48264 warn(`XFA - an error occurred during parsing and binding: ${e}`); 48265 } 48266 } 48267 isValid() { 48268 return this.root && this.form; 48269 } 48270 _createPagesHelper() { 48271 const iterator = this.form[$toPages](); 48272 return new Promise((resolve, reject) => { 48273 const nextIteration = () => { 48274 try { 48275 const value = iterator.next(); 48276 if (value.done) { 48277 resolve(value.value); 48278 } else { 48279 setTimeout(nextIteration, 0); 48280 } 48281 } catch (e) { 48282 reject(e); 48283 } 48284 }; 48285 setTimeout(nextIteration, 0); 48286 }); 48287 } 48288 async _createPages() { 48289 try { 48290 this.pages = await this._createPagesHelper(); 48291 this.dims = this.pages.children.map(c => { 48292 const { 48293 width, 48294 height 48295 } = c.attributes.style; 48296 return [0, 0, parseInt(width), parseInt(height)]; 48297 }); 48298 } catch (e) { 48299 warn(`XFA - an error occurred during layout: ${e}`); 48300 } 48301 } 48302 getBoundingBox(pageIndex) { 48303 return this.dims[pageIndex]; 48304 } 48305 async getNumPages() { 48306 if (!this.pages) { 48307 await this._createPages(); 48308 } 48309 return this.dims.length; 48310 } 48311 setImages(images) { 48312 this.form[$globalData].images = images; 48313 } 48314 setFonts(fonts) { 48315 this.form[$globalData].fontFinder = new FontFinder(fonts); 48316 const missingFonts = []; 48317 for (let typeface of this.form[$globalData].usedTypefaces) { 48318 typeface = stripQuotes(typeface); 48319 const font = this.form[$globalData].fontFinder.find(typeface); 48320 if (!font) { 48321 missingFonts.push(typeface); 48322 } 48323 } 48324 if (missingFonts.length > 0) { 48325 return missingFonts; 48326 } 48327 return null; 48328 } 48329 appendFonts(fonts, reallyMissingFonts) { 48330 this.form[$globalData].fontFinder.add(fonts, reallyMissingFonts); 48331 } 48332 async getPages() { 48333 if (!this.pages) { 48334 await this._createPages(); 48335 } 48336 const pages = this.pages; 48337 this.pages = null; 48338 return pages; 48339 } 48340 serializeData(storage) { 48341 return this.dataHandler.serialize(storage); 48342 } 48343 static _createDocument(data) { 48344 if (!data["/xdp:xdp"]) { 48345 return data["xdp:xdp"]; 48346 } 48347 return Object.values(data).join(""); 48348 } 48349 static getRichTextAsHtml(rc) { 48350 if (!rc || typeof rc !== "string") { 48351 return null; 48352 } 48353 try { 48354 let root = new XFAParser(XhtmlNamespace, true).parse(rc); 48355 if (!["body", "xhtml"].includes(root[$nodeName])) { 48356 const newRoot = XhtmlNamespace.body({}); 48357 newRoot[$appendChild](root); 48358 root = newRoot; 48359 } 48360 const result = root[$toHTML](); 48361 if (!result.success) { 48362 return null; 48363 } 48364 const { 48365 html 48366 } = result; 48367 const { 48368 attributes 48369 } = html; 48370 if (attributes) { 48371 if (attributes.class) { 48372 attributes.class = attributes.class.filter(attr => !attr.startsWith("xfa")); 48373 } 48374 attributes.dir = "auto"; 48375 } 48376 return { 48377 html, 48378 str: root[$text]() 48379 }; 48380 } catch (e) { 48381 warn(`XFA - an error occurred during parsing of rich text: ${e}`); 48382 } 48383 return null; 48384 } 48385} 48386 48387;// ./src/core/annotation.js 48388 48389 48390 48391 48392 48393 48394 48395 48396 48397 48398 48399 48400 48401 48402class AnnotationFactory { 48403 static createGlobals(pdfManager) { 48404 return Promise.all([pdfManager.ensureCatalog("acroForm"), pdfManager.ensureDoc("xfaDatasets"), pdfManager.ensureCatalog("structTreeRoot"), pdfManager.ensureCatalog("baseUrl"), pdfManager.ensureCatalog("attachments")]).then(([acroForm, xfaDatasets, structTreeRoot, baseUrl, attachments]) => { 48405 return { 48406 pdfManager, 48407 acroForm: acroForm instanceof Dict ? acroForm : Dict.empty, 48408 xfaDatasets, 48409 structTreeRoot, 48410 baseUrl, 48411 attachments 48412 }; 48413 }, reason => { 48414 warn(`createGlobals: "${reason}".`); 48415 return null; 48416 }); 48417 } 48418 static async create(xref, ref, annotationGlobals, idFactory, collectFields, orphanFields, pageRef) { 48419 const pageIndex = collectFields ? await this._getPageIndex(xref, ref, annotationGlobals.pdfManager) : null; 48420 return annotationGlobals.pdfManager.ensure(this, "_create", [xref, ref, annotationGlobals, idFactory, collectFields, orphanFields, pageIndex, pageRef]); 48421 } 48422 static _create(xref, ref, annotationGlobals, idFactory, collectFields = false, orphanFields = null, pageIndex = null, pageRef = null) { 48423 const dict = xref.fetchIfRef(ref); 48424 if (!(dict instanceof Dict)) { 48425 return undefined; 48426 } 48427 const { 48428 acroForm, 48429 pdfManager 48430 } = annotationGlobals; 48431 const id = ref instanceof Ref ? ref.toString() : `annot_${idFactory.createObjId()}`; 48432 let subtype = dict.get("Subtype"); 48433 subtype = subtype instanceof Name ? subtype.name : null; 48434 const parameters = { 48435 xref, 48436 ref, 48437 dict, 48438 subtype, 48439 id, 48440 annotationGlobals, 48441 collectFields, 48442 orphanFields, 48443 needAppearances: !collectFields && acroForm.get("NeedAppearances") === true, 48444 pageIndex, 48445 evaluatorOptions: pdfManager.evaluatorOptions, 48446 pageRef 48447 }; 48448 switch (subtype) { 48449 case "Link": 48450 return new LinkAnnotation(parameters); 48451 case "Text": 48452 return new TextAnnotation(parameters); 48453 case "Widget": 48454 let fieldType = getInheritableProperty({ 48455 dict, 48456 key: "FT" 48457 }); 48458 fieldType = fieldType instanceof Name ? fieldType.name : null; 48459 switch (fieldType) { 48460 case "Tx": 48461 return new TextWidgetAnnotation(parameters); 48462 case "Btn": 48463 return new ButtonWidgetAnnotation(parameters); 48464 case "Ch": 48465 return new ChoiceWidgetAnnotation(parameters); 48466 case "Sig": 48467 return new SignatureWidgetAnnotation(parameters); 48468 } 48469 warn(`Unimplemented widget field type "${fieldType}", ` + "falling back to base field type."); 48470 return new WidgetAnnotation(parameters); 48471 case "Popup": 48472 return new PopupAnnotation(parameters); 48473 case "FreeText": 48474 return new FreeTextAnnotation(parameters); 48475 case "Line": 48476 return new LineAnnotation(parameters); 48477 case "Square": 48478 return new SquareAnnotation(parameters); 48479 case "Circle": 48480 return new CircleAnnotation(parameters); 48481 case "PolyLine": 48482 return new PolylineAnnotation(parameters); 48483 case "Polygon": 48484 return new PolygonAnnotation(parameters); 48485 case "Caret": 48486 return new CaretAnnotation(parameters); 48487 case "Ink": 48488 return new InkAnnotation(parameters); 48489 case "Highlight": 48490 return new HighlightAnnotation(parameters); 48491 case "Underline": 48492 return new UnderlineAnnotation(parameters); 48493 case "Squiggly": 48494 return new SquigglyAnnotation(parameters); 48495 case "StrikeOut": 48496 return new StrikeOutAnnotation(parameters); 48497 case "Stamp": 48498 return new StampAnnotation(parameters); 48499 case "FileAttachment": 48500 return new FileAttachmentAnnotation(parameters); 48501 default: 48502 if (!collectFields) { 48503 if (!subtype) { 48504 warn("Annotation is missing the required /Subtype."); 48505 } else { 48506 warn(`Unimplemented annotation type "${subtype}", ` + "falling back to base annotation."); 48507 } 48508 } 48509 return new Annotation(parameters); 48510 } 48511 } 48512 static async _getPageIndex(xref, ref, pdfManager) { 48513 try { 48514 const annotDict = await xref.fetchIfRefAsync(ref); 48515 if (!(annotDict instanceof Dict)) { 48516 return -1; 48517 } 48518 const pageRef = annotDict.getRaw("P"); 48519 if (pageRef instanceof Ref) { 48520 try { 48521 const pageIndex = await pdfManager.ensureCatalog("getPageIndex", [pageRef]); 48522 return pageIndex; 48523 } catch (ex) { 48524 info(`_getPageIndex -- not a valid page reference: "${ex}".`); 48525 } 48526 } 48527 if (annotDict.has("Kids")) { 48528 return -1; 48529 } 48530 const numPages = await pdfManager.ensureDoc("numPages"); 48531 for (let pageIndex = 0; pageIndex < numPages; pageIndex++) { 48532 const page = await pdfManager.getPage(pageIndex); 48533 const annotations = await pdfManager.ensure(page, "annotations"); 48534 for (const annotRef of annotations) { 48535 if (annotRef instanceof Ref && isRefsEqual(annotRef, ref)) { 48536 return pageIndex; 48537 } 48538 } 48539 } 48540 } catch (ex) { 48541 warn(`_getPageIndex: "${ex}".`); 48542 } 48543 return -1; 48544 } 48545 static generateImages(annotations, xref, isOffscreenCanvasSupported) { 48546 if (!isOffscreenCanvasSupported) { 48547 warn("generateImages: OffscreenCanvas is not supported, cannot save or print some annotations with images."); 48548 return null; 48549 } 48550 let imagePromises; 48551 for (const { 48552 bitmapId, 48553 bitmap 48554 } of annotations) { 48555 if (!bitmap) { 48556 continue; 48557 } 48558 imagePromises ||= new Map(); 48559 imagePromises.set(bitmapId, StampAnnotation.createImage(bitmap, xref)); 48560 } 48561 return imagePromises; 48562 } 48563 static async saveNewAnnotations(evaluator, task, annotations, imagePromises, changes) { 48564 const xref = evaluator.xref; 48565 let baseFontRef; 48566 const promises = []; 48567 const { 48568 isOffscreenCanvasSupported 48569 } = evaluator.options; 48570 for (const annotation of annotations) { 48571 if (annotation.deleted) { 48572 continue; 48573 } 48574 switch (annotation.annotationType) { 48575 case AnnotationEditorType.FREETEXT: 48576 if (!baseFontRef) { 48577 const baseFont = new Dict(xref); 48578 baseFont.set("BaseFont", Name.get("Helvetica")); 48579 baseFont.set("Type", Name.get("Font")); 48580 baseFont.set("Subtype", Name.get("Type1")); 48581 baseFont.set("Encoding", Name.get("WinAnsiEncoding")); 48582 baseFontRef = xref.getNewTemporaryRef(); 48583 changes.put(baseFontRef, { 48584 data: baseFont 48585 }); 48586 } 48587 promises.push(FreeTextAnnotation.createNewAnnotation(xref, annotation, changes, { 48588 evaluator, 48589 task, 48590 baseFontRef 48591 })); 48592 break; 48593 case AnnotationEditorType.HIGHLIGHT: 48594 if (annotation.quadPoints) { 48595 promises.push(HighlightAnnotation.createNewAnnotation(xref, annotation, changes)); 48596 } else { 48597 promises.push(InkAnnotation.createNewAnnotation(xref, annotation, changes)); 48598 } 48599 break; 48600 case AnnotationEditorType.INK: 48601 promises.push(InkAnnotation.createNewAnnotation(xref, annotation, changes)); 48602 break; 48603 case AnnotationEditorType.STAMP: 48604 const image = isOffscreenCanvasSupported ? await imagePromises?.get(annotation.bitmapId) : null; 48605 if (image?.imageStream) { 48606 const { 48607 imageStream, 48608 smaskStream 48609 } = image; 48610 if (smaskStream) { 48611 const smaskRef = xref.getNewTemporaryRef(); 48612 changes.put(smaskRef, { 48613 data: smaskStream 48614 }); 48615 imageStream.dict.set("SMask", smaskRef); 48616 } 48617 const imageRef = image.imageRef = xref.getNewTemporaryRef(); 48618 changes.put(imageRef, { 48619 data: imageStream 48620 }); 48621 image.imageStream = image.smaskStream = null; 48622 } 48623 promises.push(StampAnnotation.createNewAnnotation(xref, annotation, changes, { 48624 image 48625 })); 48626 break; 48627 } 48628 } 48629 return { 48630 annotations: await Promise.all(promises) 48631 }; 48632 } 48633 static async printNewAnnotations(annotationGlobals, evaluator, task, annotations, imagePromises) { 48634 if (!annotations) { 48635 return null; 48636 } 48637 const { 48638 options, 48639 xref 48640 } = evaluator; 48641 const promises = []; 48642 for (const annotation of annotations) { 48643 if (annotation.deleted) { 48644 continue; 48645 } 48646 switch (annotation.annotationType) { 48647 case AnnotationEditorType.FREETEXT: 48648 promises.push(FreeTextAnnotation.createNewPrintAnnotation(annotationGlobals, xref, annotation, { 48649 evaluator, 48650 task, 48651 evaluatorOptions: options 48652 })); 48653 break; 48654 case AnnotationEditorType.HIGHLIGHT: 48655 if (annotation.quadPoints) { 48656 promises.push(HighlightAnnotation.createNewPrintAnnotation(annotationGlobals, xref, annotation, { 48657 evaluatorOptions: options 48658 })); 48659 } else { 48660 promises.push(InkAnnotation.createNewPrintAnnotation(annotationGlobals, xref, annotation, { 48661 evaluatorOptions: options 48662 })); 48663 } 48664 break; 48665 case AnnotationEditorType.INK: 48666 promises.push(InkAnnotation.createNewPrintAnnotation(annotationGlobals, xref, annotation, { 48667 evaluatorOptions: options 48668 })); 48669 break; 48670 case AnnotationEditorType.STAMP: 48671 const image = options.isOffscreenCanvasSupported ? await imagePromises?.get(annotation.bitmapId) : null; 48672 if (image?.imageStream) { 48673 const { 48674 imageStream, 48675 smaskStream 48676 } = image; 48677 if (smaskStream) { 48678 imageStream.dict.set("SMask", smaskStream); 48679 } 48680 image.imageRef = new JpegStream(imageStream, imageStream.length); 48681 image.imageStream = image.smaskStream = null; 48682 } 48683 promises.push(StampAnnotation.createNewPrintAnnotation(annotationGlobals, xref, annotation, { 48684 image, 48685 evaluatorOptions: options 48686 })); 48687 break; 48688 } 48689 } 48690 return Promise.all(promises); 48691 } 48692} 48693function getRgbColor(color, defaultColor = new Uint8ClampedArray(3)) { 48694 if (!Array.isArray(color)) { 48695 return defaultColor; 48696 } 48697 const rgbColor = defaultColor || new Uint8ClampedArray(3); 48698 switch (color.length) { 48699 case 0: 48700 return null; 48701 case 1: 48702 ColorSpace.singletons.gray.getRgbItem(color, 0, rgbColor, 0); 48703 return rgbColor; 48704 case 3: 48705 ColorSpace.singletons.rgb.getRgbItem(color, 0, rgbColor, 0); 48706 return rgbColor; 48707 case 4: 48708 ColorSpace.singletons.cmyk.getRgbItem(color, 0, rgbColor, 0); 48709 return rgbColor; 48710 default: 48711 return defaultColor; 48712 } 48713} 48714function getPdfColorArray(color) { 48715 return Array.from(color, c => c / 255); 48716} 48717function getQuadPoints(dict, rect) { 48718 const quadPoints = dict.getArray("QuadPoints"); 48719 if (!isNumberArray(quadPoints, null) || quadPoints.length === 0 || quadPoints.length % 8 > 0) { 48720 return null; 48721 } 48722 const newQuadPoints = new Float32Array(quadPoints.length); 48723 for (let i = 0, ii = quadPoints.length; i < ii; i += 8) { 48724 const [x1, y1, x2, y2, x3, y3, x4, y4] = quadPoints.slice(i, i + 8); 48725 const minX = Math.min(x1, x2, x3, x4); 48726 const maxX = Math.max(x1, x2, x3, x4); 48727 const minY = Math.min(y1, y2, y3, y4); 48728 const maxY = Math.max(y1, y2, y3, y4); 48729 if (rect !== null && (minX < rect[0] || maxX > rect[2] || minY < rect[1] || maxY > rect[3])) { 48730 return null; 48731 } 48732 newQuadPoints.set([minX, maxY, maxX, maxY, minX, minY, maxX, minY], i); 48733 } 48734 return newQuadPoints; 48735} 48736function getTransformMatrix(rect, bbox, matrix) { 48737 const [minX, minY, maxX, maxY] = Util.getAxialAlignedBoundingBox(bbox, matrix)
vendor: 9,823 bytes, lines 48737-49048
48737; 48738 if (minX === maxX || minY === maxY) { 48739 return [1, 0, 0, 1, rect[0], rect[1]]; 48740 } 48741 const xRatio = (rect[2] - rect[0]) / (maxX - minX); 48742 const yRatio = (rect[3] - rect[1]) / (maxY - minY); 48743 return [xRatio, 0, 0, yRatio, rect[0] - minX * xRatio, rect[1] - minY * yRatio]; 48744} 48745class Annotation { 48746 constructor(params) { 48747 const { 48748 dict, 48749 xref, 48750 annotationGlobals, 48751 ref, 48752 orphanFields 48753 } = params; 48754 const parentRef = orphanFields?.get(ref); 48755 if (parentRef) { 48756 dict.set("Parent", parentRef); 48757 } 48758 this.setTitle(dict.get("T")); 48759 this.setContents(dict.get("Contents")); 48760 this.setModificationDate(dict.get("M")); 48761 this.setFlags(dict.get("F")); 48762 this.setRectangle(dict.getArray("Rect")); 48763 this.setColor(dict.getArray("C")); 48764 this.setBorderStyle(dict); 48765 this.setAppearance(dict); 48766 this.setOptionalContent(dict); 48767 const MK = dict.get("MK"); 48768 this.setBorderAndBackgroundColors(MK); 48769 this.setRotation(MK, dict); 48770 this.ref = params.ref instanceof Ref ? params.ref : null; 48771 this._streams = []; 48772 if (this.appearance) { 48773 this._streams.push(this.appearance); 48774 } 48775 const isLocked = !!(this.flags & AnnotationFlag.LOCKED); 48776 const isContentLocked = !!(this.flags & AnnotationFlag.LOCKEDCONTENTS); 48777 this.data = { 48778 annotationFlags: this.flags, 48779 borderStyle: this.borderStyle, 48780 color: this.color, 48781 backgroundColor: this.backgroundColor, 48782 borderColor: this.borderColor, 48783 rotation: this.rotation, 48784 contentsObj: this._contents, 48785 hasAppearance: !!this.appearance, 48786 id: params.id, 48787 modificationDate: this.modificationDate, 48788 rect: this.rectangle, 48789 subtype: params.subtype, 48790 hasOwnCanvas: false, 48791 noRotate: !!(this.flags & AnnotationFlag.NOROTATE), 48792 noHTML: isLocked && isContentLocked, 48793 isEditable: false, 48794 structParent: -1 48795 }; 48796 if (annotationGlobals.structTreeRoot) { 48797 let structParent = dict.get("StructParent"); 48798 this.data.structParent = structParent = Number.isInteger(structParent) && structParent >= 0 ? structParent : -1; 48799 annotationGlobals.structTreeRoot.addAnnotationIdToPage(params.pageRef, structParent); 48800 } 48801 if (params.collectFields) { 48802 const kids = dict.get("Kids"); 48803 if (Array.isArray(kids)) { 48804 const kidIds = []; 48805 for (const kid of kids) { 48806 if (kid instanceof Ref) { 48807 kidIds.push(kid.toString()); 48808 } 48809 } 48810 if (kidIds.length !== 0) { 48811 this.data.kidIds = kidIds; 48812 } 48813 } 48814 this.data.actions = collectActions(xref, dict, AnnotationActionEventType); 48815 this.data.fieldName = this._constructFieldName(dict); 48816 this.data.pageIndex = params.pageIndex; 48817 } 48818 const it = dict.get("IT"); 48819 if (it instanceof Name) { 48820 this.data.it = it.name; 48821 } 48822 this._isOffscreenCanvasSupported = params.evaluatorOptions.isOffscreenCanvasSupported; 48823 this._fallbackFontDict = null; 48824 this._needAppearances = false; 48825 } 48826 _hasFlag(flags, flag) { 48827 return !!(flags & flag); 48828 } 48829 _buildFlags(noView, noPrint) { 48830 let { 48831 flags 48832 } = this; 48833 if (noView === undefined) { 48834 if (noPrint === undefined) { 48835 return undefined; 48836 } 48837 if (noPrint) { 48838 return flags & ~AnnotationFlag.PRINT; 48839 } 48840 return flags & ~AnnotationFlag.HIDDEN | AnnotationFlag.PRINT; 48841 } 48842 if (noView) { 48843 flags |= AnnotationFlag.PRINT; 48844 if (noPrint) { 48845 return flags & ~AnnotationFlag.NOVIEW | AnnotationFlag.HIDDEN; 48846 } 48847 return flags & ~AnnotationFlag.HIDDEN | AnnotationFlag.NOVIEW; 48848 } 48849 flags &= ~(AnnotationFlag.HIDDEN | AnnotationFlag.NOVIEW); 48850 if (noPrint) { 48851 return flags & ~AnnotationFlag.PRINT; 48852 } 48853 return flags | AnnotationFlag.PRINT; 48854 } 48855 _isViewable(flags) { 48856 return !this._hasFlag(flags, AnnotationFlag.INVISIBLE) && !this._hasFlag(flags, AnnotationFlag.NOVIEW); 48857 } 48858 _isPrintable(flags) { 48859 return this._hasFlag(flags, AnnotationFlag.PRINT) && !this._hasFlag(flags, AnnotationFlag.HIDDEN) && !this._hasFlag(flags, AnnotationFlag.INVISIBLE); 48860 } 48861 mustBeViewed(annotationStorage, _renderForms) { 48862 const noView = annotationStorage?.get(this.data.id)?.noView; 48863 if (noView !== undefined) { 48864 return !noView; 48865 } 48866 return this.viewable && !this._hasFlag(this.flags, AnnotationFlag.HIDDEN); 48867 } 48868 mustBePrinted(annotationStorage) { 48869 const noPrint = annotationStorage?.get(this.data.id)?.noPrint; 48870 if (noPrint !== undefined) { 48871 return !noPrint; 48872 } 48873 return this.printable; 48874 } 48875 mustBeViewedWhenEditing(isEditing, modifiedIds = null) { 48876 return isEditing ? !this.data.isEditable : !modifiedIds?.has(this.data.id); 48877 } 48878 get viewable() { 48879 if (this.data.quadPoints === null) { 48880 return false; 48881 } 48882 if (this.flags === 0) { 48883 return true; 48884 } 48885 return this._isViewable(this.flags); 48886 } 48887 get printable() { 48888 if (this.data.quadPoints === null) { 48889 return false; 48890 } 48891 if (this.flags === 0) { 48892 return false; 48893 } 48894 return this._isPrintable(this.flags); 48895 } 48896 _parseStringHelper(data) { 48897 const str = typeof data === "string" ? stringToPDFString(data) : ""; 48898 const dir = str && bidi(str).dir === "rtl" ? "rtl" : "ltr"; 48899 return { 48900 str, 48901 dir 48902 }; 48903 } 48904 setDefaultAppearance(params) { 48905 const { 48906 dict, 48907 annotationGlobals 48908 } = params; 48909 const defaultAppearance = getInheritableProperty({ 48910 dict, 48911 key: "DA" 48912 }) || annotationGlobals.acroForm.get("DA"); 48913 this._defaultAppearance = typeof defaultAppearance === "string" ? defaultAppearance : ""; 48914 this.data.defaultAppearanceData = parseDefaultAppearance(this._defaultAppearance); 48915 } 48916 setTitle(title) { 48917 this._title = this._parseStringHelper(title); 48918 } 48919 setContents(contents) { 48920 this._contents = this._parseStringHelper(contents); 48921 } 48922 setModificationDate(modificationDate) { 48923 this.modificationDate = typeof modificationDate === "string" ? modificationDate : null; 48924 } 48925 setFlags(flags) { 48926 this.flags = Number.isInteger(flags) && flags > 0 ? flags : 0; 48927 if (this.flags & AnnotationFlag.INVISIBLE && this.constructor.name !== "Annotation") { 48928 this.flags ^= AnnotationFlag.INVISIBLE; 48929 } 48930 } 48931 hasFlag(flag) { 48932 return this._hasFlag(this.flags, flag); 48933 } 48934 setRectangle(rectangle) { 48935 this.rectangle = lookupNormalRect(rectangle, [0, 0, 0, 0]); 48936 } 48937 setColor(color) { 48938 this.color = getRgbColor(color); 48939 } 48940 setLineEndings(lineEndings) { 48941 this.lineEndings = ["None", "None"]; 48942 if (Array.isArray(lineEndings) && lineEndings.length === 2) { 48943 for (let i = 0; i < 2; i++) { 48944 const obj = lineEndings[i]; 48945 if (obj instanceof Name) { 48946 switch (obj.name) { 48947 case "None": 48948 continue; 48949 case "Square": 48950 case "Circle": 48951 case "Diamond": 48952 case "OpenArrow": 48953 case "ClosedArrow": 48954 case "Butt": 48955 case "ROpenArrow": 48956 case "RClosedArrow": 48957 case "Slash": 48958 this.lineEndings[i] = obj.name; 48959 continue; 48960 } 48961 } 48962 warn(`Ignoring invalid lineEnding: ${obj}`); 48963 } 48964 } 48965 } 48966 setRotation(mk, dict) { 48967 this.rotation = 0; 48968 let angle = mk instanceof Dict ? mk.get("R") || 0 : dict.get("Rotate") || 0; 48969 if (Number.isInteger(angle) && angle !== 0) { 48970 angle %= 360; 48971 if (angle < 0) { 48972 angle += 360; 48973 } 48974 if (angle % 90 === 0) { 48975 this.rotation = angle; 48976 } 48977 } 48978 } 48979 setBorderAndBackgroundColors(mk) { 48980 if (mk instanceof Dict) { 48981 this.borderColor = getRgbColor(mk.getArray("BC"), null); 48982 this.backgroundColor = getRgbColor(mk.getArray("BG"), null); 48983 } else { 48984 this.borderColor = this.backgroundColor = null; 48985 } 48986 } 48987 setBorderStyle(borderStyle) { 48988 this.borderStyle = new AnnotationBorderStyle(); 48989 if (!(borderStyle instanceof Dict)) { 48990 return; 48991 } 48992 if (borderStyle.has("BS")) { 48993 const dict = borderStyle.get("BS"); 48994 if (dict instanceof Dict) { 48995 const dictType = dict.get("Type"); 48996 if (!dictType || isName(dictType, "Border")) { 48997 this.borderStyle.setWidth(dict.get("W"), this.rectangle); 48998 this.borderStyle.setStyle(dict.get("S")); 48999 this.borderStyle.setDashArray(dict.getArray("D")); 49000 } 49001 } 49002 } else if (borderStyle.has("Border")) { 49003 const array = borderStyle.getArray("Border"); 49004 if (Array.isArray(array) && array.length >= 3) { 49005 this.borderStyle.setHorizontalCornerRadius(array[0]); 49006 this.borderStyle.setVerticalCornerRadius(array[1]); 49007 this.borderStyle.setWidth(array[2], this.rectangle); 49008 if (array.length === 4) { 49009 this.borderStyle.setDashArray(array[3], true); 49010 } 49011 } 49012 } else { 49013 this.borderStyle.setWidth(0); 49014 } 49015 } 49016 setAppearance(dict) { 49017 this.appearance = null; 49018 const appearanceStates = dict.get("AP"); 49019 if (!(appearanceStates instanceof Dict)) { 49020 return; 49021 } 49022 const normalAppearanceState = appearanceStates.get("N"); 49023 if (normalAppearanceState instanceof BaseStream) { 49024 this.appearance = normalAppearanceState; 49025 return; 49026 } 49027 if (!(normalAppearanceState instanceof Dict)) { 49028 return; 49029 } 49030 const as = dict.get("AS"); 49031 if (!(as instanceof Name) || !normalAppearanceState.has(as.name)) { 49032 return; 49033 } 49034 const appearance = normalAppearanceState.get(as.name); 49035 if (appearance instanceof BaseStream) { 49036 this.appearance = appearance; 49037 } 49038 } 49039 setOptionalContent(dict) { 49040 this.oc = null; 49041 const oc = dict.get("OC"); 49042 if (oc instanceof Name) { 49043 warn("setOptionalContent: Support for /Name-entry is not implemented."); 49044 } else if (oc instanceof Dict) { 49045 this.oc = oc; 49046 } 49047 } 49048
vendor: 87,222 bytes, lines 49048-51559
49048loadResources(keys, appearance) { 49049 return appearance.dict.getAsync("Resources").then(resources => { 49050 if (!resources) { 49051 return undefined; 49052 } 49053 const objectLoader = new ObjectLoader(resources, keys, resources.xref); 49054 return objectLoader.load().then(function () { 49055 return resources; 49056 }); 49057 }); 49058 } 49059 async getOperatorList(evaluator, task, intent, annotationStorage) { 49060 const { 49061 hasOwnCanvas, 49062 id, 49063 rect 49064 } = this.data; 49065 let appearance = this.appearance; 49066 const isUsingOwnCanvas = !!(hasOwnCanvas && intent & RenderingIntentFlag.DISPLAY); 49067 if (isUsingOwnCanvas && (rect[0] === rect[2] || rect[1] === rect[3])) { 49068 this.data.hasOwnCanvas = false; 49069 return { 49070 opList: new OperatorList(), 49071 separateForm: false, 49072 separateCanvas: false 49073 }; 49074 } 49075 if (!appearance) { 49076 if (!isUsingOwnCanvas) { 49077 return { 49078 opList: new OperatorList(), 49079 separateForm: false, 49080 separateCanvas: false 49081 }; 49082 } 49083 appearance = new StringStream(""); 49084 appearance.dict = new Dict(); 49085 } 49086 const appearanceDict = appearance.dict; 49087 const resources = await this.loadResources(["ExtGState", "ColorSpace", "Pattern", "Shading", "XObject", "Font"], appearance); 49088 const bbox = lookupRect(appearanceDict.getArray("BBox"), [0, 0, 1, 1]); 49089 const matrix = lookupMatrix(appearanceDict.getArray("Matrix"), IDENTITY_MATRIX); 49090 const transform = getTransformMatrix(rect, bbox, matrix); 49091 const opList = new OperatorList(); 49092 let optionalContent; 49093 if (this.oc) { 49094 optionalContent = await evaluator.parseMarkedContentProps(this.oc, null); 49095 } 49096 if (optionalContent !== undefined) { 49097 opList.addOp(OPS.beginMarkedContentProps, ["OC", optionalContent]); 49098 } 49099 opList.addOp(OPS.beginAnnotation, [id, rect, transform, matrix, isUsingOwnCanvas]); 49100 await evaluator.getOperatorList({ 49101 stream: appearance, 49102 task, 49103 resources, 49104 operatorList: opList, 49105 fallbackFontDict: this._fallbackFontDict 49106 }); 49107 opList.addOp(OPS.endAnnotation, []); 49108 if (optionalContent !== undefined) { 49109 opList.addOp(OPS.endMarkedContent, []); 49110 } 49111 this.reset(); 49112 return { 49113 opList, 49114 separateForm: false, 49115 separateCanvas: isUsingOwnCanvas 49116 }; 49117 } 49118 async save(evaluator, task, annotationStorage, changes) { 49119 return null; 49120 } 49121 get hasTextContent() { 49122 return false; 49123 } 49124 async extractTextContent(evaluator, task, viewBox) { 49125 if (!this.appearance) { 49126 return; 49127 } 49128 const resources = await this.loadResources(["ExtGState", "Font", "Properties", "XObject"], this.appearance); 49129 const text = []; 49130 const buffer = []; 49131 let firstPosition = null; 49132 const sink = { 49133 desiredSize: Math.Infinity, 49134 ready: true, 49135 enqueue(chunk, size) { 49136 for (const item of chunk.items) { 49137 if (item.str === undefined) { 49138 continue; 49139 } 49140 firstPosition ||= item.transform.slice(-2); 49141 buffer.push(item.str); 49142 if (item.hasEOL) { 49143 text.push(buffer.join("").trimEnd()); 49144 buffer.length = 0; 49145 } 49146 } 49147 } 49148 }; 49149 await evaluator.getTextContent({ 49150 stream: this.appearance, 49151 task, 49152 resources, 49153 includeMarkedContent: true, 49154 keepWhiteSpace: true, 49155 sink, 49156 viewBox 49157 }); 49158 this.reset(); 49159 if (buffer.length) { 49160 text.push(buffer.join("").trimEnd()); 49161 } 49162 if (text.length > 1 || text[0]) { 49163 const appearanceDict = this.appearance.dict; 49164 const bbox = lookupRect(appearanceDict.getArray("BBox"), null); 49165 const matrix = lookupMatrix(appearanceDict.getArray("Matrix"), null); 49166 this.data.textPosition = this._transformPoint(firstPosition, bbox, matrix); 49167 this.data.textContent = text; 49168 } 49169 } 49170 _transformPoint(coords, bbox, matrix) { 49171 const { 49172 rect 49173 } = this.data; 49174 bbox ||= [0, 0, 1, 1]; 49175 matrix ||= [1, 0, 0, 1, 0, 0]; 49176 const transform = getTransformMatrix(rect, bbox, matrix); 49177 transform[4] -= rect[0]; 49178 transform[5] -= rect[1]; 49179 coords = Util.applyTransform(coords, transform); 49180 return Util.applyTransform(coords, matrix); 49181 } 49182 getFieldObject() { 49183 if (this.data.kidIds) { 49184 return { 49185 id: this.data.id, 49186 actions: this.data.actions, 49187 name: this.data.fieldName, 49188 strokeColor: this.data.borderColor, 49189 fillColor: this.data.backgroundColor, 49190 type: "", 49191 kidIds: this.data.kidIds, 49192 page: this.data.pageIndex, 49193 rotation: this.rotation 49194 }; 49195 } 49196 return null; 49197 } 49198 reset() { 49199 for (const stream of this._streams) { 49200 stream.reset(); 49201 } 49202 } 49203 _constructFieldName(dict) { 49204 if (!dict.has("T") && !dict.has("Parent")) { 49205 warn("Unknown field name, falling back to empty field name."); 49206 return ""; 49207 } 49208 if (!dict.has("Parent")) { 49209 return stringToPDFString(dict.get("T")); 49210 } 49211 const fieldName = []; 49212 if (dict.has("T")) { 49213 fieldName.unshift(stringToPDFString(dict.get("T"))); 49214 } 49215 let loopDict = dict; 49216 const visited = new RefSet(); 49217 if (dict.objId) { 49218 visited.put(dict.objId); 49219 } 49220 while (loopDict.has("Parent")) { 49221 loopDict = loopDict.get("Parent"); 49222 if (!(loopDict instanceof Dict) || loopDict.objId && visited.has(loopDict.objId)) { 49223 break; 49224 } 49225 if (loopDict.objId) { 49226 visited.put(loopDict.objId); 49227 } 49228 if (loopDict.has("T")) { 49229 fieldName.unshift(stringToPDFString(loopDict.get("T"))); 49230 } 49231 } 49232 return fieldName.join("."); 49233 } 49234} 49235class AnnotationBorderStyle { 49236 constructor() { 49237 this.width = 1; 49238 this.rawWidth = 1; 49239 this.style = AnnotationBorderStyleType.SOLID; 49240 this.dashArray = [3]; 49241 this.horizontalCornerRadius = 0; 49242 this.verticalCornerRadius = 0; 49243 } 49244 setWidth(width, rect = [0, 0, 0, 0]) { 49245 if (width instanceof Name) { 49246 this.width = 0; 49247 return; 49248 } 49249 if (typeof width === "number") { 49250 if (width > 0) { 49251 this.rawWidth = width; 49252 const maxWidth = (rect[2] - rect[0]) / 2; 49253 const maxHeight = (rect[3] - rect[1]) / 2; 49254 if (maxWidth > 0 && maxHeight > 0 && (width > maxWidth || width > maxHeight)) { 49255 warn(`AnnotationBorderStyle.setWidth - ignoring width: ${width}`); 49256 width = 1; 49257 } 49258 } 49259 this.width = width; 49260 } 49261 } 49262 setStyle(style) { 49263 if (!(style instanceof Name)) { 49264 return; 49265 } 49266 switch (style.name) { 49267 case "S": 49268 this.style = AnnotationBorderStyleType.SOLID; 49269 break; 49270 case "D": 49271 this.style = AnnotationBorderStyleType.DASHED; 49272 break; 49273 case "B": 49274 this.style = AnnotationBorderStyleType.BEVELED; 49275 break; 49276 case "I": 49277 this.style = AnnotationBorderStyleType.INSET; 49278 break; 49279 case "U": 49280 this.style = AnnotationBorderStyleType.UNDERLINE; 49281 break; 49282 default: 49283 break; 49284 } 49285 } 49286 setDashArray(dashArray, forceStyle = false) { 49287 if (Array.isArray(dashArray)) { 49288 let isValid = true; 49289 let allZeros = true; 49290 for (const element of dashArray) { 49291 const validNumber = +element >= 0; 49292 if (!validNumber) { 49293 isValid = false; 49294 break; 49295 } else if (element > 0) { 49296 allZeros = false; 49297 } 49298 } 49299 if (dashArray.length === 0 || isValid && !allZeros) { 49300 this.dashArray = dashArray; 49301 if (forceStyle) { 49302 this.setStyle(Name.get("D")); 49303 } 49304 } else { 49305 this.width = 0; 49306 } 49307 } else if (dashArray) { 49308 this.width = 0; 49309 } 49310 } 49311 setHorizontalCornerRadius(radius) { 49312 if (Number.isInteger(radius)) { 49313 this.horizontalCornerRadius = radius; 49314 } 49315 } 49316 setVerticalCornerRadius(radius) { 49317 if (Number.isInteger(radius)) { 49318 this.verticalCornerRadius = radius; 49319 } 49320 } 49321} 49322class MarkupAnnotation extends Annotation { 49323 constructor(params) { 49324 super(params); 49325 const { 49326 dict 49327 } = params; 49328 if (dict.has("IRT")) { 49329 const rawIRT = dict.getRaw("IRT"); 49330 this.data.inReplyTo = rawIRT instanceof Ref ? rawIRT.toString() : null; 49331 const rt = dict.get("RT"); 49332 this.data.replyType = rt instanceof Name ? rt.name : AnnotationReplyType.REPLY; 49333 } 49334 let popupRef = null; 49335 if (this.data.replyType === AnnotationReplyType.GROUP) { 49336 const parent = dict.get("IRT"); 49337 this.setTitle(parent.get("T")); 49338 this.data.titleObj = this._title; 49339 this.setContents(parent.get("Contents")); 49340 this.data.contentsObj = this._contents; 49341 if (!parent.has("CreationDate")) { 49342 this.data.creationDate = null; 49343 } else { 49344 this.setCreationDate(parent.get("CreationDate")); 49345 this.data.creationDate = this.creationDate; 49346 } 49347 if (!parent.has("M")) { 49348 this.data.modificationDate = null; 49349 } else { 49350 this.setModificationDate(parent.get("M")); 49351 this.data.modificationDate = this.modificationDate; 49352 } 49353 popupRef = parent.getRaw("Popup"); 49354 if (!parent.has("C")) { 49355 this.data.color = null; 49356 } else { 49357 this.setColor(parent.getArray("C")); 49358 this.data.color = this.color; 49359 } 49360 } else { 49361 this.data.titleObj = this._title; 49362 this.setCreationDate(dict.get("CreationDate")); 49363 this.data.creationDate = this.creationDate; 49364 popupRef = dict.getRaw("Popup"); 49365 if (!dict.has("C")) { 49366 this.data.color = null; 49367 } 49368 } 49369 this.data.popupRef = popupRef instanceof Ref ? popupRef.toString() : null; 49370 if (dict.has("RC")) { 49371 this.data.richText = XFAFactory.getRichTextAsHtml(dict.get("RC")); 49372 } 49373 } 49374 setCreationDate(creationDate) { 49375 this.creationDate = typeof creationDate === "string" ? creationDate : null; 49376 } 49377 _setDefaultAppearance({ 49378 xref, 49379 extra, 49380 strokeColor, 49381 fillColor, 49382 blendMode, 49383 strokeAlpha, 49384 fillAlpha, 49385 pointsCallback 49386 }) { 49387 let minX = Number.MAX_VALUE; 49388 let minY = Number.MAX_VALUE; 49389 let maxX = Number.MIN_VALUE; 49390 let maxY = Number.MIN_VALUE; 49391 const buffer = ["q"]; 49392 if (extra) { 49393 buffer.push(extra); 49394 } 49395 if (strokeColor) { 49396 buffer.push(`${strokeColor[0]} ${strokeColor[1]} ${strokeColor[2]} RG`); 49397 } 49398 if (fillColor) { 49399 buffer.push(`${fillColor[0]} ${fillColor[1]} ${fillColor[2]} rg`); 49400 } 49401 const pointsArray = this.data.quadPoints || Float32Array.from([this.rectangle[0], this.rectangle[3], this.rectangle[2], this.rectangle[3], this.rectangle[0], this.rectangle[1], this.rectangle[2], this.rectangle[1]]); 49402 for (let i = 0, ii = pointsArray.length; i < ii; i += 8) { 49403 const [mX, MX, mY, MY] = pointsCallback(buffer, pointsArray.subarray(i, i + 8)); 49404 minX = Math.min(minX, mX); 49405 maxX = Math.max(maxX, MX); 49406 minY = Math.min(minY, mY); 49407 maxY = Math.max(maxY, MY); 49408 } 49409 buffer.push("Q"); 49410 const formDict = new Dict(xref); 49411 const appearanceStreamDict = new Dict(xref); 49412 appearanceStreamDict.set("Subtype", Name.get("Form")); 49413 const appearanceStream = new StringStream(buffer.join(" ")); 49414 appearanceStream.dict = appearanceStreamDict; 49415 formDict.set("Fm0", appearanceStream); 49416 const gsDict = new Dict(xref); 49417 if (blendMode) { 49418 gsDict.set("BM", Name.get(blendMode)); 49419 } 49420 if (typeof strokeAlpha === "number") { 49421 gsDict.set("CA", strokeAlpha); 49422 } 49423 if (typeof fillAlpha === "number") { 49424 gsDict.set("ca", fillAlpha); 49425 } 49426 const stateDict = new Dict(xref); 49427 stateDict.set("GS0", gsDict); 49428 const resources = new Dict(xref); 49429 resources.set("ExtGState", stateDict); 49430 resources.set("XObject", formDict); 49431 const appearanceDict = new Dict(xref); 49432 appearanceDict.set("Resources", resources); 49433 const bbox = this.data.rect = [minX, minY, maxX, maxY]; 49434 appearanceDict.set("BBox", bbox); 49435 this.appearance = new StringStream("/GS0 gs /Fm0 Do"); 49436 this.appearance.dict = appearanceDict; 49437 this._streams.push(this.appearance, appearanceStream); 49438 } 49439 static async createNewAnnotation(xref, annotation, changes, params) { 49440 const annotationRef = annotation.ref ||= xref.getNewTemporaryRef(); 49441 const ap = await this.createNewAppearanceStream(annotation, xref, params); 49442 let annotationDict; 49443 if (ap) { 49444 const apRef = xref.getNewTemporaryRef(); 49445 annotationDict = this.createNewDict(annotation, xref, { 49446 apRef 49447 }); 49448 changes.put(apRef, { 49449 data: ap 49450 }); 49451 } else { 49452 annotationDict = this.createNewDict(annotation, xref, {}); 49453 } 49454 if (Number.isInteger(annotation.parentTreeId)) { 49455 annotationDict.set("StructParent", annotation.parentTreeId); 49456 } 49457 changes.put(annotationRef, { 49458 data: annotationDict 49459 }); 49460 return { 49461 ref: annotationRef 49462 }; 49463 } 49464 static async createNewPrintAnnotation(annotationGlobals, xref, annotation, params) { 49465 const ap = await this.createNewAppearanceStream(annotation, xref, params); 49466 const annotationDict = this.createNewDict(annotation, xref, ap ? { 49467 ap 49468 } : {}); 49469 const newAnnotation = new this.prototype.constructor({ 49470 dict: annotationDict, 49471 xref, 49472 annotationGlobals, 49473 evaluatorOptions: params.evaluatorOptions 49474 }); 49475 if (annotation.ref) { 49476 newAnnotation.ref = newAnnotation.refToReplace = annotation.ref; 49477 } 49478 return newAnnotation; 49479 } 49480} 49481class WidgetAnnotation extends Annotation { 49482 constructor(params) { 49483 super(params); 49484 const { 49485 dict, 49486 xref, 49487 annotationGlobals 49488 } = params; 49489 const data = this.data; 49490 this._needAppearances = params.needAppearances; 49491 data.annotationType = AnnotationType.WIDGET; 49492 if (data.fieldName === undefined) { 49493 data.fieldName = this._constructFieldName(dict); 49494 } 49495 if (data.actions === undefined) { 49496 data.actions = collectActions(xref, dict, AnnotationActionEventType); 49497 } 49498 let fieldValue = getInheritableProperty({ 49499 dict, 49500 key: "V", 49501 getArray: true 49502 }); 49503 data.fieldValue = this._decodeFormValue(fieldValue); 49504 const defaultFieldValue = getInheritableProperty({ 49505 dict, 49506 key: "DV", 49507 getArray: true 49508 }); 49509 data.defaultFieldValue = this._decodeFormValue(defaultFieldValue); 49510 if (fieldValue === undefined && annotationGlobals.xfaDatasets) { 49511 const path = this._title.str; 49512 if (path) { 49513 this._hasValueFromXFA = true; 49514 data.fieldValue = fieldValue = annotationGlobals.xfaDatasets.getValue(path); 49515 } 49516 } 49517 if (fieldValue === undefined && data.defaultFieldValue !== null) { 49518 data.fieldValue = data.defaultFieldValue; 49519 } 49520 data.alternativeText = stringToPDFString(dict.get("TU") || ""); 49521 this.setDefaultAppearance(params); 49522 data.hasAppearance ||= this._needAppearances && data.fieldValue !== undefined && data.fieldValue !== null; 49523 const fieldType = getInheritableProperty({ 49524 dict, 49525 key: "FT" 49526 }); 49527 data.fieldType = fieldType instanceof Name ? fieldType.name : null; 49528 const localResources = getInheritableProperty({ 49529 dict, 49530 key: "DR" 49531 }); 49532 const acroFormResources = annotationGlobals.acroForm.get("DR"); 49533 const appearanceResources = this.appearance?.dict.get("Resources"); 49534 this._fieldResources = { 49535 localResources, 49536 acroFormResources, 49537 appearanceResources, 49538 mergedResources: Dict.merge({ 49539 xref, 49540 dictArray: [localResources, appearanceResources, acroFormResources], 49541 mergeSubDicts: true 49542 }) 49543 }; 49544 data.fieldFlags = getInheritableProperty({ 49545 dict, 49546 key: "Ff" 49547 }); 49548 if (!Number.isInteger(data.fieldFlags) || data.fieldFlags < 0) { 49549 data.fieldFlags = 0; 49550 } 49551 data.readOnly = this.hasFieldFlag(AnnotationFieldFlag.READONLY); 49552 data.required = this.hasFieldFlag(AnnotationFieldFlag.REQUIRED); 49553 data.hidden = this._hasFlag(data.annotationFlags, AnnotationFlag.HIDDEN) || this._hasFlag(data.annotationFlags, AnnotationFlag.NOVIEW); 49554 } 49555 _decodeFormValue(formValue) { 49556 if (Array.isArray(formValue)) { 49557 return formValue.filter(item => typeof item === "string").map(item => stringToPDFString(item)); 49558 } else if (formValue instanceof Name) { 49559 return stringToPDFString(formValue.name); 49560 } else if (typeof formValue === "string") { 49561 return stringToPDFString(formValue); 49562 } 49563 return null; 49564 } 49565 hasFieldFlag(flag) { 49566 return !!(this.data.fieldFlags & flag); 49567 } 49568 _isViewable(flags) { 49569 return true; 49570 } 49571 mustBeViewed(annotationStorage, renderForms) { 49572 if (renderForms) { 49573 return this.viewable; 49574 } 49575 return super.mustBeViewed(annotationStorage, renderForms) && !this._hasFlag(this.flags, AnnotationFlag.NOVIEW); 49576 } 49577 getRotationMatrix(annotationStorage) { 49578 let rotation = annotationStorage?.get(this.data.id)?.rotation; 49579 if (rotation === undefined) { 49580 rotation = this.rotation; 49581 } 49582 if (rotation === 0) { 49583 return IDENTITY_MATRIX; 49584 } 49585 const width = this.data.rect[2] - this.data.rect[0]; 49586 const height = this.data.rect[3] - this.data.rect[1]; 49587 return getRotationMatrix(rotation, width, height); 49588 } 49589 getBorderAndBackgroundAppearances(annotationStorage) { 49590 let rotation = annotationStorage?.get(this.data.id)?.rotation; 49591 if (rotation === undefined) { 49592 rotation = this.rotation; 49593 } 49594 if (!this.backgroundColor && !this.borderColor) { 49595 return ""; 49596 } 49597 const width = this.data.rect[2] - this.data.rect[0]; 49598 const height = this.data.rect[3] - this.data.rect[1]; 49599 const rect = rotation === 0 || rotation === 180 ? `0 0 ${width} ${height} re` : `0 0 ${height} ${width} re`; 49600 let str = ""; 49601 if (this.backgroundColor) { 49602 str = `${getPdfColor(this.backgroundColor, true)} ${rect} f `; 49603 } 49604 if (this.borderColor) { 49605 const borderWidth = this.borderStyle.width || 1; 49606 str += `${borderWidth} w ${getPdfColor(this.borderColor, false)} ${rect} S `; 49607 } 49608 return str; 49609 } 49610 async getOperatorList(evaluator, task, intent, annotationStorage) { 49611 if (intent & RenderingIntentFlag.ANNOTATIONS_FORMS && !(this instanceof SignatureWidgetAnnotation) && !this.data.noHTML && !this.data.hasOwnCanvas) { 49612 return { 49613 opList: new OperatorList(), 49614 separateForm: true, 49615 separateCanvas: false 49616 }; 49617 } 49618 if (!this._hasText) { 49619 return super.getOperatorList(evaluator, task, intent, annotationStorage); 49620 } 49621 const content = await this._getAppearance(evaluator, task, intent, annotationStorage); 49622 if (this.appearance && content === null) { 49623 return super.getOperatorList(evaluator, task, intent, annotationStorage); 49624 } 49625 const opList = new OperatorList(); 49626 if (!this._defaultAppearance || content === null) { 49627 return { 49628 opList, 49629 separateForm: false, 49630 separateCanvas: false 49631 }; 49632 } 49633 const isUsingOwnCanvas = !!(this.data.hasOwnCanvas && intent & RenderingIntentFlag.DISPLAY); 49634 const matrix = [1, 0, 0, 1, 0, 0]; 49635 const bbox = [0, 0, this.data.rect[2] - this.data.rect[0], this.data.rect[3] - this.data.rect[1]]; 49636 const transform = getTransformMatrix(this.data.rect, bbox, matrix); 49637 let optionalContent; 49638 if (this.oc) { 49639 optionalContent = await evaluator.parseMarkedContentProps(this.oc, null); 49640 } 49641 if (optionalContent !== undefined) { 49642 opList.addOp(OPS.beginMarkedContentProps, ["OC", optionalContent]); 49643 } 49644 opList.addOp(OPS.beginAnnotation, [this.data.id, this.data.rect, transform, this.getRotationMatrix(annotationStorage), isUsingOwnCanvas]); 49645 const stream = new StringStream(content); 49646 await evaluator.getOperatorList({ 49647 stream, 49648 task, 49649 resources: this._fieldResources.mergedResources, 49650 operatorList: opList 49651 }); 49652 opList.addOp(OPS.endAnnotation, []); 49653 if (optionalContent !== undefined) { 49654 opList.addOp(OPS.endMarkedContent, []); 49655 } 49656 return { 49657 opList, 49658 separateForm: false, 49659 separateCanvas: isUsingOwnCanvas 49660 }; 49661 } 49662 _getMKDict(rotation) { 49663 const mk = new Dict(null); 49664 if (rotation) { 49665 mk.set("R", rotation); 49666 } 49667 if (this.borderColor) { 49668 mk.set("BC", getPdfColorArray(this.borderColor)); 49669 } 49670 if (this.backgroundColor) { 49671 mk.set("BG", getPdfColorArray(this.backgroundColor)); 49672 } 49673 return mk.size > 0 ? mk : null; 49674 } 49675 amendSavedDict(annotationStorage, dict) {} 49676 setValue(dict, value, xref, changes) { 49677 const { 49678 dict: parentDict, 49679 ref: parentRef 49680 } = getParentToUpdate(dict, this.ref, xref); 49681 if (!parentDict) { 49682 dict.set("V", value); 49683 } else if (!changes.has(parentRef)) { 49684 const newParentDict = parentDict.clone(); 49685 newParentDict.set("V", value); 49686 changes.put(parentRef, { 49687 data: newParentDict 49688 }); 49689 return newParentDict; 49690 } 49691 return null; 49692 } 49693 async save(evaluator, task, annotationStorage, changes) { 49694 const storageEntry = annotationStorage?.get(this.data.id); 49695 const flags = this._buildFlags(storageEntry?.noView, storageEntry?.noPrint); 49696 let value = storageEntry?.value, 49697 rotation = storageEntry?.rotation; 49698 if (value === this.data.fieldValue || value === undefined) { 49699 if (!this._hasValueFromXFA && rotation === undefined && flags === undefined) { 49700 return; 49701 } 49702 value ||= this.data.fieldValue; 49703 } 49704 if (rotation === undefined && !this._hasValueFromXFA && Array.isArray(value) && Array.isArray(this.data.fieldValue) && isArrayEqual(value, this.data.fieldValue) && flags === undefined) { 49705 return; 49706 } 49707 if (rotation === undefined) { 49708 rotation = this.rotation; 49709 } 49710 let appearance = null; 49711 if (!this._needAppearances) { 49712 appearance = await this._getAppearance(evaluator, task, RenderingIntentFlag.SAVE, annotationStorage); 49713 if (appearance === null && flags === undefined) { 49714 return; 49715 } 49716 } else {} 49717 let needAppearances = false; 49718 if (appearance?.needAppearances) { 49719 needAppearances = true; 49720 appearance = null; 49721 } 49722 const { 49723 xref 49724 } = evaluator; 49725 const originalDict = xref.fetchIfRef(this.ref); 49726 if (!(originalDict instanceof Dict)) { 49727 return; 49728 } 49729 const dict = new Dict(xref); 49730 for (const key of originalDict.getKeys()) { 49731 if (key !== "AP") { 49732 dict.set(key, originalDict.getRaw(key)); 49733 } 49734 } 49735 if (flags !== undefined) { 49736 dict.set("F", flags); 49737 if (appearance === null && !needAppearances) { 49738 const ap = originalDict.getRaw("AP"); 49739 if (ap) { 49740 dict.set("AP", ap); 49741 } 49742 } 49743 } 49744 const xfa = { 49745 path: this.data.fieldName, 49746 value 49747 }; 49748 const newParentDict = this.setValue(dict, Array.isArray(value) ? value.map(stringToAsciiOrUTF16BE) : stringToAsciiOrUTF16BE(value), xref, changes); 49749 this.amendSavedDict(annotationStorage, newParentDict || dict); 49750 const maybeMK = this._getMKDict(rotation); 49751 if (maybeMK) { 49752 dict.set("MK", maybeMK); 49753 } 49754 changes.put(this.ref, { 49755 data: dict, 49756 xfa, 49757 needAppearances 49758 }); 49759 if (appearance !== null) { 49760 const newRef = xref.getNewTemporaryRef(); 49761 const AP = new Dict(xref); 49762 dict.set("AP", AP); 49763 AP.set("N", newRef); 49764 const resources = this._getSaveFieldResources(xref); 49765 const appearanceStream = new StringStream(appearance); 49766 const appearanceDict = appearanceStream.dict = new Dict(xref); 49767 appearanceDict.set("Subtype", Name.get("Form")); 49768 appearanceDict.set("Resources", resources); 49769 appearanceDict.set("BBox", [0, 0, this.data.rect[2] - this.data.rect[0], this.data.rect[3] - this.data.rect[1]]); 49770 const rotationMatrix = this.getRotationMatrix(annotationStorage); 49771 if (rotationMatrix !== IDENTITY_MATRIX) { 49772 appearanceDict.set("Matrix", rotationMatrix); 49773 } 49774 changes.put(newRef, { 49775 data: appearanceStream, 49776 xfa: null, 49777 needAppearances: false 49778 }); 49779 } 49780 dict.set("M", `D:${getModificationDate()}`); 49781 } 49782 async _getAppearance(evaluator, task, intent, annotationStorage) { 49783 const isPassword = this.hasFieldFlag(AnnotationFieldFlag.PASSWORD); 49784 if (isPassword) { 49785 return null; 49786 } 49787 const storageEntry = annotationStorage?.get(this.data.id); 49788 let value, rotation; 49789 if (storageEntry) { 49790 value = storageEntry.formattedValue || storageEntry.value; 49791 rotation = storageEntry.rotation; 49792 } 49793 if (rotation === undefined && value === undefined && !this._needAppearances) { 49794 if (!this._hasValueFromXFA || this.appearance) { 49795 return null; 49796 } 49797 } 49798 const colors = this.getBorderAndBackgroundAppearances(annotationStorage); 49799 if (value === undefined) { 49800 value = this.data.fieldValue; 49801 if (!value) { 49802 return `/Tx BMC q ${colors}Q EMC`; 49803 } 49804 } 49805 if (Array.isArray(value) && value.length === 1) { 49806 value = value[0]; 49807 } 49808 assert(typeof value === "string", "Expected `value` to be a string."); 49809 value = value.trimEnd(); 49810 if (this.data.combo) { 49811 const option = this.data.options.find(({ 49812 exportValue 49813 }) => value === exportValue); 49814 value = option?.displayValue || value; 49815 } 49816 if (value === "") { 49817 return `/Tx BMC q ${colors}Q EMC`; 49818 } 49819 if (rotation === undefined) { 49820 rotation = this.rotation; 49821 } 49822 let lineCount = -1; 49823 let lines; 49824 if (this.data.multiLine) { 49825 lines = value.split(/\r\n?|\n/).map(line => line.normalize("NFC")); 49826 lineCount = lines.length; 49827 } else { 49828 lines = [value.replace(/\r\n?|\n/, "").normalize("NFC")]; 49829 } 49830 const defaultPadding = 1; 49831 const defaultHPadding = 2; 49832 let totalHeight = this.data.rect[3] - this.data.rect[1]; 49833 let totalWidth = this.data.rect[2] - this.data.rect[0]; 49834 if (rotation === 90 || rotation === 270) { 49835 [totalWidth, totalHeight] = [totalHeight, totalWidth]; 49836 } 49837 if (!this._defaultAppearance) { 49838 this.data.defaultAppearanceData = parseDefaultAppearance(this._defaultAppearance = "/Helvetica 0 Tf 0 g"); 49839 } 49840 let font = await WidgetAnnotation._getFontData(evaluator, task, this.data.defaultAppearanceData, this._fieldResources.mergedResources); 49841 let defaultAppearance, fontSize, lineHeight; 49842 const encodedLines = []; 49843 let encodingError = false; 49844 for (const line of lines) { 49845 const encodedString = font.encodeString(line); 49846 if (encodedString.length > 1) { 49847 encodingError = true; 49848 } 49849 encodedLines.push(encodedString.join("")); 49850 } 49851 if (encodingError && intent & RenderingIntentFlag.SAVE) { 49852 return { 49853 needAppearances: true 49854 }; 49855 } 49856 if (encodingError && this._isOffscreenCanvasSupported) { 49857 const fontFamily = this.data.comb ? "monospace" : "sans-serif"; 49858 const fakeUnicodeFont = new FakeUnicodeFont(evaluator.xref, fontFamily); 49859 const resources = fakeUnicodeFont.createFontResources(lines.join("")); 49860 const newFont = resources.getRaw("Font"); 49861 if (this._fieldResources.mergedResources.has("Font")) { 49862 const oldFont = this._fieldResources.mergedResources.get("Font"); 49863 for (const key of newFont.getKeys()) { 49864 oldFont.set(key, newFont.getRaw(key)); 49865 } 49866 } else { 49867 this._fieldResources.mergedResources.set("Font", newFont); 49868 } 49869 const fontName = fakeUnicodeFont.fontName.name; 49870 font = await WidgetAnnotation._getFontData(evaluator, task, { 49871 fontName, 49872 fontSize: 0 49873 }, resources); 49874 for (let i = 0, ii = encodedLines.length; i < ii; i++) { 49875 encodedLines[i] = stringToUTF16String(lines[i]); 49876 } 49877 const savedDefaultAppearance = Object.assign(Object.create(null), this.data.defaultAppearanceData); 49878 this.data.defaultAppearanceData.fontSize = 0; 49879 this.data.defaultAppearanceData.fontName = fontName; 49880 [defaultAppearance, fontSize, lineHeight] = this._computeFontSize(totalHeight - 2 * defaultPadding, totalWidth - 2 * defaultHPadding, value, font, lineCount); 49881 this.data.defaultAppearanceData = savedDefaultAppearance; 49882 } else { 49883 if (!this._isOffscreenCanvasSupported) { 49884 warn("_getAppearance: OffscreenCanvas is not supported, annotation may not render correctly."); 49885 } 49886 [defaultAppearance, fontSize, lineHeight] = this._computeFontSize(totalHeight - 2 * defaultPadding, totalWidth - 2 * defaultHPadding, value, font, lineCount); 49887 } 49888 let descent = font.descent; 49889 if (isNaN(descent)) { 49890 descent = BASELINE_FACTOR * lineHeight; 49891 } else { 49892 descent = Math.max(BASELINE_FACTOR * lineHeight, Math.abs(descent) * fontSize); 49893 } 49894 const defaultVPadding = Math.min(Math.floor((totalHeight - fontSize) / 2), defaultPadding); 49895 const alignment = this.data.textAlignment; 49896 if (this.data.multiLine) { 49897 return this._getMultilineAppearance(defaultAppearance, encodedLines, font, fontSize, totalWidth, totalHeight, alignment, defaultHPadding, defaultVPadding, descent, lineHeight, annotationStorage); 49898 } 49899 if (this.data.comb) { 49900 return this._getCombAppearance(defaultAppearance, font, encodedLines[0], fontSize, totalWidth, totalHeight, defaultHPadding, defaultVPadding, descent, lineHeight, annotationStorage); 49901 } 49902 const bottomPadding = defaultVPadding + descent; 49903 if (alignment === 0 || alignment > 2) { 49904 return `/Tx BMC q ${colors}BT ` + defaultAppearance + ` 1 0 0 1 ${numberToString(defaultHPadding)} ${numberToString(bottomPadding)} Tm (${escapeString(encodedLines[0])}) Tj` + " ET Q EMC"; 49905 } 49906 const prevInfo = { 49907 shift: 0 49908 }; 49909 const renderedText = this._renderText(encodedLines[0], font, fontSize, totalWidth, alignment, prevInfo, defaultHPadding, bottomPadding); 49910 return `/Tx BMC q ${colors}BT ` + defaultAppearance + ` 1 0 0 1 0 0 Tm ${renderedText}` + " ET Q EMC"; 49911 } 49912 static async _getFontData(evaluator, task, appearanceData, resources) { 49913 const operatorList = new OperatorList(); 49914 const initialState = { 49915 font: null, 49916 clone() { 49917 return this; 49918 } 49919 }; 49920 const { 49921 fontName, 49922 fontSize 49923 } = appearanceData; 49924 await evaluator.handleSetFont(resources, [fontName && Name.get(fontName), fontSize], null, operatorList, task, initialState, null); 49925 return initialState.font; 49926 } 49927 _getTextWidth(text, font) { 49928 return font.charsToGlyphs(text).reduce((width, glyph) => width + glyph.width, 0) / 1000; 49929 } 49930 _computeFontSize(height, width, text, font, lineCount) { 49931 let { 49932 fontSize 49933 } = this.data.defaultAppearanceData; 49934 let lineHeight = (fontSize || 12) * LINE_FACTOR, 49935 numberOfLines = Math.round(height / lineHeight); 49936 if (!fontSize) { 49937 const roundWithTwoDigits = x => Math.floor(x * 100) / 100; 49938 if (lineCount === -1) { 49939 const textWidth = this._getTextWidth(text, font); 49940 fontSize = roundWithTwoDigits(Math.min(height / LINE_FACTOR, width / textWidth)); 49941 numberOfLines = 1; 49942 } else { 49943 const lines = text.split(/\r\n?|\n/); 49944 const cachedLines = []; 49945 for (const line of lines) { 49946 const encoded = font.encodeString(line).join(""); 49947 const glyphs = font.charsToGlyphs(encoded); 49948 const positions = font.getCharPositions(encoded); 49949 cachedLines.push({ 49950 line: encoded, 49951 glyphs, 49952 positions 49953 }); 49954 } 49955 const isTooBig = fsize => { 49956 let totalHeight = 0; 49957 for (const cache of cachedLines) { 49958 const chunks = this._splitLine(null, font, fsize, width, cache); 49959 totalHeight += chunks.length * fsize; 49960 if (totalHeight > height) { 49961 return true; 49962 } 49963 } 49964 return false; 49965 }; 49966 numberOfLines = Math.max(numberOfLines, lineCount); 49967 while (true) { 49968 lineHeight = height / numberOfLines; 49969 fontSize = roundWithTwoDigits(lineHeight / LINE_FACTOR); 49970 if (isTooBig(fontSize)) { 49971 numberOfLines++; 49972 continue; 49973 } 49974 break; 49975 } 49976 } 49977 const { 49978 fontName, 49979 fontColor 49980 } = this.data.defaultAppearanceData; 49981 this._defaultAppearance = createDefaultAppearance({ 49982 fontSize, 49983 fontName, 49984 fontColor 49985 }); 49986 } 49987 return [this._defaultAppearance, fontSize, height / numberOfLines]; 49988 } 49989 _renderText(text, font, fontSize, totalWidth, alignment, prevInfo, hPadding, vPadding) { 49990 let shift; 49991 if (alignment === 1) { 49992 const width = this._getTextWidth(text, font) * fontSize; 49993 shift = (totalWidth - width) / 2; 49994 } else if (alignment === 2) { 49995 const width = this._getTextWidth(text, font) * fontSize; 49996 shift = totalWidth - width - hPadding; 49997 } else { 49998 shift = hPadding; 49999 } 50000 const shiftStr = numberToString(shift - prevInfo.shift); 50001 prevInfo.shift = shift; 50002 vPadding = numberToString(vPadding); 50003 return `${shiftStr} ${vPadding} Td (${escapeString(text)}) Tj`; 50004 } 50005 _getSaveFieldResources(xref) { 50006 const { 50007 localResources, 50008 appearanceResources, 50009 acroFormResources 50010 } = this._fieldResources; 50011 const fontName = this.data.defaultAppearanceData?.fontName; 50012 if (!fontName) { 50013 return localResources || Dict.empty; 50014 } 50015 for (const resources of [localResources, appearanceResources]) { 50016 if (resources instanceof Dict) { 50017 const localFont = resources.get("Font"); 50018 if (localFont instanceof Dict && localFont.has(fontName)) { 50019 return resources; 50020 } 50021 } 50022 } 50023 if (acroFormResources instanceof Dict) { 50024 const acroFormFont = acroFormResources.get("Font"); 50025 if (acroFormFont instanceof Dict && acroFormFont.has(fontName)) { 50026 const subFontDict = new Dict(xref); 50027 subFontDict.set(fontName, acroFormFont.getRaw(fontName)); 50028 const subResourcesDict = new Dict(xref); 50029 subResourcesDict.set("Font", subFontDict); 50030 return Dict.merge({ 50031 xref, 50032 dictArray: [subResourcesDict, localResources], 50033 mergeSubDicts: true 50034 }); 50035 } 50036 } 50037 return localResources || Dict.empty; 50038 } 50039 getFieldObject() { 50040 return null; 50041 } 50042} 50043class TextWidgetAnnotation extends WidgetAnnotation { 50044 constructor(params) { 50045 super(params); 50046 const { 50047 dict 50048 } = params; 50049 if (dict.has("PMD")) { 50050 this.flags |= AnnotationFlag.HIDDEN; 50051 this.data.hidden = true; 50052 warn("Barcodes are not supported"); 50053 } 50054 this.data.hasOwnCanvas = this.data.readOnly && !this.data.noHTML; 50055 this._hasText = true; 50056 if (typeof this.data.fieldValue !== "string") { 50057 this.data.fieldValue = ""; 50058 } 50059 let alignment = getInheritableProperty({ 50060 dict, 50061 key: "Q" 50062 }); 50063 if (!Number.isInteger(alignment) || alignment < 0 || alignment > 2) { 50064 alignment = null; 50065 } 50066 this.data.textAlignment = alignment; 50067 let maximumLength = getInheritableProperty({ 50068 dict, 50069 key: "MaxLen" 50070 }); 50071 if (!Number.isInteger(maximumLength) || maximumLength < 0) { 50072 maximumLength = 0; 50073 } 50074 this.data.maxLen = maximumLength; 50075 this.data.multiLine = this.hasFieldFlag(AnnotationFieldFlag.MULTILINE); 50076 this.data.comb = this.hasFieldFlag(AnnotationFieldFlag.COMB) && !this.hasFieldFlag(AnnotationFieldFlag.MULTILINE) && !this.hasFieldFlag(AnnotationFieldFlag.PASSWORD) && !this.hasFieldFlag(AnnotationFieldFlag.FILESELECT) && this.data.maxLen !== 0; 50077 this.data.doNotScroll = this.hasFieldFlag(AnnotationFieldFlag.DONOTSCROLL); 50078 } 50079 get hasTextContent() { 50080 return !!this.appearance && !this._needAppearances; 50081 } 50082 _getCombAppearance(defaultAppearance, font, text, fontSize, width, height, hPadding, vPadding, descent, lineHeight, annotationStorage) { 50083 const combWidth = width / this.data.maxLen; 50084 const colors = this.getBorderAndBackgroundAppearances(annotationStorage); 50085 const buf = []; 50086 const positions = font.getCharPositions(text); 50087 for (const [start, end] of positions) { 50088 buf.push(`(${escapeString(text.substring(start, end))}) Tj`); 50089 } 50090 const renderedComb = buf.join(` ${numberToString(combWidth)} 0 Td `); 50091 return `/Tx BMC q ${colors}BT ` + defaultAppearance + ` 1 0 0 1 ${numberToString(hPadding)} ${numberToString(vPadding + descent)} Tm ${renderedComb}` + " ET Q EMC"; 50092 } 50093 _getMultilineAppearance(defaultAppearance, lines, font, fontSize, width, height, alignment, hPadding, vPadding, descent, lineHeight, annotationStorage) { 50094 const buf = []; 50095 const totalWidth = width - 2 * hPadding; 50096 const prevInfo = { 50097 shift: 0 50098 }; 50099 for (let i = 0, ii = lines.length; i < ii; i++) { 50100 const line = lines[i]; 50101 const chunks = this._splitLine(line, font, fontSize, totalWidth); 50102 for (let j = 0, jj = chunks.length; j < jj; j++) { 50103 const chunk = chunks[j]; 50104 const vShift = i === 0 && j === 0 ? -vPadding - (lineHeight - descent) : -lineHeight; 50105 buf.push(this._renderText(chunk, font, fontSize, width, alignment, prevInfo, hPadding, vShift)); 50106 } 50107 } 50108 const colors = this.getBorderAndBackgroundAppearances(annotationStorage); 50109 const renderedText = buf.join("\n"); 50110 return `/Tx BMC q ${colors}BT ` + defaultAppearance + ` 1 0 0 1 0 ${numberToString(height)} Tm ${renderedText}` + " ET Q EMC"; 50111 } 50112 _splitLine(line, font, fontSize, width, cache = {}) { 50113 line = cache.line || line; 50114 const glyphs = cache.glyphs || font.charsToGlyphs(line); 50115 if (glyphs.length <= 1) { 50116 return [line]; 50117 } 50118 const positions = cache.positions || font.getCharPositions(line); 50119 const scale = fontSize / 1000; 50120 const chunks = []; 50121 let lastSpacePosInStringStart = -1, 50122 lastSpacePosInStringEnd = -1, 50123 lastSpacePos = -1, 50124 startChunk = 0, 50125 currentWidth = 0; 50126 for (let i = 0, ii = glyphs.length; i < ii; i++) { 50127 const [start, end] = positions[i]; 50128 const glyph = glyphs[i]; 50129 const glyphWidth = glyph.width * scale; 50130 if (glyph.unicode === " ") { 50131 if (currentWidth + glyphWidth > width) { 50132 chunks.push(line.substring(startChunk, start)); 50133 startChunk = start; 50134 currentWidth = glyphWidth; 50135 lastSpacePosInStringStart = -1; 50136 lastSpacePos = -1; 50137 } else { 50138 currentWidth += glyphWidth; 50139 lastSpacePosInStringStart = start; 50140 lastSpacePosInStringEnd = end; 50141 lastSpacePos = i; 50142 } 50143 } else if (currentWidth + glyphWidth > width) { 50144 if (lastSpacePosInStringStart !== -1) { 50145 chunks.push(line.substring(startChunk, lastSpacePosInStringEnd)); 50146 startChunk = lastSpacePosInStringEnd; 50147 i = lastSpacePos + 1; 50148 lastSpacePosInStringStart = -1; 50149 currentWidth = 0; 50150 } else { 50151 chunks.push(line.substring(startChunk, start)); 50152 startChunk = start; 50153 currentWidth = glyphWidth; 50154 } 50155 } else { 50156 currentWidth += glyphWidth; 50157 } 50158 } 50159 if (startChunk < line.length) { 50160 chunks.push(line.substring(startChunk, line.length)); 50161 } 50162 return chunks; 50163 } 50164 async extractTextContent(evaluator, task, viewBox) { 50165 await super.extractTextContent(evaluator, task, viewBox); 50166 const text = this.data.textContent; 50167 if (!text) { 50168 return; 50169 } 50170 const allText = text.join("\n"); 50171 if (allText === this.data.fieldValue) { 50172 return; 50173 } 50174 const regex = allText.replaceAll(/([.*+?^${}()|[\]\\])|(\s+)/g, (_m, p1) => p1 ? `\\${p1}` : "\\s+"); 50175 if (new RegExp(`^\\s*${regex}\\s*$`).test(this.data.fieldValue)) { 50176 this.data.textContent = this.data.fieldValue.split("\n"); 50177 } 50178 } 50179 getFieldObject() { 50180 return { 50181 id: this.data.id, 50182 value: this.data.fieldValue, 50183 defaultValue: this.data.defaultFieldValue || "", 50184 multiline: this.data.multiLine, 50185 password: this.hasFieldFlag(AnnotationFieldFlag.PASSWORD), 50186 charLimit: this.data.maxLen, 50187 comb: this.data.comb, 50188 editable: !this.data.readOnly, 50189 hidden: this.data.hidden, 50190 name: this.data.fieldName, 50191 rect: this.data.rect, 50192 actions: this.data.actions, 50193 page: this.data.pageIndex, 50194 strokeColor: this.data.borderColor, 50195 fillColor: this.data.backgroundColor, 50196 rotation: this.rotation, 50197 type: "text" 50198 }; 50199 } 50200} 50201class ButtonWidgetAnnotation extends WidgetAnnotation { 50202 constructor(params) { 50203 super(params); 50204 this.checkedAppearance = null; 50205 this.uncheckedAppearance = null; 50206 this.data.checkBox = !this.hasFieldFlag(AnnotationFieldFlag.RADIO) && !this.hasFieldFlag(AnnotationFieldFlag.PUSHBUTTON); 50207 this.data.radioButton = this.hasFieldFlag(AnnotationFieldFlag.RADIO) && !this.hasFieldFlag(AnnotationFieldFlag.PUSHBUTTON); 50208 this.data.pushButton = this.hasFieldFlag(AnnotationFieldFlag.PUSHBUTTON); 50209 this.data.isTooltipOnly = false; 50210 if (this.data.checkBox) { 50211 this._processCheckBox(params); 50212 } else if (this.data.radioButton) { 50213 this._processRadioButton(params); 50214 } else if (this.data.pushButton) { 50215 this.data.hasOwnCanvas = true; 50216 this.data.noHTML = false; 50217 this._processPushButton(params); 50218 } else { 50219 warn("Invalid field flags for button widget annotation"); 50220 } 50221 } 50222 async getOperatorList(evaluator, task, intent, annotationStorage) { 50223 if (this.data.pushButton) { 50224 return super.getOperatorList(evaluator, task, intent, false, annotationStorage); 50225 } 50226 let value = null; 50227 let rotation = null; 50228 if (annotationStorage) { 50229 const storageEntry = annotationStorage.get(this.data.id); 50230 value = storageEntry ? storageEntry.value : null; 50231 rotation = storageEntry ? storageEntry.rotation : null; 50232 } 50233 if (value === null && this.appearance) { 50234 return super.getOperatorList(evaluator, task, intent, annotationStorage); 50235 } 50236 if (value === null || value === undefined) { 50237 value = this.data.checkBox ? this.data.fieldValue === this.data.exportValue : this.data.fieldValue === this.data.buttonValue; 50238 } 50239 const appearance = value ? this.checkedAppearance : this.uncheckedAppearance; 50240 if (appearance) { 50241 const savedAppearance = this.appearance; 50242 const savedMatrix = lookupMatrix(appearance.dict.getArray("Matrix"), IDENTITY_MATRIX); 50243 if (rotation) { 50244 appearance.dict.set("Matrix", this.getRotationMatrix(annotationStorage)); 50245 } 50246 this.appearance = appearance; 50247 const operatorList = super.getOperatorList(evaluator, task, intent, annotationStorage); 50248 this.appearance = savedAppearance; 50249 appearance.dict.set("Matrix", savedMatrix); 50250 return operatorList; 50251 } 50252 return { 50253 opList: new OperatorList(), 50254 separateForm: false, 50255 separateCanvas: false 50256 }; 50257 } 50258 async save(evaluator, task, annotationStorage, changes) { 50259 if (this.data.checkBox) { 50260 this._saveCheckbox(evaluator, task, annotationStorage, changes); 50261 return; 50262 } 50263 if (this.data.radioButton) { 50264 this._saveRadioButton(evaluator, task, annotationStorage, changes); 50265 } 50266 } 50267 async _saveCheckbox(evaluator, task, annotationStorage, changes) { 50268 if (!annotationStorage) { 50269 return; 50270 } 50271 const storageEntry = annotationStorage.get(this.data.id); 50272 const flags = this._buildFlags(storageEntry?.noView, storageEntry?.noPrint); 50273 let rotation = storageEntry?.rotation, 50274 value = storageEntry?.value; 50275 if (rotation === undefined && flags === undefined) { 50276 if (value === undefined) { 50277 return; 50278 } 50279 const defaultValue = this.data.fieldValue === this.data.exportValue; 50280 if (defaultValue === value) { 50281 return; 50282 } 50283 } 50284 let dict = evaluator.xref.fetchIfRef(this.ref); 50285 if (!(dict instanceof Dict)) { 50286 return; 50287 } 50288 dict = dict.clone(); 50289 if (rotation === undefined) { 50290 rotation = this.rotation; 50291 } 50292 if (value === undefined) { 50293 value = this.data.fieldValue === this.data.exportValue; 50294 } 50295 const xfa = { 50296 path: this.data.fieldName, 50297 value: value ? this.data.exportValue : "" 50298 }; 50299 const name = Name.get(value ? this.data.exportValue : "Off"); 50300 this.setValue(dict, name, evaluator.xref, changes); 50301 dict.set("AS", name); 50302 dict.set("M", `D:${getModificationDate()}`); 50303 if (flags !== undefined) { 50304 dict.set("F", flags); 50305 } 50306 const maybeMK = this._getMKDict(rotation); 50307 if (maybeMK) { 50308 dict.set("MK", maybeMK); 50309 } 50310 changes.put(this.ref, { 50311 data: dict, 50312 xfa, 50313 needAppearances: false 50314 }); 50315 } 50316 async _saveRadioButton(evaluator, task, annotationStorage, changes) { 50317 if (!annotationStorage) { 50318 return; 50319 } 50320 const storageEntry = annotationStorage.get(this.data.id); 50321 const flags = this._buildFlags(storageEntry?.noView, storageEntry?.noPrint); 50322 let rotation = storageEntry?.rotation, 50323 value = storageEntry?.value; 50324 if (rotation === undefined && flags === undefined) { 50325 if (value === undefined) { 50326 return; 50327 } 50328 const defaultValue = this.data.fieldValue === this.data.buttonValue; 50329 if (defaultValue === value) { 50330 return; 50331 } 50332 } 50333 let dict = evaluator.xref.fetchIfRef(this.ref); 50334 if (!(dict instanceof Dict)) { 50335 return; 50336 } 50337 dict = dict.clone(); 50338 if (value === undefined) { 50339 value = this.data.fieldValue === this.data.buttonValue; 50340 } 50341 if (rotation === undefined) { 50342 rotation = this.rotation; 50343 } 50344 const xfa = { 50345 path: this.data.fieldName, 50346 value: value ? this.data.buttonValue : "" 50347 }; 50348 const name = Name.get(value ? this.data.buttonValue : "Off"); 50349 if (value) { 50350 this.setValue(dict, name, evaluator.xref, changes); 50351 } 50352 dict.set("AS", name); 50353 dict.set("M", `D:${getModificationDate()}`); 50354 if (flags !== undefined) { 50355 dict.set("F", flags); 50356 } 50357 const maybeMK = this._getMKDict(rotation); 50358 if (maybeMK) { 50359 dict.set("MK", maybeMK); 50360 } 50361 changes.put(this.ref, { 50362 data: dict, 50363 xfa, 50364 needAppearances: false 50365 }); 50366 } 50367 _getDefaultCheckedAppearance(params, type) { 50368 const width = this.data.rect[2] - this.data.rect[0]; 50369 const height = this.data.rect[3] - this.data.rect[1]; 50370 const bbox = [0, 0, width, height]; 50371 const FONT_RATIO = 0.8; 50372 const fontSize = Math.min(width, height) * FONT_RATIO; 50373 let metrics, char; 50374 if (type === "check") { 50375 metrics = { 50376 width: 0.755 * fontSize, 50377 height: 0.705 * fontSize 50378 }; 50379 char = "\x33"; 50380 } else if (type === "disc") { 50381 metrics = { 50382 width: 0.791 * fontSize, 50383 height: 0.705 * fontSize 50384 }; 50385 char = "\x6C"; 50386 } else { 50387 unreachable(`_getDefaultCheckedAppearance - unsupported type: ${type}`); 50388 } 50389 const xShift = numberToString((width - metrics.width) / 2); 50390 const yShift = numberToString((height - metrics.height) / 2); 50391 const appearance = `q BT /PdfJsZaDb ${fontSize} Tf 0 g ${xShift} ${yShift} Td (${char}) Tj ET Q`; 50392 const appearanceStreamDict = new Dict(params.xref); 50393 appearanceStreamDict.set("FormType", 1); 50394 appearanceStreamDict.set("Subtype", Name.get("Form")); 50395 appearanceStreamDict.set("Type", Name.get("XObject")); 50396 appearanceStreamDict.set("BBox", bbox); 50397 appearanceStreamDict.set("Matrix", [1, 0, 0, 1, 0, 0]); 50398 appearanceStreamDict.set("Length", appearance.length); 50399 const resources = new Dict(params.xref); 50400 const font = new Dict(params.xref); 50401 font.set("PdfJsZaDb", this.fallbackFontDict); 50402 resources.set("Font", font); 50403 appearanceStreamDict.set("Resources", resources); 50404 this.checkedAppearance = new StringStream(appearance); 50405 this.checkedAppearance.dict = appearanceStreamDict; 50406 this._streams.push(this.checkedAppearance); 50407 } 50408 _processCheckBox(params) { 50409 const customAppearance = params.dict.get("AP"); 50410 if (!(customAppearance instanceof Dict)) { 50411 return; 50412 } 50413 const normalAppearance = customAppearance.get("N"); 50414 if (!(normalAppearance instanceof Dict)) { 50415 return; 50416 } 50417 const asValue = this._decodeFormValue(params.dict.get("AS")); 50418 if (typeof asValue === "string") { 50419 this.data.fieldValue = asValue; 50420 } 50421 const yes = this.data.fieldValue !== null && this.data.fieldValue !== "Off" ? this.data.fieldValue : "Yes"; 50422 const exportValues = normalAppearance.getKeys(); 50423 if (exportValues.length === 0) { 50424 exportValues.push("Off", yes); 50425 } else if (exportValues.length === 1) { 50426 if (exportValues[0] === "Off") { 50427 exportValues.push(yes); 50428 } else { 50429 exportValues.unshift("Off"); 50430 } 50431 } else if (exportValues.includes(yes)) { 50432 exportValues.length = 0; 50433 exportValues.push("Off", yes); 50434 } else { 50435 const otherYes = exportValues.find(v => v !== "Off"); 50436 exportValues.length = 0; 50437 exportValues.push("Off", otherYes); 50438 } 50439 if (!exportValues.includes(this.data.fieldValue)) { 50440 this.data.fieldValue = "Off"; 50441 } 50442 this.data.exportValue = exportValues[1]; 50443 const checkedAppearance = normalAppearance.get(this.data.exportValue); 50444 this.checkedAppearance = checkedAppearance instanceof BaseStream ? checkedAppearance : null; 50445 const uncheckedAppearance = normalAppearance.get("Off"); 50446 this.uncheckedAppearance = uncheckedAppearance instanceof BaseStream ? uncheckedAppearance : null; 50447 if (this.checkedAppearance) { 50448 this._streams.push(this.checkedAppearance); 50449 } else { 50450 this._getDefaultCheckedAppearance(params, "check"); 50451 } 50452 if (this.uncheckedAppearance) { 50453 this._streams.push(this.uncheckedAppearance); 50454 } 50455 this._fallbackFontDict = this.fallbackFontDict; 50456 if (this.data.defaultFieldValue === null) { 50457 this.data.defaultFieldValue = "Off"; 50458 } 50459 } 50460 _processRadioButton(params) { 50461 this.data.buttonValue = null; 50462 const fieldParent = params.dict.get("Parent"); 50463 if (fieldParent instanceof Dict) { 50464 this.parent = params.dict.getRaw("Parent"); 50465 const fieldParentValue = fieldParent.get("V"); 50466 if (fieldParentValue instanceof Name) { 50467 this.data.fieldValue = this._decodeFormValue(fieldParentValue); 50468 } 50469 } 50470 const appearanceStates = params.dict.get("AP"); 50471 if (!(appearanceStates instanceof Dict)) { 50472 return; 50473 } 50474 const normalAppearance = appearanceStates.get("N"); 50475 if (!(normalAppearance instanceof Dict)) { 50476 return; 50477 } 50478 for (const key of normalAppearance.getKeys()) { 50479 if (key !== "Off") { 50480 this.data.buttonValue = this._decodeFormValue(key); 50481 break; 50482 } 50483 } 50484 const checkedAppearance = normalAppearance.get(this.data.buttonValue); 50485 this.checkedAppearance = checkedAppearance instanceof BaseStream ? checkedAppearance : null; 50486 const uncheckedAppearance = normalAppearance.get("Off"); 50487 this.uncheckedAppearance = uncheckedAppearance instanceof BaseStream ? uncheckedAppearance : null; 50488 if (this.checkedAppearance) { 50489 this._streams.push(this.checkedAppearance); 50490 } else { 50491 this._getDefaultCheckedAppearance(params, "disc"); 50492 } 50493 if (this.uncheckedAppearance) { 50494 this._streams.push(this.uncheckedAppearance); 50495 } 50496 this._fallbackFontDict = this.fallbackFontDict; 50497 if (this.data.defaultFieldValue === null) { 50498 this.data.defaultFieldValue = "Off"; 50499 } 50500 } 50501 _processPushButton(params) { 50502 const { 50503 dict, 50504 annotationGlobals 50505 } = params; 50506 if (!dict.has("A") && !dict.has("AA") && !this.data.alternativeText) { 50507 warn("Push buttons without action dictionaries are not supported"); 50508 return; 50509 } 50510 this.data.isTooltipOnly = !dict.has("A") && !dict.has("AA"); 50511 Catalog.parseDestDictionary({ 50512 destDict: dict, 50513 resultObj: this.data, 50514 docBaseUrl: annotationGlobals.baseUrl, 50515 docAttachments: annotationGlobals.attachments 50516 }); 50517 } 50518 getFieldObject() { 50519 let type = "button"; 50520 let exportValues; 50521 if (this.data.checkBox) { 50522 type = "checkbox"; 50523 exportValues = this.data.exportValue; 50524 } else if (this.data.radioButton) { 50525 type = "radiobutton"; 50526 exportValues = this.data.buttonValue; 50527 } 50528 return { 50529 id: this.data.id, 50530 value: this.data.fieldValue || "Off", 50531 defaultValue: this.data.defaultFieldValue, 50532 exportValues, 50533 editable: !this.data.readOnly, 50534 name: this.data.fieldName, 50535 rect: this.data.rect, 50536 hidden: this.data.hidden, 50537 actions: this.data.actions, 50538 page: this.data.pageIndex, 50539 strokeColor: this.data.borderColor, 50540 fillColor: this.data.backgroundColor, 50541 rotation: this.rotation, 50542 type 50543 }; 50544 } 50545 get fallbackFontDict() { 50546 const dict = new Dict(); 50547 dict.set("BaseFont", Name.get("ZapfDingbats")); 50548 dict.set("Type", Name.get("FallbackType")); 50549 dict.set("Subtype", Name.get("FallbackType")); 50550 dict.set("Encoding", Name.get("ZapfDingbatsEncoding")); 50551 return shadow(this, "fallbackFontDict", dict); 50552 } 50553} 50554class ChoiceWidgetAnnotation extends WidgetAnnotation { 50555 constructor(params) { 50556 super(params); 50557 const { 50558 dict, 50559 xref 50560 } = params; 50561 this.indices = dict.getArray("I"); 50562 this.hasIndices = Array.isArray(this.indices) && this.indices.length > 0; 50563 this.data.options = []; 50564 const options = getInheritableProperty({ 50565 dict, 50566 key: "Opt" 50567 }); 50568 if (Array.isArray(options)) { 50569 for (let i = 0, ii = options.length; i < ii; i++) { 50570 const option = xref.fetchIfRef(options[i]); 50571 const isOptionArray = Array.isArray(option); 50572 this.data.options[i] = { 50573 exportValue: this._decodeFormValue(isOptionArray ? xref.fetchIfRef(option[0]) : option), 50574 displayValue: this._decodeFormValue(isOptionArray ? xref.fetchIfRef(option[1]) : option) 50575 }; 50576 } 50577 } 50578 if (!this.hasIndices) { 50579 if (typeof this.data.fieldValue === "string") { 50580 this.data.fieldValue = [this.data.fieldValue]; 50581 } else if (!this.data.fieldValue) { 50582 this.data.fieldValue = []; 50583 } 50584 } else { 50585 this.data.fieldValue = []; 50586 const ii = this.data.options.length; 50587 for (const i of this.indices) { 50588 if (Number.isInteger(i) && i >= 0 && i < ii) { 50589 this.data.fieldValue.push(this.data.options[i].exportValue); 50590 } 50591 } 50592 } 50593 if (this.data.options.length === 0 && this.data.fieldValue.length > 0) { 50594 this.data.options = this.data.fieldValue.map(value => ({ 50595 exportValue: value, 50596 displayValue: value 50597 })); 50598 } 50599 this.data.combo = this.hasFieldFlag(AnnotationFieldFlag.COMBO); 50600 this.data.multiSelect = this.hasFieldFlag(AnnotationFieldFlag.MULTISELECT); 50601 this._hasText = true; 50602 } 50603 getFieldObject() { 50604 const type = this.data.combo ? "combobox" : "listbox"; 50605 const value = this.data.fieldValue.length > 0 ? this.data.fieldValue[0] : null; 50606 return { 50607 id: this.data.id, 50608 value, 50609 defaultValue: this.data.defaultFieldValue, 50610 editable: !this.data.readOnly, 50611 name: this.data.fieldName, 50612 rect: this.data.rect, 50613 numItems: this.data.fieldValue.length, 50614 multipleSelection: this.data.multiSelect, 50615 hidden: this.data.hidden, 50616 actions: this.data.actions, 50617 items: this.data.options, 50618 page: this.data.pageIndex, 50619 strokeColor: this.data.borderColor, 50620 fillColor: this.data.backgroundColor, 50621 rotation: this.rotation, 50622 type 50623 }; 50624 } 50625 amendSavedDict(annotationStorage, dict) { 50626 if (!this.hasIndices) { 50627 return; 50628 } 50629 let values = annotationStorage?.get(this.data.id)?.value; 50630 if (!Array.isArray(values)) { 50631 values = [values]; 50632 } 50633 const indices = []; 50634 const { 50635 options 50636 } = this.data; 50637 for (let i = 0, j = 0, ii = options.length; i < ii; i++) { 50638 if (options[i].exportValue === values[j]) { 50639 indices.push(i); 50640 j += 1; 50641 } 50642 } 50643 dict.set("I", indices); 50644 } 50645 async _getAppearance(evaluator, task, intent, annotationStorage) { 50646 if (this.data.combo) { 50647 return super._getAppearance(evaluator, task, intent, annotationStorage); 50648 } 50649 let exportedValue, rotation; 50650 const storageEntry = annotationStorage?.get(this.data.id); 50651 if (storageEntry) { 50652 rotation = storageEntry.rotation; 50653 exportedValue = storageEntry.value; 50654 } 50655 if (rotation === undefined && exportedValue === undefined && !this._needAppearances) { 50656 return null; 50657 } 50658 if (exportedValue === undefined) { 50659 exportedValue = this.data.fieldValue; 50660 } else if (!Array.isArray(exportedValue)) { 50661 exportedValue = [exportedValue]; 50662 } 50663 const defaultPadding = 1; 50664 const defaultHPadding = 2; 50665 let totalHeight = this.data.rect[3] - this.data.rect[1]; 50666 let totalWidth = this.data.rect[2] - this.data.rect[0]; 50667 if (rotation === 90 || rotation === 270) { 50668 [totalWidth, totalHeight] = [totalHeight, totalWidth]; 50669 } 50670 const lineCount = this.data.options.length; 50671 const valueIndices = []; 50672 for (let i = 0; i < lineCount; i++) { 50673 const { 50674 exportValue 50675 } = this.data.options[i]; 50676 if (exportedValue.includes(exportValue)) { 50677 valueIndices.push(i); 50678 } 50679 } 50680 if (!this._defaultAppearance) { 50681 this.data.defaultAppearanceData = parseDefaultAppearance(this._defaultAppearance = "/Helvetica 0 Tf 0 g"); 50682 } 50683 const font = await WidgetAnnotation._getFontData(evaluator, task, this.data.defaultAppearanceData, this._fieldResources.mergedResources); 50684 let defaultAppearance; 50685 let { 50686 fontSize 50687 } = this.data.defaultAppearanceData; 50688 if (!fontSize) { 50689 const lineHeight = (totalHeight - defaultPadding) / lineCount; 50690 let lineWidth = -1; 50691 let value; 50692 for (const { 50693 displayValue 50694 } of this.data.options) { 50695 const width = this._getTextWidth(displayValue, font); 50696 if (width > lineWidth) { 50697 lineWidth = width; 50698 value = displayValue; 50699 } 50700 } 50701 [defaultAppearance, fontSize] = this._computeFontSize(lineHeight, totalWidth - 2 * defaultHPadding, value, font, -1); 50702 } else { 50703 defaultAppearance = this._defaultAppearance; 50704 } 50705 const lineHeight = fontSize * LINE_FACTOR; 50706 const vPadding = (lineHeight - fontSize) / 2; 50707 const numberOfVisibleLines = Math.floor(totalHeight / lineHeight); 50708 let firstIndex = 0; 50709 if (valueIndices.length > 0) { 50710 const minIndex = Math.min(...valueIndices); 50711 const maxIndex = Math.max(...valueIndices); 50712 firstIndex = Math.max(0, maxIndex - numberOfVisibleLines + 1); 50713 if (firstIndex > minIndex) { 50714 firstIndex = minIndex; 50715 } 50716 } 50717 const end = Math.min(firstIndex + numberOfVisibleLines + 1, lineCount); 50718 const buf = ["/Tx BMC q", `1 1 ${totalWidth} ${totalHeight} re W n`]; 50719 if (valueIndices.length) { 50720 buf.push("0.600006 0.756866 0.854904 rg"); 50721 for (const index of valueIndices) { 50722 if (firstIndex <= index && index < end) { 50723 buf.push(`1 ${totalHeight - (index - firstIndex + 1) * lineHeight} ${totalWidth} ${lineHeight} re f`); 50724 } 50725 } 50726 } 50727 buf.push("BT", defaultAppearance, `1 0 0 1 0 ${totalHeight} Tm`); 50728 const prevInfo = { 50729 shift: 0 50730 }; 50731 for (let i = firstIndex; i < end; i++) { 50732 const { 50733 displayValue 50734 } = this.data.options[i]; 50735 const vpadding = i === firstIndex ? vPadding : 0; 50736 buf.push(this._renderText(displayValue, font, fontSize, totalWidth, 0, prevInfo, defaultHPadding, -lineHeight + vpadding)); 50737 } 50738 buf.push("ET Q EMC"); 50739 return buf.join("\n"); 50740 } 50741} 50742class SignatureWidgetAnnotation extends WidgetAnnotation { 50743 constructor(params) { 50744 super(params); 50745 this.data.fieldValue = null; 50746 this.data.hasOwnCanvas = this.data.noRotate; 50747 this.data.noHTML = !this.data.hasOwnCanvas; 50748 } 50749 getFieldObject() { 50750 return { 50751 id: this.data.id, 50752 value: null, 50753 page: this.data.pageIndex, 50754 type: "signature" 50755 }; 50756 } 50757} 50758class TextAnnotation extends MarkupAnnotation { 50759 constructor(params) { 50760 const DEFAULT_ICON_SIZE = 22; 50761 super(params); 50762 this.data.noRotate = true; 50763 this.data.hasOwnCanvas = this.data.noRotate; 50764 this.data.noHTML = false; 50765 const { 50766 dict 50767 } = params; 50768 this.data.annotationType = AnnotationType.TEXT; 50769 if (this.data.hasAppearance) { 50770 this.data.name = "NoIcon"; 50771 } else { 50772 this.data.rect[1] = this.data.rect[3] - DEFAULT_ICON_SIZE; 50773 this.data.rect[2] = this.data.rect[0] + DEFAULT_ICON_SIZE; 50774 this.data.name = dict.has("Name") ? dict.get("Name").name : "Note"; 50775 } 50776 if (dict.has("State")) { 50777 this.data.state = dict.get("State") || null; 50778 this.data.stateModel = dict.get("StateModel") || null; 50779 } else { 50780 this.data.state = null; 50781 this.data.stateModel = null; 50782 } 50783 } 50784} 50785class LinkAnnotation extends Annotation { 50786 constructor(params) { 50787 super(params); 50788 const { 50789 dict, 50790 annotationGlobals 50791 } = params; 50792 this.data.annotationType = AnnotationType.LINK; 50793 this.data.noHTML = false; 50794 const quadPoints = getQuadPoints(dict, this.rectangle); 50795 if (quadPoints) { 50796 this.data.quadPoints = quadPoints; 50797 } 50798 this.data.borderColor ||= this.data.color; 50799 Catalog.parseDestDictionary({ 50800 destDict: dict, 50801 resultObj: this.data, 50802 docBaseUrl: annotationGlobals.baseUrl, 50803 docAttachments: annotationGlobals.attachments 50804 }); 50805 } 50806} 50807class PopupAnnotation extends Annotation { 50808 constructor(params) { 50809 super(params); 50810 const { 50811 dict 50812 } = params; 50813 this.data.annotationType = AnnotationType.POPUP; 50814 this.data.noHTML = false; 50815 if (this.data.rect[0] === this.data.rect[2] || this.data.rect[1] === this.data.rect[3]) { 50816 this.data.rect = null; 50817 } 50818 let parentItem = dict.get("Parent"); 50819 if (!parentItem) { 50820 warn("Popup annotation has a missing or invalid parent annotation."); 50821 return; 50822 } 50823 this.data.parentRect = lookupNormalRect(parentItem.getArray("Rect"), null); 50824 const rt = parentItem.get("RT"); 50825 if (isName(rt, AnnotationReplyType.GROUP)) { 50826 parentItem = parentItem.get("IRT"); 50827 } 50828 if (!parentItem.has("M")) { 50829 this.data.modificationDate = null; 50830 } else { 50831 this.setModificationDate(parentItem.get("M")); 50832 this.data.modificationDate = this.modificationDate; 50833 } 50834 if (!parentItem.has("C")) { 50835 this.data.color = null; 50836 } else { 50837 this.setColor(parentItem.getArray("C")); 50838 this.data.color = this.color; 50839 } 50840 if (!this.viewable) { 50841 const parentFlags = parentItem.get("F"); 50842 if (this._isViewable(parentFlags)) { 50843 this.setFlags(parentFlags); 50844 } 50845 } 50846 this.setTitle(parentItem.get("T")); 50847 this.data.titleObj = this._title; 50848 this.setContents(parentItem.get("Contents")); 50849 this.data.contentsObj = this._contents; 50850 if (parentItem.has("RC")) { 50851 this.data.richText = XFAFactory.getRichTextAsHtml(parentItem.get("RC")); 50852 } 50853 this.data.open = !!dict.get("Open"); 50854 } 50855} 50856class FreeTextAnnotation extends MarkupAnnotation { 50857 constructor(params) { 50858 super(params); 50859 this.data.hasOwnCanvas = this.data.noRotate; 50860 this.data.isEditable = !this.data.noHTML; 50861 this.data.noHTML = false; 50862 const { 50863 evaluatorOptions, 50864 xref 50865 } = params; 50866 this.data.annotationType = AnnotationType.FREETEXT; 50867 this.setDefaultAppearance(params); 50868 this._hasAppearance = !!this.appearance; 50869 if (this._hasAppearance) { 50870 const { 50871 fontColor, 50872 fontSize 50873 } = parseAppearanceStream(this.appearance, evaluatorOptions, xref); 50874 this.data.defaultAppearanceData.fontColor = fontColor; 50875 this.data.defaultAppearanceData.fontSize = fontSize || 10; 50876 } else { 50877 this.data.defaultAppearanceData.fontSize ||= 10; 50878 const { 50879 fontColor, 50880 fontSize 50881 } = this.data.defaultAppearanceData; 50882 if (this._contents.str) { 50883 this.data.textContent = this._contents.str.split(/\r\n?|\n/).map(line => line.trimEnd()); 50884 const { 50885 coords, 50886 bbox, 50887 matrix 50888 } = FakeUnicodeFont.getFirstPositionInfo(this.rectangle, this.rotation, fontSize); 50889 this.data.textPosition = this._transformPoint(coords, bbox, matrix); 50890 } 50891 if (this._isOffscreenCanvasSupported) { 50892 const strokeAlpha = params.dict.get("CA"); 50893 const fakeUnicodeFont = new FakeUnicodeFont(xref, "sans-serif"); 50894 this.appearance = fakeUnicodeFont.createAppearance(this._contents.str, this.rectangle, this.rotation, fontSize, fontColor, strokeAlpha); 50895 this._streams.push(this.appearance); 50896 } else { 50897 warn("FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly."); 50898 } 50899 } 50900 } 50901 get hasTextContent() { 50902 return this._hasAppearance; 50903 } 50904 static createNewDict(annotation, xref, { 50905 apRef, 50906 ap 50907 }) { 50908 const { 50909 color, 50910 fontSize, 50911 oldAnnotation, 50912 rect, 50913 rotation, 50914 user, 50915 value 50916 } = annotation; 50917 const freetext = oldAnnotation || new Dict(xref); 50918 freetext.set("Type", Name.get("Annot")); 50919 freetext.set("Subtype", Name.get("FreeText")); 50920 if (oldAnnotation) { 50921 freetext.set("M", `D:${getModificationDate()}`); 50922 freetext.delete("RC"); 50923 } else { 50924 freetext.set("CreationDate", `D:${getModificationDate()}`); 50925 } 50926 freetext.set("Rect", rect); 50927 const da = `/Helv ${fontSize} Tf ${getPdfColor(color, true)}`; 50928 freetext.set("DA", da); 50929 freetext.set("Contents", stringToAsciiOrUTF16BE(value)); 50930 freetext.set("F", 4); 50931 freetext.set("Border", [0, 0, 0]); 50932 freetext.set("Rotate", rotation); 50933 if (user) { 50934 freetext.set("T", stringToAsciiOrUTF16BE(user)); 50935 } 50936 if (apRef || ap) { 50937 const n = new Dict(xref); 50938 freetext.set("AP", n); 50939 if (apRef) { 50940 n.set("N", apRef); 50941 } else { 50942 n.set("N", ap); 50943 } 50944 } 50945 return freetext; 50946 } 50947 static async createNewAppearanceStream(annotation, xref, params) { 50948 const { 50949 baseFontRef, 50950 evaluator, 50951 task 50952 } = params; 50953 const { 50954 color, 50955 fontSize, 50956 rect, 50957 rotation, 50958 value 50959 } = annotation; 50960 const resources = new Dict(xref); 50961 const font = new Dict(xref); 50962 if (baseFontRef) { 50963 font.set("Helv", baseFontRef); 50964 } else { 50965 const baseFont = new Dict(xref); 50966 baseFont.set("BaseFont", Name.get("Helvetica")); 50967 baseFont.set("Type", Name.get("Font")); 50968 baseFont.set("Subtype", Name.get("Type1")); 50969 baseFont.set("Encoding", Name.get("WinAnsiEncoding")); 50970 font.set("Helv", baseFont); 50971 } 50972 resources.set("Font", font); 50973 const helv = await WidgetAnnotation._getFontData(evaluator, task, { 50974 fontName: "Helv", 50975 fontSize 50976 }, resources); 50977 const [x1, y1, x2, y2] = rect; 50978 let w = x2 - x1; 50979 let h = y2 - y1; 50980 if (rotation % 180 !== 0) { 50981 [w, h] = [h, w]; 50982 } 50983 const lines = value.split("\n"); 50984 const scale = fontSize / 1000; 50985 let totalWidth = -Infinity; 50986 const encodedLines = []; 50987 for (let line of lines) { 50988 const encoded = helv.encodeString(line); 50989 if (encoded.length > 1) { 50990 return null; 50991 } 50992 line = encoded.join(""); 50993 encodedLines.push(line); 50994 let lineWidth = 0; 50995 const glyphs = helv.charsToGlyphs(line); 50996 for (const glyph of glyphs) { 50997 lineWidth += glyph.width * scale; 50998 } 50999 totalWidth = Math.max(totalWidth, lineWidth); 51000 } 51001 let hscale = 1; 51002 if (totalWidth > w) { 51003 hscale = w / totalWidth; 51004 } 51005 let vscale = 1; 51006 const lineHeight = LINE_FACTOR * fontSize; 51007 const lineAscent = (LINE_FACTOR - LINE_DESCENT_FACTOR) * fontSize; 51008 const totalHeight = lineHeight * lines.length; 51009 if (totalHeight > h) { 51010 vscale = h / totalHeight; 51011 } 51012 const fscale = Math.min(hscale, vscale); 51013 const newFontSize = fontSize * fscale; 51014 let firstPoint, clipBox, matrix; 51015 switch (rotation) { 51016 case 0: 51017 matrix = [1, 0, 0, 1]; 51018 clipBox = [rect[0], rect[1], w, h]; 51019 firstPoint = [rect[0], rect[3] - lineAscent]; 51020 break; 51021 case 90: 51022 matrix = [0, 1, -1, 0]; 51023 clipBox = [rect[1], -rect[2], w, h]; 51024 firstPoint = [rect[1], -rect[0] - lineAscent]; 51025 break; 51026 case 180: 51027 matrix = [-1, 0, 0, -1]; 51028 clipBox = [-rect[2], -rect[3], w, h]; 51029 firstPoint = [-rect[2], -rect[1] - lineAscent]; 51030 break; 51031 case 270: 51032 matrix = [0, -1, 1, 0]; 51033 clipBox = [-rect[3], rect[0], w, h]; 51034 firstPoint = [-rect[3], rect[2] - lineAscent]; 51035 break; 51036 } 51037 const buffer = ["q", `${matrix.join(" ")} 0 0 cm`, `${clipBox.join(" ")} re W n`, `BT`, `${getPdfColor(color, true)}`, `0 Tc /Helv ${numberToString(newFontSize)} Tf`]; 51038 buffer.push(`${firstPoint.join(" ")} Td (${escapeString(encodedLines[0])}) Tj`); 51039 const vShift = numberToString(lineHeight); 51040 for (let i = 1, ii = encodedLines.length; i < ii; i++) { 51041 const line = encodedLines[i]; 51042 buffer.push(`0 -${vShift} Td (${escapeString(line)}) Tj`); 51043 } 51044 buffer.push("ET", "Q"); 51045 const appearance = buffer.join("\n"); 51046 const appearanceStreamDict = new Dict(xref); 51047 appearanceStreamDict.set("FormType", 1); 51048 appearanceStreamDict.set("Subtype", Name.get("Form")); 51049 appearanceStreamDict.set("Type", Name.get("XObject")); 51050 appearanceStreamDict.set("BBox", rect); 51051 appearanceStreamDict.set("Resources", resources); 51052 appearanceStreamDict.set("Matrix", [1, 0, 0, 1, -rect[0], -rect[1]]); 51053 const ap = new StringStream(appearance); 51054 ap.dict = appearanceStreamDict; 51055 return ap; 51056 } 51057} 51058class LineAnnotation extends MarkupAnnotation { 51059 constructor(params) { 51060 super(params); 51061 const { 51062 dict, 51063 xref 51064 } = params; 51065 this.data.annotationType = AnnotationType.LINE; 51066 this.data.hasOwnCanvas = this.data.noRotate; 51067 this.data.noHTML = false; 51068 const lineCoordinates = lookupRect(dict.getArray("L"), [0, 0, 0, 0]); 51069 this.data.lineCoordinates = Util.normalizeRect(lineCoordinates); 51070 this.setLineEndings(dict.getArray("LE")); 51071 this.data.lineEndings = this.lineEndings; 51072 if (!this.appearance) { 51073 const strokeColor = this.color ? getPdfColorArray(this.color) : [0, 0, 0]; 51074 const strokeAlpha = dict.get("CA"); 51075 const interiorColor = getRgbColor(dict.getArray("IC"), null); 51076 const fillColor = interiorColor ? getPdfColorArray(interiorColor) : null; 51077 const fillAlpha = fillColor ? strokeAlpha : null; 51078 const borderWidth = this.borderStyle.width || 1, 51079 borderAdjust = 2 * borderWidth; 51080 const bbox = [this.data.lineCoordinates[0] - borderAdjust, this.data.lineCoordinates[1] - borderAdjust, this.data.lineCoordinates[2] + borderAdjust, this.data.lineCoordinates[3] + borderAdjust]; 51081 if (!Util.intersect(this.rectangle, bbox)) { 51082 this.rectangle = bbox; 51083 } 51084 this._setDefaultAppearance({ 51085 xref, 51086 extra: `${borderWidth} w`, 51087 strokeColor, 51088 fillColor, 51089 strokeAlpha, 51090 fillAlpha, 51091 pointsCallback: (buffer, points) => { 51092 buffer.push(`${lineCoordinates[0]} ${lineCoordinates[1]} m`, `${lineCoordinates[2]} ${lineCoordinates[3]} l`, "S"); 51093 return [points[0] - borderWidth, points[2] + borderWidth, points[7] - borderWidth, points[3] + borderWidth]; 51094 } 51095 }); 51096 } 51097 } 51098} 51099class SquareAnnotation extends MarkupAnnotation { 51100 constructor(params) { 51101 super(params); 51102 const { 51103 dict, 51104 xref 51105 } = params; 51106 this.data.annotationType = AnnotationType.SQUARE; 51107 this.data.hasOwnCanvas = this.data.noRotate; 51108 this.data.noHTML = false; 51109 if (!this.appearance) { 51110 const strokeColor = this.color ? getPdfColorArray(this.color) : [0, 0, 0]; 51111 const strokeAlpha = dict.get("CA"); 51112 const interiorColor = getRgbColor(dict.getArray("IC"), null); 51113 const fillColor = interiorColor ? getPdfColorArray(interiorColor) : null; 51114 const fillAlpha = fillColor ? strokeAlpha : null; 51115 if (this.borderStyle.width === 0 && !fillColor) { 51116 return; 51117 } 51118 this._setDefaultAppearance({ 51119 xref, 51120 extra: `${this.borderStyle.width} w`, 51121 strokeColor, 51122 fillColor, 51123 strokeAlpha, 51124 fillAlpha, 51125 pointsCallback: (buffer, points) => { 51126 const x = points[4] + this.borderStyle.width / 2; 51127 const y = points[5] + this.borderStyle.width / 2; 51128 const width = points[6] - points[4] - this.borderStyle.width; 51129 const height = points[3] - points[7] - this.borderStyle.width; 51130 buffer.push(`${x} ${y} ${width} ${height} re`); 51131 if (fillColor) { 51132 buffer.push("B"); 51133 } else { 51134 buffer.push("S"); 51135 } 51136 return [points[0], points[2], points[7], points[3]]; 51137 } 51138 }); 51139 } 51140 } 51141} 51142class CircleAnnotation extends MarkupAnnotation { 51143 constructor(params) { 51144 super(params); 51145 const { 51146 dict, 51147 xref 51148 } = params; 51149 this.data.annotationType = AnnotationType.CIRCLE; 51150 if (!this.appearance) { 51151 const strokeColor = this.color ? getPdfColorArray(this.color) : [0, 0, 0]; 51152 const strokeAlpha = dict.get("CA"); 51153 const interiorColor = getRgbColor(dict.getArray("IC"), null); 51154 const fillColor = interiorColor ? getPdfColorArray(interiorColor) : null; 51155 const fillAlpha = fillColor ? strokeAlpha : null; 51156 if (this.borderStyle.width === 0 && !fillColor) { 51157 return; 51158 } 51159 const controlPointsDistance = 4 / 3 * Math.tan(Math.PI / (2 * 4)); 51160 this._setDefaultAppearance({ 51161 xref, 51162 extra: `${this.borderStyle.width} w`, 51163 strokeColor, 51164 fillColor, 51165 strokeAlpha, 51166 fillAlpha, 51167 pointsCallback: (buffer, points) => { 51168 const x0 = points[0] + this.borderStyle.width / 2; 51169 const y0 = points[1] - this.borderStyle.width / 2; 51170 const x1 = points[6] - this.borderStyle.width / 2; 51171 const y1 = points[7] + this.borderStyle.width / 2; 51172 const xMid = x0 + (x1 - x0) / 2; 51173 const yMid = y0 + (y1 - y0) / 2; 51174 const xOffset = (x1 - x0) / 2 * controlPointsDistance; 51175 const yOffset = (y1 - y0) / 2 * controlPointsDistance; 51176 buffer.push(`${xMid} ${y1} m`, `${xMid + xOffset} ${y1} ${x1} ${yMid + yOffset} ${x1} ${yMid} c`, `${x1} ${yMid - yOffset} ${xMid + xOffset} ${y0} ${xMid} ${y0} c`, `${xMid - xOffset} ${y0} ${x0} ${yMid - yOffset} ${x0} ${yMid} c`, `${x0} ${yMid + yOffset} ${xMid - xOffset} ${y1} ${xMid} ${y1} c`, "h"); 51177 if (fillColor) { 51178 buffer.push("B"); 51179 } else { 51180 buffer.push("S"); 51181 } 51182 return [points[0], points[2], points[7], points[3]]; 51183 } 51184 }); 51185 } 51186 } 51187} 51188class PolylineAnnotation extends MarkupAnnotation { 51189 constructor(params) { 51190 super(params); 51191 const { 51192 dict, 51193 xref 51194 } = params; 51195 this.data.annotationType = AnnotationType.POLYLINE; 51196 this.data.hasOwnCanvas = this.data.noRotate; 51197 this.data.noHTML = false; 51198 this.data.vertices = null; 51199 if (!(this instanceof PolygonAnnotation)) { 51200 this.setLineEndings(dict.getArray("LE")); 51201 this.data.lineEndings = this.lineEndings; 51202 } 51203 const rawVertices = dict.getArray("Vertices"); 51204 if (!isNumberArray(rawVertices, null)) { 51205 return; 51206 } 51207 const vertices = this.data.vertices = Float32Array.from(rawVertices); 51208 if (!this.appearance) { 51209 const strokeColor = this.color ? getPdfColorArray(this.color) : [0, 0, 0]; 51210 const strokeAlpha = dict.get("CA"); 51211 const borderWidth = this.borderStyle.width || 1, 51212 borderAdjust = 2 * borderWidth; 51213 const bbox = [Infinity, Infinity, -Infinity, -Infinity]; 51214 for (let i = 0, ii = vertices.length; i < ii; i += 2) { 51215 bbox[0] = Math.min(bbox[0], vertices[i] - borderAdjust); 51216 bbox[1] = Math.min(bbox[1], vertices[i + 1] - borderAdjust); 51217 bbox[2] = Math.max(bbox[2], vertices[i] + borderAdjust); 51218 bbox[3] = Math.max(bbox[3], vertices[i + 1] + borderAdjust); 51219 } 51220 if (!Util.intersect(this.rectangle, bbox)) { 51221 this.rectangle = bbox; 51222 } 51223 this._setDefaultAppearance({ 51224 xref, 51225 extra: `${borderWidth} w`, 51226 strokeColor, 51227 strokeAlpha, 51228 pointsCallback: (buffer, points) => { 51229 for (let i = 0, ii = vertices.length; i < ii; i += 2) { 51230 buffer.push(`${vertices[i]} ${vertices[i + 1]} ${i === 0 ? "m" : "l"}`); 51231 } 51232 buffer.push("S"); 51233 return [points[0], points[2], points[7], points[3]]; 51234 } 51235 }); 51236 } 51237 } 51238} 51239class PolygonAnnotation extends PolylineAnnotation { 51240 constructor(params) { 51241 super(params); 51242 this.data.annotationType = AnnotationType.POLYGON; 51243 } 51244} 51245class CaretAnnotation extends MarkupAnnotation { 51246 constructor(params) { 51247 super(params); 51248 this.data.annotationType = AnnotationType.CARET; 51249 } 51250} 51251class InkAnnotation extends MarkupAnnotation { 51252 constructor(params) { 51253 super(params); 51254 this.data.hasOwnCanvas = this.data.noRotate; 51255 this.data.noHTML = false; 51256 const { 51257 dict, 51258 xref 51259 } = params; 51260 this.data.annotationType = AnnotationType.INK; 51261 this.data.inkLists = []; 51262 this.data.isEditable = !this.data.noHTML; 51263 this.data.noHTML = false; 51264 this.data.opacity = dict.get("CA") || 1; 51265 const rawInkLists = dict.getArray("InkList"); 51266 if (!Array.isArray(rawInkLists)) { 51267 return; 51268 } 51269 for (let i = 0, ii = rawInkLists.length; i < ii; ++i) { 51270 if (!Array.isArray(rawInkLists[i])) { 51271 continue; 51272 } 51273 const inkList = new Float32Array(rawInkLists[i].length); 51274 this.data.inkLists.push(inkList); 51275 for (let j = 0, jj = rawInkLists[i].length; j < jj; j += 2) { 51276 const x = xref.fetchIfRef(rawInkLists[i][j]), 51277 y = xref.fetchIfRef(rawInkLists[i][j + 1]); 51278 if (typeof x === "number" && typeof y === "number") { 51279 inkList[j] = x; 51280 inkList[j + 1] = y; 51281 } 51282 } 51283 } 51284 if (!this.appearance) { 51285 const strokeColor = this.color ? getPdfColorArray(this.color) : [0, 0, 0]; 51286 const strokeAlpha = dict.get("CA"); 51287 const borderWidth = this.borderStyle.width || 1, 51288 borderAdjust = 2 * borderWidth; 51289 const bbox = [Infinity, Infinity, -Infinity, -Infinity]; 51290 for (const inkList of this.data.inkLists) { 51291 for (let i = 0, ii = inkList.length; i < ii; i += 2) { 51292 bbox[0] = Math.min(bbox[0], inkList[i] - borderAdjust); 51293 bbox[1] = Math.min(bbox[1], inkList[i + 1] - borderAdjust); 51294 bbox[2] = Math.max(bbox[2], inkList[i] + borderAdjust); 51295 bbox[3] = Math.max(bbox[3], inkList[i + 1] + borderAdjust); 51296 } 51297 } 51298 if (!Util.intersect(this.rectangle, bbox)) { 51299 this.rectangle = bbox; 51300 } 51301 this._setDefaultAppearance({ 51302 xref, 51303 extra: `${borderWidth} w`, 51304 strokeColor, 51305 strokeAlpha, 51306 pointsCallback: (buffer, points) => { 51307 for (const inkList of this.data.inkLists) { 51308 for (let i = 0, ii = inkList.length; i < ii; i += 2) { 51309 buffer.push(`${inkList[i]} ${inkList[i + 1]} ${i === 0 ? "m" : "l"}`); 51310 } 51311 buffer.push("S"); 51312 } 51313 return [points[0], points[2], points[7], points[3]]; 51314 } 51315 }); 51316 } 51317 } 51318 static createNewDict(annotation, xref, { 51319 apRef, 51320 ap 51321 }) { 51322 const { 51323 oldAnnotation, 51324 color, 51325 opacity, 51326 paths, 51327 outlines, 51328 rect, 51329 rotation, 51330 thickness, 51331 user 51332 } = annotation; 51333 const ink = oldAnnotation || new Dict(xref); 51334 ink.set("Type", Name.get("Annot")); 51335 ink.set("Subtype", Name.get("Ink")); 51336 ink.set(oldAnnotation ? "M" : "CreationDate", `D:${getModificationDate()}`); 51337 ink.set("Rect", rect); 51338 ink.set("InkList", outlines?.points || paths.points); 51339 ink.set("F", 4); 51340 ink.set("Rotate", rotation); 51341 if (user) { 51342 ink.set("T", stringToAsciiOrUTF16BE(user)); 51343 } 51344 if (outlines) { 51345 ink.set("IT", Name.get("InkHighlight")); 51346 } 51347 const bs = new Dict(xref); 51348 ink.set("BS", bs); 51349 bs.set("W", thickness); 51350 ink.set("C", Array.from(color, c => c / 255)); 51351 ink.set("CA", opacity); 51352 const n = new Dict(xref); 51353 ink.set("AP", n); 51354 if (apRef) { 51355 n.set("N", apRef); 51356 } else { 51357 n.set("N", ap); 51358 } 51359 return ink; 51360 } 51361 static async createNewAppearanceStream(annotation, xref, params) { 51362 if (annotation.outlines) { 51363 return this.createNewAppearanceStreamForHighlight(annotation, xref, params); 51364 } 51365 const { 51366 color, 51367 rect, 51368 paths, 51369 thickness, 51370 opacity 51371 } = annotation; 51372 const appearanceBuffer = [`${thickness} w 1 J 1 j`, `${getPdfColor(color, false)}`]; 51373 if (opacity !== 1) { 51374 appearanceBuffer.push("/R0 gs"); 51375 } 51376 for (const outline of paths.lines) { 51377 appearanceBuffer.push(`${numberToString(outline[4])} ${numberToString(outline[5])} m`); 51378 for (let i = 6, ii = outline.length; i < ii; i += 6) { 51379 if (isNaN(outline[i])) { 51380 appearanceBuffer.push(`${numberToString(outline[i + 4])} ${numberToString(outline[i + 5])} l`); 51381 } else { 51382 const [c1x, c1y, c2x, c2y, x, y] = outline.slice(i, i + 6); 51383 appearanceBuffer.push([c1x, c1y, c2x, c2y, x, y].map(numberToString).join(" ") + " c"); 51384 } 51385 } 51386 if (outline.length === 6) { 51387 appearanceBuffer.push(`${numberToString(outline[4])} ${numberToString(outline[5])} l`); 51388 } 51389 } 51390 appearanceBuffer.push("S"); 51391 const appearance = appearanceBuffer.join("\n"); 51392 const appearanceStreamDict = new Dict(xref); 51393 appearanceStreamDict.set("FormType", 1); 51394 appearanceStreamDict.set("Subtype", Name.get("Form")); 51395 appearanceStreamDict.set("Type", Name.get("XObject")); 51396 appearanceStreamDict.set("BBox", rect); 51397 appearanceStreamDict.set("Length", appearance.length); 51398 if (opacity !== 1) { 51399 const resources = new Dict(xref); 51400 const extGState = new Dict(xref); 51401 const r0 = new Dict(xref); 51402 r0.set("CA", opacity); 51403 r0.set("Type", Name.get("ExtGState")); 51404 extGState.set("R0", r0); 51405 resources.set("ExtGState", extGState); 51406 appearanceStreamDict.set("Resources", resources); 51407 } 51408 const ap = new StringStream(appearance); 51409 ap.dict = appearanceStreamDict; 51410 return ap; 51411 } 51412 static async createNewAppearanceStreamForHighlight(annotation, xref, params) { 51413 const { 51414 color, 51415 rect, 51416 outlines: { 51417 outline 51418 }, 51419 opacity 51420 } = annotation; 51421 const appearanceBuffer = [`${getPdfColor(color, true)}`, "/R0 gs"]; 51422 appearanceBuffer.push(`${numberToString(outline[4])} ${numberToString(outline[5])} m`); 51423 for (let i = 6, ii = outline.length; i < ii; i += 6) { 51424 if (isNaN(outline[i])) { 51425 appearanceBuffer.push(`${numberToString(outline[i + 4])} ${numberToString(outline[i + 5])} l`); 51426 } else { 51427 const [c1x, c1y, c2x, c2y, x, y] = outline.slice(i, i + 6); 51428 appearanceBuffer.push([c1x, c1y, c2x, c2y, x, y].map(numberToString).join(" ") + " c"); 51429 } 51430 } 51431 appearanceBuffer.push("h f"); 51432 const appearance = appearanceBuffer.join("\n"); 51433 const appearanceStreamDict = new Dict(xref); 51434 appearanceStreamDict.set("FormType", 1); 51435 appearanceStreamDict.set("Subtype", Name.get("Form")); 51436 appearanceStreamDict.set("Type", Name.get("XObject")); 51437 appearanceStreamDict.set("BBox", rect); 51438 appearanceStreamDict.set("Length", appearance.length); 51439 const resources = new Dict(xref); 51440 const extGState = new Dict(xref); 51441 resources.set("ExtGState", extGState); 51442 appearanceStreamDict.set("Resources", resources); 51443 const r0 = new Dict(xref); 51444 extGState.set("R0", r0); 51445 r0.set("BM", Name.get("Multiply")); 51446 if (opacity !== 1) { 51447 r0.set("ca", opacity); 51448 r0.set("Type", Name.get("ExtGState")); 51449 } 51450 const ap = new StringStream(appearance); 51451 ap.dict = appearanceStreamDict; 51452 return ap; 51453 } 51454} 51455class HighlightAnnotation extends MarkupAnnotation { 51456 constructor(params) { 51457 super(params); 51458 const { 51459 dict, 51460 xref 51461 } = params; 51462 this.data.annotationType = AnnotationType.HIGHLIGHT; 51463 this.data.isEditable = !this.data.noHTML; 51464 this.data.noHTML = false; 51465 this.data.opacity = dict.get("CA") || 1; 51466 const quadPoints = this.data.quadPoints = getQuadPoints(dict, null); 51467 if (quadPoints) { 51468 const resources = this.appearance?.dict.get("Resources"); 51469 if (!this.appearance || !resources?.has("ExtGState")) { 51470 if (this.appearance) { 51471 warn("HighlightAnnotation - ignoring built-in appearance stream."); 51472 } 51473 const fillColor = this.color ? getPdfColorArray(this.color) : [1, 1, 0]; 51474 const fillAlpha = dict.get("CA"); 51475 this._setDefaultAppearance({ 51476 xref, 51477 fillColor, 51478 blendMode: "Multiply", 51479 fillAlpha, 51480 pointsCallback: (buffer, points) => { 51481 buffer.push(`${points[0]} ${points[1]} m`, `${points[2]} ${points[3]} l`, `${points[6]} ${points[7]} l`, `${points[4]} ${points[5]} l`, "f"); 51482 return [points[0], points[2], points[7], points[3]]; 51483 } 51484 }); 51485 } 51486 } else { 51487 this.data.popupRef = null; 51488 } 51489 } 51490 static createNewDict(annotation, xref, { 51491 apRef, 51492 ap 51493 }) { 51494 const { 51495 color, 51496 oldAnnotation, 51497 opacity, 51498 rect, 51499 rotation, 51500 user, 51501 quadPoints 51502 } = annotation; 51503 const highlight = oldAnnotation || new Dict(xref); 51504 highlight.set("Type", Name.get("Annot")); 51505 highlight.set("Subtype", Name.get("Highlight")); 51506 highlight.set(oldAnnotation ? "M" : "CreationDate", `D:${getModificationDate()}`); 51507 highlight.set("CreationDate", `D:${getModificationDate()}`); 51508 highlight.set("Rect", rect); 51509 highlight.set("F", 4); 51510 highlight.set("Border", [0, 0, 0]); 51511 highlight.set("Rotate", rotation); 51512 highlight.set("QuadPoints", quadPoints); 51513 highlight.set("C", Array.from(color, c => c / 255)); 51514 highlight.set("CA", opacity); 51515 if (user) { 51516 highlight.set("T", stringToAsciiOrUTF16BE(user)); 51517 } 51518 if (apRef || ap) { 51519 const n = new Dict(xref); 51520 highlight.set("AP", n); 51521 n.set("N", apRef || ap); 51522 } 51523 return highlight; 51524 } 51525 static async createNewAppearanceStream(annotation, xref, params) { 51526 const { 51527 color, 51528 rect, 51529 outlines, 51530 opacity 51531 } = annotation; 51532 const appearanceBuffer = [`${getPdfColor(color, true)}`, "/R0 gs"]; 51533 const buffer = []; 51534 for (const outline of outlines) { 51535 buffer.length = 0; 51536 buffer.push(`${numberToString(outline[0])} ${numberToString(outline[1])} m`); 51537 for (let i = 2, ii = outline.length; i < ii; i += 2) { 51538 buffer.push(`${numberToString(outline[i])} ${numberToString(outline[i + 1])} l`); 51539 } 51540 buffer.push("h"); 51541 appearanceBuffer.push(buffer.join("\n")); 51542 } 51543 appearanceBuffer.push("f*"); 51544 const appearance = appearanceBuffer.join("\n"); 51545 const appearanceStreamDict = new Dict(xref); 51546 appearanceStreamDict.set("FormType", 1); 51547 appearanceStreamDict.set("Subtype", Name.get("Form")); 51548 appearanceStreamDict.set("Type", Name.get("XObject")); 51549 appearanceStreamDict.set("BBox", rect); 51550 appearanceStreamDict.set("Length", appearance.length); 51551 const resources = new Dict(xref); 51552 const extGState = new Dict(xref); 51553 resources.set("ExtGState", extGState); 51554 appearanceStreamDict.set("Resources", resources); 51555 const r0 = new Dict(xref); 51556 extGState.set("R0", r0); 51557 r0.set("BM", Name.get("Multiply")); 51558 if (opacity !== 1) { 51559 r0.set("ca", opacity);
51560 r0.set("Type", Name.get("ExtGState")); 51561 } 51562 const ap = new StringStream(appearance); 51563 ap.dict = appearanceStreamDict; 51564 return ap; 51565 } 51566} 51567class UnderlineAnnotation extends MarkupAnnotation { 51568 constructor(params) { 51569 super(params); 51570 const { 51571 dict, 51572 xref 51573 } = params; 51574 this.data.annotationType = AnnotationType.UNDERLINE; 51575 const quadPoints = this.data.quadPoints = getQuadPoints(dict, null); 51576 if (quadPoints) { 51577 if (!this.appearance) { 51578 const strokeColor = this.color ? getPdfColorArray(this.color) : [0, 0, 0]; 51579 const strokeAlpha = dict.get("CA"); 51580 this._setDefaultAppearance({ 51581 xref, 51582 extra: "[] 0 d 0.571 w", 51583 strokeColor, 51584 strokeAlpha, 51585 pointsCallback: (buffer, points) => { 51586 buffer.push(`${points[4]} ${points[5] + 1.3} m`, `${points[6]} ${points[7] + 1.3} l`, "S"); 51587 return [points[0], points[2], points[7], points[3]]; 51588 } 51589 }); 51590 } 51591 } else { 51592 this.data.popupRef = null; 51593 } 51594 } 51595} 51596class SquigglyAnnotation extends MarkupAnnotation { 51597 constructor(params) { 51598 super(params); 51599 const { 51600 dict, 51601 xref 51602 } = params; 51603 this.data.annotationType = AnnotationType.SQUIGGLY; 51604 const quadPoints = this.data.quadPoints = getQuadPoints(dict, null); 51605 if (quadPoints) { 51606 if (!this.appearance) { 51607 const strokeColor = this.color ? getPdfColorArray(this.color) : [0, 0, 0]; 51608 const strokeAlpha = dict.get("CA"); 51609 this._setDefaultAppearance({ 51610 xref, 51611 extra: "[] 0 d 1 w", 51612 strokeColor, 51613 strokeAlpha, 51614 pointsCallback: (buffer, points) => { 51615 const dy = (points[1] - points[5]) / 6; 51616 let shift = dy; 51617 let x = points[4]; 51618 const y = points[5]; 51619 const xEnd = points[6]; 51620 buffer.push(`${x} ${y + shift} m`); 51621 do { 51622 x += 2; 51623 shift = shift === 0 ? dy : 0; 51624 buffer.push(`${x} ${y + shift} l`); 51625 } while (x < xEnd); 51626 buffer.push("S"); 51627 return [points[4], xEnd, y - 2 * dy, y + 2 * dy]; 51628 } 51629 }); 51630 } 51631 } else { 51632 this.data.popupRef = null; 51633 } 51634 } 51635} 51636class StrikeOutAnnotation extends MarkupAnnotation { 51637 constructor(params) { 51638 super(params); 51639 const { 51640 dict, 51641 xref 51642 } = params; 51643 this.data.annotationType = AnnotationType.STRIKEOUT; 51644 const quadPoints = this.data.quadPoints = getQuadPoints(dict, null); 51645 if (quadPoints) { 51646 if (!this.appearance) { 51647 const strokeColor = this.color ? getPdfColorArray(this.color) : [0, 0, 0]; 51648 const strokeAlpha = dict.get("CA"); 51649 this._setDefaultAppearance({ 51650 xref, 51651 extra: "[] 0 d 1 w", 51652 strokeColor, 51653 strokeAlpha, 51654 pointsCallback: (buffer, points) => { 51655 buffer.push(`${(points[0] + points[4]) / 2} ` + `${(points[1] + points[5]) / 2} m`, `${(points[2] + points[6]) / 2} ` + `${(points[3] + points[7]) / 2} l`, "S"); 51656 return [points[0], points[2], points[7], points[3]]; 51657 } 51658 }); 51659 } 51660 } else { 51661 this.data.popupRef = null; 51662 } 51663 } 51664} 51665class StampAnnotation extends MarkupAnnotation { 51666 #savedHasOwnCanvas; 51667 constructor(params) { 51668 super(params); 51669 this.data.annotationType = AnnotationType.STAMP; 51670 this.#savedHasOwnCanvas = this.data.hasOwnCanvas = this.data.noRotate; 51671 this.data.isEditable = !this.data.noHTML; 51672 this.data.noHTML = false; 51673 } 51674 mustBeViewedWhenEditing(isEditing, modifiedIds = null) { 51675 if (isEditing) { 51676 if (!this.data.isEditable) { 51677 return false; 51678 } 51679 this.#savedHasOwnCanvas = this.data.hasOwnCanvas; 51680 this.data.hasOwnCanvas = true; 51681 return true; 51682 } 51683 this.data.hasOwnCanvas = this.#savedHasOwnCanvas; 51684 return !modifiedIds?.has(this.data.id); 51685 } 51686 static async createImage(bitmap, xref) { 51687 const { 51688 width, 51689 height 51690 } = bitmap; 51691 const canvas = new OffscreenCanvas(width, height); 51692 const ctx = canvas.getContext("2d", { 51693 alpha: true 51694 }); 51695 ctx.drawImage(bitmap, 0, 0); 51696 const data = ctx.getImageData(0, 0, width, height).data; 51697 const buf32 = new Uint32Array(data.buffer); 51698 const hasAlpha = buf32.some(FeatureTest.isLittleEndian ? x => x >>> 24 !== 0xff : x => (x & 0xff) !== 0xff); 51699 if (hasAlpha) { 51700 ctx.fillStyle = "white"; 51701 ctx.fillRect(0, 0, width, height); 51702 ctx.drawImage(bitmap, 0, 0); 51703 } 51704 const jpegBufferPromise = canvas.convertToBlob({ 51705 type: "image/jpeg", 51706 quality: 1 51707 }).then(blob => blob.arrayBuffer()); 51708 const xobjectName = Name.get("XObject"); 51709 const imageName = Name.get("Image"); 51710 const image = new Dict(xref); 51711 image.set("Type", xobjectName); 51712 image.set("Subtype", imageName); 51713 image.set("BitsPerComponent", 8); 51714 image.set("ColorSpace", Name.get("DeviceRGB")); 51715 image.set("Filter", Name.get("DCTDecode")); 51716 image.set("BBox", [0, 0, width, height]); 51717 image.set("Width", width); 51718 image.set("Height", height); 51719 let smaskStream = null; 51720 if (hasAlpha) {
vendor: 5,174 bytes, lines 51721-51909
51721 const alphaBuffer = new Uint8Array(buf32.length); 51722 if (FeatureTest.isLittleEndian) { 51723 for (let i = 0, ii = buf32.length; i < ii; i++) { 51724 alphaBuffer[i] = buf32[i] >>> 24; 51725 } 51726 } else { 51727 for (let i = 0, ii = buf32.length; i < ii; i++) { 51728 alphaBuffer[i] = buf32[i] & 0xff; 51729 } 51730 } 51731 const smask = new Dict(xref); 51732 smask.set("Type", xobjectName); 51733 smask.set("Subtype", imageName); 51734 smask.set("BitsPerComponent", 8); 51735 smask.set("ColorSpace", Name.get("DeviceGray")); 51736 smask.set("Width", width); 51737 smask.set("Height", height); 51738 smaskStream = new Stream(alphaBuffer, 0, 0, smask); 51739 } 51740 const imageStream = new Stream(await jpegBufferPromise, 0, 0, image); 51741 return { 51742 imageStream, 51743 smaskStream, 51744 width, 51745 height 51746 }; 51747 } 51748 static createNewDict(annotation, xref, { 51749 apRef, 51750 ap 51751 }) { 51752 const { 51753 oldAnnotation, 51754 rect, 51755 rotation, 51756 user 51757 } = annotation; 51758 const stamp = oldAnnotation || new Dict(xref); 51759 stamp.set("Type", Name.get("Annot")); 51760 stamp.set("Subtype", Name.get("Stamp")); 51761 stamp.set(oldAnnotation ? "M" : "CreationDate", `D:${getModificationDate()}`); 51762 stamp.set("Rect", rect); 51763 stamp.set("F", 4); 51764 stamp.set("Border", [0, 0, 0]); 51765 stamp.set("Rotate", rotation); 51766 if (user) { 51767 stamp.set("T", stringToAsciiOrUTF16BE(user)); 51768 } 51769 if (apRef || ap) { 51770 const n = new Dict(xref); 51771 stamp.set("AP", n); 51772 if (apRef) { 51773 n.set("N", apRef); 51774 } else { 51775 n.set("N", ap); 51776 } 51777 } 51778 return stamp; 51779 } 51780 static async createNewAppearanceStream(annotation, xref, params) { 51781 if (annotation.oldAnnotation) { 51782 return null; 51783 } 51784 const { 51785 rotation 51786 } = annotation; 51787 const { 51788 imageRef, 51789 width, 51790 height 51791 } = params.image; 51792 const resources = new Dict(xref); 51793 const xobject = new Dict(xref); 51794 resources.set("XObject", xobject); 51795 xobject.set("Im0", imageRef); 51796 const appearance = `q ${width} 0 0 ${height} 0 0 cm /Im0 Do Q`; 51797 const appearanceStreamDict = new Dict(xref); 51798 appearanceStreamDict.set("FormType", 1); 51799 appearanceStreamDict.set("Subtype", Name.get("Form")); 51800 appearanceStreamDict.set("Type", Name.get("XObject")); 51801 appearanceStreamDict.set("BBox", [0, 0, width, height]); 51802 appearanceStreamDict.set("Resources", resources); 51803 if (rotation) { 51804 const matrix = getRotationMatrix(rotation, width, height); 51805 appearanceStreamDict.set("Matrix", matrix); 51806 } 51807 const ap = new StringStream(appearance); 51808 ap.dict = appearanceStreamDict; 51809 return ap; 51810 } 51811} 51812class FileAttachmentAnnotation extends MarkupAnnotation { 51813 constructor(params) { 51814 super(params); 51815 const { 51816 dict, 51817 xref 51818 } = params; 51819 const file = new FileSpec(dict.get("FS"), xref); 51820 this.data.annotationType = AnnotationType.FILEATTACHMENT; 51821 this.data.hasOwnCanvas = this.data.noRotate; 51822 this.data.noHTML = false; 51823 this.data.file = file.serializable; 51824 const name = dict.get("Name"); 51825 this.data.name = name instanceof Name ? stringToPDFString(name.name) : "PushPin"; 51826 const fillAlpha = dict.get("ca"); 51827 this.data.fillAlpha = typeof fillAlpha === "number" && fillAlpha >= 0 && fillAlpha <= 1 ? fillAlpha : null; 51828 } 51829} 51830 51831;// ./src/core/decrypt_stream.js 51832 51833const chunkSize = 512; 51834class DecryptStream extends DecodeStream { 51835 constructor(str, maybeLength, decrypt) { 51836 super(maybeLength); 51837 this.str = str; 51838 this.dict = str.dict; 51839 this.decrypt = decrypt; 51840 this.nextChunk = null; 51841 this.initialized = false; 51842 } 51843 readBlock() { 51844 let chunk; 51845 if (this.initialized) { 51846 chunk = this.nextChunk; 51847 } else { 51848 chunk = this.str.getBytes(chunkSize); 51849 this.initialized = true; 51850 } 51851 if (!chunk?.length) { 51852 this.eof = true; 51853 return; 51854 } 51855 this.nextChunk = this.str.getBytes(chunkSize); 51856 const hasMoreData = this.nextChunk?.length > 0; 51857 const decrypt = this.decrypt; 51858 chunk = decrypt(chunk, !hasMoreData); 51859 const bufferLength = this.bufferLength, 51860 newLength = bufferLength + chunk.length, 51861 buffer = this.ensureBuffer(newLength); 51862 buffer.set(chunk, bufferLength); 51863 this.bufferLength = newLength; 51864 } 51865} 51866 51867;// ./src/core/crypto.js 51868 51869 51870 51871class ARCFourCipher { 51872 constructor(key) { 51873 this.a = 0; 51874 this.b = 0; 51875 const s = new Uint8Array(256); 51876 const keyLength = key.length; 51877 for (let i = 0; i < 256; ++i) { 51878 s[i] = i; 51879 } 51880 for (let i = 0, j = 0; i < 256; ++i) { 51881 const tmp = s[i]; 51882 j = j + tmp + key[i % keyLength] & 0xff; 51883 s[i] = s[j]; 51884 s[j] = tmp; 51885 } 51886 this.s = s; 51887 } 51888 encryptBlock(data) { 51889 let a = this.a, 51890 b = this.b; 51891 const s = this.s; 51892 const n = data.length; 51893 const output = new Uint8Array(n); 51894 for (let i = 0; i < n; ++i) { 51895 a = a + 1 & 0xff; 51896 const tmp = s[a]; 51897 b = b + tmp & 0xff; 51898 const tmp2 = s[b]; 51899 s[a] = tmp2; 51900 s[b] = tmp; 51901 output[i] = data[i] ^ s[tmp + tmp2 & 0xff]; 51902 } 51903 this.a = a; 51904 this.b = b; 51905 return output; 51906 } 51907 decryptBlock(data) { 51908 return this.encryptBlock(data); 51909 }
51910 encrypt(data) { 51911 return this.encryptBlock(data); 51912 } 51913} 51914const calculateMD5 = function calculateMD5Closure() { 51915 const r = new Uint8Array([7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]); 51916 const k = new Int32Array([-680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426, -1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162, 1804603682, -40341101, -1502002290, 1236535329, -165796510, -1069501632, 643717713, -373897302, -701558691, 38016083, -660478335, -405537848, 568446438, -1019803690, -187363961, 1163531501, -1444681467, -51403784, 1735328473, -1926607734, -378558, -2022574463, 1839030562, -35309556, -1530992060, 1272893353, -155497632, -1094730640, 681279174, -358537222, -722521979, 76029189, -640364487, -421815835, 530742520, -995338651, -198630844, 1126891415, -1416354905, -57434055, 1700485571, -1894986606, -1051523, -2054922799, 1873313359, -30611744, -1560198380, 1309151649, -145523070, -1120210379, 718787259, -343485551]); 51917 function hash(data, offset, length) { 51918 let h0 = 1732584193, 51919 h1 = -271733879, 51920 h2 = -1732584194, 51921 h3 = 271733878; 51922 const paddedLength = length + 72 & ~63; 51923 const padded = new Uint8Array(paddedLength); 51924 let i, j; 51925 for (i = 0; i < length; ++i) { 51926 padded[i] = data[offset++]; 51927 } 51928 padded[i++] = 0x80; 51929 const n = paddedLength - 8; 51930 while (i < n) { 51931 padded[i++] = 0; 51932 } 51933 padded[i++] = length << 3 & 0xff; 51934 padded[i++] = length >> 5 & 0xff;
vendor: 5,451 bytes, lines 51935-52108
51935 padded[i++] = length >> 13 & 0xff; 51936 padded[i++] = length >> 21 & 0xff; 51937 padded[i++] = length >>> 29 & 0xff; 51938 padded[i++] = 0; 51939 padded[i++] = 0; 51940 padded[i++] = 0; 51941 const w = new Int32Array(16); 51942 for (i = 0; i < paddedLength;) { 51943 for (j = 0; j < 16; ++j, i += 4) { 51944 w[j] = padded[i] | padded[i + 1] << 8 | padded[i + 2] << 16 | padded[i + 3] << 24; 51945 } 51946 let a = h0, 51947 b = h1, 51948 c = h2, 51949 d = h3, 51950 f, 51951 g; 51952 for (j = 0; j < 64; ++j) { 51953 if (j < 16) { 51954 f = b & c | ~b & d; 51955 g = j; 51956 } else if (j < 32) { 51957 f = d & b | ~d & c; 51958 g = 5 * j + 1 & 15; 51959 } else if (j < 48) { 51960 f = b ^ c ^ d; 51961 g = 3 * j + 5 & 15; 51962 } else { 51963 f = c ^ (b | ~d); 51964 g = 7 * j & 15; 51965 } 51966 const tmp = d, 51967 rotateArg = a + f + k[j] + w[g] | 0, 51968 rotate = r[j]; 51969 d = c; 51970 c = b; 51971 b = b + (rotateArg << rotate | rotateArg >>> 32 - rotate) | 0; 51972 a = tmp; 51973 } 51974 h0 = h0 + a | 0; 51975 h1 = h1 + b | 0; 51976 h2 = h2 + c | 0; 51977 h3 = h3 + d | 0; 51978 } 51979 return new Uint8Array([h0 & 0xFF, h0 >> 8 & 0xFF, h0 >> 16 & 0xFF, h0 >>> 24 & 0xFF, h1 & 0xFF, h1 >> 8 & 0xFF, h1 >> 16 & 0xFF, h1 >>> 24 & 0xFF, h2 & 0xFF, h2 >> 8 & 0xFF, h2 >> 16 & 0xFF, h2 >>> 24 & 0xFF, h3 & 0xFF, h3 >> 8 & 0xFF, h3 >> 16 & 0xFF, h3 >>> 24 & 0xFF]); 51980 } 51981 return hash; 51982}(); 51983class Word64 { 51984 constructor(highInteger, lowInteger) { 51985 this.high = highInteger | 0; 51986 this.low = lowInteger | 0; 51987 } 51988 and(word) { 51989 this.high &= word.high; 51990 this.low &= word.low; 51991 } 51992 xor(word) { 51993 this.high ^= word.high; 51994 this.low ^= word.low; 51995 } 51996 or(word) { 51997 this.high |= word.high; 51998 this.low |= word.low; 51999 } 52000 shiftRight(places) { 52001 if (places >= 32) { 52002 this.low = this.high >>> places - 32 | 0; 52003 this.high = 0; 52004 } else { 52005 this.low = this.low >>> places | this.high << 32 - places; 52006 this.high = this.high >>> places | 0; 52007 } 52008 } 52009 shiftLeft(places) { 52010 if (places >= 32) { 52011 this.high = this.low << places - 32; 52012 this.low = 0; 52013 } else { 52014 this.high = this.high << places | this.low >>> 32 - places; 52015 this.low <<= places; 52016 } 52017 } 52018 rotateRight(places) { 52019 let low, high; 52020 if (places & 32) { 52021 high = this.low; 52022 low = this.high; 52023 } else { 52024 low = this.low; 52025 high = this.high; 52026 } 52027 places &= 31; 52028 this.low = low >>> places | high << 32 - places; 52029 this.high = high >>> places | low << 32 - places; 52030 } 52031 not() { 52032 this.high = ~this.high; 52033 this.low = ~this.low; 52034 } 52035 add(word) { 52036 const lowAdd = (this.low >>> 0) + (word.low >>> 0); 52037 let highAdd = (this.high >>> 0) + (word.high >>> 0); 52038 if (lowAdd > 0xffffffff) { 52039 highAdd += 1; 52040 } 52041 this.low = lowAdd | 0; 52042 this.high = highAdd | 0; 52043 } 52044 copyTo(bytes, offset) { 52045 bytes[offset] = this.high >>> 24 & 0xff; 52046 bytes[offset + 1] = this.high >> 16 & 0xff; 52047 bytes[offset + 2] = this.high >> 8 & 0xff; 52048 bytes[offset + 3] = this.high & 0xff; 52049 bytes[offset + 4] = this.low >>> 24 & 0xff; 52050 bytes[offset + 5] = this.low >> 16 & 0xff; 52051 bytes[offset + 6] = this.low >> 8 & 0xff; 52052 bytes[offset + 7] = this.low & 0xff; 52053 } 52054 assign(word) { 52055 this.high = word.high; 52056 this.low = word.low; 52057 } 52058} 52059const calculateSHA256 = function calculateSHA256Closure() { 52060 function rotr(x, n) { 52061 return x >>> n | x << 32 - n; 52062 } 52063 function ch(x, y, z) { 52064 return x & y ^ ~x & z; 52065 } 52066 function maj(x, y, z) { 52067 return x & y ^ x & z ^ y & z; 52068 } 52069 function sigma(x) { 52070 return rotr(x, 2) ^ rotr(x, 13) ^ rotr(x, 22); 52071 } 52072 function sigmaPrime(x) { 52073 return rotr(x, 6) ^ rotr(x, 11) ^ rotr(x, 25); 52074 } 52075 function littleSigma(x) { 52076 return rotr(x, 7) ^ rotr(x, 18) ^ x >>> 3; 52077 } 52078 function littleSigmaPrime(x) { 52079 return rotr(x, 17) ^ rotr(x, 19) ^ x >>> 10; 52080 } 52081 const k = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2]; 52082 function hash(data, offset, length) { 52083 let h0 = 0x6a09e667, 52084 h1 = 0xbb67ae85, 52085 h2 = 0x3c6ef372, 52086 h3 = 0xa54ff53a, 52087 h4 = 0x510e527f, 52088 h5 = 0x9b05688c, 52089 h6 = 0x1f83d9ab, 52090 h7 = 0x5be0cd19; 52091 const paddedLength = Math.ceil((length + 9) / 64) * 64; 52092 const padded = new Uint8Array(paddedLength); 52093 let i, j; 52094 for (i = 0; i < length; ++i) { 52095 padded[i] = data[offset++]; 52096 } 52097 padded[i++] = 0x80; 52098 const n = paddedLength - 8; 52099 while (i < n) { 52100 padded[i++] = 0; 52101 } 52102 padded[i++] = 0; 52103 padded[i++] = 0; 52104 padded[i++] = 0; 52105 padded[i++] = length >>> 29 & 0xff; 52106 padded[i++] = length >> 21 & 0xff; 52107 padded[i++] = length >> 13 & 0xff; 52108 padded[i++] = length >> 5 & 0xff;
vendor: 4,228 bytes, lines 52109-52213
52109 padded[i++] = length << 3 & 0xff; 52110 const w = new Uint32Array(64); 52111 for (i = 0; i < paddedLength;) { 52112 for (j = 0; j < 16; ++j) { 52113 w[j] = padded[i] << 24 | padded[i + 1] << 16 | padded[i + 2] << 8 | padded[i + 3]; 52114 i += 4; 52115 } 52116 for (j = 16; j < 64; ++j) { 52117 w[j] = littleSigmaPrime(w[j - 2]) + w[j - 7] + littleSigma(w[j - 15]) + w[j - 16] | 0; 52118 } 52119 let a = h0, 52120 b = h1, 52121 c = h2, 52122 d = h3, 52123 e = h4, 52124 f = h5, 52125 g = h6, 52126 h = h7, 52127 t1, 52128 t2; 52129 for (j = 0; j < 64; ++j) { 52130 t1 = h + sigmaPrime(e) + ch(e, f, g) + k[j] + w[j]; 52131 t2 = sigma(a) + maj(a, b, c); 52132 h = g; 52133 g = f; 52134 f = e; 52135 e = d + t1 | 0; 52136 d = c; 52137 c = b; 52138 b = a; 52139 a = t1 + t2 | 0; 52140 } 52141 h0 = h0 + a | 0; 52142 h1 = h1 + b | 0; 52143 h2 = h2 + c | 0; 52144 h3 = h3 + d | 0; 52145 h4 = h4 + e | 0; 52146 h5 = h5 + f | 0; 52147 h6 = h6 + g | 0; 52148 h7 = h7 + h | 0; 52149 } 52150 return new Uint8Array([h0 >> 24 & 0xFF, h0 >> 16 & 0xFF, h0 >> 8 & 0xFF, h0 & 0xFF, h1 >> 24 & 0xFF, h1 >> 16 & 0xFF, h1 >> 8 & 0xFF, h1 & 0xFF, h2 >> 24 & 0xFF, h2 >> 16 & 0xFF, h2 >> 8 & 0xFF, h2 & 0xFF, h3 >> 24 & 0xFF, h3 >> 16 & 0xFF, h3 >> 8 & 0xFF, h3 & 0xFF, h4 >> 24 & 0xFF, h4 >> 16 & 0xFF, h4 >> 8 & 0xFF, h4 & 0xFF, h5 >> 24 & 0xFF, h5 >> 16 & 0xFF, h5 >> 8 & 0xFF, h5 & 0xFF, h6 >> 24 & 0xFF, h6 >> 16 & 0xFF, h6 >> 8 & 0xFF, h6 & 0xFF, h7 >> 24 & 0xFF, h7 >> 16 & 0xFF, h7 >> 8 & 0xFF, h7 & 0xFF]); 52151 } 52152 return hash; 52153}(); 52154const calculateSHA512 = function calculateSHA512Closure() { 52155 function ch(result, x, y, z, tmp) { 52156 result.assign(x); 52157 result.and(y); 52158 tmp.assign(x); 52159 tmp.not(); 52160 tmp.and(z); 52161 result.xor(tmp); 52162 } 52163 function maj(result, x, y, z, tmp) { 52164 result.assign(x); 52165 result.and(y); 52166 tmp.assign(x); 52167 tmp.and(z); 52168 result.xor(tmp); 52169 tmp.assign(y); 52170 tmp.and(z); 52171 result.xor(tmp); 52172 } 52173 function sigma(result, x, tmp) { 52174 result.assign(x); 52175 result.rotateRight(28); 52176 tmp.assign(x); 52177 tmp.rotateRight(34); 52178 result.xor(tmp); 52179 tmp.assign(x); 52180 tmp.rotateRight(39); 52181 result.xor(tmp); 52182 } 52183 function sigmaPrime(result, x, tmp) { 52184 result.assign(x); 52185 result.rotateRight(14); 52186 tmp.assign(x); 52187 tmp.rotateRight(18); 52188 result.xor(tmp); 52189 tmp.assign(x); 52190 tmp.rotateRight(41); 52191 result.xor(tmp); 52192 } 52193 function littleSigma(result, x, tmp) { 52194 result.assign(x); 52195 result.rotateRight(1); 52196 tmp.assign(x); 52197 tmp.rotateRight(8); 52198 result.xor(tmp); 52199 tmp.assign(x); 52200 tmp.shiftRight(7); 52201 result.xor(tmp); 52202 } 52203 function littleSigmaPrime(result, x, tmp) { 52204 result.assign(x); 52205 result.rotateRight(19); 52206 tmp.assign(x); 52207 tmp.rotateRight(61); 52208 result.xor(tmp); 52209 tmp.assign(x); 52210 tmp.shiftRight(6); 52211 result.xor(tmp); 52212 } 52213 const k = [new Word64(0x428a2f98, 0xd728ae22), new Word64(0x71374491, 0x23ef65cd), new Word64(0xb5c0fbcf, 0xec4d3b2f), new Word64(0xe9b5dba5, 0x8189dbbc), new Word64(0x3956c25b, 0xf348b538), new Word64(0x59f111f1, 0xb605d019), new Word64(0x923f82a4, 0xaf194f9b), new Word64(0xab1c5ed5, 0xda6d8118), new Word64(0xd807aa98, 0xa3030242), new Word64(0x12835b01, 0x45706fbe), new Word64(0x243185be, 0x4ee4b28c), new Word64(0x550c7dc3, 0xd5ffb4e2), new Word64(0x72be5d74, 0xf27b896f), new Word64(0x80deb1fe, 0x3b1696b1), new Word64(0x9bdc06a7, 0x25c71235), new Word64(0xc19bf174, 0xcf692694), new Word64(0xe49b69c1, 0x9ef14ad2), new Word64(0xefbe4786, 0x384f25e3), new Word64(0x0fc19dc6, 0x8b8cd5b5), new Word64(0x240ca1cc, 0x77ac9c65), new Word64(0x2de92c6f, 0x592b0275), new Word64(0x4a7484aa, 0x6ea6e483), new Word64(0x5cb0a9dc, 0xbd41fbd4), new Word64(0x76f988da, 0x831153b5), new Word64(0x983e5152, 0xee66dfab), new Word64(0xa831c66d, 0x2db43210), new Word64(0xb00327c8, 0x98fb213f), new Word64(0xbf597fc7, 0xbeef0ee4), new Word64(0xc6e00bf3, 0x3da88fc2), new Word64(0xd5a79147, 0x930aa725), new Word64(0x06ca6351, 0xe003826f), new Word64(0x14292967, 0x0a0e6e70), new Word64(0x27b70a85, 0x46d22ffc), new Word64(0x2e1b2138, 0x5c26c926), new Word64(0x4d2c6dfc, 0x5ac42aed), new Word64(0x53380d13, 0x9d95b3df), new Word64(0x650a7354, 0x8baf63de), new Word64(0x766a0abb,
522130x3c77b2a8), new Word64(0x81c2c92e, 0x47edaee6), new Word64(0x92722c85, 0x1482353b), new Word64(0xa2bfe8a1, 0x4cf10364), new Word64(0xa81a664b, 0xbc423001), new Word64(0xc24b8b70, 0xd0f89791), new Word64(0xc76c51a3, 0x0654be30), new Word64(0xd192e819, 0xd6ef5218), new Word64(0xd6990624, 0x5565a910), new Word64(0xf40e3585, 0x5771202a), new Word64(0x106aa070, 0x32bbd1b8), new Word64(0x19a4c116, 0xb8d2d0c8), new Word64(0x1e376c08, 0x5141ab53), new Word64(0x2748774c, 0xdf8eeb99), new Word64(0x34b0bcb5, 0xe19b48a8), new Word64(0x391c0cb3, 0xc5c95a63), new Word64(0x4ed8aa4a, 0xe3418acb), new Word64(0x5b9cca4f, 0x7763e373), new Word64(0x682e6ff3, 0xd6b2b8a3), new Word64(0x748f82ee, 0x5defb2fc), new Word64(0x78a5636f, 0x43172f60), new Word64(0x84c87814, 0xa1f0ab72), new Word64(0x8cc70208, 0x1a6439ec), new Word64(0x90befffa, 0x23631e28), new Word64(0xa4506ceb, 0xde82bde9), new Word64(0xbef9a3f7, 0xb2c67915), new Word64(0xc67178f2, 0xe372532b), new Word64(0xca273ece, 0xea26619c), new Word64(0xd186b8c7, 0x21c0c207), new Word64(0xeada7dd6, 0xcde0eb1e), new Word64(0xf57d4f7f, 0xee6ed178), new Word64(0x06f067aa, 0x72176fba), new Word64(0x0a637dc5, 0xa2c898a6), new Word64(0x113f9804, 0xbef90dae), new Word64(0x1b710b35, 0x131c471b), new Word64(0x28db77f5, 0x23047d84), new Word64(0x32caab7b, 0x40c72493), new Word64(0x3c9ebe0a, 0x15c9bebc), new Word64(0x431d67c4, 0x9c100d4c), new Word64(0x4cc5d4be, 0xcb3e42b6), new Word64(0x597f299c, 0xfc657e2a), new Word64(0x5fcb6fab, 0x3ad6faec), new Word64(0x6c44198c, 0x4a475817)]; 52214 function hash(data, offset, length, mode384 = false) { 52215 let h0, h1, h2, h3, h4, h5, h6, h7; 52216 if (!mode384) { 52217 h0 = new Word64(0x6a09e667, 0xf3bcc908); 52218 h1 = new Word64(0xbb67ae85, 0x84caa73b); 52219 h2 = new Word64(0x3c6ef372, 0xfe94f82b); 52220 h3 = new Word64(0xa54ff53a, 0x5f1d36f1); 52221 h4 = new Word64(0x510e527f, 0xade682d1); 52222 h5 = new Word64(0x9b05688c, 0x2b3e6c1f); 52223 h6 = new Word64(0x1f83d9ab, 0xfb41bd6b); 52224 h7 = new Word64(0x5be0cd19, 0x137e2179); 52225 } else { 52226 h0 = new Word64(0xcbbb9d5d, 0xc1059ed8); 52227 h1 = new Word64(0x629a292a, 0x367cd507); 52228 h2 = new Word64(0x9159015a, 0x3070dd17); 52229 h3 = new Word64(0x152fecd8, 0xf70e5939); 52230 h4 = new Word64(0x67332667, 0xffc00b31); 52231 h5 = new Word64(0x8eb44a87, 0x68581511); 52232 h6 = new Word64(0xdb0c2e0d, 0x64f98fa7); 52233 h7 = new Word64(0x47b5481d, 0xbefa4fa4); 52234 } 52235 const paddedLength = Math.ceil((length + 17) / 128) * 128; 52236 const padded = new Uint8Array(paddedLength); 52237 let i, j; 52238 for (i = 0; i < length; ++i) { 52239 padded[i] = data[offset++]; 52240 } 52241 padded[i++] = 0x80; 52242 const n = paddedLength - 16; 52243 while (i < n) { 52244 padded[i++] = 0; 52245 } 52246 padded[i++] = 0; 52247 padded[i++] = 0; 52248 padded[i++] = 0; 52249 padded[i++] = 0; 52250 padded[i++] = 0; 52251 padded[i++] = 0; 52252 padded[i++] = 0; 52253 padded[i++] = 0; 52254 padded[i++] = 0; 52255 padded[i++] = 0; 52256 padded[i++] = 0; 52257 padded[i++] = length >>> 29 & 0xff; 52258 padded[i++] = length >> 21 & 0xff; 52259 padded[i++] = length >> 13 & 0xff; 52260 padded[i++] = length >> 5 & 0xff;
vendor: 2,582 bytes, lines 52261-52364
52261 padded[i++] = length << 3 & 0xff; 52262 const w = new Array(80); 52263 for (i = 0; i < 80; i++) { 52264 w[i] = new Word64(0, 0); 52265 } 52266 let a = new Word64(0, 0), 52267 b = new Word64(0, 0), 52268 c = new Word64(0, 0); 52269 let d = new Word64(0, 0), 52270 e = new Word64(0, 0), 52271 f = new Word64(0, 0); 52272 let g = new Word64(0, 0), 52273 h = new Word64(0, 0); 52274 const t1 = new Word64(0, 0), 52275 t2 = new Word64(0, 0); 52276 const tmp1 = new Word64(0, 0), 52277 tmp2 = new Word64(0, 0); 52278 let tmp3; 52279 for (i = 0; i < paddedLength;) { 52280 for (j = 0; j < 16; ++j) { 52281 w[j].high = padded[i] << 24 | padded[i + 1] << 16 | padded[i + 2] << 8 | padded[i + 3]; 52282 w[j].low = padded[i + 4] << 24 | padded[i + 5] << 16 | padded[i + 6] << 8 | padded[i + 7]; 52283 i += 8; 52284 } 52285 for (j = 16; j < 80; ++j) { 52286 tmp3 = w[j]; 52287 littleSigmaPrime(tmp3, w[j - 2], tmp2); 52288 tmp3.add(w[j - 7]); 52289 littleSigma(tmp1, w[j - 15], tmp2); 52290 tmp3.add(tmp1); 52291 tmp3.add(w[j - 16]); 52292 } 52293 a.assign(h0); 52294 b.assign(h1); 52295 c.assign(h2); 52296 d.assign(h3); 52297 e.assign(h4); 52298 f.assign(h5); 52299 g.assign(h6); 52300 h.assign(h7); 52301 for (j = 0; j < 80; ++j) { 52302 t1.assign(h); 52303 sigmaPrime(tmp1, e, tmp2); 52304 t1.add(tmp1); 52305 ch(tmp1, e, f, g, tmp2); 52306 t1.add(tmp1); 52307 t1.add(k[j]); 52308 t1.add(w[j]); 52309 sigma(t2, a, tmp2); 52310 maj(tmp1, a, b, c, tmp2); 52311 t2.add(tmp1); 52312 tmp3 = h; 52313 h = g; 52314 g = f; 52315 f = e; 52316 d.add(t1); 52317 e = d; 52318 d = c; 52319 c = b; 52320 b = a; 52321 tmp3.assign(t1); 52322 tmp3.add(t2); 52323 a = tmp3; 52324 } 52325 h0.add(a); 52326 h1.add(b); 52327 h2.add(c); 52328 h3.add(d); 52329 h4.add(e); 52330 h5.add(f); 52331 h6.add(g); 52332 h7.add(h); 52333 } 52334 let result; 52335 if (!mode384) { 52336 result = new Uint8Array(64); 52337 h0.copyTo(result, 0); 52338 h1.copyTo(result, 8); 52339 h2.copyTo(result, 16); 52340 h3.copyTo(result, 24); 52341 h4.copyTo(result, 32); 52342 h5.copyTo(result, 40); 52343 h6.copyTo(result, 48); 52344 h7.copyTo(result, 56); 52345 } else { 52346 result = new Uint8Array(48); 52347 h0.copyTo(result, 0); 52348 h1.copyTo(result, 8); 52349 h2.copyTo(result, 16); 52350 h3.copyTo(result, 24); 52351 h4.copyTo(result, 32); 52352 h5.copyTo(result, 40); 52353 } 52354 return result; 52355 } 52356 return hash; 52357}(); 52358function calculateSHA384(data, offset, length) { 52359 return calculateSHA512(data, offset, length, true); 52360} 52361class NullCipher { 52362 decryptBlock(data) { 52363 return data; 52364 }
52365 encrypt(data) { 52366 return data; 52367 } 52368} 52369class AESBaseCipher { 52370 constructor() { 52371 this._s = new Uint8Array([0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0x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73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d]); 52373 this._mix = new Uint32Array([0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a
vendor: 8,032 bytes, lines 52373-52592
52373750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3]); 52374 this._mixCol = new Uint8Array(256); 52375 for (let i = 0; i < 256; i++) { 52376 this._mixCol[i] = i < 128 ? i << 1 : i << 1 ^ 0x1b; 52377 } 52378 this.buffer = new Uint8Array(16); 52379 this.bufferPosition = 0; 52380 } 52381 _expandKey(cipherKey) { 52382 unreachable("Cannot call `_expandKey` on the base class"); 52383 } 52384 _decrypt(input, key) { 52385 let t, u, v; 52386 const state = new Uint8Array(16); 52387 state.set(input); 52388 for (let j = 0, k = this._keySize; j < 16; ++j, ++k) { 52389 state[j] ^= key[k]; 52390 } 52391 for (let i = this._cyclesOfRepetition - 1; i >= 1; --i) { 52392 t = state[13]; 52393 state[13] = state[9]; 52394 state[9] = state[5]; 52395 state[5] = state[1]; 52396 state[1] = t; 52397 t = state[14]; 52398 u = state[10]; 52399 state[14] = state[6]; 52400 state[10] = state[2]; 52401 state[6] = t; 52402 state[2] = u; 52403 t = state[15]; 52404 u = state[11]; 52405 v = state[7]; 52406 state[15] = state[3]; 52407 state[11] = t; 52408 state[7] = u; 52409 state[3] = v; 52410 for (let j = 0; j < 16; ++j) { 52411 state[j] = this._inv_s[state[j]]; 52412 } 52413 for (let j = 0, k = i * 16; j < 16; ++j, ++k) { 52414 state[j] ^= key[k]; 52415 } 52416 for (let j = 0; j < 16; j += 4) { 52417 const s0 = this._mix[state[j]]; 52418 const s1 = this._mix[state[j + 1]]; 52419 const s2 = this._mix[state[j + 2]]; 52420 const s3 = this._mix[state[j + 3]]; 52421 t = s0 ^ s1 >>> 8 ^ s1 << 24 ^ s2 >>> 16 ^ s2 << 16 ^ s3 >>> 24 ^ s3 << 8; 52422 state[j] = t >>> 24 & 0xff; 52423 state[j + 1] = t >> 16 & 0xff; 52424 state[j + 2] = t >> 8 & 0xff; 52425 state[j + 3] = t & 0xff; 52426 } 52427 } 52428 t = state[13]; 52429 state[13] = state[9]; 52430 state[9] = state[5]; 52431 state[5] = state[1]; 52432 state[1] = t; 52433 t = state[14]; 52434 u = state[10]; 52435 state[14] = state[6]; 52436 state[10] = state[2]; 52437 state[6] = t; 52438 state[2] = u; 52439 t = state[15]; 52440 u = state[11]; 52441 v = state[7]; 52442 state[15] = state[3]; 52443 state[11] = t; 52444 state[7] = u; 52445 state[3] = v; 52446 for (let j = 0; j < 16; ++j) { 52447 state[j] = this._inv_s[state[j]]; 52448 state[j] ^= key[j]; 52449 } 52450 return state; 52451 } 52452 _encrypt(input, key) { 52453 const s = this._s; 52454 let t, u, v; 52455 const state = new Uint8Array(16); 52456 state.set(input); 52457 for (let j = 0; j < 16; ++j) { 52458 state[j] ^= key[j]; 52459 } 52460 for (let i = 1; i < this._cyclesOfRepetition; i++) { 52461 for (let j = 0; j < 16; ++j) { 52462 state[j] = s[state[j]]; 52463 } 52464 v = state[1]; 52465 state[1] = state[5]; 52466 state[5] = state[9]; 52467 state[9] = state[13]; 52468 state[13] = v; 52469 v = state[2]; 52470 u = state[6]; 52471 state[2] = state[10]; 52472 state[6] = state[14]; 52473 state[10] = v; 52474 state[14] = u; 52475 v = state[3]; 52476 u = state[7]; 52477 t = state[11]; 52478 state[3] = state[15]; 52479 state[7] = v; 52480 state[11] = u; 52481 state[15] = t; 52482 for (let j = 0; j < 16; j += 4) { 52483 const s0 = state[j + 0]; 52484 const s1 = state[j + 1]; 52485 const s2 = state[j + 2]; 52486 const s3 = state[j + 3]; 52487 t = s0 ^ s1 ^ s2 ^ s3; 52488 state[j + 0] ^= t ^ this._mixCol[s0 ^ s1]; 52489 state[j + 1] ^= t ^ this._mixCol[s1 ^ s2]; 52490 state[j + 2] ^= t ^ this._mixCol[s2 ^ s3]; 52491 state[j + 3] ^= t ^ this._mixCol[s3 ^ s0]; 52492 } 52493 for (let j = 0, k = i * 16; j < 16; ++j, ++k) { 52494 state[j] ^= key[k]; 52495 } 52496 } 52497 for (let j = 0; j < 16; ++j) { 52498 state[j] = s[state[j]]; 52499 } 52500 v = state[1]; 52501 state[1] = state[5]; 52502 state[5] = state[9]; 52503 state[9] = state[13]; 52504 state[13] = v; 52505 v = state[2]; 52506 u = state[6]; 52507 state[2] = state[10]; 52508 state[6] = state[14]; 52509 state[10] = v; 52510 state[14] = u; 52511 v = state[3]; 52512 u = state[7]; 52513 t = state[11]; 52514 state[3] = state[15]; 52515 state[7] = v; 52516 state[11] = u; 52517 state[15] = t; 52518 for (let j = 0, k = this._keySize; j < 16; ++j, ++k) { 52519 state[j] ^= key[k]; 52520 } 52521 return state; 52522 } 52523 _decryptBlock2(data, finalize) { 52524 const sourceLength = data.length; 52525 let buffer = this.buffer, 52526 bufferLength = this.bufferPosition; 52527 const result = []; 52528 let iv = this.iv; 52529 for (let i = 0; i < sourceLength; ++i) { 52530 buffer[bufferLength] = data[i]; 52531 ++bufferLength; 52532 if (bufferLength < 16) { 52533 continue; 52534 } 52535 const plain = this._decrypt(buffer, this._key); 52536 for (let j = 0; j < 16; ++j) { 52537 plain[j] ^= iv[j]; 52538 } 52539 iv = buffer; 52540 result.push(plain); 52541 buffer = new Uint8Array(16); 52542 bufferLength = 0; 52543 } 52544 this.buffer = buffer; 52545 this.bufferLength = bufferLength; 52546 this.iv = iv; 52547 if (result.length === 0) { 52548 return new Uint8Array(0); 52549 } 52550 let outputLength = 16 * result.length; 52551 if (finalize) { 52552 const lastBlock = result.at(-1); 52553 let psLen = lastBlock[15]; 52554 if (psLen <= 16) { 52555 for (let i = 15, ii = 16 - psLen; i >= ii; --i) { 52556 if (lastBlock[i] !== psLen) { 52557 psLen = 0; 52558 break; 52559 } 52560 } 52561 outputLength -= psLen; 52562 result[result.length - 1] = lastBlock.subarray(0, 16 - psLen); 52563 } 52564 } 52565 const output = new Uint8Array(outputLength); 52566 for (let i = 0, j = 0, ii = result.length; i < ii; ++i, j += 16) { 52567 output.set(result[i], j); 52568 } 52569 return output; 52570 } 52571 decryptBlock(data, finalize, iv = null) { 52572 const sourceLength = data.length; 52573 const buffer = this.buffer; 52574 let bufferLength = this.bufferPosition; 52575 if (iv) { 52576 this.iv = iv; 52577 } else { 52578 for (let i = 0; bufferLength < 16 && i < sourceLength; ++i, ++bufferLength) { 52579 buffer[bufferLength] = data[i]; 52580 } 52581 if (bufferLength < 16) { 52582 this.bufferLength = bufferLength; 52583 return new Uint8Array(0); 52584 } 52585 this.iv = buffer; 52586 data = data.subarray(16); 52587 } 52588 this.buffer = new Uint8Array(16); 52589 this.bufferLength = 0; 52590 this.decryptBlock = this._decryptBlock2; 52591 return this.decryptBlock(data, finalize); 52592 }
vendor: 8,374 bytes, lines 52593-52801
52593 encrypt(data, iv) { 52594 const sourceLength = data.length; 52595 let buffer = this.buffer, 52596 bufferLength = this.bufferPosition; 52597 const result = []; 52598 if (!iv) { 52599 iv = new Uint8Array(16); 52600 } 52601 for (let i = 0; i < sourceLength; ++i) { 52602 buffer[bufferLength] = data[i]; 52603 ++bufferLength; 52604 if (bufferLength < 16) { 52605 continue; 52606 } 52607 for (let j = 0; j < 16; ++j) { 52608 buffer[j] ^= iv[j]; 52609 } 52610 const cipher = this._encrypt(buffer, this._key); 52611 iv = cipher; 52612 result.push(cipher); 52613 buffer = new Uint8Array(16); 52614 bufferLength = 0; 52615 } 52616 this.buffer = buffer; 52617 this.bufferLength = bufferLength; 52618 this.iv = iv; 52619 if (result.length === 0) { 52620 return new Uint8Array(0); 52621 } 52622 const outputLength = 16 * result.length; 52623 const output = new Uint8Array(outputLength); 52624 for (let i = 0, j = 0, ii = result.length; i < ii; ++i, j += 16) { 52625 output.set(result[i], j); 52626 } 52627 return output; 52628 } 52629} 52630class AES128Cipher extends AESBaseCipher { 52631 constructor(key) { 52632 super(); 52633 this._cyclesOfRepetition = 10; 52634 this._keySize = 160; 52635 this._rcon = new Uint8Array([0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x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0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d]); 52636 this._key = this._expandKey(key); 52637 } 52638 _expandKey(cipherKey) { 52639 const b = 176; 52640 const s = this._s; 52641 const rcon = this._rcon; 52642 const result = new Uint8Array(b); 52643 result.set(cipherKey); 52644 for (let j = 16, i = 1; j < b; ++i) { 52645 let t1 = result[j - 3]; 52646 let t2 = result[j - 2]; 52647 let t3 = result[j - 1]; 52648 let t4 = result[j - 4]; 52649 t1 = s[t1]; 52650 t2 = s[t2]; 52651 t3 = s[t3]; 52652 t4 = s[t4]; 52653 t1 ^= rcon[i]; 52654 for (let n = 0; n < 4; ++n) { 52655 result[j] = t1 ^= result[j - 16]; 52656 j++; 52657 result[j] = t2 ^= result[j - 16]; 52658 j++; 52659 result[j] = t3 ^= result[j - 16]; 52660 j++; 52661 result[j] = t4 ^= result[j - 16]; 52662 j++; 52663 } 52664 } 52665 return result; 52666 } 52667} 52668class AES256Cipher extends AESBaseCipher { 52669 constructor(key) { 52670 super(); 52671 this._cyclesOfRepetition = 14; 52672 this._keySize = 224; 52673 this._key = this._expandKey(key); 52674 } 52675 _expandKey(cipherKey) { 52676 const b = 240; 52677 const s = this._s; 52678 const result = new Uint8Array(b); 52679 result.set(cipherKey); 52680 let r = 1; 52681 let t1, t2, t3, t4; 52682 for (let j = 32, i = 1; j < b; ++i) { 52683 if (j % 32 === 16) { 52684 t1 = s[t1]; 52685 t2 = s[t2]; 52686 t3 = s[t3]; 52687 t4 = s[t4]; 52688 } else if (j % 32 === 0) { 52689 t1 = result[j - 3]; 52690 t2 = result[j - 2]; 52691 t3 = result[j - 1]; 52692 t4 = result[j - 4]; 52693 t1 = s[t1]; 52694 t2 = s[t2]; 52695 t3 = s[t3]; 52696 t4 = s[t4]; 52697 t1 ^= r; 52698 if ((r <<= 1) >= 256) { 52699 r = (r ^ 0x1b) & 0xff; 52700 } 52701 } 52702 for (let n = 0; n < 4; ++n) { 52703 result[j] = t1 ^= result[j - 32]; 52704 j++; 52705 result[j] = t2 ^= result[j - 32]; 52706 j++; 52707 result[j] = t3 ^= result[j - 32]; 52708 j++; 52709 result[j] = t4 ^= result[j - 32]; 52710 j++; 52711 } 52712 } 52713 return result; 52714 } 52715} 52716class PDF17 { 52717 checkOwnerPassword(password, ownerValidationSalt, userBytes, ownerPassword) { 52718 const hashData = new Uint8Array(password.length + 56); 52719 hashData.set(password, 0); 52720 hashData.set(ownerValidationSalt, password.length); 52721 hashData.set(userBytes, password.length + ownerValidationSalt.length); 52722 const result = calculateSHA256(hashData, 0, hashData.length); 52723 return isArrayEqual(result, ownerPassword); 52724 } 52725 checkUserPassword(password, userValidationSalt, userPassword) { 52726 const hashData = new Uint8Array(password.length + 8); 52727 hashData.set(password, 0); 52728 hashData.set(userValidationSalt, password.length); 52729 const result = calculateSHA256(hashData, 0, hashData.length); 52730 return isArrayEqual(result, userPassword); 52731 } 52732 getOwnerKey(password, ownerKeySalt, userBytes, ownerEncryption) { 52733 const hashData = new Uint8Array(password.length + 56); 52734 hashData.set(password, 0); 52735 hashData.set(ownerKeySalt, password.length); 52736 hashData.set(userBytes, password.length + ownerKeySalt.length); 52737 const key = calculateSHA256(hashData, 0, hashData.length); 52738 const cipher = new AES256Cipher(key); 52739 return cipher.decryptBlock(ownerEncryption, false, new Uint8Array(16)); 52740 } 52741 getUserKey(password, userKeySalt, userEncryption) { 52742 const hashData = new Uint8Array(password.length + 8); 52743 hashData.set(password, 0); 52744 hashData.set(userKeySalt, password.length); 52745 const key = calculateSHA256(hashData, 0, hashData.length); 52746 const cipher = new AES256Cipher(key); 52747 return cipher.decryptBlock(userEncryption, false, new Uint8Array(16)); 52748 } 52749} 52750class PDF20 { 52751 _hash(password, input, userBytes) { 52752 let k = calculateSHA256(input, 0, input.length).subarray(0, 32); 52753 let e = [0]; 52754 let i = 0; 52755 while (i < 64 || e.at(-1) > i - 32) { 52756 const combinedLength = password.length + k.length + userBytes.length, 52757 combinedArray = new Uint8Array(combinedLength); 52758 let writeOffset = 0; 52759 combinedArray.set(password, writeOffset); 52760 writeOffset += password.length; 52761 combinedArray.set(k, writeOffset); 52762 writeOffset += k.length; 52763 combinedArray.set(userBytes, writeOffset); 52764 const k1 = new Uint8Array(combinedLength * 64); 52765 for (let j = 0, pos = 0; j < 64; j++, pos += combinedLength) { 52766 k1.set(combinedArray, pos); 52767 } 52768 const cipher = new AES128Cipher(k.subarray(0, 16)); 52769 e = cipher.encrypt(k1, k.subarray(16, 32)); 52770 const remainder = e.slice(0, 16).reduce((a, b) => a + b, 0) % 3; 52771 if (remainder === 0) { 52772 k = calculateSHA256(e, 0, e.length); 52773 } else if (remainder === 1) { 52774 k = calculateSHA384(e, 0, e.length); 52775 } else if (remainder === 2) { 52776 k = calculateSHA512(e, 0, e.length); 52777 } 52778 i++; 52779 } 52780 return k.subarray(0, 32); 52781 } 52782 checkOwnerPassword(password, ownerValidationSalt, userBytes, ownerPassword) { 52783 const hashData = new Uint8Array(password.length + 56); 52784 hashData.set(password, 0); 52785 hashData.set(ownerValidationSalt, password.length); 52786 hashData.set(userBytes, password.length + ownerValidationSalt.length); 52787 const result = this._hash(password, hashData, userBytes); 52788 return isArrayEqual(result, ownerPassword); 52789 } 52790 checkUserPassword(password, userValidationSalt, userPassword) { 52791 const hashData = new Uint8Array(password.length + 8); 52792 hashData.set(password, 0); 52793 hashData.set(userValidationSalt, password.length); 52794 const result = this._hash(password, hashData, []); 52795 return isArrayEqual(result, userPassword); 52796 } 52797 getOwnerKey(password, ownerKeySalt, userBytes, ownerEncryption) { 52798 const hashData = new Uint8Array(password.length + 56); 52799 hashData.set(password, 0); 52800 hashData.set(ownerKeySalt, password.length); 52801 hashData.set(userBytes, password.length + ownerKeySalt.length);
52802 const key = this._hash(password, hashData, userBytes); 52803 const cipher = new AES256Cipher(key); 52804 return cipher.decryptBlock(ownerEncryption, false, new Uint8Array(16)); 52805 } 52806 getUserKey(password, userKeySalt, userEncryption) { 52807 const hashData = new Uint8Array(password.length + 8); 52808 hashData.set(password, 0); 52809 hashData.set(userKeySalt, password.length); 52810 const key = this._hash(password, hashData, []); 52811 const cipher = new AES256Cipher(key); 52812 return cipher.decryptBlock(userEncryption, false, new Uint8Array(16)); 52813 } 52814} 52815class CipherTransform { 52816 constructor(stringCipherConstructor, streamCipherConstructor) { 52817 this.StringCipherConstructor = stringCipherConstructor; 52818 this.StreamCipherConstructor = streamCipherConstructor; 52819 } 52820 createStream(stream, length) { 52821 const cipher = new this.StreamCipherConstructor(); 52822 return new DecryptStream(stream, length, function cipherTransformDecryptStream(data, finalize) { 52823 return cipher.decryptBlock(data, finalize); 52824 }); 52825 } 52826 decryptString(s) { 52827 const cipher = new this.StringCipherConstructor(); 52828 let data = stringToBytes(s); 52829 data = cipher.decryptBlock(data, true); 52830 return bytesToString(data); 52831 } 52832 encryptString(s) { 52833 const cipher = new this.StringCipherConstructor(); 52834 if (cipher instanceof AESBaseCipher) { 52835 const strLen = s.length; 52836 const pad = 16 - strLen % 16; 52837 s += String.fromCharCode(pad).repeat(pad); 52838 const iv = new Uint8Array(16); 52839 if (typeof crypto !== "undefined") { 52840 crypto.getRandomValues(iv); 52841 } else { 52842 for (let i = 0; i < 16; i++) { 52843 iv[i] = Math.floor(256 * Math.random()); 52844 } 52845 } 52846 let data = stringToBytes(s); 52847 data = cipher.encrypt(data, iv); 52848 const buf = new Uint8Array(16 + data.length); 52849 buf.set(iv); 52850 buf.set(data, 16); 52851 return bytesToString(buf); 52852 } 52853 let data = stringToBytes(s); 52854 data = cipher.encrypt(data); 52855 return bytesToString(data); 52856 } 52857} 52858class CipherTransformFactory { 52859 static #defaultPasswordBytes = new Uint8Array([0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, 0x64, 0x00, 0x4e, 0x56, 0xff, 0xfa, 0x01, 0x08, 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80, 0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a]); 52860 #createEncryptionKey20(revision, password, ownerPassword, ownerValidationSalt, ownerKeySalt, uBytes, userPassword, userValidationSalt, userKeySalt, ownerEncryption, userEncryption, perms) { 52861 if (password) { 52862 const passwordLength = Math.min(127, password.length); 52863 password = password.subarray(0, passwordLength); 52864 } else { 52865 password = []; 52866 } 52867 const pdfAlgorithm = revision === 6 ? new PDF20() : new PDF17(); 52868 if (pdfAlgorithm.checkUserPassword(password, userValidationSalt, userPassword)) { 52869 return pdfAlgorithm.getUserKey(password, userKeySalt, userEncryption); 52870 } else if (password.length && pdfAlgorithm.checkOwnerPassword(password, ownerValidationSalt, uBytes, ownerPassword)) { 52871 return pdfAlgorithm.getOwnerKey(password, ownerKeySalt, uBytes, ownerEncryption); 52872 } 52873 return null; 52874 } 52875 #prepareKeyData(fileId, password, ownerPassword, userPassword, flags, revision, keyLength, encryptMetadata) { 52876 const hashDataSize = 40 + ownerPassword.length + fileId.length; 52877 const hashData = new Uint8Array(hashDataSize); 52878 let i = 0, 52879 j, 52880 n; 52881 if (password) { 52882 n = Math.min(32, password.length); 52883 for (; i < n; ++i) { 52884 hashData[i] = password[i]; 52885 } 52886 } 52887 j = 0; 52888 while (i < 32) { 52889 hashData[i++] = CipherTransformFactory.#defaultPasswordBytes[j++]; 52890 } 52891 for (j = 0, n = ownerPassword.length; j < n; ++j) { 52892 hashData[i++] = ownerPassword[j]; 52893 } 52894 hashData[i++] = flags & 0xff; 52895 hashData[i++] = flags >> 8 & 0xff; 52896 hashData[i++] = flags >> 16 & 0xff; 52897 hashData[i++] = flags >>> 24 & 0xff; 52898 for (j = 0, n = fileId.length; j < n; ++j) { 52899 hashData[i++] = fileId[j]; 52900 } 52901 if (revision >= 4 && !encryptMetadata) { 52902 hashData[i++] = 0xff; 52903 hashData[i++] = 0xff; 52904 hashData[i++] = 0xff; 52905 hashData[i++] = 0xff; 52906 } 52907 let hash = calculateMD5(hashData, 0, i);
vendor: 35,876 bytes, lines 52908-54045
52908 const keyLengthInBytes = keyLength >> 3; 52909 if (revision >= 3) { 52910 for (j = 0; j < 50; ++j) { 52911 hash = calculateMD5(hash, 0, keyLengthInBytes); 52912 } 52913 } 52914 const encryptionKey = hash.subarray(0, keyLengthInBytes); 52915 let cipher, checkData; 52916 if (revision >= 3) { 52917 for (i = 0; i < 32; ++i) { 52918 hashData[i] = CipherTransformFactory.#defaultPasswordBytes[i]; 52919 } 52920 for (j = 0, n = fileId.length; j < n; ++j) { 52921 hashData[i++] = fileId[j]; 52922 } 52923 cipher = new ARCFourCipher(encryptionKey); 52924 checkData = cipher.encryptBlock(calculateMD5(hashData, 0, i)); 52925 n = encryptionKey.length; 52926 const derivedKey = new Uint8Array(n); 52927 for (j = 1; j <= 19; ++j) { 52928 for (let k = 0; k < n; ++k) { 52929 derivedKey[k] = encryptionKey[k] ^ j; 52930 } 52931 cipher = new ARCFourCipher(derivedKey); 52932 checkData = cipher.encryptBlock(checkData); 52933 } 52934 for (j = 0, n = checkData.length; j < n; ++j) { 52935 if (userPassword[j] !== checkData[j]) { 52936 return null; 52937 } 52938 } 52939 } else { 52940 cipher = new ARCFourCipher(encryptionKey); 52941 checkData = cipher.encryptBlock(CipherTransformFactory.#defaultPasswordBytes); 52942 for (j = 0, n = checkData.length; j < n; ++j) { 52943 if (userPassword[j] !== checkData[j]) { 52944 return null; 52945 } 52946 } 52947 } 52948 return encryptionKey; 52949 } 52950 #decodeUserPassword(password, ownerPassword, revision, keyLength) { 52951 const hashData = new Uint8Array(32); 52952 let i = 0; 52953 const n = Math.min(32, password.length); 52954 for (; i < n; ++i) { 52955 hashData[i] = password[i]; 52956 } 52957 let j = 0; 52958 while (i < 32) { 52959 hashData[i++] = CipherTransformFactory.#defaultPasswordBytes[j++]; 52960 } 52961 let hash = calculateMD5(hashData, 0, i); 52962 const keyLengthInBytes = keyLength >> 3; 52963 if (revision >= 3) { 52964 for (j = 0; j < 50; ++j) { 52965 hash = calculateMD5(hash, 0, hash.length); 52966 } 52967 } 52968 let cipher, userPassword; 52969 if (revision >= 3) { 52970 userPassword = ownerPassword; 52971 const derivedKey = new Uint8Array(keyLengthInBytes); 52972 for (j = 19; j >= 0; j--) { 52973 for (let k = 0; k < keyLengthInBytes; ++k) { 52974 derivedKey[k] = hash[k] ^ j; 52975 } 52976 cipher = new ARCFourCipher(derivedKey); 52977 userPassword = cipher.encryptBlock(userPassword); 52978 } 52979 } else { 52980 cipher = new ARCFourCipher(hash.subarray(0, keyLengthInBytes)); 52981 userPassword = cipher.encryptBlock(ownerPassword); 52982 } 52983 return userPassword; 52984 } 52985 #buildObjectKey(num, gen, encryptionKey, isAes = false) { 52986 const key = new Uint8Array(encryptionKey.length + 9); 52987 const n = encryptionKey.length; 52988 let i; 52989 for (i = 0; i < n; ++i) { 52990 key[i] = encryptionKey[i]; 52991 } 52992 key[i++] = num & 0xff; 52993 key[i++] = num >> 8 & 0xff; 52994 key[i++] = num >> 16 & 0xff; 52995 key[i++] = gen & 0xff; 52996 key[i++] = gen >> 8 & 0xff; 52997 if (isAes) { 52998 key[i++] = 0x73; 52999 key[i++] = 0x41; 53000 key[i++] = 0x6c; 53001 key[i++] = 0x54; 53002 } 53003 const hash = calculateMD5(key, 0, i); 53004 return hash.subarray(0, Math.min(encryptionKey.length + 5, 16)); 53005 } 53006 #buildCipherConstructor(cf, name, num, gen, key) { 53007 if (!(name instanceof Name)) { 53008 throw new FormatError("Invalid crypt filter name."); 53009 } 53010 const self = this; 53011 const cryptFilter = cf.get(name.name); 53012 const cfm = cryptFilter?.get("CFM"); 53013 if (!cfm || cfm.name === "None") { 53014 return function () { 53015 return new NullCipher(); 53016 }; 53017 } 53018 if (cfm.name === "V2") { 53019 return function () { 53020 return new ARCFourCipher(self.#buildObjectKey(num, gen, key, false)); 53021 }; 53022 } 53023 if (cfm.name === "AESV2") { 53024 return function () { 53025 return new AES128Cipher(self.#buildObjectKey(num, gen, key, true)); 53026 }; 53027 } 53028 if (cfm.name === "AESV3") { 53029 return function () { 53030 return new AES256Cipher(key); 53031 }; 53032 } 53033 throw new FormatError("Unknown crypto method"); 53034 } 53035 constructor(dict, fileId, password) { 53036 const filter = dict.get("Filter"); 53037 if (!isName(filter, "Standard")) { 53038 throw new FormatError("unknown encryption method"); 53039 } 53040 this.filterName = filter.name; 53041 this.dict = dict; 53042 const algorithm = dict.get("V"); 53043 if (!Number.isInteger(algorithm) || algorithm !== 1 && algorithm !== 2 && algorithm !== 4 && algorithm !== 5) { 53044 throw new FormatError("unsupported encryption algorithm"); 53045 } 53046 this.algorithm = algorithm; 53047 let keyLength = dict.get("Length"); 53048 if (!keyLength) { 53049 if (algorithm <= 3) { 53050 keyLength = 40; 53051 } else { 53052 const cfDict = dict.get("CF"); 53053 const streamCryptoName = dict.get("StmF"); 53054 if (cfDict instanceof Dict && streamCryptoName instanceof Name) { 53055 cfDict.suppressEncryption = true; 53056 const handlerDict = cfDict.get(streamCryptoName.name); 53057 keyLength = handlerDict?.get("Length") || 128; 53058 if (keyLength < 40) { 53059 keyLength <<= 3; 53060 } 53061 } 53062 } 53063 } 53064 if (!Number.isInteger(keyLength) || keyLength < 40 || keyLength % 8 !== 0) { 53065 throw new FormatError("invalid key length"); 53066 } 53067 const ownerBytes = stringToBytes(dict.get("O")), 53068 userBytes = stringToBytes(dict.get("U")); 53069 const ownerPassword = ownerBytes.subarray(0, 32); 53070 const userPassword = userBytes.subarray(0, 32); 53071 const flags = dict.get("P"); 53072 const revision = dict.get("R"); 53073 const encryptMetadata = (algorithm === 4 || algorithm === 5) && dict.get("EncryptMetadata") !== false; 53074 this.encryptMetadata = encryptMetadata; 53075 const fileIdBytes = stringToBytes(fileId); 53076 let passwordBytes; 53077 if (password) { 53078 if (revision === 6) { 53079 try { 53080 password = utf8StringToString(password); 53081 } catch { 53082 warn("CipherTransformFactory: Unable to convert UTF8 encoded password."); 53083 } 53084 } 53085 passwordBytes = stringToBytes(password); 53086 } 53087 let encryptionKey; 53088 if (algorithm !== 5) { 53089 encryptionKey = this.#prepareKeyData(fileIdBytes, passwordBytes, ownerPassword, userPassword, flags, revision, keyLength, encryptMetadata); 53090 } else { 53091 const ownerValidationSalt = ownerBytes.subarray(32, 40); 53092 const ownerKeySalt = ownerBytes.subarray(40, 48); 53093 const uBytes = userBytes.subarray(0, 48); 53094 const userValidationSalt = userBytes.subarray(32, 40); 53095 const userKeySalt = userBytes.subarray(40, 48); 53096 const ownerEncryption = stringToBytes(dict.get("OE")); 53097 const userEncryption = stringToBytes(dict.get("UE")); 53098 const perms = stringToBytes(dict.get("Perms")); 53099 encryptionKey = this.#createEncryptionKey20(revision, passwordBytes, ownerPassword, ownerValidationSalt, ownerKeySalt, uBytes, userPassword, userValidationSalt, userKeySalt, ownerEncryption, userEncryption, perms); 53100 } 53101 if (!encryptionKey && !password) { 53102 throw new PasswordException("No password given", PasswordResponses.NEED_PASSWORD); 53103 } else if (!encryptionKey && password) { 53104 const decodedPassword = this.#decodeUserPassword(passwordBytes, ownerPassword, revision, keyLength); 53105 encryptionKey = this.#prepareKeyData(fileIdBytes, decodedPassword, ownerPassword, userPassword, flags, revision, keyLength, encryptMetadata); 53106 } 53107 if (!encryptionKey) { 53108 throw new PasswordException("Incorrect Password", PasswordResponses.INCORRECT_PASSWORD); 53109 } 53110 this.encryptionKey = encryptionKey; 53111 if (algorithm >= 4) { 53112 const cf = dict.get("CF"); 53113 if (cf instanceof Dict) { 53114 cf.suppressEncryption = true; 53115 } 53116 this.cf = cf; 53117 this.stmf = dict.get("StmF") || Name.get("Identity"); 53118 this.strf = dict.get("StrF") || Name.get("Identity"); 53119 this.eff = dict.get("EFF") || this.stmf; 53120 } 53121 } 53122 createCipherTransform(num, gen) { 53123 if (this.algorithm === 4 || this.algorithm === 5) { 53124 return new CipherTransform(this.#buildCipherConstructor(this.cf, this.strf, num, gen, this.encryptionKey), this.#buildCipherConstructor(this.cf, this.stmf, num, gen, this.encryptionKey)); 53125 } 53126 const key = this.#buildObjectKey(num, gen, this.encryptionKey, false); 53127 const cipherConstructor = function () { 53128 return new ARCFourCipher(key); 53129 }; 53130 return new CipherTransform(cipherConstructor, cipherConstructor); 53131 } 53132} 53133 53134;// ./src/core/dataset_reader.js 53135 53136 53137 53138function decodeString(str) { 53139 try { 53140 return stringToUTF8String(str); 53141 } catch (ex) { 53142 warn(`UTF-8 decoding failed: "${ex}".`); 53143 return str; 53144 } 53145} 53146class DatasetXMLParser extends SimpleXMLParser { 53147 constructor(options) { 53148 super(options); 53149 this.node = null; 53150 } 53151 onEndElement(name) { 53152 const node = super.onEndElement(name); 53153 if (node && name === "xfa:datasets") { 53154 this.node = node; 53155 throw new Error("Aborting DatasetXMLParser."); 53156 } 53157 } 53158} 53159class DatasetReader { 53160 constructor(data) { 53161 if (data.datasets) { 53162 this.node = new SimpleXMLParser({ 53163 hasAttributes: true 53164 }).parseFromString(data.datasets).documentElement; 53165 } else { 53166 const parser = new DatasetXMLParser({ 53167 hasAttributes: true 53168 }); 53169 try { 53170 parser.parseFromString(data["xdp:xdp"]); 53171 } catch {} 53172 this.node = parser.node; 53173 } 53174 } 53175 getValue(path) { 53176 if (!this.node || !path) { 53177 return ""; 53178 } 53179 const node = this.node.searchNode(parseXFAPath(path), 0); 53180 if (!node) { 53181 return ""; 53182 } 53183 const first = node.firstChild; 53184 if (first?.nodeName === "value") { 53185 return node.children.map(child => decodeString(child.textContent)); 53186 } 53187 return decodeString(node.textContent); 53188 } 53189} 53190 53191;// ./src/core/xref.js 53192 53193 53194 53195 53196 53197 53198class XRef { 53199 #firstXRefStmPos = null; 53200 constructor(stream, pdfManager) { 53201 this.stream = stream; 53202 this.pdfManager = pdfManager; 53203 this.entries = []; 53204 this._xrefStms = new Set(); 53205 this._cacheMap = new Map(); 53206 this._pendingRefs = new RefSet(); 53207 this._newPersistentRefNum = null; 53208 this._newTemporaryRefNum = null; 53209 this._persistentRefsCache = null; 53210 } 53211 getNewPersistentRef(obj) { 53212 if (this._newPersistentRefNum === null) { 53213 this._newPersistentRefNum = this.entries.length || 1; 53214 } 53215 const num = this._newPersistentRefNum++; 53216 this._cacheMap.set(num, obj); 53217 return Ref.get(num, 0); 53218 } 53219 getNewTemporaryRef() { 53220 if (this._newTemporaryRefNum === null) { 53221 this._newTemporaryRefNum = this.entries.length || 1; 53222 if (this._newPersistentRefNum) { 53223 this._persistentRefsCache = new Map(); 53224 for (let i = this._newTemporaryRefNum; i < this._newPersistentRefNum; i++) { 53225 this._persistentRefsCache.set(i, this._cacheMap.get(i)); 53226 this._cacheMap.delete(i); 53227 } 53228 } 53229 } 53230 return Ref.get(this._newTemporaryRefNum++, 0); 53231 } 53232 resetNewTemporaryRef() { 53233 this._newTemporaryRefNum = null; 53234 if (this._persistentRefsCache) { 53235 for (const [num, obj] of this._persistentRefsCache) { 53236 this._cacheMap.set(num, obj); 53237 } 53238 } 53239 this._persistentRefsCache = null; 53240 } 53241 setStartXRef(startXRef) { 53242 this.startXRefQueue = [startXRef]; 53243 } 53244 parse(recoveryMode = false) { 53245 let trailerDict; 53246 if (!recoveryMode) { 53247 trailerDict = this.readXRef(); 53248 } else { 53249 warn("Indexing all PDF objects"); 53250 trailerDict = this.indexObjects(); 53251 } 53252 trailerDict.assignXref(this); 53253 this.trailer = trailerDict; 53254 let encrypt; 53255 try { 53256 encrypt = trailerDict.get("Encrypt"); 53257 } catch (ex) { 53258 if (ex instanceof MissingDataException) { 53259 throw ex; 53260 } 53261 warn(`XRef.parse - Invalid "Encrypt" reference: "${ex}".`); 53262 } 53263 if (encrypt instanceof Dict) { 53264 const ids = trailerDict.get("ID"); 53265 const fileId = ids?.length ? ids[0] : ""; 53266 encrypt.suppressEncryption = true; 53267 this.encrypt = new CipherTransformFactory(encrypt, fileId, this.pdfManager.password); 53268 } 53269 let root; 53270 try { 53271 root = trailerDict.get("Root"); 53272 } catch (ex) { 53273 if (ex instanceof MissingDataException) { 53274 throw ex; 53275 } 53276 warn(`XRef.parse - Invalid "Root" reference: "${ex}".`); 53277 } 53278 if (root instanceof Dict) { 53279 try { 53280 const pages = root.get("Pages"); 53281 if (pages instanceof Dict) { 53282 this.root = root; 53283 return; 53284 } 53285 } catch (ex) { 53286 if (ex instanceof MissingDataException) { 53287 throw ex; 53288 } 53289 warn(`XRef.parse - Invalid "Pages" reference: "${ex}".`); 53290 } 53291 } 53292 if (!recoveryMode) { 53293 throw new XRefParseException(); 53294 } 53295 throw new InvalidPDFException("Invalid Root reference."); 53296 } 53297 processXRefTable(parser) { 53298 if (!("tableState" in this)) { 53299 this.tableState = { 53300 entryNum: 0, 53301 streamPos: parser.lexer.stream.pos, 53302 parserBuf1: parser.buf1, 53303 parserBuf2: parser.buf2 53304 }; 53305 } 53306 const obj = this.readXRefTable(parser); 53307 if (!isCmd(obj, "trailer")) { 53308 throw new FormatError("Invalid XRef table: could not find trailer dictionary"); 53309 } 53310 let dict = parser.getObj(); 53311 if (!(dict instanceof Dict) && dict.dict) { 53312 dict = dict.dict; 53313 } 53314 if (!(dict instanceof Dict)) { 53315 throw new FormatError("Invalid XRef table: could not parse trailer dictionary"); 53316 } 53317 delete this.tableState; 53318 return dict; 53319 } 53320 readXRefTable(parser) { 53321 const stream = parser.lexer.stream; 53322 const tableState = this.tableState; 53323 stream.pos = tableState.streamPos; 53324 parser.buf1 = tableState.parserBuf1; 53325 parser.buf2 = tableState.parserBuf2; 53326 let obj; 53327 while (true) { 53328 if (!("firstEntryNum" in tableState) || !("entryCount" in tableState)) { 53329 if (isCmd(obj = parser.getObj(), "trailer")) { 53330 break; 53331 } 53332 tableState.firstEntryNum = obj; 53333 tableState.entryCount = parser.getObj(); 53334 } 53335 let first = tableState.firstEntryNum; 53336 const count = tableState.entryCount; 53337 if (!Number.isInteger(first) || !Number.isInteger(count)) { 53338 throw new FormatError("Invalid XRef table: wrong types in subsection header"); 53339 } 53340 for (let i = tableState.entryNum; i < count; i++) { 53341 tableState.streamPos = stream.pos; 53342 tableState.entryNum = i; 53343 tableState.parserBuf1 = parser.buf1; 53344 tableState.parserBuf2 = parser.buf2; 53345 const entry = {}; 53346 entry.offset = parser.getObj(); 53347 entry.gen = parser.getObj(); 53348 const type = parser.getObj(); 53349 if (type instanceof Cmd) { 53350 switch (type.cmd) { 53351 case "f": 53352 entry.free = true; 53353 break; 53354 case "n": 53355 entry.uncompressed = true; 53356 break; 53357 } 53358 } 53359 if (!Number.isInteger(entry.offset) || !Number.isInteger(entry.gen) || !(entry.free || entry.uncompressed)) { 53360 throw new FormatError(`Invalid entry in XRef subsection: ${first}, ${count}`); 53361 } 53362 if (i === 0 && entry.free && first === 1) { 53363 first = 0; 53364 } 53365 if (!this.entries[i + first]) { 53366 this.entries[i + first] = entry; 53367 } 53368 } 53369 tableState.entryNum = 0; 53370 tableState.streamPos = stream.pos; 53371 tableState.parserBuf1 = parser.buf1; 53372 tableState.parserBuf2 = parser.buf2; 53373 delete tableState.firstEntryNum; 53374 delete tableState.entryCount; 53375 } 53376 if (this.entries[0] && !this.entries[0].free) { 53377 throw new FormatError("Invalid XRef table: unexpected first object"); 53378 } 53379 return obj; 53380 } 53381 processXRefStream(stream) { 53382 if (!("streamState" in this)) { 53383 const { 53384 dict, 53385 pos 53386 } = stream; 53387 const byteWidths = dict.get("W"); 53388 const range = dict.get("Index") || [0, dict.get("Size")]; 53389 this.streamState = { 53390 entryRanges: range, 53391 byteWidths, 53392 entryNum: 0, 53393 streamPos: pos 53394 }; 53395 } 53396 this.readXRefStream(stream); 53397 delete this.streamState; 53398 return stream.dict; 53399 } 53400 readXRefStream(stream) { 53401 const streamState = this.streamState; 53402 stream.pos = streamState.streamPos; 53403 const [typeFieldWidth, offsetFieldWidth, generationFieldWidth] = streamState.byteWidths; 53404 const entryRanges = streamState.entryRanges; 53405 while (entryRanges.length > 0) { 53406 const [first, n] = entryRanges; 53407 if (!Number.isInteger(first) || !Number.isInteger(n)) { 53408 throw new FormatError(`Invalid XRef range fields: ${first}, ${n}`); 53409 } 53410 if (!Number.isInteger(typeFieldWidth) || !Number.isInteger(offsetFieldWidth) || !Number.isInteger(generationFieldWidth)) { 53411 throw new FormatError(`Invalid XRef entry fields length: ${first}, ${n}`); 53412 } 53413 for (let i = streamState.entryNum; i < n; ++i) { 53414 streamState.entryNum = i; 53415 streamState.streamPos = stream.pos; 53416 let type = 0, 53417 offset = 0, 53418 generation = 0; 53419 for (let j = 0; j < typeFieldWidth; ++j) { 53420 const typeByte = stream.getByte(); 53421 if (typeByte === -1) { 53422 throw new FormatError("Invalid XRef byteWidths 'type'."); 53423 } 53424 type = type << 8 | typeByte; 53425 } 53426 if (typeFieldWidth === 0) { 53427 type = 1; 53428 } 53429 for (let j = 0; j < offsetFieldWidth; ++j) { 53430 const offsetByte = stream.getByte(); 53431 if (offsetByte === -1) { 53432 throw new FormatError("Invalid XRef byteWidths 'offset'."); 53433 } 53434 offset = offset << 8 | offsetByte; 53435 } 53436 for (let j = 0; j < generationFieldWidth; ++j) { 53437 const generationByte = stream.getByte(); 53438 if (generationByte === -1) { 53439 throw new FormatError("Invalid XRef byteWidths 'generation'."); 53440 } 53441 generation = generation << 8 | generationByte; 53442 } 53443 const entry = {}; 53444 entry.offset = offset; 53445 entry.gen = generation; 53446 switch (type) { 53447 case 0: 53448 entry.free = true; 53449 break; 53450 case 1: 53451 entry.uncompressed = true; 53452 break; 53453 case 2: 53454 break; 53455 default: 53456 throw new FormatError(`Invalid XRef entry type: ${type}`); 53457 } 53458 if (!this.entries[first + i]) { 53459 this.entries[first + i] = entry; 53460 } 53461 } 53462 streamState.entryNum = 0; 53463 streamState.streamPos = stream.pos; 53464 entryRanges.splice(0, 2); 53465 } 53466 } 53467 indexObjects() { 53468 const TAB = 0x9, 53469 LF = 0xa, 53470 CR = 0xd, 53471 SPACE = 0x20; 53472 const PERCENT = 0x25, 53473 LT = 0x3c; 53474 function readToken(data, offset) { 53475 let token = "", 53476 ch = data[offset]; 53477 while (ch !== LF && ch !== CR && ch !== LT) { 53478 if (++offset >= data.length) { 53479 break; 53480 } 53481 token += String.fromCharCode(ch); 53482 ch = data[offset]; 53483 } 53484 return token; 53485 } 53486 function skipUntil(data, offset, what) { 53487 const length = what.length, 53488 dataLength = data.length; 53489 let skipped = 0; 53490 while (offset < dataLength) { 53491 let i = 0; 53492 while (i < length && data[offset + i] === what[i]) { 53493 ++i; 53494 } 53495 if (i >= length) { 53496 break; 53497 } 53498 offset++; 53499 skipped++; 53500 } 53501 return skipped; 53502 } 53503 const gEndobjRegExp = /\b(endobj|\d+\s+\d+\s+obj|xref|trailer\s*<<)\b/g; 53504 const gStartxrefRegExp = /\b(startxref|\d+\s+\d+\s+obj)\b/g; 53505 const objRegExp = /^(\d+)\s+(\d+)\s+obj\b/; 53506 const trailerBytes = new Uint8Array([116, 114, 97, 105, 108, 101, 114]); 53507 const startxrefBytes = new Uint8Array([115, 116, 97, 114, 116, 120, 114, 101, 102]); 53508 const xrefBytes = new Uint8Array([47, 88, 82, 101, 102]); 53509 this.entries.length = 0; 53510 this._cacheMap.clear(); 53511 const stream = this.stream; 53512 stream.pos = 0; 53513 const buffer = stream.getBytes(), 53514 bufferStr = bytesToString(buffer), 53515 length = buffer.length; 53516 let position = stream.start; 53517 const trailers = [], 53518 xrefStms = []; 53519 while (position < length) { 53520 let ch = buffer[position]; 53521 if (ch === TAB || ch === LF || ch === CR || ch === SPACE) { 53522 ++position; 53523 continue; 53524 } 53525 if (ch === PERCENT) { 53526 do { 53527 ++position; 53528 if (position >= length) { 53529 break; 53530 } 53531 ch = buffer[position]; 53532 } while (ch !== LF && ch !== CR); 53533 continue; 53534 } 53535 const token = readToken(buffer, position); 53536 let m; 53537 if (token.startsWith("xref") && (token.length === 4 || /\s/.test(token[4]))) { 53538 position += skipUntil(buffer, position, trailerBytes); 53539 trailers.push(position); 53540 position += skipUntil(buffer, position, startxrefBytes); 53541 } else if (m = objRegExp.exec(token)) { 53542 const num = m[1] | 0, 53543 gen = m[2] | 0; 53544 const startPos = position + token.length; 53545 let contentLength, 53546 updateEntries = false; 53547 if (!this.entries[num]) { 53548 updateEntries = true; 53549 } else if (this.entries[num].gen === gen) { 53550 try { 53551 const parser = new Parser({ 53552 lexer: new Lexer(stream.makeSubStream(startPos)) 53553 }); 53554 parser.getObj(); 53555 updateEntries = true; 53556 } catch (ex) { 53557 if (ex instanceof ParserEOFException) { 53558 warn(`indexObjects -- checking object (${token}): "${ex}".`); 53559 } else { 53560 updateEntries = true; 53561 } 53562 } 53563 } 53564 if (updateEntries) { 53565 this.entries[num] = { 53566 offset: position - stream.start, 53567 gen, 53568 uncompressed: true 53569 }; 53570 } 53571 gEndobjRegExp.lastIndex = startPos; 53572 const match = gEndobjRegExp.exec(bufferStr); 53573 if (match) { 53574 const endPos = gEndobjRegExp.lastIndex + 1; 53575 contentLength = endPos - position; 53576 if (match[1] !== "endobj") { 53577 warn(`indexObjects: Found "${match[1]}" inside of another "obj", ` + 'caused by missing "endobj" -- trying to recover.'); 53578 contentLength -= match[1].length + 1; 53579 } 53580 } else { 53581 contentLength = length - position; 53582 } 53583 const content = buffer.subarray(position, position + contentLength); 53584 const xrefTagOffset = skipUntil(content, 0, xrefBytes); 53585 if (xrefTagOffset < contentLength && content[xrefTagOffset + 5] < 64) { 53586 xrefStms.push(position - stream.start); 53587 this._xrefStms.add(position - stream.start); 53588 } 53589 position += contentLength; 53590 } else if (token.startsWith("trailer") && (token.length === 7 || /\s/.test(token[7]))) { 53591 trailers.push(position); 53592 const startPos = position + token.length; 53593 let contentLength; 53594 gStartxrefRegExp.lastIndex = startPos; 53595 const match = gStartxrefRegExp.exec(bufferStr); 53596 if (match) { 53597 const endPos = gStartxrefRegExp.lastIndex + 1; 53598 contentLength = endPos - position; 53599 if (match[1] !== "startxref") { 53600 warn(`indexObjects: Found "${match[1]}" after "trailer", ` + 'caused by missing "startxref" -- trying to recover.'); 53601 contentLength -= match[1].length + 1; 53602 } 53603 } else { 53604 contentLength = length - position; 53605 } 53606 position += contentLength; 53607 } else { 53608 position += token.length + 1; 53609 } 53610 } 53611 for (const xrefStm of xrefStms) { 53612 this.startXRefQueue.push(xrefStm); 53613 this.readXRef(true); 53614 } 53615 const trailerDicts = []; 53616 let isEncrypted = false; 53617 for (const trailer of trailers) { 53618 stream.pos = trailer; 53619 const parser = new Parser({ 53620 lexer: new Lexer(stream), 53621 xref: this, 53622 allowStreams: true, 53623 recoveryMode: true 53624 }); 53625 const obj = parser.getObj(); 53626 if (!isCmd(obj, "trailer")) { 53627 continue; 53628 } 53629 const dict = parser.getObj(); 53630 if (!(dict instanceof Dict)) { 53631 continue; 53632 } 53633 trailerDicts.push(dict); 53634 if (dict.has("Encrypt")) { 53635 isEncrypted = true; 53636 } 53637 } 53638 let trailerDict, trailerError; 53639 for (const dict of [...trailerDicts, "genFallback", ...trailerDicts]) { 53640 if (dict === "genFallback") { 53641 if (!trailerError) { 53642 break; 53643 } 53644 this._generationFallback = true; 53645 continue; 53646 } 53647 let validPagesDict = false; 53648 try { 53649 const rootDict = dict.get("Root"); 53650 if (!(rootDict instanceof Dict)) { 53651 continue; 53652 } 53653 const pagesDict = rootDict.get("Pages"); 53654 if (!(pagesDict instanceof Dict)) { 53655 continue; 53656 } 53657 const pagesCount = pagesDict.get("Count"); 53658 if (Number.isInteger(pagesCount)) { 53659 validPagesDict = true; 53660 } 53661 } catch (ex) { 53662 trailerError = ex; 53663 continue; 53664 } 53665 if (validPagesDict && (!isEncrypted || dict.has("Encrypt")) && dict.has("ID")) { 53666 return dict; 53667 } 53668 trailerDict = dict; 53669 } 53670 if (trailerDict) { 53671 return trailerDict; 53672 } 53673 if (this.topDict) { 53674 return this.topDict; 53675 } 53676 if (!trailerDicts.length) { 53677 for (const [num, entry] of this.entries.entries()) { 53678 if (!entry) { 53679 continue; 53680 } 53681 const ref = Ref.get(num, entry.gen); 53682 let obj; 53683 try { 53684 obj = this.fetch(ref); 53685 } catch { 53686 continue; 53687 } 53688 if (obj instanceof BaseStream) { 53689 obj = obj.dict; 53690 } 53691 if (obj instanceof Dict && obj.has("Root")) { 53692 return obj; 53693 } 53694 } 53695 } 53696 throw new InvalidPDFException("Invalid PDF structure."); 53697 } 53698 readXRef(recoveryMode = false) { 53699 const stream = this.stream; 53700 const startXRefParsedCache = new Set(); 53701 while (this.startXRefQueue.length) { 53702 try { 53703 const startXRef = this.startXRefQueue[0]; 53704 if (startXRefParsedCache.has(startXRef)) { 53705 warn("readXRef - skipping XRef table since it was already parsed."); 53706 this.startXRefQueue.shift(); 53707 continue; 53708 } 53709 startXRefParsedCache.add(startXRef); 53710 stream.pos = startXRef + stream.start; 53711 const parser = new Parser({ 53712 lexer: new Lexer(stream), 53713 xref: this, 53714 allowStreams: true 53715 }); 53716 let obj = parser.getObj(); 53717 let dict; 53718 if (isCmd(obj, "xref")) { 53719 dict = this.processXRefTable(parser); 53720 if (!this.topDict) { 53721 this.topDict = dict; 53722 } 53723 obj = dict.get("XRefStm"); 53724 if (Number.isInteger(obj) && !this._xrefStms.has(obj)) { 53725 this._xrefStms.add(obj); 53726 this.startXRefQueue.push(obj); 53727 this.#firstXRefStmPos ??= obj; 53728 } 53729 } else if (Number.isInteger(obj)) { 53730 if (!Number.isInteger(parser.getObj()) || !isCmd(parser.getObj(), "obj") || !((obj = parser.getObj()) instanceof BaseStream)) { 53731 throw new FormatError("Invalid XRef stream"); 53732 } 53733 dict = this.processXRefStream(obj); 53734 if (!this.topDict) { 53735 this.topDict = dict; 53736 } 53737 if (!dict) { 53738 throw new FormatError("Failed to read XRef stream"); 53739 } 53740 } else { 53741 throw new FormatError("Invalid XRef stream header"); 53742 } 53743 obj = dict.get("Prev"); 53744 if (Number.isInteger(obj)) { 53745 this.startXRefQueue.push(obj); 53746 } else if (obj instanceof Ref) { 53747 this.startXRefQueue.push(obj.num); 53748 } 53749 } catch (e) { 53750 if (e instanceof MissingDataException) { 53751 throw e; 53752 } 53753 info("(while reading XRef): " + e); 53754 } 53755 this.startXRefQueue.shift(); 53756 } 53757 if (this.topDict) { 53758 return this.topDict; 53759 } 53760 if (recoveryMode) { 53761 return undefined; 53762 } 53763 throw new XRefParseException(); 53764 } 53765 get lastXRefStreamPos() { 53766 return this.#firstXRefStmPos ?? (this._xrefStms.size > 0 ? Math.max(...this._xrefStms) : null); 53767 } 53768 getEntry(i) { 53769 const xrefEntry = this.entries[i]; 53770 if (xrefEntry && !xrefEntry.free && xrefEntry.offset) { 53771 return xrefEntry; 53772 } 53773 return null; 53774 } 53775 fetchIfRef(obj, suppressEncryption = false) { 53776 if (obj instanceof Ref) { 53777 return this.fetch(obj, suppressEncryption); 53778 } 53779 return obj; 53780 } 53781 fetch(ref, suppressEncryption = false) { 53782 if (!(ref instanceof Ref)) { 53783 throw new Error("ref object is not a reference"); 53784 } 53785 const num = ref.num; 53786 const cacheEntry = this._cacheMap.get(num); 53787 if (cacheEntry !== undefined) { 53788 if (cacheEntry instanceof Dict && !cacheEntry.objId) { 53789 cacheEntry.objId = ref.toString(); 53790 } 53791 return cacheEntry; 53792 } 53793 let xrefEntry = this.getEntry(num); 53794 if (xrefEntry === null) { 53795 this._cacheMap.set(num, xrefEntry); 53796 return xrefEntry; 53797 } 53798 if (this._pendingRefs.has(ref)) { 53799 this._pendingRefs.remove(ref); 53800 warn(`Ignoring circular reference: ${ref}.`); 53801 return CIRCULAR_REF; 53802 } 53803 this._pendingRefs.put(ref); 53804 try { 53805 xrefEntry = xrefEntry.uncompressed ? this.fetchUncompressed(ref, xrefEntry, suppressEncryption) : this.fetchCompressed(ref, xrefEntry, suppressEncryption); 53806 this._pendingRefs.remove(ref); 53807 } catch (ex) { 53808 this._pendingRefs.remove(ref); 53809 throw ex; 53810 } 53811 if (xrefEntry instanceof Dict) { 53812 xrefEntry.objId = ref.toString(); 53813 } else if (xrefEntry instanceof BaseStream) { 53814 xrefEntry.dict.objId = ref.toString(); 53815 } 53816 return xrefEntry; 53817 } 53818 fetchUncompressed(ref, xrefEntry, suppressEncryption = false) { 53819 const gen = ref.gen; 53820 let num = ref.num; 53821 if (xrefEntry.gen !== gen) { 53822 const msg = `Inconsistent generation in XRef: ${ref}`; 53823 if (this._generationFallback && xrefEntry.gen < gen) { 53824 warn(msg); 53825 return this.fetchUncompressed(Ref.get(num, xrefEntry.gen), xrefEntry, suppressEncryption); 53826 } 53827 throw new XRefEntryException(msg); 53828 } 53829 const stream = this.stream.makeSubStream(xrefEntry.offset + this.stream.start); 53830 const parser = new Parser({ 53831 lexer: new Lexer(stream), 53832 xref: this, 53833 allowStreams: true 53834 }); 53835 const obj1 = parser.getObj(); 53836 const obj2 = parser.getObj(); 53837 const obj3 = parser.getObj(); 53838 if (obj1 !== num || obj2 !== gen || !(obj3 instanceof Cmd)) { 53839 throw new XRefEntryException(`Bad (uncompressed) XRef entry: ${ref}`); 53840 } 53841 if (obj3.cmd !== "obj") { 53842 if (obj3.cmd.startsWith("obj")) { 53843 num = parseInt(obj3.cmd.substring(3), 10); 53844 if (!Number.isNaN(num)) { 53845 return num; 53846 } 53847 } 53848 throw new XRefEntryException(`Bad (uncompressed) XRef entry: ${ref}`); 53849 } 53850 xrefEntry = this.encrypt && !suppressEncryption ? parser.getObj(this.encrypt.createCipherTransform(num, gen)) : parser.getObj(); 53851 if (!(xrefEntry instanceof BaseStream)) { 53852 this._cacheMap.set(num, xrefEntry); 53853 } 53854 return xrefEntry; 53855 } 53856 fetchCompressed(ref, xrefEntry, suppressEncryption = false) { 53857 const tableOffset = xrefEntry.offset; 53858 const stream = this.fetch(Ref.get(tableOffset, 0)); 53859 if (!(stream instanceof BaseStream)) { 53860 throw new FormatError("bad ObjStm stream"); 53861 } 53862 const first = stream.dict.get("First"); 53863 const n = stream.dict.get("N"); 53864 if (!Number.isInteger(first) || !Number.isInteger(n)) { 53865 throw new FormatError("invalid first and n parameters for ObjStm stream"); 53866 } 53867 let parser = new Parser({ 53868 lexer: new Lexer(stream), 53869 xref: this, 53870 allowStreams: true 53871 }); 53872 const nums = new Array(n); 53873 const offsets = new Array(n); 53874 for (let i = 0; i < n; ++i) { 53875 const num = parser.getObj(); 53876 if (!Number.isInteger(num)) { 53877 throw new FormatError(`invalid object number in the ObjStm stream: ${num}`); 53878 } 53879 const offset = parser.getObj(); 53880 if (!Number.isInteger(offset)) { 53881 throw new FormatError(`invalid object offset in the ObjStm stream: ${offset}`); 53882 } 53883 nums[i] = num; 53884 offsets[i] = offset; 53885 } 53886 const start = (stream.start || 0) + first; 53887 const entries = new Array(n); 53888 for (let i = 0; i < n; ++i) { 53889 const length = i < n - 1 ? offsets[i + 1] - offsets[i] : undefined; 53890 if (length < 0) { 53891 throw new FormatError("Invalid offset in the ObjStm stream."); 53892 } 53893 parser = new Parser({ 53894 lexer: new Lexer(stream.makeSubStream(start + offsets[i], length, stream.dict)), 53895 xref: this, 53896 allowStreams: true 53897 }); 53898 const obj = parser.getObj(); 53899 entries[i] = obj; 53900 if (obj instanceof BaseStream) { 53901 continue; 53902 } 53903 const num = nums[i], 53904 entry = this.entries[num]; 53905 if (entry && entry.offset === tableOffset && entry.gen === i) { 53906 this._cacheMap.set(num, obj); 53907 } 53908 } 53909 xrefEntry = entries[xrefEntry.gen]; 53910 if (xrefEntry === undefined) { 53911 throw new XRefEntryException(`Bad (compressed) XRef entry: ${ref}`); 53912 } 53913 return xrefEntry; 53914 } 53915 async fetchIfRefAsync(obj, suppressEncryption) { 53916 if (obj instanceof Ref) { 53917 return this.fetchAsync(obj, suppressEncryption); 53918 } 53919 return obj; 53920 } 53921 async fetchAsync(ref, suppressEncryption) { 53922 try { 53923 return this.fetch(ref, suppressEncryption); 53924 } catch (ex) { 53925 if (!(ex instanceof MissingDataException)) { 53926 throw ex; 53927 } 53928 await this.pdfManager.requestRange(ex.begin, ex.end); 53929 return this.fetchAsync(ref, suppressEncryption); 53930 } 53931 } 53932 getCatalogObj() { 53933 return this.root; 53934 } 53935} 53936 53937;// ./src/core/document.js 53938 53939 53940 53941 53942 53943 53944 53945 53946 53947 53948 53949 53950 53951 53952 53953 53954 53955 53956 53957const LETTER_SIZE_MEDIABOX = [0, 0, 612, 792]; 53958class Page { 53959 constructor({ 53960 pdfManager, 53961 xref, 53962 pageIndex, 53963 pageDict, 53964 ref, 53965 globalIdFactory, 53966 fontCache, 53967 builtInCMapCache, 53968 standardFontDataCache, 53969 globalImageCache, 53970 systemFontCache, 53971 nonBlendModesSet, 53972 xfaFactory 53973 }) { 53974 this.pdfManager = pdfManager; 53975 this.pageIndex = pageIndex; 53976 this.pageDict = pageDict; 53977 this.xref = xref; 53978 this.ref = ref; 53979 this.fontCache = fontCache; 53980 this.builtInCMapCache = builtInCMapCache; 53981 this.standardFontDataCache = standardFontDataCache; 53982 this.globalImageCache = globalImageCache; 53983 this.systemFontCache = systemFontCache; 53984 this.nonBlendModesSet = nonBlendModesSet; 53985 this.evaluatorOptions = pdfManager.evaluatorOptions; 53986 this.resourcesPromise = null; 53987 this.xfaFactory = xfaFactory; 53988 const idCounters = { 53989 obj: 0 53990 }; 53991 this._localIdFactory = class extends globalIdFactory { 53992 static createObjId() { 53993 return `p${pageIndex}_${++idCounters.obj}`; 53994 } 53995 static getPageObjId() { 53996 return `p${ref.toString()}`; 53997 } 53998 }; 53999 } 54000 _getInheritableProperty(key, getArray = false) { 54001 const value = getInheritableProperty({ 54002 dict: this.pageDict, 54003 key, 54004 getArray, 54005 stopWhenFound: false 54006 }); 54007 if (!Array.isArray(value)) { 54008 return value; 54009 } 54010 if (value.length === 1 || !(value[0] instanceof Dict)) { 54011 return value[0]; 54012 } 54013 return Dict.merge({ 54014 xref: this.xref, 54015 dictArray: value 54016 }); 54017 } 54018 get content() { 54019 return this.pageDict.getArray("Contents"); 54020 } 54021 get resources() { 54022 const resources = this._getInheritableProperty("Resources"); 54023 return shadow(this, "resources", resources instanceof Dict ? resources : Dict.empty); 54024 } 54025 _getBoundingBox(name) { 54026 if (this.xfaData) { 54027 return this.xfaData.bbox; 54028 } 54029 const box = lookupNormalRect(this._getInheritableProperty(name, true), null); 54030 if (box) { 54031 if (box[2] - box[0] > 0 && box[3] - box[1] > 0) { 54032 return box; 54033 } 54034 warn(`Empty, or invalid, /${name} entry.`); 54035 } 54036 return null; 54037 } 54038 get mediaBox() { 54039 return shadow(this, "mediaBox", this._getBoundingBox("MediaBox") || LETTER_SIZE_MEDIABOX); 54040 } 54041 get cropBox() { 54042 return shadow(this, "cropBox", this._getBoundingBox("CropBox") || this.mediaBox); 54043 } 54044 get userUnit() { 54045 const obj = this.pageDict.get("UserUnit");
54046 return shadow(this, "userUnit", typeof obj === "number" && obj > 0 ? obj : 1.0); 54047 } 54048 get view() { 54049 const { 54050 cropBox, 54051 mediaBox 54052 } = this; 54053 if (cropBox !== mediaBox && !isArrayEqual(cropBox, mediaBox)) { 54054 const box = Util.intersect(cropBox, mediaBox); 54055 if (box && box[2] - box[0] > 0 && box[3] - box[1] > 0) { 54056 return shadow(this, "view", box); 54057 } 54058 warn("Empty /CropBox and /MediaBox intersection."); 54059 } 54060 return shadow(this, "view", mediaBox); 54061 } 54062 get rotate() { 54063 let rotate = this._getInheritableProperty("Rotate") || 0; 54064 if (rotate % 90 !== 0) { 54065 rotate = 0; 54066 } else if (rotate >= 360) { 54067 rotate %= 360; 54068 } else if (rotate < 0) { 54069 rotate = (rotate % 360 + 360) % 360; 54070 } 54071 return shadow(this, "rotate", rotate); 54072 } 54073 _onSubStreamError(reason, objId) { 54074 if (this.evaluatorOptions.ignoreErrors) { 54075 warn(`getContentStream - ignoring sub-stream (${objId}): "${reason}".`); 54076 return; 54077 } 54078 throw reason; 54079 } 54080 getContentStream() { 54081 return this.pdfManager.ensure(this, "content").then(content => { 54082 if (content instanceof BaseStream) { 54083 return content; 54084 } 54085 if (Array.isArray(content)) { 54086 return new StreamsSequenceStream(content, this._onSubStreamError.bind(this)); 54087 } 54088 return new NullStream(); 54089 }); 54090 } 54091 get xfaData() { 54092 return shadow(this, "xfaData", this.xfaFactory ? { 54093 bbox: this.xfaFactory.getBoundingBox(this.pageIndex) 54094 } : null); 54095 } 54096 async #replaceIdByRef(annotations, deletedAnnotations, existingAnnotations) { 54097 const promises = []; 54098 for (const annotation of annotations) { 54099 if (annotation.id) { 54100 const ref = Ref.fromString(annotation.id); 54101 if (!ref) { 54102 warn(`A non-linked annotation cannot be modified: ${annotation.id}`); 54103 continue; 54104 } 54105 if (annotation.deleted) { 54106 deletedAnnotations.put(ref, ref); 54107 if (annotation.popupRef) { 54108 const popupRef = Ref.fromString(annotation.popupRef); 54109 if (popupRef) { 54110 deletedAnnotations.put(popupRef, popupRef); 54111 } 54112 } 54113 continue; 54114 } 54115 existingAnnotations?.put(ref); 54116 annotation.ref = ref; 54117 promises.push(this.xref.fetchAsync(ref).then(obj => { 54118 if (obj instanceof Dict) { 54119 annotation.oldAnnotation = obj.clone(); 54120 } 54121 }, () => { 54122 warn(`Cannot fetch \`oldAnnotation\` for: ${ref}.`); 54123 })); 54124 delete annotation.id; 54125 } 54126 } 54127 await Promise.all(promises); 54128 } 54129 async saveNewAnnotations(handler, task, annotations, imagePromises, changes) { 54130 if (this.xfaFactory) { 54131 throw new Error("XFA: Cannot save new annotations."); 54132 } 54133 const partialEvaluator = new PartialEvaluator({ 54134 xref: this.xref, 54135 handler, 54136 pageIndex: this.pageIndex, 54137 idFactory: this._localIdFactory, 54138 fontCache: this.fontCache, 54139 builtInCMapCache: this.builtInCMapCache, 54140 standardFontDataCache: this.standardFontDataCache, 54141 globalImageCache: this.globalImageCache, 54142 systemFontCache: this.systemFontCache, 54143 options: this.evaluatorOptions 54144 }); 54145 const deletedAnnotations = new RefSetCache(); 54146 const existingAnnotations = new RefSet(); 54147 await this.#replaceIdByRef(annotations, deletedAnnotations, existingAnnotations); 54148 const pageDict = this.pageDict; 54149 const annotationsArray = this.annotations.filter(a => !(a instanceof Ref && deletedAnnotations.has(a))); 54150 const newData = await AnnotationFactory.saveNewAnnotations(partialEvaluator, task, annotations, imagePromises, changes); 54151 for (const { 54152 ref 54153 } of newData.annotations) { 54154 if (ref instanceof Ref && !existingAnnotations.has(ref)) { 54155 annotationsArray.push(ref); 54156 } 54157 } 54158 const dict = pageDict.clone(); 54159 dict.set("Annots", annotationsArray); 54160 changes.put(this.ref, { 54161 data: dict 54162 }); 54163 for (const deletedRef of deletedAnnotations) { 54164 changes.put(deletedRef, { 54165 data: null 54166 }); 54167 } 54168 } 54169 save(handler, task, annotationStorage, changes) { 54170 const partialEvaluator = new PartialEvaluator({ 54171 xref: this.xref, 54172 handler, 54173 pageIndex: this.pageIndex, 54174 idFactory: this._localIdFactory, 54175 fontCache: this.fontCache, 54176 builtInCMapCache: this.builtInCMapCache, 54177 standardFontDataCache: this.standardFontDataCache, 54178 globalImageCache: this.globalImageCache, 54179 systemFontCache: this.systemFontCache, 54180 options: this.evaluatorOptions 54181 }); 54182 return this._parsedAnnotations.then(function (annotations) { 54183 const promises = []; 54184 for (const annotation of annotations) { 54185 promises.push(annotation.save(partialEvaluator, task, annotationStorage, changes).catch(function (reason) { 54186 warn("save - ignoring annotation data during " + `"${task.name}" task: "${reason}".`); 54187 return null; 54188 })); 54189 } 54190 return Promise.all(promises); 54191 }); 54192 } 54193 loadResources(keys) { 54194 this.resourcesPromise ||= this.pdfManager.ensure(this, "resources"); 54195 return this.resourcesPromise.then(() => { 54196 const objectLoader = new ObjectLoader(this.resources, keys, this.xref); 54197 return objectLoader.load(); 54198 }); 54199 } 54200 getOperatorList({ 54201 handler, 54202 sink, 54203 task, 54204 intent, 54205 cacheKey, 54206 annotationStorage = null, 54207 modifiedIds = null 54208 }) { 54209 const contentStreamPromise = this.getContentStream(); 54210 const resourcesPromise = this.loadResources(["ColorSpace", "ExtGState", "Font", "Pattern", "Properties", "Shading", "XObject"]); 54211 const partialEvaluator = new PartialEvaluator({ 54212 xref: this.xref, 54213 handler, 54214 pageIndex: this.pageIndex, 54215 idFactory: this._localIdFactory, 54216 fontCache: this.fontCache, 54217 builtInCMapCache: this.builtInCMapCache, 54218 standardFontDataCache: this.standardFontDataCache, 54219 globalImageCache: this.globalImageCache, 54220 systemFontCache: this.systemFontCache, 54221 options: this.evaluatorOptions 54222 }); 54223 const newAnnotsByPage = !this.xfaFactory ? getNewAnnotationsMap(annotationStorage) : null; 54224 const newAnnots = newAnnotsByPage?.get(this.pageIndex);
vendor: 4,133 bytes, lines 54225-54314
54225 let newAnnotationsPromise = Promise.resolve(null); 54226 let deletedAnnotations = null; 54227 if (newAnnots) { 54228 const annotationGlobalsPromise = this.pdfManager.ensureDoc("annotationGlobals"); 54229 let imagePromises; 54230 const missingBitmaps = new Set(); 54231 for (const { 54232 bitmapId, 54233 bitmap 54234 } of newAnnots) { 54235 if (bitmapId && !bitmap && !missingBitmaps.has(bitmapId)) { 54236 missingBitmaps.add(bitmapId); 54237 } 54238 } 54239 const { 54240 isOffscreenCanvasSupported 54241 } = this.evaluatorOptions; 54242 if (missingBitmaps.size > 0) { 54243 const annotationWithBitmaps = newAnnots.slice(); 54244 for (const [key, annotation] of annotationStorage) { 54245 if (!key.startsWith(AnnotationEditorPrefix)) { 54246 continue; 54247 } 54248 if (annotation.bitmap && missingBitmaps.has(annotation.bitmapId)) { 54249 annotationWithBitmaps.push(annotation); 54250 } 54251 } 54252 imagePromises = AnnotationFactory.generateImages(annotationWithBitmaps, this.xref, isOffscreenCanvasSupported); 54253 } else { 54254 imagePromises = AnnotationFactory.generateImages(newAnnots, this.xref, isOffscreenCanvasSupported); 54255 } 54256 deletedAnnotations = new RefSet(); 54257 newAnnotationsPromise = Promise.all([annotationGlobalsPromise, this.#replaceIdByRef(newAnnots, deletedAnnotations, null)]).then(([annotationGlobals]) => { 54258 if (!annotationGlobals) { 54259 return null; 54260 } 54261 return AnnotationFactory.printNewAnnotations(annotationGlobals, partialEvaluator, task, newAnnots, imagePromises); 54262 }); 54263 } 54264 const pageListPromise = Promise.all([contentStreamPromise, resourcesPromise]).then(([contentStream]) => { 54265 const opList = new OperatorList(intent, sink); 54266 handler.send("StartRenderPage", { 54267 transparency: partialEvaluator.hasBlendModes(this.resources, this.nonBlendModesSet), 54268 pageIndex: this.pageIndex, 54269 cacheKey 54270 }); 54271 return partialEvaluator.getOperatorList({ 54272 stream: contentStream, 54273 task, 54274 resources: this.resources, 54275 operatorList: opList 54276 }).then(function () { 54277 return opList; 54278 }); 54279 }); 54280 return Promise.all([pageListPromise, this._parsedAnnotations, newAnnotationsPromise]).then(function ([pageOpList, annotations, newAnnotations]) { 54281 if (newAnnotations) { 54282 annotations = annotations.filter(a => !(a.ref && deletedAnnotations.has(a.ref))); 54283 for (let i = 0, ii = newAnnotations.length; i < ii; i++) { 54284 const newAnnotation = newAnnotations[i]; 54285 if (newAnnotation.refToReplace) { 54286 const j = annotations.findIndex(a => a.ref && isRefsEqual(a.ref, newAnnotation.refToReplace)); 54287 if (j >= 0) { 54288 annotations.splice(j, 1, newAnnotation); 54289 newAnnotations.splice(i--, 1); 54290 ii--; 54291 } 54292 } 54293 } 54294 annotations = annotations.concat(newAnnotations); 54295 } 54296 if (annotations.length === 0 || intent & RenderingIntentFlag.ANNOTATIONS_DISABLE) { 54297 pageOpList.flush(true); 54298 return { 54299 length: pageOpList.totalLength 54300 }; 54301 } 54302 const renderForms = !!(intent & RenderingIntentFlag.ANNOTATIONS_FORMS), 54303 isEditing = !!(intent & RenderingIntentFlag.IS_EDITING), 54304 intentAny = !!(intent & RenderingIntentFlag.ANY), 54305 intentDisplay = !!(intent & RenderingIntentFlag.DISPLAY), 54306 intentPrint = !!(intent & RenderingIntentFlag.PRINT); 54307 const opListPromises = []; 54308 for (const annotation of annotations) { 54309 if (intentAny || intentDisplay && annotation.mustBeViewed(annotationStorage, renderForms) && annotation.mustBeViewedWhenEditing(isEditing, modifiedIds) || intentPrint && annotation.mustBePrinted(annotationStorage)) { 54310 opListPromises.push(annotation.getOperatorList(partialEvaluator, task, intent, annotationStorage).catch(function (reason) { 54311 warn("getOperatorList - ignoring annotation data during " + `"${task.name}" task: "${reason}".`); 54312 return { 54313 opList: null, 54314 separateForm: false,
54315 separateCanvas: false 54316 }; 54317 })); 54318 } 54319 } 54320 return Promise.all(opListPromises).then(function (opLists) { 54321 let form = false, 54322 canvas = false; 54323 for (const { 54324 opList, 54325 separateForm, 54326 separateCanvas 54327 } of opLists) { 54328 pageOpList.addOpList(opList); 54329 form ||= separateForm; 54330 canvas ||= separateCanvas; 54331 } 54332 pageOpList.flush(true, { 54333 form, 54334 canvas 54335 }); 54336 return { 54337 length: pageOpList.totalLength 54338 }; 54339 }); 54340 }); 54341 } 54342 async extractTextContent({ 54343 handler, 54344 task, 54345 includeMarkedContent, 54346 disableNormalization, 54347 sink 54348 }) { 54349 const contentStreamPromise = this.getContentStream(); 54350 const resourcesPromise = this.loadResources(["ExtGState", "Font", "Properties", "XObject"]); 54351 const langPromise = this.pdfManager.ensureCatalog("lang"); 54352 const [contentStream,, lang] = await Promise.all([contentStreamPromise, resourcesPromise, langPromise]); 54353 const partialEvaluator = new PartialEvaluator({ 54354 xref: this.xref, 54355 handler, 54356 pageIndex: this.pageIndex, 54357 idFactory: this._localIdFactory, 54358 fontCache: this.fontCache, 54359 builtInCMapCache: this.builtInCMapCache, 54360 standardFontDataCache: this.standardFontDataCache, 54361 globalImageCache: this.globalImageCache, 54362 systemFontCache: this.systemFontCache, 54363 options: this.evaluatorOptions 54364 }); 54365 return partialEvaluator.getTextContent({ 54366 stream: contentStream, 54367 task, 54368 resources: this.resources, 54369 includeMarkedContent, 54370 disableNormalization, 54371 sink, 54372 viewBox: this.view, 54373 lang 54374 }); 54375 } 54376 async getStructTree() { 54377 const structTreeRoot = await this.pdfManager.ensureCatalog("structTreeRoot"); 54378 if (!structTreeRoot) { 54379 return null; 54380 } 54381 await this._parsedAnnotations; 54382 const structTree = await this.pdfManager.ensure(this, "_parseStructTree", [structTreeRoot]); 54383 return this.pdfManager.ensure(structTree, "serializable"); 54384 } 54385 _parseStructTree(structTreeRoot) { 54386 const tree = new StructTreePage(structTreeRoot, this.pageDict); 54387 tree.parse(this.ref); 54388 return tree; 54389 } 54390 async getAnnotationsData(handler, task, intent) { 54391 const annotations = await this._parsedAnnotations; 54392 if (annotations.length === 0) { 54393 return annotations; 54394 } 54395 const annotationsData = [], 54396 textContentPromises = []; 54397 let partialEvaluator; 54398 const intentAny = !!(intent & RenderingIntentFlag.ANY), 54399 intentDisplay = !!(intent & RenderingIntentFlag.DISPLAY), 54400 intentPrint = !!(intent & RenderingIntentFlag.PRINT); 54401 for (const annotation of annotations) { 54402 const isVisible = intentAny || intentDisplay && annotation.viewable; 54403 if (isVisible || intentPrint && annotation.printable) { 54404 annotationsData.push(annotation.data); 54405 } 54406 if (annotation.hasTextContent && isVisible) { 54407 partialEvaluator ||= new PartialEvaluator({ 54408 xref: this.xref, 54409 handler, 54410 pageIndex: this.pageIndex, 54411 idFactory: this._localIdFactory, 54412 fontCache: this.fontCache, 54413 builtInCMapCache: this.builtInCMapCache, 54414 standardFontDataCache: this.standardFontDataCache, 54415 globalImageCache: this.globalImageCache, 54416 systemFontCache: this.systemFontCache, 54417 options: this.evaluatorOptions 54418 }); 54419 textContentPromises.push(annotation.extractTextContent(partialEvaluator, task, [-Infinity, -Infinity, Infinity, Infinity]).catch(function (reason) { 54420 warn(`getAnnotationsData - ignoring textContent during "${task.name}" task: "${reason}".`); 54421 })); 54422 } 54423 } 54424 await Promise.all(textContentPromises); 54425 return annotationsData; 54426 } 54427 get annotations() { 54428 const annots = this._getInheritableProperty("Annots"); 54429 return shadow(this, "annotations", Array.isArray(annots) ? annots : []); 54430 } 54431 get _parsedAnnotations() { 54432 const promise = this.pdfManager.ensure(this, "annotations").then(async annots => { 54433 if (annots.length === 0) { 54434 return annots; 54435 } 54436 const [annotationGlobals, fieldObjects] = await Promise.all([this.pdfManager.ensureDoc("annotationGlobals"), this.pdfManager.ensureDoc("fieldObjects")]); 54437 if (!annotationGlobals) { 54438 return []; 54439 } 54440 const orphanFields = fieldObjects?.orphanFields; 54441 const annotationPromises = []; 54442 for (const annotationRef of annots) { 54443 annotationPromises.push(AnnotationFactory.create(this.xref, annotationRef, annotationGlobals, this._localIdFactory, false, orphanFields, this.ref).catch(function (reason) { 54444 warn(`_parsedAnnotations: "${reason}".`); 54445 return null; 54446 })); 54447 } 54448 const sortedAnnotations = []; 54449 let popupAnnotations, widgetAnnotations; 54450 for (const annotation of await Promise.all(annotationPromises)) { 54451 if (!annotation) { 54452 continue; 54453 } 54454 if (annotation instanceof WidgetAnnotation) { 54455 (widgetAnnotations ||= []).push(annotation); 54456 continue; 54457 } 54458 if (annotation instanceof PopupAnnotation) { 54459 (popupAnnotations ||= []).push(annotation); 54460 continue; 54461 } 54462 sortedAnnotations.push(annotation); 54463 } 54464 if (widgetAnnotations) { 54465 sortedAnnotations.push(...widgetAnnotations); 54466 } 54467 if (popupAnnotations) { 54468 sortedAnnotations.push(...popupAnnotations); 54469 } 54470 return sortedAnnotations; 54471 }); 54472 return shadow(this, "_parsedAnnotations", promise); 54473 } 54474 get jsActions() { 54475 const actions = collectActions(this.xref, this.pageDict, PageActionEventType); 54476 return shadow(this, "jsActions", actions); 54477 } 54478} 54479const PDF_HEADER_SIGNATURE = new Uint8Array([0x25, 0x50, 0x44, 0x46, 0x2d]); 54480const STARTXREF_SIGNATURE = new Uint8Array([0x73, 0x74, 0x61, 0x72, 0x74, 0x78, 0x72, 0x65, 0x66]); 54481const ENDOBJ_SIGNATURE = new Uint8Array([0x65, 0x6e, 0x64, 0x6f, 0x62, 0x6a]); 54482function find(stream, signature, limit = 1024, backwards = false) { 54483 const signatureLength = signature.length; 54484 const scanBytes = stream.peekBytes(limit); 54485 const scanLength = scanBytes.length - signatureLength; 54486 if (scanLength <= 0) { 54487 return false;
vendor: 4,226 bytes, lines 54488-54647
54488 } 54489 if (backwards) { 54490 const signatureEnd = signatureLength - 1; 54491 let pos = scanBytes.length - 1; 54492 while (pos >= signatureEnd) { 54493 let j = 0; 54494 while (j < signatureLength && scanBytes[pos - j] === signature[signatureEnd - j]) { 54495 j++; 54496 } 54497 if (j >= signatureLength) { 54498 stream.pos += pos - signatureEnd; 54499 return true; 54500 } 54501 pos--; 54502 } 54503 } else { 54504 let pos = 0; 54505 while (pos <= scanLength) { 54506 let j = 0; 54507 while (j < signatureLength && scanBytes[pos + j] === signature[j]) { 54508 j++; 54509 } 54510 if (j >= signatureLength) { 54511 stream.pos += pos; 54512 return true; 54513 } 54514 pos++; 54515 } 54516 } 54517 return false; 54518} 54519class PDFDocument { 54520 constructor(pdfManager, stream) { 54521 if (stream.length <= 0) { 54522 throw new InvalidPDFException("The PDF file is empty, i.e. its size is zero bytes."); 54523 } 54524 this.pdfManager = pdfManager; 54525 this.stream = stream; 54526 this.xref = new XRef(stream, pdfManager); 54527 this._pagePromises = new Map(); 54528 this._version = null; 54529 const idCounters = { 54530 font: 0 54531 }; 54532 this._globalIdFactory = class { 54533 static getDocId() { 54534 return `g_${pdfManager.docId}`; 54535 } 54536 static createFontId() { 54537 return `f${++idCounters.font}`; 54538 } 54539 static createObjId() { 54540 unreachable("Abstract method `createObjId` called."); 54541 } 54542 static getPageObjId() { 54543 unreachable("Abstract method `getPageObjId` called."); 54544 } 54545 }; 54546 } 54547 parse(recoveryMode) { 54548 this.xref.parse(recoveryMode); 54549 this.catalog = new Catalog(this.pdfManager, this.xref); 54550 } 54551 get linearization() { 54552 let linearization = null; 54553 try { 54554 linearization = Linearization.create(this.stream); 54555 } catch (err) { 54556 if (err instanceof MissingDataException) { 54557 throw err; 54558 } 54559 info(err); 54560 } 54561 return shadow(this, "linearization", linearization); 54562 } 54563 get startXRef() { 54564 const stream = this.stream; 54565 let startXRef = 0; 54566 if (this.linearization) { 54567 stream.reset(); 54568 if (find(stream, ENDOBJ_SIGNATURE)) { 54569 stream.skip(6); 54570 let ch = stream.peekByte(); 54571 while (isWhiteSpace(ch)) { 54572 stream.pos++; 54573 ch = stream.peekByte(); 54574 } 54575 startXRef = stream.pos - stream.start; 54576 } 54577 } else { 54578 const step = 1024; 54579 const startXRefLength = STARTXREF_SIGNATURE.length; 54580 let found = false, 54581 pos = stream.end; 54582 while (!found && pos > 0) { 54583 pos -= step - startXRefLength; 54584 if (pos < 0) { 54585 pos = 0; 54586 } 54587 stream.pos = pos; 54588 found = find(stream, STARTXREF_SIGNATURE, step, true); 54589 } 54590 if (found) { 54591 stream.skip(9); 54592 let ch; 54593 do { 54594 ch = stream.getByte(); 54595 } while (isWhiteSpace(ch)); 54596 let str = ""; 54597 while (ch >= 0x20 && ch <= 0x39) { 54598 str += String.fromCharCode(ch); 54599 ch = stream.getByte(); 54600 } 54601 startXRef = parseInt(str, 10); 54602 if (isNaN(startXRef)) { 54603 startXRef = 0; 54604 } 54605 } 54606 } 54607 return shadow(this, "startXRef", startXRef); 54608 } 54609 checkHeader() { 54610 const stream = this.stream; 54611 stream.reset(); 54612 if (!find(stream, PDF_HEADER_SIGNATURE)) { 54613 return; 54614 } 54615 stream.moveStart(); 54616 stream.skip(PDF_HEADER_SIGNATURE.length); 54617 let version = "", 54618 ch; 54619 while ((ch = stream.getByte()) > 0x20 && version.length < 7) { 54620 version += String.fromCharCode(ch); 54621 } 54622 if (PDF_VERSION_REGEXP.test(version)) { 54623 this._version = version; 54624 } else { 54625 warn(`Invalid PDF header version: ${version}`); 54626 } 54627 } 54628 parseStartXRef() { 54629 this.xref.setStartXRef(this.startXRef); 54630 } 54631 get numPages() { 54632 let num = 0; 54633 if (this.catalog.hasActualNumPages) { 54634 num = this.catalog.numPages; 54635 } else if (this.xfaFactory) { 54636 num = this.xfaFactory.getNumPages(); 54637 } else if (this.linearization) { 54638 num = this.linearization.numPages; 54639 } else { 54640 num = this.catalog.numPages; 54641 } 54642 return shadow(this, "numPages", num); 54643 } 54644 _hasOnlyDocumentSignatures(fields, recursionDepth = 0) { 54645 const RECURSION_LIMIT = 10; 54646 if (!Array.isArray(fields)) { 54647 return false;
54648 } 54649 return fields.every(field => { 54650 field = this.xref.fetchIfRef(field); 54651 if (!(field instanceof Dict)) { 54652 return false; 54653 } 54654 if (field.has("Kids")) { 54655 if (++recursionDepth > RECURSION_LIMIT) { 54656 warn("_hasOnlyDocumentSignatures: maximum recursion depth reached"); 54657 return false; 54658 } 54659 return this._hasOnlyDocumentSignatures(field.get("Kids"), recursionDepth); 54660 } 54661 const isSignature = isName(field.get("FT"), "Sig"); 54662 const rectangle = field.get("Rect"); 54663 const isInvisible = Array.isArray(rectangle) && rectangle.every(value => value === 0); 54664 return isSignature && isInvisible; 54665 }); 54666 } 54667 get _xfaStreams() { 54668 const acroForm = this.catalog.acroForm; 54669 if (!acroForm) { 54670 return null; 54671 } 54672 const xfa = acroForm.get("XFA"); 54673 const entries = { 54674 "xdp:xdp": "", 54675 template: "", 54676 datasets: "", 54677 config: "", 54678 connectionSet: "", 54679 localeSet: "", 54680 stylesheet: "", 54681 "/xdp:xdp": "" 54682 }; 54683 if (xfa instanceof BaseStream && !xfa.isEmpty) { 54684 entries["xdp:xdp"] = xfa; 54685 return entries; 54686 } 54687 if (!Array.isArray(xfa) || xfa.length === 0) { 54688 return null; 54689 } 54690 for (let i = 0, ii = xfa.length; i < ii; i += 2) { 54691 let name; 54692 if (i === 0) { 54693 name = "xdp:xdp"; 54694 } else if (i === ii - 2) { 54695 name = "/xdp:xdp"; 54696 } else { 54697 name = xfa[i]; 54698 } 54699 if (!entries.hasOwnProperty(name)) { 54700 continue; 54701 } 54702 const data = this.xref.fetchIfRef(xfa[i + 1]); 54703 if (!(data instanceof BaseStream) || data.isEmpty) { 54704 continue; 54705 } 54706 entries[name] = data; 54707 } 54708 return entries; 54709 } 54710 get xfaDatasets() { 54711 const streams = this._xfaStreams; 54712 if (!streams) { 54713 return shadow(this, "xfaDatasets", null); 54714 } 54715 for (const key of ["datasets", "xdp:xdp"]) { 54716 const stream = streams[key]; 54717 if (!stream) { 54718 continue; 54719 } 54720 try { 54721 const str = stringToUTF8String(stream.getString()); 54722 const data = { 54723 [key]: str 54724 }; 54725 return shadow(this, "xfaDatasets", new DatasetReader(data)); 54726 } catch { 54727 warn("XFA - Invalid utf-8 string."); 54728 break; 54729 } 54730 } 54731 return shadow(this, "xfaDatasets", null); 54732 } 54733 get xfaData() { 54734 const streams = this._xfaStreams; 54735 if (!streams) { 54736 return null; 54737 } 54738 const data = Object.create(null); 54739 for (const [key, stream] of Object.entries(streams)) { 54740 if (!stream) { 54741 continue; 54742 } 54743 try { 54744 data[key] = stringToUTF8String(stream.getString()); 54745 } catch { 54746 warn("XFA - Invalid utf-8 string."); 54747 return null; 54748 } 54749 } 54750 return data; 54751 } 54752 get xfaFactory() { 54753 let data; 54754 if (this.pdfManager.enableXfa && this.catalog.needsRendering && this.formInfo.hasXfa && !this.formInfo.hasAcroForm) { 54755 data = this.xfaData; 54756 } 54757 return shadow(this, "xfaFactory", data ? new XFAFactory(data) : null); 54758 } 54759 get isPureXfa() { 54760 return this.xfaFactory ? this.xfaFactory.isValid() : false; 54761 } 54762 get htmlForXfa() { 54763 return this.xfaFactory ? this.xfaFactory.getPages() : null; 54764 } 54765 async loadXfaImages() { 54766 const xfaImagesDict = await this.pdfManager.ensureCatalog("xfaImages"); 54767 if (!xfaImagesDict) { 54768 return; 54769 } 54770 const keys = xfaImagesDict.getKeys(); 54771 const objectLoader = new ObjectLoader(xfaImagesDict, keys, this.xref); 54772 await objectLoader.load(); 54773 const xfaImages = new Map(); 54774 for (const key of keys) { 54775 const stream = xfaImagesDict.get(key); 54776 if (stream instanceof BaseStream) { 54777 xfaImages.set(key, stream.getBytes()); 54778 } 54779 } 54780 this.xfaFactory.setImages(xfaImages); 54781 } 54782 async loadXfaFonts(handler, task) { 54783 const acroForm = await this.pdfManager.ensureCatalog("acroForm"); 54784 if (!acroForm) { 54785 return; 54786 } 54787 const resources = await acroForm.getAsync("DR"); 54788 if (!(resources instanceof Dict)) { 54789 return; 54790 } 54791 const objectLoader = new ObjectLoader(resources, ["Font"], this.xref); 54792 await objectLoader.load(); 54793 const fontRes = resources.get("Font"); 54794 if (!(fontRes instanceof Dict)) { 54795 return; 54796 } 54797 const options = Object.assign(Object.create(null), this.pdfManager.evaluatorOptions); 54798 options.useSystemFonts = false;
54799 const partialEvaluator = new PartialEvaluator({ 54800 xref: this.xref, 54801 handler, 54802 pageIndex: -1, 54803 idFactory: this._globalIdFactory, 54804 fontCache: this.catalog.fontCache, 54805 builtInCMapCache: this.catalog.builtInCMapCache, 54806 standardFontDataCache: this.catalog.standardFontDataCache, 54807 options 54808 }); 54809 const operatorList = new OperatorList(); 54810 const pdfFonts = []; 54811 const initialState = { 54812 get font() { 54813 return pdfFonts.at(-1); 54814 }, 54815 set font(font) { 54816 pdfFonts.push(font); 54817 }, 54818 clone() { 54819 return this; 54820 } 54821 }; 54822 const promises = []; 54823 for (const [fontName, font] of fontRes) { 54824 const descriptor = font.get("FontDescriptor"); 54825 if (!(descriptor instanceof Dict)) { 54826 continue; 54827 } 54828 let fontFamily = descriptor.get("FontFamily"); 54829 fontFamily = fontFamily.replaceAll(/[ ]+(\d)/g, "$1"); 54830 const fontWeight = descriptor.get("FontWeight"); 54831 const italicAngle = -descriptor.get("ItalicAngle"); 54832 const cssFontInfo = { 54833 fontFamily, 54834 fontWeight, 54835 italicAngle 54836 }; 54837 if (!validateCSSFont(cssFontInfo)) { 54838 continue; 54839 } 54840 promises.push(partialEvaluator.handleSetFont(resources, [Name.get(fontName), 1], null, operatorList, task, initialState, null, cssFontInfo).catch(function (reason) { 54841 warn(`loadXfaFonts: "${reason}".`); 54842 return null; 54843 })); 54844 } 54845 await Promise.all(promises); 54846 const missingFonts = this.xfaFactory.setFonts(pdfFonts); 54847 if (!missingFonts) { 54848 return; 54849 } 54850 options.ignoreErrors = true; 54851 promises.length = 0; 54852 pdfFonts.length = 0; 54853 const reallyMissingFonts = new Set(); 54854 for (const missing of missingFonts) { 54855 if (!getXfaFontName(`${missing}-Regular`)) { 54856 reallyMissingFonts.add(missing); 54857 } 54858 } 54859 if (reallyMissingFonts.size) { 54860 missingFonts.push("PdfJS-Fallback"); 54861 } 54862 for (const missing of missingFonts) { 54863 if (reallyMissingFonts.has(missing)) { 54864 continue; 54865 } 54866 for (const fontInfo of [{ 54867 name: "Regular", 54868 fontWeight: 400, 54869 italicAngle: 0 54870 }, { 54871 name: "Bold", 54872 fontWeight: 700, 54873 italicAngle: 0 54874 }, { 54875 name: "Italic", 54876 fontWeight: 400, 54877 italicAngle: 12 54878 }, { 54879 name: "BoldItalic", 54880 fontWeight: 700, 54881 italicAngle: 12 54882 }]) { 54883 const name = `${missing}-${fontInfo.name}`; 54884 const dict = getXfaFontDict(name); 54885 promises.push(partialEvaluator.handleSetFont(resources, [Name.get(name), 1], null, operatorList, task, initialState, dict, { 54886 fontFamily: missing, 54887 fontWeight: fontInfo.fontWeight, 54888 italicAngle: fontInfo.italicAngle 54889 }).catch(function (reason) { 54890 warn(`loadXfaFonts: "${reason}".`); 54891 return null; 54892 })); 54893 } 54894 } 54895 await Promise.all(promises); 54896 this.xfaFactory.appendFonts(pdfFonts, reallyMissingFonts); 54897 } 54898 async serializeXfaData(annotationStorage) { 54899 return this.xfaFactory ? this.xfaFactory.serializeData(annotationStorage) : null; 54900 } 54901 get version() {
54902 return this.catalog.version || this._version; 54903 } 54904 get formInfo() { 54905 const formInfo = { 54906 hasFields: false, 54907 hasAcroForm: false, 54908 hasXfa: false, 54909 hasSignatures: false 54910 }; 54911 const acroForm = this.catalog.acroForm; 54912 if (!acroForm) { 54913 return shadow(this, "formInfo", formInfo); 54914 } 54915 try { 54916 const fields = acroForm.get("Fields"); 54917 const hasFields = Array.isArray(fields) && fields.length > 0; 54918 formInfo.hasFields = hasFields; 54919 const xfa = acroForm.get("XFA"); 54920 formInfo.hasXfa = Array.isArray(xfa) && xfa.length > 0 || xfa instanceof BaseStream && !xfa.isEmpty; 54921 const sigFlags = acroForm.get("SigFlags"); 54922 const hasSignatures = !!(sigFlags & 0x1); 54923 const hasOnlyDocumentSignatures = hasSignatures && this._hasOnlyDocumentSignatures(fields); 54924 formInfo.hasAcroForm = hasFields && !hasOnlyDocumentSignatures; 54925 formInfo.hasSignatures = hasSignatures; 54926 } catch (ex) { 54927 if (ex instanceof MissingDataException) { 54928 throw ex; 54929 } 54930 warn(`Cannot fetch form information: "${ex}".`); 54931 } 54932 return shadow(this, "formInfo", formInfo); 54933 } 54934 get documentInfo() { 54935 const docInfo = { 54936 PDFFormatVersion: this.version, 54937 Language: this.catalog.lang, 54938 EncryptFilterName: this.xref.encrypt ? this.xref.encrypt.filterName : null, 54939 IsLinearized: !!this.linearization, 54940 IsAcroFormPresent: this.formInfo.hasAcroForm, 54941 IsXFAPresent: this.formInfo.hasXfa, 54942 IsCollectionPresent: !!this.catalog.collection, 54943 IsSignaturesPresent: this.formInfo.hasSignatures 54944 }; 54945 let infoDict; 54946 try { 54947 infoDict = this.xref.trailer.get("Info"); 54948 } catch (err) { 54949 if (err instanceof MissingDataException) { 54950 throw err; 54951 }
vendor: 61,540 bytes, lines 54952-56914
54952 info("The document information dictionary is invalid."); 54953 } 54954 if (!(infoDict instanceof Dict)) { 54955 return shadow(this, "documentInfo", docInfo); 54956 } 54957 for (const key of infoDict.getKeys()) { 54958 const value = infoDict.get(key); 54959 switch (key) { 54960 case "Title": 54961 case "Author": 54962 case "Subject": 54963 case "Keywords": 54964 case "Creator": 54965 case "Producer": 54966 case "CreationDate": 54967 case "ModDate": 54968 if (typeof value === "string") { 54969 docInfo[key] = stringToPDFString(value); 54970 continue; 54971 } 54972 break; 54973 case "Trapped": 54974 if (value instanceof Name) { 54975 docInfo[key] = value; 54976 continue; 54977 } 54978 break; 54979 default: 54980 let customValue; 54981 switch (typeof value) { 54982 case "string": 54983 customValue = stringToPDFString(value); 54984 break; 54985 case "number": 54986 case "boolean": 54987 customValue = value; 54988 break; 54989 default: 54990 if (value instanceof Name) { 54991 customValue = value; 54992 } 54993 break; 54994 } 54995 if (customValue === undefined) { 54996 warn(`Bad value, for custom key "${key}", in Info: ${value}.`); 54997 continue; 54998 } 54999 if (!docInfo.Custom) { 55000 docInfo.Custom = Object.create(null); 55001 } 55002 docInfo.Custom[key] = customValue; 55003 continue; 55004 } 55005 warn(`Bad value, for key "${key}", in Info: ${value}.`); 55006 } 55007 return shadow(this, "documentInfo", docInfo); 55008 } 55009 get fingerprints() { 55010 const FINGERPRINT_FIRST_BYTES = 1024; 55011 const EMPTY_FINGERPRINT = "\x00".repeat(16); 55012 function validate(data) { 55013 return typeof data === "string" && data.length === 16 && data !== EMPTY_FINGERPRINT; 55014 } 55015 const id = this.xref.trailer.get("ID"); 55016 let hashOriginal, hashModified; 55017 if (Array.isArray(id) && validate(id[0])) { 55018 hashOriginal = stringToBytes(id[0]); 55019 if (id[1] !== id[0] && validate(id[1])) { 55020 hashModified = stringToBytes(id[1]); 55021 } 55022 } else { 55023 hashOriginal = calculateMD5(this.stream.getByteRange(0, FINGERPRINT_FIRST_BYTES), 0, FINGERPRINT_FIRST_BYTES); 55024 } 55025 return shadow(this, "fingerprints", [toHexUtil(hashOriginal), hashModified ? toHexUtil(hashModified) : null]); 55026 } 55027 async _getLinearizationPage(pageIndex) { 55028 const { 55029 catalog, 55030 linearization, 55031 xref 55032 } = this; 55033 const ref = Ref.get(linearization.objectNumberFirst, 0); 55034 try { 55035 const obj = await xref.fetchAsync(ref); 55036 if (obj instanceof Dict) { 55037 let type = obj.getRaw("Type"); 55038 if (type instanceof Ref) { 55039 type = await xref.fetchAsync(type); 55040 } 55041 if (isName(type, "Page") || !obj.has("Type") && !obj.has("Kids") && obj.has("Contents")) { 55042 if (!catalog.pageKidsCountCache.has(ref)) { 55043 catalog.pageKidsCountCache.put(ref, 1); 55044 } 55045 if (!catalog.pageIndexCache.has(ref)) { 55046 catalog.pageIndexCache.put(ref, 0); 55047 } 55048 return [obj, ref]; 55049 } 55050 } 55051 throw new FormatError("The Linearization dictionary doesn't point to a valid Page dictionary."); 55052 } catch (reason) { 55053 warn(`_getLinearizationPage: "${reason.message}".`); 55054 return catalog.getPageDict(pageIndex); 55055 } 55056 } 55057 getPage(pageIndex) { 55058 const cachedPromise = this._pagePromises.get(pageIndex); 55059 if (cachedPromise) { 55060 return cachedPromise; 55061 } 55062 const { 55063 catalog, 55064 linearization, 55065 xfaFactory 55066 } = this; 55067 let promise; 55068 if (xfaFactory) { 55069 promise = Promise.resolve([Dict.empty, null]); 55070 } else if (linearization?.pageFirst === pageIndex) { 55071 promise = this._getLinearizationPage(pageIndex); 55072 } else { 55073 promise = catalog.getPageDict(pageIndex); 55074 } 55075 promise = promise.then(([pageDict, ref]) => { 55076 return new Page({ 55077 pdfManager: this.pdfManager, 55078 xref: this.xref, 55079 pageIndex, 55080 pageDict, 55081 ref, 55082 globalIdFactory: this._globalIdFactory, 55083 fontCache: catalog.fontCache, 55084 builtInCMapCache: catalog.builtInCMapCache, 55085 standardFontDataCache: catalog.standardFontDataCache, 55086 globalImageCache: catalog.globalImageCache, 55087 systemFontCache: catalog.systemFontCache, 55088 nonBlendModesSet: catalog.nonBlendModesSet, 55089 xfaFactory 55090 }); 55091 }); 55092 this._pagePromises.set(pageIndex, promise); 55093 return promise; 55094 } 55095 async checkFirstPage(recoveryMode = false) { 55096 if (recoveryMode) { 55097 return; 55098 } 55099 try { 55100 await this.getPage(0); 55101 } catch (reason) { 55102 if (reason instanceof XRefEntryException) { 55103 this._pagePromises.delete(0); 55104 await this.cleanup(); 55105 throw new XRefParseException(); 55106 } 55107 } 55108 } 55109 async checkLastPage(recoveryMode = false) { 55110 const { 55111 catalog, 55112 pdfManager 55113 } = this; 55114 catalog.setActualNumPages(); 55115 let numPages; 55116 try { 55117 await Promise.all([pdfManager.ensureDoc("xfaFactory"), pdfManager.ensureDoc("linearization"), pdfManager.ensureCatalog("numPages")]); 55118 if (this.xfaFactory) { 55119 return; 55120 } else if (this.linearization) { 55121 numPages = this.linearization.numPages; 55122 } else { 55123 numPages = catalog.numPages; 55124 } 55125 if (!Number.isInteger(numPages)) { 55126 throw new FormatError("Page count is not an integer."); 55127 } else if (numPages <= 1) { 55128 return; 55129 } 55130 await this.getPage(numPages - 1); 55131 } catch (reason) { 55132 this._pagePromises.delete(numPages - 1); 55133 await this.cleanup(); 55134 if (reason instanceof XRefEntryException && !recoveryMode) { 55135 throw new XRefParseException(); 55136 } 55137 warn(`checkLastPage - invalid /Pages tree /Count: ${numPages}.`); 55138 let pagesTree; 55139 try { 55140 pagesTree = await catalog.getAllPageDicts(recoveryMode); 55141 } catch (reasonAll) { 55142 if (reasonAll instanceof XRefEntryException && !recoveryMode) { 55143 throw new XRefParseException(); 55144 } 55145 catalog.setActualNumPages(1); 55146 return; 55147 } 55148 for (const [pageIndex, [pageDict, ref]] of pagesTree) { 55149 let promise; 55150 if (pageDict instanceof Error) { 55151 promise = Promise.reject(pageDict); 55152 promise.catch(() => {}); 55153 } else { 55154 promise = Promise.resolve(new Page({ 55155 pdfManager, 55156 xref: this.xref, 55157 pageIndex, 55158 pageDict, 55159 ref, 55160 globalIdFactory: this._globalIdFactory, 55161 fontCache: catalog.fontCache, 55162 builtInCMapCache: catalog.builtInCMapCache, 55163 standardFontDataCache: catalog.standardFontDataCache, 55164 globalImageCache: catalog.globalImageCache, 55165 systemFontCache: catalog.systemFontCache, 55166 nonBlendModesSet: catalog.nonBlendModesSet, 55167 xfaFactory: null 55168 })); 55169 } 55170 this._pagePromises.set(pageIndex, promise); 55171 } 55172 catalog.setActualNumPages(pagesTree.size); 55173 } 55174 } 55175 fontFallback(id, handler) { 55176 return this.catalog.fontFallback(id, handler); 55177 } 55178 async cleanup(manuallyTriggered = false) { 55179 return this.catalog ? this.catalog.cleanup(manuallyTriggered) : clearGlobalCaches(); 55180 } 55181 async #collectFieldObjects(name, parentRef, fieldRef, promises, annotationGlobals, visitedRefs, orphanFields) { 55182 const { 55183 xref 55184 } = this; 55185 if (!(fieldRef instanceof Ref) || visitedRefs.has(fieldRef)) { 55186 return; 55187 } 55188 visitedRefs.put(fieldRef); 55189 const field = await xref.fetchAsync(fieldRef); 55190 if (!(field instanceof Dict)) { 55191 return; 55192 } 55193 if (field.has("T")) { 55194 const partName = stringToPDFString(await field.getAsync("T")); 55195 name = name === "" ? partName : `${name}.${partName}`; 55196 } else { 55197 let obj = field; 55198 while (true) { 55199 obj = obj.getRaw("Parent") || parentRef; 55200 if (obj instanceof Ref) { 55201 if (visitedRefs.has(obj)) { 55202 break; 55203 } 55204 obj = await xref.fetchAsync(obj); 55205 } 55206 if (!(obj instanceof Dict)) { 55207 break; 55208 } 55209 if (obj.has("T")) { 55210 const partName = stringToPDFString(await obj.getAsync("T")); 55211 name = name === "" ? partName : `${name}.${partName}`; 55212 break; 55213 } 55214 } 55215 } 55216 if (parentRef && !field.has("Parent") && isName(field.get("Subtype"), "Widget")) { 55217 orphanFields.put(fieldRef, parentRef); 55218 } 55219 if (!promises.has(name)) { 55220 promises.set(name, []); 55221 } 55222 promises.get(name).push(AnnotationFactory.create(xref, fieldRef, annotationGlobals, null, true, orphanFields, null).then(annotation => annotation?.getFieldObject()).catch(function (reason) { 55223 warn(`#collectFieldObjects: "${reason}".`); 55224 return null; 55225 })); 55226 if (!field.has("Kids")) { 55227 return; 55228 } 55229 const kids = await field.getAsync("Kids"); 55230 if (Array.isArray(kids)) { 55231 for (const kid of kids) { 55232 await this.#collectFieldObjects(name, fieldRef, kid, promises, annotationGlobals, visitedRefs, orphanFields); 55233 } 55234 } 55235 } 55236 get fieldObjects() { 55237 const promise = this.pdfManager.ensureDoc("formInfo").then(async formInfo => { 55238 if (!formInfo.hasFields) { 55239 return null; 55240 } 55241 const [annotationGlobals, acroForm] = await Promise.all([this.pdfManager.ensureDoc("annotationGlobals"), this.pdfManager.ensureCatalog("acroForm")]); 55242 if (!annotationGlobals) { 55243 return null; 55244 } 55245 const visitedRefs = new RefSet(); 55246 const allFields = Object.create(null); 55247 const fieldPromises = new Map(); 55248 const orphanFields = new RefSetCache(); 55249 for (const fieldRef of await acroForm.getAsync("Fields")) { 55250 await this.#collectFieldObjects("", null, fieldRef, fieldPromises, annotationGlobals, visitedRefs, orphanFields); 55251 } 55252 const allPromises = []; 55253 for (const [name, promises] of fieldPromises) { 55254 allPromises.push(Promise.all(promises).then(fields => { 55255 fields = fields.filter(field => !!field); 55256 if (fields.length > 0) { 55257 allFields[name] = fields; 55258 } 55259 })); 55260 } 55261 await Promise.all(allPromises); 55262 return { 55263 allFields, 55264 orphanFields 55265 }; 55266 }); 55267 return shadow(this, "fieldObjects", promise); 55268 } 55269 get hasJSActions() { 55270 const promise = this.pdfManager.ensureDoc("_parseHasJSActions"); 55271 return shadow(this, "hasJSActions", promise); 55272 } 55273 async _parseHasJSActions() { 55274 const [catalogJsActions, fieldObjects] = await Promise.all([this.pdfManager.ensureCatalog("jsActions"), this.pdfManager.ensureDoc("fieldObjects")]); 55275 if (catalogJsActions) { 55276 return true; 55277 } 55278 if (fieldObjects) { 55279 return Object.values(fieldObjects.allFields).some(fieldObject => fieldObject.some(object => object.actions !== null)); 55280 } 55281 return false; 55282 } 55283 get calculationOrderIds() { 55284 const calculationOrder = this.catalog.acroForm?.get("CO"); 55285 if (!Array.isArray(calculationOrder) || calculationOrder.length === 0) { 55286 return shadow(this, "calculationOrderIds", null); 55287 } 55288 const ids = []; 55289 for (const id of calculationOrder) { 55290 if (id instanceof Ref) { 55291 ids.push(id.toString()); 55292 } 55293 } 55294 return shadow(this, "calculationOrderIds", ids.length ? ids : null); 55295 } 55296 get annotationGlobals() { 55297 return shadow(this, "annotationGlobals", AnnotationFactory.createGlobals(this.pdfManager)); 55298 } 55299} 55300 55301;// ./src/core/pdf_manager.js 55302 55303 55304 55305 55306 55307function parseDocBaseUrl(url) { 55308 if (url) { 55309 const absoluteUrl = createValidAbsoluteUrl(url); 55310 if (absoluteUrl) { 55311 return absoluteUrl.href; 55312 } 55313 warn(`Invalid absolute docBaseUrl: "${url}".`); 55314 } 55315 return null; 55316} 55317class BasePdfManager { 55318 constructor(args) { 55319 this._docBaseUrl = parseDocBaseUrl(args.docBaseUrl); 55320 this._docId = args.docId; 55321 this._password = args.password; 55322 this.enableXfa = args.enableXfa; 55323 args.evaluatorOptions.isOffscreenCanvasSupported &&= FeatureTest.isOffscreenCanvasSupported; 55324 args.evaluatorOptions.isImageDecoderSupported &&= FeatureTest.isImageDecoderSupported; 55325 this.evaluatorOptions = Object.freeze(args.evaluatorOptions); 55326 } 55327 get docId() { 55328 return this._docId; 55329 } 55330 get password() { 55331 return this._password; 55332 } 55333 get docBaseUrl() { 55334 return this._docBaseUrl; 55335 } 55336 get catalog() { 55337 return this.pdfDocument.catalog; 55338 } 55339 ensureDoc(prop, args) { 55340 return this.ensure(this.pdfDocument, prop, args); 55341 } 55342 ensureXRef(prop, args) { 55343 return this.ensure(this.pdfDocument.xref, prop, args); 55344 } 55345 ensureCatalog(prop, args) { 55346 return this.ensure(this.pdfDocument.catalog, prop, args); 55347 } 55348 getPage(pageIndex) { 55349 return this.pdfDocument.getPage(pageIndex); 55350 } 55351 fontFallback(id, handler) { 55352 return this.pdfDocument.fontFallback(id, handler); 55353 } 55354 loadXfaFonts(handler, task) { 55355 return this.pdfDocument.loadXfaFonts(handler, task); 55356 } 55357 loadXfaImages() { 55358 return this.pdfDocument.loadXfaImages(); 55359 } 55360 serializeXfaData(annotationStorage) { 55361 return this.pdfDocument.serializeXfaData(annotationStorage); 55362 } 55363 cleanup(manuallyTriggered = false) { 55364 return this.pdfDocument.cleanup(manuallyTriggered); 55365 } 55366 async ensure(obj, prop, args) { 55367 unreachable("Abstract method `ensure` called"); 55368 } 55369 requestRange(begin, end) { 55370 unreachable("Abstract method `requestRange` called"); 55371 } 55372 requestLoadedStream(noFetch = false) { 55373 unreachable("Abstract method `requestLoadedStream` called"); 55374 } 55375 sendProgressiveData(chunk) { 55376 unreachable("Abstract method `sendProgressiveData` called"); 55377 } 55378 updatePassword(password) { 55379 this._password = password; 55380 } 55381 terminate(reason) { 55382 unreachable("Abstract method `terminate` called"); 55383 } 55384} 55385class LocalPdfManager extends BasePdfManager { 55386 constructor(args) { 55387 super(args); 55388 const stream = new Stream(args.source); 55389 this.pdfDocument = new PDFDocument(this, stream); 55390 this._loadedStreamPromise = Promise.resolve(stream); 55391 } 55392 async ensure(obj, prop, args) { 55393 const value = obj[prop]; 55394 if (typeof value === "function") { 55395 return value.apply(obj, args); 55396 } 55397 return value; 55398 } 55399 requestRange(begin, end) { 55400 return Promise.resolve(); 55401 } 55402 requestLoadedStream(noFetch = false) { 55403 return this._loadedStreamPromise; 55404 } 55405 terminate(reason) {} 55406} 55407class NetworkPdfManager extends BasePdfManager { 55408 constructor(args) { 55409 super(args); 55410 this.streamManager = new ChunkedStreamManager(args.source, { 55411 msgHandler: args.handler, 55412 length: args.length, 55413 disableAutoFetch: args.disableAutoFetch, 55414 rangeChunkSize: args.rangeChunkSize 55415 }); 55416 this.pdfDocument = new PDFDocument(this, this.streamManager.getStream()); 55417 } 55418 async ensure(obj, prop, args) { 55419 try { 55420 const value = obj[prop]; 55421 if (typeof value === "function") { 55422 return value.apply(obj, args); 55423 } 55424 return value; 55425 } catch (ex) { 55426 if (!(ex instanceof MissingDataException)) { 55427 throw ex; 55428 } 55429 await this.requestRange(ex.begin, ex.end); 55430 return this.ensure(obj, prop, args); 55431 } 55432 } 55433 requestRange(begin, end) { 55434 return this.streamManager.requestRange(begin, end); 55435 } 55436 requestLoadedStream(noFetch = false) { 55437 return this.streamManager.requestAllChunks(noFetch); 55438 } 55439 sendProgressiveData(chunk) { 55440 this.streamManager.onReceiveData({ 55441 chunk 55442 }); 55443 } 55444 terminate(reason) { 55445 this.streamManager.abort(reason); 55446 } 55447} 55448 55449;// ./src/shared/message_handler.js 55450 55451const CallbackKind = { 55452 DATA: 1, 55453 ERROR: 2 55454}; 55455const StreamKind = { 55456 CANCEL: 1, 55457 CANCEL_COMPLETE: 2, 55458 CLOSE: 3, 55459 ENQUEUE: 4, 55460 ERROR: 5, 55461 PULL: 6, 55462 PULL_COMPLETE: 7, 55463 START_COMPLETE: 8 55464}; 55465function onFn() {} 55466function wrapReason(ex) { 55467 if (ex instanceof AbortException || ex instanceof InvalidPDFException || ex instanceof MissingPDFException || ex instanceof PasswordException || ex instanceof UnexpectedResponseException || ex instanceof UnknownErrorException) { 55468 return ex; 55469 } 55470 if (!(ex instanceof Error || typeof ex === "object" && ex !== null)) { 55471 unreachable('wrapReason: Expected "reason" to be a (possibly cloned) Error.'); 55472 } 55473 switch (ex.name) { 55474 case "AbortException": 55475 return new AbortException(ex.message); 55476 case "InvalidPDFException": 55477 return new InvalidPDFException(ex.message); 55478 case "MissingPDFException": 55479 return new MissingPDFException(ex.message); 55480 case "PasswordException": 55481 return new PasswordException(ex.message, ex.code); 55482 case "UnexpectedResponseException": 55483 return new UnexpectedResponseException(ex.message, ex.status); 55484 case "UnknownErrorException": 55485 return new UnknownErrorException(ex.message, ex.details); 55486 } 55487 return new UnknownErrorException(ex.message, ex.toString()); 55488} 55489class MessageHandler { 55490 #messageAC = new AbortController(); 55491 constructor(sourceName, targetName, comObj) { 55492 this.sourceName = sourceName; 55493 this.targetName = targetName; 55494 this.comObj = comObj; 55495 this.callbackId = 1; 55496 this.streamId = 1; 55497 this.streamSinks = Object.create(null); 55498 this.streamControllers = Object.create(null); 55499 this.callbackCapabilities = Object.create(null); 55500 this.actionHandler = Object.create(null); 55501 comObj.addEventListener("message", this.#onMessage.bind(this), { 55502 signal: this.#messageAC.signal 55503 }); 55504 } 55505 #onMessage({ 55506 data 55507 }) { 55508 if (data.targetName !== this.sourceName) { 55509 return; 55510 } 55511 if (data.stream) { 55512 this.#processStreamMessage(data); 55513 return; 55514 } 55515 if (data.callback) { 55516 const callbackId = data.callbackId; 55517 const capability = this.callbackCapabilities[callbackId]; 55518 if (!capability) { 55519 throw new Error(`Cannot resolve callback ${callbackId}`); 55520 } 55521 delete this.callbackCapabilities[callbackId]; 55522 if (data.callback === CallbackKind.DATA) { 55523 capability.resolve(data.data); 55524 } else if (data.callback === CallbackKind.ERROR) { 55525 capability.reject(wrapReason(data.reason)); 55526 } else { 55527 throw new Error("Unexpected callback case"); 55528 } 55529 return; 55530 } 55531 const action = this.actionHandler[data.action]; 55532 if (!action) { 55533 throw new Error(`Unknown action from worker: ${data.action}`); 55534 } 55535 if (data.callbackId) { 55536 const sourceName = this.sourceName, 55537 targetName = data.sourceName, 55538 comObj = this.comObj; 55539 Promise.try(action, data.data).then(function (result) { 55540 comObj.postMessage({ 55541 sourceName, 55542 targetName, 55543 callback: CallbackKind.DATA, 55544 callbackId: data.callbackId, 55545 data: result 55546 }); 55547 }, function (reason) { 55548 comObj.postMessage({ 55549 sourceName, 55550 targetName, 55551 callback: CallbackKind.ERROR, 55552 callbackId: data.callbackId, 55553 reason: wrapReason(reason) 55554 }); 55555 }); 55556 return; 55557 } 55558 if (data.streamId) { 55559 this.#createStreamSink(data); 55560 return; 55561 } 55562 action(data.data); 55563 } 55564 on(actionName, handler) { 55565 const ah = this.actionHandler; 55566 if (ah[actionName]) { 55567 throw new Error(`There is already an actionName called "${actionName}"`); 55568 } 55569 ah[actionName] = handler; 55570 } 55571 send(actionName, data, transfers) { 55572 this.comObj.postMessage({ 55573 sourceName: this.sourceName, 55574 targetName: this.targetName, 55575 action: actionName, 55576 data 55577 }, transfers); 55578 } 55579 sendWithPromise(actionName, data, transfers) { 55580 const callbackId = this.callbackId++; 55581 const capability = Promise.withResolvers(); 55582 this.callbackCapabilities[callbackId] = capability; 55583 try { 55584 this.comObj.postMessage({ 55585 sourceName: this.sourceName, 55586 targetName: this.targetName, 55587 action: actionName, 55588 callbackId, 55589 data 55590 }, transfers); 55591 } catch (ex) { 55592 capability.reject(ex); 55593 } 55594 return capability.promise; 55595 } 55596 sendWithStream(actionName, data, queueingStrategy, transfers) { 55597 const streamId = this.streamId++, 55598 sourceName = this.sourceName, 55599 targetName = this.targetName, 55600 comObj = this.comObj; 55601 return new ReadableStream({ 55602 start: controller => { 55603 const startCapability = Promise.withResolvers(); 55604 this.streamControllers[streamId] = { 55605 controller, 55606 startCall: startCapability, 55607 pullCall: null, 55608 cancelCall: null, 55609 isClosed: false 55610 }; 55611 comObj.postMessage({ 55612 sourceName, 55613 targetName, 55614 action: actionName, 55615 streamId, 55616 data, 55617 desiredSize: controller.desiredSize 55618 }, transfers); 55619 return startCapability.promise; 55620 }, 55621 pull: controller => { 55622 const pullCapability = Promise.withResolvers(); 55623 this.streamControllers[streamId].pullCall = pullCapability; 55624 comObj.postMessage({ 55625 sourceName, 55626 targetName, 55627 stream: StreamKind.PULL, 55628 streamId, 55629 desiredSize: controller.desiredSize 55630 }); 55631 return pullCapability.promise; 55632 }, 55633 cancel: reason => { 55634 assert(reason instanceof Error, "cancel must have a valid reason"); 55635 const cancelCapability = Promise.withResolvers(); 55636 this.streamControllers[streamId].cancelCall = cancelCapability; 55637 this.streamControllers[streamId].isClosed = true; 55638 comObj.postMessage({ 55639 sourceName, 55640 targetName, 55641 stream: StreamKind.CANCEL, 55642 streamId, 55643 reason: wrapReason(reason) 55644 }); 55645 return cancelCapability.promise; 55646 } 55647 }, queueingStrategy); 55648 } 55649 #createStreamSink(data) { 55650 const streamId = data.streamId, 55651 sourceName = this.sourceName, 55652 targetName = data.sourceName, 55653 comObj = this.comObj; 55654 const self = this, 55655 action = this.actionHandler[data.action]; 55656 const streamSink = { 55657 enqueue(chunk, size = 1, transfers) { 55658 if (this.isCancelled) { 55659 return; 55660 } 55661 const lastDesiredSize = this.desiredSize; 55662 this.desiredSize -= size; 55663 if (lastDesiredSize > 0 && this.desiredSize <= 0) { 55664 this.sinkCapability = Promise.withResolvers(); 55665 this.ready = this.sinkCapability.promise; 55666 } 55667 comObj.postMessage({ 55668 sourceName, 55669 targetName, 55670 stream: StreamKind.ENQUEUE, 55671 streamId, 55672 chunk 55673 }, transfers); 55674 }, 55675 close() { 55676 if (this.isCancelled) { 55677 return; 55678 } 55679 this.isCancelled = true; 55680 comObj.postMessage({ 55681 sourceName, 55682 targetName, 55683 stream: StreamKind.CLOSE, 55684 streamId 55685 }); 55686 delete self.streamSinks[streamId]; 55687 }, 55688 error(reason) { 55689 assert(reason instanceof Error, "error must have a valid reason"); 55690 if (this.isCancelled) { 55691 return; 55692 } 55693 this.isCancelled = true; 55694 comObj.postMessage({ 55695 sourceName, 55696 targetName, 55697 stream: StreamKind.ERROR, 55698 streamId, 55699 reason: wrapReason(reason) 55700 }); 55701 }, 55702 sinkCapability: Promise.withResolvers(), 55703 onPull: null, 55704 onCancel: null, 55705 isCancelled: false, 55706 desiredSize: data.desiredSize, 55707 ready: null 55708 }; 55709 streamSink.sinkCapability.resolve(); 55710 streamSink.ready = streamSink.sinkCapability.promise; 55711 this.streamSinks[streamId] = streamSink; 55712 Promise.try(action, data.data, streamSink).then(function () { 55713 comObj.postMessage({ 55714 sourceName, 55715 targetName, 55716 stream: StreamKind.START_COMPLETE, 55717 streamId, 55718 success: true 55719 }); 55720 }, function (reason) { 55721 comObj.postMessage({ 55722 sourceName, 55723 targetName, 55724 stream: StreamKind.START_COMPLETE, 55725 streamId, 55726 reason: wrapReason(reason) 55727 }); 55728 }); 55729 } 55730 #processStreamMessage(data) { 55731 const streamId = data.streamId, 55732 sourceName = this.sourceName, 55733 targetName = data.sourceName, 55734 comObj = this.comObj; 55735 const streamController = this.streamControllers[streamId], 55736 streamSink = this.streamSinks[streamId]; 55737 switch (data.stream) { 55738 case StreamKind.START_COMPLETE: 55739 if (data.success) { 55740 streamController.startCall.resolve(); 55741 } else { 55742 streamController.startCall.reject(wrapReason(data.reason)); 55743 } 55744 break; 55745 case StreamKind.PULL_COMPLETE: 55746 if (data.success) { 55747 streamController.pullCall.resolve(); 55748 } else { 55749 streamController.pullCall.reject(wrapReason(data.reason)); 55750 } 55751 break; 55752 case StreamKind.PULL: 55753 if (!streamSink) { 55754 comObj.postMessage({ 55755 sourceName, 55756 targetName, 55757 stream: StreamKind.PULL_COMPLETE, 55758 streamId, 55759 success: true 55760 }); 55761 break; 55762 } 55763 if (streamSink.desiredSize <= 0 && data.desiredSize > 0) { 55764 streamSink.sinkCapability.resolve(); 55765 } 55766 streamSink.desiredSize = data.desiredSize; 55767 Promise.try(streamSink.onPull || onFn).then(function () { 55768 comObj.postMessage({ 55769 sourceName, 55770 targetName, 55771 stream: StreamKind.PULL_COMPLETE, 55772 streamId, 55773 success: true 55774 }); 55775 }, function (reason) { 55776 comObj.postMessage({ 55777 sourceName, 55778 targetName, 55779 stream: StreamKind.PULL_COMPLETE, 55780 streamId, 55781 reason: wrapReason(reason) 55782 }); 55783 }); 55784 break; 55785 case StreamKind.ENQUEUE: 55786 assert(streamController, "enqueue should have stream controller"); 55787 if (streamController.isClosed) { 55788 break; 55789 } 55790 streamController.controller.enqueue(data.chunk); 55791 break; 55792 case StreamKind.CLOSE: 55793 assert(streamController, "close should have stream controller"); 55794 if (streamController.isClosed) { 55795 break; 55796 } 55797 streamController.isClosed = true; 55798 streamController.controller.close(); 55799 this.#deleteStreamController(streamController, streamId); 55800 break; 55801 case StreamKind.ERROR: 55802 assert(streamController, "error should have stream controller"); 55803 streamController.controller.error(wrapReason(data.reason)); 55804 this.#deleteStreamController(streamController, streamId); 55805 break; 55806 case StreamKind.CANCEL_COMPLETE: 55807 if (data.success) { 55808 streamController.cancelCall.resolve(); 55809 } else { 55810 streamController.cancelCall.reject(wrapReason(data.reason)); 55811 } 55812 this.#deleteStreamController(streamController, streamId); 55813 break; 55814 case StreamKind.CANCEL: 55815 if (!streamSink) { 55816 break; 55817 } 55818 const dataReason = wrapReason(data.reason); 55819 Promise.try(streamSink.onCancel || onFn, dataReason).then(function () { 55820 comObj.postMessage({ 55821 sourceName, 55822 targetName, 55823 stream: StreamKind.CANCEL_COMPLETE, 55824 streamId, 55825 success: true 55826 }); 55827 }, function (reason) { 55828 comObj.postMessage({ 55829 sourceName, 55830 targetName, 55831 stream: StreamKind.CANCEL_COMPLETE, 55832 streamId, 55833 reason: wrapReason(reason) 55834 }); 55835 }); 55836 streamSink.sinkCapability.reject(dataReason); 55837 streamSink.isCancelled = true; 55838 delete this.streamSinks[streamId]; 55839 break; 55840 default: 55841 throw new Error("Unexpected stream case"); 55842 } 55843 } 55844 async #deleteStreamController(streamController, streamId) { 55845 await Promise.allSettled([streamController.startCall?.promise, streamController.pullCall?.promise, streamController.cancelCall?.promise]); 55846 delete this.streamControllers[streamId]; 55847 } 55848 destroy() { 55849 this.#messageAC?.abort(); 55850 this.#messageAC = null; 55851 } 55852} 55853 55854;// ./src/core/writer.js 55855 55856 55857 55858 55859 55860 55861 55862async function writeObject(ref, obj, buffer, { 55863 encrypt = null 55864}) { 55865 const transform = encrypt?.createCipherTransform(ref.num, ref.gen); 55866 buffer.push(`${ref.num} ${ref.gen} obj\n`); 55867 if (obj instanceof Dict) { 55868 await writeDict(obj, buffer, transform); 55869 } else if (obj instanceof BaseStream) { 55870 await writeStream(obj, buffer, transform); 55871 } else if (Array.isArray(obj) || ArrayBuffer.isView(obj)) { 55872 await writeArray(obj, buffer, transform); 55873 } 55874 buffer.push("\nendobj\n"); 55875} 55876async function writeDict(dict, buffer, transform) { 55877 buffer.push("<<"); 55878 for (const key of dict.getKeys()) { 55879 buffer.push(` /${escapePDFName(key)} `); 55880 await writeValue(dict.getRaw(key), buffer, transform); 55881 } 55882 buffer.push(">>"); 55883} 55884async function writeStream(stream, buffer, transform) { 55885 let bytes = stream.getBytes(); 55886 const { 55887 dict 55888 } = stream; 55889 const [filter, params] = await Promise.all([dict.getAsync("Filter"), dict.getAsync("DecodeParms")]); 55890 const filterZero = Array.isArray(filter) ? await dict.xref.fetchIfRefAsync(filter[0]) : filter; 55891 const isFilterZeroFlateDecode = isName(filterZero, "FlateDecode"); 55892 const MIN_LENGTH_FOR_COMPRESSING = 256; 55893 if (bytes.length >= MIN_LENGTH_FOR_COMPRESSING || isFilterZeroFlateDecode) { 55894 try { 55895 const cs = new CompressionStream("deflate"); 55896 const writer = cs.writable.getWriter(); 55897 await writer.ready; 55898 writer.write(bytes).then(async () => { 55899 await writer.ready; 55900 await writer.close(); 55901 }).catch(() => {}); 55902 const buf = await new Response(cs.readable).arrayBuffer(); 55903 bytes = new Uint8Array(buf); 55904 let newFilter, newParams; 55905 if (!filter) { 55906 newFilter = Name.get("FlateDecode"); 55907 } else if (!isFilterZeroFlateDecode) { 55908 newFilter = Array.isArray(filter) ? [Name.get("FlateDecode"), ...filter] : [Name.get("FlateDecode"), filter]; 55909 if (params) { 55910 newParams = Array.isArray(params) ? [null, ...params] : [null, params]; 55911 } 55912 } 55913 if (newFilter) { 55914 dict.set("Filter", newFilter); 55915 } 55916 if (newParams) { 55917 dict.set("DecodeParms", newParams); 55918 } 55919 } catch (ex) { 55920 info(`writeStream - cannot compress data: "${ex}".`); 55921 } 55922 } 55923 let string = bytesToString(bytes); 55924 if (transform) { 55925 string = transform.encryptString(string); 55926 } 55927 dict.set("Length", string.length); 55928 await writeDict(dict, buffer, transform); 55929 buffer.push(" stream\n", string, "\nendstream"); 55930} 55931async function writeArray(array, buffer, transform) { 55932 buffer.push("["); 55933 let first = true; 55934 for (const val of array) { 55935 if (!first) { 55936 buffer.push(" "); 55937 } else { 55938 first = false; 55939 } 55940 await writeValue(val, buffer, transform); 55941 } 55942 buffer.push("]"); 55943} 55944async function writeValue(value, buffer, transform) { 55945 if (value instanceof Name) { 55946 buffer.push(`/${escapePDFName(value.name)}`); 55947 } else if (value instanceof Ref) { 55948 buffer.push(`${value.num} ${value.gen} R`); 55949 } else if (Array.isArray(value) || ArrayBuffer.isView(value)) { 55950 await writeArray(value, buffer, transform); 55951 } else if (typeof value === "string") { 55952 if (transform) { 55953 value = transform.encryptString(value); 55954 } 55955 buffer.push(`(${escapeString(value)})`); 55956 } else if (typeof value === "number") { 55957 buffer.push(numberToString(value)); 55958 } else if (typeof value === "boolean") { 55959 buffer.push(value.toString()); 55960 } else if (value instanceof Dict) { 55961 await writeDict(value, buffer, transform); 55962 } else if (value instanceof BaseStream) { 55963 await writeStream(value, buffer, transform); 55964 } else if (value === null) { 55965 buffer.push("null"); 55966 } else { 55967 warn(`Unhandled value in writer: ${typeof value}, please file a bug.`); 55968 } 55969} 55970function writeInt(number, size, offset, buffer) { 55971 for (let i = size + offset - 1; i > offset - 1; i--) { 55972 buffer[i] = number & 0xff; 55973 number >>= 8; 55974 } 55975 return offset + size; 55976} 55977function writeString(string, offset, buffer) { 55978 for (let i = 0, len = string.length; i < len; i++) { 55979 buffer[offset + i] = string.charCodeAt(i) & 0xff; 55980 } 55981} 55982function computeMD5(filesize, xrefInfo) { 55983 const time = Math.floor(Date.now() / 1000); 55984 const filename = xrefInfo.filename || ""; 55985 const md5Buffer = [time.toString(), filename, filesize.toString()]; 55986 let md5BufferLen = md5Buffer.reduce((a, str) => a + str.length, 0); 55987 for (const value of Object.values(xrefInfo.info)) { 55988 md5Buffer.push(value); 55989 md5BufferLen += value.length; 55990 } 55991 const array = new Uint8Array(md5BufferLen); 55992 let offset = 0; 55993 for (const str of md5Buffer) { 55994 writeString(str, offset, array); 55995 offset += str.length; 55996 } 55997 return bytesToString(calculateMD5(array)); 55998} 55999function writeXFADataForAcroform(str, changes) { 56000 const xml = new SimpleXMLParser({ 56001 hasAttributes: true 56002 }).parseFromString(str); 56003 for (const { 56004 xfa 56005 } of changes) { 56006 if (!xfa) { 56007 continue; 56008 } 56009 const { 56010 path, 56011 value 56012 } = xfa; 56013 if (!path) { 56014 continue; 56015 } 56016 const nodePath = parseXFAPath(path); 56017 let node = xml.documentElement.searchNode(nodePath, 0); 56018 if (!node && nodePath.length > 1) { 56019 node = xml.documentElement.searchNode([nodePath.at(-1)], 0); 56020 } 56021 if (node) { 56022 node.childNodes = Array.isArray(value) ? value.map(val => new SimpleDOMNode("value", val)) : [new SimpleDOMNode("#text", value)]; 56023 } else { 56024 warn(`Node not found for path: ${path}`); 56025 } 56026 } 56027 const buffer = []; 56028 xml.documentElement.dump(buffer); 56029 return buffer.join(""); 56030} 56031async function updateAcroform({ 56032 xref, 56033 acroForm, 56034 acroFormRef, 56035 hasXfa, 56036 hasXfaDatasetsEntry, 56037 xfaDatasetsRef, 56038 needAppearances, 56039 changes 56040}) { 56041 if (hasXfa && !hasXfaDatasetsEntry && !xfaDatasetsRef) { 56042 warn("XFA - Cannot save it"); 56043 } 56044 if (!needAppearances && (!hasXfa || !xfaDatasetsRef || hasXfaDatasetsEntry)) { 56045 return; 56046 } 56047 const dict = acroForm.clone(); 56048 if (hasXfa && !hasXfaDatasetsEntry) { 56049 const newXfa = acroForm.get("XFA").slice(); 56050 newXfa.splice(2, 0, "datasets"); 56051 newXfa.splice(3, 0, xfaDatasetsRef); 56052 dict.set("XFA", newXfa); 56053 } 56054 if (needAppearances) { 56055 dict.set("NeedAppearances", true); 56056 } 56057 changes.put(acroFormRef, { 56058 data: dict 56059 }); 56060} 56061function updateXFA({ 56062 xfaData, 56063 xfaDatasetsRef, 56064 changes, 56065 xref 56066}) { 56067 if (xfaData === null) { 56068 const datasets = xref.fetchIfRef(xfaDatasetsRef); 56069 xfaData = writeXFADataForAcroform(datasets.getString(), changes); 56070 } 56071 const xfaDataStream = new StringStream(xfaData); 56072 xfaDataStream.dict = new Dict(xref); 56073 xfaDataStream.dict.set("Type", Name.get("EmbeddedFile")); 56074 changes.put(xfaDatasetsRef, { 56075 data: xfaDataStream 56076 }); 56077} 56078async function getXRefTable(xrefInfo, baseOffset, newRefs, newXref, buffer) { 56079 buffer.push("xref\n"); 56080 const indexes = getIndexes(newRefs); 56081 let indexesPosition = 0; 56082 for (const { 56083 ref, 56084 data 56085 } of newRefs) { 56086 if (ref.num === indexes[indexesPosition]) { 56087 buffer.push(`${indexes[indexesPosition]} ${indexes[indexesPosition + 1]}\n`); 56088 indexesPosition += 2; 56089 } 56090 if (data !== null) { 56091 buffer.push(`${baseOffset.toString().padStart(10, "0")} ${Math.min(ref.gen, 0xffff).toString().padStart(5, "0")} n\r\n`); 56092 baseOffset += data.length; 56093 } else { 56094 buffer.push(`0000000000 ${Math.min(ref.gen + 1, 0xffff).toString().padStart(5, "0")} f\r\n`); 56095 } 56096 } 56097 computeIDs(baseOffset, xrefInfo, newXref); 56098 buffer.push("trailer\n"); 56099 await writeDict(newXref, buffer); 56100 buffer.push("\nstartxref\n", baseOffset.toString(), "\n%%EOF\n"); 56101} 56102function getIndexes(newRefs) { 56103 const indexes = []; 56104 for (const { 56105 ref 56106 } of newRefs) { 56107 if (ref.num === indexes.at(-2) + indexes.at(-1)) { 56108 indexes[indexes.length - 1] += 1; 56109 } else { 56110 indexes.push(ref.num, 1); 56111 } 56112 } 56113 return indexes; 56114} 56115async function getXRefStreamTable(xrefInfo, baseOffset, newRefs, newXref, buffer) { 56116 const xrefTableData = []; 56117 let maxOffset = 0; 56118 let maxGen = 0; 56119 for (const { 56120 ref, 56121 data 56122 } of newRefs) { 56123 let gen; 56124 maxOffset = Math.max(maxOffset, baseOffset); 56125 if (data !== null) { 56126 gen = Math.min(ref.gen, 0xffff); 56127 xrefTableData.push([1, baseOffset, gen]); 56128 baseOffset += data.length; 56129 } else { 56130 gen = Math.min(ref.gen + 1, 0xffff); 56131 xrefTableData.push([0, 0, gen]); 56132 } 56133 maxGen = Math.max(maxGen, gen); 56134 } 56135 newXref.set("Index", getIndexes(newRefs)); 56136 const offsetSize = getSizeInBytes(maxOffset); 56137 const maxGenSize = getSizeInBytes(maxGen); 56138 const sizes = [1, offsetSize, maxGenSize]; 56139 newXref.set("W", sizes); 56140 computeIDs(baseOffset, xrefInfo, newXref); 56141 const structSize = sizes.reduce((a, x) => a + x, 0); 56142 const data = new Uint8Array(structSize * xrefTableData.length); 56143 const stream = new Stream(data); 56144 stream.dict = newXref; 56145 let offset = 0; 56146 for (const [type, objOffset, gen] of xrefTableData) { 56147 offset = writeInt(type, sizes[0], offset, data); 56148 offset = writeInt(objOffset, sizes[1], offset, data); 56149 offset = writeInt(gen, sizes[2], offset, data); 56150 } 56151 await writeObject(xrefInfo.newRef, stream, buffer, {}); 56152 buffer.push("startxref\n", baseOffset.toString(), "\n%%EOF\n"); 56153} 56154function computeIDs(baseOffset, xrefInfo, newXref) { 56155 if (Array.isArray(xrefInfo.fileIds) && xrefInfo.fileIds.length > 0) { 56156 const md5 = computeMD5(baseOffset, xrefInfo); 56157 newXref.set("ID", [xrefInfo.fileIds[0], md5]); 56158 } 56159} 56160function getTrailerDict(xrefInfo, changes, useXrefStream) { 56161 const newXref = new Dict(null); 56162 newXref.set("Prev", xrefInfo.startXRef); 56163 const refForXrefTable = xrefInfo.newRef; 56164 if (useXrefStream) { 56165 changes.put(refForXrefTable, { 56166 data: "" 56167 }); 56168 newXref.set("Size", refForXrefTable.num + 1); 56169 newXref.set("Type", Name.get("XRef")); 56170 } else { 56171 newXref.set("Size", refForXrefTable.num); 56172 } 56173 if (xrefInfo.rootRef !== null) { 56174 newXref.set("Root", xrefInfo.rootRef); 56175 } 56176 if (xrefInfo.infoRef !== null) { 56177 newXref.set("Info", xrefInfo.infoRef); 56178 } 56179 if (xrefInfo.encryptRef !== null) { 56180 newXref.set("Encrypt", xrefInfo.encryptRef); 56181 } 56182 return newXref; 56183} 56184async function writeChanges(changes, xref, buffer = []) { 56185 const newRefs = []; 56186 for (const [ref, { 56187 data 56188 }] of changes.items()) { 56189 if (data === null || typeof data === "string") { 56190 newRefs.push({ 56191 ref, 56192 data 56193 }); 56194 continue; 56195 } 56196 await writeObject(ref, data, buffer, xref); 56197 newRefs.push({ 56198 ref, 56199 data: buffer.join("") 56200 }); 56201 buffer.length = 0; 56202 } 56203 return newRefs.sort((a, b) => a.ref.num - b.ref.num); 56204} 56205async function incrementalUpdate({ 56206 originalData, 56207 xrefInfo, 56208 changes, 56209 xref = null, 56210 hasXfa = false, 56211 xfaDatasetsRef = null, 56212 hasXfaDatasetsEntry = false, 56213 needAppearances, 56214 acroFormRef = null, 56215 acroForm = null, 56216 xfaData = null, 56217 useXrefStream = false 56218}) { 56219 await updateAcroform({ 56220 xref, 56221 acroForm, 56222 acroFormRef, 56223 hasXfa, 56224 hasXfaDatasetsEntry, 56225 xfaDatasetsRef, 56226 needAppearances, 56227 changes 56228 }); 56229 if (hasXfa) { 56230 updateXFA({ 56231 xfaData, 56232 xfaDatasetsRef, 56233 changes, 56234 xref 56235 }); 56236 } 56237 const newXref = getTrailerDict(xrefInfo, changes, useXrefStream); 56238 const buffer = []; 56239 const newRefs = await writeChanges(changes, xref, buffer); 56240 let baseOffset = originalData.length; 56241 const lastByte = originalData.at(-1); 56242 if (lastByte !== 0x0a && lastByte !== 0x0d) { 56243 buffer.push("\n"); 56244 baseOffset += 1; 56245 } 56246 for (const { 56247 data 56248 } of newRefs) { 56249 if (data !== null) { 56250 buffer.push(data); 56251 } 56252 } 56253 await (useXrefStream ? getXRefStreamTable(xrefInfo, baseOffset, newRefs, newXref, buffer) : getXRefTable(xrefInfo, baseOffset, newRefs, newXref, buffer)); 56254 const totalLength = buffer.reduce((a, str) => a + str.length, originalData.length); 56255 const array = new Uint8Array(totalLength); 56256 array.set(originalData); 56257 let offset = originalData.length; 56258 for (const str of buffer) { 56259 writeString(str, offset, array); 56260 offset += str.length; 56261 } 56262 return array; 56263} 56264 56265;// ./src/core/worker_stream.js 56266 56267class PDFWorkerStream { 56268 constructor(msgHandler) { 56269 this._msgHandler = msgHandler; 56270 this._contentLength = null; 56271 this._fullRequestReader = null; 56272 this._rangeRequestReaders = []; 56273 } 56274 getFullReader() { 56275 assert(!this._fullRequestReader, "PDFWorkerStream.getFullReader can only be called once."); 56276 this._fullRequestReader = new PDFWorkerStreamReader(this._msgHandler); 56277 return this._fullRequestReader; 56278 } 56279 getRangeReader(begin, end) { 56280 const reader = new PDFWorkerStreamRangeReader(begin, end, this._msgHandler); 56281 this._rangeRequestReaders.push(reader); 56282 return reader; 56283 } 56284 cancelAllRequests(reason) { 56285 this._fullRequestReader?.cancel(reason); 56286 for (const reader of this._rangeRequestReaders.slice(0)) { 56287 reader.cancel(reason); 56288 } 56289 } 56290} 56291class PDFWorkerStreamReader { 56292 constructor(msgHandler) { 56293 this._msgHandler = msgHandler; 56294 this.onProgress = null; 56295 this._contentLength = null; 56296 this._isRangeSupported = false; 56297 this._isStreamingSupported = false; 56298 const readableStream = this._msgHandler.sendWithStream("GetReader"); 56299 this._reader = readableStream.getReader(); 56300 this._headersReady = this._msgHandler.sendWithPromise("ReaderHeadersReady").then(data => { 56301 this._isStreamingSupported = data.isStreamingSupported; 56302 this._isRangeSupported = data.isRangeSupported; 56303 this._contentLength = data.contentLength; 56304 }); 56305 } 56306 get headersReady() { 56307 return this._headersReady; 56308 } 56309 get contentLength() { 56310 return this._contentLength; 56311 } 56312 get isStreamingSupported() { 56313 return this._isStreamingSupported; 56314 } 56315 get isRangeSupported() { 56316 return this._isRangeSupported; 56317 } 56318 async read() { 56319 const { 56320 value, 56321 done 56322 } = await this._reader.read(); 56323 if (done) { 56324 return { 56325 value: undefined, 56326 done: true 56327 }; 56328 } 56329 return { 56330 value: value.buffer, 56331 done: false 56332 }; 56333 } 56334 cancel(reason) { 56335 this._reader.cancel(reason); 56336 } 56337} 56338class PDFWorkerStreamRangeReader { 56339 constructor(begin, end, msgHandler) { 56340 this._msgHandler = msgHandler; 56341 this.onProgress = null; 56342 const readableStream = this._msgHandler.sendWithStream("GetRangeReader", { 56343 begin, 56344 end 56345 }); 56346 this._reader = readableStream.getReader(); 56347 } 56348 get isStreamingSupported() { 56349 return false; 56350 } 56351 async read() { 56352 const { 56353 value, 56354 done 56355 } = await this._reader.read(); 56356 if (done) { 56357 return { 56358 value: undefined, 56359 done: true 56360 }; 56361 } 56362 return { 56363 value: value.buffer, 56364 done: false 56365 }; 56366 } 56367 cancel(reason) { 56368 this._reader.cancel(reason); 56369 } 56370} 56371 56372;// ./src/core/worker.js 56373 56374 56375 56376 56377 56378 56379 56380 56381 56382 56383class WorkerTask { 56384 constructor(name) { 56385 this.name = name; 56386 this.terminated = false; 56387 this._capability = Promise.withResolvers(); 56388 } 56389 get finished() { 56390 return this._capability.promise; 56391 } 56392 finish() { 56393 this._capability.resolve(); 56394 } 56395 terminate() { 56396 this.terminated = true; 56397 } 56398 ensureNotTerminated() { 56399 if (this.terminated) { 56400 throw new Error("Worker task was terminated"); 56401 } 56402 } 56403} 56404class WorkerMessageHandler { 56405 static { 56406 if (typeof window === "undefined" && !isNodeJS && typeof self !== "undefined" && typeof self.postMessage === "function" && "onmessage" in self) { 56407 this.initializeFromPort(self); 56408 } 56409 } 56410 static setup(handler, port) { 56411 let testMessageProcessed = false; 56412 handler.on("test", data => { 56413 if (testMessageProcessed) { 56414 return; 56415 } 56416 testMessageProcessed = true; 56417 handler.send("test", data instanceof Uint8Array); 56418 }); 56419 handler.on("configure", data => { 56420 setVerbosityLevel(data.verbosity); 56421 }); 56422 handler.on("GetDocRequest", data => this.createDocumentHandler(data, port)); 56423 } 56424 static createDocumentHandler(docParams, port) { 56425 let pdfManager; 56426 let terminated = false; 56427 let cancelXHRs = null; 56428 const WorkerTasks = new Set(); 56429 const verbosity = getVerbosityLevel(); 56430 const { 56431 docId, 56432 apiVersion 56433 } = docParams; 56434 const workerVersion = "4.10.38"; 56435 if (apiVersion !== workerVersion) { 56436 throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`); 56437 } 56438 const enumerableProperties = []; 56439 for (const property in []) { 56440 enumerableProperties.push(property); 56441 } 56442 if (enumerableProperties.length) { 56443 throw new Error("The `Array.prototype` contains unexpected enumerable properties: " + enumerableProperties.join(", ") + "; thus breaking e.g. `for...in` iteration of `Array`s."); 56444 } 56445 const workerHandlerName = docId + "_worker"; 56446 let handler = new MessageHandler(workerHandlerName, docId, port); 56447 function ensureNotTerminated() { 56448 if (terminated) { 56449 throw new Error("Worker was terminated"); 56450 } 56451 } 56452 function startWorkerTask(task) { 56453 WorkerTasks.add(task); 56454 } 56455 function finishWorkerTask(task) { 56456 task.finish(); 56457 WorkerTasks.delete(task); 56458 } 56459 async function loadDocument(recoveryMode) { 56460 await pdfManager.ensureDoc("checkHeader"); 56461 await pdfManager.ensureDoc("parseStartXRef"); 56462 await pdfManager.ensureDoc("parse", [recoveryMode]); 56463 await pdfManager.ensureDoc("checkFirstPage", [recoveryMode]); 56464 await pdfManager.ensureDoc("checkLastPage", [recoveryMode]); 56465 const isPureXfa = await pdfManager.ensureDoc("isPureXfa"); 56466 if (isPureXfa) { 56467 const task = new WorkerTask("loadXfaFonts"); 56468 startWorkerTask(task); 56469 await Promise.all([pdfManager.loadXfaFonts(handler, task).catch(reason => {}).then(() => finishWorkerTask(task)), pdfManager.loadXfaImages()]); 56470 } 56471 const [numPages, fingerprints] = await Promise.all([pdfManager.ensureDoc("numPages"), pdfManager.ensureDoc("fingerprints")]); 56472 const htmlForXfa = isPureXfa ? await pdfManager.ensureDoc("htmlForXfa") : null; 56473 return { 56474 numPages, 56475 fingerprints, 56476 htmlForXfa 56477 }; 56478 } 56479 async function getPdfManager({ 56480 data, 56481 password, 56482 disableAutoFetch, 56483 rangeChunkSize, 56484 length, 56485 docBaseUrl, 56486 enableXfa, 56487 evaluatorOptions 56488 }) { 56489 const pdfManagerArgs = { 56490 source: null, 56491 disableAutoFetch, 56492 docBaseUrl, 56493 docId, 56494 enableXfa, 56495 evaluatorOptions, 56496 handler, 56497 length, 56498 password, 56499 rangeChunkSize 56500 }; 56501 if (data) { 56502 pdfManagerArgs.source = data; 56503 return new LocalPdfManager(pdfManagerArgs); 56504 } 56505 const pdfStream = new PDFWorkerStream(handler), 56506 fullRequest = pdfStream.getFullReader(); 56507 const pdfManagerCapability = Promise.withResolvers(); 56508 let newPdfManager, 56509 cachedChunks = [], 56510 loaded = 0; 56511 fullRequest.headersReady.then(function () { 56512 if (!fullRequest.isRangeSupported) { 56513 return; 56514 } 56515 pdfManagerArgs.source = pdfStream; 56516 pdfManagerArgs.length = fullRequest.contentLength; 56517 pdfManagerArgs.disableAutoFetch ||= fullRequest.isStreamingSupported; 56518 newPdfManager = new NetworkPdfManager(pdfManagerArgs); 56519 for (const chunk of cachedChunks) { 56520 newPdfManager.sendProgressiveData(chunk); 56521 } 56522 cachedChunks = []; 56523 pdfManagerCapability.resolve(newPdfManager); 56524 cancelXHRs = null; 56525 }).catch(function (reason) { 56526 pdfManagerCapability.reject(reason); 56527 cancelXHRs = null; 56528 }); 56529 new Promise(function (resolve, reject) { 56530 const readChunk = function ({ 56531 value, 56532 done 56533 }) { 56534 try { 56535 ensureNotTerminated(); 56536 if (done) { 56537 if (!newPdfManager) { 56538 const pdfFile = arrayBuffersToBytes(cachedChunks); 56539 cachedChunks = []; 56540 if (length && pdfFile.length !== length) { 56541 warn("reported HTTP length is different from actual"); 56542 } 56543 pdfManagerArgs.source = pdfFile; 56544 newPdfManager = new LocalPdfManager(pdfManagerArgs); 56545 pdfManagerCapability.resolve(newPdfManager); 56546 } 56547 cancelXHRs = null; 56548 return; 56549 } 56550 loaded += value.byteLength; 56551 if (!fullRequest.isStreamingSupported) { 56552 handler.send("DocProgress", { 56553 loaded, 56554 total: Math.max(loaded, fullRequest.contentLength || 0) 56555 }); 56556 } 56557 if (newPdfManager) { 56558 newPdfManager.sendProgressiveData(value); 56559 } else { 56560 cachedChunks.push(value); 56561 } 56562 fullRequest.read().then(readChunk, reject); 56563 } catch (e) { 56564 reject(e); 56565 } 56566 }; 56567 fullRequest.read().then(readChunk, reject); 56568 }).catch(function (e) { 56569 pdfManagerCapability.reject(e); 56570 cancelXHRs = null; 56571 }); 56572 cancelXHRs = reason => { 56573 pdfStream.cancelAllRequests(reason); 56574 }; 56575 return pdfManagerCapability.promise; 56576 } 56577 function setupDoc(data) { 56578 function onSuccess(doc) { 56579 ensureNotTerminated(); 56580 handler.send("GetDoc", { 56581 pdfInfo: doc 56582 }); 56583 } 56584 function onFailure(ex) { 56585 ensureNotTerminated(); 56586 if (ex instanceof PasswordException) { 56587 const task = new WorkerTask(`PasswordException: response ${ex.code}`); 56588 startWorkerTask(task); 56589 handler.sendWithPromise("PasswordRequest", ex).then(function ({ 56590 password 56591 }) { 56592 finishWorkerTask(task); 56593 pdfManager.updatePassword(password); 56594 pdfManagerReady(); 56595 }).catch(function () { 56596 finishWorkerTask(task); 56597 handler.send("DocException", ex); 56598 }); 56599 } else { 56600 handler.send("DocException", wrapReason(ex)); 56601 } 56602 } 56603 function pdfManagerReady() { 56604 ensureNotTerminated(); 56605 loadDocument(false).then(onSuccess, function (reason) { 56606 ensureNotTerminated(); 56607 if (!(reason instanceof XRefParseException)) { 56608 onFailure(reason); 56609 return; 56610 } 56611 pdfManager.requestLoadedStream().then(function () { 56612 ensureNotTerminated(); 56613 loadDocument(true).then(onSuccess, onFailure); 56614 }); 56615 }); 56616 } 56617 ensureNotTerminated(); 56618 getPdfManager(data).then(function (newPdfManager) { 56619 if (terminated) { 56620 newPdfManager.terminate(new AbortException("Worker was terminated.")); 56621 throw new Error("Worker was terminated"); 56622 } 56623 pdfManager = newPdfManager; 56624 pdfManager.requestLoadedStream(true).then(stream => { 56625 handler.send("DataLoaded", { 56626 length: stream.bytes.byteLength 56627 }); 56628 }); 56629 }).then(pdfManagerReady, onFailure); 56630 } 56631 handler.on("GetPage", function (data) { 56632 return pdfManager.getPage(data.pageIndex).then(function (page) { 56633 return Promise.all([pdfManager.ensure(page, "rotate"), pdfManager.ensure(page, "ref"), pdfManager.ensure(page, "userUnit"), pdfManager.ensure(page, "view")]).then(function ([rotate, ref, userUnit, view]) { 56634 return { 56635 rotate, 56636 ref, 56637 refStr: ref?.toString() ?? null, 56638 userUnit, 56639 view 56640 }; 56641 }); 56642 }); 56643 }); 56644 handler.on("GetPageIndex", function (data) { 56645 const pageRef = Ref.get(data.num, data.gen); 56646 return pdfManager.ensureCatalog("getPageIndex", [pageRef]); 56647 }); 56648 handler.on("GetDestinations", function (data) { 56649 return pdfManager.ensureCatalog("destinations"); 56650 }); 56651 handler.on("GetDestination", function (data) { 56652 return pdfManager.ensureCatalog("getDestination", [data.id]); 56653 }); 56654 handler.on("GetPageLabels", function (data) { 56655 return pdfManager.ensureCatalog("pageLabels"); 56656 }); 56657 handler.on("GetPageLayout", function (data) { 56658 return pdfManager.ensureCatalog("pageLayout"); 56659 }); 56660 handler.on("GetPageMode", function (data) { 56661 return pdfManager.ensureCatalog("pageMode"); 56662 }); 56663 handler.on("GetViewerPreferences", function (data) { 56664 return pdfManager.ensureCatalog("viewerPreferences"); 56665 }); 56666 handler.on("GetOpenAction", function (data) { 56667 return pdfManager.ensureCatalog("openAction"); 56668 }); 56669 handler.on("GetAttachments", function (data) { 56670 return pdfManager.ensureCatalog("attachments"); 56671 }); 56672 handler.on("GetDocJSActions", function (data) { 56673 return pdfManager.ensureCatalog("jsActions"); 56674 }); 56675 handler.on("GetPageJSActions", function ({ 56676 pageIndex 56677 }) { 56678 return pdfManager.getPage(pageIndex).then(function (page) { 56679 return pdfManager.ensure(page, "jsActions"); 56680 }); 56681 }); 56682 handler.on("GetOutline", function (data) { 56683 return pdfManager.ensureCatalog("documentOutline"); 56684 }); 56685 handler.on("GetOptionalContentConfig", function (data) { 56686 return pdfManager.ensureCatalog("optionalContentConfig"); 56687 }); 56688 handler.on("GetPermissions", function (data) { 56689 return pdfManager.ensureCatalog("permissions"); 56690 }); 56691 handler.on("GetMetadata", function (data) { 56692 return Promise.all([pdfManager.ensureDoc("documentInfo"), pdfManager.ensureCatalog("metadata")]); 56693 }); 56694 handler.on("GetMarkInfo", function (data) { 56695 return pdfManager.ensureCatalog("markInfo"); 56696 }); 56697 handler.on("GetData", function (data) { 56698 return pdfManager.requestLoadedStream().then(function (stream) { 56699 return stream.bytes; 56700 }); 56701 }); 56702 handler.on("GetAnnotations", function ({ 56703 pageIndex, 56704 intent 56705 }) { 56706 return pdfManager.getPage(pageIndex).then(function (page) { 56707 const task = new WorkerTask(`GetAnnotations: page ${pageIndex}`); 56708 startWorkerTask(task); 56709 return page.getAnnotationsData(handler, task, intent).then(data => { 56710 finishWorkerTask(task); 56711 return data; 56712 }, reason => { 56713 finishWorkerTask(task); 56714 throw reason; 56715 }); 56716 }); 56717 }); 56718 handler.on("GetFieldObjects", function (data) { 56719 return pdfManager.ensureDoc("fieldObjects").then(fieldObjects => fieldObjects?.allFields || null); 56720 }); 56721 handler.on("HasJSActions", function (data) { 56722 return pdfManager.ensureDoc("hasJSActions"); 56723 }); 56724 handler.on("GetCalculationOrderIds", function (data) { 56725 return pdfManager.ensureDoc("calculationOrderIds"); 56726 }); 56727 handler.on("SaveDocument", async function ({ 56728 isPureXfa, 56729 numPages, 56730 annotationStorage, 56731 filename 56732 }) { 56733 const globalPromises = [pdfManager.requestLoadedStream(), pdfManager.ensureCatalog("acroForm"), pdfManager.ensureCatalog("acroFormRef"), pdfManager.ensureDoc("startXRef"), pdfManager.ensureDoc("xref"), pdfManager.ensureDoc("linearization"), pdfManager.ensureCatalog("structTreeRoot")]; 56734 const changes = new RefSetCache(); 56735 const promises = []; 56736 const newAnnotationsByPage = !isPureXfa ? getNewAnnotationsMap(annotationStorage) : null; 56737 const [stream, acroForm, acroFormRef, startXRef, xref, linearization, _structTreeRoot] = await Promise.all(globalPromises); 56738 const catalogRef = xref.trailer.getRaw("Root") || null; 56739 let structTreeRoot; 56740 if (newAnnotationsByPage) { 56741 if (!_structTreeRoot) { 56742 if (await StructTreeRoot.canCreateStructureTree({ 56743 catalogRef, 56744 pdfManager, 56745 newAnnotationsByPage 56746 })) { 56747 structTreeRoot = null; 56748 } 56749 } else if (await _structTreeRoot.canUpdateStructTree({ 56750 pdfManager, 56751 xref, 56752 newAnnotationsByPage 56753 })) { 56754 structTreeRoot = _structTreeRoot; 56755 } 56756 const imagePromises = AnnotationFactory.generateImages(annotationStorage.values(), xref, pdfManager.evaluatorOptions.isOffscreenCanvasSupported); 56757 const newAnnotationPromises = structTreeRoot === undefined ? promises : []; 56758 for (const [pageIndex, annotations] of newAnnotationsByPage) { 56759 newAnnotationPromises.push(pdfManager.getPage(pageIndex).then(page => { 56760 const task = new WorkerTask(`Save (editor): page ${pageIndex}`); 56761 startWorkerTask(task); 56762 return page.saveNewAnnotations(handler, task, annotations, imagePromises, changes).finally(function () { 56763 finishWorkerTask(task); 56764 }); 56765 })); 56766 } 56767 if (structTreeRoot === null) { 56768 promises.push(Promise.all(newAnnotationPromises).then(async () => { 56769 await StructTreeRoot.createStructureTree({ 56770 newAnnotationsByPage, 56771 xref, 56772 catalogRef, 56773 pdfManager, 56774 changes 56775 }); 56776 })); 56777 } else if (structTreeRoot) { 56778 promises.push(Promise.all(newAnnotationPromises).then(async () => { 56779 await structTreeRoot.updateStructureTree({ 56780 newAnnotationsByPage, 56781 pdfManager, 56782 changes 56783 }); 56784 })); 56785 } 56786 } 56787 if (isPureXfa) { 56788 promises.push(pdfManager.serializeXfaData(annotationStorage)); 56789 } else { 56790 for (let pageIndex = 0; pageIndex < numPages; pageIndex++) { 56791 promises.push(pdfManager.getPage(pageIndex).then(function (page) { 56792 const task = new WorkerTask(`Save: page ${pageIndex}`); 56793 startWorkerTask(task); 56794 return page.save(handler, task, annotationStorage, changes).finally(function () { 56795 finishWorkerTask(task); 56796 }); 56797 })); 56798 } 56799 } 56800 const refs = await Promise.all(promises); 56801 let xfaData = null; 56802 if (isPureXfa) { 56803 xfaData = refs[0]; 56804 if (!xfaData) { 56805 return stream.bytes; 56806 } 56807 } else if (changes.size === 0) { 56808 return stream.bytes; 56809 } 56810 const needAppearances = acroFormRef && acroForm instanceof Dict && changes.values().some(ref => ref.needAppearances); 56811 const xfa = acroForm instanceof Dict && acroForm.get("XFA") || null; 56812 let xfaDatasetsRef = null; 56813 let hasXfaDatasetsEntry = false; 56814 if (Array.isArray(xfa)) { 56815 for (let i = 0, ii = xfa.length; i < ii; i += 2) { 56816 if (xfa[i] === "datasets") { 56817 xfaDatasetsRef = xfa[i + 1]; 56818 hasXfaDatasetsEntry = true; 56819 } 56820 } 56821 if (xfaDatasetsRef === null) { 56822 xfaDatasetsRef = xref.getNewTemporaryRef(); 56823 } 56824 } else if (xfa) { 56825 warn("Unsupported XFA type."); 56826 } 56827 let newXrefInfo = Object.create(null); 56828 if (xref.trailer) { 56829 const infoObj = Object.create(null); 56830 const xrefInfo = xref.trailer.get("Info") || null; 56831 if (xrefInfo instanceof Dict) { 56832 for (const [key, value] of xrefInfo) { 56833 if (typeof value === "string") { 56834 infoObj[key] = stringToPDFString(value); 56835 } 56836 } 56837 } 56838 newXrefInfo = { 56839 rootRef: catalogRef, 56840 encryptRef: xref.trailer.getRaw("Encrypt") || null, 56841 newRef: xref.getNewTemporaryRef(), 56842 infoRef: xref.trailer.getRaw("Info") || null, 56843 info: infoObj, 56844 fileIds: xref.trailer.get("ID") || null, 56845 startXRef: linearization ? startXRef : xref.lastXRefStreamPos ?? startXRef, 56846 filename 56847 }; 56848 } 56849 return incrementalUpdate({ 56850 originalData: stream.bytes, 56851 xrefInfo: newXrefInfo, 56852 changes, 56853 xref, 56854 hasXfa: !!xfa, 56855 xfaDatasetsRef, 56856 hasXfaDatasetsEntry, 56857 needAppearances, 56858 acroFormRef, 56859 acroForm, 56860 xfaData, 56861 useXrefStream: isDict(xref.topDict, "XRef") 56862 }).finally(() => { 56863 xref.resetNewTemporaryRef(); 56864 }); 56865 }); 56866 handler.on("GetOperatorList", function (data, sink) { 56867 const pageIndex = data.pageIndex; 56868 pdfManager.getPage(pageIndex).then(function (page) { 56869 const task = new WorkerTask(`GetOperatorList: page ${pageIndex}`); 56870 startWorkerTask(task); 56871 const start = verbosity >= VerbosityLevel.INFOS ? Date.now() : 0; 56872 page.getOperatorList({ 56873 handler, 56874 sink, 56875 task, 56876 intent: data.intent, 56877 cacheKey: data.cacheKey, 56878 annotationStorage: data.annotationStorage, 56879 modifiedIds: data.modifiedIds 56880 }).then(function (operatorListInfo) { 56881 finishWorkerTask(task); 56882 if (start) { 56883 info(`page=${pageIndex + 1} - getOperatorList: time=` + `${Date.now() - start}ms, len=${operatorListInfo.length}`); 56884 } 56885 sink.close(); 56886 }, function (reason) { 56887 finishWorkerTask(task); 56888 if (task.terminated) { 56889 return; 56890 } 56891 sink.error(reason); 56892 }); 56893 }); 56894 }); 56895 handler.on("GetTextContent", function (data, sink) { 56896 const { 56897 pageIndex, 56898 includeMarkedContent, 56899 disableNormalization 56900 } = data; 56901 pdfManager.getPage(pageIndex).then(function (page) { 56902 const task = new WorkerTask("GetTextContent: page " + pageIndex); 56903 startWorkerTask(task); 56904 const start = verbosity >= VerbosityLevel.INFOS ? Date.now() : 0; 56905 page.extractTextContent({ 56906 handler, 56907 task, 56908 sink, 56909 includeMarkedContent, 56910 disableNormalization 56911 }).then(function () { 56912 finishWorkerTask(task); 56913 if (start) { 56914 info(`page=${pageIndex + 1} - getTextContent: time=` + `${Date.now() - start}
56914ms`); 56915 } 56916 sink.close(); 56917 }, function (reason) { 56918 finishWorkerTask(task); 56919 if (task.terminated) { 56920 return; 56921 } 56922 sink.error(reason); 56923 }); 56924 }); 56925 }); 56926 handler.on("GetStructTree", function (data) { 56927 return pdfManager.getPage(data.pageIndex).then(function (page) { 56928 return pdfManager.ensure(page, "getStructTree"); 56929 }); 56930 }); 56931 handler.on("FontFallback", function (data) { 56932 return pdfManager.fontFallback(data.id, handler); 56933 }); 56934 handler.on("Cleanup", function (data) { 56935 return pdfManager.cleanup(true); 56936 }); 56937 handler.on("Terminate", function (data) { 56938 terminated = true; 56939 const waitOn = []; 56940 if (pdfManager) { 56941 pdfManager.terminate(new AbortException("Worker was terminated.")); 56942 const cleanupPromise = pdfManager.cleanup(); 56943 waitOn.push(cleanupPromise); 56944 pdfManager = null; 56945 } else { 56946 clearGlobalCaches(); 56947 } 56948 cancelXHRs?.(new AbortException("Worker was terminated.")); 56949 for (const task of WorkerTasks) { 56950 waitOn.push(task.finished); 56951 task.terminate(); 56952 } 56953 return Promise.all(waitOn).then(function () { 56954 handler.destroy(); 56955 handler = null; 56956 }); 56957 }); 56958 handler.on("Ready", function (data) { 56959 setupDoc(docParams); 56960 docParams = null; 56961 }); 56962 return workerHandlerName; 56963 } 56964 static initializeFromPort(port) { 56965 const handler = new MessageHandler("worker", "main", port); 56966 this.setup(handler, port); 56967 handler.send("ready", null); 56968 } 56969} 56970 56971;// ./src/pdf.worker.js 56972 56973const pdfjsVersion = "4.10.38"; 56974const pdfjsBuild = "f9bea397f"; 56975 56976var __webpack_exports__WorkerMessageHandler = __webpack_exports__.WorkerMessageHandler; 56977export { __webpack_exports__WorkerMessageHandler as WorkerMessageHandler }; 56978 56979//# sourceMappingURL=pdf.worker.mjs.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.