@sme.up/ketchup 11.0.0-SNAPSHOT-20260114090748 → 11.0.0-SNAPSHOT-20260120152125

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/dist/cjs/{f-cell-a903bc2f.js → f-cell-214d1e20.js} +4 -4
  2. package/dist/cjs/{f-chip-5593bdd7.js → f-chip-3f9b076c.js} +1 -1
  3. package/dist/cjs/{f-object-field-a208a86e.js → f-object-field-af4a33b1.js} +2 -2
  4. package/dist/cjs/{f-paginator-utils-1dd80ec2.js → f-paginator-utils-c9ca0217.js} +1 -1
  5. package/dist/cjs/{f-text-field-83dd8cef.js → f-text-field-d0153948.js} +1 -1
  6. package/dist/cjs/index-c7d441d8.js +0 -4
  7. package/dist/cjs/index.cjs.js +2 -2
  8. package/dist/cjs/ketchup.cjs.js +1 -1
  9. package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
  10. package/dist/cjs/kup-activity-timeline.cjs.entry.js +3 -3
  11. package/dist/cjs/kup-autocomplete_30.cjs.entry.js +46 -46
  12. package/dist/cjs/kup-box.cjs.entry.js +8 -8
  13. package/dist/cjs/kup-calendar.cjs.entry.js +3 -3
  14. package/dist/cjs/kup-card-list.cjs.entry.js +2 -2
  15. package/dist/cjs/kup-cell.cjs.entry.js +6 -6
  16. package/dist/cjs/kup-custom-task-list-header_4.cjs.entry.js +8 -8
  17. package/dist/cjs/kup-dashboard.cjs.entry.js +3 -3
  18. package/dist/cjs/{kup-data-table-helper-63838dd1.js → kup-data-table-helper-fd915a34.js} +2 -2
  19. package/dist/cjs/{kup-dates-8191989e.js → kup-dates-b7e6eaa1.js} +83 -21
  20. package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
  21. package/dist/cjs/kup-echart.cjs.entry.js +2 -2
  22. package/dist/cjs/kup-editor.cjs.entry.js +2 -2
  23. package/dist/cjs/kup-family-tree.cjs.entry.js +2 -2
  24. package/dist/cjs/kup-gantt_10.cjs.entry.js +25 -25
  25. package/dist/cjs/kup-grid.cjs.entry.js +2 -2
  26. package/dist/cjs/kup-htm.cjs.entry.js +2 -2
  27. package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
  28. package/dist/cjs/kup-input-panel.cjs.entry.js +6 -6
  29. package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
  30. package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
  31. package/dist/cjs/{kup-manager-3dcd66b1.js → kup-manager-2e996943.js} +1 -1
  32. package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
  33. package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
  34. package/dist/cjs/kup-object-field.cjs.entry.js +4 -4
  35. package/dist/cjs/{kup-planner-renderer-helper-298e1b80.js → kup-planner-renderer-helper-1580e8bf.js} +1 -1
  36. package/dist/cjs/kup-planner-renderer.cjs.entry.js +4 -4
  37. package/dist/cjs/kup-planner.cjs.entry.js +4 -4
  38. package/dist/cjs/kup-probe.cjs.entry.js +3 -3
  39. package/dist/cjs/kup-qlik.cjs.entry.js +3 -3
  40. package/dist/cjs/kup-snackbar.cjs.entry.js +3 -3
  41. package/dist/cjs/kup-txt.cjs.entry.js +3 -3
  42. package/dist/cjs/kup-typography-list.cjs.entry.js +3 -3
  43. package/dist/cjs/kup-typography.cjs.entry.js +4 -4
  44. package/dist/cjs/loader.cjs.js +1 -1
  45. package/dist/collection/assets/index.js +0 -4
  46. package/dist/collection/collection-manifest.json +0 -1
  47. package/dist/collection/components/kup-planner/kup-planner.js +1 -1
  48. package/dist/collection/components/kup-planner/utils/custom-task-list-header.js +2 -2
  49. package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.js +2 -2
  50. package/dist/collection/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.js +2 -2
  51. package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.js +3 -3
  52. package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.js +5 -5
  53. package/dist/collection/components/kup-planner/utils/kup-planner-renderer.js +2 -2
  54. package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.js +1 -1
  55. package/dist/collection/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.js +2 -2
  56. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-header.js +7 -7
  57. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-table.js +1 -1
  58. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list.js +1 -1
  59. package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-standard-tooltip.js +1 -1
  60. package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-tooltip.js +1 -1
  61. package/dist/collection/components/kup-planner/utils/kup-vertical-scroll/kup-vertical-scroll.js +2 -2
  62. package/dist/collection/components/kup-probe/kup-probe.js +1 -1
  63. package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +1 -1
  64. package/dist/collection/components/kup-qlik/kup-qlik.js +1 -1
  65. package/dist/collection/components/kup-rating/kup-rating.js +1 -1
  66. package/dist/collection/components/kup-snackbar/kup-snackbar.js +1 -1
  67. package/dist/collection/components/kup-spinner/kup-spinner.js +34 -34
  68. package/dist/collection/components/kup-switch/kup-switch.js +1 -1
  69. package/dist/collection/components/kup-time-picker/kup-time-picker.js +1 -1
  70. package/dist/collection/components/kup-txt/kup-txt.js +1 -1
  71. package/dist/collection/components/kup-typography/kup-typography.js +2 -2
  72. package/dist/collection/components/kup-typography-list/kup-typography-list.js +1 -1
  73. package/dist/collection/managers/kup-dates/kup-dates.js +83 -0
  74. package/dist/components/index.js +1 -1
  75. package/dist/components/kup-accordion.js +2 -2
  76. package/dist/components/kup-activity-timeline.js +2 -2
  77. package/dist/components/kup-autocomplete.js +1 -1
  78. package/dist/components/kup-badge.js +1 -1
  79. package/dist/components/kup-box.js +1 -1
  80. package/dist/components/kup-button-list.js +1 -1
  81. package/dist/components/kup-button.js +1 -1
  82. package/dist/components/kup-calendar.js +3 -3
  83. package/dist/components/kup-card-list.js +3 -3
  84. package/dist/components/kup-card.js +1 -1
  85. package/dist/components/kup-cell.js +2 -2
  86. package/dist/components/kup-chart.js +1 -1
  87. package/dist/components/kup-checkbox.js +1 -1
  88. package/dist/components/kup-chip.js +1 -1
  89. package/dist/components/kup-color-picker.js +1 -1
  90. package/dist/components/kup-combobox.js +1 -1
  91. package/dist/components/kup-custom-task-list-header.js +1 -1
  92. package/dist/components/kup-custom-task-list-table.js +1 -1
  93. package/dist/components/kup-dashboard.js +2 -2
  94. package/dist/components/kup-data-table.js +1 -1
  95. package/dist/components/kup-date-picker.js +1 -1
  96. package/dist/components/kup-dialog.js +1 -1
  97. package/dist/components/kup-drawer.js +2 -2
  98. package/dist/components/kup-dropdown-button.js +1 -1
  99. package/dist/components/kup-echart.js +1 -1
  100. package/dist/components/kup-editor.js +1 -1
  101. package/dist/components/kup-family-tree.js +3 -3
  102. package/dist/components/kup-file-upload.js +1 -1
  103. package/dist/components/kup-form.js +1 -1
  104. package/dist/components/kup-gantt-calendar.js +1 -1
  105. package/dist/components/kup-gantt.js +1 -1
  106. package/dist/components/kup-gauge.js +1 -1
  107. package/dist/components/kup-grid-renderer.js +1 -1
  108. package/dist/components/kup-grid.js +1 -1
  109. package/dist/components/kup-horizontal-scroll.js +1 -1
  110. package/dist/components/kup-htm.js +2 -2
  111. package/dist/components/kup-iframe.js +2 -2
  112. package/dist/components/kup-image-list.js +1 -1
  113. package/dist/components/kup-image.js +1 -1
  114. package/dist/components/kup-input-panel.js +3 -3
  115. package/dist/components/kup-lazy.js +2 -2
  116. package/dist/components/kup-list.js +1 -1
  117. package/dist/components/kup-magic-box.js +4 -4
  118. package/dist/components/kup-nav-bar.js +2 -2
  119. package/dist/components/kup-numeric-picker.js +2 -2
  120. package/dist/components/kup-object-field.js +2 -2
  121. package/dist/components/kup-planner-renderer.js +1 -1
  122. package/dist/components/kup-planner.js +18 -18
  123. package/dist/components/kup-probe.js +3 -3
  124. package/dist/components/kup-progress-bar.js +1 -1
  125. package/dist/components/kup-qlik.js +3 -3
  126. package/dist/components/kup-radio.js +1 -1
  127. package/dist/components/kup-rating.js +1 -1
  128. package/dist/components/kup-snackbar.js +3 -3
  129. package/dist/components/kup-spinner.js +1 -1
  130. package/dist/components/kup-standard-tooltip.js +1 -1
  131. package/dist/components/kup-switch.js +1 -1
  132. package/dist/components/kup-switcher.js +1 -1
  133. package/dist/components/kup-tab-bar.js +1 -1
  134. package/dist/components/kup-task-gantt.js +1 -1
  135. package/dist/components/kup-task-list-header.js +1 -1
  136. package/dist/components/kup-task-list-table.js +1 -1
  137. package/dist/components/kup-task-list.js +1 -1
  138. package/dist/components/kup-text-field.js +1 -1
  139. package/dist/components/kup-time-picker.js +1 -1
  140. package/dist/components/kup-toolbar.js +1 -1
  141. package/dist/components/kup-tooltip.js +1 -1
  142. package/dist/components/kup-tree.js +1 -1
  143. package/dist/components/kup-txt.js +3 -3
  144. package/dist/components/kup-typography-list.js +3 -3
  145. package/dist/components/kup-typography.js +4 -4
  146. package/dist/components/kup-vertical-scroll.js +1 -1
  147. package/dist/components/{p-b5ccc0d2.js → p-00c209ca.js} +4 -4
  148. package/dist/components/p-0462f723.js +7 -0
  149. package/dist/components/{p-e8d83de0.js → p-0a3ba7ca.js} +1 -1
  150. package/dist/components/{p-2b1f8c53.js → p-0b5ab929.js} +2 -2
  151. package/dist/components/{p-77d5a7b9.js → p-16addde1.js} +5 -5
  152. package/dist/components/{p-f57a4a4e.js → p-1ed5cf57.js} +1 -1
  153. package/dist/components/{p-74fd0cb8.js → p-306095cc.js} +4 -4
  154. package/dist/components/{p-b33ec213.js → p-30b8d109.js} +1 -1
  155. package/dist/components/{p-bd0dfa65.js → p-31698814.js} +17 -17
  156. package/dist/components/{p-1119d80c.js → p-3f042d51.js} +14 -14
  157. package/dist/components/{p-4d238cc9.js → p-42c21356.js} +84 -1
  158. package/dist/components/{p-f852dbfa.js → p-7a2345f3.js} +2 -2
  159. package/dist/components/{p-de5d3537.js → p-8b4721ce.js} +2 -2
  160. package/dist/components/{p-b6f1319e.js → p-9bd8fda8.js} +2 -2
  161. package/dist/components/{p-56a721d8.js → p-b4f36e67.js} +40 -40
  162. package/dist/components/{p-9c09f25d.js → p-b9112167.js} +3 -3
  163. package/dist/components/{p-7afff356.js → p-bf714882.js} +2 -2
  164. package/dist/components/{p-56da9a2f.js → p-d350b7f8.js} +1 -1
  165. package/dist/components/{p-bf75edc9.js → p-d67a8402.js} +1 -1
  166. package/dist/components/{p-98036b1e.js → p-de0a9c9a.js} +7 -7
  167. package/dist/components/{p-537a6b71.js → p-ebaa82a6.js} +4 -4
  168. package/dist/components/{p-a0689c36.js → p-fd319759.js} +2 -2
  169. package/dist/components/{p-d12a3553.js → p-ff511626.js} +2 -2
  170. package/dist/esm/{f-cell-f47c5ab4.js → f-cell-4d944700.js} +4 -4
  171. package/dist/esm/{f-chip-c2d256a9.js → f-chip-3b324fa4.js} +1 -1
  172. package/dist/esm/{f-object-field-f3c12136.js → f-object-field-f86aa591.js} +2 -2
  173. package/dist/esm/{f-paginator-utils-f1bb71b3.js → f-paginator-utils-2a9c5390.js} +1 -1
  174. package/dist/esm/{f-text-field-7d154a87.js → f-text-field-588cfd75.js} +1 -1
  175. package/dist/esm/index-9b0f4a0d.js +0 -4
  176. package/dist/esm/index.js +2 -2
  177. package/dist/esm/ketchup.js +1 -1
  178. package/dist/esm/kup-accordion.entry.js +2 -2
  179. package/dist/esm/kup-activity-timeline.entry.js +3 -3
  180. package/dist/esm/kup-autocomplete_30.entry.js +46 -46
  181. package/dist/esm/kup-box.entry.js +8 -8
  182. package/dist/esm/kup-calendar.entry.js +3 -3
  183. package/dist/esm/kup-card-list.entry.js +2 -2
  184. package/dist/esm/kup-cell.entry.js +6 -6
  185. package/dist/esm/kup-custom-task-list-header_4.entry.js +8 -8
  186. package/dist/esm/kup-dashboard.entry.js +3 -3
  187. package/dist/esm/{kup-data-table-helper-f3423019.js → kup-data-table-helper-b74121bf.js} +2 -2
  188. package/dist/esm/{kup-dates-485a12d2.js → kup-dates-6293c758.js} +84 -20
  189. package/dist/esm/kup-drawer.entry.js +2 -2
  190. package/dist/esm/kup-echart.entry.js +2 -2
  191. package/dist/esm/kup-editor.entry.js +2 -2
  192. package/dist/esm/kup-family-tree.entry.js +2 -2
  193. package/dist/esm/kup-gantt_10.entry.js +25 -25
  194. package/dist/esm/kup-grid.entry.js +2 -2
  195. package/dist/esm/kup-htm.entry.js +2 -2
  196. package/dist/esm/kup-iframe.entry.js +2 -2
  197. package/dist/esm/kup-input-panel.entry.js +6 -6
  198. package/dist/esm/kup-lazy.entry.js +2 -2
  199. package/dist/esm/kup-magic-box.entry.js +2 -2
  200. package/dist/esm/{kup-manager-d826cc2e.js → kup-manager-e1178fd5.js} +1 -1
  201. package/dist/esm/kup-nav-bar.entry.js +2 -2
  202. package/dist/esm/kup-numeric-picker.entry.js +3 -3
  203. package/dist/esm/kup-object-field.entry.js +4 -4
  204. package/dist/esm/{kup-planner-renderer-helper-75b90431.js → kup-planner-renderer-helper-9be26115.js} +1 -1
  205. package/dist/esm/kup-planner-renderer.entry.js +4 -4
  206. package/dist/esm/kup-planner.entry.js +4 -4
  207. package/dist/esm/kup-probe.entry.js +3 -3
  208. package/dist/esm/kup-qlik.entry.js +3 -3
  209. package/dist/esm/kup-snackbar.entry.js +3 -3
  210. package/dist/esm/kup-txt.entry.js +3 -3
  211. package/dist/esm/kup-typography-list.entry.js +3 -3
  212. package/dist/esm/kup-typography.entry.js +4 -4
  213. package/dist/esm/loader.js +1 -1
  214. package/dist/ketchup/index.esm.js +1 -1
  215. package/dist/ketchup/ketchup.esm.js +1 -1
  216. package/dist/ketchup/{p-f1caa4b7.entry.js → p-0289ba55.entry.js} +1 -1
  217. package/dist/ketchup/{p-084c2a71.entry.js → p-08deee81.entry.js} +1 -1
  218. package/dist/ketchup/{p-93985707.entry.js → p-111aa495.entry.js} +1 -1
  219. package/dist/ketchup/p-1a736d54.js +1 -0
  220. package/dist/ketchup/{p-3bd9fdd3.entry.js → p-1ca4fdb7.entry.js} +1 -1
  221. package/dist/ketchup/{p-5767cc14.entry.js → p-1e1246db.entry.js} +1 -1
  222. package/dist/ketchup/{p-f36ca98a.entry.js → p-279093b3.entry.js} +1 -1
  223. package/dist/ketchup/{p-adbea6ea.entry.js → p-298ea30a.entry.js} +1 -1
  224. package/dist/ketchup/{p-7d5acada.entry.js → p-2b5ff06f.entry.js} +1 -1
  225. package/dist/ketchup/{p-0a1f987d.js → p-377bb2c8.js} +1 -1
  226. package/dist/ketchup/{p-59c4caef.entry.js → p-39ebc353.entry.js} +1 -1
  227. package/dist/ketchup/{p-fe093639.entry.js → p-45eeb4df.entry.js} +1 -1
  228. package/dist/ketchup/{p-5a1c9b2e.entry.js → p-47e4085d.entry.js} +1 -1
  229. package/dist/ketchup/{p-51f49c1a.js → p-6296f511.js} +1 -1
  230. package/dist/ketchup/p-6b1c3be6.js +1 -0
  231. package/dist/ketchup/{p-2225fb63.entry.js → p-6f1dc69c.entry.js} +1 -1
  232. package/dist/ketchup/{p-8bd02d63.entry.js → p-6fb98207.entry.js} +1 -1
  233. package/dist/ketchup/{p-d3f29338.entry.js → p-717a52e1.entry.js} +1 -1
  234. package/dist/ketchup/{p-871bc079.entry.js → p-73759501.entry.js} +1 -1
  235. package/dist/ketchup/{p-fd7985e9.entry.js → p-7b6425d7.entry.js} +1 -1
  236. package/dist/ketchup/{p-71cb2203.entry.js → p-823334ae.entry.js} +1 -1
  237. package/dist/ketchup/p-85472a9d.entry.js +16 -0
  238. package/dist/ketchup/{p-4959041b.entry.js → p-8e9667ee.entry.js} +1 -1
  239. package/dist/ketchup/{p-733440d8.entry.js → p-96748ac0.entry.js} +1 -1
  240. package/dist/ketchup/{p-598a35eb.entry.js → p-98863ce0.entry.js} +1 -1
  241. package/dist/ketchup/{p-f1db1ad1.entry.js → p-9ccefbcd.entry.js} +1 -1
  242. package/dist/ketchup/{p-1572b5e4.entry.js → p-9f0db6e1.entry.js} +1 -1
  243. package/dist/ketchup/p-a8f94382.js +1 -0
  244. package/dist/ketchup/{p-3ba655c1.entry.js → p-ad0d46d6.entry.js} +1 -1
  245. package/dist/ketchup/{p-18fe3257.entry.js → p-c24d29a6.entry.js} +1 -1
  246. package/dist/ketchup/{p-3d54b9e7.entry.js → p-c8d90782.entry.js} +1 -1
  247. package/dist/ketchup/{p-155cf5a8.entry.js → p-d127bb8d.entry.js} +1 -1
  248. package/dist/ketchup/{p-164a140f.entry.js → p-d518df12.entry.js} +1 -1
  249. package/dist/ketchup/{p-665598d2.entry.js → p-d6cc8f51.entry.js} +1 -1
  250. package/dist/ketchup/{p-16b66614.js → p-df6afd6e.js} +1 -1
  251. package/dist/ketchup/{p-a990c2a8.js → p-e06ea235.js} +1 -1
  252. package/dist/ketchup/{p-d733cb55.entry.js → p-f0496985.entry.js} +2 -2
  253. package/dist/ketchup/{p-2df5bf04.js → p-f9e0cea2.js} +1 -1
  254. package/dist/ketchup/{p-db2abe74.entry.js → p-fd60b6b6.entry.js} +1 -1
  255. package/dist/ketchup/p-fddd1cdb.js +1 -0
  256. package/dist/types/components.d.ts +0 -67
  257. package/package.json +1 -2
  258. package/dist/cjs/kup-pdf.cjs.entry.js +0 -76601
  259. package/dist/collection/assets/pdf.js +0 -15
  260. package/dist/collection/components/kup-pdf/kup-pdf-declarations.js +0 -8
  261. package/dist/collection/components/kup-pdf/kup-pdf.css +0 -169
  262. package/dist/collection/components/kup-pdf/kup-pdf.js +0 -283
  263. package/dist/components/kup-pdf.d.ts +0 -11
  264. package/dist/components/kup-pdf.js +0 -76773
  265. package/dist/components/p-5882e117.js +0 -26
  266. package/dist/esm/kup-pdf.entry.js +0 -76597
  267. package/dist/ketchup/p-264ee487.js +0 -1
  268. package/dist/ketchup/p-5d594ebd.js +0 -1
  269. package/dist/ketchup/p-6172f9ec.js +0 -1
  270. package/dist/ketchup/p-b2825af4.entry.js +0 -44
  271. package/dist/ketchup/p-b60952e5.entry.js +0 -16
  272. package/dist/ketchup/p-f6656fb8.js +0 -1
  273. package/dist/types/components/kup-pdf/kup-pdf-declarations.d.ts +0 -7
  274. package/dist/types/components/kup-pdf/kup-pdf.d.ts +0 -47
@@ -1,44 +0,0 @@
1
- import{r as registerInstance,c as createEvent,f as forceUpdate,h,H as Host,d as getElement}from"./p-710d0a7d.js";import{k as kupManagerInstance,g as getProps,s as setProps}from"./p-a990c2a8.js";import{c as componentWrapperId}from"./p-635bb4b3.js";import{e as getAugmentedNamespace,f as commonjsRequire,g as getDefaultExportFromCjs}from"./p-264ee487.js";var KupPdfProps;!function(t){t.pdfPath="This is the path to the PDF file."}(KupPdfProps||(KupPdfProps={}));var pdf={exports:{}};const _nodeResolve_empty={},_nodeResolve_empty$1=Object.freeze({__proto__:null,default:_nodeResolve_empty}),require$$0=getAugmentedNamespace(_nodeResolve_empty$1);
2
- /**
3
- * @licstart The following is the entire license notice for the
4
- * JavaScript code in this page
5
- *
6
- * Copyright 2023 Mozilla Foundation
7
- *
8
- * Licensed under the Apache License, Version 2.0 (the "License");
9
- * you may not use this file except in compliance with the License.
10
- * You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
19
- *
20
- * @licend The above is the entire license notice for the
21
- * JavaScript code in this page
22
- */
23
- (function(module,exports){var root,factory;root=globalThis,factory=()=>(()=>{var __webpack_modules__=[,(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.VerbosityLevel=e.Util=e.UnknownErrorException=e.UnexpectedResponseException=e.TextRenderingMode=e.RenderingIntentFlag=e.PromiseCapability=e.PermissionFlag=e.PasswordResponses=e.PasswordException=e.PageActionEventType=e.OPS=e.MissingPDFException=e.MAX_IMAGE_SIZE_TO_CACHE=e.LINE_FACTOR=e.LINE_DESCENT_FACTOR=e.InvalidPDFException=e.ImageKind=e.IDENTITY_MATRIX=e.FormatError=e.FeatureTest=e.FONT_IDENTITY_MATRIX=e.DocumentActionEventType=e.CMapCompressionType=e.BaseException=e.BASELINE_FACTOR=e.AnnotationType=e.AnnotationReplyType=e.AnnotationPrefix=e.AnnotationMode=e.AnnotationFlag=e.AnnotationFieldFlag=e.AnnotationEditorType=e.AnnotationEditorPrefix=e.AnnotationEditorParamsType=e.AnnotationBorderStyleType=e.AnnotationActionEventType=e.AbortException=void 0,e.assert=function(t,e){t||o(e)},e.bytesToString=h,e.createValidAbsoluteUrl=function(t,e=null,s=null){if(!t)return null;try{if(s&&"string"==typeof t){if(s.addDefaultProtocol&&t.startsWith("www.")){const e=t.match(/\./g);e?.length>=2&&(t=`http://${t}`)}if(s.tryConvertEncoding)try{t=d(t)}catch{}}const i=e?new URL(t,e):new URL(t);if(function(t){switch(t?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(i))return i}catch{}return null},e.getModificationDate=function(t=new Date){return[t.getUTCFullYear().toString(),(t.getUTCMonth()+1).toString().padStart(2,"0"),t.getUTCDate().toString().padStart(2,"0"),t.getUTCHours().toString().padStart(2,"0"),t.getUTCMinutes().toString().padStart(2,"0"),t.getUTCSeconds().toString().padStart(2,"0")].join("")},e.getUuid=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto?.randomUUID)return crypto.randomUUID();const t=new Uint8Array(32);if("undefined"!=typeof crypto&&"function"==typeof crypto?.getRandomValues)crypto.getRandomValues(t);else for(let e=0;e<32;e++)t[e]=Math.floor(255*Math.random());return h(t)},e.getVerbosityLevel=function(){return n},e.info=function(t){n>=i.INFOS&&console.log(`Info: ${t}`)},e.isArrayBuffer=function(t){return"object"==typeof t&&void 0!==t?.byteLength},e.isArrayEqual=function(t,e){if(t.length!==e.length)return!1;for(let s=0,i=t.length;s<i;s++)if(t[s]!==e[s])return!1;return!0},e.isNodeJS=void 0,e.normalizeUnicode=function(t){return p||(p=/([\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,g=new Map([["ſt","ſt"]])),t.replaceAll(p,((t,e,s)=>e?e.normalize("NFKC"):g.get(s)))},e.objectFromMap=function(t){const e=Object.create(null);for(const[s,i]of t)e[s]=i;return e},e.objectSize=function(t){return Object.keys(t).length},e.setVerbosityLevel=function(t){Number.isInteger(t)&&(n=t)},e.shadow=a,e.string32=function(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)},e.stringToBytes=l,e.stringToPDFString=function(t){if(t[0]>="ï"){let e;if("þ"===t[0]&&"ÿ"===t[1]?e="utf-16be":"ÿ"===t[0]&&"þ"===t[1]?e="utf-16le":"ï"===t[0]&&"»"===t[1]&&"¿"===t[2]&&(e="utf-8"),e)try{const s=new TextDecoder(e,{fatal:!0}),i=l(t);return s.decode(i)}catch(t){r(`stringToPDFString: "${t}".`)}}const e=[];for(let s=0,i=t.length;s<i;s++){const i=f[t.charCodeAt(s)];e.push(i?String.fromCharCode(i):t.charAt(s))}return e.join("")},e.stringToUTF8String=d,e.unreachable=o,e.utf8StringToString=function(t){return unescape(encodeURIComponent(t))},e.warn=r;const s=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);e.isNodeJS=s,e.IDENTITY_MATRIX=[1,0,0,1,0,0],e.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],e.MAX_IMAGE_SIZE_TO_CACHE=1e7,e.LINE_FACTOR=1.35,e.LINE_DESCENT_FACTOR=.35,e.BASELINE_FACTOR=.35/1.35,e.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},e.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},e.AnnotationEditorPrefix="pdfjs_internal_editor_",e.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15},e.AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23},e.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},e.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},e.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},e.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},e.AnnotationReplyType={GROUP:"Group",REPLY:"R"},e.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},e.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},e.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},e.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},e.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},e.PageActionEventType={O:"PageOpen",C:"PageClose"};const i={ERRORS:0,WARNINGS:1,INFOS:5};e.VerbosityLevel=i,e.CMapCompressionType={NONE:0,BINARY:1},e.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},e.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let n=i.WARNINGS;function r(t){n>=i.WARNINGS&&console.log(`Warning: ${t}`)}function o(t){throw new Error(t)}function a(t,e,s,i=!1){return Object.defineProperty(t,e,{value:s,enumerable:!i,configurable:!0,writable:!1}),s}const c=function(){function t(e,s){this.constructor===t&&o("Cannot initialize BaseException."),this.message=e,this.name=s}return t.prototype=new Error,t.constructor=t,t}();function h(t){"object"==typeof t&&void 0!==t?.length||o("Invalid argument for bytesToString");const e=t.length,s=8192;if(e<s)return String.fromCharCode.apply(null,t);const i=[];for(let n=0;n<e;n+=s){const r=Math.min(n+s,e),o=t.subarray(n,r);i.push(String.fromCharCode.apply(null,o))}return i.join("")}function l(t){"string"!=typeof t&&o("Invalid argument for stringToBytes");const e=t.length,s=new Uint8Array(e);for(let i=0;i<e;++i)s[i]=255&t.charCodeAt(i);return s}e.BaseException=c,e.PasswordException=class extends c{constructor(t,e){super(t,"PasswordException"),this.code=e}},e.UnknownErrorException=class extends c{constructor(t,e){super(t,"UnknownErrorException"),this.details=e}},e.InvalidPDFException=class extends c{constructor(t){super(t,"InvalidPDFException")}},e.MissingPDFException=class extends c{constructor(t){super(t,"MissingPDFException")}},e.UnexpectedResponseException=class extends c{constructor(t,e){super(t,"UnexpectedResponseException"),this.status=e}},e.FormatError=class extends c{constructor(t){super(t,"FormatError")}},e.AbortException=class extends c{constructor(t){super(t,"AbortException")}},e.FeatureTest=class{static get isLittleEndian(){return a(this,"isLittleEndian",function(){const t=new Uint8Array(4);return t[0]=1,1===new Uint32Array(t.buffer,0,1)[0]}())}static get isEvalSupported(){return a(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return a(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get platform(){return"undefined"==typeof navigator?a(this,"platform",{isWin:!1,isMac:!1}):a(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}static get isCSSRoundSupported(){return a(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}};const u=[...Array(256).keys()].map((t=>t.toString(16).padStart(2,"0")));e.Util=class{static makeHexColor(t,e,s){return`#${u[t]}${u[e]}${u[s]}`}static scaleMinMax(t,e){let s;t[0]?(t[0]<0&&(s=e[0],e[0]=e[1],e[1]=s),e[0]*=t[0],e[1]*=t[0],t[3]<0&&(s=e[2],e[2]=e[3],e[3]=s),e[2]*=t[3],e[3]*=t[3]):(s=e[0],e[0]=e[2],e[2]=s,s=e[1],e[1]=e[3],e[3]=s,t[1]<0&&(s=e[2],e[2]=e[3],e[3]=s),e[2]*=t[1],e[3]*=t[1],t[2]<0&&(s=e[0],e[0]=e[1],e[1]=s),e[0]*=t[2],e[1]*=t[2]),e[0]+=t[4],e[1]+=t[4],e[2]+=t[5],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static applyTransform(t,e){return[t[0]*e[0]+t[1]*e[2]+e[4],t[0]*e[1]+t[1]*e[3]+e[5]]}static applyInverseTransform(t,e){const s=e[0]*e[3]-e[1]*e[2];return[(t[0]*e[3]-t[1]*e[2]+e[2]*e[5]-e[4]*e[3])/s,(-t[0]*e[1]+t[1]*e[0]+e[4]*e[1]-e[5]*e[0])/s]}static getAxialAlignedBoundingBox(t,e){const s=this.applyTransform(t,e),i=this.applyTransform(t.slice(2,4),e),n=this.applyTransform([t[0],t[3]],e),r=this.applyTransform([t[2],t[1]],e);return[Math.min(s[0],i[0],n[0],r[0]),Math.min(s[1],i[1],n[1],r[1]),Math.max(s[0],i[0],n[0],r[0]),Math.max(s[1],i[1],n[1],r[1])]}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t){const e=[t[0],t[2],t[1],t[3]],s=t[0]*e[0]+t[1]*e[2],i=t[2]*e[1]+t[3]*e[3],n=(s+i)/2,r=Math.sqrt((s+i)**2-4*(s*i-(t[2]*e[0]+t[3]*e[2])*(t[0]*e[1]+t[1]*e[3])))/2,o=n-r||1;return[Math.sqrt(n+r||1),Math.sqrt(o)]}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){const s=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),i=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(s>i)return null;const n=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),r=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return n>r?null:[s,n,i,r]}static bezierBoundingBox(t,e,s,i,n,r,o,a){const c=[],h=[[],[]];let l,u,f,d,p,g,m,w;for(let h=0;h<2;++h)if(0===h?(u=6*t-12*s+6*n,l=-3*t+9*s-9*n+3*o,f=3*s-3*t):(u=6*e-12*i+6*r,l=-3*e+9*i-9*r+3*a,f=3*i-3*e),Math.abs(l)<1e-12){if(Math.abs(u)<1e-12)continue;d=-f/u,0<d&&d<1&&c.push(d)}else m=u*u-4*f*l,w=Math.sqrt(m),m<0||(p=(-u+w)/(2*l),0<p&&p<1&&c.push(p),g=(-u-w)/(2*l),0<g&&g<1&&c.push(g));let b,y=c.length;const A=y;for(;y--;)d=c[y],b=1-d,h[0][y]=b*b*b*t+3*b*b*d*s+3*b*d*d*n+d*d*d*o,h[1][y]=b*b*b*e+3*b*b*d*i+3*b*d*d*r+d*d*d*a;return h[0][A]=t,h[1][A]=e,h[0][A+1]=o,h[1][A+1]=a,h[0].length=h[1].length=A+2,[Math.min(...h[0]),Math.min(...h[1]),Math.max(...h[0]),Math.max(...h[1])]}};const f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,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,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function d(t){return decodeURIComponent(escape(t))}e.PromiseCapability=class{#t=!1;constructor(){this.promise=new Promise(((t,e)=>{this.resolve=e=>{this.#t=!0,t(e)},this.reject=t=>{this.#t=!0,e(t)}}))}get settled(){return this.#t}};let p=null,g=null;e.AnnotationPrefix="pdfjs_internal_id_"},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultFilterFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,Object.defineProperty(exports,"SVGGraphics",{enumerable:!0,get:function(){return _displaySvg.SVGGraphics}}),exports.build=void 0,exports.getDocument=getDocument,exports.version=void 0;var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(3),_display_utils=__w_pdfjs_require__(6),_font_loader=__w_pdfjs_require__(9),_displayNode_utils=__w_pdfjs_require__(10),_canvas=__w_pdfjs_require__(11),_worker_options=__w_pdfjs_require__(14),_message_handler=__w_pdfjs_require__(15),_metadata=__w_pdfjs_require__(16),_optional_content_config=__w_pdfjs_require__(17),_transport_stream=__w_pdfjs_require__(18),_displayFetch_stream=__w_pdfjs_require__(19),_displayNetwork=__w_pdfjs_require__(22),_displayNode_stream=__w_pdfjs_require__(23),_displaySvg=__w_pdfjs_require__(24),_xfa_text=__w_pdfjs_require__(25);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=_util.isNodeJS?_displayNode_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;const DefaultCMapReaderFactory=_util.isNodeJS?_displayNode_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;const DefaultFilterFactory=_util.isNodeJS?_displayNode_utils.NodeFilterFactory:_display_utils.DOMFilterFactory;exports.DefaultFilterFactory=DefaultFilterFactory;const DefaultStandardFontDataFactory=_util.isNodeJS?_displayNode_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory;function getDocument(t){if("string"==typeof t||t instanceof URL?t={url:t}:(0,_util.isArrayBuffer)(t)&&(t={data:t}),"object"!=typeof t)throw new Error("Invalid parameter in getDocument, need parameter object.");if(!t.url&&!t.data&&!t.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const e=new PDFDocumentLoadingTask,{docId:s}=e,i=t.url?getUrlProp(t.url):null,n=t.data?getDataProp(t.data):null,r=t.httpHeaders||null,o=!0===t.withCredentials,a=t.password??null,c=t.range instanceof PDFDataRangeTransport?t.range:null,h=Number.isInteger(t.rangeChunkSize)&&t.rangeChunkSize>0?t.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let l=t.worker instanceof PDFWorker?t.worker:null;const u=t.verbosity,f="string"!=typeof t.docBaseUrl||(0,_display_utils.isDataScheme)(t.docBaseUrl)?null:t.docBaseUrl,d="string"==typeof t.cMapUrl?t.cMapUrl:null,p=!1!==t.cMapPacked,g=t.CMapReaderFactory||DefaultCMapReaderFactory,m="string"==typeof t.standardFontDataUrl?t.standardFontDataUrl:null,w=t.StandardFontDataFactory||DefaultStandardFontDataFactory,b=!0!==t.stopAtErrors,y=Number.isInteger(t.maxImageSize)&&t.maxImageSize>-1?t.maxImageSize:-1,A=!1!==t.isEvalSupported,v="boolean"==typeof t.isOffscreenCanvasSupported?t.isOffscreenCanvasSupported:!_util.isNodeJS,x=Number.isInteger(t.canvasMaxAreaInBytes)?t.canvasMaxAreaInBytes:-1,k="boolean"==typeof t.disableFontFace?t.disableFontFace:_util.isNodeJS,S=!0===t.fontExtraProperties,M=!0===t.enableXfa,C=t.ownerDocument||globalThis.document,_=!0===t.disableRange,I=!0===t.disableStream,F=!0===t.disableAutoFetch,O=!0===t.pdfBug,E=c?c.length:t.length??NaN,T="boolean"==typeof t.useSystemFonts?t.useSystemFonts:!_util.isNodeJS&&!k,D="boolean"==typeof t.useWorkerFetch?t.useWorkerFetch:g===_display_utils.DOMCMapReaderFactory&&w===_display_utils.DOMStandardFontDataFactory&&d&&m&&(0,_display_utils.isValidFetchUrl)(d,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(m,document.baseURI),P=t.canvasFactory||new DefaultCanvasFactory({ownerDocument:C}),R=t.filterFactory||new DefaultFilterFactory({docId:s,ownerDocument:C});(0,_util.setVerbosityLevel)(u);const N={canvasFactory:P,filterFactory:R};if(D||(N.cMapReaderFactory=new g({baseUrl:d,isCompressed:p}),N.standardFontDataFactory=new w({baseUrl:m})),!l){const t={verbosity:u,port:_worker_options.GlobalWorkerOptions.workerPort};l=t.port?PDFWorker.fromPort(t):new PDFWorker(t),e._worker=l}const L={docId:s,apiVersion:"3.11.174",data:n,password:a,disableAutoFetch:F,rangeChunkSize:h,length:E,docBaseUrl:f,enableXfa:M,evaluatorOptions:{maxImageSize:y,disableFontFace:k,ignoreErrors:b,isEvalSupported:A,isOffscreenCanvasSupported:v,canvasMaxAreaInBytes:x,fontExtraProperties:S,useSystemFonts:T,cMapUrl:D?d:null,standardFontDataUrl:D?m:null}},B={ignoreErrors:b,isEvalSupported:A,disableFontFace:k,fontExtraProperties:S,enableXfa:M,ownerDocument:C,disableAutoFetch:F,pdfBug:O,styleElement:null};return l.promise.then((function(){if(e.destroyed)throw new Error("Loading aborted");const t=_fetchDocument(l,L),a=new Promise((function(t){let e;var s;c?e=new _transport_stream.PDFDataTransportStream({length:E,initialData:c.initialData,progressiveDone:c.progressiveDone,contentDispositionFilename:c.contentDispositionFilename,disableRange:_,disableStream:I},c):n||(s={url:i,length:E,httpHeaders:r,withCredentials:o,rangeChunkSize:h,disableRange:_,disableStream:I},e=_util.isNodeJS?new _displayNode_stream.PDFNodeStream(s):(0,_display_utils.isValidFetchUrl)(s.url)?new _displayFetch_stream.PDFFetchStream(s):new _displayNetwork.PDFNetworkStream(s)),t(e)}));return Promise.all([t,a]).then((function([t,i]){if(e.destroyed)throw new Error("Loading aborted");const n=new _message_handler.MessageHandler(s,t,l.port),r=new WorkerTransport(n,e,i,B,N);e._transport=r,n.send("Ready",null)}))})).catch(e._capability.reject),e}async function _fetchDocument(t,e){if(t.destroyed)throw new Error("Worker was destroyed");const s=await t.messageHandler.sendWithPromise("GetDocRequest",e,e.data?[e.data.buffer]:null);if(t.destroyed)throw new Error("Worker was destroyed");return s}function getUrlProp(t){if(t instanceof URL)return t.href;try{return new URL(t,window.location).href}catch{if(_util.isNodeJS&&"string"==typeof t)return t}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(t){if(_util.isNodeJS&&"undefined"!=typeof Buffer&&t instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength)return t;if("string"==typeof t)return(0,_util.stringToBytes)(t);if("object"==typeof t&&!isNaN(t?.length)||(0,_util.isArrayBuffer)(t))return new Uint8Array(t);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;class PDFDocumentLoadingTask{static#e=0;constructor(){this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId="d"+PDFDocumentLoadingTask.#e++,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await(this._transport?.destroy())}catch(t){throw this._worker?.port&&delete this._worker._pendingDestroy,t}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}}exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(t,e,s=!1,i=null){this.length=t,this.initialData=e,this.progressiveDone=s,this.contentDispositionFilename=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(t){this._rangeListeners.push(t)}addProgressListener(t){this._progressListeners.push(t)}addProgressiveReadListener(t){this._progressiveReadListeners.push(t)}addProgressiveDoneListener(t){this._progressiveDoneListeners.push(t)}onDataRange(t,e){for(const s of this._rangeListeners)s(t,e)}onDataProgress(t,e){this._readyCapability.promise.then((()=>{for(const s of this._progressListeners)s(t,e)}))}onDataProgressiveRead(t){this._readyCapability.promise.then((()=>{for(const e of this._progressiveReadListeners)e(t)}))}onDataProgressiveDone(){this._readyCapability.promise.then((()=>{for(const t of this._progressiveDoneListeners)t()}))}transportReady(){this._readyCapability.resolve()}requestDataRange(t,e){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(t,e){this._pdfInfo=t,this._transport=e,Object.defineProperty(this,"getJavaScript",{value:()=>((0,_display_utils.deprecated)("`PDFDocumentProxy.getJavaScript`, please use `PDFDocumentProxy.getJSActions` instead."),this.getJSActions().then((t=>{if(!t)return t;const e=[];for(const s in t)e.push(...t[s]);return e})))})}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(t=!1){return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{#s=null;#i=!1;constructor(t,e,s,i=!1){this._pageIndex=t,this._pageInfo=e,this._transport=s,this._stats=i?new _display_utils.StatTimer:null,this._pdfBug=i,this.commonObjs=s.commonObjs,this.objs=new PDFObjects,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:t,rotation:e=this.rotate,offsetX:s=0,offsetY:i=0,dontFlip:n=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:e,offsetX:s,offsetY:i,dontFlip:n})}getAnnotations({intent:t="display"}={}){const e=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,e.renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:t,viewport:e,intent:s="display",annotationMode:i=_util.AnnotationMode.ENABLE,transform:n=null,background:r=null,optionalContentConfigPromise:o=null,annotationCanvasMap:a=null,pageColors:c=null,printAnnotationStorage:h=null}){this._stats?.time("Overall");const l=this._transport.getRenderingIntent(s,i,h);this.#i=!1,this.#n(),o||(o=this._transport.getOptionalContentConfig());let u=this._intentStates.get(l.cacheKey);u||(u=Object.create(null),this._intentStates.set(l.cacheKey,u)),u.streamReaderCancelTimeout&&(clearTimeout(u.streamReaderCancelTimeout),u.streamReaderCancelTimeout=null);const f=!!(l.renderingIntent&_util.RenderingIntentFlag.PRINT);u.displayReadyCapability||(u.displayReadyCapability=new _util.PromiseCapability,u.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(l));const d=t=>{u.renderTasks.delete(p),(this._maybeCleanupAfterRender||f)&&(this.#i=!0),this.#r(!f),t?(p.capability.reject(t),this._abortOperatorList({intentState:u,reason:t instanceof Error?t:new Error(t)})):p.capability.resolve(),this._stats?.timeEnd("Rendering"),this._stats?.timeEnd("Overall")},p=new InternalRenderTask({callback:d,params:{canvasContext:t,viewport:e,transform:n,background:r},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:a,operatorList:u.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!f,pdfBug:this._pdfBug,pageColors:c});(u.renderTasks||=new Set).add(p);const g=p.task;return Promise.all([u.displayReadyCapability.promise,o]).then((([t,e])=>{this.destroyed?d():(this._stats?.time("Rendering"),p.initializeGraphics({transparency:t,optionalContentConfig:e}),p.operatorListChanged())})).catch(d),g}getOperatorList({intent:t="display",annotationMode:e=_util.AnnotationMode.ENABLE,printAnnotationStorage:s=null}={}){const i=this._transport.getRenderingIntent(t,e,s,!0);let n,r=this._intentStates.get(i.cacheKey);return r||(r=Object.create(null),this._intentStates.set(i.cacheKey,r)),r.opListReadCapability||(n=Object.create(null),n.operatorListChanged=function(){r.operatorList.lastChunk&&(r.opListReadCapability.resolve(r.operatorList),r.renderTasks.delete(n))},r.opListReadCapability=new _util.PromiseCapability,(r.renderTasks||=new Set).add(n),r.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(i)),r.opListReadCapability.promise}streamTextContent({includeMarkedContent:t=!1,disableNormalization:e=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===t,disableNormalization:!0===e},{highWaterMark:100,size:t=>t.items.length})}getTextContent(t={}){if(this._transport._htmlForXfa)return this.getXfa().then((t=>_xfa_text.XfaText.textContent(t)));const e=this.streamTextContent(t);return new Promise((function(t,s){const i=e.getReader(),n={items:[],styles:Object.create(null)};!function e(){i.read().then((function({value:s,done:i}){i?t(n):(Object.assign(n.styles,s.styles),n.items.push(...s.items),e())}),s)}()}))}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const e of this._intentStates.values())if(this._abortOperatorList({intentState:e,reason:new Error("Page was destroyed."),force:!0}),!e.opListReadCapability)for(const s of e.renderTasks)t.push(s.completed),s.cancel();return this.objs.clear(),this.#i=!1,this.#n(),Promise.all(t)}cleanup(t=!1){this.#i=!0;const e=this.#r(!1);return t&&e&&(this._stats&&=new _display_utils.StatTimer),e}#r(t=!1){if(this.#n(),!this.#i||this.destroyed)return!1;if(t)return this.#s=setTimeout((()=>{this.#s=null,this.#r(!1)}),DELAYED_CLEANUP_TIMEOUT),!1;for(const{renderTasks:t,operatorList:e}of this._intentStates.values())if(t.size>0||!e.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#i=!1,!0}#n(){this.#s&&(clearTimeout(this.#s),this.#s=null)}_startRenderPage(t,e){const s=this._intentStates.get(e);s&&(this._stats?.timeEnd("Page Request"),s.displayReadyCapability?.resolve(t))}_renderPageChunk(t,e){for(let s=0,i=t.length;s<i;s++)e.operatorList.fnArray.push(t.fnArray[s]),e.operatorList.argsArray.push(t.argsArray[s]);e.operatorList.lastChunk=t.lastChunk,e.operatorList.separateAnnots=t.separateAnnots;for(const t of e.renderTasks)t.operatorListChanged();t.lastChunk&&this.#r(!0)}_pumpOperatorList({renderingIntent:t,cacheKey:e,annotationStorageSerializable:s}){const{map:i,transfers:n}=s,r=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:t,cacheKey:e,annotationStorage:i},n).getReader(),o=this._intentStates.get(e);o.streamReader=r;const a=()=>{r.read().then((({value:t,done:e})=>{e?o.streamReader=null:this._transport.destroyed||(this._renderPageChunk(t,o),a())}),(t=>{if(o.streamReader=null,!this._transport.destroyed){if(o.operatorList){o.operatorList.lastChunk=!0;for(const t of o.renderTasks)t.operatorListChanged();this.#r(!0)}if(o.displayReadyCapability)o.displayReadyCapability.reject(t);else{if(!o.opListReadCapability)throw t;o.opListReadCapability.reject(t)}}}))};a()}_abortOperatorList({intentState:t,reason:e,force:s=!1}){if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!s){if(t.renderTasks.size>0)return;if(e instanceof _display_utils.RenderingCancelledException){let s=RENDERING_CANCELLED_TIMEOUT;return e.extraDelay>0&&e.extraDelay<1e3&&(s+=e.extraDelay),void(t.streamReaderCancelTimeout=setTimeout((()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:e,force:!0})}),s))}}if(t.streamReader.cancel(new _util.AbortException(e.message)).catch((()=>{})),t.streamReader=null,!this._transport.destroyed){for(const[e,s]of this._intentStates)if(s===t){this._intentStates.delete(e);break}this.cleanup()}}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{#o=new Set;#a=Promise.resolve();postMessage(t,e){const s={data:structuredClone(t,e?{transfer:e}:null)};this.#a.then((()=>{for(const t of this.#o)t.call(this,s)}))}addEventListener(t,e){this.#o.add(e)}removeEventListener(t,e){this.#o.delete(e)}terminate(){this.#o.clear()}}exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(exports.PDFWorkerUtil=PDFWorkerUtil,_util.isNodeJS&&"function"==typeof commonjsRequire)PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if("object"==typeof document){const t=document?.currentScript?.src;t&&(PDFWorkerUtil.fallbackWorkerSrc=t.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(t,e){let s;try{if(s=new URL(t),!s.origin||"null"===s.origin)return!1}catch{return!1}const i=new URL(e,s);return s.origin===i.origin},PDFWorkerUtil.createCDNWrapper=function(t){return URL.createObjectURL(new Blob([`importScripts("${t}");`]))};class PDFWorker{static#c;constructor({name:t=null,port:e=null,verbosity:s=(0,_util.getVerbosityLevel)()}={}){if(this.name=t,this.destroyed=!1,this.verbosity=s,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,e){if(PDFWorker.#c?.has(e))throw new Error("Cannot use more than one PDFWorker per port.");return(PDFWorker.#c||=new WeakMap).set(e,this),void this._initializeFromPort(e)}this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(t){this._port=t,this._messageHandler=new _message_handler.MessageHandler("main","worker",t),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:t}=PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,t)||(t=PDFWorkerUtil.createCDNWrapper(new URL(t,window.location).href));const e=new Worker(t),s=new _message_handler.MessageHandler("main","worker",e),i=()=>{e.removeEventListener("error",n),s.destroy(),e.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},n=()=>{this._webWorker||i()};e.addEventListener("error",n),s.on("test",(t=>{e.removeEventListener("error",n),this.destroyed?i():t?(this._messageHandler=s,this._port=e,this._webWorker=e,this._readyCapability.resolve(),s.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),s.destroy(),e.terminate())})),s.on("ready",(()=>{if(e.removeEventListener("error",n),this.destroyed)i();else try{r()}catch{this._setupFakeWorker()}}));const r=()=>{const t=new Uint8Array;s.send("test",t,[t.buffer])};return void r()}catch{(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),PDFWorker._setupFakeWorkerGlobal.then((t=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const e=new LoopbackPort;this._port=e;const s="fake"+PDFWorkerUtil.fakeWorkerId++,i=new _message_handler.MessageHandler(s+"_worker",s,e);t.setup(i,e);const n=new _message_handler.MessageHandler(s,s+"_worker",e);this._messageHandler=n,this._readyCapability.resolve(),n.send("configure",{verbosity:this.verbosity})})).catch((t=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${t.message}".`))}))}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),PDFWorker.#c?.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(t){if(!t?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");const e=this.#c?.get(t.port);if(e){if(e._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return e}return new PDFWorker(t)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _util.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_util.isNodeJS&&"function"==typeof commonjsRequire){const worker=eval("require")(this.workerSrc);return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(this.workerSrc),window.pdfjsWorker.WorkerMessageHandler};return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}exports.PDFWorker=PDFWorker;class WorkerTransport{#h=new Map;#l=new Map;#u=new Map;#f=null;constructor(t,e,s,i,n){this.messageHandler=t,this.loadingTask=e,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this._params=i,this.canvasFactory=n.canvasFactory,this.filterFactory=n.filterFactory,this.cMapReaderFactory=n.cMapReaderFactory,this.standardFontDataFactory=n.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=s,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=new _util.PromiseCapability,this.setupMessageHandler()}#d(t,e=null){const s=this.#h.get(t);if(s)return s;const i=this.messageHandler.sendWithPromise(t,e);return this.#h.set(t,i),i}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}getRenderingIntent(t,e=_util.AnnotationMode.ENABLE,s=null,i=!1){let n=_util.RenderingIntentFlag.DISPLAY,r=_annotation_storage.SerializableEmpty;switch(t){case"any":n=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":n=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${t}`)}switch(e){case _util.AnnotationMode.DISABLE:n+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:n+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:n+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,r=(n&_util.RenderingIntentFlag.PRINT&&s instanceof _annotation_storage.PrintAnnotationStorage?s:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${e}`)}return i&&(n+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:n,cacheKey:`${n}_${r.hash}`,annotationStorageSerializable:r}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,this.#f?.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const e of this.#l.values())t.push(e._destroy());this.#l.clear(),this.#u.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const e=this.messageHandler.sendWithPromise("Terminate",null);return t.push(e),Promise.all(t).then((()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#h.clear(),this.filterFactory.destroy(),this._networkStream?.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:e}=this;t.on("GetReader",((t,e)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=t=>{this._lastProgress={loaded:t.loaded,total:t.total}},e.onPull=()=>{this._fullReader.read().then((function({value:t,done:s}){s?e.close():((0,_util.assert)(t instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),e.enqueue(new Uint8Array(t),1,[t]))})).catch((t=>{e.error(t)}))},e.onCancel=t=>{this._fullReader.cancel(t),e.ready.catch((t=>{if(!this.destroyed)throw t}))}})),t.on("ReaderHeadersReady",(()=>{const t=new _util.PromiseCapability,s=this._fullReader;return s.headersReady.then((()=>{s.isStreamingSupported&&s.isRangeSupported||(this._lastProgress&&e.onProgress?.(this._lastProgress),s.onProgress=t=>{e.onProgress?.({loaded:t.loaded,total:t.total})}),t.resolve({isStreamingSupported:s.isStreamingSupported,isRangeSupported:s.isRangeSupported,contentLength:s.contentLength})}),t.reject),t.promise})),t.on("GetRangeReader",((t,e)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const s=this._networkStream.getRangeReader(t.begin,t.end);s?(e.onPull=()=>{s.read().then((function({value:t,done:s}){s?e.close():((0,_util.assert)(t instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),e.enqueue(new Uint8Array(t),1,[t]))})).catch((t=>{e.error(t)}))},e.onCancel=t=>{s.cancel(t),e.ready.catch((t=>{if(!this.destroyed)throw t}))}):e.close()})),t.on("GetDoc",(({pdfInfo:t})=>{this._numPages=t.numPages,this._htmlForXfa=t.htmlForXfa,delete t.htmlForXfa,e._capability.resolve(new PDFDocumentProxy(t,this))})),t.on("DocException",(function(t){let s;switch(t.name){case"PasswordException":s=new _util.PasswordException(t.message,t.code);break;case"InvalidPDFException":s=new _util.InvalidPDFException(t.message);break;case"MissingPDFException":s=new _util.MissingPDFException(t.message);break;case"UnexpectedResponseException":s=new _util.UnexpectedResponseException(t.message,t.status);break;case"UnknownErrorException":s=new _util.UnknownErrorException(t.message,t.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}e._capability.reject(s)})),t.on("PasswordRequest",(t=>{if(this.#f=new _util.PromiseCapability,e.onPassword){const s=t=>{t instanceof Error?this.#f.reject(t):this.#f.resolve({password:t})};try{e.onPassword(s,t.code)}catch(t){this.#f.reject(t)}}else this.#f.reject(new _util.PasswordException(t.message,t.code));return this.#f.promise})),t.on("DataLoaded",(t=>{e.onProgress?.({loaded:t.length,total:t.length}),this.downloadInfoCapability.resolve(t)})),t.on("StartRenderPage",(t=>{this.destroyed||this.#l.get(t.pageIndex)._startRenderPage(t.transparency,t.cacheKey)})),t.on("commonobj",(([e,s,i])=>{if(!this.destroyed&&!this.commonObjs.has(e))switch(s){case"Font":const n=this._params;if("error"in i){const t=i.error;(0,_util.warn)(`Error during font loading: ${t}`),this.commonObjs.resolve(e,t);break}const r=n.pdfBug&&globalThis.FontInspector?.enabled?(t,e)=>globalThis.FontInspector.fontAdded(t,e):null,o=new _font_loader.FontFaceObject(i,{isEvalSupported:n.isEvalSupported,disableFontFace:n.disableFontFace,ignoreErrors:n.ignoreErrors,inspectFont:r});this.fontLoader.bind(o).catch((()=>t.sendWithPromise("FontFallback",{id:e}))).finally((()=>{!n.fontExtraProperties&&o.data&&(o.data=null),this.commonObjs.resolve(e,o)}));break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(e,i);break;default:throw new Error(`Got unknown common object type ${s}`)}})),t.on("obj",(([t,e,s,i])=>{if(this.destroyed)return;const n=this.#l.get(e);if(!n.objs.has(t))switch(s){case"Image":if(n.objs.resolve(t,i),i){let t;if(i.bitmap){const{width:e,height:s}=i;t=e*s*4}else t=i.data?.length||0;t>_util.MAX_IMAGE_SIZE_TO_CACHE&&(n._maybeCleanupAfterRender=!0)}break;case"Pattern":n.objs.resolve(t,i);break;default:throw new Error(`Got unknown object type ${s}`)}})),t.on("DocProgress",(t=>{this.destroyed||e.onProgress?.({loaded:t.loaded,total:t.total})})),t.on("FetchBuiltInCMap",(t=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(t):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.")))),t.on("FetchStandardFontData",(t=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(t):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:t,transfers:e}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:this._fullReader?.filename??null},e).finally((()=>{this.annotationStorage.resetModified()}))}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));const e=t-1,s=this.#u.get(e);if(s)return s;const i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:e}).then((t=>{if(this.destroyed)throw new Error("Transport destroyed");const s=new PDFPageProxy(e,t,this,this._params.pdfBug);return this.#l.set(e,s),s}));return this.#u.set(e,i),i}getPageIndex(t){return"object"!=typeof t||null===t||!Number.isInteger(t.num)||t.num<0||!Number.isInteger(t.gen)||t.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen})}getAnnotations(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:e})}getFieldObjects(){return this.#d("GetFieldObjects")}hasJSActions(){return this.#d("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return"string"!=typeof t?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return this.#d("GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((t=>new _optional_content_config.OptionalContentConfig(t)))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata",e=this.#h.get(t);if(e)return e;const s=this.messageHandler.sendWithPromise(t,null).then((t=>({info:t[0],metadata:t[1]?new _metadata.Metadata(t[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null})));return this.#h.set(t,s),s}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(t=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const t of this.#l.values())if(!t.cleanup())throw new Error(`startCleanup: Page ${t.pageNumber} is currently rendering.`);this.commonObjs.clear(),t||this.fontLoader.clear(),this.#h.clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:t,enableXfa:e}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:t,enableXfa:e})}}class PDFObjects{#p=Object.create(null);#g(t){return this.#p[t]||={capability:new _util.PromiseCapability,data:null}}get(t,e=null){if(e){const s=this.#g(t);return s.capability.promise.then((()=>e(s.data))),null}const s=this.#p[t];if(!s?.capability.settled)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return s.data}has(t){const e=this.#p[t];return e?.capability.settled||!1}resolve(t,e=null){const s=this.#g(t);s.data=e,s.capability.resolve()}clear(){for(const t in this.#p){const{data:e}=this.#p[t];e?.bitmap?.close()}this.#p=Object.create(null)}}class RenderTask{#m=null;constructor(t){this.#m=t,this.onContinue=null}get promise(){return this.#m.capability.promise}cancel(t=0){this.#m.cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=this.#m.operatorList;if(!t)return!1;const{annotationCanvasMap:e}=this.#m;return t.form||t.canvas&&e?.size>0}}exports.RenderTask=RenderTask;class InternalRenderTask{static#w=new WeakSet;constructor({callback:t,params:e,objs:s,commonObjs:i,annotationCanvasMap:n,operatorList:r,pageIndex:o,canvasFactory:a,filterFactory:c,useRequestAnimationFrame:h=!1,pdfBug:l=!1,pageColors:u=null}){this.callback=t,this.params=e,this.objs=s,this.commonObjs=i,this.annotationCanvasMap=n,this.operatorListIdx=null,this.operatorList=r,this._pageIndex=o,this.canvasFactory=a,this.filterFactory=c,this._pdfBug=l,this.pageColors=u,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===h&&"undefined"!=typeof window,this.cancelled=!1,this.capability=new _util.PromiseCapability,this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=e.canvasContext.canvas}get completed(){return this.capability.promise.catch((function(){}))}initializeGraphics({transparency:t=!1,optionalContentConfig:e}){if(this.cancelled)return;if(this._canvas){if(InternalRenderTask.#w.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");InternalRenderTask.#w.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:s,viewport:i,transform:n,background:r}=this.params;this.gfx=new _canvas.CanvasGraphics(s,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:e},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:n,viewport:i,transparency:t,background:r}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(t=null,e=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),InternalRenderTask.#w.delete(this._canvas),this.callback(t||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,e))}operatorListChanged(){this.graphicsReady?(this.stepper?.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||=this._continueBound}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame((()=>{this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),InternalRenderTask.#w.delete(this._canvas),this.callback())))}}const version="3.11.174";exports.version=version;const build="ce8716743";exports.build=build},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SerializableEmpty=e.PrintAnnotationStorage=e.AnnotationStorage=void 0;var i=s(1),n=s(4),r=s(8);const o=Object.freeze({map:null,hash:"",transfers:void 0});e.SerializableEmpty=o;class a{#b=!1;#y=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(t,e){const s=this.#y.get(t);return void 0===s?e:Object.assign(e,s)}getRawValue(t){return this.#y.get(t)}remove(t){if(this.#y.delete(t),0===this.#y.size&&this.resetModified(),"function"==typeof this.onAnnotationEditor){for(const t of this.#y.values())if(t instanceof n.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(t,e){const s=this.#y.get(t);let i=!1;if(void 0!==s)for(const[t,n]of Object.entries(e))s[t]!==n&&(i=!0,s[t]=n);else i=!0,this.#y.set(t,e);i&&this.#A(),e instanceof n.AnnotationEditor&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(e.constructor._type)}has(t){return this.#y.has(t)}getAll(){return this.#y.size>0?(0,i.objectFromMap)(this.#y):null}setAll(t){for(const[e,s]of Object.entries(t))this.setValue(e,s)}get size(){return this.#y.size}#A(){this.#b||(this.#b=!0,"function"==typeof this.onSetModified&&this.onSetModified())}resetModified(){this.#b&&(this.#b=!1,"function"==typeof this.onResetModified&&this.onResetModified())}get print(){return new c(this)}get serializable(){if(0===this.#y.size)return o;const t=new Map,e=new r.MurmurHash3_64,s=[],i=Object.create(null);let a=!1;for(const[s,r]of this.#y){const o=r instanceof n.AnnotationEditor?r.serialize(!1,i):r;o&&(t.set(s,o),e.update(`${s}:${JSON.stringify(o)}`),a||=!!o.bitmap)}if(a)for(const e of t.values())e.bitmap&&s.push(e.bitmap);return t.size>0?{map:t,hash:e.hexdigest(),transfers:s}:o}}e.AnnotationStorage=a;class c extends a{#v;constructor(t){super();const{map:e,hash:s,transfers:i}=t.serializable,n=structuredClone(e,i?{transfer:i}:null);this.#v={map:n,hash:s,transfers:i}}get print(){(0,i.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#v}}e.PrintAnnotationStorage=c},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AnnotationEditor=void 0;var i=s(5),n=s(1),r=s(6);class o{#x="";#k=!1;#S=null;#M=null;#C=null;#_=!1;#I=null;#F=this.focusin.bind(this);#O=this.focusout.bind(this);#E=!1;#T=!1;#D=!1;_initialOptions=Object.create(null);_uiManager=null;_focusEventsAllowed=!0;_l10nPromise=null;#P=!1;#R=o._zIndex++;static _borderLineWidth=-1;static _colorManager=new i.ColorManager;static _zIndex=1;static SMALL_EDITOR_SIZE=0;constructor(t){this.constructor===o&&(0,n.unreachable)("Cannot initialize AnnotationEditor."),this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null;const{rotation:e,rawDims:{pageWidth:s,pageHeight:i,pageX:r,pageY:a}}=this.parent.viewport;this.rotation=e,this.pageRotation=(360+e-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[s,i],this.pageTranslation=[r,a];const[c,h]=this.parentDimensions;this.x=t.x/c,this.y=t.y/h,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return(0,n.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const e=new a({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});e.annotationElementId=t.annotationElementId,e.deleted=!0,e._uiManager.addToAnnotationStorage(e)}static initialize(t,e=null){if(o._l10nPromise||=new Map(["editor_alt_text_button_label","editor_alt_text_edit_button_label","editor_alt_text_decorative_tooltip"].map((e=>[e,t.get(e)]))),e?.strings)for(const s of e.strings)o._l10nPromise.set(s,t.get(s));if(-1!==o._borderLineWidth)return;const s=getComputedStyle(document.documentElement);o._borderLineWidth=parseFloat(s.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,e){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,e){(0,n.unreachable)("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#P}set _isDraggable(t){this.#P=t,this.div?.classList.toggle("draggable",t)}center(){const[t,e]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*e/(2*t),this.y+=this.width*t/(2*e);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*e/(2*t),this.y-=this.width*t/(2*e);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#R}setParent(t){null!==t&&(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions),this.parent=t}focusin(t){this._focusEventsAllowed&&(this.#E?this.#E=!1:this.parent.setSelected(this))}focusout(t){if(!this._focusEventsAllowed)return;if(!this.isAttachedToDOM)return;const e=t.relatedTarget;e?.closest(`#${this.id}`)||(t.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,e,s,i){const[n,r]=this.parentDimensions;[s,i]=this.screenToPageTranslation(s,i),this.x=(t+s)/n,this.y=(e+i)/r,this.fixAndSetPosition()}#N([t,e],s,i){[s,i]=this.screenToPageTranslation(s,i),this.x+=s/t,this.y+=i/e,this.fixAndSetPosition()}translate(t,e){this.#N(this.parentDimensions,t,e)}translateInPage(t,e){this.#N(this.pageDimensions,t,e),this.div.scrollIntoView({block:"nearest"})}drag(t,e){const[s,i]=this.parentDimensions;if(this.x+=t/s,this.y+=e/i,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:t,y:e}=this.div.getBoundingClientRect();this.parent.findNewParent(this,t,e)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:n,y:r}=this;const[o,a]=this.#L();n+=o,r+=a,this.div.style.left=`${(100*n).toFixed(2)}%`,this.div.style.top=`${(100*r).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}#L(){const[t,e]=this.parentDimensions,{_borderLineWidth:s}=o,i=s/t,n=s/e;switch(this.rotation){case 90:return[-i,n];case 180:return[i,n];case 270:return[i,-n];default:return[-i,-n]}}fixAndSetPosition(){const[t,e]=this.pageDimensions;let{x:s,y:i,width:n,height:r}=this;switch(n*=t,r*=e,s*=t,i*=e,this.rotation){case 0:s=Math.max(0,Math.min(t-n,s)),i=Math.max(0,Math.min(e-r,i));break;case 90:s=Math.max(0,Math.min(t-r,s)),i=Math.min(e,Math.max(n,i));break;case 180:s=Math.min(t,Math.max(n,s)),i=Math.min(e,Math.max(r,i));break;case 270:s=Math.min(t,Math.max(r,s)),i=Math.max(0,Math.min(e-n,i))}this.x=s/=t,this.y=i/=e;const[o,a]=this.#L();s+=o,i+=a;const{style:c}=this.div;c.left=`${(100*s).toFixed(2)}%`,c.top=`${(100*i).toFixed(2)}%`,this.moveInDOM()}static#B(t,e,s){switch(s){case 90:return[e,-t];case 180:return[-t,-e];case 270:return[-e,t];default:return[t,e]}}screenToPageTranslation(t,e){return o.#B(t,e,this.parentRotation)}pageTranslationToScreen(t,e){return o.#B(t,e,360-this.parentRotation)}#$(t){switch(t){case 90:{const[t,e]=this.pageDimensions;return[0,-t/e,e/t,0]}case 180:return[-1,0,0,-1];case 270:{const[t,e]=this.pageDimensions;return[0,t/e,-e/t,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[e,s]}=this,i=e*t,r=s*t;return n.FeatureTest.isCSSRoundSupported?[Math.round(i),Math.round(r)]:[i,r]}setDims(t,e){const[s,i]=this.parentDimensions;this.div.style.width=`${(100*t/s).toFixed(2)}%`,this.#_||(this.div.style.height=`${(100*e/i).toFixed(2)}%`),this.#S?.classList.toggle("small",t<o.SMALL_EDITOR_SIZE||e<o.SMALL_EDITOR_SIZE)}fixDims(){const{style:t}=this.div,{height:e,width:s}=t,i=s.endsWith("%"),n=!this.#_&&e.endsWith("%");if(i&&n)return;const[r,o]=this.parentDimensions;i||(t.width=`${(100*parseFloat(s)/r).toFixed(2)}%`),this.#_||n||(t.height=`${(100*parseFloat(e)/o).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}#U(){if(this.#I)return;this.#I=document.createElement("div"),this.#I.classList.add("resizers");const t=["topLeft","topRight","bottomRight","bottomLeft"];this._willKeepAspectRatio||t.push("topMiddle","middleRight","bottomMiddle","middleLeft");for(const e of t){const t=document.createElement("div");this.#I.append(t),t.classList.add("resizer",e),t.addEventListener("pointerdown",this.#j.bind(this,e)),t.addEventListener("contextmenu",r.noContextMenu)}this.div.prepend(this.#I)}#j(t,e){e.preventDefault();const{isMac:s}=n.FeatureTest.platform;if(0!==e.button||e.ctrlKey&&s)return;const i=this.#H.bind(this,t),r=this._isDraggable;this._isDraggable=!1;const o={passive:!0,capture:!0};window.addEventListener("pointermove",i,o);const a=this.x,c=this.y,h=this.width,l=this.height,u=this.parent.div.style.cursor,f=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(e.target).cursor;const d=()=>{this._isDraggable=r,window.removeEventListener("pointerup",d),window.removeEventListener("blur",d),window.removeEventListener("pointermove",i,o),this.parent.div.style.cursor=u,this.div.style.cursor=f;const t=this.x,e=this.y,s=this.width,n=this.height;t===a&&e===c&&s===h&&n===l||this.addCommands({cmd:()=>{this.width=s,this.height=n,this.x=t,this.y=e;const[i,r]=this.parentDimensions;this.setDims(i*s,r*n),this.fixAndSetPosition()},undo:()=>{this.width=h,this.height=l,this.x=a,this.y=c;const[t,e]=this.parentDimensions;this.setDims(t*h,e*l),this.fixAndSetPosition()},mustExec:!0})};window.addEventListener("pointerup",d),window.addEventListener("blur",d)}#H(t,e){const[s,i]=this.parentDimensions,n=this.x,r=this.y,a=this.width,c=this.height,h=o.MIN_SIZE/s,l=o.MIN_SIZE/i,u=t=>Math.round(1e4*t)/1e4,f=this.#$(this.rotation),d=(t,e)=>[f[0]*t+f[2]*e,f[1]*t+f[3]*e],p=this.#$(360-this.rotation);let g,m,w=!1,b=!1;switch(t){case"topLeft":w=!0,g=()=>[0,0],m=(t,e)=>[t,e];break;case"topMiddle":g=t=>[t/2,0],m=(t,e)=>[t/2,e];break;case"topRight":w=!0,g=t=>[t,0],m=(t,e)=>[0,e];break;case"middleRight":b=!0,g=(t,e)=>[t,e/2],m=(t,e)=>[0,e/2];break;case"bottomRight":w=!0,g=(t,e)=>[t,e],m=()=>[0,0];break;case"bottomMiddle":g=(t,e)=>[t/2,e],m=t=>[t/2,0];break;case"bottomLeft":w=!0,g=(t,e)=>[0,e],m=t=>[t,0];break;case"middleLeft":b=!0,g=(t,e)=>[0,e/2],m=(t,e)=>[t,e/2]}const y=g(a,c),A=m(a,c);let v=d(...A);const x=u(n+v[0]),k=u(r+v[1]);let S=1,M=1,[C,_]=this.screenToPageTranslation(e.movementX,e.movementY);var I,F;if([C,_]=[p[0]*(I=C/s)+p[2]*(F=_/i),p[1]*I+p[3]*F],w){const t=Math.hypot(a,c);S=M=Math.max(Math.min(Math.hypot(A[0]-y[0]-C,A[1]-y[1]-_)/t,1/a,1/c),h/a,l/c)}else b?S=Math.max(h,Math.min(1,Math.abs(A[0]-y[0]-C)))/a:M=Math.max(l,Math.min(1,Math.abs(A[1]-y[1]-_)))/c;const O=u(a*S),E=u(c*M);v=d(...m(O,E));const T=x-v[0],D=k-v[1];this.width=O,this.height=E,this.x=T,this.y=D,this.setDims(s*O,i*E),this.fixAndSetPosition()}async addAltTextButton(){if(this.#S)return;const t=this.#S=document.createElement("button");t.className="altText";const e=await o._l10nPromise.get("editor_alt_text_button_label");if(t.textContent=e,t.setAttribute("aria-label",e),t.tabIndex="0",t.addEventListener("contextmenu",r.noContextMenu),t.addEventListener("pointerdown",(t=>t.stopPropagation())),t.addEventListener("click",(t=>{t.preventDefault(),this._uiManager.editAltText(this)}),{capture:!0}),t.addEventListener("keydown",(e=>{e.target===t&&"Enter"===e.key&&(e.preventDefault(),this._uiManager.editAltText(this))})),this.#G(),this.div.append(t),!o.SMALL_EDITOR_SIZE){const e=40;o.SMALL_EDITOR_SIZE=Math.min(128,Math.round(t.getBoundingClientRect().width*(1+e/100)))}}async#G(){const t=this.#S;if(!t)return;if(!this.#x&&!this.#k)return t.classList.remove("done"),void this.#M?.remove();o._l10nPromise.get("editor_alt_text_edit_button_label").then((e=>{t.setAttribute("aria-label",e)}));let e=this.#M;if(!e){this.#M=e=document.createElement("span"),e.className="tooltip",e.setAttribute("role","tooltip");const s=e.id=`alt-text-tooltip-${this.id}`;t.setAttribute("aria-describedby",s);const i=100;t.addEventListener("mouseenter",(()=>{this.#C=setTimeout((()=>{this.#C=null,this.#M.classList.add("show"),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"alt_text_tooltip"}}})}),i)})),t.addEventListener("mouseleave",(()=>{clearTimeout(this.#C),this.#C=null,this.#M?.classList.remove("show")}))}t.classList.add("done"),e.innerText=this.#k?await o._l10nPromise.get("editor_alt_text_decorative_tooltip"):this.#x,e.parentNode||t.append(e)}getClientDimensions(){return this.div.getBoundingClientRect()}get altTextData(){return{altText:this.#x,decorative:this.#k}}set altTextData({altText:t,decorative:e}){this.#x===t&&this.#k===e||(this.#x=t,this.#k=e,this.#G())}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",this.#F),this.div.addEventListener("focusout",this.#O);const[t,e]=this.parentDimensions;this.parentRotation%180!=0&&(this.div.style.maxWidth=`${(100*e/t).toFixed(2)}%`,this.div.style.maxHeight=`${(100*t/e).toFixed(2)}%`);const[s,n]=this.getInitialTranslation();return this.translate(s,n),(0,i.bindEvents)(this,this.div,["pointerdown"]),this.div}pointerdown(t){const{isMac:e}=n.FeatureTest.platform;0!==t.button||t.ctrlKey&&e?t.preventDefault():(this.#E=!0,this.#q(t))}#q(t){if(!this._isDraggable)return;const e=this._uiManager.isSelected(this);let s,i;this._uiManager.setUpDragSession(),e&&(s={passive:!0,capture:!0},i=t=>{const[e,s]=this.screenToPageTranslation(t.movementX,t.movementY);this._uiManager.dragSelectedEditors(e,s)},window.addEventListener("pointermove",i,s));const r=()=>{if(window.removeEventListener("pointerup",r),window.removeEventListener("blur",r),e&&window.removeEventListener("pointermove",i,s),this.#E=!1,!this._uiManager.endDragSession()){const{isMac:e}=n.FeatureTest.platform;t.ctrlKey&&!e||t.shiftKey||t.metaKey&&e?this.parent.toggleSelected(this):this.parent.setSelected(this)}};window.addEventListener("pointerup",r),window.addEventListener("blur",r)}moveInDOM(){this.parent?.moveEditorInDOM(this)}_setParentAndPosition(t,e,s){t.changeParent(this),this.x=e,this.y=s,this.fixAndSetPosition()}getRect(t,e){const s=this.parentScale,[i,n]=this.pageDimensions,[r,o]=this.pageTranslation,a=t/s,c=e/s,h=this.x*i,l=this.y*n,u=this.width*i,f=this.height*n;switch(this.rotation){case 0:return[h+a+r,n-l-c-f+o,h+a+u+r,n-l-c+o];case 90:return[h+c+r,n-l+a+o,h+c+f+r,n-l+a+u+o];case 180:return[h-a-u+r,n-l+c+o,h-a+r,n-l+c+f+o];case 270:return[h-c-f+r,n-l-a-u+o,h-c+r,n-l-a+o];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,e){const[s,i,n,r]=t,o=n-s,a=r-i;switch(this.rotation){case 0:return[s,e-r,o,a];case 90:return[s,e-i,a,o];case 180:return[n,e-i,o,a];case 270:return[n,e-r,a,o];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){this.#D=!0}disableEditMode(){this.#D=!1}isInEditMode(){return this.#D}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){this.div?.addEventListener("focusin",this.#F),this.div?.addEventListener("focusout",this.#O)}serialize(t=!1,e=null){(0,n.unreachable)("An editor must be serializable")}static deserialize(t,e,s){const i=new this.prototype.constructor({parent:e,id:e.getNextId(),uiManager:s});i.rotation=t.rotation;const[n,r]=i.pageDimensions,[o,a,c,h]=i.getRectInCurrentCoords(t.rect,r);return i.x=o/n,i.y=a/r,i.width=c/n,i.height=h/r,i}remove(){this.div.removeEventListener("focusin",this.#F),this.div.removeEventListener("focusout",this.#O),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#S?.remove(),this.#S=null,this.#M=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#U(),this.#I.classList.remove("hidden"))}select(){this.makeResizable(),this.div?.classList.add("selectedEditor")}unselect(){this.#I?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}updateParams(t,e){}disableEditing(){this.#S&&(this.#S.hidden=!0)}enableEditing(){this.#S&&(this.#S.hidden=!1)}enterInEditMode(){}get contentDiv(){return this.div}get isEditing(){return this.#T}set isEditing(t){this.#T=t,this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(t,e){this.#_=!0;const s=t/e,{style:i}=this.div;i.aspectRatio=s,i.height="auto"}static get MIN_SIZE(){return 16}}e.AnnotationEditor=o;class a extends o{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.KeyboardManager=e.CommandManager=e.ColorManager=e.AnnotationEditorUIManager=void 0,e.bindEvents=function(t,e,s){for(const i of s)e.addEventListener(i,t[i].bind(t))},e.opacityToHex=function(t){return Math.round(Math.min(255,Math.max(1,255*t))).toString(16).padStart(2,"0")};var i=s(1),n=s(6);class r{#X=0;getId(){return`${i.AnnotationEditorPrefix}${this.#X++}`}}class o{#W=(0,i.getUuid)();#X=0;#z=null;static get _isSVGFittingCanvas(){const t=new OffscreenCanvas(1,3).getContext("2d"),e=new Image;e.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>';const s=e.decode().then((()=>(t.drawImage(e,0,0,1,1,0,0,1,3),0===new Uint32Array(t.getImageData(0,0,1,1).data.buffer)[0])));return(0,i.shadow)(this,"_isSVGFittingCanvas",s)}async#V(t,e){this.#z||=new Map;let s=this.#z.get(t);if(null===s)return null;if(s?.bitmap)return s.refCounter+=1,s;try{let t;if(s||={bitmap:null,id:`image_${this.#W}_${this.#X++}`,refCounter:0,isSvg:!1},"string"==typeof e){s.url=e;const i=await fetch(e);if(!i.ok)throw new Error(i.statusText);t=await i.blob()}else t=s.file=e;if("image/svg+xml"===t.type){const e=o._isSVGFittingCanvas,i=new FileReader,n=new Image,r=new Promise(((t,r)=>{n.onload=()=>{s.bitmap=n,s.isSvg=!0,t()},i.onload=async()=>{const t=s.svgUrl=i.result;n.src=await e?`${t}#svgView(preserveAspectRatio(none))`:t},n.onerror=i.onerror=r}));i.readAsDataURL(t),await r}else s.bitmap=await createImageBitmap(t);s.refCounter=1}catch(t){console.error(t),s=null}return this.#z.set(t,s),s&&this.#z.set(s.id,s),s}async getFromFile(t){const{lastModified:e,name:s,size:i,type:n}=t;return this.#V(`${e}_${s}_${i}_${n}`,t)}async getFromUrl(t){return this.#V(t,t)}async getFromId(t){this.#z||=new Map;const e=this.#z.get(t);return e?e.bitmap?(e.refCounter+=1,e):e.file?this.getFromFile(e.file):this.getFromUrl(e.url):null}getSvgUrl(t){const e=this.#z.get(t);return e?.isSvg?e.svgUrl:null}deleteId(t){this.#z||=new Map;const e=this.#z.get(t);e&&(e.refCounter-=1,0===e.refCounter&&(e.bitmap=null))}isValidId(t){return t.startsWith(`image_${this.#W}_`)}}class a{#K=[];#J=!1;#Y;#Q=-1;constructor(t=128){this.#Y=t}add({cmd:t,undo:e,mustExec:s,type:i=NaN,overwriteIfSameType:n=!1,keepUndo:r=!1}){if(s&&t(),this.#J)return;const o={cmd:t,undo:e,type:i};if(-1===this.#Q)return this.#K.length>0&&(this.#K.length=0),this.#Q=0,void this.#K.push(o);if(n&&this.#K[this.#Q].type===i)return r&&(o.undo=this.#K[this.#Q].undo),void(this.#K[this.#Q]=o);const a=this.#Q+1;a===this.#Y?this.#K.splice(0,1):(this.#Q=a,a<this.#K.length&&this.#K.splice(a)),this.#K.push(o)}undo(){-1!==this.#Q&&(this.#J=!0,this.#K[this.#Q].undo(),this.#J=!1,this.#Q-=1)}redo(){this.#Q<this.#K.length-1&&(this.#Q+=1,this.#J=!0,this.#K[this.#Q].cmd(),this.#J=!1)}hasSomethingToUndo(){return-1!==this.#Q}hasSomethingToRedo(){return this.#Q<this.#K.length-1}destroy(){this.#K=null}}e.CommandManager=a;class c{constructor(t){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:e}=i.FeatureTest.platform;for(const[s,i,n={}]of t)for(const t of s){const s=t.startsWith("mac+");e&&s?(this.callbacks.set(t.slice(4),{callback:i,options:n}),this.allKeys.add(t.split("+").at(-1))):e||s||(this.callbacks.set(t,{callback:i,options:n}),this.allKeys.add(t.split("+").at(-1)))}}#Z(t){t.altKey&&this.buffer.push("alt"),t.ctrlKey&&this.buffer.push("ctrl"),t.metaKey&&this.buffer.push("meta"),t.shiftKey&&this.buffer.push("shift"),this.buffer.push(t.key);const e=this.buffer.join("+");return this.buffer.length=0,e}exec(t,e){if(!this.allKeys.has(e.key))return;const s=this.callbacks.get(this.#Z(e));if(!s)return;const{callback:i,options:{bubbles:n=!1,args:r=[],checker:o=null}}=s;o&&!o(t,e)||(i.bind(t,...r)(),n||(e.stopPropagation(),e.preventDefault()))}}e.KeyboardManager=c;class h{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return(0,n.getColorValues)(t),(0,i.shadow)(this,"_colors",t)}convert(t){const e=(0,n.getRGB)(t);if(!window.matchMedia("(forced-colors: active)").matches)return e;for(const[t,s]of this._colors)if(s.every(((t,s)=>t===e[s])))return h._colorsMapping.get(t);return e}getHexCode(t){const e=this._colors.get(t);return e?i.Util.makeHexColor(...e):t}}e.ColorManager=h;class l{#tt=null;#et=new Map;#st=new Map;#it=null;#nt=null;#rt=new a;#ot=0;#at=new Set;#ct=null;#ht=null;#lt=new Set;#ut=null;#ft=new r;#dt=!1;#pt=!1;#gt=null;#mt=i.AnnotationEditorType.NONE;#wt=new Set;#bt=null;#yt=this.blur.bind(this);#At=this.focus.bind(this);#vt=this.copy.bind(this);#xt=this.cut.bind(this);#kt=this.paste.bind(this);#St=this.keydown.bind(this);#Mt=this.onEditingAction.bind(this);#Ct=this.onPageChanging.bind(this);#_t=this.onScaleChanging.bind(this);#It=this.onRotationChanging.bind(this);#Ft={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1};#Ot=[0,0];#Et=null;#Tt=null;#Dt=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){const t=l.prototype,e=t=>{const{activeElement:e}=document;return e&&t.#Tt.contains(e)&&t.hasSomethingToControl()},s=this.TRANSLATE_SMALL,n=this.TRANSLATE_BIG;return(0,i.shadow)(this,"_keyboardManager",new c([[["ctrl+a","mac+meta+a"],t.selectAll],[["ctrl+z","mac+meta+z"],t.undo],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-s,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-n,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[s,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[n,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-s],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-n],checker:e}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,s],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,n],checker:e}]]))}constructor(t,e,s,i,r,o){this.#Tt=t,this.#Dt=e,this.#it=s,this._eventBus=i,this._eventBus._on("editingaction",this.#Mt),this._eventBus._on("pagechanging",this.#Ct),this._eventBus._on("scalechanging",this.#_t),this._eventBus._on("rotationchanging",this.#It),this.#nt=r.annotationStorage,this.#ut=r.filterFactory,this.#bt=o,this.viewParameters={realScale:n.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}destroy(){this.#Pt(),this.#Rt(),this._eventBus._off("editingaction",this.#Mt),this._eventBus._off("pagechanging",this.#Ct),this._eventBus._off("scalechanging",this.#_t),this._eventBus._off("rotationchanging",this.#It);for(const t of this.#st.values())t.destroy();this.#st.clear(),this.#et.clear(),this.#lt.clear(),this.#tt=null,this.#wt.clear(),this.#rt.destroy(),this.#it.destroy()}get hcmFilter(){return(0,i.shadow)(this,"hcmFilter",this.#bt?this.#ut.addHCMFilter(this.#bt.foreground,this.#bt.background):"none")}get direction(){return(0,i.shadow)(this,"direction",getComputedStyle(this.#Tt).direction)}editAltText(t){this.#it?.editAltText(this,t)}onPageChanging({pageNumber:t}){this.#ot=t-1}focusMainContainer(){this.#Tt.focus()}findParent(t,e){for(const s of this.#st.values()){const{x:i,y:n,width:r,height:o}=s.div.getBoundingClientRect();if(t>=i&&t<=i+r&&e>=n&&e<=n+o)return s}return null}disableUserSelect(t=!1){this.#Dt.classList.toggle("noUserSelect",t)}addShouldRescale(t){this.#lt.add(t)}removeShouldRescale(t){this.#lt.delete(t)}onScaleChanging({scale:t}){this.commitOrRemove(),this.viewParameters.realScale=t*n.PixelsPerInch.PDF_TO_CSS_UNITS;for(const t of this.#lt)t.onScaleChanging()}onRotationChanging({pagesRotation:t}){this.commitOrRemove(),this.viewParameters.rotation=t}addToAnnotationStorage(t){t.isEmpty()||!this.#nt||this.#nt.has(t.id)||this.#nt.setValue(t.id,t)}#Nt(){window.addEventListener("focus",this.#At),window.addEventListener("blur",this.#yt)}#Rt(){window.removeEventListener("focus",this.#At),window.removeEventListener("blur",this.#yt)}blur(){if(!this.hasSelection)return;const{activeElement:t}=document;for(const e of this.#wt)if(e.div.contains(t)){this.#gt=[e,t],e._focusEventsAllowed=!1;break}}focus(){if(!this.#gt)return;const[t,e]=this.#gt;this.#gt=null,e.addEventListener("focusin",(()=>{t._focusEventsAllowed=!0}),{once:!0}),e.focus()}#Lt(){window.addEventListener("keydown",this.#St,{capture:!0})}#Pt(){window.removeEventListener("keydown",this.#St,{capture:!0})}#Bt(){document.addEventListener("copy",this.#vt),document.addEventListener("cut",this.#xt),document.addEventListener("paste",this.#kt)}#$t(){document.removeEventListener("copy",this.#vt),document.removeEventListener("cut",this.#xt),document.removeEventListener("paste",this.#kt)}addEditListeners(){this.#Lt(),this.#Bt()}removeEditListeners(){this.#Pt(),this.#$t()}copy(t){if(t.preventDefault(),this.#tt?.commitOrRemove(),!this.hasSelection)return;const e=[];for(const t of this.#wt){const s=t.serialize(!0);s&&e.push(s)}0!==e.length&&t.clipboardData.setData("application/pdfjs",JSON.stringify(e))}cut(t){this.copy(t),this.delete()}paste(t){t.preventDefault();const{clipboardData:e}=t;for(const t of e.items)for(const e of this.#ht)if(e.isHandlingMimeForPasting(t.type))return void e.paste(t,this.currentLayer);let s=e.getData("application/pdfjs");if(!s)return;try{s=JSON.parse(s)}catch(t){return void(0,i.warn)(`paste: "${t.message}".`)}if(!Array.isArray(s))return;this.unselectAll();const n=this.currentLayer;try{const t=[];for(const e of s){const s=n.deserialize(e);if(!s)return;t.push(s)}this.addCommands({cmd:()=>{for(const e of t)this.#Ut(e);this.#jt(t)},undo:()=>{for(const e of t)e.remove()},mustExec:!0})}catch(t){(0,i.warn)(`paste: "${t.message}".`)}}keydown(t){this.getActive()?.shouldGetKeyboardEvents()||l._keyboardManager.exec(this,t)}onEditingAction(t){["undo","redo","delete","selectAll"].includes(t.name)&&this[t.name]()}#Ht(t){Object.entries(t).some((([t,e])=>this.#Ft[t]!==e))&&this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#Ft,t)})}#Gt(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})}setEditingState(t){t?(this.#Nt(),this.#Lt(),this.#Bt(),this.#Ht({isEditing:this.#mt!==i.AnnotationEditorType.NONE,isEmpty:this.#qt(),hasSomethingToUndo:this.#rt.hasSomethingToUndo(),hasSomethingToRedo:this.#rt.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#Rt(),this.#Pt(),this.#$t(),this.#Ht({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!this.#ht){this.#ht=t;for(const t of this.#ht)this.#Gt(t.defaultPropertiesToUpdate)}}getId(){return this.#ft.getId()}get currentLayer(){return this.#st.get(this.#ot)}getLayer(t){return this.#st.get(t)}get currentPageIndex(){return this.#ot}addLayer(t){this.#st.set(t.pageIndex,t),this.#dt?t.enable():t.disable()}removeLayer(t){this.#st.delete(t.pageIndex)}updateMode(t,e=null){if(this.#mt!==t){if(this.#mt=t,t===i.AnnotationEditorType.NONE)return this.setEditingState(!1),void this.#Xt();this.setEditingState(!0),this.#Wt(),this.unselectAll();for(const e of this.#st.values())e.updateMode(t);if(e)for(const t of this.#et.values())if(t.annotationElementId===e){this.setSelected(t),t.enterInEditMode();break}}}updateToolbar(t){t!==this.#mt&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:t})}updateParams(t,e){if(this.#ht)if(t!==i.AnnotationEditorParamsType.CREATE){for(const s of this.#wt)s.updateParams(t,e);for(const s of this.#ht)s.updateDefaultParams(t,e)}else this.currentLayer.addNewEditor(t)}enableWaiting(t=!1){if(this.#pt!==t){this.#pt=t;for(const e of this.#st.values())t?e.disableClick():e.enableClick(),e.div.classList.toggle("waiting",t)}}#Wt(){if(!this.#dt){this.#dt=!0;for(const t of this.#st.values())t.enable()}}#Xt(){if(this.unselectAll(),this.#dt){this.#dt=!1;for(const t of this.#st.values())t.disable()}}getEditors(t){const e=[];for(const s of this.#et.values())s.pageIndex===t&&e.push(s);return e}getEditor(t){return this.#et.get(t)}addEditor(t){this.#et.set(t.id,t)}removeEditor(t){this.#et.delete(t.id),this.unselect(t),t.annotationElementId&&this.#at.has(t.annotationElementId)||this.#nt?.remove(t.id)}addDeletedAnnotationElement(t){this.#at.add(t.annotationElementId),t.deleted=!0}isDeletedAnnotationElement(t){return this.#at.has(t)}removeDeletedAnnotationElement(t){this.#at.delete(t.annotationElementId),t.deleted=!1}#Ut(t){const e=this.#st.get(t.pageIndex);e?e.addOrRebuild(t):this.addEditor(t)}setActiveEditor(t){this.#tt!==t&&(this.#tt=t,t&&this.#Gt(t.propertiesToUpdate))}toggleSelected(t){if(this.#wt.has(t))return this.#wt.delete(t),t.unselect(),void this.#Ht({hasSelectedEditor:this.hasSelection});this.#wt.add(t),t.select(),this.#Gt(t.propertiesToUpdate),this.#Ht({hasSelectedEditor:!0})}setSelected(t){for(const e of this.#wt)e!==t&&e.unselect();this.#wt.clear(),this.#wt.add(t),t.select(),this.#Gt(t.propertiesToUpdate),this.#Ht({hasSelectedEditor:!0})}isSelected(t){return this.#wt.has(t)}unselect(t){t.unselect(),this.#wt.delete(t),this.#Ht({hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==this.#wt.size}undo(){this.#rt.undo(),this.#Ht({hasSomethingToUndo:this.#rt.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#qt()})}redo(){this.#rt.redo(),this.#Ht({hasSomethingToUndo:!0,hasSomethingToRedo:this.#rt.hasSomethingToRedo(),isEmpty:this.#qt()})}addCommands(t){this.#rt.add(t),this.#Ht({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#qt()})}#qt(){if(0===this.#et.size)return!0;if(1===this.#et.size)for(const t of this.#et.values())return t.isEmpty();return!1}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const t=[...this.#wt];this.addCommands({cmd:()=>{for(const e of t)e.remove()},undo:()=>{for(const e of t)this.#Ut(e)},mustExec:!0})}commitOrRemove(){this.#tt?.commitOrRemove()}hasSomethingToControl(){return this.#tt||this.hasSelection}#jt(t){this.#wt.clear();for(const e of t)e.isEmpty()||(this.#wt.add(e),e.select());this.#Ht({hasSelectedEditor:!0})}selectAll(){for(const t of this.#wt)t.commit();this.#jt(this.#et.values())}unselectAll(){if(this.#tt)this.#tt.commitOrRemove();else if(this.hasSelection){for(const t of this.#wt)t.unselect();this.#wt.clear(),this.#Ht({hasSelectedEditor:!1})}}translateSelectedEditors(t,e,s=!1){if(s||this.commitOrRemove(),!this.hasSelection)return;this.#Ot[0]+=t,this.#Ot[1]+=e;const[i,n]=this.#Ot,r=[...this.#wt];this.#Et&&clearTimeout(this.#Et),this.#Et=setTimeout((()=>{this.#Et=null,this.#Ot[0]=this.#Ot[1]=0,this.addCommands({cmd:()=>{for(const t of r)this.#et.has(t.id)&&t.translateInPage(i,n)},undo:()=>{for(const t of r)this.#et.has(t.id)&&t.translateInPage(-i,-n)},mustExec:!1})}),1e3);for(const s of r)s.translateInPage(t,e)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#ct=new Map;for(const t of this.#wt)this.#ct.set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#ct)return!1;this.disableUserSelect(!1);const t=this.#ct;this.#ct=null;let e=!1;for(const[{x:s,y:i,pageIndex:n},r]of t)r.newX=s,r.newY=i,r.newPageIndex=n,e||=s!==r.savedX||i!==r.savedY||n!==r.savedPageIndex;if(!e)return!1;const s=(t,e,s,i)=>{if(this.#et.has(t.id)){const n=this.#st.get(i);n?t._setParentAndPosition(n,e,s):(t.pageIndex=i,t.x=e,t.y=s)}};return this.addCommands({cmd:()=>{for(const[e,{newX:i,newY:n,newPageIndex:r}]of t)s(e,i,n,r)},undo:()=>{for(const[e,{savedX:i,savedY:n,savedPageIndex:r}]of t)s(e,i,n,r)},mustExec:!0}),!0}dragSelectedEditors(t,e){if(this.#ct)for(const s of this.#ct.keys())s.drag(t,e)}rebuild(t){if(null===t.parent){const e=this.getLayer(t.pageIndex);e?(e.changeParent(t),e.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}isActive(t){return this.#tt===t}getActive(){return this.#tt}getMode(){return this.#mt}get imageManager(){return(0,i.shadow)(this,"imageManager",new o)}}e.AnnotationEditorUIManager=l},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.StatTimer=e.RenderingCancelledException=e.PixelsPerInch=e.PageViewport=e.PDFDateString=e.DOMStandardFontDataFactory=e.DOMSVGFactory=e.DOMFilterFactory=e.DOMCanvasFactory=e.DOMCMapReaderFactory=void 0,e.deprecated=function(t){console.log("Deprecated API usage: "+t)},e.getColorValues=function(t){const e=document.createElement("span");e.style.visibility="hidden",document.body.append(e);for(const s of t.keys()){e.style.color=s;const i=window.getComputedStyle(e).color;t.set(s,u(i))}e.remove()},e.getCurrentTransform=function(t){const{a:e,b:s,c:i,d:n,e:r,f:o}=t.getTransform();return[e,s,i,n,r,o]},e.getCurrentTransformInverse=function(t){const{a:e,b:s,c:i,d:n,e:r,f:o}=t.getTransform().invertSelf();return[e,s,i,n,r,o]},e.getFilenameFromUrl=function(t,e=!1){return e||([t]=t.split(/[#?]/,1)),t.substring(t.lastIndexOf("/")+1)},e.getPdfFilenameFromUrl=function(t,e="document.pdf"){if("string"!=typeof t)return e;if(c(t))return(0,n.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),e;const s=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,i=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(t);let r=s.exec(i[1])||s.exec(i[2])||s.exec(i[3]);if(r&&(r=r[0],r.includes("%")))try{r=s.exec(decodeURIComponent(r))[0]}catch{}return r||e},e.getRGB=u,e.getXfaPageViewport=function(t,{scale:e=1,rotation:s=0}){const{width:i,height:n}=t.attributes.style,r=[0,0,parseInt(i),parseInt(n)];return new a({viewBox:r,scale:e,rotation:s})},e.isDataScheme=c,e.isPdfFile=function(t){return"string"==typeof t&&/\.pdf$/i.test(t)},e.isValidFetchUrl=h,e.loadScript=function(t,e=!1){return new Promise(((s,i)=>{const n=document.createElement("script");n.src=t,n.onload=function(t){e&&n.remove(),s(t)},n.onerror=function(){i(new Error(`Cannot load script at: ${n.src}`))},(document.head||document.documentElement).append(n)}))},e.noContextMenu=function(t){t.preventDefault()},e.setLayerDimensions=function(t,e,s=!1,i=!0){if(e instanceof a){const{pageWidth:i,pageHeight:r}=e.rawDims,{style:o}=t,a=n.FeatureTest.isCSSRoundSupported,c=`var(--scale-factor) * ${i}px`,h=`var(--scale-factor) * ${r}px`,l=a?`round(${c}, 1px)`:`calc(${c})`,u=a?`round(${h}, 1px)`:`calc(${h})`;s&&e.rotation%180!=0?(o.width=u,o.height=l):(o.width=l,o.height=u)}i&&t.setAttribute("data-main-rotation",e.rotation)};var i=s(7),n=s(1);const r="http://www.w3.org/2000/svg";async function o(t,e=!1){if(h(t,document.baseURI)){const s=await fetch(t);if(!s.ok)throw new Error(s.statusText);return e?new Uint8Array(await s.arrayBuffer()):(0,n.stringToBytes)(await s.text())}return new Promise(((s,i)=>{const r=new XMLHttpRequest;r.open("GET",t,!0),e&&(r.responseType="arraybuffer"),r.onreadystatechange=()=>{if(r.readyState===XMLHttpRequest.DONE){if(200===r.status||0===r.status){let t;if(e&&r.response?t=new Uint8Array(r.response):!e&&r.responseText&&(t=(0,n.stringToBytes)(r.responseText)),t)return void s(t)}i(new Error(r.statusText))}},r.send(null)}))}e.PixelsPerInch=class{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF},e.DOMFilterFactory=class extends i.BaseFilterFactory{#zt;#Vt;#e;#Kt;#Jt;#Yt;#Qt;#Zt;#te;#ee;#X=0;constructor({docId:t,ownerDocument:e=globalThis.document}={}){super(),this.#e=t,this.#Kt=e}get#z(){return this.#zt||=new Map}get#se(){if(!this.#Vt){const t=this.#Kt.createElement("div"),{style:e}=t;e.visibility="hidden",e.contain="strict",e.width=e.height=0,e.position="absolute",e.top=e.left=0,e.zIndex=-1;const s=this.#Kt.createElementNS(r,"svg");s.setAttribute("width",0),s.setAttribute("height",0),this.#Vt=this.#Kt.createElementNS(r,"defs"),t.append(s),s.append(this.#Vt),this.#Kt.body.append(t)}return this.#Vt}addFilter(t){if(!t)return"none";let e,s,i,n,r=this.#z.get(t);if(r)return r;if(1===t.length){const r=t[0],o=new Array(256);for(let t=0;t<256;t++)o[t]=r[t]/255;n=e=s=i=o.join(",")}else{const[r,o,a]=t,c=new Array(256),h=new Array(256),l=new Array(256);for(let t=0;t<256;t++)c[t]=r[t]/255,h[t]=o[t]/255,l[t]=a[t]/255;e=c.join(","),s=h.join(","),i=l.join(","),n=`${e}${s}${i}`}if(r=this.#z.get(n),r)return this.#z.set(t,r),r;const o=`g_${this.#e}_transfer_map_${this.#X++}`,a=`url(#${o})`;this.#z.set(t,a),this.#z.set(n,a);const c=this.#ie(o);return this.#ne(e,s,i,c),a}addHCMFilter(t,e){const s=`${t}-${e}`;if(this.#Yt===s)return this.#Qt;if(this.#Yt=s,this.#Qt="none",this.#Jt?.remove(),!t||!e)return this.#Qt;const i=this.#re(t);t=n.Util.makeHexColor(...i);const r=this.#re(e);if(e=n.Util.makeHexColor(...r),this.#se.style.color="","#000000"===t&&"#ffffff"===e||t===e)return this.#Qt;const o=new Array(256);for(let t=0;t<=255;t++){const e=t/255;o[t]=e<=.03928?e/12.92:((e+.055)/1.055)**2.4}const a=o.join(","),c=`g_${this.#e}_hcm_filter`,h=this.#Zt=this.#ie(c);this.#ne(a,a,a,h),this.#oe(h);const l=(t,e)=>{const s=i[t]/255,n=r[t]/255,o=new Array(e+1);for(let t=0;t<=e;t++)o[t]=s+t/e*(n-s);return o.join(",")};return this.#ne(l(0,5),l(1,5),l(2,5),h),this.#Qt=`url(#${c})`,this.#Qt}addHighlightHCMFilter(t,e,s,i){const n=`${t}-${e}-${s}-${i}`;if(this.#te===n)return this.#ee;if(this.#te=n,this.#ee="none",this.#Zt?.remove(),!t||!e)return this.#ee;const[r,o]=[t,e].map(this.#re.bind(this));let a=Math.round(.2126*r[0]+.7152*r[1]+.0722*r[2]),c=Math.round(.2126*o[0]+.7152*o[1]+.0722*o[2]),[h,l]=[s,i].map(this.#re.bind(this));c<a&&([a,c,h,l]=[c,a,l,h]),this.#se.style.color="";const u=(t,e,s)=>{const i=new Array(256),n=(c-a)/s,r=t/255,o=(e-t)/(255*s);let h=0;for(let t=0;t<=s;t++){const e=Math.round(a+t*n),s=r+t*o;for(let t=h;t<=e;t++)i[t]=s;h=e+1}for(let t=h;t<256;t++)i[t]=i[h-1];return i.join(",")},f=`g_${this.#e}_hcm_highlight_filter`,d=this.#Zt=this.#ie(f);return this.#oe(d),this.#ne(u(h[0],l[0],5),u(h[1],l[1],5),u(h[2],l[2],5),d),this.#ee=`url(#${f})`,this.#ee}destroy(t=!1){t&&(this.#Qt||this.#ee)||(this.#Vt&&(this.#Vt.parentNode.parentNode.remove(),this.#Vt=null),this.#zt&&(this.#zt.clear(),this.#zt=null),this.#X=0)}#oe(t){const e=this.#Kt.createElementNS(r,"feColorMatrix");e.setAttribute("type","matrix"),e.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),t.append(e)}#ie(t){const e=this.#Kt.createElementNS(r,"filter");return e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("id",t),this.#se.append(e),e}#ae(t,e,s){const i=this.#Kt.createElementNS(r,e);i.setAttribute("type","discrete"),i.setAttribute("tableValues",s),t.append(i)}#ne(t,e,s,i){const n=this.#Kt.createElementNS(r,"feComponentTransfer");i.append(n),this.#ae(n,"feFuncR",t),this.#ae(n,"feFuncG",e),this.#ae(n,"feFuncB",s)}#re(t){return this.#se.style.color=t,u(getComputedStyle(this.#se).getPropertyValue("color"))}},e.DOMCanvasFactory=class extends i.BaseCanvasFactory{constructor({ownerDocument:t=globalThis.document}={}){super(),this._document=t}_createCanvas(t,e){const s=this._document.createElement("canvas");return s.width=t,s.height=e,s}},e.DOMCMapReaderFactory=class extends i.BaseCMapReaderFactory{_fetchData(t,e){return o(t,this.isCompressed).then((t=>({cMapData:t,compressionType:e})))}},e.DOMStandardFontDataFactory=class extends i.BaseStandardFontDataFactory{_fetchData(t){return o(t,!0)}},e.DOMSVGFactory=class extends i.BaseSVGFactory{_createSVG(t){return document.createElementNS(r,t)}};class a{constructor({viewBox:t,scale:e,rotation:s,offsetX:i=0,offsetY:n=0,dontFlip:r=!1}){this.viewBox=t,this.scale=e,this.rotation=s,this.offsetX=i,this.offsetY=n;const o=(t[2]+t[0])/2,a=(t[3]+t[1])/2;let c,h,l,u,f,d,p,g;switch((s%=360)<0&&(s+=360),s){case 180:c=-1,h=0,l=0,u=1;break;case 90:c=0,h=1,l=1,u=0;break;case 270:c=0,h=-1,l=-1,u=0;break;case 0:c=1,h=0,l=0,u=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}r&&(l=-l,u=-u),0===c?(f=Math.abs(a-t[1])*e+i,d=Math.abs(o-t[0])*e+n,p=(t[3]-t[1])*e,g=(t[2]-t[0])*e):(f=Math.abs(o-t[0])*e+i,d=Math.abs(a-t[1])*e+n,p=(t[2]-t[0])*e,g=(t[3]-t[1])*e),this.transform=[c*e,h*e,l*e,u*e,f-c*e*o-l*e*a,d-h*e*o-u*e*a],this.width=p,this.height=g}get rawDims(){const{viewBox:t}=this;return(0,n.shadow)(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone({scale:t=this.scale,rotation:e=this.rotation,offsetX:s=this.offsetX,offsetY:i=this.offsetY,dontFlip:n=!1}={}){return new a({viewBox:this.viewBox.slice(),scale:t,rotation:e,offsetX:s,offsetY:i,dontFlip:n})}convertToViewportPoint(t,e){return n.Util.applyTransform([t,e],this.transform)}convertToViewportRectangle(t){const e=n.Util.applyTransform([t[0],t[1]],this.transform),s=n.Util.applyTransform([t[2],t[3]],this.transform);return[e[0],e[1],s[0],s[1]]}convertToPdfPoint(t,e){return n.Util.applyInverseTransform([t,e],this.transform)}}function c(t){const e=t.length;let s=0;for(;s<e&&""===t[s].trim();)s++;return"data:"===t.substring(s,s+5).toLowerCase()}function h(t,e){try{const{protocol:s}=e?new URL(t,e):new URL(t);return"http:"===s||"https:"===s}catch{return!1}}let l;function u(t){if(t.startsWith("#")){const e=parseInt(t.slice(1),16);return[(16711680&e)>>16,(65280&e)>>8,255&e]}return t.startsWith("rgb(")?t.slice(4,-1).split(",").map((t=>parseInt(t))):t.startsWith("rgba(")?t.slice(5,-1).split(",").map((t=>parseInt(t))).slice(0,3):((0,n.warn)(`Not a valid color format: "${t}"`),[0,0,0])}e.PageViewport=a,e.RenderingCancelledException=class extends n.BaseException{constructor(t,e=0){super(t,"RenderingCancelledException"),this.extraDelay=e}},e.StatTimer=class{started=Object.create(null);times=[];time(t){t in this.started&&(0,n.warn)(`Timer is already running for ${t}`),this.started[t]=Date.now()}timeEnd(t){t in this.started||(0,n.warn)(`Timer has not been started for ${t}`),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}toString(){const t=[];let e=0;for(const{name:t}of this.times)e=Math.max(t.length,e);for(const{name:s,start:i,end:n}of this.times)t.push(`${s.padEnd(e)} ${n-i}ms\n`);return t.join("")}},e.PDFDateString=class{static toDateObject(t){if(!t||"string"!=typeof t)return null;l||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");const e=l.exec(t);if(!e)return null;const s=parseInt(e[1],10);let i=parseInt(e[2],10);i=i>=1&&i<=12?i-1:0;let n=parseInt(e[3],10);n=n>=1&&n<=31?n:1;let r=parseInt(e[4],10);r=r>=0&&r<=23?r:0;let o=parseInt(e[5],10);o=o>=0&&o<=59?o:0;let a=parseInt(e[6],10);a=a>=0&&a<=59?a:0;const c=e[7]||"Z";let h=parseInt(e[8],10);h=h>=0&&h<=23?h:0;let u=parseInt(e[9],10)||0;return u=u>=0&&u<=59?u:0,"-"===c?(r+=h,o+=u):"+"===c&&(r-=h,o-=u),new Date(Date.UTC(s,i,n,r,o,a))}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BaseStandardFontDataFactory=e.BaseSVGFactory=e.BaseFilterFactory=e.BaseCanvasFactory=e.BaseCMapReaderFactory=void 0;var i=s(1);class n{constructor(){this.constructor===n&&(0,i.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(t){return"none"}addHCMFilter(t,e){return"none"}addHighlightHCMFilter(t,e,s,i){return"none"}destroy(t=!1){}}e.BaseFilterFactory=n;class r{constructor(){this.constructor===r&&(0,i.unreachable)("Cannot initialize BaseCanvasFactory.")}create(t,e){if(t<=0||e<=0)throw new Error("Invalid canvas size");const s=this._createCanvas(t,e);return{canvas:s,context:s.getContext("2d")}}reset(t,e,s){if(!t.canvas)throw new Error("Canvas is not specified");if(e<=0||s<=0)throw new Error("Invalid canvas size");t.canvas.width=e,t.canvas.height=s}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=null,t.context=null}_createCanvas(t,e){(0,i.unreachable)("Abstract method `_createCanvas` called.")}}e.BaseCanvasFactory=r;class o{constructor({baseUrl:t=null,isCompressed:e=!0}){this.constructor===o&&(0,i.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=t,this.isCompressed=e}async fetch({name:t}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!t)throw new Error("CMap name must be specified.");const e=this.baseUrl+t+(this.isCompressed?".bcmap":"");return this._fetchData(e,this.isCompressed?i.CMapCompressionType.BINARY:i.CMapCompressionType.NONE).catch((()=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${e}`)}))}_fetchData(t,e){(0,i.unreachable)("Abstract method `_fetchData` called.")}}e.BaseCMapReaderFactory=o;class a{constructor({baseUrl:t=null}){this.constructor===a&&(0,i.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=t}async fetch({filename:t}){if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!t)throw new Error("Font filename must be specified.");const e=`${this.baseUrl}${t}`;return this._fetchData(e).catch((()=>{throw new Error(`Unable to load font data at: ${e}`)}))}_fetchData(t){(0,i.unreachable)("Abstract method `_fetchData` called.")}}e.BaseStandardFontDataFactory=a;class c{constructor(){this.constructor===c&&(0,i.unreachable)("Cannot initialize BaseSVGFactory.")}create(t,e,s=!1){if(t<=0||e<=0)throw new Error("Invalid SVG dimensions");const i=this._createSVG("svg:svg");return i.setAttribute("version","1.1"),s||(i.setAttribute("width",`${t}px`),i.setAttribute("height",`${e}px`)),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("viewBox",`0 0 ${t} ${e}`),i}createElement(t){if("string"!=typeof t)throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){(0,i.unreachable)("Abstract method `_createSVG` called.")}}e.BaseSVGFactory=c},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MurmurHash3_64=void 0;var i=s(1);const n=3285377520,r=4294901760,o=65535;e.MurmurHash3_64=class{constructor(t){this.h1=t?4294967295&t:n,this.h2=t?4294967295&t:n}update(t){let e,s;if("string"==typeof t){e=new Uint8Array(2*t.length),s=0;for(let i=0,n=t.length;i<n;i++){const n=t.charCodeAt(i);n<=255?e[s++]=n:(e[s++]=n>>>8,e[s++]=255&n)}}else{if(!(0,i.isArrayBuffer)(t))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");e=t.slice(),s=e.byteLength}const n=s>>2,a=s-4*n,c=new Uint32Array(e.buffer,0,n);let h=0,l=0,u=this.h1,f=this.h2;const d=3432918353,p=461845907,g=11601,m=13715;for(let t=0;t<n;t++)1&t?(h=c[t],h=h*d&r|h*g&o,h=h<<15|h>>>17,h=h*p&r|h*m&o,u^=h,u=u<<13|u>>>19,u=5*u+3864292196):(l=c[t],l=l*d&r|l*g&o,l=l<<15|l>>>17,l=l*p&r|l*m&o,f^=l,f=f<<13|f>>>19,f=5*f+3864292196);switch(h=0,a){case 3:h^=e[4*n+2]<<16;case 2:h^=e[4*n+1]<<8;case 1:h^=e[4*n],h=h*d&r|h*g&o,h=h<<15|h>>>17,h=h*p&r|h*m&o,1&n?u^=h:f^=h}this.h1=u,this.h2=f}hexdigest(){let t=this.h1,e=this.h2;return t^=e>>>1,t=3981806797*t&r|36045*t&o,e=4283543511*e&r|(2950163797*(e<<16|t>>>16)&r)>>>16,t^=e>>>1,t=444984403*t&r|60499*t&o,e=3301882366*e&r|(3120437893*(e<<16|t>>>16)&r)>>>16,t^=e>>>1,(t>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FontLoader=e.FontFaceObject=void 0;var i=s(1);e.FontLoader=class{#ce=new Set;constructor({ownerDocument:t=globalThis.document,styleElement:e=null}){this._document=t,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const e=this.styleElement.sheet;e.insertRule(t,e.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),this.#ce.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(t){if(t&&!this.#ce.has(t.loadedName))if((0,i.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:e,src:s,style:n}=t,r=new FontFace(e,s,n);this.addNativeFontFace(r);try{await r.load(),this.#ce.add(e)}catch{(0,i.warn)(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(r)}}else(0,i.unreachable)("Not implemented: loadSystemFont without the Font Loading API.")}async bind(t){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo)return void await this.loadSystemFont(t.systemFontInfo);if(this.isFontLoadingAPISupported){const e=t.createNativeFontFace();if(e){this.addNativeFontFace(e);try{await e.loaded}catch(s){throw(0,i.warn)(`Failed to load font '${e.family}': '${s}'.`),t.disableFontFace=!0,s}}return}const e=t.createFontFaceRule();if(e){if(this.insertRule(e),this.isSyncFontLoadingSupported)return;await new Promise((e=>{const s=this._queueLoadingCallback(e);this._prepareFontLoadEvent(t,s)}))}}get isFontLoadingAPISupported(){return(0,i.shadow)(this,"isFontLoadingAPISupported",!!this._document?.fonts)}get isSyncFontLoadingSupported(){let t=!1;return(i.isNodeJS||"undefined"!=typeof navigator&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(t=!0),(0,i.shadow)(this,"isSyncFontLoadingSupported",t)}_queueLoadingCallback(t){const{loadingRequests:e}=this,s={done:!1,complete:function(){for((0,i.assert)(!s.done,"completeRequest() cannot be called twice."),s.done=!0;e.length>0&&e[0].done;){const t=e.shift();setTimeout(t.callback,0)}},callback:t};return e.push(s),s}get _loadTestFont(){const t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,i.shadow)(this,"_loadTestFont",t)}_prepareFontLoadEvent(t,e){function s(t,e){return t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|255&t.charCodeAt(e+3)}function n(t,e,s,i){return t.substring(0,e)+i+t.substring(e+s)}let r,o;const a=this._document.createElement("canvas");a.width=1,a.height=1;const c=a.getContext("2d");let h=0;const l=`lt${Date.now()}${this.loadTestFontId++}`;let u=this._loadTestFont;u=n(u,976,l.length,l);const f=1482184792;let d=s(u,16);for(r=0,o=l.length-3;r<o;r+=4)d=d-f+s(l,r)|0;r<l.length&&(d=d-f+s(l+"XXX",r)|0),u=n(u,16,4,(0,i.string32)(d));const p=`url(data:font/opentype;base64,${btoa(u)});`;this.insertRule(`@font-face {font-family:"${l}";src:${p}}`);const g=this._document.createElement("div");g.style.visibility="hidden",g.style.width=g.style.height="10px",g.style.position="absolute",g.style.top=g.style.left="0px";for(const e of[t.loadedName,l]){const t=this._document.createElement("span");t.textContent="Hi",t.style.fontFamily=e,g.append(t)}this._document.body.append(g),function t(e,s){if(++h>30)return(0,i.warn)("Load test font never loaded."),void s();c.font="30px "+e,c.fillText(".",0,20),c.getImageData(0,0,1,1).data[3]>0?s():setTimeout(t.bind(null,e,s))}(l,(()=>{g.remove(),e.complete()}))}},e.FontFaceObject=class{constructor(t,{isEvalSupported:e=!0,disableFontFace:s=!1,ignoreErrors:i=!1,inspectFont:n=null}){this.compiledGlyphs=Object.create(null);for(const e in t)this[e]=t[e];this.isEvalSupported=!1!==e,this.disableFontFace=!0===s,this.ignoreErrors=!0===i,this._inspectFont=n}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let t;if(this.cssFontInfo){const e={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(e.style=`oblique ${this.cssFontInfo.italicAngle}deg`),t=new FontFace(this.cssFontInfo.fontFamily,this.data,e)}else t=new FontFace(this.loadedName,this.data,{});return this._inspectFont?.(this),t}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const t=(0,i.bytesToString)(this.data),e=`url(data:${this.mimetype};base64,${btoa(t)});`;let s;if(this.cssFontInfo){let t=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(t+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),s=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${t}src:${e}}`}else s=`@font-face {font-family:"${this.loadedName}";src:${e}}`;return this._inspectFont?.(this,e),s}getPathGenerator(t,e){if(void 0!==this.compiledGlyphs[e])return this.compiledGlyphs[e];let s;try{s=t.get(this.loadedName+"_path_"+e)}catch(t){if(!this.ignoreErrors)throw t;return(0,i.warn)(`getPathGenerator - ignoring character: "${t}".`),this.compiledGlyphs[e]=function(){}}if(this.isEvalSupported&&i.FeatureTest.isEvalSupported){const t=[];for(const e of s){const s=void 0!==e.args?e.args.join(","):"";t.push("c.",e.cmd,"(",s,");\n")}return this.compiledGlyphs[e]=new Function("c","size",t.join(""))}return this.compiledGlyphs[e]=function(t,e){for(const i of s)"scale"===i.cmd&&(i.args=[e,-e]),t[i.cmd].apply(t,i.args)}}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NodeStandardFontDataFactory=e.NodeFilterFactory=e.NodeCanvasFactory=e.NodeCMapReaderFactory=void 0;var i=s(7);s(1);const n=function(t){return new Promise(((e,s)=>{require$$0.readFile(t,((t,i)=>{!t&&i?e(new Uint8Array(i)):s(new Error(t))}))}))};e.NodeFilterFactory=class extends i.BaseFilterFactory{},e.NodeCanvasFactory=class extends i.BaseCanvasFactory{_createCanvas(t,e){return require$$0.createCanvas(t,e)}},e.NodeCMapReaderFactory=class extends i.BaseCMapReaderFactory{_fetchData(t,e){return n(t).then((t=>({cMapData:t,compressionType:e})))}},e.NodeStandardFontDataFactory=class extends i.BaseStandardFontDataFactory{_fetchData(t){return n(t)}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CanvasGraphics=void 0;var i=s(1),n=s(6),r=s(12),o=s(13);const a=4096,c=16;class h{constructor(t){this.canvasFactory=t,this.cache=Object.create(null)}getCanvas(t,e,s){let i;return void 0!==this.cache[t]?(i=this.cache[t],this.canvasFactory.reset(i,e,s)):(i=this.canvasFactory.create(e,s),this.cache[t]=i),i}delete(t){delete this.cache[t]}clear(){for(const t in this.cache)this.canvasFactory.destroy(this.cache[t]),delete this.cache[t]}}function l(t,e,s,i,r,o,a,c,h,l){const[u,f,d,p,g,m]=(0,n.getCurrentTransform)(t);if(0===f&&0===d){const n=Math.round(a*u+g),w=Math.round(c*p+m),b=Math.abs(Math.round((a+h)*u+g)-n)||1,y=Math.abs(Math.round((c+l)*p+m)-w)||1;return t.setTransform(Math.sign(u),0,0,Math.sign(p),n,w),t.drawImage(e,s,i,r,o,0,0,b,y),t.setTransform(u,f,d,p,g,m),[b,y]}if(0===u&&0===p){const n=Math.round(c*d+g),w=Math.round(a*f+m),b=Math.abs(Math.round((c+l)*d+g)-n)||1,y=Math.abs(Math.round((a+h)*f+m)-w)||1;return t.setTransform(0,Math.sign(f),Math.sign(d),0,n,w),t.drawImage(e,s,i,r,o,0,0,y,b),t.setTransform(u,f,d,p,g,m),[y,b]}return t.drawImage(e,s,i,r,o,a,c,h,l),[Math.hypot(u,f)*h,Math.hypot(d,p)*l]}class u{constructor(t,e){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=i.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=i.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=i.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,t,e])}clone(){const t=Object.create(this);return t.clipBox=this.clipBox.slice(),t}setCurrentPoint(t,e){this.x=t,this.y=e}updatePathMinMax(t,e,s){[e,s]=i.Util.applyTransform([e,s],t),this.minX=Math.min(this.minX,e),this.minY=Math.min(this.minY,s),this.maxX=Math.max(this.maxX,e),this.maxY=Math.max(this.maxY,s)}updateRectMinMax(t,e){const s=i.Util.applyTransform(e,t),n=i.Util.applyTransform(e.slice(2),t);this.minX=Math.min(this.minX,s[0],n[0]),this.minY=Math.min(this.minY,s[1],n[1]),this.maxX=Math.max(this.maxX,s[0],n[0]),this.maxY=Math.max(this.maxY,s[1],n[1])}updateScalingPathMinMax(t,e){i.Util.scaleMinMax(t,e),this.minX=Math.min(this.minX,e[0]),this.maxX=Math.max(this.maxX,e[1]),this.minY=Math.min(this.minY,e[2]),this.maxY=Math.max(this.maxY,e[3])}updateCurvePathMinMax(t,e,s,n,r,o,a,c,h,l){const u=i.Util.bezierBoundingBox(e,s,n,r,o,a,c,h);if(l)return l[0]=Math.min(l[0],u[0],u[2]),l[1]=Math.max(l[1],u[0],u[2]),l[2]=Math.min(l[2],u[1],u[3]),void(l[3]=Math.max(l[3],u[1],u[3]));this.updateRectMinMax(t,u)}getPathBoundingBox(t=r.PathType.FILL,e=null){const s=[this.minX,this.minY,this.maxX,this.maxY];if(t===r.PathType.STROKE){e||(0,i.unreachable)("Stroke bounding box must include transform.");const t=i.Util.singularValueDecompose2dScale(e),n=t[0]*this.lineWidth/2,r=t[1]*this.lineWidth/2;s[0]-=n,s[1]-=r,s[2]+=n,s[3]+=r}return s}updateClipFromPath(){const t=i.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(t){this.clipBox=t,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(t=r.PathType.FILL,e=null){return i.Util.intersect(this.clipBox,this.getPathBoundingBox(t,e))}}function f(t,e){if("undefined"!=typeof ImageData&&e instanceof ImageData)return void t.putImageData(e,0,0);const s=e.height,n=e.width,r=s%c,o=(s-r)/c,a=0===r?o:o+1,h=t.createImageData(n,c);let l,u=0;const f=e.data,d=h.data;let p,g,m,w;if(e.kind===i.ImageKind.GRAYSCALE_1BPP){const e=f.byteLength,s=new Uint32Array(d.buffer,0,d.byteLength>>2),w=s.length,b=n+7>>3,y=4294967295,A=i.FeatureTest.isLittleEndian?4278190080:255;for(p=0;p<a;p++){for(m=p<o?c:r,l=0,g=0;g<m;g++){const t=e-u;let i=0;const r=t>b?n:8*t-7,o=-8&r;let a=0,c=0;for(;i<o;i+=8)c=f[u++],s[l++]=128&c?y:A,s[l++]=64&c?y:A,s[l++]=32&c?y:A,s[l++]=16&c?y:A,s[l++]=8&c?y:A,s[l++]=4&c?y:A,s[l++]=2&c?y:A,s[l++]=1&c?y:A;for(;i<r;i++)0===a&&(c=f[u++],a=128),s[l++]=c&a?y:A,a>>=1}for(;l<w;)s[l++]=0;t.putImageData(h,0,p*c)}}else if(e.kind===i.ImageKind.RGBA_32BPP){for(g=0,w=n*c*4,p=0;p<o;p++)d.set(f.subarray(u,u+w)),u+=w,t.putImageData(h,0,g),g+=c;p<a&&(w=n*r*4,d.set(f.subarray(u,u+w)),t.putImageData(h,0,g))}else{if(e.kind!==i.ImageKind.RGB_24BPP)throw new Error(`bad image kind: ${e.kind}`);for(m=c,w=n*m,p=0;p<a;p++){for(p>=o&&(m=r,w=n*m),l=0,g=w;g--;)d[l++]=f[u++],d[l++]=f[u++],d[l++]=f[u++],d[l++]=255;t.putImageData(h,0,p*c)}}}function d(t,e){if(e.bitmap)return void t.drawImage(e.bitmap,0,0);const s=e.height,i=e.width,n=s%c,r=(s-n)/c,a=0===n?r:r+1,h=t.createImageData(i,c);let l=0;const u=e.data,f=h.data;for(let e=0;e<a;e++){const s=e<r?c:n;({srcPos:l}=(0,o.convertBlackAndWhiteToRGBA)({src:u,srcPos:l,dest:f,width:i,height:s,nonBlackColor:0})),t.putImageData(h,0,e*c)}}function p(t,e){const s=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const i of s)void 0!==t[i]&&(e[i]=t[i]);void 0!==t.setLineDash&&(e.setLineDash(t.getLineDash()),e.lineDashOffset=t.lineDashOffset)}function g(t){if(t.strokeStyle=t.fillStyle="#000000",t.fillRule="nonzero",t.globalAlpha=1,t.lineWidth=1,t.lineCap="butt",t.lineJoin="miter",t.miterLimit=10,t.globalCompositeOperation="source-over",t.font="10px sans-serif",void 0!==t.setLineDash&&(t.setLineDash([]),t.lineDashOffset=0),!i.isNodeJS){const{filter:e}=t;"none"!==e&&""!==e&&(t.filter="none")}}function m(t,e,s,i){const n=t.length;for(let r=3;r<n;r+=4){const n=t[r];if(0===n)t[r-3]=e,t[r-2]=s,t[r-1]=i;else if(n<255){const o=255-n;t[r-3]=t[r-3]*n+e*o>>8,t[r-2]=t[r-2]*n+s*o>>8,t[r-1]=t[r-1]*n+i*o>>8}}}function w(t,e,s){const i=t.length,n=1/255;for(let r=3;r<i;r+=4)e[r]=e[r]*(s?s[t[r]]:t[r])*n|0}function b(t,e,s){const i=t.length;for(let n=3;n<i;n+=4){const i=77*t[n-3]+152*t[n-2]+28*t[n-1];e[n]=s?e[n]*s[i>>8]>>8:e[n]*i>>16}}function y(t,e){const s=i.Util.singularValueDecompose2dScale(t);s[0]=Math.fround(s[0]),s[1]=Math.fround(s[1]);const r=Math.fround((globalThis.devicePixelRatio||1)*n.PixelsPerInch.PDF_TO_CSS_UNITS);return void 0!==e?e:s[0]<=r||s[1]<=r}const A=["butt","round","square"],v=["miter","round","bevel"],x={},k={};class S{constructor(t,e,s,i,n,{optionalContentConfig:r,markedContentStack:o=null},a,c){this.ctx=t,this.current=new u(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=e,this.objs=s,this.canvasFactory=i,this.filterFactory=n,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=o||[],this.optionalContentConfig=r,this.cachedCanvases=new h(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=a,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=c,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(t,e=null){return"string"==typeof t?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):e}beginDrawing({transform:t,viewport:e,transparency:s=!1,background:i=null}){const r=this.ctx.canvas.width,o=this.ctx.canvas.height,a=this.ctx.fillStyle;if(this.ctx.fillStyle=i||"#ffffff",this.ctx.fillRect(0,0,r,o),this.ctx.fillStyle=a,s){const t=this.cachedCanvases.getCanvas("transparent",r,o);this.compositeCtx=this.ctx,this.transparentCanvas=t.canvas,this.ctx=t.context,this.ctx.save(),this.ctx.transform(...(0,n.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),g(this.ctx),t&&(this.ctx.transform(...t),this.outputScaleX=t[0],this.outputScaleY=t[0]),this.ctx.transform(...e.transform),this.viewportScale=e.scale,this.baseTransform=(0,n.getCurrentTransform)(this.ctx)}executeOperatorList(t,e,s,n){const r=t.argsArray,o=t.fnArray;let a=e||0;const c=r.length;if(c===a)return a;const h=c-a>10&&"function"==typeof s,l=h?Date.now()+15:0;let u=0;const f=this.commonObjs,d=this.objs;let p;for(;;){if(void 0!==n&&a===n.nextBreakPoint)return n.breakIt(a,s),a;if(p=o[a],p!==i.OPS.dependency)this[p].apply(this,r[a]);else for(const t of r[a]){const e=t.startsWith("g_")?f:d;if(!e.has(t))return e.get(t,s),a}if(a++,a===c)return a;if(h&&++u>10){if(Date.now()>l)return s(),a;u=0}}}#he(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#he(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const e of t.values())"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement&&(e.width=e.height=0);t.clear()}this._cachedBitmapsMap.clear(),this.#le()}#le(){if(this.pageColors){const t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==t){const e=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=e}}}_scaleImage(t,e){const s=t.width,i=t.height;let n,r,o=Math.max(Math.hypot(e[0],e[1]),1),a=Math.max(Math.hypot(e[2],e[3]),1),c=s,h=i,l="prescale1";for(;o>2&&c>1||a>2&&h>1;){let e=c,s=h;o>2&&c>1&&(e=c>=16384?Math.floor(c/2)-1||1:Math.ceil(c/2),o/=c/e),a>2&&h>1&&(s=h>=16384?Math.floor(h/2)-1||1:Math.ceil(h)/2,a/=h/s),n=this.cachedCanvases.getCanvas(l,e,s),r=n.context,r.clearRect(0,0,e,s),r.drawImage(t,0,0,c,h,0,0,e,s),t=n.canvas,c=e,h=s,l="prescale1"===l?"prescale2":"prescale1"}return{img:t,paintWidth:c,paintHeight:h}}_createMaskCanvas(t){const e=this.ctx,{width:s,height:o}=t,a=this.current.fillColor,c=this.current.patternFill,h=(0,n.getCurrentTransform)(e);let u,f,p,g;if((t.bitmap||t.data)&&t.count>1){const e=t.bitmap||t.data.buffer;f=JSON.stringify(c?h:[h.slice(0,4),a]),u=this._cachedBitmapsMap.get(e),u||(u=new Map,this._cachedBitmapsMap.set(e,u));const s=u.get(f);if(s&&!c)return{canvas:s,offsetX:Math.round(Math.min(h[0],h[2])+h[4]),offsetY:Math.round(Math.min(h[1],h[3])+h[5])};p=s}p||(g=this.cachedCanvases.getCanvas("maskCanvas",s,o),d(g.context,t));let m=i.Util.transform(h,[1/s,0,0,-1/o,0,0]);m=i.Util.transform(m,[1,0,0,1,0,-o]);const w=i.Util.applyTransform([0,0],m),b=i.Util.applyTransform([s,o],m),A=i.Util.normalizeRect([w[0],w[1],b[0],b[1]]),v=Math.round(A[2]-A[0])||1,x=Math.round(A[3]-A[1])||1,k=this.cachedCanvases.getCanvas("fillCanvas",v,x),S=k.context,M=Math.min(w[0],b[0]),C=Math.min(w[1],b[1]);S.translate(-M,-C),S.transform(...m),p||(p=this._scaleImage(g.canvas,(0,n.getCurrentTransformInverse)(S)),p=p.img,u&&c&&u.set(f,p)),S.imageSmoothingEnabled=y((0,n.getCurrentTransform)(S),t.interpolate),l(S,p,0,0,p.width,p.height,0,0,s,o),S.globalCompositeOperation="source-in";const _=i.Util.transform((0,n.getCurrentTransformInverse)(S),[1,0,0,1,-M,-C]);return S.fillStyle=c?a.getPattern(e,this,_,r.PathType.FILL):a,S.fillRect(0,0,s,o),u&&!c&&(this.cachedCanvases.delete("fillCanvas"),u.set(f,k.canvas)),{canvas:k.canvas,offsetX:Math.round(M),offsetY:Math.round(C)}}setLineWidth(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=t,this.ctx.lineWidth=t}setLineCap(t){this.ctx.lineCap=A[t]}setLineJoin(t){this.ctx.lineJoin=v[t]}setMiterLimit(t){this.ctx.miterLimit=t}setDash(t,e){const s=this.ctx;void 0!==s.setLineDash&&(s.setLineDash(t),s.lineDashOffset=e)}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(const[e,s]of t)switch(e){case"LW":this.setLineWidth(s);break;case"LC":this.setLineCap(s);break;case"LJ":this.setLineJoin(s);break;case"ML":this.setMiterLimit(s);break;case"D":this.setDash(s[0],s[1]);break;case"RI":this.setRenderingIntent(s);break;case"FL":this.setFlatness(s);break;case"Font":this.setFont(s[0],s[1]);break;case"CA":this.current.strokeAlpha=s;break;case"ca":this.current.fillAlpha=s,this.ctx.globalAlpha=s;break;case"BM":this.ctx.globalCompositeOperation=s;break;case"SMask":this.current.activeSMask=s?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(s)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const t=this.cachedCanvases.getCanvas("smaskGroupAt"+this.groupLevel,this.ctx.canvas.width,this.ctx.canvas.height);this.suspendedCtx=this.ctx,this.ctx=t.context;const e=this.ctx;e.setTransform(...(0,n.getCurrentTransform)(this.suspendedCtx)),p(this.suspendedCtx,e),function(t,e){if(t._removeMirroring)throw new Error("Context is already forwarding operations.");t.__originalSave=t.save,t.__originalRestore=t.restore,t.__originalRotate=t.rotate,t.__originalScale=t.scale,t.__originalTranslate=t.translate,t.__originalTransform=t.transform,t.__originalSetTransform=t.setTransform,t.__originalResetTransform=t.resetTransform,t.__originalClip=t.clip,t.__originalMoveTo=t.moveTo,t.__originalLineTo=t.lineTo,t.__originalBezierCurveTo=t.bezierCurveTo,t.__originalRect=t.rect,t.__originalClosePath=t.closePath,t.__originalBeginPath=t.beginPath,t._removeMirroring=()=>{t.save=t.__originalSave,t.restore=t.__originalRestore,t.rotate=t.__originalRotate,t.scale=t.__originalScale,t.translate=t.__originalTranslate,t.transform=t.__originalTransform,t.setTransform=t.__originalSetTransform,t.resetTransform=t.__originalResetTransform,t.clip=t.__originalClip,t.moveTo=t.__originalMoveTo,t.lineTo=t.__originalLineTo,t.bezierCurveTo=t.__originalBezierCurveTo,t.rect=t.__originalRect,t.closePath=t.__originalClosePath,t.beginPath=t.__originalBeginPath,delete t._removeMirroring},t.save=function(){e.save(),this.__originalSave()},t.restore=function(){e.restore(),this.__originalRestore()},t.translate=function(t,s){e.translate(t,s),this.__originalTranslate(t,s)},t.scale=function(t,s){e.scale(t,s),this.__originalScale(t,s)},t.transform=function(t,s,i,n,r,o){e.transform(t,s,i,n,r,o),this.__originalTransform(t,s,i,n,r,o)},t.setTransform=function(t,s,i,n,r,o){e.setTransform(t,s,i,n,r,o),this.__originalSetTransform(t,s,i,n,r,o)},t.resetTransform=function(){e.resetTransform(),this.__originalResetTransform()},t.rotate=function(t){e.rotate(t),this.__originalRotate(t)},t.clip=function(t){e.clip(t),this.__originalClip(t)},t.moveTo=function(t,s){e.moveTo(t,s),this.__originalMoveTo(t,s)},t.lineTo=function(t,s){e.lineTo(t,s),this.__originalLineTo(t,s)},t.bezierCurveTo=function(t,s,i,n,r,o){e.bezierCurveTo(t,s,i,n,r,o),this.__originalBezierCurveTo(t,s,i,n,r,o)},t.rect=function(t,s,i,n){e.rect(t,s,i,n),this.__originalRect(t,s,i,n)},t.closePath=function(){e.closePath(),this.__originalClosePath()},t.beginPath=function(){e.beginPath(),this.__originalBeginPath()}}(e,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),p(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(t){this.current.activeSMask&&(t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height],function(t,e,s,i){const n=i[0],r=i[1],o=i[2]-n,a=i[3]-r;0!==o&&0!==a&&(function(t,e,s,i,n,r,o,a,c,h,l){const u=!!r,f=u?r[0]:0,d=u?r[1]:0,p=u?r[2]:0,g="Luminosity"===n?b:w,y=Math.min(i,Math.ceil(1048576/s));for(let n=0;n<i;n+=y){const r=Math.min(y,i-n),w=t.getImageData(a-h,n+(c-l),s,r),b=e.getImageData(a,n+c,s,r);u&&m(w.data,f,d,p),g(w.data,b.data,o),e.putImageData(b,a,n+c)}}(e.context,s,o,a,e.subtype,e.backdrop,e.transferMap,n,r,e.offsetX,e.offsetY),t.save(),t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(s.canvas,0,0),t.restore())}(this.suspendedCtx,this.current.activeSMask,this.ctx,t),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore())}save(){this.inSMaskMode?(p(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const t=this.current;this.stateStack.push(t),this.current=t.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),p(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(t,e,s,i,n,r){this.ctx.transform(t,e,s,i,n,r),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,e,s){const r=this.ctx,o=this.current;let a,c,h=o.x,l=o.y;const u=(0,n.getCurrentTransform)(r),f=0===u[0]&&0===u[3]||0===u[1]&&0===u[2],d=f?s.slice(0):null;for(let s=0,n=0,p=t.length;s<p;s++)switch(0|t[s]){case i.OPS.rectangle:h=e[n++],l=e[n++];const t=e[n++],s=e[n++],p=h+t,g=l+s;r.moveTo(h,l),0===t||0===s?r.lineTo(p,g):(r.lineTo(p,l),r.lineTo(p,g),r.lineTo(h,g)),f||o.updateRectMinMax(u,[h,l,p,g]),r.closePath();break;case i.OPS.moveTo:h=e[n++],l=e[n++],r.moveTo(h,l),f||o.updatePathMinMax(u,h,l);break;case i.OPS.lineTo:h=e[n++],l=e[n++],r.lineTo(h,l),f||o.updatePathMinMax(u,h,l);break;case i.OPS.curveTo:a=h,c=l,h=e[n+4],l=e[n+5],r.bezierCurveTo(e[n],e[n+1],e[n+2],e[n+3],h,l),o.updateCurvePathMinMax(u,a,c,e[n],e[n+1],e[n+2],e[n+3],h,l,d),n+=6;break;case i.OPS.curveTo2:a=h,c=l,r.bezierCurveTo(h,l,e[n],e[n+1],e[n+2],e[n+3]),o.updateCurvePathMinMax(u,a,c,h,l,e[n],e[n+1],e[n+2],e[n+3],d),h=e[n+2],l=e[n+3],n+=4;break;case i.OPS.curveTo3:a=h,c=l,h=e[n+2],l=e[n+3],r.bezierCurveTo(e[n],e[n+1],h,l,h,l),o.updateCurvePathMinMax(u,a,c,e[n],e[n+1],h,l,h,l,d),n+=4;break;case i.OPS.closePath:r.closePath()}f&&o.updateScalingPathMinMax(u,d),o.setCurrentPoint(h,l)}closePath(){this.ctx.closePath()}stroke(t=!0){const e=this.ctx,s=this.current.strokeColor;e.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"==typeof s&&s?.getPattern?(e.save(),e.strokeStyle=s.getPattern(e,this,(0,n.getCurrentTransformInverse)(e),r.PathType.STROKE),this.rescaleAndStroke(!1),e.restore()):this.rescaleAndStroke(!0)),t&&this.consumePath(this.current.getClippedPathBoundingBox()),e.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(t=!0){const e=this.ctx,s=this.current.fillColor;let i=!1;this.current.patternFill&&(e.save(),e.fillStyle=s.getPattern(e,this,(0,n.getCurrentTransformInverse)(e),r.PathType.FILL),i=!0);const o=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==o&&(this.pendingEOFill?(e.fill("evenodd"),this.pendingEOFill=!1):e.fill()),i&&e.restore(),t&&this.consumePath(o)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=x}eoClip(){this.pendingClip=k}beginText(){this.current.textMatrix=i.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const t=this.pendingTextPaths,e=this.ctx;if(void 0!==t){e.save(),e.beginPath();for(const s of t)e.setTransform(...s.transform),e.translate(s.x,s.y),s.addToPath(e,s.fontSize);e.restore(),e.clip(),e.beginPath(),delete this.pendingTextPaths}else e.beginPath()}setCharSpacing(t){this.current.charSpacing=t}setWordSpacing(t){this.current.wordSpacing=t}setHScale(t){this.current.textHScale=t/100}setLeading(t){this.current.leading=-t}setFont(t,e){const s=this.commonObjs.get(t),n=this.current;if(!s)throw new Error(`Can't find font for ${t}`);if(n.fontMatrix=s.fontMatrix||i.FONT_IDENTITY_MATRIX,0!==n.fontMatrix[0]&&0!==n.fontMatrix[3]||(0,i.warn)("Invalid font matrix for font "+t),e<0?(e=-e,n.fontDirection=-1):n.fontDirection=1,this.current.font=s,this.current.fontSize=e,s.isType3Font)return;const r=s.loadedName||"sans-serif",o=s.systemFontInfo?.css||`"${r}", ${s.fallbackName}`;let a="normal";s.black?a="900":s.bold&&(a="bold");const c=s.italic?"italic":"normal";let h=e;e<16?h=16:e>100&&(h=100),this.current.fontSizeScale=e/h,this.ctx.font=`${c} ${a} ${h}px ${o}`}setTextRenderingMode(t){this.current.textRenderingMode=t}setTextRise(t){this.current.textRise=t}moveText(t,e){this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=e}setLeadingMoveText(t,e){this.setLeading(-e),this.moveText(t,e)}setTextMatrix(t,e,s,i,n,r){this.current.textMatrix=[t,e,s,i,n,r],this.current.textMatrixScale=Math.hypot(t,e),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(t,e,s,r){const o=this.ctx,a=this.current,c=a.font,h=a.textRenderingMode,l=a.fontSize/a.fontSizeScale,u=h&i.TextRenderingMode.FILL_STROKE_MASK,f=!!(h&i.TextRenderingMode.ADD_TO_PATH_FLAG),d=a.patternFill&&!c.missingFile;let p;(c.disableFontFace||f||d)&&(p=c.getPathGenerator(this.commonObjs,t)),c.disableFontFace||d?(o.save(),o.translate(e,s),o.beginPath(),p(o,l),r&&o.setTransform(...r),u!==i.TextRenderingMode.FILL&&u!==i.TextRenderingMode.FILL_STROKE||o.fill(),u!==i.TextRenderingMode.STROKE&&u!==i.TextRenderingMode.FILL_STROKE||o.stroke(),o.restore()):(u!==i.TextRenderingMode.FILL&&u!==i.TextRenderingMode.FILL_STROKE||o.fillText(t,e,s),u!==i.TextRenderingMode.STROKE&&u!==i.TextRenderingMode.FILL_STROKE||o.strokeText(t,e,s)),f&&(this.pendingTextPaths||=[]).push({transform:(0,n.getCurrentTransform)(o),x:e,y:s,fontSize:l,addToPath:p})}get isFontSubpixelAAEnabled(){const{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1),t.fillText("I",0,10);const e=t.getImageData(0,0,10,10).data;let s=!1;for(let t=3;t<e.length;t+=4)if(e[t]>0&&e[t]<255){s=!0;break}return(0,i.shadow)(this,"isFontSubpixelAAEnabled",s)}showText(t){const e=this.current,s=e.font;if(s.isType3Font)return this.showType3Text(t);const o=e.fontSize;if(0===o)return;const a=this.ctx,c=e.fontSizeScale,h=e.charSpacing,l=e.wordSpacing,u=e.fontDirection,f=e.textHScale*u,d=t.length,p=s.vertical,g=p?1:-1,m=s.defaultVMetrics,w=o*e.fontMatrix[0],b=e.textRenderingMode===i.TextRenderingMode.FILL&&!s.disableFontFace&&!e.patternFill;let y;if(a.save(),a.transform(...e.textMatrix),a.translate(e.x,e.y+e.textRise),a.scale(f,u>0?-1:1),e.patternFill){a.save();const t=e.fillColor.getPattern(a,this,(0,n.getCurrentTransformInverse)(a),r.PathType.FILL);y=(0,n.getCurrentTransform)(a),a.restore(),a.fillStyle=t}let A=e.lineWidth;const v=e.textMatrixScale;if(0===v||0===A){const t=e.textRenderingMode&i.TextRenderingMode.FILL_STROKE_MASK;t!==i.TextRenderingMode.STROKE&&t!==i.TextRenderingMode.FILL_STROKE||(A=this.getSinglePixelWidth())}else A/=v;if(1!==c&&(a.scale(c,c),A/=c),a.lineWidth=A,s.isInvalidPDFjsFont){const s=[];let i=0;for(const e of t)s.push(e.unicode),i+=e.width;return a.fillText(s.join(""),0,0),e.x+=i*w*f,a.restore(),void this.compose()}let x,k=0;for(x=0;x<d;++x){const e=t[x];if("number"==typeof e){k+=g*e*o/1e3;continue}let i=!1;const n=(e.isSpace?l:0)+h,r=e.fontChar,f=e.accent;let d,A,v=e.width;if(p){const t=e.vmetric||m,s=-(e.vmetric?t[1]:.5*v)*w;v=t?-t[0]:v,d=s/c,A=(k+t[2]*w)/c}else d=k/c,A=0;if(s.remeasure&&v>0){const t=1e3*a.measureText(r).width/o*c;if(v<t&&this.isFontSubpixelAAEnabled){const e=v/t;i=!0,a.save(),a.scale(e,1),d/=e}else v!==t&&(d+=(v-t)/2e3*o/c)}this.contentVisible&&(e.isInFont||s.missingFile)&&(b&&!f?a.fillText(r,d,A):(this.paintChar(r,d,A,y),f&&this.paintChar(f.fontChar,d+o*f.offset.x/c,A-o*f.offset.y/c,y))),k+=p?v*w-n*u:v*w+n*u,i&&a.restore()}p?e.y-=k:e.x+=k*f,a.restore(),this.compose()}showType3Text(t){const e=this.ctx,s=this.current,n=s.font,r=s.fontSize,o=s.fontDirection,a=n.vertical?1:-1,c=s.charSpacing,h=s.wordSpacing,l=s.textHScale*o,u=s.fontMatrix||i.FONT_IDENTITY_MATRIX,f=t.length;let d,p,g,m;if(s.textRenderingMode!==i.TextRenderingMode.INVISIBLE&&0!==r){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,e.save(),e.transform(...s.textMatrix),e.translate(s.x,s.y),e.scale(l,o),d=0;d<f;++d){if(p=t[d],"number"==typeof p){m=a*p*r/1e3,this.ctx.translate(m,0),s.x+=m*l;continue}const o=(p.isSpace?h:0)+c,f=n.charProcOperatorList[p.operatorListId];f?(this.contentVisible&&(this.processingType3=p,this.save(),e.scale(r,r),e.transform(...u),this.executeOperatorList(f),this.restore()),g=i.Util.applyTransform([p.width,0],u)[0]*r+o,e.translate(g,0),s.x+=g*l):(0,i.warn)(`Type3 character "${p.operatorListId}" is not available.`)}e.restore(),this.processingType3=null}}setCharWidth(t,e){}setCharWidthAndBounds(t,e,s,i,n,r){this.ctx.rect(s,i,n-s,r-i),this.ctx.clip(),this.endPath()}getColorN_Pattern(t){let e;if("TilingPattern"===t[0]){const s=t[1],i=this.baseTransform||(0,n.getCurrentTransform)(this.ctx);e=new r.TilingPattern(t,s,this.ctx,{createCanvasGraphics:t=>new S(t,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})},i)}else e=this._getPattern(t[1],t[2]);return e}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(t,e,s){const n=i.Util.makeHexColor(t,e,s);this.ctx.strokeStyle=n,this.current.strokeColor=n}setFillRGBColor(t,e,s){const n=i.Util.makeHexColor(t,e,s);this.ctx.fillStyle=n,this.current.fillColor=n,this.current.patternFill=!1}_getPattern(t,e=null){let s;return this.cachedPatterns.has(t)?s=this.cachedPatterns.get(t):(s=(0,r.getShadingPattern)(this.getObject(t)),this.cachedPatterns.set(t,s)),e&&(s.matrix=e),s}shadingFill(t){if(!this.contentVisible)return;const e=this.ctx;this.save();const s=this._getPattern(t);e.fillStyle=s.getPattern(e,this,(0,n.getCurrentTransformInverse)(e),r.PathType.SHADING);const o=(0,n.getCurrentTransformInverse)(e);if(o){const{width:t,height:s}=e.canvas,[n,r,a,c]=i.Util.getAxialAlignedBoundingBox([0,0,t,s],o);this.ctx.fillRect(n,r,a-n,c-r)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,i.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,i.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(t,e){this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(t)&&6===t.length&&this.transform(...t),this.baseTransform=(0,n.getCurrentTransform)(this.ctx),e)&&(this.ctx.rect(e[0],e[1],e[2]-e[0],e[3]-e[1]),this.current.updateRectMinMax((0,n.getCurrentTransform)(this.ctx),e),this.clip(),this.endPath())}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const e=this.ctx;t.isolated||(0,i.info)("TODO: Support non-isolated groups."),t.knockout&&(0,i.warn)("Knockout groups not supported.");const s=(0,n.getCurrentTransform)(e);if(t.matrix&&e.transform(...t.matrix),!t.bbox)throw new Error("Bounding box is required.");let r=i.Util.getAxialAlignedBoundingBox(t.bbox,(0,n.getCurrentTransform)(e));r=i.Util.intersect(r,[0,0,e.canvas.width,e.canvas.height])||[0,0,0,0];const o=Math.floor(r[0]),c=Math.floor(r[1]);let h=Math.max(Math.ceil(r[2])-o,1),l=Math.max(Math.ceil(r[3])-c,1),u=1,f=1;h>a&&(u=h/a,h=a),l>a&&(f=l/a,l=a),this.current.startNewPathAndClipBox([0,0,h,l]);let d="groupAt"+this.groupLevel;t.smask&&(d+="_smask_"+this.smaskCounter++%2);const g=this.cachedCanvases.getCanvas(d,h,l),m=g.context;m.scale(1/u,1/f),m.translate(-o,-c),m.transform(...s),t.smask?this.smaskStack.push({canvas:g.canvas,context:m,offsetX:o,offsetY:c,scaleX:u,scaleY:f,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null}):(e.setTransform(1,0,0,1,0,0),e.translate(o,c),e.scale(u,f),e.save()),p(e,m),this.ctx=m,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(e),this.groupLevel++}endGroup(t){if(!this.contentVisible)return;this.groupLevel--;const e=this.ctx,s=this.groupStack.pop();if(this.ctx=s,this.ctx.imageSmoothingEnabled=!1,t.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const t=(0,n.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...t);const s=i.Util.getAxialAlignedBoundingBox([0,0,e.canvas.width,e.canvas.height],t);this.ctx.drawImage(e.canvas,0,0),this.ctx.restore(),this.compose(s)}}beginAnnotation(t,e,s,r,o){if(this.#he(),g(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(e)&&4===e.length){const r=e[2]-e[0],a=e[3]-e[1];if(o&&this.annotationCanvasMap){(s=s.slice())[4]-=e[0],s[5]-=e[1],(e=e.slice())[0]=e[1]=0,e[2]=r,e[3]=a;const[o,c]=i.Util.singularValueDecompose2dScale((0,n.getCurrentTransform)(this.ctx)),{viewportScale:h}=this,l=Math.ceil(r*this.outputScaleX*h),u=Math.ceil(a*this.outputScaleY*h);this.annotationCanvas=this.canvasFactory.create(l,u);const{canvas:f,context:d}=this.annotationCanvas;this.annotationCanvasMap.set(t,f),this.annotationCanvas.savedCtx=this.ctx,this.ctx=d,this.ctx.save(),this.ctx.setTransform(o,0,0,-c,0,a*c),g(this.ctx)}else g(this.ctx),this.ctx.rect(e[0],e[1],r,a),this.ctx.clip(),this.endPath()}this.current=new u(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...s),this.transform(...r)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#le(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(t){if(!this.contentVisible)return;const e=t.count;(t=this.getObject(t.data,t)).count=e;const s=this.ctx,i=this.processingType3;if(i&&(void 0===i.compiled&&(i.compiled=function(t){const{width:e,height:s}=t;if(e>1e3||s>1e3)return null;const i=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),n=e+1;let r,o,a,c=new Uint8Array(n*(s+1));const h=e+7&-8;let l=new Uint8Array(h*s),u=0;for(const e of t.data){let t=128;for(;t>0;)l[u++]=e&t?0:255,t>>=1}let f=0;for(u=0,0!==l[u]&&(c[0]=1,++f),o=1;o<e;o++)l[u]!==l[u+1]&&(c[o]=l[u]?2:1,++f),u++;for(0!==l[u]&&(c[o]=2,++f),r=1;r<s;r++){u=r*h,a=r*n,l[u-h]!==l[u]&&(c[a]=l[u]?1:8,++f);let t=(l[u]?4:0)+(l[u-h]?8:0);for(o=1;o<e;o++)t=(t>>2)+(l[u+1]?4:0)+(l[u-h+1]?8:0),i[t]&&(c[a+o]=i[t],++f),u++;if(l[u-h]!==l[u]&&(c[a+o]=l[u]?2:4,++f),f>1e3)return null}for(u=h*(s-1),a=r*n,0!==l[u]&&(c[a]=8,++f),o=1;o<e;o++)l[u]!==l[u+1]&&(c[a+o]=l[u]?4:8,++f),u++;if(0!==l[u]&&(c[a+o]=4,++f),f>1e3)return null;const d=new Int32Array([0,n,-1,0,-n,0,0,0,1]),p=new Path2D;for(r=0;f&&r<=s;r++){let t=r*n;const s=t+e;for(;t<s&&!c[t];)t++;if(t===s)continue;p.moveTo(t%n,r);const i=t;let o=c[t];do{const e=d[o];do{t+=e}while(!c[t]);const s=c[t];5!==s&&10!==s?(o=s,c[t]=0):(o=s&51*o>>4,c[t]&=o>>2|o<<2),p.lineTo(t%n,t/n|0),c[t]||--f}while(i!==t);--r}return l=null,c=null,function(t){t.save(),t.scale(1/e,-1/s),t.translate(0,-s),t.fill(p),t.beginPath(),t.restore()}}(t)),i.compiled))return void i.compiled(s);const n=this._createMaskCanvas(t),r=n.canvas;s.save(),s.setTransform(1,0,0,1,0,0),s.drawImage(r,n.offsetX,n.offsetY),s.restore(),this.compose()}paintImageMaskXObjectRepeat(t,e,s=0,r=0,o,a){if(!this.contentVisible)return;t=this.getObject(t.data,t);const c=this.ctx;c.save();const h=(0,n.getCurrentTransform)(c);c.transform(e,s,r,o,0,0);const l=this._createMaskCanvas(t);c.setTransform(1,0,0,1,l.offsetX-h[4],l.offsetY-h[5]);for(let t=0,n=a.length;t<n;t+=2){const n=i.Util.transform(h,[e,s,r,o,a[t],a[t+1]]),[u,f]=i.Util.applyTransform([0,0],n);c.drawImage(l.canvas,u,f)}c.restore(),this.compose()}paintImageMaskXObjectGroup(t){if(!this.contentVisible)return;const e=this.ctx,s=this.current.fillColor,i=this.current.patternFill;for(const o of t){const{data:t,width:a,height:c,transform:h}=o,u=this.cachedCanvases.getCanvas("maskCanvas",a,c),f=u.context;f.save(),d(f,this.getObject(t,o)),f.globalCompositeOperation="source-in",f.fillStyle=i?s.getPattern(f,this,(0,n.getCurrentTransformInverse)(e),r.PathType.FILL):s,f.fillRect(0,0,a,c),f.restore(),e.save(),e.transform(...h),e.scale(1,-1),l(e,u.canvas,0,0,a,c,0,-1,1,1),e.restore()}this.compose()}paintImageXObject(t){if(!this.contentVisible)return;const e=this.getObject(t);e?this.paintInlineImageXObject(e):(0,i.warn)("Dependent image isn't ready yet")}paintImageXObjectRepeat(t,e,s,n){if(!this.contentVisible)return;const r=this.getObject(t);if(!r)return void(0,i.warn)("Dependent image isn't ready yet");const o=r.width,a=r.height,c=[];for(let t=0,i=n.length;t<i;t+=2)c.push({transform:[e,0,0,s,n[t],n[t+1]],x:0,y:0,w:o,h:a});this.paintInlineImageXObjectGroup(r,c)}applyTransferMapsToCanvas(t){return"none"!==this.current.transferMaps&&(t.filter=this.current.transferMaps,t.drawImage(t.canvas,0,0),t.filter="none"),t.canvas}applyTransferMapsToBitmap(t){if("none"===this.current.transferMaps)return t.bitmap;const{bitmap:e,width:s,height:i}=t,n=this.cachedCanvases.getCanvas("inlineImage",s,i),r=n.context;return r.filter=this.current.transferMaps,r.drawImage(e,0,0),r.filter="none",n.canvas}paintInlineImageXObject(t){if(!this.contentVisible)return;const e=t.width,s=t.height,r=this.ctx;if(this.save(),!i.isNodeJS){const{filter:t}=r;"none"!==t&&""!==t&&(r.filter="none")}let o;if(r.scale(1/e,-1/s),t.bitmap)o=this.applyTransferMapsToBitmap(t);else if("function"==typeof HTMLElement&&t instanceof HTMLElement||!t.data)o=t;else{const i=this.cachedCanvases.getCanvas("inlineImage",e,s).context;f(i,t),o=this.applyTransferMapsToCanvas(i)}const a=this._scaleImage(o,(0,n.getCurrentTransformInverse)(r));r.imageSmoothingEnabled=y((0,n.getCurrentTransform)(r),t.interpolate),l(r,a.img,0,0,a.paintWidth,a.paintHeight,0,-s,e,s),this.compose(),this.restore()}paintInlineImageXObjectGroup(t,e){if(!this.contentVisible)return;const s=this.ctx;let i;if(t.bitmap)i=t.bitmap;else{const e=this.cachedCanvases.getCanvas("inlineImage",t.width,t.height).context;f(e,t),i=this.applyTransferMapsToCanvas(e)}for(const t of e)s.save(),s.transform(...t.transform),s.scale(1,-1),l(s,i,t.x,t.y,t.w,t.h,0,-1,1,1),s.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(t){}markPointProps(t,e){}beginMarkedContent(t){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(t,e){this.markedContentStack.push("OC"===t?{visible:this.optionalContentConfig.isVisible(e)}:{visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(t){const e=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(t);const s=this.ctx;this.pendingClip&&(e||(this.pendingClip===k?s.clip("evenodd"):s.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),s.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const t=(0,n.getCurrentTransform)(this.ctx);if(0===t[1]&&0===t[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(t[0]),Math.abs(t[3]));else{const e=Math.abs(t[0]*t[3]-t[2]*t[1]),s=Math.hypot(t[0],t[2]),i=Math.hypot(t[1],t[3]);this._cachedGetSinglePixelWidth=Math.max(s,i)/e}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(-1===this._cachedScaleForStroking[0]){const{lineWidth:t}=this.current,{a:e,b:s,c:i,d:n}=this.ctx.getTransform();let r,o;if(0===s&&0===i){const s=Math.abs(e),i=Math.abs(n);if(s===i)if(0===t)r=o=1/s;else{const e=s*t;r=o=e<1?1/e:1}else if(0===t)r=1/s,o=1/i;else{const e=s*t,n=i*t;r=e<1?1/e:1,o=n<1?1/n:1}}else{const a=Math.abs(e*n-s*i),c=Math.hypot(e,s),h=Math.hypot(i,n);if(0===t)r=h/a,o=c/a;else{const e=t*a;r=h>e?h/e:1,o=c>e?c/e:1}}this._cachedScaleForStroking[0]=r,this._cachedScaleForStroking[1]=o}return this._cachedScaleForStroking}rescaleAndStroke(t){const{ctx:e}=this,{lineWidth:s}=this.current,[i,n]=this.getScaleForStroking();if(e.lineWidth=s||1,1===i&&1===n)return void e.stroke();const r=e.getLineDash();if(t&&e.save(),e.scale(i,n),r.length>0){const t=Math.max(i,n);e.setLineDash(r.map((e=>e/t))),e.lineDashOffset/=t}e.stroke(),t&&e.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}e.CanvasGraphics=S;for(const t in i.OPS)void 0!==S.prototype[t]&&(S.prototype[i.OPS[t]]=S.prototype[t])},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TilingPattern=e.PathType=void 0,e.getShadingPattern=function(t){switch(t[0]){case"RadialAxial":return new c(t);case"Mesh":return new u(t);case"Dummy":return new f}throw new Error(`Unknown IR type: ${t[0]}`)};var i=s(1),n=s(6);const r={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function o(t,e){if(!e)return;const s=e[2]-e[0],i=e[3]-e[1],n=new Path2D;n.rect(e[0],e[1],s,i),t.clip(n)}e.PathType=r;class a{constructor(){this.constructor===a&&(0,i.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,i.unreachable)("Abstract method `getPattern` called.")}}class c extends a{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}_createGradient(t){let e;"axial"===this._type?e=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(e=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const t of this._colorStops)e.addColorStop(t[0],t[1]);return e}getPattern(t,e,s,a){let c;if(a===r.STROKE||a===r.FILL){const r=e.current.getClippedPathBoundingBox(a,(0,n.getCurrentTransform)(t))||[0,0,0,0],h=Math.ceil(r[2]-r[0])||1,l=Math.ceil(r[3]-r[1])||1,u=e.cachedCanvases.getCanvas("pattern",h,l,!0),f=u.context;f.clearRect(0,0,f.canvas.width,f.canvas.height),f.beginPath(),f.rect(0,0,f.canvas.width,f.canvas.height),f.translate(-r[0],-r[1]),s=i.Util.transform(s,[1,0,0,1,r[0],r[1]]),f.transform(...e.baseTransform),this.matrix&&f.transform(...this.matrix),o(f,this._bbox),f.fillStyle=this._createGradient(f),f.fill(),c=t.createPattern(u.canvas,"no-repeat");const d=new DOMMatrix(s);c.setTransform(d)}else o(t,this._bbox),c=this._createGradient(t);return c}}function h(t,e,s,i,n,r,o,a){const c=e.coords,h=e.colors,l=t.data,u=4*t.width;let f;c[s+1]>c[i+1]&&(f=s,s=i,i=f,f=r,r=o,o=f),c[i+1]>c[n+1]&&(f=i,i=n,n=f,f=o,o=a,a=f),c[s+1]>c[i+1]&&(f=s,s=i,i=f,f=r,r=o,o=f);const d=(c[s]+e.offsetX)*e.scaleX,p=(c[s+1]+e.offsetY)*e.scaleY,g=(c[i]+e.offsetX)*e.scaleX,m=(c[i+1]+e.offsetY)*e.scaleY,w=(c[n]+e.offsetX)*e.scaleX,b=(c[n+1]+e.offsetY)*e.scaleY;if(p>=b)return;const y=h[r],A=h[r+1],v=h[r+2],x=h[o],k=h[o+1],S=h[o+2],M=h[a],C=h[a+1],_=h[a+2],I=Math.round(p),F=Math.round(b);let O,E,T,D,P,R,N,L;for(let t=I;t<=F;t++){if(t<m){const e=t<p?0:(p-t)/(p-m);O=d-(d-g)*e,E=y-(y-x)*e,T=A-(A-k)*e,D=v-(v-S)*e}else{let e;e=t>b?1:m===b?0:(m-t)/(m-b),O=g-(g-w)*e,E=x-(x-M)*e,T=k-(k-C)*e,D=S-(S-_)*e}let e;e=t<p?0:t>b?1:(p-t)/(p-b),P=d-(d-w)*e,R=y-(y-M)*e,N=A-(A-C)*e,L=v-(v-_)*e;const s=Math.round(Math.min(O,P)),i=Math.round(Math.max(O,P));let n=u*t+4*s;for(let t=s;t<=i;t++)e=(O-t)/(O-P),e<0?e=0:e>1&&(e=1),l[n++]=E-(E-R)*e|0,l[n++]=T-(T-N)*e|0,l[n++]=D-(D-L)*e|0,l[n++]=255}}function l(t,e,s){const i=e.coords,n=e.colors;let r,o;switch(e.type){case"lattice":const a=e.verticesPerRow,c=Math.floor(i.length/a)-1,l=a-1;for(r=0;r<c;r++){let e=r*a;for(let r=0;r<l;r++,e++)h(t,s,i[e],i[e+1],i[e+a],n[e],n[e+1],n[e+a]),h(t,s,i[e+a+1],i[e+1],i[e+a],n[e+a+1],n[e+1],n[e+a])}break;case"triangles":for(r=0,o=i.length;r<o;r+=3)h(t,s,i[r],i[r+1],i[r+2],n[r],n[r+1],n[r+2]);break;default:throw new Error("illegal figure")}}class u extends a{constructor(t){super(),this._coords=t[2],this._colors=t[3],this._figures=t[4],this._bounds=t[5],this._bbox=t[7],this._background=t[8],this.matrix=null}_createMeshCanvas(t,e,s){const i=Math.floor(this._bounds[0]),n=Math.floor(this._bounds[1]),r=Math.ceil(this._bounds[2])-i,o=Math.ceil(this._bounds[3])-n,a=Math.min(Math.ceil(Math.abs(r*t[0]*1.1)),3e3),c=Math.min(Math.ceil(Math.abs(o*t[1]*1.1)),3e3),h=r/a,u=o/c,f={coords:this._coords,colors:this._colors,offsetX:-i,offsetY:-n,scaleX:1/h,scaleY:1/u},d=s.getCanvas("mesh",a+4,c+4,!1),p=d.context,g=p.createImageData(a,c);if(e){const t=g.data;for(let s=0,i=t.length;s<i;s+=4)t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2],t[s+3]=255}for(const t of this._figures)l(g,t,f);return p.putImageData(g,2,2),{canvas:d.canvas,offsetX:i-2*h,offsetY:n-2*u,scaleX:h,scaleY:u}}getPattern(t,e,s,a){let c;if(o(t,this._bbox),a===r.SHADING)c=i.Util.singularValueDecompose2dScale((0,n.getCurrentTransform)(t));else if(c=i.Util.singularValueDecompose2dScale(e.baseTransform),this.matrix){const t=i.Util.singularValueDecompose2dScale(this.matrix);c=[c[0]*t[0],c[1]*t[1]]}const h=this._createMeshCanvas(c,a===r.SHADING?null:this._background,e.cachedCanvases);return a!==r.SHADING&&(t.setTransform(...e.baseTransform),this.matrix&&t.transform(...this.matrix)),t.translate(h.offsetX,h.offsetY),t.scale(h.scaleX,h.scaleY),t.createPattern(h.canvas,"no-repeat")}}class f extends a{getPattern(){return"hotpink"}}class d{static MAX_PATTERN_SIZE=3e3;constructor(t,e,s,i,n){this.operatorList=t[2],this.matrix=t[3]||[1,0,0,1,0,0],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.color=e,this.ctx=s,this.canvasGraphicsFactory=i,this.baseTransform=n}createPatternCanvas(t){const e=this.operatorList,s=this.bbox,r=this.xstep,o=this.ystep,a=this.paintType,c=this.color,h=this.canvasGraphicsFactory;(0,i.info)("TilingType: "+this.tilingType);const l=s[0],u=s[1],f=s[2],d=s[3],p=i.Util.singularValueDecompose2dScale(this.matrix),g=i.Util.singularValueDecompose2dScale(this.baseTransform),m=[p[0]*g[0],p[1]*g[1]],w=this.getSizeAndScale(r,this.ctx.canvas.width,m[0]),b=this.getSizeAndScale(o,this.ctx.canvas.height,m[1]),y=t.cachedCanvases.getCanvas("pattern",w.size,b.size,!0),A=y.context,v=h.createCanvasGraphics(A);v.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(v,a,c);let x=l,k=u,S=f,M=d;return l<0&&(x=0,S+=Math.abs(l)),u<0&&(k=0,M+=Math.abs(u)),A.translate(-w.scale*x,-b.scale*k),v.transform(w.scale,0,0,b.scale,0,0),A.save(),this.clipBbox(v,x,k,S,M),v.baseTransform=(0,n.getCurrentTransform)(v.ctx),v.executeOperatorList(e),v.endDrawing(),{canvas:y.canvas,scaleX:w.scale,scaleY:b.scale,offsetX:x,offsetY:k}}getSizeAndScale(t,e,s){t=Math.abs(t);const i=Math.max(d.MAX_PATTERN_SIZE,e);let n=Math.ceil(t*s);return n>=i?n=i:s=n/t,{scale:s,size:n}}clipBbox(t,e,s,i,r){t.ctx.rect(e,s,i-e,r-s),t.current.updateRectMinMax((0,n.getCurrentTransform)(t.ctx),[e,s,i,r]),t.clip(),t.endPath()}setFillAndStrokeStyleToContext(t,e,s){const n=t.ctx,r=t.current;switch(e){case 1:const t=this.ctx;n.fillStyle=t.fillStyle,n.strokeStyle=t.strokeStyle,r.fillColor=t.fillStyle,r.strokeColor=t.strokeStyle;break;case 2:const o=i.Util.makeHexColor(s[0],s[1],s[2]);n.fillStyle=o,n.strokeStyle=o,r.fillColor=o,r.strokeColor=o;break;default:throw new i.FormatError(`Unsupported paint type: ${e}`)}}getPattern(t,e,s,n){let o=s;n!==r.SHADING&&(o=i.Util.transform(o,e.baseTransform),this.matrix&&(o=i.Util.transform(o,this.matrix)));const a=this.createPatternCanvas(e);let c=new DOMMatrix(o);c=c.translate(a.offsetX,a.offsetY),c=c.scale(1/a.scaleX,1/a.scaleY);const h=t.createPattern(a.canvas,"repeat");return h.setTransform(c),h}}e.TilingPattern=d},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.convertBlackAndWhiteToRGBA=n,e.convertToRGBA=function(t){switch(t.kind){case i.ImageKind.GRAYSCALE_1BPP:return n(t);case i.ImageKind.RGB_24BPP:return function({src:t,srcPos:e=0,dest:s,destPos:n=0}){let r=0;const o=t.length>>2,a=new Uint32Array(t.buffer,e,o);if(i.FeatureTest.isLittleEndian){for(;r<o-2;r+=3,n+=4){const t=a[r],e=a[r+1],i=a[r+2];s[n]=4278190080|t,s[n+1]=t>>>24|e<<8|4278190080,s[n+2]=e>>>16|i<<16|4278190080,s[n+3]=i>>>8|4278190080}for(let e=4*r,i=t.length;e<i;e+=3)s[n++]=t[e]|t[e+1]<<8|t[e+2]<<16|4278190080}else{for(;r<o-2;r+=3,n+=4){const t=a[r],e=a[r+1],i=a[r+2];s[n]=255|t,s[n+1]=t<<24|e>>>8|255,s[n+2]=e<<16|i>>>16|255,s[n+3]=i<<8|255}for(let e=4*r,i=t.length;e<i;e+=3)s[n++]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|255}return{srcPos:e,destPos:n}}(t)}return null},e.grayToRGBA=function(t,e){if(i.FeatureTest.isLittleEndian)for(let s=0,i=t.length;s<i;s++)e[s]=65793*t[s]|4278190080;else for(let s=0,i=t.length;s<i;s++)e[s]=16843008*t[s]|255};var i=s(1);function n({src:t,srcPos:e=0,dest:s,width:n,height:r,nonBlackColor:o=4294967295,inverseDecode:a=!1}){const c=i.FeatureTest.isLittleEndian?4278190080:255,[h,l]=a?[o,c]:[c,o],u=n>>3,f=7&n,d=t.length;s=new Uint32Array(s.buffer);let p=0;for(let i=0;i<r;i++){for(const i=e+u;e<i;e++){const i=e<d?t[e]:255;s[p++]=128&i?l:h,s[p++]=64&i?l:h,s[p++]=32&i?l:h,s[p++]=16&i?l:h,s[p++]=8&i?l:h,s[p++]=4&i?l:h,s[p++]=2&i?l:h,s[p++]=1&i?l:h}if(0===f)continue;const i=e<d?t[e++]:255;for(let t=0;t<f;t++)s[p++]=i&1<<7-t?l:h}return{srcPos:e,destPos:p}}},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalWorkerOptions=void 0;const s=Object.create(null);e.GlobalWorkerOptions=s,s.workerPort=null,s.workerSrc=""},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MessageHandler=void 0;var i=s(1);function n(t){switch(t instanceof Error||"object"==typeof t&&null!==t||(0,i.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),t.name){case"AbortException":return new i.AbortException(t.message);case"MissingPDFException":return new i.MissingPDFException(t.message);case"PasswordException":return new i.PasswordException(t.message,t.code);case"UnexpectedResponseException":return new i.UnexpectedResponseException(t.message,t.status);case"UnknownErrorException":return new i.UnknownErrorException(t.message,t.details);default:return new i.UnknownErrorException(t.message,t.toString())}}e.MessageHandler=class{constructor(t,e,s){this.sourceName=t,this.targetName=e,this.comObj=s,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=t=>{const e=t.data;if(e.targetName!==this.sourceName)return;if(e.stream)return void this.#ue(e);if(e.callback){const t=e.callbackId,s=this.callbackCapabilities[t];if(!s)throw new Error(`Cannot resolve callback ${t}`);if(delete this.callbackCapabilities[t],1===e.callback)s.resolve(e.data);else{if(2!==e.callback)throw new Error("Unexpected callback case");s.reject(n(e.reason))}return}const i=this.actionHandler[e.action];if(!i)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){const t=this.sourceName,r=e.sourceName;new Promise((function(t){t(i(e.data))})).then((function(i){s.postMessage({sourceName:t,targetName:r,callback:1,callbackId:e.callbackId,data:i})}),(function(i){s.postMessage({sourceName:t,targetName:r,callback:2,callbackId:e.callbackId,reason:n(i)})}))}else e.streamId?this.#fe(e):i(e.data)},s.addEventListener("message",this._onComObjOnMessage)}on(t,e){const s=this.actionHandler;if(s[t])throw new Error(`There is already an actionName called "${t}"`);s[t]=e}send(t,e,s){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},s)}sendWithPromise(t,e,s){const n=this.callbackId++,r=new i.PromiseCapability;this.callbackCapabilities[n]=r;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:n,data:e},s)}catch(t){r.reject(t)}return r.promise}sendWithStream(t,e,s,r){const o=this.streamId++,a=this.sourceName,c=this.targetName,h=this.comObj;return new ReadableStream({start:s=>{const n=new i.PromiseCapability;return this.streamControllers[o]={controller:s,startCall:n,pullCall:null,cancelCall:null,isClosed:!1},h.postMessage({sourceName:a,targetName:c,action:t,streamId:o,data:e,desiredSize:s.desiredSize},r),n.promise},pull:t=>{const e=new i.PromiseCapability;return this.streamControllers[o].pullCall=e,h.postMessage({sourceName:a,targetName:c,stream:6,streamId:o,desiredSize:t.desiredSize}),e.promise},cancel:t=>{(0,i.assert)(t instanceof Error,"cancel must have a valid reason");const e=new i.PromiseCapability;return this.streamControllers[o].cancelCall=e,this.streamControllers[o].isClosed=!0,h.postMessage({sourceName:a,targetName:c,stream:1,streamId:o,reason:n(t)}),e.promise}},s)}#fe(t){const e=t.streamId,s=this.sourceName,r=t.sourceName,o=this.comObj,a=this,c=this.actionHandler[t.action],h={enqueue(t,n=1,a){if(this.isCancelled)return;const c=this.desiredSize;this.desiredSize-=n,c>0&&this.desiredSize<=0&&(this.sinkCapability=new i.PromiseCapability,this.ready=this.sinkCapability.promise),o.postMessage({sourceName:s,targetName:r,stream:4,streamId:e,chunk:t},a)},close(){this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:s,targetName:r,stream:3,streamId:e}),delete a.streamSinks[e])},error(t){(0,i.assert)(t instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:s,targetName:r,stream:5,streamId:e,reason:n(t)}))},sinkCapability:new i.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};h.sinkCapability.resolve(),h.ready=h.sinkCapability.promise,this.streamSinks[e]=h,new Promise((function(e){e(c(t.data,h))})).then((function(){o.postMessage({sourceName:s,targetName:r,stream:8,streamId:e,success:!0})}),(function(t){o.postMessage({sourceName:s,targetName:r,stream:8,streamId:e,reason:n(t)})}))}#ue(t){const e=t.streamId,s=this.sourceName,r=t.sourceName,o=this.comObj,a=this.streamControllers[e],c=this.streamSinks[e];switch(t.stream){case 8:t.success?a.startCall.resolve():a.startCall.reject(n(t.reason));break;case 7:t.success?a.pullCall.resolve():a.pullCall.reject(n(t.reason));break;case 6:if(!c){o.postMessage({sourceName:s,targetName:r,stream:7,streamId:e,success:!0});break}c.desiredSize<=0&&t.desiredSize>0&&c.sinkCapability.resolve(),c.desiredSize=t.desiredSize,new Promise((function(t){t(c.onPull?.())})).then((function(){o.postMessage({sourceName:s,targetName:r,stream:7,streamId:e,success:!0})}),(function(t){o.postMessage({sourceName:s,targetName:r,stream:7,streamId:e,reason:n(t)})}));break;case 4:if((0,i.assert)(a,"enqueue should have stream controller"),a.isClosed)break;a.controller.enqueue(t.chunk);break;case 3:if((0,i.assert)(a,"close should have stream controller"),a.isClosed)break;a.isClosed=!0,a.controller.close(),this.#de(a,e);break;case 5:(0,i.assert)(a,"error should have stream controller"),a.controller.error(n(t.reason)),this.#de(a,e);break;case 2:t.success?a.cancelCall.resolve():a.cancelCall.reject(n(t.reason)),this.#de(a,e);break;case 1:if(!c)break;new Promise((function(e){e(c.onCancel?.(n(t.reason)))})).then((function(){o.postMessage({sourceName:s,targetName:r,stream:2,streamId:e,success:!0})}),(function(t){o.postMessage({sourceName:s,targetName:r,stream:2,streamId:e,reason:n(t)})})),c.sinkCapability.reject(n(t.reason)),c.isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}}async#de(t,e){await Promise.allSettled([t.startCall?.promise,t.pullCall?.promise,t.cancelCall?.promise]),delete this.streamControllers[e]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Metadata=void 0;var i=s(1);e.Metadata=class{#pe;#ge;constructor({parsedData:t,rawData:e}){this.#pe=t,this.#ge=e}getRaw(){return this.#ge}get(t){return this.#pe.get(t)??null}getAll(){return(0,i.objectFromMap)(this.#pe)}has(t){return this.#pe.has(t)}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.OptionalContentConfig=void 0;var i=s(1),n=s(8);const r=Symbol("INTERNAL");class o{#me=!0;constructor(t,e){this.name=t,this.intent=e}get visible(){return this.#me}_setVisible(t,e){t!==r&&(0,i.unreachable)("Internal method `_setVisible` called."),this.#me=e}}e.OptionalContentConfig=class{#we=null;#be=new Map;#ye=null;#Ae=null;constructor(t){if(this.name=null,this.creator=null,null!==t){this.name=t.name,this.creator=t.creator,this.#Ae=t.order;for(const e of t.groups)this.#be.set(e.id,new o(e.name,e.intent));if("OFF"===t.baseState)for(const t of this.#be.values())t._setVisible(r,!1);for(const e of t.on)this.#be.get(e)._setVisible(r,!0);for(const e of t.off)this.#be.get(e)._setVisible(r,!1);this.#ye=this.getHash()}}#ve(t){const e=t.length;if(e<2)return!0;const s=t[0];for(let n=1;n<e;n++){const e=t[n];let r;if(Array.isArray(e))r=this.#ve(e);else{if(!this.#be.has(e))return(0,i.warn)(`Optional content group not found: ${e}`),!0;r=this.#be.get(e).visible}switch(s){case"And":if(!r)return!1;break;case"Or":if(r)return!0;break;case"Not":return!r;default:return!0}}return"And"===s}isVisible(t){if(0===this.#be.size)return!0;if(!t)return(0,i.warn)("Optional content group not defined."),!0;if("OCG"===t.type)return this.#be.has(t.id)?this.#be.get(t.id).visible:((0,i.warn)(`Optional content group not found: ${t.id}`),!0);if("OCMD"===t.type){if(t.expression)return this.#ve(t.expression);if(!t.policy||"AnyOn"===t.policy){for(const e of t.ids){if(!this.#be.has(e))return(0,i.warn)(`Optional content group not found: ${e}`),!0;if(this.#be.get(e).visible)return!0}return!1}if("AllOn"===t.policy){for(const e of t.ids){if(!this.#be.has(e))return(0,i.warn)(`Optional content group not found: ${e}`),!0;if(!this.#be.get(e).visible)return!1}return!0}if("AnyOff"===t.policy){for(const e of t.ids){if(!this.#be.has(e))return(0,i.warn)(`Optional content group not found: ${e}`),!0;if(!this.#be.get(e).visible)return!0}return!1}if("AllOff"===t.policy){for(const e of t.ids){if(!this.#be.has(e))return(0,i.warn)(`Optional content group not found: ${e}`),!0;if(this.#be.get(e).visible)return!1}return!0}return(0,i.warn)(`Unknown optional content policy ${t.policy}.`),!0}return(0,i.warn)(`Unknown group type ${t.type}.`),!0}setVisibility(t,e=!0){this.#be.has(t)?(this.#be.get(t)._setVisible(r,!!e),this.#we=null):(0,i.warn)(`Optional content group not found: ${t}`)}get hasInitialVisibility(){return null===this.#ye||this.getHash()===this.#ye}getOrder(){return this.#be.size?this.#Ae?this.#Ae.slice():[...this.#be.keys()]:null}getGroups(){return this.#be.size>0?(0,i.objectFromMap)(this.#be):null}getGroup(t){return this.#be.get(t)||null}getHash(){if(null!==this.#we)return this.#we;const t=new n.MurmurHash3_64;for(const[e,s]of this.#be)t.update(`${e}:${s.visible}`);return this.#we=t.hexdigest()}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFDataTransportStream=void 0;var i=s(1),n=s(6);e.PDFDataTransportStream=class{constructor({length:t,initialData:e,progressiveDone:s=!1,contentDispositionFilename:n=null,disableRange:r=!1,disableStream:o=!1},a){if((0,i.assert)(a,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=s,this._contentDispositionFilename=n,e?.length>0){const t=e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer;this._queuedChunks.push(t)}this._pdfDataRangeTransport=a,this._isStreamingSupported=!o,this._isRangeSupported=!r,this._contentLength=t,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(((t,e)=>{this._onReceiveData({begin:t,chunk:e})})),this._pdfDataRangeTransport.addProgressListener(((t,e)=>{this._onProgress({loaded:t,total:e})})),this._pdfDataRangeTransport.addProgressiveReadListener((t=>{this._onReceiveData({chunk:t})})),this._pdfDataRangeTransport.addProgressiveDoneListener((()=>{this._onProgressiveDone()})),this._pdfDataRangeTransport.transportReady()}_onReceiveData({begin:t,chunk:e}){const s=e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer;if(void 0===t)this._fullRequestReader?this._fullRequestReader._enqueue(s):this._queuedChunks.push(s);else{const e=this._rangeReaders.some((function(e){return e._begin===t&&(e._enqueue(s),!0)}));(0,i.assert)(e,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(t){void 0===t.total?this._rangeReaders[0]?.onProgress?.({loaded:t.loaded}):this._fullRequestReader?.onProgress?.({loaded:t.loaded,total:t.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){const e=this._rangeReaders.indexOf(t);e>=0&&this._rangeReaders.splice(e,1)}getFullReader(){(0,i.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const t=this._queuedChunks;return this._queuedChunks=null,new r(this,t,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const s=new o(this,t,e);return this._pdfDataRangeTransport.requestDataRange(t,e),this._rangeReaders.push(s),s}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeReaders.slice(0))e.cancel(t);this._pdfDataRangeTransport.abort()}};class r{constructor(t,e,s=!1,i=null){this._stream=t,this._done=s||!1,this._filename=(0,n.isPdfFile)(i)?i:null,this._queuedChunks=e||[],this._loaded=0;for(const t of this._queuedChunks)this._loaded+=t.byteLength;this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=new i.PromiseCapability;return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class o{constructor(t,e,s){this._stream=t,this._begin=e,this._end=s,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(t){if(!this._done){if(0===this._requests.length)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const t=new i.PromiseCapability;return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFFetchStream=void 0;var i=s(1),n=s(20);function r(t,e,s){return{method:"GET",headers:t,signal:s.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"}}function o(t){const e=new Headers;for(const s in t){const i=t[s];void 0!==i&&e.append(s,i)}return e}function a(t){return t instanceof Uint8Array?t.buffer:t instanceof ArrayBuffer?t:((0,i.warn)(`getArrayBuffer - unexpected data format: ${t}`),new Uint8Array(t).buffer)}e.PDFFetchStream=class{constructor(t){this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,i.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new c(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const s=new h(this,t,e);return this._rangeRequestReaders.push(s),s}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeRequestReaders.slice(0))e.cancel(t)}};class c{constructor(t){this._stream=t,this._reader=null,this._loaded=0,this._filename=null;const e=t.source;this._withCredentials=e.withCredentials||!1,this._contentLength=e.length,this._headersCapability=new i.PromiseCapability,this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._headers=o(this._stream.httpHeaders);const s=e.url;fetch(s,r(this._headers,this._withCredentials,this._abortController)).then((t=>{if(!(0,n.validateResponseStatus)(t.status))throw(0,n.createResponseStatusError)(t.status,s);this._reader=t.body.getReader(),this._headersCapability.resolve();const e=e=>t.headers.get(e),{allowRangeRequests:r,suggestedLength:o}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:e,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=r,this._contentLength=o||this._contentLength,this._filename=(0,n.extractFilenameFromHeader)(e),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new i.AbortException("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:a(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}class h{constructor(t,e,s){this._stream=t,this._reader=null,this._loaded=0;const a=t.source;this._withCredentials=a.withCredentials||!1,this._readCapability=new i.PromiseCapability,this._isStreamingSupported=!a.disableStream,this._abortController=new AbortController,this._headers=o(this._stream.httpHeaders),this._headers.append("Range",`bytes=${e}-${s-1}`);const c=a.url;fetch(c,r(this._headers,this._withCredentials,this._abortController)).then((t=>{if(!(0,n.validateResponseStatus)(t.status))throw(0,n.createResponseStatusError)(t.status,c);this._readCapability.resolve(),this._reader=t.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded}),{value:a(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createResponseStatusError=function(t,e){return 404===t||0===t&&e.startsWith("file:")?new i.MissingPDFException('Missing PDF "'+e+'".'):new i.UnexpectedResponseException(`Unexpected server response (${t}) while retrieving PDF "${e}".`,t)},e.extractFilenameFromHeader=function(t){const e=t("Content-Disposition");if(e){let t=(0,n.getFilenameFromContentDispositionHeader)(e);if(t.includes("%"))try{t=decodeURIComponent(t)}catch{}if((0,r.isPdfFile)(t))return t}return null},e.validateRangeRequestCapabilities=function({getResponseHeader:t,isHttp:e,rangeChunkSize:s,disableRange:i}){const n={allowRangeRequests:!1,suggestedLength:void 0},r=parseInt(t("Content-Length"),10);return Number.isInteger(r)?(n.suggestedLength=r,r<=2*s||i||!e||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(n.allowRangeRequests=!0),n):n},e.validateResponseStatus=function(t){return 200===t||206===t};var i=s(1),n=s(21),r=s(6)},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getFilenameFromContentDispositionHeader=function(t){let e=!0,s=n("filename\\*","i").exec(t);if(s){s=s[1];let t=a(s);return t=unescape(t),t=c(t),t=h(t),o(t)}if(s=function(t){const e=[];let s;const i=n("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(s=i.exec(t));){let[,t,i,n]=s;if(t=parseInt(t,10),t in e){if(0===t)break}else e[t]=[i,n]}const r=[];for(let t=0;t<e.length&&t in e;++t){let[s,i]=e[t];i=a(i),s&&(i=unescape(i),0===t&&(i=c(i))),r.push(i)}return r.join("")}(t),s)return o(h(s));if(s=n("filename","i").exec(t),s){s=s[1];let t=a(s);return t=h(t),o(t)}function n(t,e){return new RegExp("(?:^|;)\\s*"+t+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',e)}function r(t,s){if(t){if(!/^[\x00-\xFF]+$/.test(s))return s;try{const n=new TextDecoder(t,{fatal:!0}),r=(0,i.stringToBytes)(s);s=n.decode(r),e=!1}catch{}}return s}function o(t){return e&&/[\x80-\xff]/.test(t)&&(t=r("utf-8",t),e&&(t=r("iso-8859-1",t))),t}function a(t){if(t.startsWith('"')){const e=t.slice(1).split('\\"');for(let t=0;t<e.length;++t){const s=e[t].indexOf('"');-1!==s&&(e[t]=e[t].slice(0,s),e.length=t+1),e[t]=e[t].replaceAll(/\\(.)/g,"$1")}t=e.join('"')}return t}function c(t){const e=t.indexOf("'");return-1===e?t:r(t.slice(0,e),t.slice(e+1).replace(/^[^']*'/,""))}function h(t){return!t.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(t)?t:t.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(t,e,s,i){if("q"===s||"Q"===s)return r(e,i=(i=i.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,(function(t,e){return String.fromCharCode(parseInt(e,16))})));try{i=atob(i)}catch{}return r(e,i)}))}return""};var i=s(1)},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFNetworkStream=void 0;var i=s(1),n=s(20);class r{constructor(t,e={}){this.url=t,this.isHttp=/^https?:/i.test(t),this.httpHeaders=this.isHttp&&e.httpHeaders||Object.create(null),this.withCredentials=e.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(t,e,s){const i={begin:t,end:e};for(const t in s)i[t]=s[t];return this.request(i)}requestFull(t){return this.request(t)}request(t){const e=new XMLHttpRequest,s=this.currXhrId++,i=this.pendingRequests[s]={xhr:e};e.open("GET",this.url),e.withCredentials=this.withCredentials;for(const t in this.httpHeaders){const s=this.httpHeaders[t];void 0!==s&&e.setRequestHeader(t,s)}return this.isHttp&&"begin"in t&&"end"in t?(e.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),i.expectedStatus=206):i.expectedStatus=200,e.responseType="arraybuffer",t.onError&&(e.onerror=function(){t.onError(e.status)}),e.onreadystatechange=this.onStateChange.bind(this,s),e.onprogress=this.onProgress.bind(this,s),i.onHeadersReceived=t.onHeadersReceived,i.onDone=t.onDone,i.onError=t.onError,i.onProgress=t.onProgress,e.send(null),s}onProgress(t,e){const s=this.pendingRequests[t];s&&s.onProgress?.(e)}onStateChange(t,e){const s=this.pendingRequests[t];if(!s)return;const n=s.xhr;if(n.readyState>=2&&s.onHeadersReceived&&(s.onHeadersReceived(),delete s.onHeadersReceived),4!==n.readyState)return;if(!(t in this.pendingRequests))return;if(delete this.pendingRequests[t],0===n.status&&this.isHttp)return void s.onError?.(n.status);const r=n.status||200;if((200!==r||206!==s.expectedStatus)&&r!==s.expectedStatus)return void s.onError?.(n.status);const o=function(t){const e=t.response;return"string"!=typeof e?e:(0,i.stringToBytes)(e).buffer}(n);if(206===r){const t=n.getResponseHeader("Content-Range"),e=/bytes (\d+)-(\d+)\/(\d+)/.exec(t);s.onDone({begin:parseInt(e[1],10),chunk:o})}else o?s.onDone({begin:0,chunk:o}):s.onError?.(n.status)}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){const e=this.pendingRequests[t].xhr;delete this.pendingRequests[t],e.abort()}}e.PDFNetworkStream=class{constructor(t){this._source=t,this._manager=new r(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const e=this._rangeRequestReaders.indexOf(t);e>=0&&this._rangeRequestReaders.splice(e,1)}getFullReader(){return(0,i.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new o(this._manager,this._source),this._fullRequestReader}getRangeReader(t,e){const s=new a(this._manager,t,e);return s.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(s),s}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeRequestReaders.slice(0))e.cancel(t)}};class o{constructor(t,e){this._manager=t;const s={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._fullRequestId=t.requestFull(s),this._headersReceivedCapability=new i.PromiseCapability,this._disableRange=e.disableRange||!1,this._contentLength=e.length,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const t=this._fullRequestId,e=this._manager.getRequestXhr(t),s=t=>e.getResponseHeader(t),{allowRangeRequests:i,suggestedLength:r}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:s,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});i&&(this._isRangeSupported=!0),this._contentLength=r||this._contentLength,this._filename=(0,n.extractFilenameFromHeader)(s),this._isRangeSupported&&this._manager.abortRequest(t),this._headersReceivedCapability.resolve()}_onDone(t){if(t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(t){this._storedError=(0,n.createResponseStatusError)(t,this._url),this._headersReceivedCapability.reject(this._storedError);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(t){this.onProgress?.({loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=new i.PromiseCapability;return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersReceivedCapability.reject(t);for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class a{constructor(t,e,s){this._manager=t;const i={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._requestId=t.requestRange(e,s,i),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){this.onClosed?.(this)}_onDone(t){const e=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunk=e,this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(t){this._storedError=(0,n.createResponseStatusError)(t,this._url);for(const t of this._requests)t.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(t){this.isStreamingSupported||this.onProgress?.({loaded:t.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const t=new i.PromiseCapability;return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFNodeStream=void 0;var i=s(1),n=s(20);const r=/^file:\/\/\/[a-zA-Z]:\//;e.PDFNodeStream=class{constructor(t){this.source=t,this.url=function(t){const e=require$$0,s=e.parse(t);return"file:"===s.protocol||s.host?s:/^[a-z]:[/\\]/i.test(t)?e.parse(`file:///${t}`):(s.host||(s.protocol="file:"),s)}(t.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,i.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new u(this):new h(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const s=this.isFsUrl?new f(this,t,e):new l(this,t,e);return this._rangeRequestReaders.push(s),s}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeRequestReaders.slice(0))e.cancel(t)}};class o{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;const e=t.source;this._contentLength=e.length,this._loaded=0,this._filename=null,this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._readableStream=null,this._readCapability=new i.PromiseCapability,this._headersCapability=new i.PromiseCapability}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return null===t?(this._readCapability=new i.PromiseCapability,this.read()):(this._loaded+=t.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",(()=>{this._readCapability.resolve()})),t.on("end",(()=>{t.destroy(),this._done=!0,this._readCapability.resolve()})),t.on("error",(t=>{this._error(t)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new i.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class a{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new i.PromiseCapability,this._isStreamingSupported=!t.source.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return null===t?(this._readCapability=new i.PromiseCapability,this.read()):(this._loaded+=t.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",(()=>{this._readCapability.resolve()})),t.on("end",(()=>{t.destroy(),this._done=!0,this._readCapability.resolve()})),t.on("error",(t=>{this._error(t)})),this._storedError&&this._readableStream.destroy(this._storedError)}}function c(t,e){return{protocol:t.protocol,auth:t.auth,host:t.hostname,port:t.port,path:t.path,method:"GET",headers:e}}class h extends o{constructor(t){super(t);this._request=null,this._request=require$$0.request(c(this._url,t.httpHeaders),(e=>{if(404===e.statusCode){const t=new i.MissingPDFException(`Missing PDF "${this._url}".`);return this._storedError=t,void this._headersCapability.reject(t)}this._headersCapability.resolve(),this._setReadableStream(e);const s=t=>this._readableStream.headers[t.toLowerCase()],{allowRangeRequests:r,suggestedLength:o}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:s,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=r,this._contentLength=o||this._contentLength,this._filename=(0,n.extractFilenameFromHeader)(s)})),this._request.on("error",(t=>{this._storedError=t,this._headersCapability.reject(t)})),this._request.end()}}class l extends a{constructor(t,e,s){super(t),this._httpHeaders={};for(const e in t.httpHeaders){const s=t.httpHeaders[e];void 0!==s&&(this._httpHeaders[e]=s)}this._httpHeaders.Range=`bytes=${e}-${s-1}`;this._request=null,this._request=require$$0.request(c(this._url,this._httpHeaders),(t=>{if(404!==t.statusCode)this._setReadableStream(t);else{const t=new i.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=t}})),this._request.on("error",(t=>{this._storedError=t})),this._request.end()}}class u extends o{constructor(t){super(t);let e=decodeURIComponent(this._url.path);r.test(this._url.href)&&(e=e.replace(/^\//,""));const s=require$$0;s.lstat(e,((t,n)=>{if(t)return"ENOENT"===t.code&&(t=new i.MissingPDFException(`Missing PDF "${e}".`)),this._storedError=t,void this._headersCapability.reject(t);this._contentLength=n.size,this._setReadableStream(s.createReadStream(e)),this._headersCapability.resolve()}))}}class f extends a{constructor(t,e,s){super(t);let i=decodeURIComponent(this._url.path);r.test(this._url.href)&&(i=i.replace(/^\//,"")),this._setReadableStream(require$$0.createReadStream(i,{start:e,end:s-1}))}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SVGGraphics=void 0;var i=s(6),n=s(1);const r="normal",o="#000000",a=["butt","round","square"],c=["miter","round","bevel"],h=function(t,e="",s=!1){if(URL.createObjectURL&&"undefined"!=typeof Blob&&!s)return URL.createObjectURL(new Blob([t],{type:e}));const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n=`data:${e};base64,`;for(let e=0,s=t.length;e<s;e+=3){const r=255&t[e],o=255&t[e+1],a=255&t[e+2];n+=i[r>>2]+i[(3&r)<<4|o>>4]+i[e+1<s?(15&o)<<2|a>>6:64]+i[e+2<s?63&a:64]}return n},l=function(){const t=new Uint8Array([137,80,78,71,13,10,26,10]),e=new Int32Array(256);for(let t=0;t<256;t++){let s=t;for(let t=0;t<8;t++)s=1&s?3988292384^s>>1&2147483647:s>>1&2147483647;e[t]=s}function s(t,s,i,n){let r=n;const o=s.length;i[r]=o>>24&255,i[r+1]=o>>16&255,i[r+2]=o>>8&255,i[r+3]=255&o,r+=4,i[r]=255&t.charCodeAt(0),i[r+1]=255&t.charCodeAt(1),i[r+2]=255&t.charCodeAt(2),i[r+3]=255&t.charCodeAt(3),r+=4,i.set(s,r),r+=s.length;const a=function(t,s,i){let n=-1;for(let r=s;r<i;r++)n=n>>>8^e[255&(n^t[r])];return~n}(i,n+4,r);i[r]=a>>24&255,i[r+1]=a>>16&255,i[r+2]=a>>8&255,i[r+3]=255&a}function i(t){let e=t.length;const s=65535,i=Math.ceil(e/s),n=new Uint8Array(2+e+5*i+4);let r=0;n[r++]=120,n[r++]=156;let o=0;for(;e>s;)n[r++]=0,n[r++]=255,n[r++]=255,n[r++]=0,n[r++]=0,n.set(t.subarray(o,o+s),r),r+=s,o+=s,e-=s;n[r++]=1,n[r++]=255&e,n[r++]=e>>8&255,n[r++]=255&~e,n[r++]=(65535&~e)>>8&255,n.set(t.subarray(o),r),r+=t.length-o;const a=function(t,e,s){let i=1,n=0;for(let e=0;e<s;++e)i=(i+(255&t[e]))%65521,n=(n+i)%65521;return n<<16|i}(t,0,t.length);return n[r++]=a>>24&255,n[r++]=a>>16&255,n[r++]=a>>8&255,n[r++]=255&a,n}return function(e,r,o){return function(e,r,o,a){const c=e.width,l=e.height;let u,f,d;const p=e.data;switch(r){case n.ImageKind.GRAYSCALE_1BPP:f=0,u=1,d=c+7>>3;break;case n.ImageKind.RGB_24BPP:f=2,u=8,d=3*c;break;case n.ImageKind.RGBA_32BPP:f=6,u=8,d=4*c;break;default:throw new Error("invalid format")}const g=new Uint8Array((1+d)*l);let m=0,w=0;for(let t=0;t<l;++t)g[m++]=0,g.set(p.subarray(w,w+d),m),w+=d,m+=d;if(r===n.ImageKind.GRAYSCALE_1BPP&&a){m=0;for(let t=0;t<l;t++){m++;for(let t=0;t<d;t++)g[m++]^=255}}const b=new Uint8Array([c>>24&255,c>>16&255,c>>8&255,255&c,l>>24&255,l>>16&255,l>>8&255,255&l,u,f,0,0,0]),y=function(t){if(!n.isNodeJS)return i(t);try{const e=parseInt(process.versions.node)>=8?t:Buffer.from(t),s=require("zlib").deflateSync(e,{level:9});return s instanceof Uint8Array?s:new Uint8Array(s)}catch(t){(0,n.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+t)}return i(t)}(g),A=new Uint8Array(t.length+36+b.length+y.length);let v=0;return A.set(t,v),v+=t.length,s("IHDR",b,A,v),v+=12+b.length,s("IDATA",y,A,v),v+=12+y.length,s("IEND",new Uint8Array(0),A,v),h(A,"image/png",o)}(e,void 0===e.kind?n.ImageKind.GRAYSCALE_1BPP:e.kind,r,o)}}();class u{constructor(){this.fontSizeScale=1,this.fontWeight=r,this.fontSize=0,this.textMatrix=n.IDENTITY_MATRIX,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=n.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=o,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(t,e){this.x=t,this.y=e}}function f(t){if(Number.isInteger(t))return t.toString();const e=t.toFixed(10);let s=e.length-1;if("0"!==e[s])return e;do{s--}while("0"===e[s]);return e.substring(0,"."===e[s]?s:s+1)}function d(t){if(0===t[4]&&0===t[5]){if(0===t[1]&&0===t[2])return 1===t[0]&&1===t[3]?"":`scale(${f(t[0])} ${f(t[3])})`;if(t[0]===t[3]&&t[1]===-t[2])return`rotate(${f(180*Math.acos(t[0])/Math.PI)})`}else if(1===t[0]&&0===t[1]&&0===t[2]&&1===t[3])return`translate(${f(t[4])} ${f(t[5])})`;return`matrix(${f(t[0])} ${f(t[1])} ${f(t[2])} ${f(t[3])} ${f(t[4])} ${f(t[5])})`}let p=0,g=0,m=0;e.SVGGraphics=class{constructor(t,e,s=!1){(0,i.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new i.DOMSVGFactory,this.current=new u,this.transformMatrix=n.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=t,this.objs=e,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!s,this._operatorIdMapping=[];for(const t in n.OPS)this._operatorIdMapping[n.OPS[t]]=t}getObject(t,e=null){return"string"==typeof t?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):e}save(){this.transformStack.push(this.transformMatrix);const t=this.current;this.extraStack.push(t),this.current=t.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(t){this.save(),this.executeOpTree(t),this.restore()}loadDependencies(t){const e=t.fnArray,s=t.argsArray;for(let t=0,i=e.length;t<i;t++)if(e[t]===n.OPS.dependency)for(const e of s[t]){const t=e.startsWith("g_")?this.commonObjs:this.objs,s=new Promise((s=>{t.get(e,s)}));this.current.dependencies.push(s)}return Promise.all(this.current.dependencies)}transform(t,e,s,i,r,o){this.transformMatrix=n.Util.transform(this.transformMatrix,[t,e,s,i,r,o]),this.tgrp=null}getSVG(t,e){this.viewport=e;const s=this._initialize(e);return this.loadDependencies(t).then((()=>(this.transformMatrix=n.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(t)),s)))}convertOpList(t){const e=this._operatorIdMapping,s=t.argsArray,i=t.fnArray,n=[];for(let t=0,r=i.length;t<r;t++){const r=i[t];n.push({fnId:r,fn:e[r],args:s[t]})}return function(t){let e=[];const s=[];for(const i of t)"save"!==i.fn?"restore"===i.fn?e=s.pop():e.push(i):(e.push({fnId:92,fn:"group",items:[]}),s.push(e),e=e.at(-1).items);return e}(n)}executeOpTree(t){for(const e of t){const t=e.fn,s=e.args;switch(0|e.fnId){case n.OPS.beginText:this.beginText();break;case n.OPS.dependency:break;case n.OPS.setLeading:this.setLeading(s);break;case n.OPS.setLeadingMoveText:this.setLeadingMoveText(s[0],s[1]);break;case n.OPS.setFont:this.setFont(s);break;case n.OPS.showText:case n.OPS.showSpacedText:this.showText(s[0]);break;case n.OPS.endText:this.endText();break;case n.OPS.moveText:this.moveText(s[0],s[1]);break;case n.OPS.setCharSpacing:this.setCharSpacing(s[0]);break;case n.OPS.setWordSpacing:this.setWordSpacing(s[0]);break;case n.OPS.setHScale:this.setHScale(s[0]);break;case n.OPS.setTextMatrix:this.setTextMatrix(s[0],s[1],s[2],s[3],s[4],s[5]);break;case n.OPS.setTextRise:this.setTextRise(s[0]);break;case n.OPS.setTextRenderingMode:this.setTextRenderingMode(s[0]);break;case n.OPS.setLineWidth:this.setLineWidth(s[0]);break;case n.OPS.setLineJoin:this.setLineJoin(s[0]);break;case n.OPS.setLineCap:this.setLineCap(s[0]);break;case n.OPS.setMiterLimit:this.setMiterLimit(s[0]);break;case n.OPS.setFillRGBColor:this.setFillRGBColor(s[0],s[1],s[2]);break;case n.OPS.setStrokeRGBColor:this.setStrokeRGBColor(s[0],s[1],s[2]);break;case n.OPS.setStrokeColorN:this.setStrokeColorN(s);break;case n.OPS.setFillColorN:this.setFillColorN(s);break;case n.OPS.shadingFill:this.shadingFill(s[0]);break;case n.OPS.setDash:this.setDash(s[0],s[1]);break;case n.OPS.setRenderingIntent:this.setRenderingIntent(s[0]);break;case n.OPS.setFlatness:this.setFlatness(s[0]);break;case n.OPS.setGState:this.setGState(s[0]);break;case n.OPS.fill:this.fill();break;case n.OPS.eoFill:this.eoFill();break;case n.OPS.stroke:this.stroke();break;case n.OPS.fillStroke:this.fillStroke();break;case n.OPS.eoFillStroke:this.eoFillStroke();break;case n.OPS.clip:this.clip("nonzero");break;case n.OPS.eoClip:this.clip("evenodd");break;case n.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case n.OPS.paintImageXObject:this.paintImageXObject(s[0]);break;case n.OPS.paintInlineImageXObject:this.paintInlineImageXObject(s[0]);break;case n.OPS.paintImageMaskXObject:this.paintImageMaskXObject(s[0]);break;case n.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(s[0],s[1]);break;case n.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case n.OPS.closePath:this.closePath();break;case n.OPS.closeStroke:this.closeStroke();break;case n.OPS.closeFillStroke:this.closeFillStroke();break;case n.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case n.OPS.nextLine:this.nextLine();break;case n.OPS.transform:this.transform(s[0],s[1],s[2],s[3],s[4],s[5]);break;case n.OPS.constructPath:this.constructPath(s[0],s[1]);break;case n.OPS.endPath:this.endPath();break;case 92:this.group(e.items);break;default:(0,n.warn)(`Unimplemented operator ${t}`)}}}setWordSpacing(t){this.current.wordSpacing=t}setCharSpacing(t){this.current.charSpacing=t}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(t,e,s,i,n,r){const o=this.current;o.textMatrix=o.lineMatrix=[t,e,s,i,n,r],o.textMatrixScale=Math.hypot(t,e),o.x=o.lineX=0,o.y=o.lineY=0,o.xcoords=[],o.ycoords=[],o.tspan=this.svgFactory.createElement("svg:tspan"),o.tspan.setAttributeNS(null,"font-family",o.fontFamily),o.tspan.setAttributeNS(null,"font-size",`${f(o.fontSize)}px`),o.tspan.setAttributeNS(null,"y",f(-o.y)),o.txtElement=this.svgFactory.createElement("svg:text"),o.txtElement.append(o.tspan)}beginText(){const t=this.current;t.x=t.lineX=0,t.y=t.lineY=0,t.textMatrix=n.IDENTITY_MATRIX,t.lineMatrix=n.IDENTITY_MATRIX,t.textMatrixScale=1,t.tspan=this.svgFactory.createElement("svg:tspan"),t.txtElement=this.svgFactory.createElement("svg:text"),t.txtgrp=this.svgFactory.createElement("svg:g"),t.xcoords=[],t.ycoords=[]}moveText(t,e){const s=this.current;s.x=s.lineX+=t,s.y=s.lineY+=e,s.xcoords=[],s.ycoords=[],s.tspan=this.svgFactory.createElement("svg:tspan"),s.tspan.setAttributeNS(null,"font-family",s.fontFamily),s.tspan.setAttributeNS(null,"font-size",`${f(s.fontSize)}px`),s.tspan.setAttributeNS(null,"y",f(-s.y))}showText(t){const e=this.current,s=e.font,i=e.fontSize;if(0===i)return;const a=e.fontSizeScale,c=e.charSpacing,h=e.wordSpacing,l=e.fontDirection,u=e.textHScale*l,p=s.vertical,g=p?1:-1,m=s.defaultVMetrics,w=i*e.fontMatrix[0];let b=0;for(const n of t){if(null===n){b+=l*h;continue}if("number"==typeof n){b+=g*n*i/1e3;continue}const t=(n.isSpace?h:0)+c,r=n.fontChar;let o,u,f=n.width;if(p){let t;const e=n.vmetric||m;t=n.vmetric?e[1]:.5*f,t=-t*w,f=e?-e[0]:f,o=t/a,u=(b+e[2]*w)/a}else o=b/a,u=0;(n.isInFont||s.missingFile)&&(e.xcoords.push(e.x+o),p&&e.ycoords.push(-e.y+u),e.tspan.textContent+=r),b+=p?f*w-t*l:f*w+t*l}e.tspan.setAttributeNS(null,"x",e.xcoords.map(f).join(" ")),e.tspan.setAttributeNS(null,"y",p?e.ycoords.map(f).join(" "):f(-e.y)),p?e.y-=b:e.x+=b*u,e.tspan.setAttributeNS(null,"font-family",e.fontFamily),e.tspan.setAttributeNS(null,"font-size",`${f(e.fontSize)}px`),"normal"!==e.fontStyle&&e.tspan.setAttributeNS(null,"font-style",e.fontStyle),e.fontWeight!==r&&e.tspan.setAttributeNS(null,"font-weight",e.fontWeight);const y=e.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;y===n.TextRenderingMode.FILL||y===n.TextRenderingMode.FILL_STROKE?(e.fillColor!==o&&e.tspan.setAttributeNS(null,"fill",e.fillColor),e.fillAlpha<1&&e.tspan.setAttributeNS(null,"fill-opacity",e.fillAlpha)):e.tspan.setAttributeNS(null,"fill",e.textRenderingMode===n.TextRenderingMode.ADD_TO_PATH?"transparent":"none"),(y===n.TextRenderingMode.STROKE||y===n.TextRenderingMode.FILL_STROKE)&&this._setStrokeAttributes(e.tspan,1/(e.textMatrixScale||1));let A=e.textMatrix;0!==e.textRise&&(A=A.slice(),A[5]+=e.textRise),e.txtElement.setAttributeNS(null,"transform",`${d(A)} scale(${f(u)}, -1)`),e.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.txtElement.append(e.tspan),e.txtgrp.append(e.txtElement),this._ensureTransformGroup().append(e.txtElement)}setLeadingMoveText(t,e){this.setLeading(-e),this.moveText(t,e)}addFontStyle(t){if(!t.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.append(this.cssStyle));const e=h(t.data,t.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${t.loadedName}"; src: url(${e}); }\n`}setFont(t){const e=this.current,s=this.commonObjs.get(t[0]);let i=t[1];e.font=s,!this.embedFonts||s.missingFile||this.embeddedFonts[s.loadedName]||(this.addFontStyle(s),this.embeddedFonts[s.loadedName]=s),e.fontMatrix=s.fontMatrix||n.FONT_IDENTITY_MATRIX;let r="normal";s.black?r="900":s.bold&&(r="bold");const o=s.italic?"italic":"normal";i<0?(i=-i,e.fontDirection=-1):e.fontDirection=1,e.fontSize=i,e.fontFamily=s.loadedName,e.fontWeight=r,e.fontStyle=o,e.tspan=this.svgFactory.createElement("svg:tspan"),e.tspan.setAttributeNS(null,"y",f(-e.y)),e.xcoords=[],e.ycoords=[]}endText(){const t=this.current;t.textRenderingMode&n.TextRenderingMode.ADD_TO_PATH_FLAG&&t.txtElement?.hasChildNodes()&&(t.element=t.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(t){t>0&&(this.current.lineWidth=t)}setLineCap(t){this.current.lineCap=a[t]}setLineJoin(t){this.current.lineJoin=c[t]}setMiterLimit(t){this.current.miterLimit=t}setStrokeAlpha(t){this.current.strokeAlpha=t}setStrokeRGBColor(t,e,s){this.current.strokeColor=n.Util.makeHexColor(t,e,s)}setFillAlpha(t){this.current.fillAlpha=t}setFillRGBColor(t,e,s){this.current.fillColor=n.Util.makeHexColor(t,e,s),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(t){this.current.strokeColor=this._makeColorN_Pattern(t)}setFillColorN(t){this.current.fillColor=this._makeColorN_Pattern(t)}shadingFill(t){const{width:e,height:s}=this.viewport,i=n.Util.inverseTransform(this.transformMatrix),[r,o,a,c]=n.Util.getAxialAlignedBoundingBox([0,0,e,s],i),h=this.svgFactory.createElement("svg:rect");h.setAttributeNS(null,"x",r),h.setAttributeNS(null,"y",o),h.setAttributeNS(null,"width",a-r),h.setAttributeNS(null,"height",c-o),h.setAttributeNS(null,"fill",this._makeShadingPattern(t)),this.current.fillAlpha<1&&h.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(h)}_makeColorN_Pattern(t){return"TilingPattern"===t[0]?this._makeTilingPattern(t):this._makeShadingPattern(t)}_makeTilingPattern(t){const e=t[1],s=t[2],i=t[3]||n.IDENTITY_MATRIX,[r,o,a,c]=t[4],h=t[5],l=t[6],u=t[7],f="shading"+m++,[d,p,g,w]=n.Util.normalizeRect([...n.Util.applyTransform([r,o],i),...n.Util.applyTransform([a,c],i)]),[b,y]=n.Util.singularValueDecompose2dScale(i),A=h*b,v=l*y,x=this.svgFactory.createElement("svg:pattern");x.setAttributeNS(null,"id",f),x.setAttributeNS(null,"patternUnits","userSpaceOnUse"),x.setAttributeNS(null,"width",A),x.setAttributeNS(null,"height",v),x.setAttributeNS(null,"x",`${d}`),x.setAttributeNS(null,"y",`${p}`);const k=this.svg,S=this.transformMatrix,M=this.current.fillColor,C=this.current.strokeColor,_=this.svgFactory.create(g-d,w-p);if(this.svg=_,this.transformMatrix=i,2===u){const t=n.Util.makeHexColor(...e);this.current.fillColor=t,this.current.strokeColor=t}return this.executeOpTree(this.convertOpList(s)),this.svg=k,this.transformMatrix=S,this.current.fillColor=M,this.current.strokeColor=C,x.append(_.childNodes[0]),this.defs.append(x),`url(#${f})`}_makeShadingPattern(t){switch("string"==typeof t&&(t=this.objs.get(t)),t[0]){case"RadialAxial":const e="shading"+m++,s=t[3];let i;switch(t[1]){case"axial":const s=t[4],n=t[5];i=this.svgFactory.createElement("svg:linearGradient"),i.setAttributeNS(null,"id",e),i.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),i.setAttributeNS(null,"x1",s[0]),i.setAttributeNS(null,"y1",s[1]),i.setAttributeNS(null,"x2",n[0]),i.setAttributeNS(null,"y2",n[1]);break;case"radial":const r=t[4],o=t[5],a=t[6],c=t[7];i=this.svgFactory.createElement("svg:radialGradient"),i.setAttributeNS(null,"id",e),i.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),i.setAttributeNS(null,"cx",o[0]),i.setAttributeNS(null,"cy",o[1]),i.setAttributeNS(null,"r",c),i.setAttributeNS(null,"fx",r[0]),i.setAttributeNS(null,"fy",r[1]),i.setAttributeNS(null,"fr",a);break;default:throw new Error(`Unknown RadialAxial type: ${t[1]}`)}for(const t of s){const e=this.svgFactory.createElement("svg:stop");e.setAttributeNS(null,"offset",t[0]),e.setAttributeNS(null,"stop-color",t[1]),i.append(e)}return this.defs.append(i),`url(#${e})`;case"Mesh":return(0,n.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${t[0]}`)}}setDash(t,e){this.current.dashArray=t,this.current.dashPhase=e}constructPath(t,e){const s=this.current;let i=s.x,r=s.y,o=[],a=0;for(const s of t)switch(0|s){case n.OPS.rectangle:i=e[a++],r=e[a++];const t=i+e[a++],s=r+e[a++];o.push("M",f(i),f(r),"L",f(t),f(r),"L",f(t),f(s),"L",f(i),f(s),"Z");break;case n.OPS.moveTo:i=e[a++],r=e[a++],o.push("M",f(i),f(r));break;case n.OPS.lineTo:i=e[a++],r=e[a++],o.push("L",f(i),f(r));break;case n.OPS.curveTo:i=e[a+4],r=e[a+5],o.push("C",f(e[a]),f(e[a+1]),f(e[a+2]),f(e[a+3]),f(i),f(r)),a+=6;break;case n.OPS.curveTo2:o.push("C",f(i),f(r),f(e[a]),f(e[a+1]),f(e[a+2]),f(e[a+3])),i=e[a+2],r=e[a+3],a+=4;break;case n.OPS.curveTo3:i=e[a+2],r=e[a+3],o.push("C",f(e[a]),f(e[a+1]),f(i),f(r),f(i),f(r)),a+=4;break;case n.OPS.closePath:o.push("Z")}o=o.join(" "),s.path&&t.length>0&&t[0]!==n.OPS.rectangle&&t[0]!==n.OPS.moveTo?o=s.path.getAttributeNS(null,"d")+o:(s.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(s.path)),s.path.setAttributeNS(null,"d",o),s.path.setAttributeNS(null,"fill","none"),s.element=s.path,s.setCurrentPoint(i,r)}endPath(){const t=this.current;if(t.path=null,!this.pendingClip)return;if(!t.element)return void(this.pendingClip=null);const e="clippath"+p++,s=this.svgFactory.createElement("svg:clipPath");s.setAttributeNS(null,"id",e),s.setAttributeNS(null,"transform",d(this.transformMatrix));const i=t.element.cloneNode(!0);if(i.setAttributeNS(null,"clip-rule","evenodd"===this.pendingClip?"evenodd":"nonzero"),this.pendingClip=null,s.append(i),this.defs.append(s),t.activeClipUrl){t.clipGroup=null;for(const t of this.extraStack)t.clipGroup=null;s.setAttributeNS(null,"clip-path",t.activeClipUrl)}t.activeClipUrl=`url(#${e})`,this.tgrp=null}clip(t){this.pendingClip=t}closePath(){const t=this.current;if(t.path){const e=`${t.path.getAttributeNS(null,"d")}Z`;t.path.setAttributeNS(null,"d",e)}}setLeading(t){this.current.leading=-t}setTextRise(t){this.current.textRise=t}setTextRenderingMode(t){this.current.textRenderingMode=t}setHScale(t){this.current.textHScale=t/100}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(const[e,s]of t)switch(e){case"LW":this.setLineWidth(s);break;case"LC":this.setLineCap(s);break;case"LJ":this.setLineJoin(s);break;case"ML":this.setMiterLimit(s);break;case"D":this.setDash(s[0],s[1]);break;case"RI":this.setRenderingIntent(s);break;case"FL":this.setFlatness(s);break;case"Font":this.setFont(s);break;case"CA":this.setStrokeAlpha(s);break;case"ca":this.setFillAlpha(s);break;default:(0,n.warn)(`Unimplemented graphic state operator ${e}`)}}fill(){const t=this.current;t.element&&(t.element.setAttributeNS(null,"fill",t.fillColor),t.element.setAttributeNS(null,"fill-opacity",t.fillAlpha),this.endPath())}stroke(){const t=this.current;t.element&&(this._setStrokeAttributes(t.element),t.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(t,e=1){const s=this.current;let i=s.dashArray;1!==e&&i.length>0&&(i=i.map((function(t){return e*t}))),t.setAttributeNS(null,"stroke",s.strokeColor),t.setAttributeNS(null,"stroke-opacity",s.strokeAlpha),t.setAttributeNS(null,"stroke-miterlimit",f(s.miterLimit)),t.setAttributeNS(null,"stroke-linecap",s.lineCap),t.setAttributeNS(null,"stroke-linejoin",s.lineJoin),t.setAttributeNS(null,"stroke-width",f(e*s.lineWidth)+"px"),t.setAttributeNS(null,"stroke-dasharray",i.map(f).join(" ")),t.setAttributeNS(null,"stroke-dashoffset",f(e*s.dashPhase)+"px")}eoFill(){this.current.element?.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element?.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const t=this.svgFactory.createElement("svg:rect");t.setAttributeNS(null,"x","0"),t.setAttributeNS(null,"y","0"),t.setAttributeNS(null,"width","1px"),t.setAttributeNS(null,"height","1px"),t.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(t)}paintImageXObject(t){const e=this.getObject(t);e?this.paintInlineImageXObject(e):(0,n.warn)(`Dependent image with object ID ${t} is not ready yet`)}paintInlineImageXObject(t,e){const s=t.width,i=t.height,n=l(t,this.forceDataSchema,!!e),r=this.svgFactory.createElement("svg:rect");r.setAttributeNS(null,"x","0"),r.setAttributeNS(null,"y","0"),r.setAttributeNS(null,"width",f(s)),r.setAttributeNS(null,"height",f(i)),this.current.element=r,this.clip("nonzero");const o=this.svgFactory.createElement("svg:image");o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n),o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y",f(-i)),o.setAttributeNS(null,"width",f(s)+"px"),o.setAttributeNS(null,"height",f(i)+"px"),o.setAttributeNS(null,"transform",`scale(${f(1/s)} ${f(-1/i)})`),e?e.append(o):this._ensureTransformGroup().append(o)}paintImageMaskXObject(t){const e=this.getObject(t.data,t);if(e.bitmap)return void(0,n.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");const s=this.current,i=e.width,r=e.height,o=s.fillColor;s.maskId="mask"+g++;const a=this.svgFactory.createElement("svg:mask");a.setAttributeNS(null,"id",s.maskId);const c=this.svgFactory.createElement("svg:rect");c.setAttributeNS(null,"x","0"),c.setAttributeNS(null,"y","0"),c.setAttributeNS(null,"width",f(i)),c.setAttributeNS(null,"height",f(r)),c.setAttributeNS(null,"fill",o),c.setAttributeNS(null,"mask",`url(#${s.maskId})`),this.defs.append(a),this._ensureTransformGroup().append(c),this.paintInlineImageXObject(e,a)}paintFormXObjectBegin(t,e){if(Array.isArray(t)&&6===t.length&&this.transform(t[0],t[1],t[2],t[3],t[4],t[5]),e){const t=e[2]-e[0],s=e[3]-e[1],i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x",e[0]),i.setAttributeNS(null,"y",e[1]),i.setAttributeNS(null,"width",f(t)),i.setAttributeNS(null,"height",f(s)),this.current.element=i,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(t){const e=this.svgFactory.create(t.width,t.height),s=this.svgFactory.createElement("svg:defs");e.append(s),this.defs=s;const i=this.svgFactory.createElement("svg:g");return i.setAttributeNS(null,"transform",d(t.transform)),e.append(i),this.svg=i,e}_ensureClipGroup(){if(!this.current.clipGroup){const t=this.svgFactory.createElement("svg:g");t.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(t),this.current.clipGroup=t}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",d(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.XfaText=void 0;class s{static textContent(t){const e=[],i={items:e,styles:Object.create(null)};return function t(i){if(!i)return;let n=null;const r=i.name;if("#text"===r)n=i.value;else{if(!s.shouldBuildText(r))return;i?.attributes?.textContent?n=i.attributes.textContent:i.value&&(n=i.value)}if(null!==n&&e.push({str:n}),i.children)for(const e of i.children)t(e)}(t),i}static shouldBuildText(t){return!("textarea"===t||"input"===t||"option"===t||"select"===t)}}e.XfaText=s},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TextLayerRenderTask=void 0,e.renderTextLayer=function(t){t.textContentSource||!t.textContent&&!t.textContentStream||((0,n.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),t.textContentSource=t.textContent||t.textContentStream);const{container:e,viewport:s}=t,i=getComputedStyle(e),r=i.getPropertyValue("visibility"),o=parseFloat(i.getPropertyValue("--scale-factor"));"visible"===r&&(!o||Math.abs(o-s.scale)>1e-5)&&console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM.");const a=new l(t);return a._render(),a},e.updateTextLayer=function({container:t,viewport:e,textDivs:s,textDivProperties:i,isOffscreenCanvasSupported:r,mustRotate:o=!0,mustRescale:c=!0}){if(o&&(0,n.setLayerDimensions)(t,{rotation:e.rotation}),c){const t=a(0,r),n={prevFontSize:null,prevFontFamily:null,div:null,scale:e.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:t};for(const t of s)n.properties=i.get(t),n.div=t,h(n)}};var i=s(1),n=s(6);const r=30,o=new Map;function a(t,e){let s;if(e&&i.FeatureTest.isOffscreenCanvasSupported)s=new OffscreenCanvas(t,t).getContext("2d",{alpha:!1});else{const e=document.createElement("canvas");e.width=e.height=t,s=e.getContext("2d",{alpha:!1})}return s}function c(t,e,s){const n=document.createElement("span"),c={angle:0,canvasWidth:0,hasText:""!==e.str,hasEOL:e.hasEOL,fontSize:0};t._textDivs.push(n);const h=i.Util.transform(t._transform,e.transform);let l=Math.atan2(h[1],h[0]);const u=s[e.fontName];u.vertical&&(l+=Math.PI/2);const f=Math.hypot(h[2],h[3]),d=f*function(t,e){const s=o.get(t);if(s)return s;const i=a(r,e);i.font=`30px ${t}`;const n=i.measureText("");let c=n.fontBoundingBoxAscent,h=Math.abs(n.fontBoundingBoxDescent);if(c){const e=c/(c+h);return o.set(t,e),i.canvas.width=i.canvas.height=0,e}i.strokeStyle="red",i.clearRect(0,0,r,r),i.strokeText("g",0,0);let l=i.getImageData(0,0,r,r).data;h=0;for(let t=l.length-1-3;t>=0;t-=4)if(l[t]>0){h=Math.ceil(t/4/r);break}i.clearRect(0,0,r,r),i.strokeText("A",0,r),l=i.getImageData(0,0,r,r).data,c=0;for(let t=0,e=l.length;t<e;t+=4)if(l[t]>0){c=r-Math.floor(t/4/r);break}if(i.canvas.width=i.canvas.height=0,c){const e=c/(c+h);return o.set(t,e),e}return o.set(t,.8),.8}(u.fontFamily,t._isOffscreenCanvasSupported);let p,g;0===l?(p=h[4],g=h[5]-d):(p=h[4]+d*Math.sin(l),g=h[5]-d*Math.cos(l));const m="calc(var(--scale-factor)*",w=n.style;t._container===t._rootContainer?(w.left=`${(100*p/t._pageWidth).toFixed(2)}%`,w.top=`${(100*g/t._pageHeight).toFixed(2)}%`):(w.left=`${m}${p.toFixed(2)}px)`,w.top=`${m}${g.toFixed(2)}px)`),w.fontSize=`${m}${f.toFixed(2)}px)`,w.fontFamily=u.fontFamily,c.fontSize=f,n.setAttribute("role","presentation"),n.textContent=e.str,n.dir=e.dir,t._fontInspectorEnabled&&(n.dataset.fontName=e.fontName),0!==l&&(c.angle=l*(180/Math.PI));let b=!1;if(e.str.length>1)b=!0;else if(" "!==e.str&&e.transform[0]!==e.transform[3]){const t=Math.abs(e.transform[0]),s=Math.abs(e.transform[3]);t!==s&&Math.max(t,s)/Math.min(t,s)>1.5&&(b=!0)}b&&(c.canvasWidth=u.vertical?e.height:e.width),t._textDivProperties.set(n,c),t._isReadableStream&&t._layoutText(n)}function h(t){const{div:e,scale:s,properties:i,ctx:n,prevFontSize:r,prevFontFamily:o}=t,{style:a}=e;let c="";if(0!==i.canvasWidth&&i.hasText){const{fontFamily:h}=a,{canvasWidth:l,fontSize:u}=i;r===u&&o===h||(n.font=`${u*s}px ${h}`,t.prevFontSize=u,t.prevFontFamily=h);const{width:f}=n.measureText(e.textContent);f>0&&(c=`scaleX(${l*s/f})`)}0!==i.angle&&(c=`rotate(${i.angle}deg) ${c}`),c.length>0&&(a.transform=c)}class l{constructor({textContentSource:t,container:e,viewport:s,textDivs:r,textDivProperties:o,textContentItemsStr:c,isOffscreenCanvasSupported:h}){this._textContentSource=t,this._isReadableStream=t instanceof ReadableStream,this._container=this._rootContainer=e,this._textDivs=r||[],this._textContentItemsStr=c||[],this._isOffscreenCanvasSupported=h,this._fontInspectorEnabled=!!globalThis.FontInspector?.enabled,this._reader=null,this._textDivProperties=o||new WeakMap,this._canceled=!1,this._capability=new i.PromiseCapability,this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:s.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:a(0,h)};const{pageWidth:l,pageHeight:u,pageX:f,pageY:d}=s.rawDims;this._transform=[1,0,0,-1,-f,d+u],this._pageWidth=l,this._pageHeight=u,(0,n.setLayerDimensions)(e,s),this._capability.promise.finally((()=>{this._layoutTextParams=null})).catch((()=>{}))}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new i.AbortException("TextLayer task cancelled.")).catch((()=>{})),this._reader=null),this._capability.reject(new i.AbortException("TextLayer task cancelled."))}_processItems(t,e){for(const s of t)if(void 0!==s.str)this._textContentItemsStr.push(s.str),c(this,s,e);else if("beginMarkedContentProps"===s.type||"beginMarkedContent"===s.type){const t=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==s.id&&this._container.setAttribute("id",`${s.id}`),t.append(this._container)}else"endMarkedContent"===s.type&&(this._container=this._container.parentNode)}_layoutText(t){const e=this._layoutTextParams.properties=this._textDivProperties.get(t);if(this._layoutTextParams.div=t,h(this._layoutTextParams),e.hasText&&this._container.append(t),e.hasEOL){const t=document.createElement("br");t.setAttribute("role","presentation"),this._container.append(t)}}_render(){const t=new i.PromiseCapability;let e=Object.create(null);if(this._isReadableStream){const s=()=>{this._reader.read().then((({value:i,done:n})=>{n?t.resolve():(Object.assign(e,i.styles),this._processItems(i.items,e),s())}),t.reject)};this._reader=this._textContentSource.getReader(),s()}else{if(!this._textContentSource)throw new Error('No "textContentSource" parameter specified.');{const{items:e,styles:s}=this._textContentSource;this._processItems(e,s),t.resolve()}}t.promise.then((()=>{e=null,function(t){if(t._canceled)return;const e=t._textDivs,s=t._capability;if(e.length>1e5)s.resolve();else{if(!t._isReadableStream)for(const s of e)t._layoutText(s);s.resolve()}}(this)}),this._capability.reject)}}e.TextLayerRenderTask=l},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AnnotationEditorLayer=void 0;var i=s(1),n=s(4),r=s(28),o=s(33),a=s(6),c=s(34);class h{#xe;#ke=!1;#Se=null;#Me=this.pointerup.bind(this);#Ce=this.pointerdown.bind(this);#_e=new Map;#Ie=!1;#Fe=!1;#Oe=!1;#Ee;static _initialized=!1;constructor({uiManager:t,pageIndex:e,div:s,accessibilityManager:i,annotationLayer:n,viewport:a,l10n:l}){const u=[r.FreeTextEditor,o.InkEditor,c.StampEditor];if(!h._initialized){h._initialized=!0;for(const t of u)t.initialize(l)}t.registerEditorTypes(u),this.#Ee=t,this.pageIndex=e,this.div=s,this.#xe=i,this.#Se=n,this.viewport=a,this.#Ee.addLayer(this)}get isEmpty(){return 0===this.#_e.size}updateToolbar(t){this.#Ee.updateToolbar(t)}updateMode(t=this.#Ee.getMode()){this.#Te(),t===i.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),t!==i.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",t===i.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",t===i.AnnotationEditorType.INK),this.div.classList.toggle("stampEditing",t===i.AnnotationEditorType.STAMP),this.div.hidden=!1)}addInkEditorIfNeeded(t){if(t||this.#Ee.getMode()===i.AnnotationEditorType.INK){if(!t)for(const t of this.#_e.values())if(t.isEmpty())return void t.setInBackground();this.#De({offsetX:0,offsetY:0},!1).setInBackground()}}setEditingState(t){this.#Ee.setEditingState(t)}addCommands(t){this.#Ee.addCommands(t)}enable(){this.div.style.pointerEvents="auto";const t=new Set;for(const e of this.#_e.values())e.enableEditing(),e.annotationElementId&&t.add(e.annotationElementId);if(!this.#Se)return;const e=this.#Se.getEditableAnnotations();for(const s of e){if(s.hide(),this.#Ee.isDeletedAnnotationElement(s.data.id))continue;if(t.has(s.data.id))continue;const e=this.deserialize(s);e&&(this.addOrRebuild(e),e.enableEditing())}}disable(){this.#Oe=!0,this.div.style.pointerEvents="none";const t=new Set;for(const e of this.#_e.values())e.disableEditing(),e.annotationElementId&&null===e.serialize()?(this.getEditableAnnotation(e.annotationElementId)?.show(),e.remove()):t.add(e.annotationElementId);if(this.#Se){const e=this.#Se.getEditableAnnotations();for(const s of e){const{id:e}=s.data;t.has(e)||this.#Ee.isDeletedAnnotationElement(e)||s.show()}}this.#Te(),this.isEmpty&&(this.div.hidden=!0),this.#Oe=!1}getEditableAnnotation(t){return this.#Se?.getEditableAnnotation(t)||null}setActiveEditor(t){this.#Ee.getActive()!==t&&this.#Ee.setActiveEditor(t)}enableClick(){this.div.addEventListener("pointerdown",this.#Ce),this.div.addEventListener("pointerup",this.#Me)}disableClick(){this.div.removeEventListener("pointerdown",this.#Ce),this.div.removeEventListener("pointerup",this.#Me)}attach(t){this.#_e.set(t.id,t);const{annotationElementId:e}=t;e&&this.#Ee.isDeletedAnnotationElement(e)&&this.#Ee.removeDeletedAnnotationElement(t)}detach(t){this.#_e.delete(t.id),this.#xe?.removePointerInTextLayer(t.contentDiv),!this.#Oe&&t.annotationElementId&&this.#Ee.addDeletedAnnotationElement(t)}remove(t){this.detach(t),this.#Ee.removeEditor(t),t.div.contains(document.activeElement)&&setTimeout((()=>{this.#Ee.focusMainContainer()}),0),t.div.remove(),t.isAttachedToDOM=!1,this.#Fe||this.addInkEditorIfNeeded(!1)}changeParent(t){t.parent!==this&&(t.annotationElementId&&(this.#Ee.addDeletedAnnotationElement(t.annotationElementId),n.AnnotationEditor.deleteAnnotationElement(t),t.annotationElementId=null),this.attach(t),t.parent?.detach(t),t.setParent(this),t.div&&t.isAttachedToDOM&&(t.div.remove(),this.div.append(t.div)))}add(t){if(this.changeParent(t),this.#Ee.addEditor(t),this.attach(t),!t.isAttachedToDOM){const e=t.render();this.div.append(e),t.isAttachedToDOM=!0}t.fixAndSetPosition(),t.onceAdded(),this.#Ee.addToAnnotationStorage(t)}moveEditorInDOM(t){if(!t.isAttachedToDOM)return;const{activeElement:e}=document;t.div.contains(e)&&(t._focusEventsAllowed=!1,setTimeout((()=>{t.div.contains(document.activeElement)?t._focusEventsAllowed=!0:(t.div.addEventListener("focusin",(()=>{t._focusEventsAllowed=!0}),{once:!0}),e.focus())}),0)),t._structTreeParentId=this.#xe?.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}addOrRebuild(t){t.needsToBeRebuilt()?t.rebuild():this.add(t)}addUndoableEditor(t){this.addCommands({cmd:()=>t._uiManager.rebuild(t),undo:()=>{t.remove()},mustExec:!1})}getNextId(){return this.#Ee.getId()}#Pe(t){switch(this.#Ee.getMode()){case i.AnnotationEditorType.FREETEXT:return new r.FreeTextEditor(t);case i.AnnotationEditorType.INK:return new o.InkEditor(t);case i.AnnotationEditorType.STAMP:return new c.StampEditor(t)}return null}pasteEditor(t,e){this.#Ee.updateToolbar(t),this.#Ee.updateMode(t);const{offsetX:s,offsetY:i}=this.#Re(),n=this.getNextId(),r=this.#Pe({parent:this,id:n,x:s,y:i,uiManager:this.#Ee,isCentered:!0,...e});r&&this.add(r)}deserialize(t){switch(t.annotationType??t.annotationEditorType){case i.AnnotationEditorType.FREETEXT:return r.FreeTextEditor.deserialize(t,this,this.#Ee);case i.AnnotationEditorType.INK:return o.InkEditor.deserialize(t,this,this.#Ee);case i.AnnotationEditorType.STAMP:return c.StampEditor.deserialize(t,this,this.#Ee)}return null}#De(t,e){const s=this.getNextId(),i=this.#Pe({parent:this,id:s,x:t.offsetX,y:t.offsetY,uiManager:this.#Ee,isCentered:e});return i&&this.add(i),i}#Re(){const{x:t,y:e,width:s,height:i}=this.div.getBoundingClientRect(),n=Math.max(0,t),r=Math.max(0,e),o=(n+Math.min(window.innerWidth,t+s))/2-t,a=(r+Math.min(window.innerHeight,e+i))/2-e,[c,h]=this.viewport.rotation%180==0?[o,a]:[a,o];return{offsetX:c,offsetY:h}}addNewEditor(){this.#De(this.#Re(),!0)}setSelected(t){this.#Ee.setSelected(t)}toggleSelected(t){this.#Ee.toggleSelected(t)}isSelected(t){return this.#Ee.isSelected(t)}unselect(t){this.#Ee.unselect(t)}pointerup(t){const{isMac:e}=i.FeatureTest.platform;0!==t.button||t.ctrlKey&&e||t.target===this.div&&this.#Ie&&(this.#Ie=!1,this.#ke?this.#Ee.getMode()!==i.AnnotationEditorType.STAMP?this.#De(t,!1):this.#Ee.unselectAll():this.#ke=!0)}pointerdown(t){if(this.#Ie)return void(this.#Ie=!1);const{isMac:e}=i.FeatureTest.platform;if(0!==t.button||t.ctrlKey&&e)return;if(t.target!==this.div)return;this.#Ie=!0;const s=this.#Ee.getActive();this.#ke=!s||s.isEmpty()}findNewParent(t,e,s){const i=this.#Ee.findParent(e,s);return null!==i&&i!==this&&(i.changeParent(t),!0)}destroy(){this.#Ee.getActive()?.parent===this&&(this.#Ee.commitOrRemove(),this.#Ee.setActiveEditor(null));for(const t of this.#_e.values())this.#xe?.removePointerInTextLayer(t.contentDiv),t.setParent(null),t.isAttachedToDOM=!1,t.div.remove();this.div=null,this.#_e.clear(),this.#Ee.removeLayer(this)}#Te(){this.#Fe=!0;for(const t of this.#_e.values())t.isEmpty()&&t.remove();this.#Fe=!1}render({viewport:t}){this.viewport=t,(0,a.setLayerDimensions)(this.div,t);for(const t of this.#Ee.getEditors(this.pageIndex))this.add(t);this.updateMode()}update({viewport:t}){this.#Ee.commitOrRemove(),this.viewport=t,(0,a.setLayerDimensions)(this.div,{rotation:t.rotation}),this.updateMode()}get pageDimensions(){const{pageWidth:t,pageHeight:e}=this.viewport.rawDims;return[t,e]}}e.AnnotationEditorLayer=h},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FreeTextEditor=void 0;var i=s(1),n=s(5),r=s(4),o=s(29);class a extends r.AnnotationEditor{#Ne=this.editorDivBlur.bind(this);#Le=this.editorDivFocus.bind(this);#Be=this.editorDivInput.bind(this);#$e=this.editorDivKeydown.bind(this);#Ue;#je="";#He=`${this.id}-editor`;#Ge;#qe=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){const t=a.prototype,e=t=>t.isEmpty(),s=n.AnnotationEditorUIManager.TRANSLATE_SMALL,r=n.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,i.shadow)(this,"_keyboardManager",new n.KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-s,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-r,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[s,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[r,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-s],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-r],checker:e}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,s],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,r],checker:e}]]))}static _type="freetext";constructor(t){super({...t,name:"freeTextEditor"}),this.#Ue=t.color||a._defaultColor||r.AnnotationEditor._defaultLineColor,this.#Ge=t.fontSize||a._defaultFontSize}static initialize(t){r.AnnotationEditor.initialize(t,{strings:["free_text2_default_content","editor_free_text2_aria_label"]});const e=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(e.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t,e){switch(t){case i.AnnotationEditorParamsType.FREETEXT_SIZE:a._defaultFontSize=e;break;case i.AnnotationEditorParamsType.FREETEXT_COLOR:a._defaultColor=e}}updateParams(t,e){switch(t){case i.AnnotationEditorParamsType.FREETEXT_SIZE:this.#Xe(e);break;case i.AnnotationEditorParamsType.FREETEXT_COLOR:this.#We(e)}}static get defaultPropertiesToUpdate(){return[[i.AnnotationEditorParamsType.FREETEXT_SIZE,a._defaultFontSize],[i.AnnotationEditorParamsType.FREETEXT_COLOR,a._defaultColor||r.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[i.AnnotationEditorParamsType.FREETEXT_SIZE,this.#Ge],[i.AnnotationEditorParamsType.FREETEXT_COLOR,this.#Ue]]}#Xe(t){const e=t=>{this.editorDiv.style.fontSize=`calc(${t}px * var(--scale-factor))`,this.translate(0,-(t-this.#Ge)*this.parentScale),this.#Ge=t,this.#ze()},s=this.#Ge;this.addCommands({cmd:()=>{e(t)},undo:()=>{e(s)},mustExec:!0,type:i.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#We(t){const e=this.#Ue;this.addCommands({cmd:()=>{this.#Ue=this.editorDiv.style.color=t},undo:()=>{this.#Ue=this.editorDiv.style.color=e},mustExec:!0,type:i.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(t,e){this._uiManager.translateSelectedEditors(t,e,!0)}getInitialTranslation(){const t=this.parentScale;return[-a._internalPadding*t,-(a._internalPadding+this.#Ge)*t]}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(i.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",this.#$e),this.editorDiv.addEventListener("focus",this.#Le),this.editorDiv.addEventListener("blur",this.#Ne),this.editorDiv.addEventListener("input",this.#Be))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#He),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",this.#$e),this.editorDiv.removeEventListener("focus",this.#Le),this.editorDiv.removeEventListener("blur",this.#Ne),this.editorDiv.removeEventListener("input",this.#Be),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(t){this._focusEventsAllowed&&(super.focusin(t),t.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){this.width?this.#Ve():(this.enableEditMode(),this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing")),super.remove()}#Ke(){const t=this.editorDiv.getElementsByTagName("div");if(0===t.length)return this.editorDiv.innerText;const e=[];for(const s of t)e.push(s.innerText.replace(/\r\n?|\n/,""));return e.join("\n")}#ze(){const[t,e]=this.parentDimensions;let s;if(this.isAttachedToDOM)s=this.div.getBoundingClientRect();else{const{currentLayer:t,div:e}=this,i=e.style.display;e.style.display="hidden",t.div.append(this.div),s=e.getBoundingClientRect(),e.remove(),e.style.display=i}this.rotation%180==this.parentRotation%180?(this.width=s.width/t,this.height=s.height/e):(this.width=s.height/t,this.height=s.width/e),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const t=this.#je,e=this.#je=this.#Ke().trimEnd();if(t===e)return;const s=t=>{this.#je=t,t?(this.#Je(),this._uiManager.rebuild(this),this.#ze()):this.remove()};this.addCommands({cmd:()=>{s(e)},undo:()=>{s(t)},mustExec:!1}),this.#ze()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(t){this.enterInEditMode()}keydown(t){t.target===this.div&&"Enter"===t.key&&(this.enterInEditMode(),t.preventDefault())}editorDivKeydown(t){a._keyboardManager.exec(this,t)}editorDivFocus(t){this.isEditing=!0}editorDivBlur(t){this.isEditing=!1}editorDivInput(t){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let t,e;this.width&&(t=this.x,e=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#He),this.enableEditing(),r.AnnotationEditor._l10nPromise.get("editor_free_text2_aria_label").then((t=>this.editorDiv?.setAttribute("aria-label",t))),r.AnnotationEditor._l10nPromise.get("free_text2_default_content").then((t=>this.editorDiv?.setAttribute("default-content",t))),this.editorDiv.contentEditable=!0;const{style:s}=this.editorDiv;if(s.fontSize=`calc(${this.#Ge}px * var(--scale-factor))`,s.color=this.#Ue,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,n.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[s,i]=this.parentDimensions;if(this.annotationElementId){const{position:n}=this.#qe;let[r,o]=this.getInitialTranslation();[r,o]=this.pageTranslationToScreen(r,o);const[a,c]=this.pageDimensions,[h,l]=this.pageTranslation;let u,f;switch(this.rotation){case 0:u=t+(n[0]-h)/a,f=e+this.height-(n[1]-l)/c;break;case 90:u=t+(n[0]-h)/a,f=e-(n[1]-l)/c,[r,o]=[o,-r];break;case 180:u=t-this.width+(n[0]-h)/a,f=e-(n[1]-l)/c,[r,o]=[-r,-o];break;case 270:u=t+(n[0]-h-this.height*c)/a,f=e+(n[1]-l-this.width*a)/c,[r,o]=[-o,r]}this.setAt(u*s,f*i,r,o)}else this.setAt(t*s,e*i,this.width*s,this.height*i);this.#Je(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}#Je(){if(this.editorDiv.replaceChildren(),this.#je)for(const t of this.#je.split("\n")){const e=document.createElement("div");e.append(t?document.createTextNode(t):document.createElement("br")),this.editorDiv.append(e)}}get contentDiv(){return this.editorDiv}static deserialize(t,e,s){let n=null;if(t instanceof o.FreeTextAnnotationElement){const{data:{defaultAppearanceData:{fontSize:e,fontColor:s},rect:r,rotation:o,id:a},textContent:c,textPosition:h,parent:{page:{pageNumber:l}}}=t;if(!c||0===c.length)return null;n=t={annotationType:i.AnnotationEditorType.FREETEXT,color:Array.from(s),fontSize:e,value:c.join("\n"),position:h,pageIndex:l-1,rect:r,rotation:o,id:a,deleted:!1}}const r=super.deserialize(t,e,s);return r.#Ge=t.fontSize,r.#Ue=i.Util.makeHexColor(...t.color),r.#je=t.value,r.annotationElementId=t.id||null,r.#qe=n,r}serialize(t=!1){if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const e=a._internalPadding*this.parentScale,s=this.getRect(e,e),n=r.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#Ue),o={annotationType:i.AnnotationEditorType.FREETEXT,color:n,fontSize:this.#Ge,value:this.#je,pageIndex:this.pageIndex,rect:s,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return t?o:this.annotationElementId&&!this.#Ye(o)?null:(o.id=this.annotationElementId,o)}#Ye(t){const{value:e,fontSize:s,color:i,rect:n,pageIndex:r}=this.#qe;return t.value!==e||t.fontSize!==s||t.rect.some(((t,e)=>Math.abs(t-n[e])>=1))||t.color.some(((t,e)=>t!==i[e]))||t.pageIndex!==r}#Ve(t=!1){if(!this.annotationElementId)return;if(this.#ze(),!t&&(0===this.width||0===this.height))return void setTimeout((()=>this.#Ve(!0)),0);const e=a._internalPadding*this.parentScale;this.#qe.rect=this.getRect(e,e)}}e.FreeTextEditor=a},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.StampAnnotationElement=e.InkAnnotationElement=e.FreeTextAnnotationElement=e.AnnotationLayer=void 0;var i=s(1),n=s(6),r=s(3),o=s(30),a=s(31),c=s(32);const h=1e3,l=new WeakSet;function u(t){return{width:t[2]-t[0],height:t[3]-t[1]}}class f{static create(t){switch(t.data.annotationType){case i.AnnotationType.LINK:return new p(t);case i.AnnotationType.TEXT:return new g(t);case i.AnnotationType.WIDGET:switch(t.data.fieldType){case"Tx":return new w(t);case"Btn":return t.data.radioButton?new A(t):t.data.checkBox?new y(t):new v(t);case"Ch":return new x(t);case"Sig":return new b(t)}return new m(t);case i.AnnotationType.POPUP:return new k(t);case i.AnnotationType.FREETEXT:return new M(t);case i.AnnotationType.LINE:return new C(t);case i.AnnotationType.SQUARE:return new _(t);case i.AnnotationType.CIRCLE:return new I(t);case i.AnnotationType.POLYLINE:return new F(t);case i.AnnotationType.CARET:return new E(t);case i.AnnotationType.INK:return new T(t);case i.AnnotationType.POLYGON:return new O(t);case i.AnnotationType.HIGHLIGHT:return new D(t);case i.AnnotationType.UNDERLINE:return new P(t);case i.AnnotationType.SQUIGGLY:return new R(t);case i.AnnotationType.STRIKEOUT:return new N(t);case i.AnnotationType.STAMP:return new L(t);case i.AnnotationType.FILEATTACHMENT:return new B(t);default:return new d(t)}}}class d{#Qe=!1;constructor(t,{isRenderable:e=!1,ignoreBorder:s=!1,createQuadrilaterals:i=!1}={}){this.isRenderable=e,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,e&&(this.container=this._createContainer(s)),i&&this._createQuadrilaterals()}static _hasPopupData({titleObj:t,contentsObj:e,richText:s}){return!!(t?.str||e?.str||s?.str)}get hasPopupData(){return d._hasPopupData(this.data)}_createContainer(t){const{data:e,parent:{page:s,viewport:n}}=this,r=document.createElement("section");r.setAttribute("data-annotation-id",e.id),this instanceof m||(r.tabIndex=h),r.style.zIndex=this.parent.zIndex++,this.data.popupRef&&r.setAttribute("aria-haspopup","dialog"),e.noRotate&&r.classList.add("norotate");const{pageWidth:o,pageHeight:a,pageX:c,pageY:l}=n.rawDims;if(!e.rect||this instanceof k){const{rotation:t}=e;return e.hasOwnCanvas||0===t||this.setRotation(t,r),r}const{width:f,height:d}=u(e.rect),p=i.Util.normalizeRect([e.rect[0],s.view[3]-e.rect[1]+s.view[1],e.rect[2],s.view[3]-e.rect[3]+s.view[1]]);if(!t&&e.borderStyle.width>0){r.style.borderWidth=`${e.borderStyle.width}px`;const t=e.borderStyle.horizontalCornerRadius,s=e.borderStyle.verticalCornerRadius;switch(t>0||s>0?r.style.borderRadius=`calc(${t}px * var(--scale-factor)) / calc(${s}px * var(--scale-factor))`:this instanceof A&&(r.style.borderRadius=`calc(${f}px * var(--scale-factor)) / calc(${d}px * var(--scale-factor))`),e.borderStyle.style){case i.AnnotationBorderStyleType.SOLID:r.style.borderStyle="solid";break;case i.AnnotationBorderStyleType.DASHED:r.style.borderStyle="dashed";break;case i.AnnotationBorderStyleType.BEVELED:(0,i.warn)("Unimplemented border style: beveled");break;case i.AnnotationBorderStyleType.INSET:(0,i.warn)("Unimplemented border style: inset");break;case i.AnnotationBorderStyleType.UNDERLINE:r.style.borderBottomStyle="solid"}const n=e.borderColor||null;n?(this.#Qe=!0,r.style.borderColor=i.Util.makeHexColor(0|n[0],0|n[1],0|n[2])):r.style.borderWidth=0}r.style.left=100*(p[0]-c)/o+"%",r.style.top=100*(p[1]-l)/a+"%";const{rotation:g}=e;return e.hasOwnCanvas||0===g?(r.style.width=100*f/o+"%",r.style.height=100*d/a+"%"):this.setRotation(g,r),r}setRotation(t,e=this.container){if(!this.data.rect)return;const{pageWidth:s,pageHeight:i}=this.parent.viewport.rawDims,{width:n,height:r}=u(this.data.rect);let o,a;t%180==0?(o=100*n/s,a=100*r/i):(o=100*r/s,a=100*n/i),e.style.width=`${o}%`,e.style.height=`${a}%`,e.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const t=(t,e,s)=>{const i=s.detail[t],n=i[0],r=i.slice(1);s.target.style[e]=o.ColorConverters[`${n}_HTML`](r),this.annotationStorage.setValue(this.data.id,{[e]:o.ColorConverters[`${n}_rgb`](r)})};return(0,i.shadow)(this,"_commonActions",{display:t=>{const{display:e}=t.detail,s=e%2==1;this.container.style.visibility=s?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:s,noPrint:1===e||2===e})},print:t=>{this.annotationStorage.setValue(this.data.id,{noPrint:!t.detail.print})},hidden:t=>{const{hidden:e}=t.detail;this.container.style.visibility=e?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:e,noView:e})},focus:t=>{setTimeout((()=>t.target.focus({preventScroll:!1})),0)},userName:t=>{t.target.title=t.detail.userName},readonly:t=>{t.target.disabled=t.detail.readonly},required:t=>{this._setRequired(t.target,t.detail.required)},bgColor:e=>{t("bgColor","backgroundColor",e)},fillColor:e=>{t("fillColor","backgroundColor",e)},fgColor:e=>{t("fgColor","color",e)},textColor:e=>{t("textColor","color",e)},borderColor:e=>{t("borderColor","borderColor",e)},strokeColor:e=>{t("strokeColor","borderColor",e)},rotation:t=>{const e=t.detail.rotation;this.setRotation(e),this.annotationStorage.setValue(this.data.id,{rotation:e})}})}_dispatchEventFromSandbox(t,e){const s=this._commonActions;for(const i of Object.keys(e.detail)){const n=t[i]||s[i];n?.(e)}}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const e=this.annotationStorage.getRawValue(this.data.id);if(!e)return;const s=this._commonActions;for(const[i,n]of Object.entries(e)){const r=s[i];r&&(r({detail:{[i]:n},target:t}),delete e[i])}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[e,s,i,n]=this.data.rect;if(1===t.length){const[,{x:r,y:o},{x:a,y:c}]=t[0];if(i===r&&n===o&&e===a&&s===c)return}const{style:r}=this.container;let o;if(this.#Qe){const{borderColor:t,borderWidth:e}=r;r.borderWidth=0,o=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${t}" stroke-width="${e}">`],this.container.classList.add("hasBorder")}const a=i-e,c=n-s,{svgFactory:h}=this,l=h.createElement("svg");l.classList.add("quadrilateralsContainer"),l.setAttribute("width",0),l.setAttribute("height",0);const u=h.createElement("defs");l.append(u);const f=h.createElement("clipPath"),d=`clippath_${this.data.id}`;f.setAttribute("id",d),f.setAttribute("clipPathUnits","objectBoundingBox"),u.append(f);for(const[,{x:s,y:i},{x:r,y:l}]of t){const t=h.createElement("rect"),u=(r-e)/a,d=(n-i)/c,p=(s-r)/a,g=(i-l)/c;t.setAttribute("x",u),t.setAttribute("y",d),t.setAttribute("width",p),t.setAttribute("height",g),f.append(t),o?.push(`<rect vector-effect="non-scaling-stroke" x="${u}" y="${d}" width="${p}" height="${g}"/>`)}this.#Qe&&(o.push("</g></svg>')"),r.backgroundImage=o.join("")),this.container.append(l),this.container.style.clipPath=`url(#${d})`}_createPopup(){const{container:t,data:e}=this;t.setAttribute("aria-haspopup","dialog");const s=new k({data:{color:e.color,titleObj:e.titleObj,modificationDate:e.modificationDate,contentsObj:e.contentsObj,richText:e.richText,parentRect:e.rect,borderStyle:0,id:`popup_${e.id}`,rotation:e.rotation},parent:this.parent,elements:[this]});this.parent.div.append(s.render())}render(){(0,i.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(t,e=null){const s=[];if(this._fieldObjects){const n=this._fieldObjects[t];if(n)for(const{page:t,id:r,exportValues:o}of n){if(-1===t)continue;if(r===e)continue;const n="string"==typeof o?o:null,a=document.querySelector(`[data-element-id="${r}"]`);!a||l.has(a)?s.push({id:r,exportValue:n,domElement:a}):(0,i.warn)(`_getElementsByName - element not allowed: ${r}`)}return s}for(const i of document.getElementsByName(t)){const{exportValue:t}=i,n=i.getAttribute("data-element-id");n!==e&&l.has(i)&&s.push({id:n,exportValue:t,domElement:i})}return s}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const e of t)e.classList.add("highlightArea");else t.classList.add("highlightArea")}_editOnDoubleClick(){const{annotationEditorType:t,data:{id:e}}=this;this.container.addEventListener("dblclick",(()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:t,editId:e})}))}}class p extends d{constructor(t,e=null){super(t,{isRenderable:!0,ignoreBorder:!!e?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:e}=this,s=document.createElement("a");s.setAttribute("data-element-id",t.id);let i=!1;return t.url?(e.addLinkAttributes(s,t.url,t.newWindow),i=!0):t.action?(this._bindNamedAction(s,t.action),i=!0):t.attachment?(this._bindAttachment(s,t.attachment),i=!0):t.setOCGState?(this.#Ze(s,t.setOCGState),i=!0):t.dest?(this._bindLink(s,t.dest),i=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(s,t),i=!0),t.resetForm?(this._bindResetFormAction(s,t.resetForm),i=!0):this.isTooltipOnly&&!i&&(this._bindLink(s,""),i=!0)),this.container.classList.add("linkAnnotation"),i&&this.container.append(s),this.container}#ts(){this.container.setAttribute("data-internal-link","")}_bindLink(t,e){t.href=this.linkService.getDestinationHash(e),t.onclick=()=>(e&&this.linkService.goToDestination(e),!1),(e||""===e)&&this.#ts()}_bindNamedAction(t,e){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(e),!1),this.#ts()}_bindAttachment(t,e){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.downloadManager?.openOrDownloadData(this.container,e.content,e.filename),!1),this.#ts()}#Ze(t,e){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeSetOCGState(e),!1),this.#ts()}_bindJSAction(t,e){t.href=this.linkService.getAnchorUrl("");const s=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const i of Object.keys(e.actions)){const n=s.get(i);n&&(t[n]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e.id,name:i}}),!1))}t.onclick||(t.onclick=()=>!1),this.#ts()}_bindResetFormAction(t,e){const s=t.onclick;if(s||(t.href=this.linkService.getAnchorUrl("")),this.#ts(),!this._fieldObjects)return(0,i.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(s||(t.onclick=()=>!1));t.onclick=()=>{s?.();const{fields:t,refs:n,include:r}=e,o=[];if(0!==t.length||0!==n.length){const e=new Set(n);for(const s of t){const t=this._fieldObjects[s]||[];for(const{id:s}of t)e.add(s)}for(const t of Object.values(this._fieldObjects))for(const s of t)e.has(s.id)===r&&o.push(s)}else for(const t of Object.values(this._fieldObjects))o.push(...t);const a=this.annotationStorage,c=[];for(const t of o){const{id:e}=t;switch(c.push(e),t.type){case"text":case"combobox":case"listbox":a.setValue(e,{value:t.defaultValue||""});break;case"checkbox":case"radiobutton":a.setValue(e,{value:t.defaultValue===t.exportValues});break;default:continue}const s=document.querySelector(`[data-element-id="${e}"]`);s&&(l.has(s)?s.dispatchEvent(new Event("resetform")):(0,i.warn)(`_bindResetFormAction - element not allowed: ${e}`))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:c,name:"ResetForm"}}),!1}}}class g extends d{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.alt="[{{type}} Annotation]",t.dataset.l10nId="text_annotation_type",t.dataset.l10nArgs=JSON.stringify({type:this.data.name}),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}}class m extends d{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas(t){this.data.hasOwnCanvas&&("CANVAS"===t.previousSibling?.nodeName&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){const{isWin:e,isMac:s}=i.FeatureTest.platform;return e&&t.ctrlKey||s&&t.metaKey}_setEventListener(t,e,s,i,n){s.includes("mouse")?t.addEventListener(s,(t=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:n(t),shift:t.shiftKey,modifier:this._getKeyModifier(t)}})})):t.addEventListener(s,(t=>{if("blur"===s){if(!e.focused||!t.relatedTarget)return;e.focused=!1}else if("focus"===s){if(e.focused)return;e.focused=!0}n&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:n(t)}})}))}_setEventListeners(t,e,s,i){for(const[n,r]of s)("Action"===r||this.data.actions?.[r])&&("Focus"!==r&&"Blur"!==r||(e||={focused:!1}),this._setEventListener(t,e,n,r,i),"Focus"!==r||this.data.actions?.Blur?"Blur"!==r||this.data.actions?.Focus||this._setEventListener(t,e,"focus","Focus",null):this._setEventListener(t,e,"blur","Blur",null))}_setBackgroundColor(t){const e=this.data.backgroundColor||null;t.style.backgroundColor=null===e?"transparent":i.Util.makeHexColor(e[0],e[1],e[2])}_setTextStyle(t){const{fontColor:e}=this.data.defaultAppearanceData,s=this.data.defaultAppearanceData.fontSize||9,n=t.style;let r;const o=t=>Math.round(10*t)/10;if(this.data.multiLine){const t=Math.abs(this.data.rect[3]-this.data.rect[1]-2),e=Math.round(t/(i.LINE_FACTOR*s))||1;r=Math.min(s,o(t/e/i.LINE_FACTOR))}else{const t=Math.abs(this.data.rect[3]-this.data.rect[1]-2);r=Math.min(s,o(t/i.LINE_FACTOR))}n.fontSize=`calc(${r}px * var(--scale-factor))`,n.color=i.Util.makeHexColor(e[0],e[1],e[2]),null!==this.data.textAlignment&&(n.textAlign=["left","center","right"][this.data.textAlignment])}_setRequired(t,e){e?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",e)}}class w extends m{constructor(t){super(t,{isRenderable:t.renderForms||!t.data.hasAppearance&&!!t.data.fieldValue})}setPropertyOnSiblings(t,e,s,i){const n=this.annotationStorage;for(const r of this._getElementsByName(t.name,t.id))r.domElement&&(r.domElement[e]=s),n.setValue(r.id,{[i]:s})}render(){const t=this.annotationStorage,e=this.data.id;this.container.classList.add("textWidgetAnnotation");let s=null;if(this.renderForms){const i=t.getValue(e,{value:this.data.fieldValue});let n=i.value||"";const r=t.getValue(e,{charLimit:this.data.maxLen}).charLimit;r&&n.length>r&&(n=n.slice(0,r));let o=i.formattedValue||this.data.textContent?.join("\n")||null;o&&this.data.comb&&(o=o.replaceAll(/\s+/g,""));const a={userValue:n,formattedValue:o,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(s=document.createElement("textarea"),s.textContent=o??n,this.data.doNotScroll&&(s.style.overflowY="hidden")):(s=document.createElement("input"),s.type="text",s.setAttribute("value",o??n),this.data.doNotScroll&&(s.style.overflowX="hidden")),this.data.hasOwnCanvas&&(s.hidden=!0),l.add(s),s.setAttribute("data-element-id",e),s.disabled=this.data.readOnly,s.name=this.data.fieldName,s.tabIndex=h,this._setRequired(s,this.data.required),r&&(s.maxLength=r),s.addEventListener("input",(i=>{t.setValue(e,{value:i.target.value}),this.setPropertyOnSiblings(s,"value",i.target.value,"value"),a.formattedValue=null})),s.addEventListener("resetform",(()=>{s.value=a.userValue=this.data.defaultFieldValue??"",a.formattedValue=null}));let c=t=>{const{formattedValue:e}=a;null!=e&&(t.target.value=e),t.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){s.addEventListener("focus",(t=>{if(a.focused)return;const{target:e}=t;a.userValue&&(e.value=a.userValue),a.lastCommittedValue=e.value,a.commitKey=1,a.focused=!0})),s.addEventListener("updatefromsandbox",(s=>{this.showElementAndHideCanvas(s.target),this._dispatchEventFromSandbox({value(s){a.userValue=s.detail.value??"",t.setValue(e,{value:a.userValue.toString()}),s.target.value=a.userValue},formattedValue(s){const{formattedValue:i}=s.detail;a.formattedValue=i,null!=i&&s.target!==document.activeElement&&(s.target.value=i),t.setValue(e,{formattedValue:i})},selRange(t){t.target.setSelectionRange(...t.detail.selRange)},charLimit:s=>{const{charLimit:i}=s.detail,{target:n}=s;if(0===i)return void n.removeAttribute("maxLength");n.setAttribute("maxLength",i);let r=a.userValue;!r||r.length<=i||(r=r.slice(0,i),n.value=a.userValue=r,t.setValue(e,{value:r}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:r,willCommit:!0,commitKey:1,selStart:n.selectionStart,selEnd:n.selectionEnd}}))}},s)})),s.addEventListener("keydown",(t=>{a.commitKey=1;let s=-1;if("Escape"===t.key?s=0:"Enter"!==t.key||this.data.multiLine?"Tab"===t.key&&(a.commitKey=3):s=2,-1===s)return;const{value:i}=t.target;a.lastCommittedValue!==i&&(a.lastCommittedValue=i,a.userValue=i,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:i,willCommit:!0,commitKey:s,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}))}));const i=c;c=null,s.addEventListener("blur",(t=>{if(!a.focused||!t.relatedTarget)return;a.focused=!1;const{value:s}=t.target;a.userValue=s,a.lastCommittedValue!==s&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:s,willCommit:!0,commitKey:a.commitKey,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}),i(t)})),this.data.actions?.Keystroke&&s.addEventListener("beforeinput",(t=>{a.lastCommittedValue=null;const{data:s,target:i}=t,{value:n,selectionStart:r,selectionEnd:o}=i;let c=r,h=o;switch(t.inputType){case"deleteWordBackward":{const t=n.substring(0,r).match(/\w*[^\w]*$/);t&&(c-=t[0].length);break}case"deleteWordForward":{const t=n.substring(r).match(/^[^\w]*\w*/);t&&(h+=t[0].length);break}case"deleteContentBackward":r===o&&(c-=1);break;case"deleteContentForward":r===o&&(h+=1)}t.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:n,change:s||"",willCommit:!1,selStart:c,selEnd:h}})})),this._setEventListeners(s,a,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(t=>t.target.value))}if(c&&s.addEventListener("blur",c),this.data.comb){const t=(this.data.rect[2]-this.data.rect[0])/r;s.classList.add("comb"),s.style.letterSpacing=`calc(${t}px * var(--scale-factor) - 1ch)`}}else s=document.createElement("div"),s.textContent=this.data.fieldValue,s.style.verticalAlign="middle",s.style.display="table-cell";return this._setTextStyle(s),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class b extends m{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class y extends m{constructor(t){super(t,{isRenderable:t.renderForms})}render(){const t=this.annotationStorage,e=this.data,s=e.id;let i=t.getValue(s,{value:e.exportValue===e.fieldValue}).value;"string"==typeof i&&(i="Off"!==i,t.setValue(s,{value:i})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const n=document.createElement("input");return l.add(n),n.setAttribute("data-element-id",s),n.disabled=e.readOnly,this._setRequired(n,this.data.required),n.type="checkbox",n.name=e.fieldName,i&&n.setAttribute("checked",!0),n.setAttribute("exportValue",e.exportValue),n.tabIndex=h,n.addEventListener("change",(i=>{const{name:n,checked:r}=i.target;for(const i of this._getElementsByName(n,s)){const s=r&&i.exportValue===e.exportValue;i.domElement&&(i.domElement.checked=s),t.setValue(i.id,{value:s})}t.setValue(s,{value:r})})),n.addEventListener("resetform",(t=>{t.target.checked=(e.defaultFieldValue||"Off")===e.exportValue})),this.enableScripting&&this.hasJSActions&&(n.addEventListener("updatefromsandbox",(e=>{this._dispatchEventFromSandbox({value(e){e.target.checked="Off"!==e.detail.value,t.setValue(s,{value:e.target.checked})}},e)})),this._setEventListeners(n,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(t=>t.target.checked))),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class A extends m{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const t=this.annotationStorage,e=this.data,s=e.id;let i=t.getValue(s,{value:e.fieldValue===e.buttonValue}).value;"string"==typeof i&&(i=i!==e.buttonValue,t.setValue(s,{value:i}));const n=document.createElement("input");if(l.add(n),n.setAttribute("data-element-id",s),n.disabled=e.readOnly,this._setRequired(n,this.data.required),n.type="radio",n.name=e.fieldName,i&&n.setAttribute("checked",!0),n.tabIndex=h,n.addEventListener("change",(e=>{const{name:i,checked:n}=e.target;for(const e of this._getElementsByName(i,s))t.setValue(e.id,{value:!1});t.setValue(s,{value:n})})),n.addEventListener("resetform",(t=>{const s=e.defaultFieldValue;t.target.checked=null!=s&&s===e.buttonValue})),this.enableScripting&&this.hasJSActions){const i=e.buttonValue;n.addEventListener("updatefromsandbox",(e=>{this._dispatchEventFromSandbox({value:e=>{const n=i===e.detail.value;for(const i of this._getElementsByName(e.target.name)){const e=n&&i.id===s;i.domElement&&(i.domElement.checked=e),t.setValue(i.id,{value:e})}}},e)})),this._setEventListeners(n,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(t=>t.target.checked))}return this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class v extends p{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){const t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(t.title=this.data.alternativeText);const e=t.lastChild;return this.enableScripting&&this.hasJSActions&&e&&(this._setDefaultPropertiesFromJS(e),e.addEventListener("updatefromsandbox",(t=>{this._dispatchEventFromSandbox({},t)}))),t}}class x extends m{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const t=this.annotationStorage,e=this.data.id,s=t.getValue(e,{value:this.data.fieldValue}),i=document.createElement("select");l.add(i),i.setAttribute("data-element-id",e),i.disabled=this.data.readOnly,this._setRequired(i,this.data.required),i.name=this.data.fieldName,i.tabIndex=h;let n=this.data.combo&&this.data.options.length>0;this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0)),i.addEventListener("resetform",(()=>{const t=this.data.defaultFieldValue;for(const e of i.options)e.selected=e.value===t}));for(const t of this.data.options){const e=document.createElement("option");e.textContent=t.displayValue,e.value=t.exportValue,s.value.includes(t.exportValue)&&(e.setAttribute("selected",!0),n=!1),i.append(e)}let r=null;if(n){const t=document.createElement("option");t.value=" ",t.setAttribute("hidden",!0),t.setAttribute("selected",!0),i.prepend(t),r=()=>{t.remove(),i.removeEventListener("input",r),r=null},i.addEventListener("input",r)}const o=t=>{const e=t?"value":"textContent",{options:s,multiple:n}=i;return n?Array.prototype.filter.call(s,(t=>t.selected)).map((t=>t[e])):-1===s.selectedIndex?null:s[s.selectedIndex][e]};let a=o(!1);const c=t=>Array.prototype.map.call(t.target.options,(t=>({displayValue:t.textContent,exportValue:t.value})));return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",(s=>{this._dispatchEventFromSandbox({value(s){r?.();const n=s.detail.value,c=new Set(Array.isArray(n)?n:[n]);for(const t of i.options)t.selected=c.has(t.value);t.setValue(e,{value:o(!0)}),a=o(!1)},multipleSelection(t){i.multiple=!0},remove(s){const n=i.options,r=s.detail.remove;n[r].selected=!1,i.remove(r),n.length>0&&-1===Array.prototype.findIndex.call(n,(t=>t.selected))&&(n[0].selected=!0),t.setValue(e,{value:o(!0),items:c(s)}),a=o(!1)},clear(s){for(;0!==i.length;)i.remove(0);t.setValue(e,{value:null,items:[]}),a=o(!1)},insert(s){const{index:n,displayValue:r,exportValue:h}=s.detail.insert,l=i.children[n],u=document.createElement("option");u.textContent=r,u.value=h,l?l.before(u):i.append(u),t.setValue(e,{value:o(!0),items:c(s)}),a=o(!1)},items(s){const{items:n}=s.detail;for(;0!==i.length;)i.remove(0);for(const t of n){const{displayValue:e,exportValue:s}=t,n=document.createElement("option");n.textContent=e,n.value=s,i.append(n)}i.options.length>0&&(i.options[0].selected=!0),t.setValue(e,{value:o(!0),items:c(s)}),a=o(!1)},indices(s){const i=new Set(s.detail.indices);for(const t of s.target.options)t.selected=i.has(t.index);t.setValue(e,{value:o(!0)}),a=o(!1)},editable(t){t.target.disabled=!t.detail.editable}},s)})),i.addEventListener("input",(s=>{const i=o(!0);t.setValue(e,{value:i}),s.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:a,changeEx:i,willCommit:!1,commitKey:1,keyDown:!1}})})),this._setEventListeners(i,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(t=>t.target.value))):i.addEventListener("input",(function(){t.setValue(e,{value:o(!0)})})),this.data.combo&&this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class k extends d{constructor(t){const{data:e,elements:s}=t;super(t,{isRenderable:d._hasPopupData(e)}),this.elements=s}render(){this.container.classList.add("popupAnnotation");const t=new S({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),e=[];for(const s of this.elements)s.popup=t,e.push(s.data.id),s.addHighlightArea();return this.container.setAttribute("aria-controls",e.map((t=>`${i.AnnotationPrefix}${t}`)).join(",")),this.container}}class S{#es=null;#ss=this.#is.bind(this);#ns=this.#rs.bind(this);#os=this.#as.bind(this);#cs=this.#hs.bind(this);#Ue=null;#Tt=null;#ls=null;#us=null;#fs=null;#ds=null;#ps=!1;#gs=null;#ms=null;#ws=null;#bs=null;#ys=!1;constructor({container:t,color:e,elements:s,titleObj:i,modificationDate:r,contentsObj:o,richText:a,parent:c,rect:h,parentRect:l,open:u}){this.#Tt=t,this.#bs=i,this.#ls=o,this.#ws=a,this.#fs=c,this.#Ue=e,this.#ms=h,this.#ds=l,this.#us=s;const f=n.PDFDateString.toDateObject(r);f&&(this.#es=c.l10n.get("annotation_date_string",{date:f.toLocaleDateString(),time:f.toLocaleTimeString()})),this.trigger=s.flatMap((t=>t.getElementsToTriggerPopup()));for(const t of this.trigger)t.addEventListener("click",this.#cs),t.addEventListener("mouseenter",this.#os),t.addEventListener("mouseleave",this.#ns),t.classList.add("popupTriggerArea");for(const t of s)t.container?.addEventListener("keydown",this.#ss);this.#Tt.hidden=!0,u&&this.#hs()}render(){if(this.#gs)return;const{page:{view:t},viewport:{rawDims:{pageWidth:e,pageHeight:s,pageX:n,pageY:r}}}=this.#fs,o=this.#gs=document.createElement("div");if(o.className="popup",this.#Ue){const t=o.style.outlineColor=i.Util.makeHexColor(...this.#Ue);if(CSS.supports("background-color","color-mix(in srgb, red 30%, white)"))o.style.backgroundColor=`color-mix(in srgb, ${t} 30%, white)`;else{const t=.7;o.style.backgroundColor=i.Util.makeHexColor(...this.#Ue.map((e=>Math.floor(t*(255-e)+e))))}}const a=document.createElement("span");a.className="header";const h=document.createElement("h1");if(a.append(h),({dir:h.dir,str:h.textContent}=this.#bs),o.append(a),this.#es){const t=document.createElement("span");t.classList.add("popupDate"),this.#es.then((e=>{t.textContent=e})),a.append(t)}const l=this.#ls,u=this.#ws;if(!u?.str||l?.str&&l.str!==u.str){const t=this._formatContents(l);o.append(t)}else c.XfaLayer.render({xfaHtml:u.html,intent:"richText",div:o}),o.lastChild.classList.add("richText","popupContent");let f=!!this.#ds,d=f?this.#ds:this.#ms;for(const t of this.#us)if(!d||null!==i.Util.intersect(t.data.rect,d)){d=t.data.rect,f=!0;break}const p=i.Util.normalizeRect([d[0],t[3]-d[1]+t[1],d[2],t[3]-d[3]+t[1]]),g=p[0]+(f?d[2]-d[0]+5:0),m=p[1],{style:w}=this.#Tt;w.left=100*(g-n)/e+"%",w.top=100*(m-r)/s+"%",this.#Tt.append(o)}_formatContents({str:t,dir:e}){const s=document.createElement("p");s.classList.add("popupContent"),s.dir=e;const i=t.split(/(?:\r\n?|\n)/);for(let t=0,e=i.length;t<e;++t)s.append(document.createTextNode(i[t])),t<e-1&&s.append(document.createElement("br"));return s}#is(t){t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||("Enter"===t.key||"Escape"===t.key&&this.#ps)&&this.#hs()}#hs(){this.#ps=!this.#ps,this.#ps?(this.#as(),this.#Tt.addEventListener("click",this.#cs),this.#Tt.addEventListener("keydown",this.#ss)):(this.#rs(),this.#Tt.removeEventListener("click",this.#cs),this.#Tt.removeEventListener("keydown",this.#ss))}#as(){this.#gs||this.render(),this.isVisible?this.#ps&&this.#Tt.classList.add("focused"):(this.#Tt.hidden=!1,this.#Tt.style.zIndex=parseInt(this.#Tt.style.zIndex)+1e3)}#rs(){this.#Tt.classList.remove("focused"),!this.#ps&&this.isVisible&&(this.#Tt.hidden=!0,this.#Tt.style.zIndex=parseInt(this.#Tt.style.zIndex)-1e3)}forceHide(){this.#ys=this.isVisible,this.#ys&&(this.#Tt.hidden=!0)}maybeShow(){this.#ys&&(this.#ys=!1,this.#Tt.hidden=!1)}get isVisible(){return!1===this.#Tt.hidden}}class M extends d{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.textContent=t.data.textContent,this.textPosition=t.data.textPosition,this.annotationEditorType=i.AnnotationEditorType.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const t=document.createElement("div");t.classList.add("annotationTextContent"),t.setAttribute("role","comment");for(const e of this.textContent){const s=document.createElement("span");s.textContent=e,t.append(s)}this.container.append(t)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}e.FreeTextAnnotationElement=M;class C extends d{#As=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const t=this.data,{width:e,height:s}=u(t.rect),i=this.svgFactory.create(e,s,!0),n=this.#As=this.svgFactory.createElement("svg:line");return n.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]),n.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]),n.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]),n.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]),n.setAttribute("stroke-width",t.borderStyle.width||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","transparent"),i.append(n),this.container.append(i),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#As}addHighlightArea(){this.container.classList.add("highlightArea")}}class _ extends d{#vs=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const t=this.data,{width:e,height:s}=u(t.rect),i=this.svgFactory.create(e,s,!0),n=t.borderStyle.width,r=this.#vs=this.svgFactory.createElement("svg:rect");return r.setAttribute("x",n/2),r.setAttribute("y",n/2),r.setAttribute("width",e-n),r.setAttribute("height",s-n),r.setAttribute("stroke-width",n||1),r.setAttribute("stroke","transparent"),r.setAttribute("fill","transparent"),i.append(r),this.container.append(i),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#vs}addHighlightArea(){this.container.classList.add("highlightArea")}}class I extends d{#xs=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const t=this.data,{width:e,height:s}=u(t.rect),i=this.svgFactory.create(e,s,!0),n=t.borderStyle.width,r=this.#xs=this.svgFactory.createElement("svg:ellipse");return r.setAttribute("cx",e/2),r.setAttribute("cy",s/2),r.setAttribute("rx",e/2-n/2),r.setAttribute("ry",s/2-n/2),r.setAttribute("stroke-width",n||1),r.setAttribute("stroke","transparent"),r.setAttribute("fill","transparent"),i.append(r),this.container.append(i),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#xs}addHighlightArea(){this.container.classList.add("highlightArea")}}class F extends d{#ks=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const t=this.data,{width:e,height:s}=u(t.rect),i=this.svgFactory.create(e,s,!0);let n=[];for(const e of t.vertices)n.push(e.x-t.rect[0]+","+(t.rect[3]-e.y));n=n.join(" ");const r=this.#ks=this.svgFactory.createElement(this.svgElementName);return r.setAttribute("points",n),r.setAttribute("stroke-width",t.borderStyle.width||1),r.setAttribute("stroke","transparent"),r.setAttribute("fill","transparent"),i.append(r),this.container.append(i),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#ks}addHighlightArea(){this.container.classList.add("highlightArea")}}class O extends F{constructor(t){super(t),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class E extends d{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class T extends d{#Ss=[];constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=i.AnnotationEditorType.INK}render(){this.container.classList.add(this.containerClassName);const t=this.data,{width:e,height:s}=u(t.rect),i=this.svgFactory.create(e,s,!0);for(const e of t.inkLists){let s=[];for(const i of e)s.push(`${i.x-t.rect[0]},${t.rect[3]-i.y}`);s=s.join(" ");const n=this.svgFactory.createElement(this.svgElementName);this.#Ss.push(n),n.setAttribute("points",s),n.setAttribute("stroke-width",t.borderStyle.width||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","transparent"),!t.popupRef&&this.hasPopupData&&this._createPopup(),i.append(n)}return this.container.append(i),this.container}getElementsToTriggerPopup(){return this.#Ss}addHighlightArea(){this.container.classList.add("highlightArea")}}e.InkAnnotationElement=T;class D extends d{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this.container}}class P extends d{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class R extends d{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class N extends d{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class L extends d{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}e.StampAnnotationElement=L;class B extends d{#Ms=null;constructor(t){super(t,{isRenderable:!0});const{filename:e,content:s}=this.data.file;this.filename=(0,n.getFilenameFromUrl)(e,!0),this.content=s,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,filename:e,content:s})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:t,data:e}=this;let s;e.hasAppearance||0===e.fillAlpha?s=document.createElement("div"):(s=document.createElement("img"),s.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(e.name)?"paperclip":"pushpin"}.svg`,e.fillAlpha&&e.fillAlpha<1&&(s.style=`filter: opacity(${Math.round(100*e.fillAlpha)}%);`)),s.addEventListener("dblclick",this.#Cs.bind(this)),this.#Ms=s;const{isMac:n}=i.FeatureTest.platform;return t.addEventListener("keydown",(t=>{"Enter"===t.key&&(n?t.metaKey:t.ctrlKey)&&this.#Cs()})),!e.popupRef&&this.hasPopupData?this._createPopup():s.classList.add("popupTriggerArea"),t.append(s),t}getElementsToTriggerPopup(){return this.#Ms}addHighlightArea(){this.container.classList.add("highlightArea")}#Cs(){this.downloadManager?.openOrDownloadData(this.container,this.content,this.filename)}}e.AnnotationLayer=class{#xe=null;#_s=null;#Is=new Map;constructor({div:t,accessibilityManager:e,annotationCanvasMap:s,l10n:i,page:n,viewport:r}){this.div=t,this.#xe=e,this.#_s=s,this.l10n=i,this.page=n,this.viewport=r,this.zIndex=0,this.l10n||=a.NullL10n}#Fs(t,e){const s=t.firstChild||t;s.id=`${i.AnnotationPrefix}${e}`,this.div.append(t),this.#xe?.moveElementInDOM(this.div,t,s,!1)}async render(t){const{annotations:e}=t,s=this.div;(0,n.setLayerDimensions)(s,this.viewport);const o=new Map,a={data:null,layer:s,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:!1!==t.renderForms,svgFactory:new n.DOMSVGFactory,annotationStorage:t.annotationStorage||new r.AnnotationStorage,enableScripting:!0===t.enableScripting,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(const t of e){if(t.noHTML)continue;const e=t.annotationType===i.AnnotationType.POPUP;if(e){const e=o.get(t.id);if(!e)continue;a.elements=e}else{const{width:e,height:s}=u(t.rect);if(e<=0||s<=0)continue}a.data=t;const s=f.create(a);if(!s.isRenderable)continue;if(!e&&t.popupRef){const e=o.get(t.popupRef);e?e.push(s):o.set(t.popupRef,[s])}s.annotationEditorType>0&&this.#Is.set(s.data.id,s);const n=s.render();t.hidden&&(n.style.visibility="hidden"),this.#Fs(n,t.id)}this.#Os(),await this.l10n.translate(s)}update({viewport:t}){const e=this.div;this.viewport=t,(0,n.setLayerDimensions)(e,{rotation:t.rotation}),this.#Os(),e.hidden=!1}#Os(){if(!this.#_s)return;const t=this.div;for(const[e,s]of this.#_s){const i=t.querySelector(`[data-annotation-id="${e}"]`);if(!i)continue;const{firstChild:n}=i;n?"CANVAS"===n.nodeName?n.replaceWith(s):n.before(s):i.append(s)}this.#_s.clear()}getEditableAnnotations(){return Array.from(this.#Is.values())}getEditableAnnotation(t){return this.#Is.get(t)}}},(t,e)=>{function s(t){return Math.floor(255*Math.max(0,Math.min(1,t))).toString(16).padStart(2,"0")}function i(t){return Math.max(0,Math.min(255,255*t))}Object.defineProperty(e,"__esModule",{value:!0}),e.ColorConverters=void 0,e.ColorConverters=class{static CMYK_G([t,e,s,i]){return["G",1-Math.min(1,.3*t+.59*s+.11*e+i)]}static G_CMYK([t]){return["CMYK",0,0,0,1-t]}static G_RGB([t]){return["RGB",t,t,t]}static G_rgb([t]){return[t=i(t),t,t]}static G_HTML([t]){const e=s(t);return`#${e}${e}${e}`}static RGB_G([t,e,s]){return["G",.3*t+.59*e+.11*s]}static RGB_rgb(t){return t.map(i)}static RGB_HTML(t){return`#${t.map(s).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([t,e,s,i]){return["RGB",1-Math.min(1,t+i),1-Math.min(1,s+i),1-Math.min(1,e+i)]}static CMYK_rgb([t,e,s,n]){return[i(1-Math.min(1,t+n)),i(1-Math.min(1,s+n)),i(1-Math.min(1,e+n))]}static CMYK_HTML(t){const e=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(e)}static RGB_CMYK([t,e,s]){const i=1-t,n=1-e,r=1-s;return["CMYK",i,n,r,Math.min(i,n,r)]}}},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NullL10n=void 0,e.getL10nFallback=i;const s={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing…",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",editor_alt_text_button_label:"Alt text",editor_alt_text_edit_button_label:"Edit alt text",editor_alt_text_decorative_tooltip:"Marked as decorative"};function i(t,e){switch(t){case"find_match_count":t=`find_match_count[${1===e.total?"one":"other"}]`;break;case"find_match_count_limit":t=`find_match_count_limit[${1===e.limit?"one":"other"}]`}return s[t]||""}s.print_progress_percent="{{progress}}%",e.NullL10n={getLanguage:async()=>"en-us",getDirection:async()=>"ltr",get:async(t,e=null,s=i(t,e))=>function(t,e){return e?t.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,((t,s)=>s in e?e[s]:"{{"+s+"}}")):t}(s,e),async translate(t){}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.XfaLayer=void 0;var i=s(25);e.XfaLayer=class{static setupStorage(t,e,s,i,n){const r=i.getValue(e,{value:null});switch(s.name){case"textarea":if(null!==r.value&&(t.textContent=r.value),"print"===n)break;t.addEventListener("input",(t=>{i.setValue(e,{value:t.target.value})}));break;case"input":if("radio"===s.attributes.type||"checkbox"===s.attributes.type){if(r.value===s.attributes.xfaOn?t.setAttribute("checked",!0):r.value===s.attributes.xfaOff&&t.removeAttribute("checked"),"print"===n)break;t.addEventListener("change",(t=>{i.setValue(e,{value:t.target.getAttribute(t.target.checked?"xfaOn":"xfaOff")})}))}else{if(null!==r.value&&t.setAttribute("value",r.value),"print"===n)break;t.addEventListener("input",(t=>{i.setValue(e,{value:t.target.value})}))}break;case"select":if(null!==r.value){t.setAttribute("value",r.value);for(const t of s.children)t.attributes.value===r.value?t.attributes.selected=!0:t.attributes.hasOwnProperty("selected")&&delete t.attributes.selected}t.addEventListener("input",(t=>{const s=t.target.options;i.setValue(e,{value:-1===s.selectedIndex?"":s[s.selectedIndex].value})}))}}static setAttributes({html:t,element:e,storage:s=null,intent:i,linkService:n}){const{attributes:r}=e,o=t instanceof HTMLAnchorElement;"radio"===r.type&&(r.name=`${r.name}-${i}`);for(const[e,s]of Object.entries(r))if(null!=s)switch(e){case"class":s.length&&t.setAttribute(e,s.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",s);break;case"style":Object.assign(t.style,s);break;case"textContent":t.textContent=s;break;default:(!o||"href"!==e&&"newWindow"!==e)&&t.setAttribute(e,s)}o&&n.addLinkAttributes(t,r.href,r.newWindow),s&&r.dataId&&this.setupStorage(t,r.dataId,e,s)}static render(t){const e=t.annotationStorage,s=t.linkService,n=t.xfaHtml,r=t.intent||"display",o=document.createElement(n.name);n.attributes&&this.setAttributes({html:o,element:n,intent:r,linkService:s});const a=[[n,-1,o]],c=t.div;if(c.append(o),t.viewport){const e=`matrix(${t.viewport.transform.join(",")})`;c.style.transform=e}"richText"!==r&&c.setAttribute("class","xfaLayer xfaFont");const h=[];for(;a.length>0;){const[t,n,o]=a.at(-1);if(n+1===t.children.length){a.pop();continue}const c=t.children[++a.at(-1)[1]];if(null===c)continue;const{name:l}=c;if("#text"===l){const t=document.createTextNode(c.value);h.push(t),o.append(t);continue}const u=c?.attributes?.xmlns?document.createElementNS(c.attributes.xmlns,l):document.createElement(l);if(o.append(u),c.attributes&&this.setAttributes({html:u,element:c,storage:e,intent:r,linkService:s}),c.children&&c.children.length>0)a.push([c,-1,u]);else if(c.value){const t=document.createTextNode(c.value);i.XfaText.shouldBuildText(l)&&h.push(t),u.append(t)}}for(const t of c.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))t.setAttribute("readOnly",!0);return{textDivs:h}}static update(t){const e=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=e,t.div.hidden=!1}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InkEditor=void 0;var i=s(1),n=s(4),r=s(29),o=s(6),a=s(5);class c extends n.AnnotationEditor{#Es=0;#Ts=0;#Ds=this.canvasPointermove.bind(this);#Ps=this.canvasPointerleave.bind(this);#Rs=this.canvasPointerup.bind(this);#Ns=this.canvasPointerdown.bind(this);#Ls=new Path2D;#Bs=!1;#$s=!1;#Us=!1;#js=null;#Hs=0;#Gs=0;#qs=null;static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=1;static _type="ink";constructor(t){super({...t,name:"inkEditor"}),this.color=t.color||null,this.thickness=t.thickness||null,this.opacity=t.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(t){n.AnnotationEditor.initialize(t,{strings:["editor_ink_canvas_aria_label","editor_ink2_aria_label"]})}static updateDefaultParams(t,e){switch(t){case i.AnnotationEditorParamsType.INK_THICKNESS:c._defaultThickness=e;break;case i.AnnotationEditorParamsType.INK_COLOR:c._defaultColor=e;break;case i.AnnotationEditorParamsType.INK_OPACITY:c._defaultOpacity=e/100}}updateParams(t,e){switch(t){case i.AnnotationEditorParamsType.INK_THICKNESS:this.#Xs(e);break;case i.AnnotationEditorParamsType.INK_COLOR:this.#We(e);break;case i.AnnotationEditorParamsType.INK_OPACITY:this.#Ws(e)}}static get defaultPropertiesToUpdate(){return[[i.AnnotationEditorParamsType.INK_THICKNESS,c._defaultThickness],[i.AnnotationEditorParamsType.INK_COLOR,c._defaultColor||n.AnnotationEditor._defaultLineColor],[i.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*c._defaultOpacity)]]}get propertiesToUpdate(){return[[i.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||c._defaultThickness],[i.AnnotationEditorParamsType.INK_COLOR,this.color||c._defaultColor||n.AnnotationEditor._defaultLineColor],[i.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??c._defaultOpacity))]]}#Xs(t){const e=this.thickness;this.addCommands({cmd:()=>{this.thickness=t,this.#zs()},undo:()=>{this.thickness=e,this.#zs()},mustExec:!0,type:i.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}#We(t){const e=this.color;this.addCommands({cmd:()=>{this.color=t,this.#Vs()},undo:()=>{this.color=e,this.#Vs()},mustExec:!0,type:i.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}#Ws(t){t/=100;const e=this.opacity;this.addCommands({cmd:()=>{this.opacity=t,this.#Vs()},undo:()=>{this.opacity=e,this.#Vs()},mustExec:!0,type:i.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.canvas||(this.#Ks(),this.#Js()),this.isAttachedToDOM||(this.parent.add(this),this.#Ys()),this.#zs()))}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,this.#js.disconnect(),this.#js=null,super.remove())}setParent(t){!this.parent&&t?this._uiManager.removeShouldRescale(this):this.parent&&null===t&&this._uiManager.addShouldRescale(this),super.setParent(t)}onScaleChanging(){const[t,e]=this.parentDimensions;this.setDimensions(this.width*t,this.height*e)}enableEditMode(){this.#Bs||null===this.canvas||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",this.#Ns))}disableEditMode(){this.isInEditMode()&&null!==this.canvas&&(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",this.#Ns))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}#Qs(){const{parentRotation:t,parentDimensions:[e,s]}=this;switch(t){case 90:return[0,s,s,e];case 180:return[e,s,e,s];case 270:return[e,0,s,e];default:return[0,0,e,s]}}#Zs(){const{ctx:t,color:e,opacity:s,thickness:i,parentScale:n,scaleFactor:r}=this;t.lineWidth=i*n/r,t.lineCap="round",t.lineJoin="round",t.miterLimit=10,t.strokeStyle=`${e}${(0,a.opacityToHex)(s)}`}#ti(t,e){this.canvas.addEventListener("contextmenu",o.noContextMenu),this.canvas.addEventListener("pointerleave",this.#Ps),this.canvas.addEventListener("pointermove",this.#Ds),this.canvas.addEventListener("pointerup",this.#Rs),this.canvas.removeEventListener("pointerdown",this.#Ns),this.isEditing=!0,this.#Us||(this.#Us=!0,this.#Ys(),this.thickness||=c._defaultThickness,this.color||=c._defaultColor||n.AnnotationEditor._defaultLineColor,this.opacity??=c._defaultOpacity),this.currentPath.push([t,e]),this.#$s=!1,this.#Zs(),this.#qs=()=>{this.#ei(),this.#qs&&window.requestAnimationFrame(this.#qs)},window.requestAnimationFrame(this.#qs)}#si(t,e){const[s,i]=this.currentPath.at(-1);if(this.currentPath.length>1&&t===s&&e===i)return;const n=this.currentPath;let r=this.#Ls;if(n.push([t,e]),this.#$s=!0,n.length<=2)return r.moveTo(...n[0]),void r.lineTo(t,e);3===n.length&&(this.#Ls=r=new Path2D,r.moveTo(...n[0])),this.#ii(r,...n.at(-3),...n.at(-2),t,e)}#ni(){if(0===this.currentPath.length)return;const t=this.currentPath.at(-1);this.#Ls.lineTo(...t)}#ri(t,e){let s;if(this.#qs=null,t=Math.min(Math.max(t,0),this.canvas.width),e=Math.min(Math.max(e,0),this.canvas.height),this.#si(t,e),this.#ni(),1!==this.currentPath.length)s=this.#oi();else{const i=[t,e];s=[[i,i.slice(),i.slice(),i]]}const i=this.#Ls,n=this.currentPath;this.currentPath=[],this.#Ls=new Path2D,this.addCommands({cmd:()=>{this.allRawPaths.push(n),this.paths.push(s),this.bezierPath2D.push(i),this.rebuild()},undo:()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(this.#Ks(),this.#Js()),this.#zs())},mustExec:!0})}#ei(){if(!this.#$s)return;this.#$s=!1;const t=this.currentPath.slice(-3);t.map((t=>t[0])),t.map((t=>t[1]));const{ctx:e}=this;e.save(),e.clearRect(0,0,this.canvas.width,this.canvas.height);for(const t of this.bezierPath2D)e.stroke(t);e.stroke(this.#Ls),e.restore()}#ii(t,e,s,i,n,r,o){const a=(e+i)/2,c=(s+n)/2,h=(i+r)/2,l=(n+o)/2;t.bezierCurveTo(a+2*(i-a)/3,c+2*(n-c)/3,h+2*(i-h)/3,l+2*(n-l)/3,h,l)}#oi(){const t=this.currentPath;if(t.length<=2)return[[t[0],t[0],t.at(-1),t.at(-1)]];const e=[];let s,[i,n]=t[0];for(s=1;s<t.length-2;s++){const[r,o]=t[s],[a,c]=t[s+1],h=(r+a)/2,l=(o+c)/2;e.push([[i,n],[i+2*(r-i)/3,n+2*(o-n)/3],[h+2*(r-h)/3,l+2*(o-l)/3],[h,l]]),[i,n]=[h,l]}const[r,o]=t[s],[a,c]=t[s+1];return e.push([[i,n],[i+2*(r-i)/3,n+2*(o-n)/3],[a+2*(r-a)/3,c+2*(o-c)/3],[a,c]]),e}#Vs(){if(this.isEmpty())return void this.#ai();this.#Zs();const{canvas:t,ctx:e}=this;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t.width,t.height),this.#ai();for(const t of this.bezierPath2D)e.stroke(t)}commit(){this.#Bs||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),this.#Bs=!0,this.div.classList.add("disabled"),this.#zs(!0),this.makeResizable(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(t){this._focusEventsAllowed&&(super.focusin(t),this.enableEditMode())}canvasPointerdown(t){0===t.button&&this.isInEditMode()&&!this.#Bs&&(this.setInForeground(),t.preventDefault(),"mouse"!==t.type&&this.div.focus(),this.#ti(t.offsetX,t.offsetY))}canvasPointermove(t){t.preventDefault(),this.#si(t.offsetX,t.offsetY)}canvasPointerup(t){t.preventDefault(),this.#ci(t)}canvasPointerleave(t){this.#ci(t)}#ci(t){this.canvas.removeEventListener("pointerleave",this.#Ps),this.canvas.removeEventListener("pointermove",this.#Ds),this.canvas.removeEventListener("pointerup",this.#Rs),this.canvas.addEventListener("pointerdown",this.#Ns),setTimeout((()=>{this.canvas.removeEventListener("contextmenu",o.noContextMenu)}),10),this.#ri(t.offsetX,t.offsetY),this.addToAnnotationStorage(),this.setInBackground()}#Ks(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",n.AnnotationEditor._l10nPromise.get("editor_ink_canvas_aria_label").then((t=>this.canvas?.setAttribute("aria-label",t))),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")}#Js(){this.#js=new ResizeObserver((t=>{const e=t[0].contentRect;e.width&&e.height&&this.setDimensions(e.width,e.height)})),this.#js.observe(this.div)}get isResizable(){return!this.isEmpty()&&this.#Bs}render(){if(this.div)return this.div;let t,e;this.width&&(t=this.x,e=this.y),super.render(),n.AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then((t=>this.div?.setAttribute("aria-label",t)));const[s,i,r,o]=this.#Qs();if(this.setAt(s,i,0,0),this.setDims(r,o),this.#Ks(),this.width){const[s,i]=this.parentDimensions;this.setAspectRatio(this.width*s,this.height*i),this.setAt(t*s,e*i,this.width*s,this.height*i),this.#Us=!0,this.#Ys(),this.setDims(this.width*s,this.height*i),this.#Vs(),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return this.#Js(),this.div}#Ys(){if(!this.#Us)return;const[t,e]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*t),this.canvas.height=Math.ceil(this.height*e),this.#ai()}setDimensions(t,e){const s=Math.round(t),i=Math.round(e);if(this.#Hs===s&&this.#Gs===i)return;this.#Hs=s,this.#Gs=i,this.canvas.style.visibility="hidden";const[n,r]=this.parentDimensions;this.width=t/n,this.height=e/r,this.fixAndSetPosition(),this.#Bs&&this.#hi(t,e),this.#Ys(),this.#Vs(),this.canvas.style.visibility="visible",this.fixDims()}#hi(t,e){const s=this.#li(),i=(t-s)/this.#Ts,n=(e-s)/this.#Es;this.scaleFactor=Math.min(i,n)}#ai(){const t=this.#li()/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+t,this.translationY*this.scaleFactor+t)}static#ui(t){const e=new Path2D;for(let s=0,i=t.length;s<i;s++){const[i,n,r,o]=t[s];0===s&&e.moveTo(...i),e.bezierCurveTo(n[0],n[1],r[0],r[1],o[0],o[1])}return e}static#fi(t,e,s){const[i,n,r,o]=e;switch(s){case 0:for(let e=0,s=t.length;e<s;e+=2)t[e]+=i,t[e+1]=o-t[e+1];break;case 90:for(let e=0,s=t.length;e<s;e+=2){const s=t[e];t[e]=t[e+1]+i,t[e+1]=s+n}break;case 180:for(let e=0,s=t.length;e<s;e+=2)t[e]=r-t[e],t[e+1]+=n;break;case 270:for(let e=0,s=t.length;e<s;e+=2){const s=t[e];t[e]=r-t[e+1],t[e+1]=o-s}break;default:throw new Error("Invalid rotation")}return t}static#di(t,e,s){const[i,n,r,o]=e;switch(s){case 0:for(let e=0,s=t.length;e<s;e+=2)t[e]-=i,t[e+1]=o-t[e+1];break;case 90:for(let e=0,s=t.length;e<s;e+=2){const s=t[e];t[e]=t[e+1]-n,t[e+1]=s-i}break;case 180:for(let e=0,s=t.length;e<s;e+=2)t[e]=r-t[e],t[e+1]-=n;break;case 270:for(let e=0,s=t.length;e<s;e+=2){const s=t[e];t[e]=o-t[e+1],t[e+1]=r-s}break;default:throw new Error("Invalid rotation")}return t}#pi(t,e,s,i){const n=[],r=this.thickness/2,o=t*e+r,a=t*s+r;for(const e of this.paths){const s=[],r=[];for(let i=0,n=e.length;i<n;i++){const[c,h,l,u]=e[i],f=t*c[0]+o,d=t*c[1]+a,p=t*h[0]+o,g=t*h[1]+a,m=t*l[0]+o,w=t*l[1]+a,b=t*u[0]+o,y=t*u[1]+a;0===i&&(s.push(f,d),r.push(f,d)),s.push(p,g,m,w,b,y),r.push(p,g),i===n-1&&r.push(b,y)}n.push({bezier:c.#fi(s,i,this.rotation),points:c.#fi(r,i,this.rotation)})}return n}#gi(){let t=1/0,e=-1/0,s=1/0,n=-1/0;for(const r of this.paths)for(const[o,a,c,h]of r){const r=i.Util.bezierBoundingBox(...o,...a,...c,...h);t=Math.min(t,r[0]),s=Math.min(s,r[1]),e=Math.max(e,r[2]),n=Math.max(n,r[3])}return[t,s,e,n]}#li(){return this.#Bs?Math.ceil(this.thickness*this.parentScale):0}#zs(t=!1){if(this.isEmpty())return;if(!this.#Bs)return void this.#Vs();const e=this.#gi(),s=this.#li();this.#Ts=Math.max(n.AnnotationEditor.MIN_SIZE,e[2]-e[0]),this.#Es=Math.max(n.AnnotationEditor.MIN_SIZE,e[3]-e[1]);const i=Math.ceil(s+this.#Ts*this.scaleFactor),r=Math.ceil(s+this.#Es*this.scaleFactor),[o,a]=this.parentDimensions;this.width=i/o,this.height=r/a,this.setAspectRatio(i,r);const c=this.translationX,h=this.translationY;this.translationX=-e[0],this.translationY=-e[1],this.#Ys(),this.#Vs(),this.#Hs=i,this.#Gs=r,this.setDims(i,r);const l=t?s/this.scaleFactor/2:0;this.translate(c-this.translationX-l,h-this.translationY-l)}static deserialize(t,e,s){if(t instanceof r.InkAnnotationElement)return null;const o=super.deserialize(t,e,s);o.thickness=t.thickness,o.color=i.Util.makeHexColor(...t.color),o.opacity=t.opacity;const[a,h]=o.pageDimensions,l=o.width*a,u=o.height*h,f=o.parentScale,d=t.thickness/2;o.#Bs=!0,o.#Hs=Math.round(l),o.#Gs=Math.round(u);const{paths:p,rect:g,rotation:m}=t;for(let{bezier:t}of p){t=c.#di(t,g,m);const e=[];o.paths.push(e);let s=f*(t[0]-d),i=f*(t[1]-d);for(let n=2,r=t.length;n<r;n+=6){const r=f*(t[n+4]-d),o=f*(t[n+5]-d);e.push([[s,i],[f*(t[n]-d),f*(t[n+1]-d)],[f*(t[n+2]-d),f*(t[n+3]-d)],[r,o]]),s=r,i=o}const n=this.#ui(e);o.bezierPath2D.push(n)}const w=o.#gi();return o.#Ts=Math.max(n.AnnotationEditor.MIN_SIZE,w[2]-w[0]),o.#Es=Math.max(n.AnnotationEditor.MIN_SIZE,w[3]-w[1]),o.#hi(l,u),o}serialize(){if(this.isEmpty())return null;const t=this.getRect(0,0),e=n.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:i.AnnotationEditorType.INK,color:e,thickness:this.thickness,opacity:this.opacity,paths:this.#pi(this.scaleFactor/this.parentScale,this.translationX,this.translationY,t),pageIndex:this.pageIndex,rect:t,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}}e.InkEditor=c},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.StampEditor=void 0;var i=s(1),n=s(4),r=s(6),o=s(29);class a extends n.AnnotationEditor{#mi=null;#wi=null;#bi=null;#yi=null;#Ai=null;#vi=null;#js=null;#xi=null;#ki=!1;#Si=!1;static _type="stamp";constructor(t){super({...t,name:"stampEditor"}),this.#yi=t.bitmapUrl,this.#Ai=t.bitmapFile}static initialize(t){n.AnnotationEditor.initialize(t)}static get supportedTypes(){return(0,i.shadow)(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map((t=>`image/${t}`)))}static get supportedTypesStr(){return(0,i.shadow)(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(t){return this.supportedTypes.includes(t)}static paste(t,e){e.pasteEditor(i.AnnotationEditorType.STAMP,{bitmapFile:t.getAsFile()})}#Mi(t,e=!1){t?(this.#mi=t.bitmap,e||(this.#wi=t.id,this.#ki=t.isSvg),this.#Ks()):this.remove()}#Ci(){this.#bi=null,this._uiManager.enableWaiting(!1),this.#vi&&this.div.focus()}#_i(){if(this.#wi)return this._uiManager.enableWaiting(!0),void this._uiManager.imageManager.getFromId(this.#wi).then((t=>this.#Mi(t,!0))).finally((()=>this.#Ci()));if(this.#yi){const t=this.#yi;return this.#yi=null,this._uiManager.enableWaiting(!0),void(this.#bi=this._uiManager.imageManager.getFromUrl(t).then((t=>this.#Mi(t))).finally((()=>this.#Ci())))}if(this.#Ai){const t=this.#Ai;return this.#Ai=null,this._uiManager.enableWaiting(!0),void(this.#bi=this._uiManager.imageManager.getFromFile(t).then((t=>this.#Mi(t))).finally((()=>this.#Ci())))}const t=document.createElement("input");t.type="file",t.accept=a.supportedTypesStr,this.#bi=new Promise((e=>{t.addEventListener("change",(async()=>{if(t.files&&0!==t.files.length){this._uiManager.enableWaiting(!0);const e=await this._uiManager.imageManager.getFromFile(t.files[0]);this.#Mi(e)}else this.remove();e()})),t.addEventListener("cancel",(()=>{this.remove(),e()}))})).finally((()=>this.#Ci())),t.click()}remove(){this.#wi&&(this.#mi=null,this._uiManager.imageManager.deleteId(this.#wi),this.#vi?.remove(),this.#vi=null,this.#js?.disconnect(),this.#js=null),super.remove()}rebuild(){this.parent?(super.rebuild(),null!==this.div&&(this.#wi&&this.#_i(),this.isAttachedToDOM||this.parent.add(this))):this.#wi&&this.#_i()}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(this.#bi||this.#mi||this.#yi||this.#Ai)}get isResizable(){return!0}render(){if(this.div)return this.div;let t,e;if(this.width&&(t=this.x,e=this.y),super.render(),this.div.hidden=!0,this.#mi?this.#Ks():this.#_i(),this.width){const[s,i]=this.parentDimensions;this.setAt(t*s,e*i,this.width*s,this.height*i)}return this.div}#Ks(){const{div:t}=this;let{width:e,height:s}=this.#mi;const[i,n]=this.pageDimensions,r=.75;if(this.width)e=this.width*i,s=this.height*n;else if(e>r*i||s>r*n){const t=Math.min(r*i/e,r*n/s);e*=t,s*=t}const[o,a]=this.parentDimensions;this.setDims(e*o/i,s*a/n),this._uiManager.enableWaiting(!1);const c=this.#vi=document.createElement("canvas");t.append(c),t.hidden=!1,this.#Ii(e,s),this.#Js(),this.#Si||(this.parent.addUndoableEditor(this),this.#Si=!0),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"inserted_image"}}}),this.addAltTextButton()}#Fi(t,e){const[s,i]=this.parentDimensions;this.width=t/s,this.height=e/i,this.setDims(t,e),this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,null!==this.#xi&&clearTimeout(this.#xi),this.#xi=setTimeout((()=>{this.#xi=null,this.#Ii(t,e)}),200)}#Oi(t,e){const{width:s,height:i}=this.#mi;let n=s,r=i,o=this.#mi;for(;n>2*t||r>2*e;){const s=n,i=r;n>2*t&&(n=n>=16384?Math.floor(n/2)-1:Math.ceil(n/2)),r>2*e&&(r=r>=16384?Math.floor(r/2)-1:Math.ceil(r/2));const a=new OffscreenCanvas(n,r);a.getContext("2d").drawImage(o,0,0,s,i,0,0,n,r),o=a.transferToImageBitmap()}return o}#Ii(t,e){t=Math.ceil(t),e=Math.ceil(e);const s=this.#vi;if(!s||s.width===t&&s.height===e)return;s.width=t,s.height=e;const i=this.#ki?this.#mi:this.#Oi(t,e),n=s.getContext("2d");n.filter=this._uiManager.hcmFilter,n.drawImage(i,0,0,i.width,i.height,0,0,t,e)}#Ei(t){if(t){if(this.#ki){const t=this._uiManager.imageManager.getSvgUrl(this.#wi);if(t)return t}const t=document.createElement("canvas");return({width:t.width,height:t.height}=this.#mi),t.getContext("2d").drawImage(this.#mi,0,0),t.toDataURL()}if(this.#ki){const[t,e]=this.pageDimensions,s=Math.round(this.width*t*r.PixelsPerInch.PDF_TO_CSS_UNITS),i=Math.round(this.height*e*r.PixelsPerInch.PDF_TO_CSS_UNITS),n=new OffscreenCanvas(s,i);return n.getContext("2d").drawImage(this.#mi,0,0,this.#mi.width,this.#mi.height,0,0,s,i),n.transferToImageBitmap()}return structuredClone(this.#mi)}#Js(){this.#js=new ResizeObserver((t=>{const e=t[0].contentRect;e.width&&e.height&&this.#Fi(e.width,e.height)})),this.#js.observe(this.div)}static deserialize(t,e,s){if(t instanceof o.StampAnnotationElement)return null;const i=super.deserialize(t,e,s),{rect:n,bitmapUrl:r,bitmapId:a,isSvg:c,accessibilityData:h}=t;a&&s.imageManager.isValidId(a)?i.#wi=a:i.#yi=r,i.#ki=c;const[l,u]=i.pageDimensions;return i.width=(n[2]-n[0])/l,i.height=(n[3]-n[1])/u,h&&(i.altTextData=h),i}serialize(t=!1,e=null){if(this.isEmpty())return null;const s={annotationType:i.AnnotationEditorType.STAMP,bitmapId:this.#wi,pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:this.#ki,structTreeParentId:this._structTreeParentId};if(t)return s.bitmapUrl=this.#Ei(!0),s.accessibilityData=this.altTextData,s;const{decorative:n,altText:r}=this.altTextData;if(!n&&r&&(s.accessibilityData={type:"Figure",alt:r}),null===e)return s;e.stamps||=new Map;const o=this.#ki?(s.rect[2]-s.rect[0])*(s.rect[3]-s.rect[1]):null;if(e.stamps.has(this.#wi)){if(this.#ki){const t=e.stamps.get(this.#wi);o>t.area&&(t.area=o,t.serialized.bitmap.close(),t.serialized.bitmap=this.#Ei(!1))}}else e.stamps.set(this.#wi,{area:o,serialized:s}),s.bitmap=this.#Ei(!1);return s}}e.StampEditor=a}],__webpack_module_cache__={};function __w_pdfjs_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var s=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](s,s.exports,__w_pdfjs_require__),s.exports}var __webpack_exports__={};return(()=>{var t=__webpack_exports__;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AbortException",{enumerable:!0,get:function(){return e.AbortException}}),Object.defineProperty(t,"AnnotationEditorLayer",{enumerable:!0,get:function(){return r.AnnotationEditorLayer}}),Object.defineProperty(t,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return e.AnnotationEditorParamsType}}),Object.defineProperty(t,"AnnotationEditorType",{enumerable:!0,get:function(){return e.AnnotationEditorType}}),Object.defineProperty(t,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return o.AnnotationEditorUIManager}}),Object.defineProperty(t,"AnnotationLayer",{enumerable:!0,get:function(){return a.AnnotationLayer}}),Object.defineProperty(t,"AnnotationMode",{enumerable:!0,get:function(){return e.AnnotationMode}}),Object.defineProperty(t,"CMapCompressionType",{enumerable:!0,get:function(){return e.CMapCompressionType}}),Object.defineProperty(t,"DOMSVGFactory",{enumerable:!0,get:function(){return i.DOMSVGFactory}}),Object.defineProperty(t,"FeatureTest",{enumerable:!0,get:function(){return e.FeatureTest}}),Object.defineProperty(t,"GlobalWorkerOptions",{enumerable:!0,get:function(){return c.GlobalWorkerOptions}}),Object.defineProperty(t,"ImageKind",{enumerable:!0,get:function(){return e.ImageKind}}),Object.defineProperty(t,"InvalidPDFException",{enumerable:!0,get:function(){return e.InvalidPDFException}}),Object.defineProperty(t,"MissingPDFException",{enumerable:!0,get:function(){return e.MissingPDFException}}),Object.defineProperty(t,"OPS",{enumerable:!0,get:function(){return e.OPS}}),Object.defineProperty(t,"PDFDataRangeTransport",{enumerable:!0,get:function(){return s.PDFDataRangeTransport}}),Object.defineProperty(t,"PDFDateString",{enumerable:!0,get:function(){return i.PDFDateString}}),Object.defineProperty(t,"PDFWorker",{enumerable:!0,get:function(){return s.PDFWorker}}),Object.defineProperty(t,"PasswordResponses",{enumerable:!0,get:function(){return e.PasswordResponses}}),Object.defineProperty(t,"PermissionFlag",{enumerable:!0,get:function(){return e.PermissionFlag}}),Object.defineProperty(t,"PixelsPerInch",{enumerable:!0,get:function(){return i.PixelsPerInch}}),Object.defineProperty(t,"PromiseCapability",{enumerable:!0,get:function(){return e.PromiseCapability}}),Object.defineProperty(t,"RenderingCancelledException",{enumerable:!0,get:function(){return i.RenderingCancelledException}}),Object.defineProperty(t,"SVGGraphics",{enumerable:!0,get:function(){return s.SVGGraphics}}),Object.defineProperty(t,"UnexpectedResponseException",{enumerable:!0,get:function(){return e.UnexpectedResponseException}}),Object.defineProperty(t,"Util",{enumerable:!0,get:function(){return e.Util}}),Object.defineProperty(t,"VerbosityLevel",{enumerable:!0,get:function(){return e.VerbosityLevel}}),Object.defineProperty(t,"XfaLayer",{enumerable:!0,get:function(){return h.XfaLayer}}),Object.defineProperty(t,"build",{enumerable:!0,get:function(){return s.build}}),Object.defineProperty(t,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return e.createValidAbsoluteUrl}}),Object.defineProperty(t,"getDocument",{enumerable:!0,get:function(){return s.getDocument}}),Object.defineProperty(t,"getFilenameFromUrl",{enumerable:!0,get:function(){return i.getFilenameFromUrl}}),Object.defineProperty(t,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return i.getPdfFilenameFromUrl}}),Object.defineProperty(t,"getXfaPageViewport",{enumerable:!0,get:function(){return i.getXfaPageViewport}}),Object.defineProperty(t,"isDataScheme",{enumerable:!0,get:function(){return i.isDataScheme}}),Object.defineProperty(t,"isPdfFile",{enumerable:!0,get:function(){return i.isPdfFile}}),Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return i.loadScript}}),Object.defineProperty(t,"noContextMenu",{enumerable:!0,get:function(){return i.noContextMenu}}),Object.defineProperty(t,"normalizeUnicode",{enumerable:!0,get:function(){return e.normalizeUnicode}}),Object.defineProperty(t,"renderTextLayer",{enumerable:!0,get:function(){return n.renderTextLayer}}),Object.defineProperty(t,"setLayerDimensions",{enumerable:!0,get:function(){return i.setLayerDimensions}}),Object.defineProperty(t,"shadow",{enumerable:!0,get:function(){return e.shadow}}),Object.defineProperty(t,"updateTextLayer",{enumerable:!0,get:function(){return n.updateTextLayer}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return s.version}});var e=__w_pdfjs_require__(1),s=__w_pdfjs_require__(2),i=__w_pdfjs_require__(6),n=__w_pdfjs_require__(26),r=__w_pdfjs_require__(27),o=__w_pdfjs_require__(5),a=__w_pdfjs_require__(29),c=__w_pdfjs_require__(14),h=__w_pdfjs_require__(32)})(),__webpack_exports__})(),module.exports=root.pdfjsLib=factory()})(pdf);var pdf_worker$1={exports:{}},root,factory;
24
- /**
25
- * @licstart The following is the entire license notice for the
26
- * JavaScript code in this page
27
- *
28
- * Copyright 2023 Mozilla Foundation
29
- *
30
- * Licensed under the Apache License, Version 2.0 (the "License");
31
- * you may not use this file except in compliance with the License.
32
- * You may obtain a copy of the License at
33
- *
34
- * http://www.apache.org/licenses/LICENSE-2.0
35
- *
36
- * Unless required by applicable law or agreed to in writing, software
37
- * distributed under the License is distributed on an "AS IS" BASIS,
38
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
39
- * See the License for the specific language governing permissions and
40
- * limitations under the License.
41
- *
42
- * @licend The above is the entire license notice for the
43
- * JavaScript code in this page
44
- */root=globalThis,factory=()=>(()=>{var t=[,(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerTask=e.WorkerMessageHandler=void 0;var i,n=s(2),r=s(3),o=s(4),a=s(6),c=s(10),h=s(68),l=s(73),u=s(104),f=s(105),d=s(72);class p{constructor(t){this.name=t,this.terminated=!1,this._capability=new n.PromiseCapability}get finished(){return this._capability.promise}finish(){this._capability.resolve()}terminate(){this.terminated=!0}ensureNotTerminated(){if(this.terminated)throw new Error("Worker task was terminated")}}e.WorkerTask=p;class g{static setup(t,e){let s=!1;t.on("test",(function(e){s||(s=!0,t.send("test",e instanceof Uint8Array))})),t.on("configure",(function(t){(0,n.setVerbosityLevel)(t.verbosity)})),t.on("GetDocRequest",(function(t){return g.createDocumentHandler(t,e)}))}static createDocumentHandler(t,e){let s,i=!1,g=null;const m=new Set,w=(0,n.getVerbosityLevel)(),{docId:b,apiVersion:y}=t,A="3.11.174";if(y!==A)throw new Error(`The API version "${y}" does not match the Worker version "${A}".`);const v=[];for(const t in[])v.push(t);if(v.length)throw new Error("The `Array.prototype` contains unexpected enumerable properties: "+v.join(", ")+"; thus breaking e.g. `for...in` iteration of `Array`s.");const x=b+"_worker";let k=new u.MessageHandler(x,b,e);function S(){if(i)throw new Error("Worker was terminated")}function M(t){m.add(t)}function C(t){t.finish(),m.delete(t)}async function _(t){await s.ensureDoc("checkHeader"),await s.ensureDoc("parseStartXRef"),await s.ensureDoc("parse",[t]),await s.ensureDoc("checkFirstPage",[t]),await s.ensureDoc("checkLastPage",[t]);const e=await s.ensureDoc("isPureXfa");if(e){const t=new p("loadXfaFonts");M(t),await Promise.all([s.loadXfaFonts(k,t).catch((()=>{})).then((()=>C(t))),s.loadXfaImages()])}const[i,n]=await Promise.all([s.ensureDoc("numPages"),s.ensureDoc("fingerprints")]);return{numPages:i,fingerprints:n,htmlForXfa:e?await s.ensureDoc("htmlForXfa"):null}}return k.on("GetPage",(function(t){return s.getPage(t.pageIndex).then((function(t){return Promise.all([s.ensure(t,"rotate"),s.ensure(t,"ref"),s.ensure(t,"userUnit"),s.ensure(t,"view")]).then((function([t,e,s,i]){return{rotate:t,ref:e,userUnit:s,view:i}}))}))})),k.on("GetPageIndex",(function(t){const e=o.Ref.get(t.num,t.gen);return s.ensureCatalog("getPageIndex",[e])})),k.on("GetDestinations",(function(){return s.ensureCatalog("destinations")})),k.on("GetDestination",(function(t){return s.ensureCatalog("getDestination",[t.id])})),k.on("GetPageLabels",(function(){return s.ensureCatalog("pageLabels")})),k.on("GetPageLayout",(function(){return s.ensureCatalog("pageLayout")})),k.on("GetPageMode",(function(){return s.ensureCatalog("pageMode")})),k.on("GetViewerPreferences",(function(){return s.ensureCatalog("viewerPreferences")})),k.on("GetOpenAction",(function(){return s.ensureCatalog("openAction")})),k.on("GetAttachments",(function(){return s.ensureCatalog("attachments")})),k.on("GetDocJSActions",(function(){return s.ensureCatalog("jsActions")})),k.on("GetPageJSActions",(function({pageIndex:t}){return s.getPage(t).then((function(t){return s.ensure(t,"jsActions")}))})),k.on("GetOutline",(function(){return s.ensureCatalog("documentOutline")})),k.on("GetOptionalContentConfig",(function(){return s.ensureCatalog("optionalContentConfig")})),k.on("GetPermissions",(function(){return s.ensureCatalog("permissions")})),k.on("GetMetadata",(function(){return Promise.all([s.ensureDoc("documentInfo"),s.ensureCatalog("metadata")])})),k.on("GetMarkInfo",(function(){return s.ensureCatalog("markInfo")})),k.on("GetData",(function(){return s.requestLoadedStream().then((function(t){return t.bytes}))})),k.on("GetAnnotations",(function({pageIndex:t,intent:e}){return s.getPage(t).then((function(s){const i=new p(`GetAnnotations: page ${t}`);return M(i),s.getAnnotationsData(k,i,e).then((t=>(C(i),t)),(t=>{throw C(i),t}))}))})),k.on("GetFieldObjects",(function(){return s.ensureDoc("fieldObjects")})),k.on("HasJSActions",(function(){return s.ensureDoc("hasJSActions")})),k.on("GetCalculationOrderIds",(function(){return s.ensureDoc("calculationOrderIds")})),k.on("SaveDocument",(async function({isPureXfa:t,numPages:e,annotationStorage:i,filename:a}){const h=[s.requestLoadedStream(),s.ensureCatalog("acroForm"),s.ensureCatalog("acroFormRef"),s.ensureDoc("startXRef"),s.ensureDoc("xref"),s.ensureDoc("linearization"),s.ensureCatalog("structTreeRoot")],u=[],f=t?null:(0,r.getNewAnnotationsMap)(i),[g,m,w,b,y,A,v]=await Promise.all(h),x=y.trailer.getRaw("Root")||null;let S;if(f){v?await v.canUpdateStructTree({pdfManager:s,newAnnotationsByPage:f})&&(S=v):await d.StructTreeRoot.canCreateStructureTree({catalogRef:x,pdfManager:s,newAnnotationsByPage:f})&&(S=null);const t=c.AnnotationFactory.generateImages(i.values(),y,s.evaluatorOptions.isOffscreenCanvasSupported),e=void 0===S?u:[];for(const[i,n]of f)e.push(s.getPage(i).then((e=>{const s=new p(`Save (editor): page ${i}`);return e.saveNewAnnotations(k,s,n,t).finally((function(){C(s)}))})));null===S?u.push(Promise.all(e).then((async t=>(await d.StructTreeRoot.createStructureTree({newAnnotationsByPage:f,xref:y,catalogRef:x,pdfManager:s,newRefs:t}),t)))):S&&u.push(Promise.all(e).then((async t=>(await S.updateStructureTree({newAnnotationsByPage:f,pdfManager:s,newRefs:t}),t))))}if(t)u.push(s.serializeXfaData(i));else for(let t=0;t<e;t++)u.push(s.getPage(t).then((function(e){const s=new p(`Save: page ${t}`);return e.save(k,s,i).finally((function(){C(s)}))})));const M=await Promise.all(u);let _=[],I=null;if(t){if(I=M[0],!I)return g.bytes}else if(_=M.flat(2),0===_.length)return g.bytes;const F=w&&m instanceof o.Dict&&_.some((t=>t.needAppearances)),O=m instanceof o.Dict&&m.get("XFA")||null;let E=null,T=!1;if(Array.isArray(O)){for(let t=0,e=O.length;t<e;t+=2)"datasets"===O[t]&&(E=O[t+1],T=!0);null===E&&(E=y.getNewTemporaryRef())}else O&&(0,n.warn)("Unsupported XFA type.");let D=Object.create(null);if(y.trailer){const t=Object.create(null),e=y.trailer.get("Info")||null;e instanceof o.Dict&&e.forEach(((e,s)=>{"string"==typeof s&&(t[e]=(0,n.stringToPDFString)(s))})),D={rootRef:x,encryptRef:y.trailer.getRaw("Encrypt")||null,newRef:y.getNewTemporaryRef(),infoRef:y.trailer.getRaw("Info")||null,info:t,fileIds:y.trailer.get("ID")||null,startXRef:A?b:y.lastXRefStreamPos??b,filename:a}}return(0,l.incrementalUpdate)({originalData:g.bytes,xrefInfo:D,newRefs:_,xref:y,hasXfa:!!O,xfaDatasetsRef:E,hasXfaDatasetsEntry:T,needAppearances:F,acroFormRef:w,acroForm:m,xfaData:I}).finally((()=>{y.resetNewTemporaryRef()}))})),k.on("GetOperatorList",(function(t,e){const i=t.pageIndex;s.getPage(i).then((function(s){const r=new p(`GetOperatorList: page ${i}`);M(r);const o=w>=n.VerbosityLevel.INFOS?Date.now():0;s.getOperatorList({handler:k,sink:e,task:r,intent:t.intent,cacheKey:t.cacheKey,annotationStorage:t.annotationStorage}).then((function(t){C(r),o&&(0,n.info)(`page=${i+1} - getOperatorList: time=${Date.now()-o}ms, len=${t.length}`),e.close()}),(function(t){C(r),r.terminated||e.error(t)}))}))})),k.on("GetTextContent",(function(t,e){const{pageIndex:i,includeMarkedContent:r,disableNormalization:o}=t;s.getPage(i).then((function(t){const s=new p("GetTextContent: page "+i);M(s);const a=w>=n.VerbosityLevel.INFOS?Date.now():0;t.extractTextContent({handler:k,task:s,sink:e,includeMarkedContent:r,disableNormalization:o}).then((function(){C(s),a&&(0,n.info)(`page=${i+1} - getTextContent: time=`+(Date.now()-a)+"ms"),e.close()}),(function(t){C(s),s.terminated||e.error(t)}))}))})),k.on("GetStructTree",(function(t){return s.getPage(t.pageIndex).then((function(t){return s.ensure(t,"getStructTree")}))})),k.on("FontFallback",(function(t){return s.fontFallback(t.id,k)})),k.on("Cleanup",(function(){return s.cleanup(!0)})),k.on("Terminate",(function(){i=!0;const t=[];if(s){s.terminate(new n.AbortException("Worker was terminated."));const e=s.cleanup();t.push(e),s=null}else(0,h.clearGlobalCaches)();g&&g(new n.AbortException("Worker was terminated."));for(const e of m)t.push(e.finished),e.terminate();return Promise.all(t).then((function(){k.destroy(),k=null}))})),k.on("Ready",(function(){!function(t){function e(t){S(),k.send("GetDoc",{pdfInfo:t})}function o(t){if(S(),t instanceof n.PasswordException){const e=new p(`PasswordException: response ${t.code}`);M(e),k.sendWithPromise("PasswordRequest",t).then((function({password:t}){C(e),s.updatePassword(t),c()})).catch((function(){C(e),k.send("DocException",t)}))}else k.send("DocException",t instanceof n.InvalidPDFException||t instanceof n.MissingPDFException||t instanceof n.UnexpectedResponseException||t instanceof n.UnknownErrorException?t:new n.UnknownErrorException(t.message,t.toString()))}function c(){S(),_(!1).then(e,(function(t){S(),t instanceof r.XRefParseException?s.requestLoadedStream().then((function(){S(),_(!0).then(e,o)})):o(t)}))}S(),function({data:t,password:e,disableAutoFetch:s,rangeChunkSize:i,length:o,docBaseUrl:c,enableXfa:h,evaluatorOptions:l}){const u={source:null,disableAutoFetch:s,docBaseUrl:c,docId:b,enableXfa:h,evaluatorOptions:l,handler:k,length:o,password:e,rangeChunkSize:i},d=new n.PromiseCapability;let p;if(t){try{u.source=t,p=new a.LocalPdfManager(u),d.resolve(p)}catch(t){d.reject(t)}return d.promise}let m,w=[];try{m=new f.PDFWorkerStream(k)}catch(t){return d.reject(t),d.promise}const y=m.getFullReader();y.headersReady.then((function(){if(y.isRangeSupported){u.source=m,u.length=y.contentLength,u.disableAutoFetch||=y.isStreamingSupported,p=new a.NetworkPdfManager(u);for(const t of w)p.sendProgressiveData(t);w=[],d.resolve(p),g=null}})).catch((function(t){d.reject(t),g=null}));let A=0;return new Promise((function(t,e){const s=function({value:t,done:i}){try{if(S(),i)return p||function(){const t=(0,r.arrayBuffersToBytes)(w);o&&t.length!==o&&(0,n.warn)("reported HTTP length is different from actual");try{u.source=t,p=new a.LocalPdfManager(u),d.resolve(p)}catch(t){d.reject(t)}w=[]}(),void(g=null);A+=t.byteLength,y.isStreamingSupported||k.send("DocProgress",{loaded:A,total:Math.max(A,y.contentLength||0)}),p?p.sendProgressiveData(t):w.push(t),y.read().then(s,e)}catch(t){e(t)}};y.read().then(s,e)})).catch((function(t){d.reject(t),g=null})),g=function(t){m.cancelAllRequests(t)},d.promise}(t).then((function(t){if(i)throw t.terminate(new n.AbortException("Worker was terminated.")),new Error("Worker was terminated");s=t,s.requestLoadedStream(!0).then((t=>{k.send("DataLoaded",{length:t.bytes.byteLength})}))})).then(c,o)}(t),t=null})),x}static initializeFromPort(t){const e=new u.MessageHandler("worker","main",t);g.setup(e,t),e.send("ready",null)}}e.WorkerMessageHandler=g,"undefined"==typeof window&&!n.isNodeJS&&"undefined"!=typeof self&&"function"==typeof(i=self).postMessage&&"onmessage"in i&&g.initializeFromPort(self)},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.VerbosityLevel=e.Util=e.UnknownErrorException=e.UnexpectedResponseException=e.TextRenderingMode=e.RenderingIntentFlag=e.PromiseCapability=e.PermissionFlag=e.PasswordResponses=e.PasswordException=e.PageActionEventType=e.OPS=e.MissingPDFException=e.MAX_IMAGE_SIZE_TO_CACHE=e.LINE_FACTOR=e.LINE_DESCENT_FACTOR=e.InvalidPDFException=e.ImageKind=e.IDENTITY_MATRIX=e.FormatError=e.FeatureTest=e.FONT_IDENTITY_MATRIX=e.DocumentActionEventType=e.CMapCompressionType=e.BaseException=e.BASELINE_FACTOR=e.AnnotationType=e.AnnotationReplyType=e.AnnotationPrefix=e.AnnotationMode=e.AnnotationFlag=e.AnnotationFieldFlag=e.AnnotationEditorType=e.AnnotationEditorPrefix=e.AnnotationEditorParamsType=e.AnnotationBorderStyleType=e.AnnotationActionEventType=e.AbortException=void 0,e.assert=function(t,e){t||o(e)},e.bytesToString=h,e.createValidAbsoluteUrl=function(t,e=null,s=null){if(!t)return null;try{if(s&&"string"==typeof t){if(s.addDefaultProtocol&&t.startsWith("www.")){const e=t.match(/\./g);e?.length>=2&&(t=`http://${t}`)}if(s.tryConvertEncoding)try{t=d(t)}catch{}}const i=e?new URL(t,e):new URL(t);if(function(t){switch(t?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(i))return i}catch{}return null},e.getModificationDate=function(t=new Date){return[t.getUTCFullYear().toString(),(t.getUTCMonth()+1).toString().padStart(2,"0"),t.getUTCDate().toString().padStart(2,"0"),t.getUTCHours().toString().padStart(2,"0"),t.getUTCMinutes().toString().padStart(2,"0"),t.getUTCSeconds().toString().padStart(2,"0")].join("")},e.getUuid=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto?.randomUUID)return crypto.randomUUID();const t=new Uint8Array(32);if("undefined"!=typeof crypto&&"function"==typeof crypto?.getRandomValues)crypto.getRandomValues(t);else for(let e=0;e<32;e++)t[e]=Math.floor(255*Math.random());return h(t)},e.getVerbosityLevel=function(){return n},e.info=function(t){n>=i.INFOS&&console.log(`Info: ${t}`)},e.isArrayBuffer=function(t){return"object"==typeof t&&void 0!==t?.byteLength},e.isArrayEqual=function(t,e){if(t.length!==e.length)return!1;for(let s=0,i=t.length;s<i;s++)if(t[s]!==e[s])return!1;return!0},e.isNodeJS=void 0,e.normalizeUnicode=function(t){return p||(p=/([\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,g=new Map([["ſt","ſt"]])),t.replaceAll(p,((t,e,s)=>e?e.normalize("NFKC"):g.get(s)))},e.objectFromMap=function(t){const e=Object.create(null);for(const[s,i]of t)e[s]=i;return e},e.objectSize=function(t){return Object.keys(t).length},e.setVerbosityLevel=function(t){Number.isInteger(t)&&(n=t)},e.shadow=a,e.string32=function(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)},e.stringToBytes=l,e.stringToPDFString=function(t){if(t[0]>="ï"){let e;if("þ"===t[0]&&"ÿ"===t[1]?e="utf-16be":"ÿ"===t[0]&&"þ"===t[1]?e="utf-16le":"ï"===t[0]&&"»"===t[1]&&"¿"===t[2]&&(e="utf-8"),e)try{const s=new TextDecoder(e,{fatal:!0}),i=l(t);return s.decode(i)}catch(t){r(`stringToPDFString: "${t}".`)}}const e=[];for(let s=0,i=t.length;s<i;s++){const i=f[t.charCodeAt(s)];e.push(i?String.fromCharCode(i):t.charAt(s))}return e.join("")},e.stringToUTF8String=d,e.unreachable=o,e.utf8StringToString=function(t){return unescape(encodeURIComponent(t))},e.warn=r;const s=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);e.isNodeJS=s,e.IDENTITY_MATRIX=[1,0,0,1,0,0],e.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],e.MAX_IMAGE_SIZE_TO_CACHE=1e7,e.LINE_FACTOR=1.35,e.LINE_DESCENT_FACTOR=.35,e.BASELINE_FACTOR=.35/1.35,e.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},e.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},e.AnnotationEditorPrefix="pdfjs_internal_editor_",e.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15},e.AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23},e.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},e.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},e.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},e.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},e.AnnotationReplyType={GROUP:"Group",REPLY:"R"},e.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},e.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},e.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},e.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},e.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},e.PageActionEventType={O:"PageOpen",C:"PageClose"};const i={ERRORS:0,WARNINGS:1,INFOS:5};e.VerbosityLevel=i,e.CMapCompressionType={NONE:0,BINARY:1},e.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},e.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let n=i.WARNINGS;function r(t){n>=i.WARNINGS&&console.log(`Warning: ${t}`)}function o(t){throw new Error(t)}function a(t,e,s,i=!1){return Object.defineProperty(t,e,{value:s,enumerable:!i,configurable:!0,writable:!1}),s}const c=function(){function t(e,s){this.constructor===t&&o("Cannot initialize BaseException."),this.message=e,this.name=s}return t.prototype=new Error,t.constructor=t,t}();function h(t){"object"==typeof t&&void 0!==t?.length||o("Invalid argument for bytesToString");const e=t.length,s=8192;if(e<s)return String.fromCharCode.apply(null,t);const i=[];for(let n=0;n<e;n+=s){const r=Math.min(n+s,e),o=t.subarray(n,r);i.push(String.fromCharCode.apply(null,o))}return i.join("")}function l(t){"string"!=typeof t&&o("Invalid argument for stringToBytes");const e=t.length,s=new Uint8Array(e);for(let i=0;i<e;++i)s[i]=255&t.charCodeAt(i);return s}e.BaseException=c,e.PasswordException=class extends c{constructor(t,e){super(t,"PasswordException"),this.code=e}},e.UnknownErrorException=class extends c{constructor(t,e){super(t,"UnknownErrorException"),this.details=e}},e.InvalidPDFException=class extends c{constructor(t){super(t,"InvalidPDFException")}},e.MissingPDFException=class extends c{constructor(t){super(t,"MissingPDFException")}},e.UnexpectedResponseException=class extends c{constructor(t,e){super(t,"UnexpectedResponseException"),this.status=e}},e.FormatError=class extends c{constructor(t){super(t,"FormatError")}},e.AbortException=class extends c{constructor(t){super(t,"AbortException")}},e.FeatureTest=class{static get isLittleEndian(){return a(this,"isLittleEndian",function(){const t=new Uint8Array(4);return t[0]=1,1===new Uint32Array(t.buffer,0,1)[0]}())}static get isEvalSupported(){return a(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return a(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get platform(){return"undefined"==typeof navigator?a(this,"platform",{isWin:!1,isMac:!1}):a(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}static get isCSSRoundSupported(){return a(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}};const u=[...Array(256).keys()].map((t=>t.toString(16).padStart(2,"0")));e.Util=class{static makeHexColor(t,e,s){return`#${u[t]}${u[e]}${u[s]}`}static scaleMinMax(t,e){let s;t[0]?(t[0]<0&&(s=e[0],e[0]=e[1],e[1]=s),e[0]*=t[0],e[1]*=t[0],t[3]<0&&(s=e[2],e[2]=e[3],e[3]=s),e[2]*=t[3],e[3]*=t[3]):(s=e[0],e[0]=e[2],e[2]=s,s=e[1],e[1]=e[3],e[3]=s,t[1]<0&&(s=e[2],e[2]=e[3],e[3]=s),e[2]*=t[1],e[3]*=t[1],t[2]<0&&(s=e[0],e[0]=e[1],e[1]=s),e[0]*=t[2],e[1]*=t[2]),e[0]+=t[4],e[1]+=t[4],e[2]+=t[5],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static applyTransform(t,e){return[t[0]*e[0]+t[1]*e[2]+e[4],t[0]*e[1]+t[1]*e[3]+e[5]]}static applyInverseTransform(t,e){const s=e[0]*e[3]-e[1]*e[2];return[(t[0]*e[3]-t[1]*e[2]+e[2]*e[5]-e[4]*e[3])/s,(-t[0]*e[1]+t[1]*e[0]+e[4]*e[1]-e[5]*e[0])/s]}static getAxialAlignedBoundingBox(t,e){const s=this.applyTransform(t,e),i=this.applyTransform(t.slice(2,4),e),n=this.applyTransform([t[0],t[3]],e),r=this.applyTransform([t[2],t[1]],e);return[Math.min(s[0],i[0],n[0],r[0]),Math.min(s[1],i[1],n[1],r[1]),Math.max(s[0],i[0],n[0],r[0]),Math.max(s[1],i[1],n[1],r[1])]}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t){const e=[t[0],t[2],t[1],t[3]],s=t[0]*e[0]+t[1]*e[2],i=t[2]*e[1]+t[3]*e[3],n=(s+i)/2,r=Math.sqrt((s+i)**2-4*(s*i-(t[2]*e[0]+t[3]*e[2])*(t[0]*e[1]+t[1]*e[3])))/2,o=n-r||1;return[Math.sqrt(n+r||1),Math.sqrt(o)]}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){const s=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),i=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(s>i)return null;const n=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),r=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return n>r?null:[s,n,i,r]}static bezierBoundingBox(t,e,s,i,n,r,o,a){const c=[],h=[[],[]];let l,u,f,d,p,g,m,w;for(let h=0;h<2;++h)if(0===h?(u=6*t-12*s+6*n,l=-3*t+9*s-9*n+3*o,f=3*s-3*t):(u=6*e-12*i+6*r,l=-3*e+9*i-9*r+3*a,f=3*i-3*e),Math.abs(l)<1e-12){if(Math.abs(u)<1e-12)continue;d=-f/u,0<d&&d<1&&c.push(d)}else m=u*u-4*f*l,w=Math.sqrt(m),m<0||(p=(-u+w)/(2*l),0<p&&p<1&&c.push(p),g=(-u-w)/(2*l),0<g&&g<1&&c.push(g));let b,y=c.length;const A=y;for(;y--;)d=c[y],b=1-d,h[0][y]=b*b*b*t+3*b*b*d*s+3*b*d*d*n+d*d*d*o,h[1][y]=b*b*b*e+3*b*b*d*i+3*b*d*d*r+d*d*d*a;return h[0][A]=t,h[1][A]=e,h[0][A+1]=o,h[1][A+1]=a,h[0].length=h[1].length=A+2,[Math.min(...h[0]),Math.min(...h[1]),Math.max(...h[0]),Math.max(...h[1])]}};const f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,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,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function d(t){return decodeURIComponent(escape(t))}e.PromiseCapability=class{#t=!1;constructor(){this.promise=new Promise(((t,e)=>{this.resolve=e=>{this.#t=!0,t(e)},this.reject=t=>{this.#t=!0,e(t)}}))}get settled(){return this.#t}};let p=null,g=null;e.AnnotationPrefix="pdfjs_internal_id_"},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.XRefParseException=e.XRefEntryException=e.ParserEOFException=e.PDF_VERSION_REGEXP=e.MissingDataException=void 0,e.arrayBuffersToBytes=function(t){const e=t.length;if(0===e)return new Uint8Array(0);if(1===e)return new Uint8Array(t[0]);let s=0;for(let i=0;i<e;i++)s+=t[i].byteLength;const i=new Uint8Array(s);let n=0;for(let s=0;s<e;s++){const e=new Uint8Array(t[s]);i.set(e,n),n+=e.byteLength}return i},e.collectActions=function(t,e,s){const r=Object.create(null),a=o({dict:e,key:"AA",stopWhenFound:!1});if(a)for(let e=a.length-1;e>=0;e--){const i=a[e];if(i instanceof n.Dict)for(const e of i.getKeys()){const o=s[e];if(!o)continue;const a=[];c(i.getRaw(e),t,a,new n.RefSet),a.length>0&&(r[o]=a)}}if(e.has("A")){const s=[];c(e.get("A"),t,s,new n.RefSet),s.length>0&&(r.Action=s)}return(0,i.objectSize)(r)>0?r:null},e.encodeToXmlString=function(t){const e=[];let s=0;for(let i=0,n=t.length;i<n;i++){const n=t.codePointAt(i);if(32<=n&&n<=126){const r=h[n];r&&(s<i&&e.push(t.substring(s,i)),e.push(r),s=i+1)}else s<i&&e.push(t.substring(s,i)),e.push(`&#x${n.toString(16).toUpperCase()};`),n>55295&&(n<57344||n>65533)&&i++,s=i+1}return 0===e.length?t:(s<t.length&&e.push(t.substring(s,t.length)),e.join(""))},e.escapePDFName=function(t){const e=[];let s=0;for(let i=0,n=t.length;i<n;i++){const n=t.charCodeAt(i);(n<33||n>126||35===n||40===n||41===n||60===n||62===n||91===n||93===n||123===n||125===n||47===n||37===n)&&(s<i&&e.push(t.substring(s,i)),e.push(`#${n.toString(16)}`),s=i+1)}return 0===e.length?t:(s<t.length&&e.push(t.substring(s,t.length)),e.join(""))},e.escapeString=function(t){return t.replaceAll(/([()\\\n\r])/g,(t=>"\n"===t?"\\n":"\r"===t?"\\r":`\\${t}`))},e.getInheritableProperty=o,e.getLookupTableFactory=function(t){let e;return function(){return t&&(e=Object.create(null),t(e),t=null),e}},e.getNewAnnotationsMap=function(t){if(!t)return null;const e=new Map;for(const[s,n]of t){if(!s.startsWith(i.AnnotationEditorPrefix))continue;let t=e.get(n.pageIndex);t||(t=[],e.set(n.pageIndex,t)),t.push(n)}return e.size>0?e:null},e.getRotationMatrix=function(t,e,s){switch(t){case 90:return[0,1,-1,0,e,0];case 180:return[-1,0,0,-1,e,s];case 270:return[0,-1,1,0,0,s];default:throw new Error("Invalid rotation")}},e.isAscii=function(t){return/^[\x00-\x7F]*$/.test(t)},e.isWhiteSpace=function(t){return 32===t||9===t||13===t||10===t},e.log2=function(t){return t<=0?0:Math.ceil(Math.log2(t))},e.numberToString=function(t){if(Number.isInteger(t))return t.toString();const e=Math.round(100*t);return e%100==0?(e/100).toString():t.toFixed(e%10==0?1:2)},e.parseXFAPath=function(t){const e=/(.+)\[(\d+)\]$/;return t.split(".").map((t=>{const s=t.match(e);return s?{name:s[1],pos:parseInt(s[2],10)}:{name:t,pos:0}}))},e.readInt8=function(t,e){return t[e]<<24>>24},e.readUint16=function(t,e){return t[e]<<8|t[e+1]},e.readUint32=function(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0},e.recoverJsURL=function(t){const e=new RegExp("^\\s*("+["app.launchURL","window.open","xfa.host.gotoURL"].join("|").replaceAll(".","\\.")+")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))","i").exec(t);if(e?.[2]){let t=!1;return"true"===e[3]&&"app.launchURL"===e[1]&&(t=!0),{url:e[2],newWindow:t}}return null},e.stringToUTF16HexString=function(t){const e=[];for(let s=0,i=t.length;s<i;s++){const i=t.charCodeAt(s);e.push((i>>8&255).toString(16).padStart(2,"0"),(255&i).toString(16).padStart(2,"0"))}return e.join("")},e.stringToUTF16String=function(t,e=!1){const s=[];e&&s.push("þÿ");for(let e=0,i=t.length;e<i;e++){const i=t.charCodeAt(e);s.push(String.fromCharCode(i>>8&255),String.fromCharCode(255&i))}return s.join("")},e.toRomanNumerals=function(t,e=!1){(0,i.assert)(Number.isInteger(t)&&t>0,"The number should be a positive integer.");const s=[];let n;for(;t>=1e3;)t-=1e3,s.push("M");n=t/100|0,t%=100,s.push(a[n]),n=t/10|0,t%=10,s.push(a[10+n]),s.push(a[20+t]);const r=s.join("");return e?r.toLowerCase():r},e.validateCSSFont=function(t){const e=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),{fontFamily:s,fontWeight:i,italicAngle:n}=t;if(!l(s,!0))return!1;const r=i?i.toString():"";t.fontWeight=e.has(r)?r:"400";const o=parseFloat(n);return t.italicAngle=isNaN(o)||o<-90||o>90?"14":n.toString(),!0},e.validateFontName=l;var i=s(2),n=s(4),r=s(5);function o({dict:t,key:e,getArray:s=!1,stopWhenFound:i=!0}){let r;const o=new n.RefSet;for(;t instanceof n.Dict&&(!t.objId||!o.has(t.objId));){t.objId&&o.put(t.objId);const n=s?t.getArray(e):t.get(e);if(void 0!==n){if(i)return n;(r||=[]).push(n)}t=t.get("Parent")}return r}e.PDF_VERSION_REGEXP=/^[1-9]\.\d$/,e.MissingDataException=class extends i.BaseException{constructor(t,e){super(`Missing data [${t}, ${e})`,"MissingDataException"),this.begin=t,this.end=e}},e.ParserEOFException=class extends i.BaseException{constructor(t){super(t,"ParserEOFException")}},e.XRefEntryException=class extends i.BaseException{constructor(t){super(t,"XRefEntryException")}},e.XRefParseException=class extends i.BaseException{constructor(t){super(t,"XRefParseException")}};const a=["","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"];function c(t,e,s,o){if(!t)return;let a=null;if(t instanceof n.Ref){if(o.has(t))return;a=t,o.put(a),t=e.fetch(t)}if(Array.isArray(t))for(const i of t)c(i,e,s,o);else if(t instanceof n.Dict){if((0,n.isName)(t.get("S"),"JavaScript")){const e=t.get("JS");let n;e instanceof r.BaseStream?n=e.getString():"string"==typeof e&&(n=e),n&&=(0,i.stringToPDFString)(n).replaceAll("\0",""),n&&s.push(n)}c(t.getRaw("Next"),e,s,o)}a&&o.remove(a)}const h={60:"&lt;",62:"&gt;",38:"&amp;",34:"&quot;",39:"&apos;"};function l(t,e=!1){const s=/^("|').*("|')$/.exec(t);if(s&&s[1]===s[2]){if(new RegExp(`[^\\\\]${s[1]}`).test(t.slice(1,-1)))return e&&(0,i.warn)(`FontFamily contains unescaped ${s[1]}: ${t}.`),!1}else for(const s of t.split(/[ \t]+/))if(/^(\d|(-(\d|-)))/.test(s)||!/^[\w-\\]+$/.test(s))return e&&(0,i.warn)(`FontFamily contains invalid <custom-ident>: ${t}.`),!1;return!0}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RefSetCache=e.RefSet=e.Ref=e.Name=e.EOF=e.Dict=e.Cmd=e.CIRCULAR_REF=void 0,e.clearPrimitiveCaches=function(){o=Object.create(null),a=Object.create(null),c=Object.create(null)},e.isCmd=function(t,e){return t instanceof l&&(void 0===e||t.cmd===e)},e.isDict=function(t,e){return t instanceof f&&(void 0===e||m(t.get("Type"),e))},e.isName=m,e.isRefsEqual=function(t,e){return t.num===e.num&&t.gen===e.gen};var i=s(2);const n=Symbol("CIRCULAR_REF");e.CIRCULAR_REF=n;const r=Symbol("EOF");e.EOF=r;let o=Object.create(null),a=Object.create(null),c=Object.create(null);class h{constructor(t){this.name=t}static get(t){return a[t]||=new h(t)}}e.Name=h;class l{constructor(t){this.cmd=t}static get(t){return o[t]||=new l(t)}}e.Cmd=l;const u=function(){return u};class f{constructor(t=null){this._map=Object.create(null),this.xref=t,this.objId=null,this.suppressEncryption=!1,this.__nonSerializable__=u}assignXref(t){this.xref=t}get size(){return Object.keys(this._map).length}get(t,e,s){let i=this._map[t];return void 0===i&&void 0!==e&&(i=this._map[e],void 0===i&&void 0!==s&&(i=this._map[s])),i instanceof d&&this.xref?this.xref.fetch(i,this.suppressEncryption):i}async getAsync(t,e,s){let i=this._map[t];return void 0===i&&void 0!==e&&(i=this._map[e],void 0===i&&void 0!==s&&(i=this._map[s])),i instanceof d&&this.xref?this.xref.fetchAsync(i,this.suppressEncryption):i}getArray(t,e,s){let i=this._map[t];if(void 0===i&&void 0!==e&&(i=this._map[e],void 0===i&&void 0!==s&&(i=this._map[s])),i instanceof d&&this.xref&&(i=this.xref.fetch(i,this.suppressEncryption)),Array.isArray(i)){i=i.slice();for(let t=0,e=i.length;t<e;t++)i[t]instanceof d&&this.xref&&(i[t]=this.xref.fetch(i[t],this.suppressEncryption))}return i}getRaw(t){return this._map[t]}getKeys(){return Object.keys(this._map)}getRawValues(){return Object.values(this._map)}set(t,e){this._map[t]=e}has(t){return void 0!==this._map[t]}forEach(t){for(const e in this._map)t(e,this.get(e))}static get empty(){const t=new f(null);return t.set=()=>{(0,i.unreachable)("Should not call `set` on the empty dictionary.")},(0,i.shadow)(this,"empty",t)}static merge({xref:t,dictArray:e,mergeSubDicts:s=!1}){const i=new f(t),n=new Map;for(const t of e)if(t instanceof f)for(const[e,i]of Object.entries(t._map)){let t=n.get(e);if(void 0===t)t=[],n.set(e,t);else if(!(s&&i instanceof f))continue;t.push(i)}for(const[e,s]of n){if(1===s.length||!(s[0]instanceof f)){i._map[e]=s[0];continue}const n=new f(t);for(const t of s)for(const[e,s]of Object.entries(t._map))void 0===n._map[e]&&(n._map[e]=s);n.size>0&&(i._map[e]=n)}return n.clear(),i.size>0?i:f.empty}clone(){const t=new f(this.xref);for(const e of this.getKeys())t.set(e,this.getRaw(e));return t}}e.Dict=f;class d{constructor(t,e){this.num=t,this.gen=e}toString(){return 0===this.gen?`${this.num}R`:`${this.num}R${this.gen}`}static fromString(t){const e=c[t];if(e)return e;const s=/^(\d+)R(\d*)$/.exec(t);return s&&"0"!==s[1]?c[t]=new d(parseInt(s[1]),s[2]?parseInt(s[2]):0):null}static get(t,e){const s=0===e?`${t}R`:`${t}R${e}`;return c[s]||=new d(t,e)}}e.Ref=d;class p{constructor(t=null){this._set=new Set(t?._set)}has(t){return this._set.has(t.toString())}put(t){this._set.add(t.toString())}remove(t){this._set.delete(t.toString())}[Symbol.iterator](){return this._set.values()}clear(){this._set.clear()}}e.RefSet=p;class g{constructor(){this._map=new Map}get size(){return this._map.size}get(t){return this._map.get(t.toString())}has(t){return this._map.has(t.toString())}put(t,e){this._map.set(t.toString(),e)}putAlias(t,e){this._map.set(t.toString(),this.get(e))}[Symbol.iterator](){return this._map.values()}clear(){this._map.clear()}}function m(t,e){return t instanceof h&&(void 0===e||t.name===e)}e.RefSetCache=g},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BaseStream=void 0;var i=s(2);class n{constructor(){this.constructor===n&&(0,i.unreachable)("Cannot initialize BaseStream.")}get length(){(0,i.unreachable)("Abstract getter `length` accessed")}get isEmpty(){(0,i.unreachable)("Abstract getter `isEmpty` accessed")}get isDataLoaded(){return(0,i.shadow)(this,"isDataLoaded",!0)}getByte(){(0,i.unreachable)("Abstract method `getByte` called")}getBytes(t){(0,i.unreachable)("Abstract method `getBytes` called")}peekByte(){const t=this.getByte();return-1!==t&&this.pos--,t}peekBytes(t){const e=this.getBytes(t);return this.pos-=e.length,e}getUint16(){const t=this.getByte(),e=this.getByte();return-1===t||-1===e?-1:(t<<8)+e}getInt32(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}getByteRange(t,e){(0,i.unreachable)("Abstract method `getByteRange` called")}getString(t){return(0,i.bytesToString)(this.getBytes(t))}skip(t){this.pos+=t||1}reset(){(0,i.unreachable)("Abstract method `reset` called")}moveStart(){(0,i.unreachable)("Abstract method `moveStart` called")}makeSubStream(t,e,s=null){(0,i.unreachable)("Abstract method `makeSubStream` called")}getBaseStreams(){return null}}e.BaseStream=n},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkPdfManager=e.LocalPdfManager=void 0;var i=s(2),n=s(7),r=s(3),o=s(9),a=s(8);class c{constructor(t){this.constructor===c&&(0,i.unreachable)("Cannot initialize BasePdfManager."),this._docBaseUrl=function(t){if(t){const e=(0,i.createValidAbsoluteUrl)(t);if(e)return e.href;(0,i.warn)(`Invalid absolute docBaseUrl: "${t}".`)}return null}(t.docBaseUrl),this._docId=t.docId,this._password=t.password,this.enableXfa=t.enableXfa,t.evaluatorOptions.isOffscreenCanvasSupported&&=i.FeatureTest.isOffscreenCanvasSupported,this.evaluatorOptions=t.evaluatorOptions}get docId(){return this._docId}get password(){return this._password}get docBaseUrl(){return this._docBaseUrl}get catalog(){return this.pdfDocument.catalog}ensureDoc(t,e){return this.ensure(this.pdfDocument,t,e)}ensureXRef(t,e){return this.ensure(this.pdfDocument.xref,t,e)}ensureCatalog(t,e){return this.ensure(this.pdfDocument.catalog,t,e)}getPage(t){return this.pdfDocument.getPage(t)}fontFallback(t,e){return this.pdfDocument.fontFallback(t,e)}loadXfaFonts(t,e){return this.pdfDocument.loadXfaFonts(t,e)}loadXfaImages(){return this.pdfDocument.loadXfaImages()}serializeXfaData(t){return this.pdfDocument.serializeXfaData(t)}cleanup(t=!1){return this.pdfDocument.cleanup(t)}async ensure(t,e,s){(0,i.unreachable)("Abstract method `ensure` called")}requestRange(t,e){(0,i.unreachable)("Abstract method `requestRange` called")}requestLoadedStream(t=!1){(0,i.unreachable)("Abstract method `requestLoadedStream` called")}sendProgressiveData(t){(0,i.unreachable)("Abstract method `sendProgressiveData` called")}updatePassword(t){this._password=t}terminate(t){(0,i.unreachable)("Abstract method `terminate` called")}}e.LocalPdfManager=class extends c{constructor(t){super(t);const e=new a.Stream(t.source);this.pdfDocument=new o.PDFDocument(this,e),this._loadedStreamPromise=Promise.resolve(e)}async ensure(t,e,s){const i=t[e];return"function"==typeof i?i.apply(t,s):i}requestRange(t,e){return Promise.resolve()}requestLoadedStream(t=!1){return this._loadedStreamPromise}terminate(t){}},e.NetworkPdfManager=class extends c{constructor(t){super(t),this.streamManager=new n.ChunkedStreamManager(t.source,{msgHandler:t.handler,length:t.length,disableAutoFetch:t.disableAutoFetch,rangeChunkSize:t.rangeChunkSize}),this.pdfDocument=new o.PDFDocument(this,this.streamManager.getStream())}async ensure(t,e,s){try{const i=t[e];return"function"==typeof i?i.apply(t,s):i}catch(i){if(!(i instanceof r.MissingDataException))throw i;return await this.requestRange(i.begin,i.end),this.ensure(t,e,s)}}requestRange(t,e){return this.streamManager.requestRange(t,e)}requestLoadedStream(t=!1){return this.streamManager.requestAllChunks(t)}sendProgressiveData(t){this.streamManager.onReceiveData({chunk:t})}terminate(t){this.streamManager.abort(t)}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ChunkedStreamManager=e.ChunkedStream=void 0;var i=s(3),n=s(2),r=s(8);class o extends r.Stream{constructor(t,e,s){super(new Uint8Array(t),0,t,null),this.chunkSize=e,this._loadedChunks=new Set,this.numChunks=Math.ceil(t/e),this.manager=s,this.progressiveDataLength=0,this.lastSuccessfulEnsureByteChunk=-1}getMissingChunks(){const t=[];for(let e=0,s=this.numChunks;e<s;++e)this._loadedChunks.has(e)||t.push(e);return t}get numChunksLoaded(){return this._loadedChunks.size}get isDataLoaded(){return this.numChunksLoaded===this.numChunks}onReceiveData(t,e){const s=this.chunkSize;if(t%s!=0)throw new Error(`Bad begin offset: ${t}`);const i=t+e.byteLength;if(i%s!=0&&i!==this.bytes.length)throw new Error(`Bad end offset: ${i}`);this.bytes.set(new Uint8Array(e),t);const n=Math.floor(t/s),r=Math.floor((i-1)/s)+1;for(let t=n;t<r;++t)this._loadedChunks.add(t)}onReceiveProgressiveData(t){let e=this.progressiveDataLength;const s=Math.floor(e/this.chunkSize);this.bytes.set(new Uint8Array(t),e),e+=t.byteLength,this.progressiveDataLength=e;const i=e>=this.end?this.numChunks:Math.floor(e/this.chunkSize);for(let t=s;t<i;++t)this._loadedChunks.add(t)}ensureByte(t){if(t<this.progressiveDataLength)return;const e=Math.floor(t/this.chunkSize);if(!(e>this.numChunks)&&e!==this.lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(e))throw new i.MissingDataException(t,t+1);this.lastSuccessfulEnsureByteChunk=e}}ensureRange(t,e){if(t>=e)return;if(e<=this.progressiveDataLength)return;const s=Math.floor(t/this.chunkSize);if(s>this.numChunks)return;const n=Math.min(Math.floor((e-1)/this.chunkSize)+1,this.numChunks);for(let r=s;r<n;++r)if(!this._loadedChunks.has(r))throw new i.MissingDataException(t,e)}nextEmptyChunk(t){const e=this.numChunks;for(let s=0;s<e;++s){const i=(t+s)%e;if(!this._loadedChunks.has(i))return i}return null}hasChunk(t){return this._loadedChunks.has(t)}getByte(){const t=this.pos;return t>=this.end?-1:(t>=this.progressiveDataLength&&this.ensureByte(t),this.bytes[this.pos++])}getBytes(t){const e=this.bytes,s=this.pos,i=this.end;if(!t)return i>this.progressiveDataLength&&this.ensureRange(s,i),e.subarray(s,i);let n=s+t;return n>i&&(n=i),n>this.progressiveDataLength&&this.ensureRange(s,n),this.pos=n,e.subarray(s,n)}getByteRange(t,e){return t<0&&(t=0),e>this.end&&(e=this.end),e>this.progressiveDataLength&&this.ensureRange(t,e),this.bytes.subarray(t,e)}makeSubStream(t,e,s=null){function i(){}e?t+e>this.progressiveDataLength&&this.ensureRange(t,t+e):t>=this.progressiveDataLength&&this.ensureByte(t),(i.prototype=Object.create(this)).getMissingChunks=function(){const t=this.chunkSize,e=Math.floor(this.start/t),s=Math.floor((this.end-1)/t)+1,i=[];for(let t=e;t<s;++t)this._loadedChunks.has(t)||i.push(t);return i},Object.defineProperty(i.prototype,"isDataLoaded",{get(){return this.numChunksLoaded===this.numChunks||0===this.getMissingChunks().length},configurable:!0});const n=new i;return n.pos=n.start=t,n.end=t+e||this.end,n.dict=s,n}getBaseStreams(){return[this]}}e.ChunkedStream=o,e.ChunkedStreamManager=class{constructor(t,e){this.length=e.length,this.chunkSize=e.rangeChunkSize,this.stream=new o(this.length,this.chunkSize,this),this.pdfNetworkStream=t,this.disableAutoFetch=e.disableAutoFetch,this.msgHandler=e.msgHandler,this.currRequestId=0,this._chunksNeededByRequest=new Map,this._requestsByChunk=new Map,this._promisesByRequest=new Map,this.progressiveDataLength=0,this.aborted=!1,this._loadedStreamCapability=new n.PromiseCapability}sendRequest(t,e){const s=this.pdfNetworkStream.getRangeReader(t,e);s.isStreamingSupported||(s.onProgress=this.onProgress.bind(this));let n=[],r=0;return new Promise(((t,e)=>{const o=({value:a,done:c})=>{try{if(c){const e=(0,i.arrayBuffersToBytes)(n);return n=null,void t(e)}r+=a.byteLength,s.isStreamingSupported&&this.onProgress({loaded:r}),n.push(a),s.read().then(o,e)}catch(t){e(t)}};s.read().then(o,e)})).then((e=>{this.aborted||this.onReceiveData({chunk:e,begin:t})}))}requestAllChunks(t=!1){if(!t){const t=this.stream.getMissingChunks();this._requestChunks(t)}return this._loadedStreamCapability.promise}_requestChunks(t){const e=this.currRequestId++,s=new Set;this._chunksNeededByRequest.set(e,s);for(const e of t)this.stream.hasChunk(e)||s.add(e);if(0===s.size)return Promise.resolve();const i=new n.PromiseCapability;this._promisesByRequest.set(e,i);const r=[];for(const t of s){let s=this._requestsByChunk.get(t);s||(s=[],this._requestsByChunk.set(t,s),r.push(t)),s.push(e)}if(r.length>0){const t=this.groupChunks(r);for(const e of t){const t=e.beginChunk*this.chunkSize,s=Math.min(e.endChunk*this.chunkSize,this.length);this.sendRequest(t,s).catch(i.reject)}}return i.promise.catch((t=>{if(!this.aborted)throw t}))}getStream(){return this.stream}requestRange(t,e){e=Math.min(e,this.length);const s=this.getBeginChunk(t),i=this.getEndChunk(e),n=[];for(let t=s;t<i;++t)n.push(t);return this._requestChunks(n)}requestRanges(t=[]){const e=[];for(const s of t){const t=this.getBeginChunk(s.begin),i=this.getEndChunk(s.end);for(let s=t;s<i;++s)e.includes(s)||e.push(s)}return e.sort((function(t,e){return t-e})),this._requestChunks(e)}groupChunks(t){const e=[];let s=-1,i=-1;for(let n=0,r=t.length;n<r;++n){const r=t[n];s<0&&(s=r),i>=0&&i+1!==r&&(e.push({beginChunk:s,endChunk:i+1}),s=r),n+1===t.length&&e.push({beginChunk:s,endChunk:r+1}),i=r}return e}onProgress(t){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+t.loaded,total:this.length})}onReceiveData(t){const e=t.chunk,s=void 0===t.begin,i=s?this.progressiveDataLength:t.begin,n=i+e.byteLength,r=Math.floor(i/this.chunkSize),o=n<this.length?Math.floor(n/this.chunkSize):Math.ceil(n/this.chunkSize);s?(this.stream.onReceiveProgressiveData(e),this.progressiveDataLength=n):this.stream.onReceiveData(i,e),this.stream.isDataLoaded&&this._loadedStreamCapability.resolve(this.stream);const a=[];for(let t=r;t<o;++t){const e=this._requestsByChunk.get(t);if(e){this._requestsByChunk.delete(t);for(const s of e){const e=this._chunksNeededByRequest.get(s);e.has(t)&&e.delete(t),e.size>0||a.push(s)}}}if(!this.disableAutoFetch&&0===this._requestsByChunk.size){let t;if(1===this.stream.numChunksLoaded){const e=this.stream.numChunks-1;this.stream.hasChunk(e)||(t=e)}else t=this.stream.nextEmptyChunk(o);Number.isInteger(t)&&this._requestChunks([t])}for(const t of a){const e=this._promisesByRequest.get(t);this._promisesByRequest.delete(t),e.resolve()}this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize,total:this.length})}onError(t){this._loadedStreamCapability.reject(t)}getBeginChunk(t){return Math.floor(t/this.chunkSize)}getEndChunk(t){return Math.floor((t-1)/this.chunkSize)+1}abort(t){this.aborted=!0,this.pdfNetworkStream?.cancelAllRequests(t);for(const e of this._promisesByRequest.values())e.reject(t)}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.StringStream=e.Stream=e.NullStream=void 0;var i=s(5),n=s(2);class r extends i.BaseStream{constructor(t,e,s,i){super(),this.bytes=t instanceof Uint8Array?t:new Uint8Array(t),this.start=e||0,this.pos=this.start,this.end=e+s||this.bytes.length,this.dict=i}get length(){return this.end-this.start}get isEmpty(){return 0===this.length}getByte(){return this.pos>=this.end?-1:this.bytes[this.pos++]}getBytes(t){const e=this.bytes,s=this.pos,i=this.end;if(!t)return e.subarray(s,i);let n=s+t;return n>i&&(n=i),this.pos=n,e.subarray(s,n)}getByteRange(t,e){return t<0&&(t=0),e>this.end&&(e=this.end),this.bytes.subarray(t,e)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(t,e,s=null){return new r(this.bytes.buffer,t,e,s)}}e.Stream=r,e.StringStream=class extends r{constructor(t){super((0,n.stringToBytes)(t))}},e.NullStream=class extends r{constructor(){super(new Uint8Array(0))}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Page=e.PDFDocument=void 0;var i=s(2),n=s(10),r=s(3),o=s(4),a=s(51),c=s(5),h=s(74),l=s(66),u=s(68),f=s(102),d=s(16),p=s(8),g=s(76),m=s(64),w=s(13),b=s(18),y=s(72),A=s(73),v=s(77),x=s(103);const k=[0,0,612,792];class S{constructor({pdfManager:t,xref:e,pageIndex:s,pageDict:i,ref:n,globalIdFactory:r,fontCache:o,builtInCMapCache:a,standardFontDataCache:c,globalImageCache:h,systemFontCache:l,nonBlendModesSet:u,xfaFactory:f}){this.pdfManager=t,this.pageIndex=s,this.pageDict=i,this.xref=e,this.ref=n,this.fontCache=o,this.builtInCMapCache=a,this.standardFontDataCache=c,this.globalImageCache=h,this.systemFontCache=l,this.nonBlendModesSet=u,this.evaluatorOptions=t.evaluatorOptions,this.resourcesPromise=null,this.xfaFactory=f;const d={obj:0};this._localIdFactory=class extends r{static createObjId(){return`p${s}_${++d.obj}`}static getPageObjId(){return`p${n.toString()}`}}}_getInheritableProperty(t,e=!1){const s=(0,r.getInheritableProperty)({dict:this.pageDict,key:t,getArray:e,stopWhenFound:!1});return Array.isArray(s)?1!==s.length&&s[0]instanceof o.Dict?o.Dict.merge({xref:this.xref,dictArray:s}):s[0]:s}get content(){return this.pageDict.getArray("Contents")}get resources(){const t=this._getInheritableProperty("Resources");return(0,i.shadow)(this,"resources",t instanceof o.Dict?t:o.Dict.empty)}_getBoundingBox(t){if(this.xfaData)return this.xfaData.bbox;let e=this._getInheritableProperty(t,!0);if(Array.isArray(e)&&4===e.length){if(e=i.Util.normalizeRect(e),e[2]-e[0]>0&&e[3]-e[1]>0)return e;(0,i.warn)(`Empty, or invalid, /${t} entry.`)}return null}get mediaBox(){return(0,i.shadow)(this,"mediaBox",this._getBoundingBox("MediaBox")||k)}get cropBox(){return(0,i.shadow)(this,"cropBox",this._getBoundingBox("CropBox")||this.mediaBox)}get userUnit(){let t=this.pageDict.get("UserUnit");return("number"!=typeof t||t<=0)&&(t=1),(0,i.shadow)(this,"userUnit",t)}get view(){const{cropBox:t,mediaBox:e}=this;if(t!==e&&!(0,i.isArrayEqual)(t,e)){const s=i.Util.intersect(t,e);if(s&&s[2]-s[0]>0&&s[3]-s[1]>0)return(0,i.shadow)(this,"view",s);(0,i.warn)("Empty /CropBox and /MediaBox intersection.")}return(0,i.shadow)(this,"view",e)}get rotate(){let t=this._getInheritableProperty("Rotate")||0;return t%90!=0?t=0:t>=360?t%=360:t<0&&(t=(t%360+360)%360),(0,i.shadow)(this,"rotate",t)}_onSubStreamError(t,e){if(!this.evaluatorOptions.ignoreErrors)throw t;(0,i.warn)(`getContentStream - ignoring sub-stream (${e}): "${t}".`)}getContentStream(){return this.pdfManager.ensure(this,"content").then((t=>t instanceof c.BaseStream?t:Array.isArray(t)?new b.StreamsSequenceStream(t,this._onSubStreamError.bind(this)):new p.NullStream))}get xfaData(){return(0,i.shadow)(this,"xfaData",this.xfaFactory?{bbox:this.xfaFactory.getBoundingBox(this.pageIndex)}:null)}#Ti(t,e,s){for(const n of t)if(n.id){const t=o.Ref.fromString(n.id);if(!t){(0,i.warn)(`A non-linked annotation cannot be modified: ${n.id}`);continue}if(n.deleted){e.put(t);continue}s?.put(t),n.ref=t,delete n.id}}async saveNewAnnotations(t,e,s,i){if(this.xfaFactory)throw new Error("XFA: Cannot save new annotations.");const r=new w.PartialEvaluator({xref:this.xref,handler:t,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),a=new o.RefSet,c=new o.RefSet;this.#Ti(s,a,c);const h=this.pageDict,l=this.annotations.filter((t=>!(t instanceof o.Ref&&a.has(t)))),u=await n.AnnotationFactory.saveNewAnnotations(r,e,s,i);for(const{ref:t}of u.annotations)t instanceof o.Ref&&!c.has(t)&&l.push(t);const f=h.get("Annots");h.set("Annots",l);const d=[];await(0,A.writeObject)(this.ref,h,d,this.xref),f&&h.set("Annots",f);const p=u.dependencies;return p.push({ref:this.ref,data:d.join("")},...u.annotations),p}save(t,e,s){const n=new w.PartialEvaluator({xref:this.xref,handler:t,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions});return this._parsedAnnotations.then((function(t){const r=[];for(const o of t)o.mustBePrinted(s)&&r.push(o.save(n,e,s).catch((function(t){return(0,i.warn)(`save - ignoring annotation data during "${e.name}" task: "${t}".`),null})));return Promise.all(r).then((function(t){return t.filter((t=>!!t))}))}))}loadResources(t){return this.resourcesPromise||(this.resourcesPromise=this.pdfManager.ensure(this,"resources")),this.resourcesPromise.then((()=>new g.ObjectLoader(this.resources,t,this.xref).load()))}getOperatorList({handler:t,sink:e,task:s,intent:a,cacheKey:c,annotationStorage:h=null}){const l=this.getContentStream(),u=this.loadResources(["ColorSpace","ExtGState","Font","Pattern","Properties","Shading","XObject"]),f=new w.PartialEvaluator({xref:this.xref,handler:t,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),d=this.xfaFactory?null:(0,r.getNewAnnotationsMap)(h);let p=null,g=Promise.resolve(null);if(d){const t=d.get(this.pageIndex);if(t){const e=this.pdfManager.ensureDoc("annotationGlobals");let r;const a=new Set;for(const{bitmapId:e,bitmap:s}of t)!e||s||a.has(e)||a.add(e);const{isOffscreenCanvasSupported:c}=this.evaluatorOptions;if(a.size>0){const e=t.slice();for(const[t,s]of h)t.startsWith(i.AnnotationEditorPrefix)&&s.bitmap&&a.has(s.bitmapId)&&e.push(s);r=n.AnnotationFactory.generateImages(e,this.xref,c)}else r=n.AnnotationFactory.generateImages(t,this.xref,c);p=new o.RefSet,this.#Ti(t,p,null),g=e.then((e=>e?n.AnnotationFactory.printNewAnnotations(e,f,s,t,r):null))}}const b=Promise.all([l,u]).then((([i])=>{const n=new m.OperatorList(a,e);return t.send("StartRenderPage",{transparency:f.hasBlendModes(this.resources,this.nonBlendModesSet),pageIndex:this.pageIndex,cacheKey:c}),f.getOperatorList({stream:i,task:s,resources:this.resources,operatorList:n}).then((function(){return n}))}));return Promise.all([b,this._parsedAnnotations,g]).then((function([t,e,n]){if(n){e=e.filter((t=>!(t.ref&&p.has(t.ref))));for(let t=0,s=n.length;t<s;t++){const i=n[t];if(i.refToReplace){const r=e.findIndex((t=>t.ref&&(0,o.isRefsEqual)(t.ref,i.refToReplace)));r>=0&&(e.splice(r,1,i),n.splice(t--,1),s--)}}e=e.concat(n)}if(0===e.length||a&i.RenderingIntentFlag.ANNOTATIONS_DISABLE)return t.flush(!0),{length:t.totalLength};const r=!!(a&i.RenderingIntentFlag.ANNOTATIONS_FORMS),c=!!(a&i.RenderingIntentFlag.ANY),l=!!(a&i.RenderingIntentFlag.DISPLAY),u=!!(a&i.RenderingIntentFlag.PRINT),d=[];for(const t of e)(c||l&&t.mustBeViewed(h,r)||u&&t.mustBePrinted(h))&&d.push(t.getOperatorList(f,s,a,r,h).catch((function(t){return(0,i.warn)(`getOperatorList - ignoring annotation data during "${s.name}" task: "${t}".`),{opList:null,separateForm:!1,separateCanvas:!1}})));return Promise.all(d).then((function(e){let s=!1,i=!1;for(const{opList:n,separateForm:r,separateCanvas:o}of e)t.addOpList(n),s||=r,i||=o;return t.flush(!0,{form:s,canvas:i}),{length:t.totalLength}}))}))}extractTextContent({handler:t,task:e,includeMarkedContent:s,disableNormalization:i,sink:n}){const r=this.getContentStream(),o=this.loadResources(["ExtGState","Font","Properties","XObject"]);return Promise.all([r,o]).then((([r])=>new w.PartialEvaluator({xref:this.xref,handler:t,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}).getTextContent({stream:r,task:e,resources:this.resources,includeMarkedContent:s,disableNormalization:i,sink:n,viewBox:this.view})))}async getStructTree(){const t=await this.pdfManager.ensureCatalog("structTreeRoot");return t?(await this._parsedAnnotations,(await this.pdfManager.ensure(this,"_parseStructTree",[t])).serializable):null}_parseStructTree(t){const e=new y.StructTreePage(t,this.pageDict);return e.parse(this.ref),e}async getAnnotationsData(t,e,s){const n=await this._parsedAnnotations;if(0===n.length)return n;const r=[],o=[];let a;const c=!!(s&i.RenderingIntentFlag.ANY),h=!!(s&i.RenderingIntentFlag.DISPLAY),l=!!(s&i.RenderingIntentFlag.PRINT);for(const s of n){const n=c||h&&s.viewable;(n||l&&s.printable)&&r.push(s.data),s.hasTextContent&&n&&(a||=new w.PartialEvaluator({xref:this.xref,handler:t,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),o.push(s.extractTextContent(a,e,[-1/0,-1/0,1/0,1/0]).catch((function(t){(0,i.warn)(`getAnnotationsData - ignoring textContent during "${e.name}" task: "${t}".`)}))))}return await Promise.all(o),r}get annotations(){const t=this._getInheritableProperty("Annots");return(0,i.shadow)(this,"annotations",Array.isArray(t)?t:[])}get _parsedAnnotations(){const t=this.pdfManager.ensure(this,"annotations").then((async t=>{if(0===t.length)return t;const e=await this.pdfManager.ensureDoc("annotationGlobals");if(!e)return[];const s=[];for(const r of t)s.push(n.AnnotationFactory.create(this.xref,r,e,this._localIdFactory,!1,this.ref).catch((function(t){return(0,i.warn)(`_parsedAnnotations: "${t}".`),null})));const r=[];let o;for(const t of await Promise.all(s))t&&(t instanceof n.PopupAnnotation?(o||=[]).push(t):r.push(t));return o&&r.push(...o),r}));return(0,i.shadow)(this,"_parsedAnnotations",t)}get jsActions(){const t=(0,r.collectActions)(this.xref,this.pageDict,i.PageActionEventType);return(0,i.shadow)(this,"jsActions",t)}}e.Page=S;const M=new Uint8Array([37,80,68,70,45]),C=new Uint8Array([115,116,97,114,116,120,114,101,102]),_=new Uint8Array([101,110,100,111,98,106]);function I(t,e,s=1024,i=!1){const n=e.length,r=t.peekBytes(s),o=r.length-n;if(o<=0)return!1;if(i){const s=n-1;let i=r.length-1;for(;i>=s;){let o=0;for(;o<n&&r[i-o]===e[s-o];)o++;if(o>=n)return t.pos+=i-s,!0;i--}}else{let s=0;for(;s<=o;){let i=0;for(;i<n&&r[s+i]===e[i];)i++;if(i>=n)return t.pos+=s,!0;s++}}return!1}e.PDFDocument=class{constructor(t,e){if(e.length<=0)throw new i.InvalidPDFException("The PDF file is empty, i.e. its size is zero bytes.");this.pdfManager=t,this.stream=e,this.xref=new x.XRef(e,t),this._pagePromises=new Map,this._version=null;const s={font:0};this._globalIdFactory=class{static getDocId(){return`g_${t.docId}`}static createFontId(){return"f"+ ++s.font}static createObjId(){(0,i.unreachable)("Abstract method `createObjId` called.")}static getPageObjId(){(0,i.unreachable)("Abstract method `getPageObjId` called.")}}}parse(t){this.xref.parse(t),this.catalog=new l.Catalog(this.pdfManager,this.xref)}get linearization(){let t=null;try{t=d.Linearization.create(this.stream)}catch(t){if(t instanceof r.MissingDataException)throw t;(0,i.info)(t)}return(0,i.shadow)(this,"linearization",t)}get startXRef(){const t=this.stream;let e=0;if(this.linearization)t.reset(),I(t,_)&&(e=t.pos+6-t.start);else{const s=1024,i=C.length;let n=!1,o=t.end;for(;!n&&o>0;)o-=s-i,o<0&&(o=0),t.pos=o,n=I(t,C,s,!0);if(n){let s;t.skip(9);do{s=t.getByte()}while((0,r.isWhiteSpace)(s));let i="";for(;s>=32&&s<=57;)i+=String.fromCharCode(s),s=t.getByte();e=parseInt(i,10),isNaN(e)&&(e=0)}}return(0,i.shadow)(this,"startXRef",e)}checkHeader(){const t=this.stream;if(t.reset(),!I(t,M))return;t.moveStart(),t.skip(M.length);let e,s="";for(;(e=t.getByte())>32&&s.length<7;)s+=String.fromCharCode(e);r.PDF_VERSION_REGEXP.test(s)?this._version=s:(0,i.warn)(`Invalid PDF header version: ${s}`)}parseStartXRef(){this.xref.setStartXRef(this.startXRef)}get numPages(){let t=0;return t=this.catalog.hasActualNumPages?this.catalog.numPages:this.xfaFactory?this.xfaFactory.getNumPages():this.linearization?this.linearization.numPages:this.catalog.numPages,(0,i.shadow)(this,"numPages",t)}_hasOnlyDocumentSignatures(t,e=0){return!!Array.isArray(t)&&t.every((t=>{if(!((t=this.xref.fetchIfRef(t))instanceof o.Dict))return!1;if(t.has("Kids"))return++e>10?((0,i.warn)("_hasOnlyDocumentSignatures: maximum recursion depth reached"),!1):this._hasOnlyDocumentSignatures(t.get("Kids"),e);const s=(0,o.isName)(t.get("FT"),"Sig"),n=t.get("Rect"),r=Array.isArray(n)&&n.every((t=>0===t));return s&&r}))}get _xfaStreams(){const t=this.catalog.acroForm;if(!t)return null;const e=t.get("XFA"),s={"xdp:xdp":"",template:"",datasets:"",config:"",connectionSet:"",localeSet:"",stylesheet:"","/xdp:xdp":""};if(e instanceof c.BaseStream&&!e.isEmpty)return s["xdp:xdp"]=e,s;if(!Array.isArray(e)||0===e.length)return null;for(let t=0,i=e.length;t<i;t+=2){let n;if(n=0===t?"xdp:xdp":t===i-2?"/xdp:xdp":e[t],!s.hasOwnProperty(n))continue;const r=this.xref.fetchIfRef(e[t+1]);r instanceof c.BaseStream&&!r.isEmpty&&(s[n]=r)}return s}get xfaDatasets(){const t=this._xfaStreams;if(!t)return(0,i.shadow)(this,"xfaDatasets",null);for(const e of["datasets","xdp:xdp"]){const s=t[e];if(s)try{const t=(0,i.stringToUTF8String)(s.getString());return(0,i.shadow)(this,"xfaDatasets",new f.DatasetReader({[e]:t}))}catch{(0,i.warn)("XFA - Invalid utf-8 string.");break}}return(0,i.shadow)(this,"xfaDatasets",null)}get xfaData(){const t=this._xfaStreams;if(!t)return null;const e=Object.create(null);for(const[s,n]of Object.entries(t))if(n)try{e[s]=(0,i.stringToUTF8String)(n.getString())}catch{return(0,i.warn)("XFA - Invalid utf-8 string."),null}return e}get xfaFactory(){let t;return this.pdfManager.enableXfa&&this.catalog.needsRendering&&this.formInfo.hasXfa&&!this.formInfo.hasAcroForm&&(t=this.xfaData),(0,i.shadow)(this,"xfaFactory",t?new v.XFAFactory(t):null)}get isPureXfa(){return!!this.xfaFactory&&this.xfaFactory.isValid()}get htmlForXfa(){return this.xfaFactory?this.xfaFactory.getPages():null}async loadXfaImages(){const t=await this.pdfManager.ensureCatalog("xfaImages");if(!t)return;const e=t.getKeys(),s=new g.ObjectLoader(t,e,this.xref);await s.load();const i=new Map;for(const s of e){const e=t.get(s);e instanceof c.BaseStream&&i.set(s,e.getBytes())}this.xfaFactory.setImages(i)}async loadXfaFonts(t,e){const s=await this.pdfManager.ensureCatalog("acroForm");if(!s)return;const n=await s.getAsync("DR");if(!(n instanceof o.Dict))return;const c=new g.ObjectLoader(n,["Font"],this.xref);await c.load();const h=n.get("Font");if(!(h instanceof o.Dict))return;const l=Object.assign(Object.create(null),this.pdfManager.evaluatorOptions);l.useSystemFonts=!1;const u=new w.PartialEvaluator({xref:this.xref,handler:t,pageIndex:-1,idFactory:this._globalIdFactory,fontCache:this.catalog.fontCache,builtInCMapCache:this.catalog.builtInCMapCache,standardFontDataCache:this.catalog.standardFontDataCache,options:l}),f=new m.OperatorList,d=[],p={get font(){return d.at(-1)},set font(t){d.push(t)},clone(){return this}},b=new Map;h.forEach(((t,e)=>{b.set(t,e)}));const y=[];for(const[t,s]of b){const a=s.get("FontDescriptor");if(!(a instanceof o.Dict))continue;let c=a.get("FontFamily");c=c.replaceAll(/[ ]+(\d)/g,"$1");const h={fontFamily:c,fontWeight:a.get("FontWeight"),italicAngle:-a.get("ItalicAngle")};(0,r.validateCSSFont)(h)&&y.push(u.handleSetFont(n,[o.Name.get(t),1],null,f,e,p,null,h).catch((function(t){return(0,i.warn)(`loadXfaFonts: "${t}".`),null})))}await Promise.all(y);const A=this.xfaFactory.setFonts(d);if(!A)return;l.ignoreErrors=!0,y.length=0,d.length=0;const v=new Set;for(const t of A)(0,a.getXfaFontName)(`${t}-Regular`)||v.add(t);v.size&&A.push("PdfJS-Fallback");for(const t of A)if(!v.has(t))for(const s of[{name:"Regular",fontWeight:400,italicAngle:0},{name:"Bold",fontWeight:700,italicAngle:0},{name:"Italic",fontWeight:400,italicAngle:12},{name:"BoldItalic",fontWeight:700,italicAngle:12}]){const r=`${t}-${s.name}`,c=(0,a.getXfaFontDict)(r);y.push(u.handleSetFont(n,[o.Name.get(r),1],null,f,e,p,c,{fontFamily:t,fontWeight:s.fontWeight,italicAngle:s.italicAngle}).catch((function(t){return(0,i.warn)(`loadXfaFonts: "${t}".`),null})))}await Promise.all(y),this.xfaFactory.appendFonts(d,v)}async serializeXfaData(t){return this.xfaFactory?this.xfaFactory.serializeData(t):null}get version(){return this.catalog.version||this._version}get formInfo(){const t={hasFields:!1,hasAcroForm:!1,hasXfa:!1,hasSignatures:!1},e=this.catalog.acroForm;if(!e)return(0,i.shadow)(this,"formInfo",t);try{const s=e.get("Fields"),i=Array.isArray(s)&&s.length>0;t.hasFields=i;const n=e.get("XFA");t.hasXfa=Array.isArray(n)&&n.length>0||n instanceof c.BaseStream&&!n.isEmpty;const r=!!(1&e.get("SigFlags")),o=r&&this._hasOnlyDocumentSignatures(s);t.hasAcroForm=i&&!o,t.hasSignatures=r}catch(t){if(t instanceof r.MissingDataException)throw t;(0,i.warn)(`Cannot fetch form information: "${t}".`)}return(0,i.shadow)(this,"formInfo",t)}get documentInfo(){const t={PDFFormatVersion:this.version,Language:this.catalog.lang,EncryptFilterName:this.xref.encrypt?this.xref.encrypt.filterName:null,IsLinearized:!!this.linearization,IsAcroFormPresent:this.formInfo.hasAcroForm,IsXFAPresent:this.formInfo.hasXfa,IsCollectionPresent:!!this.catalog.collection,IsSignaturesPresent:this.formInfo.hasSignatures};let e;try{e=this.xref.trailer.get("Info")}catch(t){if(t instanceof r.MissingDataException)throw t;(0,i.info)("The document information dictionary is invalid.")}if(!(e instanceof o.Dict))return(0,i.shadow)(this,"documentInfo",t);for(const s of e.getKeys()){const n=e.get(s);switch(s){case"Title":case"Author":case"Subject":case"Keywords":case"Creator":case"Producer":case"CreationDate":case"ModDate":if("string"==typeof n){t[s]=(0,i.stringToPDFString)(n);continue}break;case"Trapped":if(n instanceof o.Name){t[s]=n;continue}break;default:let e;switch(typeof n){case"string":e=(0,i.stringToPDFString)(n);break;case"number":case"boolean":e=n;break;default:n instanceof o.Name&&(e=n)}if(void 0===e){(0,i.warn)(`Bad value, for custom key "${s}", in Info: ${n}.`);continue}t.Custom||(t.Custom=Object.create(null)),t.Custom[s]=e;continue}(0,i.warn)(`Bad value, for key "${s}", in Info: ${n}.`)}return(0,i.shadow)(this,"documentInfo",t)}get fingerprints(){function t(t){return"string"==typeof t&&t.length>0&&"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"!==t}function e(t){const e=[];for(const s of t){const t=s.toString(16);e.push(t.padStart(2,"0"))}return e.join("")}const s=this.xref.trailer.get("ID");let n,r;return Array.isArray(s)&&t(s[0])?(n=(0,i.stringToBytes)(s[0]),s[1]!==s[0]&&t(s[1])&&(r=(0,i.stringToBytes)(s[1]))):n=(0,h.calculateMD5)(this.stream.getByteRange(0,1024),0,1024),(0,i.shadow)(this,"fingerprints",[e(n),r?e(r):null])}async _getLinearizationPage(t){const{catalog:e,linearization:s,xref:n}=this,r=o.Ref.get(s.objectNumberFirst,0);try{const t=await n.fetchAsync(r);if(t instanceof o.Dict){let s=t.getRaw("Type");if(s instanceof o.Ref&&(s=await n.fetchAsync(s)),(0,o.isName)(s,"Page")||!t.has("Type")&&!t.has("Kids"))return e.pageKidsCountCache.has(r)||e.pageKidsCountCache.put(r,1),e.pageIndexCache.has(r)||e.pageIndexCache.put(r,0),[t,r]}throw new i.FormatError("The Linearization dictionary doesn't point to a valid Page dictionary.")}catch(s){return(0,i.warn)(`_getLinearizationPage: "${s.message}".`),e.getPageDict(t)}}getPage(t){const e=this._pagePromises.get(t);if(e)return e;const{catalog:s,linearization:i,xfaFactory:n}=this;let r;return r=n?Promise.resolve([o.Dict.empty,null]):i?.pageFirst===t?this._getLinearizationPage(t):s.getPageDict(t),r=r.then((([e,i])=>new S({pdfManager:this.pdfManager,xref:this.xref,pageIndex:t,pageDict:e,ref:i,globalIdFactory:this._globalIdFactory,fontCache:s.fontCache,builtInCMapCache:s.builtInCMapCache,standardFontDataCache:s.standardFontDataCache,globalImageCache:s.globalImageCache,systemFontCache:s.systemFontCache,nonBlendModesSet:s.nonBlendModesSet,xfaFactory:n}))),this._pagePromises.set(t,r),r}async checkFirstPage(t=!1){if(!t)try{await this.getPage(0)}catch(t){if(t instanceof r.XRefEntryException)throw this._pagePromises.delete(0),await this.cleanup(),new r.XRefParseException}}async checkLastPage(t=!1){const{catalog:e,pdfManager:s}=this;let n;e.setActualNumPages();try{if(await Promise.all([s.ensureDoc("xfaFactory"),s.ensureDoc("linearization"),s.ensureCatalog("numPages")]),this.xfaFactory)return;if(n=this.linearization?this.linearization.numPages:e.numPages,!Number.isInteger(n))throw new i.FormatError("Page count is not an integer.");if(n<=1)return;await this.getPage(n-1)}catch(o){if(this._pagePromises.delete(n-1),await this.cleanup(),o instanceof r.XRefEntryException&&!t)throw new r.XRefParseException;let a;(0,i.warn)(`checkLastPage - invalid /Pages tree /Count: ${n}.`);try{a=await e.getAllPageDicts(t)}catch(s){if(s instanceof r.XRefEntryException&&!t)throw new r.XRefParseException;return void e.setActualNumPages(1)}for(const[t,[i,n]]of a){let r;i instanceof Error?(r=Promise.reject(i),r.catch((()=>{}))):r=Promise.resolve(new S({pdfManager:s,xref:this.xref,pageIndex:t,pageDict:i,ref:n,globalIdFactory:this._globalIdFactory,fontCache:e.fontCache,builtInCMapCache:e.builtInCMapCache,standardFontDataCache:e.standardFontDataCache,globalImageCache:e.globalImageCache,systemFontCache:e.systemFontCache,nonBlendModesSet:e.nonBlendModesSet,xfaFactory:null})),this._pagePromises.set(t,r)}e.setActualNumPages(a.size)}}fontFallback(t,e){return this.catalog.fontFallback(t,e)}async cleanup(t=!1){return this.catalog?this.catalog.cleanup(t):(0,u.clearGlobalCaches)()}#Di(t,e,s,r){const o=this.xref.fetchIfRef(e);if(o.has("T")){const e=(0,i.stringToPDFString)(o.get("T"));t=""===t?e:`${t}.${e}`}if(s.has(t)||s.set(t,[]),s.get(t).push(n.AnnotationFactory.create(this.xref,e,r,this._localIdFactory,!0,null).then((t=>t?.getFieldObject())).catch((function(t){return(0,i.warn)(`#collectFieldObjects: "${t}".`),null}))),o.has("Kids"))for(const e of o.get("Kids"))this.#Di(t,e,s,r)}get fieldObjects(){if(!this.formInfo.hasFields)return(0,i.shadow)(this,"fieldObjects",Promise.resolve(null));const t=this.pdfManager.ensureDoc("annotationGlobals").then((async t=>{if(!t)return null;const e=Object.create(null),s=new Map;for(const e of this.catalog.acroForm.get("Fields"))this.#Di("",e,s,t);const i=[];for(const[t,n]of s)i.push(Promise.all(n).then((s=>{(s=s.filter((t=>!!t))).length>0&&(e[t]=s)})));return await Promise.all(i),e}));return(0,i.shadow)(this,"fieldObjects",t)}get hasJSActions(){const t=this.pdfManager.ensureDoc("_parseHasJSActions");return(0,i.shadow)(this,"hasJSActions",t)}async _parseHasJSActions(){const[t,e]=await Promise.all([this.pdfManager.ensureCatalog("jsActions"),this.pdfManager.ensureDoc("fieldObjects")]);return!!t||!!e&&Object.values(e).some((t=>t.some((t=>null!==t.actions))))}get calculationOrderIds(){const t=this.catalog.acroForm;if(!t?.has("CO"))return(0,i.shadow)(this,"calculationOrderIds",null);const e=t.get("CO");if(!Array.isArray(e)||0===e.length)return(0,i.shadow)(this,"calculationOrderIds",null);const s=[];for(const t of e)t instanceof o.Ref&&s.push(t.toString());return(0,i.shadow)(this,"calculationOrderIds",0===s.length?null:s)}get annotationGlobals(){return(0,i.shadow)(this,"annotationGlobals",n.AnnotationFactory.createGlobals(this.pdfManager))}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PopupAnnotation=e.MarkupAnnotation=e.AnnotationFactory=e.AnnotationBorderStyle=e.Annotation=void 0,e.getQuadPoints=A;var i=s(2),n=s(3),r=s(11),o=s(4),a=s(8),c=s(5),h=s(60),l=s(66),u=s(12),f=s(69),d=s(26),p=s(76),g=s(64),m=s(73),w=s(77);function b(t,e=new Uint8ClampedArray(3)){if(!Array.isArray(t))return e;const s=e||new Uint8ClampedArray(3);switch(t.length){case 0:return null;case 1:return u.ColorSpace.singletons.gray.getRgbItem(t,0,s,0),s;case 3:return u.ColorSpace.singletons.rgb.getRgbItem(t,0,s,0),s;case 4:return u.ColorSpace.singletons.cmyk.getRgbItem(t,0,s,0),s;default:return e}}function y(t){return Array.from(t,(t=>t/255))}function A(t,e){const s=t.getArray("QuadPoints");if(!Array.isArray(s)||0===s.length||s.length%8>0)return null;const i=[];for(let t=0,n=s.length/8;t<n;t++){let n=1/0,r=-1/0,o=1/0,a=-1/0;for(let e=8*t,i=8*t+8;e<i;e+=2){const t=s[e],i=s[e+1];n=Math.min(t,n),r=Math.max(t,r),o=Math.min(i,o),a=Math.max(i,a)}if(null!==e&&(n<e[0]||r>e[2]||o<e[1]||a>e[3]))return null;i.push([{x:n,y:a},{x:r,y:a},{x:n,y:o},{x:r,y:o}])}return i}function v(t,e,s){const[n,r,o,a]=i.Util.getAxialAlignedBoundingBox(e,s);if(n===o||r===a)return[1,0,0,1,t[0],t[1]];const c=(t[2]-t[0])/(o-n),h=(t[3]-t[1])/(a-r);return[c,0,0,h,t[0]-n*c,t[1]-r*h]}e.AnnotationFactory=class{static createGlobals(t){return Promise.all([t.ensureCatalog("acroForm"),t.ensureDoc("xfaDatasets"),t.ensureCatalog("structTreeRoot"),t.ensureCatalog("baseUrl"),t.ensureCatalog("attachments")]).then((([e,s,i,n,r])=>({pdfManager:t,acroForm:e instanceof o.Dict?e:o.Dict.empty,xfaDatasets:s,structTreeRoot:i,baseUrl:n,attachments:r})),(t=>((0,i.warn)(`createGlobals: "${t}".`),null)))}static async create(t,e,s,i,n,r){const o=n?await this._getPageIndex(t,e,s.pdfManager):null;return s.pdfManager.ensure(this,"_create",[t,e,s,i,n,o,r])}static _create(t,e,s,r,a=!1,c=null,h=null){const l=t.fetchIfRef(e);if(!(l instanceof o.Dict))return;const{acroForm:u,pdfManager:f}=s,d=e instanceof o.Ref?e.toString():`annot_${r.createObjId()}`;let p=l.get("Subtype");p=p instanceof o.Name?p.name:null;const g={xref:t,ref:e,dict:l,subtype:p,id:d,annotationGlobals:s,collectFields:a,needAppearances:!a&&!0===u.get("NeedAppearances"),pageIndex:c,evaluatorOptions:f.evaluatorOptions,pageRef:h};switch(p){case"Link":return new E(g);case"Text":return new O(g);case"Widget":let t=(0,n.getInheritableProperty)({dict:l,key:"FT"});switch(t=t instanceof o.Name?t.name:null,t){case"Tx":return new C(g);case"Btn":return new _(g);case"Ch":return new I(g);case"Sig":return new F(g)}return(0,i.warn)(`Unimplemented widget field type "${t}", falling back to base field type.`),new M(g);case"Popup":return new T(g);case"FreeText":return new D(g);case"Line":return new P(g);case"Square":return new R(g);case"Circle":return new N(g);case"PolyLine":return new L(g);case"Polygon":return new B(g);case"Caret":return new $(g);case"Ink":return new U(g);case"Highlight":return new j(g);case"Underline":return new H(g);case"Squiggly":return new G(g);case"StrikeOut":return new q(g);case"Stamp":return new X(g);case"FileAttachment":return new W(g);default:return a||(0,i.warn)(p?`Unimplemented annotation type "${p}", falling back to base annotation.`:"Annotation is missing the required /Subtype."),new x(g)}}static async _getPageIndex(t,e,s){try{const n=await t.fetchIfRefAsync(e);if(!(n instanceof o.Dict))return-1;const r=n.getRaw("P");if(r instanceof o.Ref)try{return await s.ensureCatalog("getPageIndex",[r])}catch(t){(0,i.info)(`_getPageIndex -- not a valid page reference: "${t}".`)}if(n.has("Kids"))return-1;const a=await s.ensureDoc("numPages");for(let t=0;t<a;t++){const i=await s.getPage(t),n=await s.ensure(i,"annotations");for(const s of n)if(s instanceof o.Ref&&(0,o.isRefsEqual)(s,e))return t}}catch(t){(0,i.warn)(`_getPageIndex: "${t}".`)}return-1}static generateImages(t,e,s){if(!s)return(0,i.warn)("generateImages: OffscreenCanvas is not supported, cannot save or print some annotations with images."),null;let n;for(const{bitmapId:s,bitmap:i}of t)i&&(n||=new Map,n.set(s,X.createImage(i,e)));return n}static async saveNewAnnotations(t,e,s,n){const r=t.xref;let a;const c=[],h=[],{isOffscreenCanvasSupported:l}=t.options;for(const u of s)if(!u.deleted)switch(u.annotationType){case i.AnnotationEditorType.FREETEXT:if(!a){const t=new o.Dict(r);t.set("BaseFont",o.Name.get("Helvetica")),t.set("Type",o.Name.get("Font")),t.set("Subtype",o.Name.get("Type1")),t.set("Encoding",o.Name.get("WinAnsiEncoding"));const e=[];a=r.getNewTemporaryRef(),await(0,m.writeObject)(a,t,e,r),c.push({ref:a,data:e.join("")})}h.push(D.createNewAnnotation(r,u,c,{evaluator:t,task:e,baseFontRef:a}));break;case i.AnnotationEditorType.INK:h.push(U.createNewAnnotation(r,u,c));break;case i.AnnotationEditorType.STAMP:if(!l)break;const s=await n.get(u.bitmapId);if(s.imageStream){const{imageStream:t,smaskStream:e}=s,i=[];if(e){const s=r.getNewTemporaryRef();await(0,m.writeObject)(s,e,i,r),c.push({ref:s,data:i.join("")}),t.dict.set("SMask",s),i.length=0}const n=s.imageRef=r.getNewTemporaryRef();await(0,m.writeObject)(n,t,i,r),c.push({ref:n,data:i.join("")}),s.imageStream=s.smaskStream=null}h.push(X.createNewAnnotation(r,u,c,{image:s}))}return{annotations:await Promise.all(h),dependencies:c}}static async printNewAnnotations(t,e,s,n,r){if(!n)return null;const{options:o,xref:a}=e,c=[];for(const h of n)if(!h.deleted)switch(h.annotationType){case i.AnnotationEditorType.FREETEXT:c.push(D.createNewPrintAnnotation(t,a,h,{evaluator:e,task:s,evaluatorOptions:o}));break;case i.AnnotationEditorType.INK:c.push(U.createNewPrintAnnotation(t,a,h,{evaluatorOptions:o}));break;case i.AnnotationEditorType.STAMP:if(!o.isOffscreenCanvasSupported)break;const n=await r.get(h.bitmapId);if(n.imageStream){const{imageStream:t,smaskStream:e}=n;e&&t.dict.set("SMask",e),n.imageRef=new d.JpegStream(t,t.length),n.imageStream=n.smaskStream=null}c.push(X.createNewPrintAnnotation(t,a,h,{image:n,evaluatorOptions:o}))}return Promise.all(c)}};class x{constructor(t){const{dict:e,xref:s,annotationGlobals:r}=t;this.setTitle(e.get("T")),this.setContents(e.get("Contents")),this.setModificationDate(e.get("M")),this.setFlags(e.get("F")),this.setRectangle(e.getArray("Rect")),this.setColor(e.getArray("C")),this.setBorderStyle(e),this.setAppearance(e),this.setOptionalContent(e);const a=e.get("MK");this.setBorderAndBackgroundColors(a),this.setRotation(a,e),this.ref=t.ref instanceof o.Ref?t.ref:null,this._streams=[],this.appearance&&this._streams.push(this.appearance);const c=!!(this.flags&i.AnnotationFlag.LOCKED),h=!!(this.flags&i.AnnotationFlag.LOCKEDCONTENTS);if(r.structTreeRoot){let s=e.get("StructParent");s=Number.isInteger(s)&&s>=0?s:-1,r.structTreeRoot.addAnnotationIdToPage(t.pageRef,s)}if(this.data={annotationFlags:this.flags,borderStyle:this.borderStyle,color:this.color,backgroundColor:this.backgroundColor,borderColor:this.borderColor,rotation:this.rotation,contentsObj:this._contents,hasAppearance:!!this.appearance,id:t.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:t.subtype,hasOwnCanvas:!1,noRotate:!!(this.flags&i.AnnotationFlag.NOROTATE),noHTML:c&&h},t.collectFields){const r=e.get("Kids");if(Array.isArray(r)){const t=[];for(const e of r)e instanceof o.Ref&&t.push(e.toString());0!==t.length&&(this.data.kidIds=t)}this.data.actions=(0,n.collectActions)(s,e,i.AnnotationActionEventType),this.data.fieldName=this._constructFieldName(e),this.data.pageIndex=t.pageIndex}this._isOffscreenCanvasSupported=t.evaluatorOptions.isOffscreenCanvasSupported,this._fallbackFontDict=null,this._needAppearances=!1}_hasFlag(t,e){return!!(t&e)}_isViewable(t){return!this._hasFlag(t,i.AnnotationFlag.INVISIBLE)&&!this._hasFlag(t,i.AnnotationFlag.NOVIEW)}_isPrintable(t){return this._hasFlag(t,i.AnnotationFlag.PRINT)&&!this._hasFlag(t,i.AnnotationFlag.HIDDEN)&&!this._hasFlag(t,i.AnnotationFlag.INVISIBLE)}mustBeViewed(t,e){const s=t?.get(this.data.id)?.noView;return void 0!==s?!s:this.viewable&&!this._hasFlag(this.flags,i.AnnotationFlag.HIDDEN)}mustBePrinted(t){const e=t?.get(this.data.id)?.noPrint;return void 0!==e?!e:this.printable}get viewable(){return null!==this.data.quadPoints&&(0===this.flags||this._isViewable(this.flags))}get printable(){return null!==this.data.quadPoints&&0!==this.flags&&this._isPrintable(this.flags)}_parseStringHelper(t){const e="string"==typeof t?(0,i.stringToPDFString)(t):"";return{str:e,dir:e&&"rtl"===(0,h.bidi)(e).dir?"rtl":"ltr"}}setDefaultAppearance(t){const{dict:e,annotationGlobals:s}=t,i=(0,n.getInheritableProperty)({dict:e,key:"DA"})||s.acroForm.get("DA");this._defaultAppearance="string"==typeof i?i:"",this.data.defaultAppearanceData=(0,r.parseDefaultAppearance)(this._defaultAppearance)}setTitle(t){this._title=this._parseStringHelper(t)}setContents(t){this._contents=this._parseStringHelper(t)}setModificationDate(t){this.modificationDate="string"==typeof t?t:null}setFlags(t){this.flags=Number.isInteger(t)&&t>0?t:0}hasFlag(t){return this._hasFlag(this.flags,t)}setRectangle(t){this.rectangle=Array.isArray(t)&&4===t.length?i.Util.normalizeRect(t):[0,0,0,0]}setColor(t){this.color=b(t)}setLineEndings(t){if(this.lineEndings=["None","None"],Array.isArray(t)&&2===t.length)for(let e=0;e<2;e++){const s=t[e];if(s instanceof o.Name)switch(s.name){case"None":continue;case"Square":case"Circle":case"Diamond":case"OpenArrow":case"ClosedArrow":case"Butt":case"ROpenArrow":case"RClosedArrow":case"Slash":this.lineEndings[e]=s.name;continue}(0,i.warn)(`Ignoring invalid lineEnding: ${s}`)}}setRotation(t,e){this.rotation=0;let s=t instanceof o.Dict?t.get("R")||0:e.get("Rotate")||0;Number.isInteger(s)&&0!==s&&(s%=360,s<0&&(s+=360),s%90==0&&(this.rotation=s))}setBorderAndBackgroundColors(t){t instanceof o.Dict?(this.borderColor=b(t.getArray("BC"),null),this.backgroundColor=b(t.getArray("BG"),null)):this.borderColor=this.backgroundColor=null}setBorderStyle(t){if(this.borderStyle=new k,t instanceof o.Dict)if(t.has("BS")){const e=t.get("BS"),s=e.get("Type");s&&!(0,o.isName)(s,"Border")||(this.borderStyle.setWidth(e.get("W"),this.rectangle),this.borderStyle.setStyle(e.get("S")),this.borderStyle.setDashArray(e.getArray("D")))}else if(t.has("Border")){const e=t.getArray("Border");Array.isArray(e)&&e.length>=3&&(this.borderStyle.setHorizontalCornerRadius(e[0]),this.borderStyle.setVerticalCornerRadius(e[1]),this.borderStyle.setWidth(e[2],this.rectangle),4===e.length&&this.borderStyle.setDashArray(e[3],!0))}else this.borderStyle.setWidth(0)}setAppearance(t){this.appearance=null;const e=t.get("AP");if(!(e instanceof o.Dict))return;const s=e.get("N");if(s instanceof c.BaseStream)return void(this.appearance=s);if(!(s instanceof o.Dict))return;const i=t.get("AS");if(!(i instanceof o.Name&&s.has(i.name)))return;const n=s.get(i.name);n instanceof c.BaseStream&&(this.appearance=n)}setOptionalContent(t){this.oc=null;const e=t.get("OC");e instanceof o.Name?(0,i.warn)("setOptionalContent: Support for /Name-entry is not implemented."):e instanceof o.Dict&&(this.oc=e)}loadResources(t,e){return e.dict.getAsync("Resources").then((e=>{if(e)return new p.ObjectLoader(e,t,e.xref).load().then((function(){return e}))}))}async getOperatorList(t,e,s,n,r){const c=this.data;let h=this.appearance;const l=!!(this.data.hasOwnCanvas&&s&i.RenderingIntentFlag.DISPLAY);if(!h){if(!l)return{opList:new g.OperatorList,separateForm:!1,separateCanvas:!1};h=new a.StringStream(""),h.dict=new o.Dict}const u=h.dict,f=await this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"],h),d=u.getArray("BBox")||[0,0,1,1],p=u.getArray("Matrix")||[1,0,0,1,0,0],m=v(c.rect,d,p),w=new g.OperatorList;let b;return this.oc&&(b=await t.parseMarkedContentProps(this.oc,null)),void 0!==b&&w.addOp(i.OPS.beginMarkedContentProps,["OC",b]),w.addOp(i.OPS.beginAnnotation,[c.id,c.rect,m,p,l]),await t.getOperatorList({stream:h,task:e,resources:f,operatorList:w,fallbackFontDict:this._fallbackFontDict}),w.addOp(i.OPS.endAnnotation,[]),void 0!==b&&w.addOp(i.OPS.endMarkedContent,[]),this.reset(),{opList:w,separateForm:!1,separateCanvas:l}}async save(t,e,s){return null}get hasTextContent(){return!1}async extractTextContent(t,e,s){if(!this.appearance)return;const n=await this.loadResources(["ExtGState","Font","Properties","XObject"],this.appearance),r=[],o=[];let a=null;const c={desiredSize:Math.Infinity,ready:!0,enqueue(t,e){for(const e of t.items)void 0!==e.str&&(a||=e.transform.slice(-2),o.push(e.str),e.hasEOL&&(r.push(o.join("")),o.length=0))}};if(await t.getTextContent({stream:this.appearance,task:e,resources:n,includeMarkedContent:!0,sink:c,viewBox:s}),this.reset(),o.length&&r.push(o.join("")),r.length>1||r[0]){const t=this.appearance.dict,e=t.getArray("BBox")||[0,0,1,1],s=t.getArray("Matrix")||[1,0,0,1,0,0],n=this.data.rect,o=v(n,e,s);o[4]-=n[0],o[5]-=n[1],a=i.Util.applyTransform(a,o),a=i.Util.applyTransform(a,s),this.data.textPosition=a,this.data.textContent=r}}getFieldObject(){return this.data.kidIds?{id:this.data.id,actions:this.data.actions,name:this.data.fieldName,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,type:"",kidIds:this.data.kidIds,page:this.data.pageIndex,rotation:this.rotation}:null}reset(){for(const t of this._streams)t.reset()}_constructFieldName(t){if(!t.has("T")&&!t.has("Parent"))return(0,i.warn)("Unknown field name, falling back to empty field name."),"";if(!t.has("Parent"))return(0,i.stringToPDFString)(t.get("T"));const e=[];t.has("T")&&e.unshift((0,i.stringToPDFString)(t.get("T")));let s=t;const n=new o.RefSet;for(t.objId&&n.put(t.objId);s.has("Parent")&&(s=s.get("Parent"),s instanceof o.Dict&&(!s.objId||!n.has(s.objId)));)s.objId&&n.put(s.objId),s.has("T")&&e.unshift((0,i.stringToPDFString)(s.get("T")));return e.join(".")}}e.Annotation=x;class k{constructor(){this.width=1,this.style=i.AnnotationBorderStyleType.SOLID,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}setWidth(t,e=[0,0,0,0]){if(t instanceof o.Name)this.width=0;else if("number"==typeof t){if(t>0){const s=(e[2]-e[0])/2,n=(e[3]-e[1])/2;s>0&&n>0&&(t>s||t>n)&&((0,i.warn)(`AnnotationBorderStyle.setWidth - ignoring width: ${t}`),t=1)}this.width=t}}setStyle(t){if(t instanceof o.Name)switch(t.name){case"S":this.style=i.AnnotationBorderStyleType.SOLID;break;case"D":this.style=i.AnnotationBorderStyleType.DASHED;break;case"B":this.style=i.AnnotationBorderStyleType.BEVELED;break;case"I":this.style=i.AnnotationBorderStyleType.INSET;break;case"U":this.style=i.AnnotationBorderStyleType.UNDERLINE}}setDashArray(t,e=!1){if(Array.isArray(t)&&t.length>0){let s=!0,i=!0;for(const e of t){if(!(+e>=0)){s=!1;break}e>0&&(i=!1)}s&&!i?(this.dashArray=t,e&&this.setStyle(o.Name.get("D"))):this.width=0}else t&&(this.width=0)}setHorizontalCornerRadius(t){Number.isInteger(t)&&(this.horizontalCornerRadius=t)}setVerticalCornerRadius(t){Number.isInteger(t)&&(this.verticalCornerRadius=t)}}e.AnnotationBorderStyle=k;class S extends x{constructor(t){super(t);const{dict:e}=t;if(e.has("IRT")){const t=e.getRaw("IRT");this.data.inReplyTo=t instanceof o.Ref?t.toString():null;const s=e.get("RT");this.data.replyType=s instanceof o.Name?s.name:i.AnnotationReplyType.REPLY}let s=null;if(this.data.replyType===i.AnnotationReplyType.GROUP){const t=e.get("IRT");this.setTitle(t.get("T")),this.data.titleObj=this._title,this.setContents(t.get("Contents")),this.data.contentsObj=this._contents,t.has("CreationDate")?(this.setCreationDate(t.get("CreationDate")),this.data.creationDate=this.creationDate):this.data.creationDate=null,t.has("M")?(this.setModificationDate(t.get("M")),this.data.modificationDate=this.modificationDate):this.data.modificationDate=null,s=t.getRaw("Popup"),t.has("C")?(this.setColor(t.getArray("C")),this.data.color=this.color):this.data.color=null}else this.data.titleObj=this._title,this.setCreationDate(e.get("CreationDate")),this.data.creationDate=this.creationDate,s=e.getRaw("Popup"),e.has("C")||(this.data.color=null);this.data.popupRef=s instanceof o.Ref?s.toString():null,e.has("RC")&&(this.data.richText=w.XFAFactory.getRichTextAsHtml(e.get("RC")))}setCreationDate(t){this.creationDate="string"==typeof t?t:null}_setDefaultAppearance({xref:t,extra:e,strokeColor:s,fillColor:i,blendMode:n,strokeAlpha:r,fillAlpha:c,pointsCallback:h}){let l=Number.MAX_VALUE,u=Number.MAX_VALUE,f=Number.MIN_VALUE,d=Number.MIN_VALUE;const p=["q"];e&&p.push(e),s&&p.push(`${s[0]} ${s[1]} ${s[2]} RG`),i&&p.push(`${i[0]} ${i[1]} ${i[2]} rg`);let g=this.data.quadPoints;g||(g=[[{x:this.rectangle[0],y:this.rectangle[3]},{x:this.rectangle[2],y:this.rectangle[3]},{x:this.rectangle[0],y:this.rectangle[1]},{x:this.rectangle[2],y:this.rectangle[1]}]]);for(const t of g){const[e,s,i,n]=h(p,t);l=Math.min(l,e),f=Math.max(f,s),u=Math.min(u,i),d=Math.max(d,n)}p.push("Q");const m=new o.Dict(t),w=new o.Dict(t);w.set("Subtype",o.Name.get("Form"));const b=new a.StringStream(p.join(" "));b.dict=w,m.set("Fm0",b);const y=new o.Dict(t);n&&y.set("BM",o.Name.get(n)),"number"==typeof r&&y.set("CA",r),"number"==typeof c&&y.set("ca",c);const A=new o.Dict(t);A.set("GS0",y);const v=new o.Dict(t);v.set("ExtGState",A),v.set("XObject",m);const x=new o.Dict(t);x.set("Resources",v);const k=this.data.rect=[l,u,f,d];x.set("BBox",k),this.appearance=new a.StringStream("/GS0 gs /Fm0 Do"),this.appearance.dict=x,this._streams.push(this.appearance,b)}static async createNewAnnotation(t,e,s,i){const n=e.ref||=t.getNewTemporaryRef(),r=await this.createNewAppearanceStream(e,t,i),o=[];let a;if(r){const i=t.getNewTemporaryRef();a=this.createNewDict(e,t,{apRef:i}),await(0,m.writeObject)(i,r,o,t),s.push({ref:i,data:o.join("")})}else a=this.createNewDict(e,t,{});return Number.isInteger(e.parentTreeId)&&a.set("StructParent",e.parentTreeId),o.length=0,await(0,m.writeObject)(n,a,o,t),{ref:n,data:o.join("")}}static async createNewPrintAnnotation(t,e,s,i){const n=await this.createNewAppearanceStream(s,e,i),r=this.createNewDict(s,e,{ap:n}),o=new this.prototype.constructor({dict:r,xref:e,annotationGlobals:t,evaluatorOptions:i.evaluatorOptions});return s.ref&&(o.ref=o.refToReplace=s.ref),o}}e.MarkupAnnotation=S;class M extends x{constructor(t){super(t);const{dict:e,xref:s,annotationGlobals:r}=t,a=this.data;this._needAppearances=t.needAppearances,a.annotationType=i.AnnotationType.WIDGET,void 0===a.fieldName&&(a.fieldName=this._constructFieldName(e)),void 0===a.actions&&(a.actions=(0,n.collectActions)(s,e,i.AnnotationActionEventType));let c=(0,n.getInheritableProperty)({dict:e,key:"V",getArray:!0});a.fieldValue=this._decodeFormValue(c);const h=(0,n.getInheritableProperty)({dict:e,key:"DV",getArray:!0});if(a.defaultFieldValue=this._decodeFormValue(h),void 0===c&&r.xfaDatasets){const t=this._title.str;t&&(this._hasValueFromXFA=!0,a.fieldValue=c=r.xfaDatasets.getValue(t))}void 0===c&&null!==a.defaultFieldValue&&(a.fieldValue=a.defaultFieldValue),a.alternativeText=(0,i.stringToPDFString)(e.get("TU")||""),this.setDefaultAppearance(t),a.hasAppearance||=this._needAppearances&&null!=a.fieldValue;const l=(0,n.getInheritableProperty)({dict:e,key:"FT"});a.fieldType=l instanceof o.Name?l.name:null;const u=(0,n.getInheritableProperty)({dict:e,key:"DR"}),f=r.acroForm.get("DR"),d=this.appearance?.dict.get("Resources");this._fieldResources={localResources:u,acroFormResources:f,appearanceResources:d,mergedResources:o.Dict.merge({xref:s,dictArray:[u,d,f],mergeSubDicts:!0})},a.fieldFlags=(0,n.getInheritableProperty)({dict:e,key:"Ff"}),(!Number.isInteger(a.fieldFlags)||a.fieldFlags<0)&&(a.fieldFlags=0),a.readOnly=this.hasFieldFlag(i.AnnotationFieldFlag.READONLY),a.required=this.hasFieldFlag(i.AnnotationFieldFlag.REQUIRED),a.hidden=this._hasFlag(a.annotationFlags,i.AnnotationFlag.HIDDEN)||this._hasFlag(a.annotationFlags,i.AnnotationFlag.NOVIEW)}_decodeFormValue(t){return Array.isArray(t)?t.filter((t=>"string"==typeof t)).map((t=>(0,i.stringToPDFString)(t))):t instanceof o.Name?(0,i.stringToPDFString)(t.name):"string"==typeof t?(0,i.stringToPDFString)(t):null}hasFieldFlag(t){return!!(this.data.fieldFlags&t)}_isViewable(t){return!this._hasFlag(t,i.AnnotationFlag.INVISIBLE)}mustBeViewed(t,e){return e?this.viewable:super.mustBeViewed(t,e)&&!this._hasFlag(this.flags,i.AnnotationFlag.NOVIEW)}getRotationMatrix(t){let e=t?.get(this.data.id)?.rotation;return void 0===e&&(e=this.rotation),0===e?i.IDENTITY_MATRIX:(0,n.getRotationMatrix)(e,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1])}getBorderAndBackgroundAppearances(t){let e=t?.get(this.data.id)?.rotation;if(void 0===e&&(e=this.rotation),!this.backgroundColor&&!this.borderColor)return"";const s=this.data.rect[2]-this.data.rect[0],i=this.data.rect[3]-this.data.rect[1],n=0===e||180===e?`0 0 ${s} ${i} re`:`0 0 ${i} ${s} re`;let o="";return this.backgroundColor&&(o=`${(0,r.getPdfColor)(this.backgroundColor,!0)} ${n} f `),this.borderColor&&(o+=`${this.borderStyle.width||1} w ${(0,r.getPdfColor)(this.borderColor,!1)} ${n} S `),o}async getOperatorList(t,e,s,n,r){if(n&&!(this instanceof F)&&!this.data.noHTML&&!this.data.hasOwnCanvas)return{opList:new g.OperatorList,separateForm:!0,separateCanvas:!1};if(!this._hasText)return super.getOperatorList(t,e,s,n,r);const o=await this._getAppearance(t,e,s,r);if(this.appearance&&null===o)return super.getOperatorList(t,e,s,n,r);const c=new g.OperatorList;if(!this._defaultAppearance||null===o)return{opList:c,separateForm:!1,separateCanvas:!1};const h=!!(this.data.hasOwnCanvas&&s&i.RenderingIntentFlag.DISPLAY),l=v(this.data.rect,[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]],[1,0,0,1,0,0]);let u;this.oc&&(u=await t.parseMarkedContentProps(this.oc,null)),void 0!==u&&c.addOp(i.OPS.beginMarkedContentProps,["OC",u]),c.addOp(i.OPS.beginAnnotation,[this.data.id,this.data.rect,l,this.getRotationMatrix(r),h]);const f=new a.StringStream(o);return await t.getOperatorList({stream:f,task:e,resources:this._fieldResources.mergedResources,operatorList:c}),c.addOp(i.OPS.endAnnotation,[]),void 0!==u&&c.addOp(i.OPS.endMarkedContent,[]),{opList:c,separateForm:!1,separateCanvas:h}}_getMKDict(t){const e=new o.Dict(null);return t&&e.set("R",t),this.borderColor&&e.set("BC",y(this.borderColor)),this.backgroundColor&&e.set("BG",y(this.backgroundColor)),e.size>0?e:null}amendSavedDict(t,e){}async save(t,e,s){const r=s?.get(this.data.id);let c=r?.value,h=r?.rotation;if(c===this.data.fieldValue||void 0===c){if(!this._hasValueFromXFA&&void 0===h)return null;c||=this.data.fieldValue}if(void 0===h&&!this._hasValueFromXFA&&Array.isArray(c)&&Array.isArray(this.data.fieldValue)&&c.length===this.data.fieldValue.length&&c.every(((t,e)=>t===this.data.fieldValue[e])))return null;void 0===h&&(h=this.rotation);let l=null;if(!this._needAppearances&&(l=await this._getAppearance(t,e,i.RenderingIntentFlag.SAVE,s),null===l))return null;let u=!1;l?.needAppearances&&(u=!0,l=null);const{xref:f}=t,d=f.fetchIfRef(this.ref);if(!(d instanceof o.Dict))return null;const p=new o.Dict(f);for(const t of d.getKeys())"AP"!==t&&p.set(t,d.getRaw(t));const g={path:this.data.fieldName,value:c},w=t=>(0,n.isAscii)(t)?t:(0,n.stringToUTF16String)(t,!0);p.set("V",Array.isArray(c)?c.map(w):w(c)),this.amendSavedDict(s,p);const b=this._getMKDict(h);b&&p.set("MK",b);const y=[],A=[{ref:this.ref,data:"",xfa:g,needAppearances:u}];if(null!==l){const t=f.getNewTemporaryRef(),e=new o.Dict(f);p.set("AP",e),e.set("N",t);const n=this._getSaveFieldResources(f),r=new a.StringStream(l),c=r.dict=new o.Dict(f);c.set("Subtype",o.Name.get("Form")),c.set("Resources",n),c.set("BBox",[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]]);const h=this.getRotationMatrix(s);h!==i.IDENTITY_MATRIX&&c.set("Matrix",h),await(0,m.writeObject)(t,r,y,f),A.push({ref:t,data:y.join(""),xfa:null,needAppearances:!1}),y.length=0}return p.set("M",`D:${(0,i.getModificationDate)()}`),await(0,m.writeObject)(this.ref,p,y,f),A[0].data=y.join(""),A}async _getAppearance(t,e,s,o){if(this.hasFieldFlag(i.AnnotationFieldFlag.PASSWORD))return null;const a=o?.get(this.data.id);let c,h;if(a&&(c=a.formattedValue||a.value,h=a.rotation),void 0===h&&void 0===c&&!this._needAppearances&&(!this._hasValueFromXFA||this.appearance))return null;const l=this.getBorderAndBackgroundAppearances(o);if(void 0===c&&(c=this.data.fieldValue,!c))return`/Tx BMC q ${l}Q EMC`;if(Array.isArray(c)&&1===c.length&&(c=c[0]),(0,i.assert)("string"==typeof c,"Expected `value` to be a string."),c=c.trim(),this.data.combo){const t=this.data.options.find((({exportValue:t})=>c===t));c=t?.displayValue||c}if(""===c)return`/Tx BMC q ${l}Q EMC`;void 0===h&&(h=this.rotation);let u,f=-1;this.data.multiLine?(u=c.split(/\r\n?|\n/).map((t=>t.normalize("NFC"))),f=u.length):u=[c.replace(/\r\n?|\n/,"").normalize("NFC")];let d=this.data.rect[3]-this.data.rect[1],p=this.data.rect[2]-this.data.rect[0];90!==h&&270!==h||([p,d]=[d,p]),this._defaultAppearance||(this.data.defaultAppearanceData=(0,r.parseDefaultAppearance)(this._defaultAppearance="/Helvetica 0 Tf 0 g"));let g,m,w,b=await M._getFontData(t,e,this.data.defaultAppearanceData,this._fieldResources.mergedResources);const y=[];let A=!1;for(const t of u){const e=b.encodeString(t);e.length>1&&(A=!0),y.push(e.join(""))}if(A&&s&i.RenderingIntentFlag.SAVE)return{needAppearances:!0};if(A&&this._isOffscreenCanvasSupported){const s=new r.FakeUnicodeFont(t.xref,this.data.comb?"monospace":"sans-serif"),i=s.createFontResources(u.join("")),o=i.getRaw("Font");if(this._fieldResources.mergedResources.has("Font")){const t=this._fieldResources.mergedResources.get("Font");for(const e of o.getKeys())t.set(e,o.getRaw(e))}else this._fieldResources.mergedResources.set("Font",o);const a=s.fontName.name;b=await M._getFontData(t,e,{fontName:a,fontSize:0},i);for(let t=0,e=y.length;t<e;t++)y[t]=(0,n.stringToUTF16String)(u[t]);const h=Object.assign(Object.create(null),this.data.defaultAppearanceData);this.data.defaultAppearanceData.fontSize=0,this.data.defaultAppearanceData.fontName=a,[g,m,w]=this._computeFontSize(d-2,p-4,c,b,f),this.data.defaultAppearanceData=h}else this._isOffscreenCanvasSupported||(0,i.warn)("_getAppearance: OffscreenCanvas is not supported, annotation may not render correctly."),[g,m,w]=this._computeFontSize(d-2,p-4,c,b,f);let v=b.descent;v=isNaN(v)?i.BASELINE_FACTOR*w:Math.max(i.BASELINE_FACTOR*w,Math.abs(v)*m);const x=Math.min(Math.floor((d-m)/2),1),k=this.data.textAlignment;if(this.data.multiLine)return this._getMultilineAppearance(g,y,b,m,p,d,k,2,x,v,w,o);if(this.data.comb)return this._getCombAppearance(g,b,y[0],m,p,d,2,x,v,w,o);const S=x+v;return 0===k||k>2?`/Tx BMC q ${l}BT `+g+` 1 0 0 1 ${(0,n.numberToString)(2)} ${(0,n.numberToString)(S)} Tm (${(0,n.escapeString)(y[0])}) Tj ET Q EMC`:`/Tx BMC q ${l}BT `+g+` 1 0 0 1 0 0 Tm ${this._renderText(y[0],b,m,p,k,{shift:0},2,S)} ET Q EMC`}static async _getFontData(t,e,s,i){const n=new g.OperatorList,r={font:null,clone(){return this}},{fontName:a,fontSize:c}=s;return await t.handleSetFont(i,[a&&o.Name.get(a),c],null,n,e,r,null),r.font}_getTextWidth(t,e){return e.charsToGlyphs(t).reduce(((t,e)=>t+e.width),0)/1e3}_computeFontSize(t,e,s,n,o){let{fontSize:a}=this.data.defaultAppearanceData,c=(a||12)*i.LINE_FACTOR,h=Math.round(t/c);if(!a){const l=t=>Math.floor(100*t)/100;if(-1===o){const r=this._getTextWidth(s,n);a=l(Math.min(t/i.LINE_FACTOR,r>e?e/r:1/0)),h=1}else{const r=s.split(/\r\n?|\n/),u=[];for(const t of r){const e=n.encodeString(t).join(""),s=n.charsToGlyphs(e),i=n.getCharPositions(e);u.push({line:e,glyphs:s,positions:i})}const f=s=>{let i=0;for(const r of u)if(i+=this._splitLine(null,n,s,e,r).length*s,i>t)return!0;return!1};for(h=Math.max(h,o);c=t/h,a=l(c/i.LINE_FACTOR),f(a);)h++}const{fontName:u,fontColor:f}=this.data.defaultAppearanceData;this._defaultAppearance=(0,r.createDefaultAppearance)({fontSize:a,fontName:u,fontColor:f})}return[this._defaultAppearance,a,t/h]}_renderText(t,e,s,i,r,o,a,c){let h;h=1===r?(i-this._getTextWidth(t,e)*s)/2:2===r?i-this._getTextWidth(t,e)*s-a:a;const l=(0,n.numberToString)(h-o.shift);return o.shift=h,`${l} ${c=(0,n.numberToString)(c)} Td (${(0,n.escapeString)(t)}) Tj`}_getSaveFieldResources(t){const{localResources:e,appearanceResources:s,acroFormResources:i}=this._fieldResources,n=this.data.defaultAppearanceData?.fontName;if(!n)return e||o.Dict.empty;for(const t of[e,s])if(t instanceof o.Dict){const e=t.get("Font");if(e instanceof o.Dict&&e.has(n))return t}if(i instanceof o.Dict){const s=i.get("Font");if(s instanceof o.Dict&&s.has(n)){const i=new o.Dict(t);i.set(n,s.getRaw(n));const r=new o.Dict(t);return r.set("Font",i),o.Dict.merge({xref:t,dictArray:[r,e],mergeSubDicts:!0})}}return e||o.Dict.empty}getFieldObject(){return null}}class C extends M{constructor(t){super(t),this.data.hasOwnCanvas=this.data.readOnly&&!this.data.noHTML,this._hasText=!0;const e=t.dict;"string"!=typeof this.data.fieldValue&&(this.data.fieldValue="");let s=(0,n.getInheritableProperty)({dict:e,key:"Q"});(!Number.isInteger(s)||s<0||s>2)&&(s=null),this.data.textAlignment=s;let r=(0,n.getInheritableProperty)({dict:e,key:"MaxLen"});(!Number.isInteger(r)||r<0)&&(r=0),this.data.maxLen=r,this.data.multiLine=this.hasFieldFlag(i.AnnotationFieldFlag.MULTILINE),this.data.comb=this.hasFieldFlag(i.AnnotationFieldFlag.COMB)&&!this.hasFieldFlag(i.AnnotationFieldFlag.MULTILINE)&&!this.hasFieldFlag(i.AnnotationFieldFlag.PASSWORD)&&!this.hasFieldFlag(i.AnnotationFieldFlag.FILESELECT)&&0!==this.data.maxLen,this.data.doNotScroll=this.hasFieldFlag(i.AnnotationFieldFlag.DONOTSCROLL)}get hasTextContent(){return!!this.appearance&&!this._needAppearances}_getCombAppearance(t,e,s,i,r,o,a,c,h,l,u){const f=r/this.data.maxLen,d=this.getBorderAndBackgroundAppearances(u),p=[],g=e.getCharPositions(s);for(const[t,e]of g)p.push(`(${(0,n.escapeString)(s.substring(t,e))}) Tj`);const m=p.join(` ${(0,n.numberToString)(f)} 0 Td `);return`/Tx BMC q ${d}BT `+t+` 1 0 0 1 ${(0,n.numberToString)(a)} ${(0,n.numberToString)(c+h)} Tm ${m} ET Q EMC`}_getMultilineAppearance(t,e,s,i,r,o,a,c,h,l,u,f){const d=[],p=r-2*c,g={shift:0};for(let t=0,n=e.length;t<n;t++){const n=this._splitLine(e[t],s,i,p);for(let e=0,o=n.length;e<o;e++)d.push(this._renderText(n[e],s,i,r,a,g,c,0===t&&0===e?-h-(u-l):-u))}const m=this.getBorderAndBackgroundAppearances(f),w=d.join("\n");return`/Tx BMC q ${m}BT `+t+` 1 0 0 1 0 ${(0,n.numberToString)(o)} Tm ${w} ET Q EMC`}_splitLine(t,e,s,i,n={}){t=n.line||t;const r=n.glyphs||e.charsToGlyphs(t);if(r.length<=1)return[t];const o=n.positions||e.getCharPositions(t),a=s/1e3,c=[];let h=-1,l=-1,u=-1,f=0,d=0;for(let e=0,s=r.length;e<s;e++){const[s,n]=o[e],p=r[e],g=p.width*a;" "===p.unicode?d+g>i?(c.push(t.substring(f,s)),f=s,d=g,h=-1,u=-1):(d+=g,h=s,l=n,u=e):d+g>i?-1!==h?(c.push(t.substring(f,l)),f=l,e=u+1,h=-1,d=0):(c.push(t.substring(f,s)),f=s,d=g):d+=g}return f<t.length&&c.push(t.substring(f,t.length)),c}getFieldObject(){return{id:this.data.id,value:this.data.fieldValue,defaultValue:this.data.defaultFieldValue||"",multiline:this.data.multiLine,password:this.hasFieldFlag(i.AnnotationFieldFlag.PASSWORD),charLimit:this.data.maxLen,comb:this.data.comb,editable:!this.data.readOnly,hidden:this.data.hidden,name:this.data.fieldName,rect:this.data.rect,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:"text"}}}class _ extends M{constructor(t){super(t),this.checkedAppearance=null,this.uncheckedAppearance=null,this.data.checkBox=!this.hasFieldFlag(i.AnnotationFieldFlag.RADIO)&&!this.hasFieldFlag(i.AnnotationFieldFlag.PUSHBUTTON),this.data.radioButton=this.hasFieldFlag(i.AnnotationFieldFlag.RADIO)&&!this.hasFieldFlag(i.AnnotationFieldFlag.PUSHBUTTON),this.data.pushButton=this.hasFieldFlag(i.AnnotationFieldFlag.PUSHBUTTON),this.data.isTooltipOnly=!1,this.data.checkBox?this._processCheckBox(t):this.data.radioButton?this._processRadioButton(t):this.data.pushButton?(this.data.hasOwnCanvas=!0,this._processPushButton(t)):(0,i.warn)("Invalid field flags for button widget annotation")}async getOperatorList(t,e,s,n,r){if(this.data.pushButton)return super.getOperatorList(t,e,s,!1,r);let o=null,a=null;if(r){const t=r.get(this.data.id);o=t?t.value:null,a=t?t.rotation:null}if(null===o&&this.appearance)return super.getOperatorList(t,e,s,n,r);null==o&&(o=this.data.checkBox?this.data.fieldValue===this.data.exportValue:this.data.fieldValue===this.data.buttonValue);const c=o?this.checkedAppearance:this.uncheckedAppearance;if(c){const o=this.appearance,h=c.dict.getArray("Matrix")||i.IDENTITY_MATRIX;a&&c.dict.set("Matrix",this.getRotationMatrix(r)),this.appearance=c;const l=super.getOperatorList(t,e,s,n,r);return this.appearance=o,c.dict.set("Matrix",h),l}return{opList:new g.OperatorList,separateForm:!1,separateCanvas:!1}}async save(t,e,s){return this.data.checkBox?this._saveCheckbox(t,e,s):this.data.radioButton?this._saveRadioButton(t,e,s):null}async _saveCheckbox(t,e,s){if(!s)return null;const n=s.get(this.data.id);let r=n?.rotation,a=n?.value;if(void 0===r){if(void 0===a)return null;if(this.data.fieldValue===this.data.exportValue===a)return null}const c=t.xref.fetchIfRef(this.ref);if(!(c instanceof o.Dict))return null;void 0===r&&(r=this.rotation),void 0===a&&(a=this.data.fieldValue===this.data.exportValue);const h={path:this.data.fieldName,value:a?this.data.exportValue:""},l=o.Name.get(a?this.data.exportValue:"Off");c.set("V",l),c.set("AS",l),c.set("M",`D:${(0,i.getModificationDate)()}`);const u=this._getMKDict(r);u&&c.set("MK",u);const f=[];return await(0,m.writeObject)(this.ref,c,f,t.xref),[{ref:this.ref,data:f.join(""),xfa:h}]}async _saveRadioButton(t,e,s){if(!s)return null;const n=s.get(this.data.id);let r=n?.rotation,a=n?.value;if(void 0===r){if(void 0===a)return null;if(this.data.fieldValue===this.data.buttonValue===a)return null}const c=t.xref.fetchIfRef(this.ref);if(!(c instanceof o.Dict))return null;void 0===a&&(a=this.data.fieldValue===this.data.buttonValue),void 0===r&&(r=this.rotation);const h={path:this.data.fieldName,value:a?this.data.buttonValue:""},l=o.Name.get(a?this.data.buttonValue:"Off"),u=[];let f=null;if(a)if(this.parent instanceof o.Ref){const e=t.xref.fetch(this.parent);e.set("V",l),await(0,m.writeObject)(this.parent,e,u,t.xref),f=u.join(""),u.length=0}else this.parent instanceof o.Dict&&this.parent.set("V",l);c.set("AS",l),c.set("M",`D:${(0,i.getModificationDate)()}`);const d=this._getMKDict(r);d&&c.set("MK",d),await(0,m.writeObject)(this.ref,c,u,t.xref);const p=[{ref:this.ref,data:u.join(""),xfa:h}];return f&&p.push({ref:this.parent,data:f,xfa:null}),p}_getDefaultCheckedAppearance(t,e){const s=this.data.rect[2]-this.data.rect[0],r=this.data.rect[3]-this.data.rect[1],c=[0,0,s,r],h=.8*Math.min(s,r);let l,u;"check"===e?(l={width:.755*h,height:.705*h},u="3"):"disc"===e?(l={width:.791*h,height:.705*h},u="l"):(0,i.unreachable)(`_getDefaultCheckedAppearance - unsupported type: ${e}`);const f=`q BT /PdfJsZaDb ${h} Tf 0 g ${(0,n.numberToString)((s-l.width)/2)} ${(0,n.numberToString)((r-l.height)/2)} Td (${u}) Tj ET Q`,d=new o.Dict(t.xref);d.set("FormType",1),d.set("Subtype",o.Name.get("Form")),d.set("Type",o.Name.get("XObject")),d.set("BBox",c),d.set("Matrix",[1,0,0,1,0,0]),d.set("Length",f.length);const p=new o.Dict(t.xref),g=new o.Dict(t.xref);g.set("PdfJsZaDb",this.fallbackFontDict),p.set("Font",g),d.set("Resources",p),this.checkedAppearance=new a.StringStream(f),this.checkedAppearance.dict=d,this._streams.push(this.checkedAppearance)}_processCheckBox(t){const e=t.dict.get("AP");if(!(e instanceof o.Dict))return;const s=e.get("N");if(!(s instanceof o.Dict))return;const i=this._decodeFormValue(t.dict.get("AS"));"string"==typeof i&&(this.data.fieldValue=i);const n=null!==this.data.fieldValue&&"Off"!==this.data.fieldValue?this.data.fieldValue:"Yes",r=s.getKeys();if(0===r.length)r.push("Off",n);else if(1===r.length)"Off"===r[0]?r.push(n):r.unshift("Off");else if(r.includes(n))r.length=0,r.push("Off",n);else{const t=r.find((t=>"Off"!==t));r.length=0,r.push("Off",t)}r.includes(this.data.fieldValue)||(this.data.fieldValue="Off"),this.data.exportValue=r[1];const a=s.get(this.data.exportValue);this.checkedAppearance=a instanceof c.BaseStream?a:null;const h=s.get("Off");this.uncheckedAppearance=h instanceof c.BaseStream?h:null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(t,"check"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict,null===this.data.defaultFieldValue&&(this.data.defaultFieldValue="Off")}_processRadioButton(t){this.data.fieldValue=this.data.buttonValue=null;const e=t.dict.get("Parent");if(e instanceof o.Dict){this.parent=t.dict.getRaw("Parent");const s=e.get("V");s instanceof o.Name&&(this.data.fieldValue=this._decodeFormValue(s))}const s=t.dict.get("AP");if(!(s instanceof o.Dict))return;const i=s.get("N");if(!(i instanceof o.Dict))return;for(const t of i.getKeys())if("Off"!==t){this.data.buttonValue=this._decodeFormValue(t);break}const n=i.get(this.data.buttonValue);this.checkedAppearance=n instanceof c.BaseStream?n:null;const r=i.get("Off");this.uncheckedAppearance=r instanceof c.BaseStream?r:null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(t,"disc"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict,null===this.data.defaultFieldValue&&(this.data.defaultFieldValue="Off")}_processPushButton(t){const{dict:e,annotationGlobals:s}=t;e.has("A")||e.has("AA")||this.data.alternativeText?(this.data.isTooltipOnly=!e.has("A")&&!e.has("AA"),l.Catalog.parseDestDictionary({destDict:e,resultObj:this.data,docBaseUrl:s.baseUrl,docAttachments:s.attachments})):(0,i.warn)("Push buttons without action dictionaries are not supported")}getFieldObject(){let t,e="button";return this.data.checkBox?(e="checkbox",t=this.data.exportValue):this.data.radioButton&&(e="radiobutton",t=this.data.buttonValue),{id:this.data.id,value:this.data.fieldValue||"Off",defaultValue:this.data.defaultFieldValue,exportValues:t,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,hidden:this.data.hidden,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:e}}get fallbackFontDict(){const t=new o.Dict;return t.set("BaseFont",o.Name.get("ZapfDingbats")),t.set("Type",o.Name.get("FallbackType")),t.set("Subtype",o.Name.get("FallbackType")),t.set("Encoding",o.Name.get("ZapfDingbatsEncoding")),(0,i.shadow)(this,"fallbackFontDict",t)}}class I extends M{constructor(t){super(t);const{dict:e,xref:s}=t;this.indices=e.getArray("I"),this.hasIndices=Array.isArray(this.indices)&&this.indices.length>0,this.data.options=[];const r=(0,n.getInheritableProperty)({dict:e,key:"Opt"});if(Array.isArray(r))for(let t=0,e=r.length;t<e;t++){const e=s.fetchIfRef(r[t]),i=Array.isArray(e);this.data.options[t]={exportValue:this._decodeFormValue(i?s.fetchIfRef(e[0]):e),displayValue:this._decodeFormValue(i?s.fetchIfRef(e[1]):e)}}if(this.hasIndices){this.data.fieldValue=[];const t=this.data.options.length;for(const e of this.indices)Number.isInteger(e)&&e>=0&&e<t&&this.data.fieldValue.push(this.data.options[e].exportValue)}else"string"==typeof this.data.fieldValue?this.data.fieldValue=[this.data.fieldValue]:this.data.fieldValue||(this.data.fieldValue=[]);this.data.combo=this.hasFieldFlag(i.AnnotationFieldFlag.COMBO),this.data.multiSelect=this.hasFieldFlag(i.AnnotationFieldFlag.MULTISELECT),this._hasText=!0}getFieldObject(){return{id:this.data.id,value:this.data.fieldValue.length>0?this.data.fieldValue[0]:null,defaultValue:this.data.defaultFieldValue,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,numItems:this.data.fieldValue.length,multipleSelection:this.data.multiSelect,hidden:this.data.hidden,actions:this.data.actions,items:this.data.options,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:this.data.combo?"combobox":"listbox"}}amendSavedDict(t,e){if(!this.hasIndices)return;let s=t?.get(this.data.id)?.value;Array.isArray(s)||(s=[s]);const i=[],{options:n}=this.data;for(let t=0,e=0,r=n.length;t<r;t++)n[t].exportValue===s[e]&&(i.push(t),e+=1);e.set("I",i)}async _getAppearance(t,e,s,n){if(this.data.combo)return super._getAppearance(t,e,s,n);let o,a;const c=n?.get(this.data.id);if(c&&(a=c.rotation,o=c.value),void 0===a&&void 0===o&&!this._needAppearances)return null;void 0===o?o=this.data.fieldValue:Array.isArray(o)||(o=[o]);let h=this.data.rect[3]-this.data.rect[1],l=this.data.rect[2]-this.data.rect[0];90!==a&&270!==a||([l,h]=[h,l]);const u=this.data.options.length,f=[];for(let t=0;t<u;t++){const{exportValue:e}=this.data.options[t];o.includes(e)&&f.push(t)}this._defaultAppearance||(this.data.defaultAppearanceData=(0,r.parseDefaultAppearance)(this._defaultAppearance="/Helvetica 0 Tf 0 g"));const d=await M._getFontData(t,e,this.data.defaultAppearanceData,this._fieldResources.mergedResources);let p,{fontSize:g}=this.data.defaultAppearanceData;if(g)p=this._defaultAppearance;else{const t=(h-1)/u;let e,s=-1;for(const{displayValue:t}of this.data.options){const i=this._getTextWidth(t,d);i>s&&(s=i,e=t)}[p,g]=this._computeFontSize(t,l-4,e,d,-1)}const m=g*i.LINE_FACTOR,w=(m-g)/2,b=Math.floor(h/m);let y=0;if(f.length>0){const t=Math.min(...f),e=Math.max(...f);y=Math.max(0,e-b+1),y>t&&(y=t)}const A=Math.min(y+b+1,u),v=["/Tx BMC q",`1 1 ${l} ${h} re W n`];if(f.length){v.push("0.600006 0.756866 0.854904 rg");for(const t of f)y<=t&&t<A&&v.push(`1 ${h-(t-y+1)*m} ${l} ${m} re f`)}v.push("BT",p,`1 0 0 1 0 ${h} Tm`);const x={shift:0};for(let t=y;t<A;t++){const{displayValue:e}=this.data.options[t];v.push(this._renderText(e,d,g,l,0,x,2,-m+(t===y?w:0)))}return v.push("ET Q EMC"),v.join("\n")}}class F extends M{constructor(t){super(t),this.data.fieldValue=null,this.data.hasOwnCanvas=this.data.noRotate}getFieldObject(){return{id:this.data.id,value:null,page:this.data.pageIndex,type:"signature"}}}class O extends S{constructor(t){super(t),this.data.noRotate=!0,this.data.hasOwnCanvas=this.data.noRotate;const{dict:e}=t;this.data.annotationType=i.AnnotationType.TEXT,this.data.hasAppearance?this.data.name="NoIcon":(this.data.rect[1]=this.data.rect[3]-22,this.data.rect[2]=this.data.rect[0]+22,this.data.name=e.has("Name")?e.get("Name").name:"Note"),e.has("State")?(this.data.state=e.get("State")||null,this.data.stateModel=e.get("StateModel")||null):(this.data.state=null,this.data.stateModel=null)}}class E extends x{constructor(t){super(t);const{dict:e,annotationGlobals:s}=t;this.data.annotationType=i.AnnotationType.LINK;const n=A(e,this.rectangle);n&&(this.data.quadPoints=n),this.data.borderColor||=this.data.color,l.Catalog.parseDestDictionary({destDict:e,resultObj:this.data,docBaseUrl:s.baseUrl,docAttachments:s.attachments})}}class T extends x{constructor(t){super(t);const{dict:e}=t;this.data.annotationType=i.AnnotationType.POPUP,this.data.rect[0]!==this.data.rect[2]&&this.data.rect[1]!==this.data.rect[3]||(this.data.rect=null);let s=e.get("Parent");if(!s)return void(0,i.warn)("Popup annotation has a missing or invalid parent annotation.");const n=s.getArray("Rect");this.data.parentRect=Array.isArray(n)&&4===n.length?i.Util.normalizeRect(n):null;const r=s.get("RT");if((0,o.isName)(r,i.AnnotationReplyType.GROUP)&&(s=s.get("IRT")),s.has("M")?(this.setModificationDate(s.get("M")),this.data.modificationDate=this.modificationDate):this.data.modificationDate=null,s.has("C")?(this.setColor(s.getArray("C")),this.data.color=this.color):this.data.color=null,!this.viewable){const t=s.get("F");this._isViewable(t)&&this.setFlags(t)}this.setTitle(s.get("T")),this.data.titleObj=this._title,this.setContents(s.get("Contents")),this.data.contentsObj=this._contents,s.has("RC")&&(this.data.richText=w.XFAFactory.getRichTextAsHtml(s.get("RC"))),this.data.open=!!e.get("Open")}}e.PopupAnnotation=T;class D extends S{constructor(t){super(t),this.data.hasOwnCanvas=!0;const{evaluatorOptions:e,xref:s}=t;if(this.data.annotationType=i.AnnotationType.FREETEXT,this.setDefaultAppearance(t),this.appearance){const{fontColor:t,fontSize:i}=(0,r.parseAppearanceStream)(this.appearance,e,s);this.data.defaultAppearanceData.fontColor=t,this.data.defaultAppearanceData.fontSize=i||10}else if(this._isOffscreenCanvasSupported){const e=t.dict.get("CA"),i=new r.FakeUnicodeFont(s,"sans-serif");this.data.defaultAppearanceData.fontSize||=10;const{fontColor:n,fontSize:o}=this.data.defaultAppearanceData;this.appearance=i.createAppearance(this._contents.str,this.rectangle,this.rotation,o,n,e),this._streams.push(this.appearance,r.FakeUnicodeFont.toUnicodeStream)}else(0,i.warn)("FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly.")}get hasTextContent(){return!!this.appearance}static createNewDict(t,e,{apRef:s,ap:a}){const{color:c,fontSize:h,rect:l,rotation:u,user:f,value:d}=t,p=new o.Dict(e);p.set("Type",o.Name.get("Annot")),p.set("Subtype",o.Name.get("FreeText")),p.set("CreationDate",`D:${(0,i.getModificationDate)()}`),p.set("Rect",l);const g=`/Helv ${h} Tf ${(0,r.getPdfColor)(c,!0)}`;if(p.set("DA",g),p.set("Contents",(0,n.isAscii)(d)?d:(0,n.stringToUTF16String)(d,!0)),p.set("F",4),p.set("Border",[0,0,0]),p.set("Rotate",u),f&&p.set("T",(0,n.isAscii)(f)?f:(0,n.stringToUTF16String)(f,!0)),s||a){const t=new o.Dict(e);p.set("AP",t),t.set("N",s||a)}return p}static async createNewAppearanceStream(t,e,s){const{baseFontRef:c,evaluator:h,task:l}=s,{color:u,fontSize:f,rect:d,rotation:p,value:g}=t,m=new o.Dict(e),w=new o.Dict(e);if(c)w.set("Helv",c);else{const t=new o.Dict(e);t.set("BaseFont",o.Name.get("Helvetica")),t.set("Type",o.Name.get("Font")),t.set("Subtype",o.Name.get("Type1")),t.set("Encoding",o.Name.get("WinAnsiEncoding")),w.set("Helv",t)}m.set("Font",w);const b=await M._getFontData(h,l,{fontName:"Helv",fontSize:f},m),[y,A,v,x]=d;let k=v-y,S=x-A;p%180!=0&&([k,S]=[S,k]);const C=g.split("\n"),_=f/1e3;let I=-1/0;const F=[];for(let t of C){const e=b.encodeString(t);if(e.length>1)return null;t=e.join(""),F.push(t);let s=0;const i=b.charsToGlyphs(t);for(const t of i)s+=t.width*_;I=Math.max(I,s)}let O=1;I>k&&(O=k/I);let E=1;const T=i.LINE_FACTOR*f,D=(i.LINE_FACTOR-i.LINE_DESCENT_FACTOR)*f,P=T*C.length;P>S&&(E=S/P);const R=f*Math.min(O,E);let N,L,B;switch(p){case 0:B=[1,0,0,1],L=[d[0],d[1],k,S],N=[d[0],d[3]-D];break;case 90:B=[0,1,-1,0],L=[d[1],-d[2],k,S],N=[d[1],-d[0]-D];break;case 180:B=[-1,0,0,-1],L=[-d[2],-d[3],k,S],N=[-d[2],-d[1]-D];break;case 270:B=[0,-1,1,0],L=[-d[3],d[0],k,S],N=[-d[3],d[2]-D]}const $=["q",`${B.join(" ")} 0 0 cm`,`${L.join(" ")} re W n`,"BT",`${(0,r.getPdfColor)(u,!0)}`,`0 Tc /Helv ${(0,n.numberToString)(R)} Tf`];$.push(`${N.join(" ")} Td (${(0,n.escapeString)(F[0])}) Tj`);const U=(0,n.numberToString)(T);for(let t=1,e=F.length;t<e;t++)$.push(`0 -${U} Td (${(0,n.escapeString)(F[t])}) Tj`);$.push("ET","Q");const j=$.join("\n"),H=new o.Dict(e);H.set("FormType",1),H.set("Subtype",o.Name.get("Form")),H.set("Type",o.Name.get("XObject")),H.set("BBox",d),H.set("Resources",m),H.set("Matrix",[1,0,0,1,-d[0],-d[1]]);const G=new a.StringStream(j);return G.dict=H,G}}class P extends S{constructor(t){super(t);const{dict:e,xref:s}=t;this.data.annotationType=i.AnnotationType.LINE,this.data.hasOwnCanvas=this.data.noRotate;const n=e.getArray("L");if(this.data.lineCoordinates=i.Util.normalizeRect(n),this.setLineEndings(e.getArray("LE")),this.data.lineEndings=this.lineEndings,!this.appearance){const t=this.color?y(this.color):[0,0,0],r=e.get("CA"),o=b(e.getArray("IC"),null),a=o?y(o):null,c=a?r:null,h=this.borderStyle.width||1,l=2*h,u=[this.data.lineCoordinates[0]-l,this.data.lineCoordinates[1]-l,this.data.lineCoordinates[2]+l,this.data.lineCoordinates[3]+l];i.Util.intersect(this.rectangle,u)||(this.rectangle=u),this._setDefaultAppearance({xref:s,extra:`${h} w`,strokeColor:t,fillColor:a,strokeAlpha:r,fillAlpha:c,pointsCallback:(t,e)=>(t.push(`${n[0]} ${n[1]} m`,`${n[2]} ${n[3]} l`,"S"),[e[0].x-h,e[1].x+h,e[3].y-h,e[1].y+h])})}}}class R extends S{constructor(t){super(t);const{dict:e,xref:s}=t;if(this.data.annotationType=i.AnnotationType.SQUARE,this.data.hasOwnCanvas=this.data.noRotate,!this.appearance){const t=this.color?y(this.color):[0,0,0],i=e.get("CA"),n=b(e.getArray("IC"),null),r=n?y(n):null;if(0===this.borderStyle.width&&!r)return;this._setDefaultAppearance({xref:s,extra:`${this.borderStyle.width} w`,strokeColor:t,fillColor:r,strokeAlpha:i,fillAlpha:r?i:null,pointsCallback:(t,e)=>(t.push(`${e[2].x+this.borderStyle.width/2} ${e[2].y+this.borderStyle.width/2} ${e[3].x-e[2].x-this.borderStyle.width} ${e[1].y-e[3].y-this.borderStyle.width} re`),t.push(r?"B":"S"),[e[0].x,e[1].x,e[3].y,e[1].y])})}}}class N extends S{constructor(t){super(t);const{dict:e,xref:s}=t;if(this.data.annotationType=i.AnnotationType.CIRCLE,!this.appearance){const t=this.color?y(this.color):[0,0,0],i=e.get("CA"),n=b(e.getArray("IC"),null),r=n?y(n):null,o=r?i:null;if(0===this.borderStyle.width&&!r)return;const a=4/3*Math.tan(Math.PI/8);this._setDefaultAppearance({xref:s,extra:`${this.borderStyle.width} w`,strokeColor:t,fillColor:r,strokeAlpha:i,fillAlpha:o,pointsCallback:(t,e)=>{const s=e[0].x+this.borderStyle.width/2,i=e[0].y-this.borderStyle.width/2,n=e[3].x-this.borderStyle.width/2,o=e[3].y+this.borderStyle.width/2,c=s+(n-s)/2,h=i+(o-i)/2,l=(n-s)/2*a,u=(o-i)/2*a;return t.push(`${c} ${o} m`,`${c+l} ${o} ${n} ${h+u} ${n} ${h} c`,`${n} ${h-u} ${c+l} ${i} ${c} ${i} c`,`${c-l} ${i} ${s} ${h-u} ${s} ${h} c`,`${s} ${h+u} ${c-l} ${o} ${c} ${o} c`,"h"),t.push(r?"B":"S"),[e[0].x,e[1].x,e[3].y,e[1].y]}})}}}class L extends S{constructor(t){super(t);const{dict:e,xref:s}=t;this.data.annotationType=i.AnnotationType.POLYLINE,this.data.hasOwnCanvas=this.data.noRotate,this.data.vertices=[],this instanceof B||(this.setLineEndings(e.getArray("LE")),this.data.lineEndings=this.lineEndings);const n=e.getArray("Vertices");if(Array.isArray(n)){for(let t=0,e=n.length;t<e;t+=2)this.data.vertices.push({x:n[t],y:n[t+1]});if(!this.appearance){const t=this.color?y(this.color):[0,0,0],n=e.get("CA"),r=this.borderStyle.width||1,o=2*r,a=[1/0,1/0,-1/0,-1/0];for(const t of this.data.vertices)a[0]=Math.min(a[0],t.x-o),a[1]=Math.min(a[1],t.y-o),a[2]=Math.max(a[2],t.x+o),a[3]=Math.max(a[3],t.y+o);i.Util.intersect(this.rectangle,a)||(this.rectangle=a),this._setDefaultAppearance({xref:s,extra:`${r} w`,strokeColor:t,strokeAlpha:n,pointsCallback:(t,e)=>{const s=this.data.vertices;for(let e=0,i=s.length;e<i;e++)t.push(`${s[e].x} ${s[e].y} ${0===e?"m":"l"}`);return t.push("S"),[e[0].x,e[1].x,e[3].y,e[1].y]}})}}}}class B extends L{constructor(t){super(t),this.data.annotationType=i.AnnotationType.POLYGON}}class $ extends S{constructor(t){super(t),this.data.annotationType=i.AnnotationType.CARET}}class U extends S{constructor(t){super(t),this.data.hasOwnCanvas=this.data.noRotate;const{dict:e,xref:s}=t;this.data.annotationType=i.AnnotationType.INK,this.data.inkLists=[];const n=e.getArray("InkList");if(Array.isArray(n)){for(let t=0,e=n.length;t<e;++t){this.data.inkLists.push([]);for(let e=0,i=n[t].length;e<i;e+=2)this.data.inkLists[t].push({x:s.fetchIfRef(n[t][e]),y:s.fetchIfRef(n[t][e+1])})}if(!this.appearance){const t=this.color?y(this.color):[0,0,0],n=e.get("CA"),r=this.borderStyle.width||1,o=2*r,a=[1/0,1/0,-1/0,-1/0];for(const t of this.data.inkLists)for(const e of t)a[0]=Math.min(a[0],e.x-o),a[1]=Math.min(a[1],e.y-o),a[2]=Math.max(a[2],e.x+o),a[3]=Math.max(a[3],e.y+o);i.Util.intersect(this.rectangle,a)||(this.rectangle=a),this._setDefaultAppearance({xref:s,extra:`${r} w`,strokeColor:t,strokeAlpha:n,pointsCallback:(t,e)=>{for(const e of this.data.inkLists){for(let s=0,i=e.length;s<i;s++)t.push(`${e[s].x} ${e[s].y} ${0===s?"m":"l"}`);t.push("S")}return[e[0].x,e[1].x,e[3].y,e[1].y]}})}}}static createNewDict(t,e,{apRef:s,ap:n}){const{color:r,opacity:a,paths:c,rect:h,rotation:l,thickness:u}=t,f=new o.Dict(e);f.set("Type",o.Name.get("Annot")),f.set("Subtype",o.Name.get("Ink")),f.set("CreationDate",`D:${(0,i.getModificationDate)()}`),f.set("Rect",h),f.set("InkList",c.map((t=>t.points))),f.set("F",4),f.set("Rotate",l);const d=new o.Dict(e);f.set("BS",d),d.set("W",u),f.set("C",Array.from(r,(t=>t/255))),f.set("CA",a);const p=new o.Dict(e);return f.set("AP",p),p.set("N",s||n),f}static async createNewAppearanceStream(t,e,s){const{color:i,rect:c,paths:h,thickness:l,opacity:u}=t,f=[`${l} w 1 J 1 j`,`${(0,r.getPdfColor)(i,!1)}`];1!==u&&f.push("/R0 gs");const d=[];for(const{bezier:t}of h){d.length=0,d.push(`${(0,n.numberToString)(t[0])} ${(0,n.numberToString)(t[1])} m`);for(let e=2,s=t.length;e<s;e+=6){const s=t.slice(e,e+6).map(n.numberToString).join(" ");d.push(`${s} c`)}d.push("S"),f.push(d.join("\n"))}const p=f.join("\n"),g=new o.Dict(e);if(g.set("FormType",1),g.set("Subtype",o.Name.get("Form")),g.set("Type",o.Name.get("XObject")),g.set("BBox",c),g.set("Length",p.length),1!==u){const t=new o.Dict(e),s=new o.Dict(e),i=new o.Dict(e);i.set("CA",u),i.set("Type",o.Name.get("ExtGState")),s.set("R0",i),t.set("ExtGState",s),g.set("Resources",t)}const m=new a.StringStream(p);return m.dict=g,m}}class j extends S{constructor(t){super(t);const{dict:e,xref:s}=t;if(this.data.annotationType=i.AnnotationType.HIGHLIGHT,this.data.quadPoints=A(e,null)){const t=this.appearance?.dict.get("Resources");if(!this.appearance||!t?.has("ExtGState")){this.appearance&&(0,i.warn)("HighlightAnnotation - ignoring built-in appearance stream.");const t=this.color?y(this.color):[1,1,0],n=e.get("CA");this._setDefaultAppearance({xref:s,fillColor:t,blendMode:"Multiply",fillAlpha:n,pointsCallback:(t,e)=>(t.push(`${e[0].x} ${e[0].y} m`,`${e[1].x} ${e[1].y} l`,`${e[3].x} ${e[3].y} l`,`${e[2].x} ${e[2].y} l`,"f"),[e[0].x,e[1].x,e[3].y,e[1].y])})}}else this.data.popupRef=null}}class H extends S{constructor(t){super(t);const{dict:e,xref:s}=t;if(this.data.annotationType=i.AnnotationType.UNDERLINE,this.data.quadPoints=A(e,null)){if(!this.appearance){const t=this.color?y(this.color):[0,0,0],i=e.get("CA");this._setDefaultAppearance({xref:s,extra:"[] 0 d 0.571 w",strokeColor:t,strokeAlpha:i,pointsCallback:(t,e)=>(t.push(`${e[2].x} ${e[2].y+1.3} m`,`${e[3].x} ${e[3].y+1.3} l`,"S"),[e[0].x,e[1].x,e[3].y,e[1].y])})}}else this.data.popupRef=null}}class G extends S{constructor(t){super(t);const{dict:e,xref:s}=t;if(this.data.annotationType=i.AnnotationType.SQUIGGLY,this.data.quadPoints=A(e,null)){if(!this.appearance){const t=this.color?y(this.color):[0,0,0],i=e.get("CA");this._setDefaultAppearance({xref:s,extra:"[] 0 d 1 w",strokeColor:t,strokeAlpha:i,pointsCallback:(t,e)=>{const s=(e[0].y-e[2].y)/6;let i=s,n=e[2].x;const r=e[2].y,o=e[3].x;t.push(`${n} ${r+i} m`);do{n+=2,i=0===i?s:0,t.push(`${n} ${r+i} l`)}while(n<o);return t.push("S"),[e[2].x,o,r-2*s,r+2*s]}})}}else this.data.popupRef=null}}class q extends S{constructor(t){super(t);const{dict:e,xref:s}=t;if(this.data.annotationType=i.AnnotationType.STRIKEOUT,this.data.quadPoints=A(e,null)){if(!this.appearance){const t=this.color?y(this.color):[0,0,0],i=e.get("CA");this._setDefaultAppearance({xref:s,extra:"[] 0 d 1 w",strokeColor:t,strokeAlpha:i,pointsCallback:(t,e)=>(t.push((e[0].x+e[2].x)/2+" "+(e[0].y+e[2].y)/2+" m",(e[1].x+e[3].x)/2+" "+(e[1].y+e[3].y)/2+" l","S"),[e[0].x,e[1].x,e[3].y,e[1].y])})}}else this.data.popupRef=null}}class X extends S{constructor(t){super(t),this.data.annotationType=i.AnnotationType.STAMP,this.data.hasOwnCanvas=this.data.noRotate}static async createImage(t,e){const{width:s,height:n}=t,r=new OffscreenCanvas(s,n),c=r.getContext("2d",{alpha:!0});c.drawImage(t,0,0);const h=c.getImageData(0,0,s,n).data,l=new Uint32Array(h.buffer),u=l.some(i.FeatureTest.isLittleEndian?t=>t>>>24!=255:t=>!!(255&~t));u&&(c.fillStyle="white",c.fillRect(0,0,s,n),c.drawImage(t,0,0));const f=r.convertToBlob({type:"image/jpeg",quality:1}).then((t=>t.arrayBuffer())),d=o.Name.get("XObject"),p=o.Name.get("Image"),g=new o.Dict(e);g.set("Type",d),g.set("Subtype",p),g.set("BitsPerComponent",8),g.set("ColorSpace",o.Name.get("DeviceRGB")),g.set("Filter",o.Name.get("DCTDecode")),g.set("BBox",[0,0,s,n]),g.set("Width",s),g.set("Height",n);let m=null;if(u){const t=new Uint8Array(l.length);if(i.FeatureTest.isLittleEndian)for(let e=0,s=l.length;e<s;e++)t[e]=l[e]>>>24;else for(let e=0,s=l.length;e<s;e++)t[e]=255&l[e];const r=new o.Dict(e);r.set("Type",d),r.set("Subtype",p),r.set("BitsPerComponent",8),r.set("ColorSpace",o.Name.get("DeviceGray")),r.set("Width",s),r.set("Height",n),m=new a.Stream(t,0,0,r)}return{imageStream:new a.Stream(await f,0,0,g),smaskStream:m,width:s,height:n}}static createNewDict(t,e,{apRef:s,ap:r}){const{rect:a,rotation:c,user:h}=t,l=new o.Dict(e);if(l.set("Type",o.Name.get("Annot")),l.set("Subtype",o.Name.get("Stamp")),l.set("CreationDate",`D:${(0,i.getModificationDate)()}`),l.set("Rect",a),l.set("F",4),l.set("Border",[0,0,0]),l.set("Rotate",c),h&&l.set("T",(0,n.isAscii)(h)?h:(0,n.stringToUTF16String)(h,!0)),s||r){const t=new o.Dict(e);l.set("AP",t),t.set("N",s||r)}return l}static async createNewAppearanceStream(t,e,s){const{rotation:i}=t,{imageRef:r,width:c,height:h}=s.image,l=new o.Dict(e),u=new o.Dict(e);l.set("XObject",u),u.set("Im0",r);const f=`q ${c} 0 0 ${h} 0 0 cm /Im0 Do Q`,d=new o.Dict(e);if(d.set("FormType",1),d.set("Subtype",o.Name.get("Form")),d.set("Type",o.Name.get("XObject")),d.set("BBox",[0,0,c,h]),d.set("Resources",l),i){const t=(0,n.getRotationMatrix)(i,c,h);d.set("Matrix",t)}const p=new a.StringStream(f);return p.dict=d,p}}class W extends S{constructor(t){super(t);const{dict:e,xref:s}=t,n=new f.FileSpec(e.get("FS"),s);this.data.annotationType=i.AnnotationType.FILEATTACHMENT,this.data.hasOwnCanvas=this.data.noRotate,this.data.file=n.serializable;const r=e.get("Name");this.data.name=r instanceof o.Name?(0,i.stringToPDFString)(r.name):"PushPin";const a=e.get("ca");this.data.fillAlpha="number"==typeof a&&a>=0&&a<=1?a:null}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FakeUnicodeFont=void 0,e.createDefaultAppearance=function({fontSize:t,fontName:e,fontColor:s}){return`/${(0,n.escapePDFName)(e)} ${t} Tf ${d(s,!0)}`},e.getPdfColor=d,e.parseAppearanceStream=function(t,e,s){return new f(t,e,s).parse()},e.parseDefaultAppearance=function(t){return new u(t).parse()};var i=s(4),n=s(3),r=s(2),o=s(12),a=s(13),c=s(59),h=s(57),l=s(8);class u extends a.EvaluatorPreprocessor{constructor(t){super(new l.StringStream(t))}parse(){const t={fn:0,args:[]},e={fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3)};try{for(;t.args.length=0,this.read(t);){if(0!==this.savedStatesDepth)continue;const{fn:s,args:n}=t;switch(0|s){case r.OPS.setFont:const[t,s]=n;t instanceof i.Name&&(e.fontName=t.name),"number"==typeof s&&s>0&&(e.fontSize=s);break;case r.OPS.setFillRGBColor:o.ColorSpace.singletons.rgb.getRgbItem(n,0,e.fontColor,0);break;case r.OPS.setFillGray:o.ColorSpace.singletons.gray.getRgbItem(n,0,e.fontColor,0);break;case r.OPS.setFillCMYKColor:o.ColorSpace.singletons.cmyk.getRgbItem(n,0,e.fontColor,0)}}}catch(t){(0,r.warn)(`parseDefaultAppearance - ignoring errors: "${t}".`)}return e}}class f extends a.EvaluatorPreprocessor{constructor(t,e,s){super(t),this.stream=t,this.evaluatorOptions=e,this.xref=s,this.resources=t.dict?.get("Resources")}parse(){const t={fn:0,args:[]};let e={scaleFactor:1,fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3),fillColorSpace:o.ColorSpace.singletons.gray},s=!1;const n=[];try{for(;t.args.length=0,!s&&this.read(t);){const{fn:a,args:c}=t;switch(0|a){case r.OPS.save:n.push({scaleFactor:e.scaleFactor,fontSize:e.fontSize,fontName:e.fontName,fontColor:e.fontColor.slice(),fillColorSpace:e.fillColorSpace});break;case r.OPS.restore:e=n.pop()||e;break;case r.OPS.setTextMatrix:e.scaleFactor*=Math.hypot(c[0],c[1]);break;case r.OPS.setFont:const[t,a]=c;t instanceof i.Name&&(e.fontName=t.name),"number"==typeof a&&a>0&&(e.fontSize=a*e.scaleFactor);break;case r.OPS.setFillColorSpace:e.fillColorSpace=o.ColorSpace.parse({cs:c[0],xref:this.xref,resources:this.resources,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:this._localColorSpaceCache});break;case r.OPS.setFillColor:e.fillColorSpace.getRgbItem(c,0,e.fontColor,0);break;case r.OPS.setFillRGBColor:o.ColorSpace.singletons.rgb.getRgbItem(c,0,e.fontColor,0);break;case r.OPS.setFillGray:o.ColorSpace.singletons.gray.getRgbItem(c,0,e.fontColor,0);break;case r.OPS.setFillCMYKColor:o.ColorSpace.singletons.cmyk.getRgbItem(c,0,e.fontColor,0);break;case r.OPS.showText:case r.OPS.showSpacedText:case r.OPS.nextLineShowText:case r.OPS.nextLineSetSpacingShowText:s=!0}}}catch(t){(0,r.warn)(`parseAppearanceStream - ignoring errors: "${t}".`)}return this.stream.reset(),delete e.scaleFactor,delete e.fillColorSpace,e}get _localColorSpaceCache(){return(0,r.shadow)(this,"_localColorSpaceCache",new c.LocalColorSpaceCache)}get _pdfFunctionFactory(){const t=new h.PDFFunctionFactory({xref:this.xref,isEvalSupported:this.evaluatorOptions.isEvalSupported});return(0,r.shadow)(this,"_pdfFunctionFactory",t)}}function d(t,e){return t[0]===t[1]&&t[1]===t[2]?`${(0,n.numberToString)(t[0]/255)} ${e?"g":"G"}`:Array.from(t,(t=>(0,n.numberToString)(t/255))).join(" ")+" "+(e?"rg":"RG")}class p{constructor(t,e){this.xref=t,this.widths=null,this.firstChar=1/0,this.lastChar=-1/0,this.fontFamily=e;const s=new OffscreenCanvas(1,1);this.ctxMeasure=s.getContext("2d"),p._fontNameId||(p._fontNameId=1),this.fontName=i.Name.get(`InvalidPDFjsFont_${e}_${p._fontNameId++}`)}get toUnicodeRef(){if(!p._toUnicodeRef){const t="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo\n<< /Registry (Adobe)\n/Ordering (UCS) /Supplement 0 >> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000> <FFFF>\nendcodespacerange\n1 beginbfrange\n<0000> <FFFF> <0000>\nendbfrange\nendcmap CMapName currentdict /CMap defineresource pop end end",e=p.toUnicodeStream=new l.StringStream(t),s=new i.Dict(this.xref);e.dict=s,s.set("Length",t.length),p._toUnicodeRef=this.xref.getNewPersistentRef(e)}return p._toUnicodeRef}get fontDescriptorRef(){if(!p._fontDescriptorRef){const t=new i.Dict(this.xref);t.set("Type",i.Name.get("FontDescriptor")),t.set("FontName",this.fontName),t.set("FontFamily","MyriadPro Regular"),t.set("FontBBox",[0,0,0,0]),t.set("FontStretch",i.Name.get("Normal")),t.set("FontWeight",400),t.set("ItalicAngle",0),p._fontDescriptorRef=this.xref.getNewPersistentRef(t)}return p._fontDescriptorRef}get descendantFontRef(){const t=new i.Dict(this.xref);t.set("BaseFont",this.fontName),t.set("Type",i.Name.get("Font")),t.set("Subtype",i.Name.get("CIDFontType0")),t.set("CIDToGIDMap",i.Name.get("Identity")),t.set("FirstChar",this.firstChar),t.set("LastChar",this.lastChar),t.set("FontDescriptor",this.fontDescriptorRef),t.set("DW",1e3);const e=[],s=[...this.widths.entries()].sort();let n=null,r=null;for(const[t,i]of s)n?t===n+r.length?r.push(i):(e.push(n,r),n=t,r=[i]):(n=t,r=[i]);n&&e.push(n,r),t.set("W",e);const o=new i.Dict(this.xref);return o.set("Ordering","Identity"),o.set("Registry","Adobe"),o.set("Supplement",0),t.set("CIDSystemInfo",o),this.xref.getNewPersistentRef(t)}get baseFontRef(){const t=new i.Dict(this.xref);return t.set("BaseFont",this.fontName),t.set("Type",i.Name.get("Font")),t.set("Subtype",i.Name.get("Type0")),t.set("Encoding",i.Name.get("Identity-H")),t.set("DescendantFonts",[this.descendantFontRef]),t.set("ToUnicode",this.toUnicodeRef),this.xref.getNewPersistentRef(t)}get resources(){const t=new i.Dict(this.xref),e=new i.Dict(this.xref);return e.set(this.fontName.name,this.baseFontRef),t.set("Font",e),t}_createContext(){return this.widths=new Map,this.ctxMeasure.font=`1000px ${this.fontFamily}`,this.ctxMeasure}createFontResources(t){const e=this._createContext();for(const s of t.split(/\r\n?|\n/))for(const t of s.split("")){const s=t.charCodeAt(0);if(this.widths.has(s))continue;const i=e.measureText(t),n=Math.ceil(i.width);this.widths.set(s,n),this.firstChar=Math.min(s,this.firstChar),this.lastChar=Math.max(s,this.lastChar)}return this.resources}createAppearance(t,e,s,o,a,c){const h=this._createContext(),u=[];let f=-1/0;for(const e of t.split(/\r\n?|\n/)){u.push(e);const t=h.measureText(e).width;f=Math.max(f,t);for(const t of e.split("")){const e=t.charCodeAt(0);let s=this.widths.get(e);if(void 0===s){const i=h.measureText(t);s=Math.ceil(i.width),this.widths.set(e,s),this.firstChar=Math.min(e,this.firstChar),this.lastChar=Math.max(e,this.lastChar)}}}f*=o/1e3;const[p,g,m,w]=e;let b=m-p,y=w-g;s%180!=0&&([b,y]=[y,b]);let A=1;f>b&&(A=b/f);let v=1;const x=r.LINE_FACTOR*o,k=r.LINE_DESCENT_FACTOR*o,S=x*u.length;S>y&&(v=y/S);const M=o*Math.min(A,v),C=["q",`0 0 ${(0,n.numberToString)(b)} ${(0,n.numberToString)(y)} re W n`,"BT",`1 0 0 1 0 ${(0,n.numberToString)(y+k)} Tm 0 Tc ${d(a,!0)}`,`/${this.fontName.name} ${(0,n.numberToString)(M)} Tf`],{resources:_}=this;if(1!==(c="number"==typeof c&&c>=0&&c<=1?c:1)){C.push("/R0 gs");const t=new i.Dict(this.xref),e=new i.Dict(this.xref);e.set("ca",c),e.set("CA",c),e.set("Type",i.Name.get("ExtGState")),t.set("R0",e),_.set("ExtGState",t)}const I=(0,n.numberToString)(x);for(const t of u)C.push(`0 -${I} Td <${(0,n.stringToUTF16HexString)(t)}> Tj`);C.push("ET","Q");const F=C.join("\n"),O=new i.Dict(this.xref);if(O.set("Subtype",i.Name.get("Form")),O.set("Type",i.Name.get("XObject")),O.set("BBox",[0,0,b,y]),O.set("Length",F.length),O.set("Resources",_),s){const t=(0,n.getRotationMatrix)(s,b,y);O.set("Matrix",t)}const E=new l.StringStream(F);return E.dict=O,E}}e.FakeUnicodeFont=p},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ColorSpace=void 0;var i=s(2),n=s(4),r=s(5),o=s(3);class a{constructor(t,e){this.constructor===a&&(0,i.unreachable)("Cannot initialize ColorSpace."),this.name=t,this.numComps=e}getRgb(t,e){const s=new Uint8ClampedArray(3);return this.getRgbItem(t,e,s,0),s}getRgbItem(t,e,s,n){(0,i.unreachable)("Should not call ColorSpace.getRgbItem")}getRgbBuffer(t,e,s,n,r,o,a){(0,i.unreachable)("Should not call ColorSpace.getRgbBuffer")}getOutputLength(t,e){(0,i.unreachable)("Should not call ColorSpace.getOutputLength")}isPassthrough(t){return!1}isDefaultDecode(t,e){return a.isDefaultDecode(t,this.numComps)}fillRgb(t,e,s,i,n,r,o,a,c){const h=e*s;let l=null;const u=1<<o,f=s!==n||e!==i;if(this.isPassthrough(o))l=a;else if(1===this.numComps&&h>u&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){const e=o<=8?new Uint8Array(u):new Uint16Array(u);for(let t=0;t<u;t++)e[t]=t;const s=new Uint8ClampedArray(3*u);if(this.getRgbBuffer(e,0,u,s,0,o,0),f){l=new Uint8Array(3*h);let t=0;for(let e=0;e<h;++e){const i=3*a[e];l[t++]=s[i],l[t++]=s[i+1],l[t++]=s[i+2]}}else{let e=0;for(let i=0;i<h;++i){const n=3*a[i];t[e++]=s[n],t[e++]=s[n+1],t[e++]=s[n+2],e+=c}}}else f?(l=new Uint8ClampedArray(3*h),this.getRgbBuffer(a,0,h,l,0,o,0)):this.getRgbBuffer(a,0,i*r,t,0,o,c);if(l)if(f)!function(t,e,s,i,n,r,o){o=1!==o?0:o;const a=s/n,c=i/r;let h,l=0;const u=new Uint16Array(n),f=3*s;for(let t=0;t<n;t++)u[t]=3*Math.floor(t*a);for(let s=0;s<r;s++){const i=Math.floor(s*c)*f;for(let s=0;s<n;s++)h=i+u[s],e[l++]=t[h++],e[l++]=t[h++],e[l++]=t[h++],l+=o}}(l,t,e,s,i,n,c);else{let e=0,s=0;for(let n=0,o=i*r;n<o;n++)t[e++]=l[s++],t[e++]=l[s++],t[e++]=l[s++],e+=c}}get usesZeroToOneRange(){return(0,i.shadow)(this,"usesZeroToOneRange",!0)}static _cache(t,e,s,i){if(!s)throw new Error('ColorSpace._cache - expected "localColorSpaceCache" argument.');if(!i)throw new Error('ColorSpace._cache - expected "parsedColorSpace" argument.');let r,o;t instanceof n.Ref&&(o=t,t=e.fetch(t)),t instanceof n.Name&&(r=t.name),(r||o)&&s.set(r,o,i)}static getCached(t,e,s){if(!s)throw new Error('ColorSpace.getCached - expected "localColorSpaceCache" argument.');if(t instanceof n.Ref){const i=s.getByRef(t);if(i)return i;try{t=e.fetch(t)}catch(t){if(t instanceof o.MissingDataException)throw t}}if(t instanceof n.Name){const e=s.getByName(t.name);if(e)return e}return null}static async parseAsync({cs:t,xref:e,resources:s=null,pdfFunctionFactory:i,localColorSpaceCache:n}){const r=this._parse(t,e,s,i);return this._cache(t,e,n,r),r}static parse({cs:t,xref:e,resources:s=null,pdfFunctionFactory:i,localColorSpaceCache:n}){const r=this.getCached(t,e,n);if(r)return r;const o=this._parse(t,e,s,i);return this._cache(t,e,n,o),o}static _parse(t,e,s=null,r){if((t=e.fetchIfRef(t))instanceof n.Name)switch(t.name){case"G":case"DeviceGray":return this.singletons.gray;case"RGB":case"DeviceRGB":return this.singletons.rgb;case"CMYK":case"DeviceCMYK":return this.singletons.cmyk;case"Pattern":return new h(null);default:if(s instanceof n.Dict){const i=s.get("ColorSpace");if(i instanceof n.Dict){const o=i.get(t.name);if(o){if(o instanceof n.Name)return this._parse(o,e,s,r);t=o;break}}}throw new i.FormatError(`Unrecognized ColorSpace: ${t.name}`)}if(Array.isArray(t)){const n=e.fetchIfRef(t[0]).name;let o,a,u,f,d,w;switch(n){case"G":case"DeviceGray":return this.singletons.gray;case"RGB":case"DeviceRGB":return this.singletons.rgb;case"CMYK":case"DeviceCMYK":return this.singletons.cmyk;case"CalGray":return o=e.fetchIfRef(t[1]),f=o.getArray("WhitePoint"),d=o.getArray("BlackPoint"),w=o.get("Gamma"),new p(f,d,w);case"CalRGB":o=e.fetchIfRef(t[1]),f=o.getArray("WhitePoint"),d=o.getArray("BlackPoint"),w=o.getArray("Gamma");const b=o.getArray("Matrix");return new g(f,d,w,b);case"ICCBased":const y=e.fetchIfRef(t[1]).dict;a=y.get("N");const A=y.get("Alternate");if(A){const t=this._parse(A,e,s,r);if(t.numComps===a)return t;(0,i.warn)("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===a)return this.singletons.gray;if(3===a)return this.singletons.rgb;if(4===a)return this.singletons.cmyk;break;case"Pattern":return u=t[1]||null,u&&(u=this._parse(u,e,s,r)),new h(u);case"I":case"Indexed":u=this._parse(t[1],e,s,r);const v=e.fetchIfRef(t[2])+1,x=e.fetchIfRef(t[3]);return new l(u,v,x);case"Separation":case"DeviceN":const k=e.fetchIfRef(t[1]);a=Array.isArray(k)?k.length:1,u=this._parse(t[2],e,s,r);const S=r.create(t[3]);return new c(a,u,S);case"Lab":o=e.fetchIfRef(t[1]),f=o.getArray("WhitePoint"),d=o.getArray("BlackPoint");const M=o.getArray("Range");return new m(f,d,M);default:throw new i.FormatError(`Unimplemented ColorSpace object: ${n}`)}}throw new i.FormatError(`Unrecognized ColorSpace object: ${t}`)}static isDefaultDecode(t,e){if(!Array.isArray(t))return!0;if(2*e!==t.length)return(0,i.warn)("The decode map is not the correct length"),!0;for(let e=0,s=t.length;e<s;e+=2)if(0!==t[e]||1!==t[e+1])return!1;return!0}static get singletons(){return(0,i.shadow)(this,"singletons",{get gray(){return(0,i.shadow)(this,"gray",new u)},get rgb(){return(0,i.shadow)(this,"rgb",new f)},get cmyk(){return(0,i.shadow)(this,"cmyk",new d)}})}}e.ColorSpace=a;class c extends a{constructor(t,e,s){super("Alternate",t),this.base=e,this.tintFn=s,this.tmpBuf=new Float32Array(e.numComps)}getRgbItem(t,e,s,i){const n=this.tmpBuf;this.tintFn(t,e,n,0),this.base.getRgbItem(n,0,s,i)}getRgbBuffer(t,e,s,i,n,r,o){const a=this.tintFn,c=this.base,h=1/((1<<r)-1),l=c.numComps,u=c.usesZeroToOneRange,f=(c.isPassthrough(8)||!u)&&0===o;let d=f?n:0;const p=f?i:new Uint8ClampedArray(l*s),g=this.numComps,m=new Float32Array(g),w=new Float32Array(l);let b,y;for(b=0;b<s;b++){for(y=0;y<g;y++)m[y]=t[e++]*h;if(a(m,0,w,0),u)for(y=0;y<l;y++)p[d++]=255*w[y];else c.getRgbItem(w,0,p,d),d+=l}f||c.getRgbBuffer(p,0,s,i,n,8,o)}getOutputLength(t,e){return this.base.getOutputLength(t*this.base.numComps/this.numComps,e)}}class h extends a{constructor(t){super("Pattern",null),this.base=t}isDefaultDecode(t,e){(0,i.unreachable)("Should not call PatternCS.isDefaultDecode")}}class l extends a{constructor(t,e,s){super("Indexed",1),this.base=t,this.highVal=e;const n=t.numComps*e;if(this.lookup=new Uint8Array(n),s instanceof r.BaseStream){const t=s.getBytes(n);this.lookup.set(t)}else{if("string"!=typeof s)throw new i.FormatError(`IndexedCS - unrecognized lookup table: ${s}`);for(let t=0;t<n;++t)this.lookup[t]=255&s.charCodeAt(t)}}getRgbItem(t,e,s,i){this.base.getRgbBuffer(this.lookup,t[e]*this.base.numComps,1,s,i,8,0)}getRgbBuffer(t,e,s,i,n,r,o){const a=this.base,c=a.numComps,h=a.getOutputLength(c,o),l=this.lookup;for(let r=0;r<s;++r){const s=t[e++]*c;a.getRgbBuffer(l,s,1,i,n,8,o),n+=h}}getOutputLength(t,e){return this.base.getOutputLength(t*this.base.numComps,e)}isDefaultDecode(t,e){return!Array.isArray(t)||(2!==t.length?((0,i.warn)("Decode map length is not correct"),!0):!Number.isInteger(e)||e<1?((0,i.warn)("Bits per component is not correct"),!0):0===t[0]&&t[1]===(1<<e)-1)}}class u extends a{constructor(){super("DeviceGray",1)}getRgbItem(t,e,s,i){s[i]=s[i+1]=s[i+2]=255*t[e]}getRgbBuffer(t,e,s,i,n,r,o){const a=255/((1<<r)-1);let c=e,h=n;for(let e=0;e<s;++e){const e=a*t[c++];i[h++]=e,i[h++]=e,i[h++]=e,h+=o}}getOutputLength(t,e){return t*(3+e)}}class f extends a{constructor(){super("DeviceRGB",3)}getRgbItem(t,e,s,i){s[i]=255*t[e],s[i+1]=255*t[e+1],s[i+2]=255*t[e+2]}getRgbBuffer(t,e,s,i,n,r,o){if(8===r&&0===o)return void i.set(t.subarray(e,e+3*s),n);const a=255/((1<<r)-1);let c=e,h=n;for(let e=0;e<s;++e)i[h++]=a*t[c++],i[h++]=a*t[c++],i[h++]=a*t[c++],h+=o}getOutputLength(t,e){return t*(3+e)/3|0}isPassthrough(t){return 8===t}}class d extends a{constructor(){super("DeviceCMYK",4)}#Pi(t,e,s,i,n){const r=t[e]*s,o=t[e+1]*s,a=t[e+2]*s,c=t[e+3]*s;i[n]=255+r*(-4.387332384609988*r+54.48615194189176*o+18.82290502165302*a+212.25662451639585*c-285.2331026137004)+o*(1.7149763477362134*o-5.6096736904047315*a+-17.873870861415444*c-5.497006427196366)+a*(-2.5217340131683033*a-21.248923337353073*c+17.5119270841813)+c*(-21.86122147463605*c-189.48180835922747),i[n+1]=255+r*(8.841041422036149*r+60.118027045597366*o+6.871425592049007*a+31.159100130055922*c-79.2970844816548)+o*(-15.310361306967817*o+17.575251261109482*a+131.35250912493976*c-190.9453302588951)+a*(4.444339102852739*a+9.8632861493405*c-24.86741582555878)+c*(-20.737325471181034*c-187.80453709719578),i[n+2]=255+r*(.8842522430003296*r+8.078677503112928*o+30.89978309703729*a-.23883238689178934*c-14.183576799673286)+o*(10.49593273432072*o+63.02378494754052*a+50.606957656360734*c-112.23884253719248)+a*(.03296041114873217*a+115.60384449646641*c-193.58209356861505)+c*(-22.33816807309886*c-180.12613974708367)}getRgbItem(t,e,s,i){this.#Pi(t,e,1,s,i)}getRgbBuffer(t,e,s,i,n,r,o){const a=1/((1<<r)-1);for(let r=0;r<s;r++)this.#Pi(t,e,a,i,n),e+=4,n+=3+o}getOutputLength(t,e){return t/4*(3+e)|0}}class p extends a{constructor(t,e,s){if(super("CalGray",1),!t)throw new i.FormatError("WhitePoint missing - required for color space CalGray");if([this.XW,this.YW,this.ZW]=t,[this.XB,this.YB,this.ZB]=e||[0,0,0],this.G=s||1,this.XW<0||this.ZW<0||1!==this.YW)throw new i.FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`);(this.XB<0||this.YB<0||this.ZB<0)&&((0,i.info)(`Invalid BlackPoint for ${this.name}, falling back to default.`),this.XB=this.YB=this.ZB=0),0===this.XB&&0===this.YB&&0===this.ZB||(0,i.warn)(`${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ZB: ${this.ZB}, only default values are supported.`),this.G<1&&((0,i.info)(`Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`),this.G=1)}#Pi(t,e,s,i,n){const r=Math.max(295.8*(this.YW*(t[e]*n)**this.G)**.3333333333333333-40.8,0);s[i]=r,s[i+1]=r,s[i+2]=r}getRgbItem(t,e,s,i){this.#Pi(t,e,s,i,1)}getRgbBuffer(t,e,s,i,n,r,o){const a=1/((1<<r)-1);for(let r=0;r<s;++r)this.#Pi(t,e,i,n,a),e+=1,n+=3+o}getOutputLength(t,e){return t*(3+e)}}class g extends a{static#Ri=new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]);static#Ni=new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867]);static#Li=new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252]);static#Bi=new Float32Array([1,1,1]);static#$i=new Float32Array(3);static#Ui=new Float32Array(3);static#ji=new Float32Array(3);static#Hi=(24/116)**3/8;constructor(t,e,s,n){if(super("CalRGB",3),!t)throw new i.FormatError("WhitePoint missing - required for color space CalRGB");const[r,o,a]=this.whitePoint=t,[c,h,l]=this.blackPoint=e||new Float32Array(3);if([this.GR,this.GG,this.GB]=s||new Float32Array([1,1,1]),[this.MXA,this.MYA,this.MZA,this.MXB,this.MYB,this.MZB,this.MXC,this.MYC,this.MZC]=n||new Float32Array([1,0,0,0,1,0,0,0,1]),r<0||a<0||1!==o)throw new i.FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`);(c<0||h<0||l<0)&&((0,i.info)(`Invalid BlackPoint for ${this.name} [${c}, ${h}, ${l}], falling back to default.`),this.blackPoint=new Float32Array(3)),(this.GR<0||this.GG<0||this.GB<0)&&((0,i.info)(`Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ${this.name}, falling back to default.`),this.GR=this.GG=this.GB=1)}#Gi(t,e,s){s[0]=t[0]*e[0]+t[1]*e[1]+t[2]*e[2],s[1]=t[3]*e[0]+t[4]*e[1]+t[5]*e[2],s[2]=t[6]*e[0]+t[7]*e[1]+t[8]*e[2]}#qi(t,e,s){s[0]=1*e[0]/t[0],s[1]=1*e[1]/t[1],s[2]=1*e[2]/t[2]}#Xi(t,e,s){s[0]=.95047*e[0]/t[0],s[1]=1*e[1]/t[1],s[2]=1.08883*e[2]/t[2]}#Wi(t){return t<=.0031308?this.#zi(0,1,12.92*t):t>=.99554525?1:this.#zi(0,1,1.055*t**(1/2.4)-.055)}#zi(t,e,s){return Math.max(t,Math.min(e,s))}#Vi(t){return t<0?-this.#Vi(-t):t>8?((t+16)/116)**3:t*g.#Hi}#Ki(t,e,s){if(0===t[0]&&0===t[1]&&0===t[2])return s[0]=e[0],s[1]=e[1],void(s[2]=e[2]);const i=this.#Vi(0),n=(1-i)/(1-this.#Vi(t[0])),r=(1-i)/(1-this.#Vi(t[1])),o=1-r,a=(1-i)/(1-this.#Vi(t[2])),c=1-a;s[0]=e[0]*n+(1-n),s[1]=e[1]*r+o,s[2]=e[2]*a+c}#Ji(t,e,s){if(1===t[0]&&1===t[2])return s[0]=e[0],s[1]=e[1],void(s[2]=e[2]);const i=s;this.#Gi(g.#Ri,e,i);const n=g.#$i;this.#qi(t,i,n),this.#Gi(g.#Ni,n,s)}#Yi(t,e,s){const i=s;this.#Gi(g.#Ri,e,i);const n=g.#$i;this.#Xi(t,i,n),this.#Gi(g.#Ni,n,s)}#Pi(t,e,s,i,n){const r=this.#zi(0,1,t[e]*n),o=this.#zi(0,1,t[e+1]*n),a=this.#zi(0,1,t[e+2]*n),c=1===r?1:r**this.GR,h=1===o?1:o**this.GG,l=1===a?1:a**this.GB,u=this.MYA*c+this.MYB*h+this.MYC*l,f=this.MZA*c+this.MZB*h+this.MZC*l,d=g.#Ui;d[0]=this.MXA*c+this.MXB*h+this.MXC*l,d[1]=u,d[2]=f;const p=g.#ji;this.#Ji(this.whitePoint,d,p);const m=g.#Ui;this.#Ki(this.blackPoint,p,m);const w=g.#ji;this.#Yi(g.#Bi,m,w);const b=g.#Ui;this.#Gi(g.#Li,w,b),s[i]=255*this.#Wi(b[0]),s[i+1]=255*this.#Wi(b[1]),s[i+2]=255*this.#Wi(b[2])}getRgbItem(t,e,s,i){this.#Pi(t,e,s,i,1)}getRgbBuffer(t,e,s,i,n,r,o){const a=1/((1<<r)-1);for(let r=0;r<s;++r)this.#Pi(t,e,i,n,a),e+=3,n+=3+o}getOutputLength(t,e){return t*(3+e)/3|0}}class m extends a{constructor(t,e,s){if(super("Lab",3),!t)throw new i.FormatError("WhitePoint missing - required for color space Lab");if([this.XW,this.YW,this.ZW]=t,[this.amin,this.amax,this.bmin,this.bmax]=s||[-100,100,-100,100],[this.XB,this.YB,this.ZB]=e||[0,0,0],this.XW<0||this.ZW<0||1!==this.YW)throw new i.FormatError("Invalid WhitePoint components, no fallback available");(this.XB<0||this.YB<0||this.ZB<0)&&((0,i.info)("Invalid BlackPoint, falling back to default"),this.XB=this.YB=this.ZB=0),(this.amin>this.amax||this.bmin>this.bmax)&&((0,i.info)("Invalid Range, falling back to defaults"),this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100)}#Qi(t){return t>=6/29?t**3:108/841*(t-4/29)}#Zi(t,e,s,i){return s+t*(i-s)/e}#Pi(t,e,s,i,n){let r=t[e],o=t[e+1],a=t[e+2];!1!==s&&(r=this.#Zi(r,s,0,100),o=this.#Zi(o,s,this.amin,this.amax),a=this.#Zi(a,s,this.bmin,this.bmax)),o>this.amax?o=this.amax:o<this.amin&&(o=this.amin),a>this.bmax?a=this.bmax:a<this.bmin&&(a=this.bmin);const c=(r+16)/116,h=c-a/200,l=this.XW*this.#Qi(c+o/500),u=this.YW*this.#Qi(c),f=this.ZW*this.#Qi(h);let d,p,g;this.ZW<1?(d=3.1339*l+-1.617*u+-.4906*f,p=-.9785*l+1.916*u+.0333*f,g=.072*l+-.229*u+1.4057*f):(d=3.2406*l+-1.5372*u+-.4986*f,p=-.9689*l+1.8758*u+.0415*f,g=.0557*l+-.204*u+1.057*f),i[n]=255*Math.sqrt(d),i[n+1]=255*Math.sqrt(p),i[n+2]=255*Math.sqrt(g)}getRgbItem(t,e,s,i){this.#Pi(t,e,!1,s,i)}getRgbBuffer(t,e,s,i,n,r,o){const a=(1<<r)-1;for(let r=0;r<s;r++)this.#Pi(t,e,a,i,n),e+=3,n+=3+o}getOutputLength(t,e){return t*(3+e)/3|0}isDefaultDecode(t,e){return!0}get usesZeroToOneRange(){return(0,i.shadow)(this,"usesZeroToOneRange",!1)}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PartialEvaluator=e.EvaluatorPreprocessor=void 0;var i=s(2),n=s(14),r=s(4),o=s(34),a=s(37),c=s(41),h=s(50),l=s(51),u=s(42),f=s(57),d=s(16),p=s(59),g=s(8),m=s(5),w=s(60),b=s(12),y=s(18),A=s(38),v=s(61),x=s(39),k=s(45),S=s(40),M=s(62),C=s(63),_=s(64),I=s(65);const F=Object.freeze({maxImageSize:-1,disableFontFace:!1,ignoreErrors:!1,isEvalSupported:!0,isOffscreenCanvasSupported:!1,canvasMaxAreaInBytes:-1,fontExtraProperties:!1,useSystemFonts:!0,cMapUrl:null,standardFontDataUrl:null}),O=Promise.resolve();function E(t,e=!1){if(Array.isArray(t)){for(const e of t){const t=E(e,!0);if(t)return t}return(0,i.warn)(`Unsupported blend mode Array: ${t}`),"source-over"}if(!(t instanceof r.Name))return e?null:"source-over";switch(t.name){case"Normal":case"Compatible":return"source-over";case"Multiply":return"multiply";case"Screen":return"screen";case"Overlay":return"overlay";case"Darken":return"darken";case"Lighten":return"lighten";case"ColorDodge":return"color-dodge";case"ColorBurn":return"color-burn";case"HardLight":return"hard-light";case"SoftLight":return"soft-light";case"Difference":return"difference";case"Exclusion":return"exclusion";case"Hue":return"hue";case"Saturation":return"saturation";case"Color":return"color";case"Luminosity":return"luminosity"}return e?null:((0,i.warn)(`Unsupported blend mode: ${t.name}`),"source-over")}function T(t){t.fn===i.OPS.paintImageMaskXObject&&t.args[0]?.count>0&&t.args[0].count++}class D{static TIME_SLOT_DURATION_MS=20;static CHECK_TIME_EVERY=100;constructor(){this.reset()}check(){return!(++this.checked<D.CHECK_TIME_EVERY)&&(this.checked=0,this.endTime<=Date.now())}reset(){this.endTime=Date.now()+D.TIME_SLOT_DURATION_MS,this.checked=0}}class P{constructor({xref:t,handler:e,pageIndex:s,idFactory:i,fontCache:n,builtInCMapCache:r,standardFontDataCache:o,globalImageCache:a,systemFontCache:c,options:h=null}){this.xref=t,this.handler=e,this.pageIndex=s,this.idFactory=i,this.fontCache=n,this.builtInCMapCache=r,this.standardFontDataCache=o,this.globalImageCache=a,this.systemFontCache=c,this.options=h||F,this.parsingType3Font=!1,this._regionalImageCache=new p.RegionalImageCache,this._fetchBuiltInCMapBound=this.fetchBuiltInCMap.bind(this),M.ImageResizer.setMaxArea(this.options.canvasMaxAreaInBytes)}get _pdfFunctionFactory(){const t=new f.PDFFunctionFactory({xref:this.xref,isEvalSupported:this.options.isEvalSupported});return(0,i.shadow)(this,"_pdfFunctionFactory",t)}clone(t=null){const e=Object.create(this);return e.options=Object.assign(Object.create(null),this.options,t),e}hasBlendModes(t,e){if(!(t instanceof r.Dict))return!1;if(t.objId&&e.has(t.objId))return!1;const s=new r.RefSet(e);t.objId&&s.put(t.objId);const n=[t],o=this.xref;for(;n.length;){const t=n.shift(),e=t.get("ExtGState");if(e instanceof r.Dict)for(let t of e.getRawValues()){if(t instanceof r.Ref){if(s.has(t))continue;try{t=o.fetch(t)}catch(e){s.put(t),(0,i.info)(`hasBlendModes - ignoring ExtGState: "${e}".`);continue}}if(!(t instanceof r.Dict))continue;t.objId&&s.put(t.objId);const e=t.get("BM");if(e instanceof r.Name){if("Normal"!==e.name)return!0}else if(void 0!==e&&Array.isArray(e))for(const t of e)if(t instanceof r.Name&&"Normal"!==t.name)return!0}const a=t.get("XObject");if(a instanceof r.Dict)for(let t of a.getRawValues()){if(t instanceof r.Ref){if(s.has(t))continue;try{t=o.fetch(t)}catch(e){s.put(t),(0,i.info)(`hasBlendModes - ignoring XObject: "${e}".`);continue}}if(!(t instanceof m.BaseStream))continue;t.dict.objId&&s.put(t.dict.objId);const e=t.dict.get("Resources");e instanceof r.Dict&&(e.objId&&s.has(e.objId)||(n.push(e),e.objId&&s.put(e.objId)))}}for(const t of s)e.put(t);return!1}async fetchBuiltInCMap(t){const e=this.builtInCMapCache.get(t);if(e)return e;let s;if(null!==this.options.cMapUrl){const e=`${this.options.cMapUrl}${t}.bcmap`,n=await fetch(e);if(!n.ok)throw new Error(`fetchBuiltInCMap: failed to fetch file "${e}" with "${n.statusText}".`);s={cMapData:new Uint8Array(await n.arrayBuffer()),compressionType:i.CMapCompressionType.BINARY}}else s=await this.handler.sendWithPromise("FetchBuiltInCMap",{name:t});return s.compressionType!==i.CMapCompressionType.NONE&&this.builtInCMapCache.set(t,s),s}async fetchStandardFontData(t){const e=this.standardFontDataCache.get(t);if(e)return new g.Stream(e);if(this.options.useSystemFonts&&"Symbol"!==t&&"ZapfDingbats"!==t)return null;const s=(0,c.getFontNameToFileMap)()[t];let n;if(null!==this.options.standardFontDataUrl){const t=`${this.options.standardFontDataUrl}${s}`,e=await fetch(t);e.ok?n=await e.arrayBuffer():(0,i.warn)(`fetchStandardFontData: failed to fetch file "${t}" with "${e.statusText}".`)}else try{n=await this.handler.sendWithPromise("FetchStandardFontData",{filename:s})}catch(t){(0,i.warn)(`fetchStandardFontData: failed to fetch file "${s}" with "${t}".`)}return n?(this.standardFontDataCache.set(t,n),new g.Stream(n)):null}async buildFormXObject(t,e,s,n,o,a,c){const h=e.dict,l=h.getArray("Matrix");let u,f,d=h.getArray("BBox");d=Array.isArray(d)&&4===d.length?i.Util.normalizeRect(d):null,h.has("OC")&&(u=await this.parseMarkedContentProps(h.get("OC"),t)),void 0!==u&&n.addOp(i.OPS.beginMarkedContentProps,["OC",u]);const p=h.get("Group");if(p){f={matrix:l,bbox:d,smask:s,isolated:!1,knockout:!1};const e=p.get("S");let o=null;if((0,r.isName)(e,"Transparency")&&(f.isolated=p.get("I")||!1,f.knockout=p.get("K")||!1,p.has("CS"))){const e=p.getRaw("CS");o=b.ColorSpace.getCached(e,this.xref,c)||await this.parseColorSpace({cs:e,resources:t,localColorSpaceCache:c})}s?.backdrop&&(o||=b.ColorSpace.singletons.rgb,s.backdrop=o.getRgb(s.backdrop,0)),n.addOp(i.OPS.beginGroup,[f])}return n.addOp(i.OPS.paintFormXObjectBegin,p?[l,null]:[l,d]),this.getOperatorList({stream:e,task:o,resources:h.get("Resources")||t,operatorList:n,initialState:a}).then((function(){n.addOp(i.OPS.paintFormXObjectEnd,[]),p&&n.addOp(i.OPS.endGroup,[f]),void 0!==u&&n.addOp(i.OPS.endMarkedContent,[])}))}_sendImgData(t,e,s=!1){const i=e?[e.bitmap||e.data.buffer]:null;return this.parsingType3Font||s?this.handler.send("commonobj",[t,"Image",e],i):this.handler.send("obj",[t,this.pageIndex,"Image",e],i)}async buildPaintImageXObject({resources:t,image:e,isInline:s=!1,operatorList:n,cacheKey:r,localImageCache:o,localColorSpaceCache:a}){const c=e.dict,h=c.objId,l=c.get("W","Width"),u=c.get("H","Height");if(!l||"number"!=typeof l||!u||"number"!=typeof u)return void(0,i.warn)("Image dimensions are missing, or not numbers.");const f=this.options.maxImageSize;if(-1!==f&&l*u>f){const t="Image exceeded maximum allowed size and was removed.";if(this.options.ignoreErrors)return void(0,i.warn)(t);throw new Error(t)}let d,p,g;if(c.has("OC")&&(d=await this.parseMarkedContentProps(c.get("OC"),t)),c.get("IM","ImageMask")){const t=c.get("I","Interpolate"),s=e.getBytes((l+7>>3)*u),a=c.getArray("D","Decode");if(this.parsingType3Font){if(p=I.PDFImage.createRawMask({imgArray:s,width:l,height:u,imageIsFromDecodeStream:e instanceof y.DecodeStream,inverseDecode:a?.[0]>0,interpolate:t}),p.cached=!!r,g=[p],n.addImageOps(i.OPS.paintImageMaskXObject,g,d),r){const t={fn:i.OPS.paintImageMaskXObject,args:g,optionalContent:d};o.set(r,h,t),h&&this._regionalImageCache.set(null,h,t)}return}if(p=await I.PDFImage.createMask({imgArray:s,width:l,height:u,imageIsFromDecodeStream:e instanceof y.DecodeStream,inverseDecode:a?.[0]>0,interpolate:t,isOffscreenCanvasSupported:this.options.isOffscreenCanvasSupported}),p.isSingleOpaquePixel){if(n.addImageOps(i.OPS.paintSolidColorImageMask,[],d),r){const t={fn:i.OPS.paintSolidColorImageMask,args:[],optionalContent:d};o.set(r,h,t),h&&this._regionalImageCache.set(null,h,t)}return}const f=`mask_${this.idFactory.createObjId()}`;if(n.addDependency(f),this._sendImgData(f,p),g=[{data:f,width:p.width,height:p.height,interpolate:p.interpolate,count:1}],n.addImageOps(i.OPS.paintImageMaskXObject,g,d),r){const t={fn:i.OPS.paintImageMaskXObject,args:g,optionalContent:d};o.set(r,h,t),h&&this._regionalImageCache.set(null,h,t)}return}if(s&&!c.has("SMask")&&!c.has("Mask")&&l+u<200){const r=new I.PDFImage({xref:this.xref,res:t,image:e,isInline:s,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:a});return p=await r.createImageData(!0,!1),n.isOffscreenCanvasSupported=this.options.isOffscreenCanvasSupported,void n.addImageOps(i.OPS.paintInlineImageXObject,[p],d)}let m=`img_${this.idFactory.createObjId()}`,w=!1;if(this.parsingType3Font?m=`${this.idFactory.getDocId()}_type3_${m}`:h&&(w=this.globalImageCache.shouldCache(h,this.pageIndex),w&&(m=`${this.idFactory.getDocId()}_${m}`)),n.addDependency(m),g=[m,l,u],I.PDFImage.buildImage({xref:this.xref,res:t,image:e,isInline:s,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:a}).then((async t=>(p=await t.createImageData(!1,this.options.isOffscreenCanvasSupported),r&&h&&w&&this.globalImageCache.addByteSize(h,p.bitmap?p.width*p.height*4:p.data.length),this._sendImgData(m,p,w)))).catch((t=>((0,i.warn)(`Unable to decode image "${m}": "${t}".`),this._sendImgData(m,null,w)))),n.addImageOps(i.OPS.paintImageXObject,g,d),r){const t={fn:i.OPS.paintImageXObject,args:g,optionalContent:d};o.set(r,h,t),h&&(this._regionalImageCache.set(null,h,t),w&&((0,i.assert)(!s,"Cannot cache an inline image globally."),this.globalImageCache.setData(h,{objId:m,fn:i.OPS.paintImageXObject,args:g,optionalContent:d,byteSize:0})))}}handleSMask(t,e,s,i,n,r){const o=t.get("G"),a={subtype:t.get("S").name,backdrop:t.get("BC")},c=t.get("TR");if((0,f.isPDFFunction)(c)){const t=this._pdfFunctionFactory.create(c),e=new Uint8Array(256),s=new Float32Array(1);for(let i=0;i<256;i++)s[0]=i/255,t(s,0,s,0),e[i]=255*s[0]|0;a.transferMap=e}return this.buildFormXObject(e,o,a,s,i,n.state.clone(),r)}handleTransferFunction(t){let e;if(Array.isArray(t))e=t;else{if(!(0,f.isPDFFunction)(t))return null;e=[t]}const s=[];let i=0,n=0;for(const t of e){const e=this.xref.fetchIfRef(t);if(i++,(0,r.isName)(e,"Identity")){s.push(null);continue}if(!(0,f.isPDFFunction)(e))return null;const o=this._pdfFunctionFactory.create(e),a=new Uint8Array(256),c=new Float32Array(1);for(let t=0;t<256;t++)c[0]=t/255,o(c,0,c,0),a[t]=255*c[0]|0;s.push(a),n++}return 1!==i&&4!==i||0===n?null:s}handleTilingType(t,e,s,n,o,a,c,l){const u=new _.OperatorList,f=r.Dict.merge({xref:this.xref,dictArray:[o.get("Resources"),s]});return this.getOperatorList({stream:n,task:c,resources:f,operatorList:u}).then((function(){const s=u.getIR(),i=(0,h.getTilingPatternIR)(s,o,e);a.addDependencies(u.dependencies),a.addOp(t,i),o.objId&&l.set(null,o.objId,{operatorListIR:s,dict:o})})).catch((t=>{if(!(t instanceof i.AbortException)){if(!this.options.ignoreErrors)throw t;(0,i.warn)(`handleTilingType - ignoring pattern: "${t}".`)}}))}handleSetFont(t,e,s,i,n,a,c=null,h=null){return this.loadFont(e?.[0]instanceof r.Name?e[0].name:null,s,t,c,h).then((e=>e.font.isType3Font?e.loadType3Data(this,t,n).then((function(){return i.addDependencies(e.type3Dependencies),e})).catch((t=>new R({loadedName:"g_font_error",font:new o.ErrorFont(`Type3 font load error: ${t}`),dict:e.font,evaluatorOptions:this.options}))):e)).then((t=>(a.font=t.font,t.send(this.handler),t.loadedName)))}handleText(t,e){const s=e.font,n=s.charsToGlyphs(t);return s.data&&(e.textRenderingMode&i.TextRenderingMode.ADD_TO_PATH_FLAG||"Pattern"===e.fillColorSpace.name||s.disableFontFace||this.options.disableFontFace)&&P.buildFontPaths(s,n,this.handler,this.options),n}ensureStateFont(t){if(t.font)return;const e=new i.FormatError("Missing setFont (Tf) operator before text rendering operator.");if(!this.options.ignoreErrors)throw e;(0,i.warn)(`ensureStateFont: "${e}".`)}async setGState({resources:t,gState:e,operatorList:s,cacheKey:n,task:o,stateManager:a,localGStateCache:c,localColorSpaceCache:h}){const l=e.objId;let u=!0;const f=[];let d=Promise.resolve();for(const n of e.getKeys()){const c=e.get(n);switch(n){case"Type":break;case"LW":case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":f.push([n,c]);break;case"Font":u=!1,d=d.then((()=>this.handleSetFont(t,null,c[0],s,o,a.state).then((function(t){s.addDependency(t),f.push([n,[t,c[1]]])}))));break;case"BM":f.push([n,E(c)]);break;case"SMask":if((0,r.isName)(c,"None")){f.push([n,!1]);break}c instanceof r.Dict?(u=!1,d=d.then((()=>this.handleSMask(c,t,s,o,a,h))),f.push([n,!0])):(0,i.warn)("Unsupported SMask type");break;case"TR":const e=this.handleTransferFunction(c);f.push([n,e]);break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":(0,i.info)("graphic state operator "+n);break;default:(0,i.info)("Unknown graphic state operator "+n)}}return d.then((function(){f.length>0&&s.addOp(i.OPS.setGState,[f]),u&&c.set(n,l,f)}))}loadFont(t,e,s,n=null,a=null){const c=async()=>new R({loadedName:"g_font_error",font:new o.ErrorFont(`Font "${t}" is not available.`),dict:e,evaluatorOptions:this.options});let h;if(e)e instanceof r.Ref&&(h=e);else{const e=s.get("Font");e&&(h=e.getRaw(t))}if(h){if(this.parsingType3Font&&this.type3FontRefs.has(h))return c();if(this.fontCache.has(h))return this.fontCache.get(h);e=this.xref.fetchIfRef(h)}if(!(e instanceof r.Dict)){if(!this.options.ignoreErrors&&!this.parsingType3Font)return(0,i.warn)(`Font "${t}" is not available.`),c();(0,i.warn)(`Font "${t}" is not available -- attempting to fallback to a default font.`),e=n||P.fallbackFontDict}if(e.cacheKey&&this.fontCache.has(e.cacheKey))return this.fontCache.get(e.cacheKey);const l=new i.PromiseCapability;let u;try{u=this.preEvaluateFont(e),u.cssFontInfo=a}catch(t){return(0,i.warn)(`loadFont - preEvaluateFont failed: "${t}".`),c()}const{descriptor:f,hash:d}=u,p=h instanceof r.Ref;let g;if(d&&f instanceof r.Dict){const t=f.fontAliases||=Object.create(null);if(t[d]){const e=t[d].aliasRef;if(p&&e&&this.fontCache.has(e))return this.fontCache.putAlias(h,e),this.fontCache.get(h)}else t[d]={fontID:this.idFactory.createFontId()};p&&(t[d].aliasRef=h),g=t[d].fontID}else g=this.idFactory.createFontId();return(0,i.assert)(g?.startsWith("f"),'The "fontID" must be (correctly) defined.'),p?this.fontCache.put(h,l.promise):(e.cacheKey=`cacheKey_${g}`,this.fontCache.put(e.cacheKey,l.promise)),e.loadedName=`${this.idFactory.getDocId()}_${g}`,this.translateFont(u).then((t=>{l.resolve(new R({loadedName:e.loadedName,font:t,dict:e,evaluatorOptions:this.options}))})).catch((t=>{(0,i.warn)(`loadFont - translateFont failed: "${t}".`),l.resolve(new R({loadedName:e.loadedName,font:new o.ErrorFont(t instanceof Error?t.message:t),dict:e,evaluatorOptions:this.options}))})),l.promise}buildPath(t,e,s,n=!1){const r=t.length-1;if(s||(s=[]),r<0||t.fnArray[r]!==i.OPS.constructPath){let r;switch(n&&((0,i.warn)(`Encountered path operator "${e}" inside of a text object.`),t.addOp(i.OPS.save,null)),e){case i.OPS.rectangle:const t=s[0]+s[2],e=s[1]+s[3];r=[Math.min(s[0],t),Math.max(s[0],t),Math.min(s[1],e),Math.max(s[1],e)];break;case i.OPS.moveTo:case i.OPS.lineTo:r=[s[0],s[0],s[1],s[1]];break;default:r=[1/0,-1/0,1/0,-1/0]}t.addOp(i.OPS.constructPath,[[e],s,r]),n&&t.addOp(i.OPS.restore,null)}else{const n=t.argsArray[r];n[0].push(e),n[1].push(...s);const o=n[2];switch(e){case i.OPS.rectangle:const t=s[0]+s[2],e=s[1]+s[3];o[0]=Math.min(o[0],s[0],t),o[1]=Math.max(o[1],s[0],t),o[2]=Math.min(o[2],s[1],e),o[3]=Math.max(o[3],s[1],e);break;case i.OPS.moveTo:case i.OPS.lineTo:o[0]=Math.min(o[0],s[0]),o[1]=Math.max(o[1],s[0]),o[2]=Math.min(o[2],s[1]),o[3]=Math.max(o[3],s[1])}}}parseColorSpace({cs:t,resources:e,localColorSpaceCache:s}){return b.ColorSpace.parseAsync({cs:t,xref:this.xref,resources:e,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:s}).catch((t=>{if(t instanceof i.AbortException)return null;if(this.options.ignoreErrors)return(0,i.warn)(`parseColorSpace - ignoring ColorSpace: "${t}".`),null;throw t}))}parseShading({shading:t,resources:e,localColorSpaceCache:s,localShadingPatternCache:i}){let n=i.get(t);if(!n){const r=h.Pattern.parseShading(t,this.xref,e,this._pdfFunctionFactory,s).getIR();n=`pattern_${this.idFactory.createObjId()}`,this.parsingType3Font&&(n=`${this.idFactory.getDocId()}_type3_${n}`),i.set(t,n),this.parsingType3Font?this.handler.send("commonobj",[n,"Pattern",r]):this.handler.send("obj",[n,this.pageIndex,"Pattern",r])}return n}handleColorN(t,e,s,n,o,a,c,l,u,f){const d=s.pop();if(d instanceof r.Name){const p=o.getRaw(d.name),g=p instanceof r.Ref&&u.getByRef(p);if(g)try{const i=n.base?n.base.getRgb(s,0):null,r=(0,h.getTilingPatternIR)(g.operatorListIR,g.dict,i);return void t.addOp(e,r)}catch{}const w=this.xref.fetchIfRef(p);if(w){const r=w instanceof m.BaseStream?w.dict:w,o=r.get("PatternType");if(1===o){const i=n.base?n.base.getRgb(s,0):null;return this.handleTilingType(e,i,a,w,r,t,c,u)}if(2===o){const s=r.get("Shading"),i=r.getArray("Matrix"),n=this.parseShading({shading:s,resources:a,localColorSpaceCache:l,localShadingPatternCache:f});return void t.addOp(e,["Shading",n,i])}throw new i.FormatError(`Unknown PatternType: ${o}`)}}throw new i.FormatError(`Unknown PatternName: ${d}`)}_parseVisibilityExpression(t,e,s){if(++e>10)return void(0,i.warn)("Visibility expression is too deeply nested");const n=t.length,o=this.xref.fetchIfRef(t[0]);if(!(n<2)&&o instanceof r.Name){switch(o.name){case"And":case"Or":case"Not":s.push(o.name);break;default:return void(0,i.warn)(`Invalid operator ${o.name} in visibility expression`)}for(let i=1;i<n;i++){const n=t[i],o=this.xref.fetchIfRef(n);if(Array.isArray(o)){const t=[];s.push(t),this._parseVisibilityExpression(o,e,t)}else n instanceof r.Ref&&s.push(n.toString())}}else(0,i.warn)("Invalid visibility expression")}async parseMarkedContentProps(t,e){let s;if(t instanceof r.Name)s=e.get("Properties").get(t.name);else{if(!(t instanceof r.Dict))throw new i.FormatError("Optional content properties malformed.");s=t}const n=s.get("Type")?.name;if("OCG"===n)return{type:n,id:s.objId};if("OCMD"===n){const t=s.get("VE");if(Array.isArray(t)){const e=[];if(this._parseVisibilityExpression(t,0,e),e.length>0)return{type:"OCMD",expression:e}}const e=s.get("OCGs");if(Array.isArray(e)||e instanceof r.Dict){const t=[];if(Array.isArray(e))for(const s of e)t.push(s.toString());else t.push(e.objId);return{type:n,ids:t,policy:s.get("P")instanceof r.Name?s.get("P").name:null,expression:null}}if(e instanceof r.Ref)return{type:n,id:e.toString()}}return null}getOperatorList({stream:t,task:e,resources:s,operatorList:n,initialState:o=null,fallbackFontDict:a=null}){if(s||=r.Dict.empty,o||=new B,!n)throw new Error('getOperatorList: missing "operatorList" parameter');const c=this,h=this.xref;let l=!1;const u=new p.LocalImageCache,f=new p.LocalColorSpaceCache,d=new p.LocalGStateCache,g=new p.LocalTilingPatternCache,w=new Map,y=s.get("XObject")||r.Dict.empty,A=s.get("Pattern")||r.Dict.empty,v=new N(o),x=new $(t,h,v),k=new D;function S(){for(let t=0,e=x.savedStatesDepth;t<e;t++)n.addOp(i.OPS.restore,[])}return new Promise((function t(o,p){const M=function(e){Promise.all([e,n.ready]).then((function(){try{t(o,p)}catch(t){p(t)}}),p)};e.ensureNotTerminated(),k.reset();const C={};let _,I,F,E,D,P;for(;!(_=k.check())&&(C.args=null,x.read(C));){let t=C.args,o=C.fn;switch(0|o){case i.OPS.paintXObject:if(P=t[0]instanceof r.Name,D=t[0].name,P){const e=u.getByName(D);if(e){n.addImageOps(e.fn,e.args,e.optionalContent),T(e),t=null;continue}}return void M(new Promise((function(t,o){if(!P)throw new i.FormatError("XObject must be referred to by name.");let a=y.getRaw(D);if(a instanceof r.Ref){const e=u.getByRef(a)||c._regionalImageCache.getByRef(a);if(e)return n.addImageOps(e.fn,e.args,e.optionalContent),T(e),void t();const s=c.globalImageCache.getData(a,c.pageIndex);if(s)return n.addDependency(s.objId),n.addImageOps(s.fn,s.args,s.optionalContent),void t();a=h.fetch(a)}if(!(a instanceof m.BaseStream))throw new i.FormatError("XObject should be a stream");const l=a.dict.get("Subtype");if(!(l instanceof r.Name))throw new i.FormatError("XObject should have a Name subtype");if("Form"===l.name)return v.save(),void c.buildFormXObject(s,a,null,n,e,v.state.clone(),f).then((function(){v.restore(),t()}),o);if("Image"!==l.name){if("PS"!==l.name)throw new i.FormatError(`Unhandled XObject subtype ${l.name}`);(0,i.info)("Ignored XObject subtype PS"),t()}else c.buildPaintImageXObject({resources:s,image:a,operatorList:n,cacheKey:D,localImageCache:u,localColorSpaceCache:f}).then(t,o)})).catch((function(t){if(!(t instanceof i.AbortException)){if(!c.options.ignoreErrors)throw t;(0,i.warn)(`getOperatorList - ignoring XObject: "${t}".`)}})));case i.OPS.setFont:var R=t[1];return void M(c.handleSetFont(s,t,null,n,e,v.state,a).then((function(t){n.addDependency(t),n.addOp(i.OPS.setFont,[t,R])})));case i.OPS.beginText:l=!0;break;case i.OPS.endText:l=!1;break;case i.OPS.endInlineImage:var N=t[0].cacheKey;if(N){const e=u.getByName(N);if(e){n.addImageOps(e.fn,e.args,e.optionalContent),T(e),t=null;continue}}return void M(c.buildPaintImageXObject({resources:s,image:t[0],isInline:!0,operatorList:n,cacheKey:N,localImageCache:u,localColorSpaceCache:f}));case i.OPS.showText:if(!v.state.font){c.ensureStateFont(v.state);continue}t[0]=c.handleText(t[0],v.state);break;case i.OPS.showSpacedText:if(!v.state.font){c.ensureStateFont(v.state);continue}var L=[],B=v.state;for(const e of t[0])"string"==typeof e?L.push(...c.handleText(e,B)):"number"==typeof e&&L.push(e);t[0]=L,o=i.OPS.showText;break;case i.OPS.nextLineShowText:if(!v.state.font){c.ensureStateFont(v.state);continue}n.addOp(i.OPS.nextLine),t[0]=c.handleText(t[0],v.state),o=i.OPS.showText;break;case i.OPS.nextLineSetSpacingShowText:if(!v.state.font){c.ensureStateFont(v.state);continue}n.addOp(i.OPS.nextLine),n.addOp(i.OPS.setWordSpacing,[t.shift()]),n.addOp(i.OPS.setCharSpacing,[t.shift()]),t[0]=c.handleText(t[0],v.state),o=i.OPS.showText;break;case i.OPS.setTextRenderingMode:v.state.textRenderingMode=t[0];break;case i.OPS.setFillColorSpace:{const e=b.ColorSpace.getCached(t[0],h,f);if(e){v.state.fillColorSpace=e;continue}return void M(c.parseColorSpace({cs:t[0],resources:s,localColorSpaceCache:f}).then((function(t){t&&(v.state.fillColorSpace=t)})))}case i.OPS.setStrokeColorSpace:{const e=b.ColorSpace.getCached(t[0],h,f);if(e){v.state.strokeColorSpace=e;continue}return void M(c.parseColorSpace({cs:t[0],resources:s,localColorSpaceCache:f}).then((function(t){t&&(v.state.strokeColorSpace=t)})))}case i.OPS.setFillColor:E=v.state.fillColorSpace,t=E.getRgb(t,0),o=i.OPS.setFillRGBColor;break;case i.OPS.setStrokeColor:E=v.state.strokeColorSpace,t=E.getRgb(t,0),o=i.OPS.setStrokeRGBColor;break;case i.OPS.setFillGray:v.state.fillColorSpace=b.ColorSpace.singletons.gray,t=b.ColorSpace.singletons.gray.getRgb(t,0),o=i.OPS.setFillRGBColor;break;case i.OPS.setStrokeGray:v.state.strokeColorSpace=b.ColorSpace.singletons.gray,t=b.ColorSpace.singletons.gray.getRgb(t,0),o=i.OPS.setStrokeRGBColor;break;case i.OPS.setFillCMYKColor:v.state.fillColorSpace=b.ColorSpace.singletons.cmyk,t=b.ColorSpace.singletons.cmyk.getRgb(t,0),o=i.OPS.setFillRGBColor;break;case i.OPS.setStrokeCMYKColor:v.state.strokeColorSpace=b.ColorSpace.singletons.cmyk,t=b.ColorSpace.singletons.cmyk.getRgb(t,0),o=i.OPS.setStrokeRGBColor;break;case i.OPS.setFillRGBColor:v.state.fillColorSpace=b.ColorSpace.singletons.rgb,t=b.ColorSpace.singletons.rgb.getRgb(t,0);break;case i.OPS.setStrokeRGBColor:v.state.strokeColorSpace=b.ColorSpace.singletons.rgb,t=b.ColorSpace.singletons.rgb.getRgb(t,0);break;case i.OPS.setFillColorN:if(E=v.state.fillColorSpace,"Pattern"===E.name)return void M(c.handleColorN(n,i.OPS.setFillColorN,t,E,A,s,e,f,g,w));t=E.getRgb(t,0),o=i.OPS.setFillRGBColor;break;case i.OPS.setStrokeColorN:if(E=v.state.strokeColorSpace,"Pattern"===E.name)return void M(c.handleColorN(n,i.OPS.setStrokeColorN,t,E,A,s,e,f,g,w));t=E.getRgb(t,0),o=i.OPS.setStrokeRGBColor;break;case i.OPS.shadingFill:var $=s.get("Shading");if(!$)throw new i.FormatError("No shading resource found");var U=$.get(t[0].name);if(!U)throw new i.FormatError("No shading object found");t=[c.parseShading({shading:U,resources:s,localColorSpaceCache:f,localShadingPatternCache:w})],o=i.OPS.shadingFill;break;case i.OPS.setGState:if(P=t[0]instanceof r.Name,D=t[0].name,P){const e=d.getByName(D);if(e){e.length>0&&n.addOp(i.OPS.setGState,[e]),t=null;continue}}return void M(new Promise((function(t,o){if(!P)throw new i.FormatError("GState must be referred to by name.");const a=s.get("ExtGState");if(!(a instanceof r.Dict))throw new i.FormatError("ExtGState should be a dictionary.");const h=a.get(D);if(!(h instanceof r.Dict))throw new i.FormatError("GState should be a dictionary.");c.setGState({resources:s,gState:h,operatorList:n,cacheKey:D,task:e,stateManager:v,localGStateCache:d,localColorSpaceCache:f}).then(t,o)})).catch((function(t){if(!(t instanceof i.AbortException)){if(!c.options.ignoreErrors)throw t;(0,i.warn)(`getOperatorList - ignoring ExtGState: "${t}".`)}})));case i.OPS.moveTo:case i.OPS.lineTo:case i.OPS.curveTo:case i.OPS.curveTo2:case i.OPS.curveTo3:case i.OPS.closePath:case i.OPS.rectangle:c.buildPath(n,o,t,l);continue;case i.OPS.markPoint:case i.OPS.markPointProps:case i.OPS.beginCompat:case i.OPS.endCompat:continue;case i.OPS.beginMarkedContentProps:if(!(t[0]instanceof r.Name)){(0,i.warn)(`Expected name for beginMarkedContentProps arg0=${t[0]}`);continue}if("OC"===t[0].name)return void M(c.parseMarkedContentProps(t[1],s).then((t=>{n.addOp(i.OPS.beginMarkedContentProps,["OC",t])})).catch((t=>{if(!(t instanceof i.AbortException)){if(!c.options.ignoreErrors)throw t;(0,i.warn)(`getOperatorList - ignoring beginMarkedContentProps: "${t}".`)}})));t=[t[0].name,t[1]instanceof r.Dict?t[1].get("MCID"):null];break;default:if(null!==t){for(I=0,F=t.length;I<F&&!(t[I]instanceof r.Dict);I++);if(I<F){(0,i.warn)("getOperatorList - ignoring operator: "+o);continue}}}n.addOp(o,t)}_?M(O):(S(),o())})).catch((t=>{if(!(t instanceof i.AbortException)){if(this.options.ignoreErrors)return(0,i.warn)(`getOperatorList - ignoring errors during "${e.name}" task: "${t}".`),void S();throw t}}))}getTextContent({stream:t,task:e,resources:s,stateManager:n=null,includeMarkedContent:o=!1,sink:a,seenStyles:c=new Set,viewBox:h,markedContentData:l=null,disableNormalization:u=!1}){s||=r.Dict.empty,n||=new N(new L),o&&(l||={level:0});const f={items:[],styles:Object.create(null)},d={initialized:!1,str:[],totalWidth:0,totalHeight:0,width:0,height:0,vertical:!1,prevTransform:null,textAdvanceScale:0,spaceInFlowMin:0,spaceInFlowMax:0,trackingSpaceMin:1/0,negativeSpaceMax:-1/0,notASpace:-1/0,transform:null,fontName:null,hasEOL:!1},g=[" "," "];let b=0;function y(t){const e=(b+1)%2,s=" "!==g[b]&&" "===g[e];return g[b]=t,b=e,s}function A(){return" "!==g[b]&&" "===g[(b+1)%2]}function v(){g[0]=g[1]=" ",b=0}const x=this,k=this.xref,S=[];let M=null;const C=new p.LocalImageCache,_=new p.LocalGStateCache,I=new $(t,k,n);let F;function E({width:t=0,height:e=0,transform:s=d.prevTransform,fontName:i=d.fontName}){f.items.push({str:" ",dir:"ltr",width:t,height:e,transform:s,fontName:i,hasEOL:!1})}function T(){const t=F.font,e=[F.fontSize*F.textHScale,0,0,F.fontSize,0,F.textRise];if(t.isType3Font&&(F.fontSize<=1||t.isCharBBox)&&!(0,i.isArrayEqual)(F.fontMatrix,i.FONT_IDENTITY_MATRIX)){const s=t.bbox[3]-t.bbox[1];s>0&&(e[3]*=s*F.fontMatrix[3])}return i.Util.transform(F.ctm,i.Util.transform(F.textMatrix,e))}function P(){if(d.initialized)return d;const{font:t,loadedName:e}=F;c.has(e)||(c.add(e),f.styles[e]={fontFamily:t.fallbackName,ascent:t.ascent,descent:t.descent,vertical:t.vertical}),d.fontName=e;const s=d.transform=T();t.vertical?(d.width=d.totalWidth=Math.hypot(s[0],s[1]),d.height=d.totalHeight=0,d.vertical=!0):(d.width=d.totalWidth=0,d.height=d.totalHeight=Math.hypot(s[2],s[3]),d.vertical=!1);const i=Math.hypot(F.textLineMatrix[0],F.textLineMatrix[1]),n=Math.hypot(F.ctm[0],F.ctm[1]);d.textAdvanceScale=n*i;const{fontSize:r}=F;return d.trackingSpaceMin=.102*r,d.notASpace=.03*r,d.negativeSpaceMax=-.2*r,d.spaceInFlowMin=.102*r,d.spaceInFlowMax=.6*r,d.hasEOL=!1,d.initialized=!0,d}function R(){if(!d.initialized)return;const t=Math.hypot(F.textLineMatrix[0],F.textLineMatrix[1]),e=Math.hypot(F.ctm[0],F.ctm[1])*t;e!==d.textAdvanceScale&&(d.vertical?(d.totalHeight+=d.height*d.textAdvanceScale,d.height=0):(d.totalWidth+=d.width*d.textAdvanceScale,d.width=0),d.textAdvanceScale=e)}function B(t,n){return x.loadFont(t,n,s).then((function(t){return t.font.isType3Font?t.loadType3Data(x,s,e).catch((function(){})).then((function(){return t})):t})).then((function(t){F.loadedName=t.loadedName,F.font=t.font,F.fontMatrix=t.font.fontMatrix||i.FONT_IDENTITY_MATRIX}))}function U(t,e,s){const i=Math.hypot(s[0],s[1]);return[(s[0]*t+s[1]*e)/i,(s[2]*t+s[3]*e)/i]}function j(t){const e=T();let s=e[4],i=e[5];if(F.font?.vertical){if(s<h[0]||s>h[2]||i+t<h[1]||i>h[3])return!1}else if(s+t<h[0]||s>h[2]||i<h[1]||i>h[3])return!1;if(!F.font||!d.prevTransform)return!0;let n=d.prevTransform[4],r=d.prevTransform[5];if(n===s&&r===i)return!0;let o=-1;switch(e[0]&&0===e[1]&&0===e[2]?o=e[0]>0?0:180:e[1]&&0===e[0]&&0===e[3]&&(o=e[1]>0?90:270),o){case 0:break;case 90:[s,i]=[i,s],[n,r]=[r,n];break;case 180:[s,i,n,r]=[-s,-i,-n,-r];break;case 270:[s,i]=[-i,-s],[n,r]=[-r,-n];break;default:[s,i]=U(s,i,e),[n,r]=U(n,r,d.prevTransform)}if(F.font.vertical){const t=(r-i)/d.textAdvanceScale,e=s-n,o=Math.sign(d.height);return t<o*d.negativeSpaceMax?Math.abs(e)>.5*d.width?(G(),!0):(v(),X(),!0):Math.abs(e)>d.width?(G(),!0):(t<=o*d.notASpace&&v(),t<=o*d.trackingSpaceMin?A()?(v(),X(),E({height:Math.abs(t)})):d.height+=t:q(t,d.prevTransform,o)||(0===d.str.length?(v(),E({height:Math.abs(t)})):d.height+=t),Math.abs(e)>.25*d.width&&X(),!0)}const a=(s-n)/d.textAdvanceScale,c=i-r,l=Math.sign(d.width);return a<l*d.negativeSpaceMax?Math.abs(c)>.5*d.height?(G(),!0):(v(),X(),!0):Math.abs(c)>d.height?(G(),!0):(a<=l*d.notASpace&&v(),a<=l*d.trackingSpaceMin?A()?(v(),X(),E({width:Math.abs(a)})):d.width+=a:q(a,d.prevTransform,l)||(0===d.str.length?(v(),E({width:Math.abs(a)})):d.width+=a),Math.abs(c)>.25*d.height&&X(),!0)}function H({chars:t,extraSpacing:e}){const s=F.font;if(!t){const t=F.charSpacing+e;return void(t&&(s.vertical?F.translateTextMatrix(0,-t):F.translateTextMatrix(t*F.textHScale,0)))}const i=s.charsToGlyphs(t),n=F.fontMatrix[0]*F.fontSize;for(let t=0,r=i.length;t<r;t++){const o=i[t],{category:a}=o;if(a.isInvisibleFormatMark)continue;let c=F.charSpacing+(t+1===r?e:0),h=o.width;s.vertical&&(h=o.vmetric?o.vmetric[0]:-h);let l=h*n;if(a.isWhitespace){s.vertical?(c+=-l+F.wordSpacing,F.translateTextMatrix(0,-c)):(c+=l+F.wordSpacing,F.translateTextMatrix(c*F.textHScale,0)),y(" ");continue}if(!a.isZeroWidthDiacritic&&!j(l)){s.vertical?F.translateTextMatrix(0,l):F.translateTextMatrix(l*F.textHScale,0);continue}const u=P();a.isZeroWidthDiacritic&&(l=0),s.vertical?(F.translateTextMatrix(0,l),l=Math.abs(l),u.height+=l):(l*=F.textHScale,F.translateTextMatrix(l,0),u.width+=l),l&&(u.prevTransform=T());const f=o.unicode;y(f)&&u.str.push(" "),u.str.push(f),c&&(s.vertical?F.translateTextMatrix(0,-c):F.translateTextMatrix(c*F.textHScale,0))}}function G(){v(),d.initialized?(d.hasEOL=!0,X()):f.items.push({str:"",dir:"ltr",width:0,height:0,transform:T(),fontName:F.loadedName,hasEOL:!0})}function q(t,e,s){if(s*d.spaceInFlowMin<=t&&t<=s*d.spaceInFlowMax)return d.initialized&&(v(),d.str.push(" ")),!1;const i=d.fontName;let n=0;return d.vertical&&(n=t,t=0),X(),v(),E({width:Math.abs(t),height:Math.abs(n),transform:e||T(),fontName:i}),!0}function X(){d.initialized&&d.str&&(d.vertical?d.totalHeight+=d.height*d.textAdvanceScale:d.totalWidth+=d.width*d.textAdvanceScale,f.items.push(function(t){let e=t.str.join("");u||(e=(0,i.normalizeUnicode)(e));const s=(0,w.bidi)(e,-1,t.vertical);return{str:s.str,dir:s.dir,width:Math.abs(t.totalWidth),height:Math.abs(t.totalHeight),transform:t.transform,fontName:t.fontName,hasEOL:t.hasEOL}}(d)),d.initialized=!1,d.str.length=0)}function W(t=!1){const e=f.items.length;0!==e&&(t&&e<10||(a.enqueue(f,e),f.items=[],f.styles=Object.create(null)))}const z=new D;return new Promise((function t(d,p){const g=function(e){W(!0),Promise.all([e,a.ready]).then((function(){try{t(d,p)}catch(t){p(t)}}),p)};e.ensureNotTerminated(),z.reset();const w={};let b,y=[];for(;!(b=z.check())&&(y.length=0,w.args=y,I.read(w));){const t=F;switch(F=n.state,y=w.args,0|w.fn){case i.OPS.setFont:var A=y[0].name,v=y[1];if(F.font&&A===F.fontName&&v===F.fontSize)break;return X(),F.fontName=A,F.fontSize=v,void g(B(A,null));case i.OPS.setTextRise:F.textRise=y[0];break;case i.OPS.setHScale:F.textHScale=y[0]/100;break;case i.OPS.setLeading:F.leading=y[0];break;case i.OPS.moveText:F.translateTextLineMatrix(y[0],y[1]),F.textMatrix=F.textLineMatrix.slice();break;case i.OPS.setLeadingMoveText:F.leading=-y[1],F.translateTextLineMatrix(y[0],y[1]),F.textMatrix=F.textLineMatrix.slice();break;case i.OPS.nextLine:F.carriageReturn();break;case i.OPS.setTextMatrix:F.setTextMatrix(y[0],y[1],y[2],y[3],y[4],y[5]),F.setTextLineMatrix(y[0],y[1],y[2],y[3],y[4],y[5]),R();break;case i.OPS.setCharSpacing:F.charSpacing=y[0];break;case i.OPS.setWordSpacing:F.wordSpacing=y[0];break;case i.OPS.beginText:F.textMatrix=i.IDENTITY_MATRIX.slice(),F.textLineMatrix=i.IDENTITY_MATRIX.slice();break;case i.OPS.showSpacedText:if(!n.state.font){x.ensureStateFont(n.state);continue}const d=(F.font.vertical?1:-1)*F.fontSize/1e3,p=y[0];for(let t=0,e=p.length;t<e;t++){const e=p[t];if("string"==typeof e)S.push(e);else if("number"==typeof e&&0!==e){const t=S.join("");S.length=0,H({chars:t,extraSpacing:e*d})}}if(S.length>0){const t=S.join("");S.length=0,H({chars:t,extraSpacing:0})}break;case i.OPS.showText:if(!n.state.font){x.ensureStateFont(n.state);continue}H({chars:y[0],extraSpacing:0});break;case i.OPS.nextLineShowText:if(!n.state.font){x.ensureStateFont(n.state);continue}F.carriageReturn(),H({chars:y[0],extraSpacing:0});break;case i.OPS.nextLineSetSpacingShowText:if(!n.state.font){x.ensureStateFont(n.state);continue}F.wordSpacing=y[0],F.charSpacing=y[1],F.carriageReturn(),H({chars:y[2],extraSpacing:0});break;case i.OPS.paintXObject:X(),M||(M=s.get("XObject")||r.Dict.empty);var E=y[0]instanceof r.Name,T=y[0].name;if(E&&C.getByName(T))break;return void g(new Promise((function(t,f){if(!E)throw new i.FormatError("XObject must be referred to by name.");let d=M.getRaw(T);if(d instanceof r.Ref){if(C.getByRef(d))return void t();if(x.globalImageCache.getData(d,x.pageIndex))return void t();d=k.fetch(d)}if(!(d instanceof m.BaseStream))throw new i.FormatError("XObject should be a stream");const p=d.dict.get("Subtype");if(!(p instanceof r.Name))throw new i.FormatError("XObject should have a Name subtype");if("Form"!==p.name)return C.set(T,d.dict.objId,!0),void t();const g=n.state.clone(),w=new N(g),b=d.dict.getArray("Matrix");Array.isArray(b)&&6===b.length&&w.transform(b),W();const y={enqueueInvoked:!1,enqueue(t,e){this.enqueueInvoked=!0,a.enqueue(t,e)},get desiredSize(){return a.desiredSize},get ready(){return a.ready}};x.getTextContent({stream:d,task:e,resources:d.dict.get("Resources")||s,stateManager:w,includeMarkedContent:o,sink:y,seenStyles:c,viewBox:h,markedContentData:l,disableNormalization:u}).then((function(){y.enqueueInvoked||C.set(T,d.dict.objId,!0),t()}),f)})).catch((function(t){if(!(t instanceof i.AbortException)){if(!x.options.ignoreErrors)throw t;(0,i.warn)(`getTextContent - ignoring XObject: "${t}".`)}})));case i.OPS.setGState:if(T=y[0].name,(E=y[0]instanceof r.Name)&&_.getByName(T))break;return void g(new Promise((function(t,e){if(!E)throw new i.FormatError("GState must be referred to by name.");const n=s.get("ExtGState");if(!(n instanceof r.Dict))throw new i.FormatError("ExtGState should be a dictionary.");const o=n.get(T);if(!(o instanceof r.Dict))throw new i.FormatError("GState should be a dictionary.");const a=o.get("Font");if(!a)return _.set(T,o.objId,!0),void t();X(),F.fontName=null,F.fontSize=a[1],B(null,a[0]).then(t,e)})).catch((function(t){if(!(t instanceof i.AbortException)){if(!x.options.ignoreErrors)throw t;(0,i.warn)(`getTextContent - ignoring ExtGState: "${t}".`)}})));case i.OPS.beginMarkedContent:X(),o&&(l.level++,f.items.push({type:"beginMarkedContent",tag:y[0]instanceof r.Name?y[0].name:null}));break;case i.OPS.beginMarkedContentProps:if(X(),o){l.level++;let t=null;y[1]instanceof r.Dict&&(t=y[1].get("MCID")),f.items.push({type:"beginMarkedContentProps",id:Number.isInteger(t)?`${x.idFactory.getPageObjId()}_mc${t}`:null,tag:y[0]instanceof r.Name?y[0].name:null})}break;case i.OPS.endMarkedContent:if(X(),o){if(0===l.level)break;l.level--,f.items.push({type:"endMarkedContent"})}break;case i.OPS.restore:!t||t.font===F.font&&t.fontSize===F.fontSize&&t.fontName===F.fontName||X()}if(f.items.length>=a.desiredSize){b=!0;break}}b?g(O):(X(),W(),d())})).catch((t=>{if(!(t instanceof i.AbortException)){if(this.options.ignoreErrors)return(0,i.warn)(`getTextContent - ignoring errors during "${e.name}" task: "${t}".`),X(),void W();throw t}}))}extractDataStructures(t,e,s){const n=this.xref;let o;const h=this.readToUnicode(s.toUnicode||t.get("ToUnicode")||e.get("ToUnicode"));if(s.composite){const e=t.get("CIDSystemInfo");e instanceof r.Dict&&(s.cidSystemInfo={registry:(0,i.stringToPDFString)(e.get("Registry")),ordering:(0,i.stringToPDFString)(e.get("Ordering")),supplement:e.get("Supplement")});try{const e=t.get("CIDToGIDMap");e instanceof m.BaseStream&&(o=e.getBytes())}catch(t){if(!this.options.ignoreErrors)throw t;(0,i.warn)(`extractDataStructures - ignoring CIDToGIDMap data: "${t}".`)}}const l=[];let u,f=null;if(t.has("Encoding")){if(u=t.get("Encoding"),u instanceof r.Dict){if(f=u.get("BaseEncoding"),f=f instanceof r.Name?f.name:null,u.has("Differences")){const t=u.get("Differences");let e=0;for(const s of t){const t=n.fetchIfRef(s);if("number"==typeof t)e=t;else{if(!(t instanceof r.Name))throw new i.FormatError(`Invalid entry in 'Differences' array: ${t}`);l[e++]=t.name}}}}else if(u instanceof r.Name)f=u.name;else{const t="Encoding is not a Name nor a Dict";if(!this.options.ignoreErrors)throw new i.FormatError(t);(0,i.warn)(t)}"MacRomanEncoding"!==f&&"MacExpertEncoding"!==f&&"WinAnsiEncoding"!==f&&(f=null)}const d=!s.file||s.isInternalFont,p=(0,c.getSymbolsFonts)()[s.name];return f&&d&&p&&(f=null),f?s.defaultEncoding=(0,a.getEncoding)(f):(u=a.StandardEncoding,"TrueType"!==s.type||!!(s.flags&A.FontFlags.Nonsymbolic)||(u=a.WinAnsiEncoding),(!!(s.flags&A.FontFlags.Symbolic)||p)&&(u=a.MacRomanEncoding,d&&(/Symbol/i.test(s.name)?u=a.SymbolSetEncoding:/Dingbats/i.test(s.name)?u=a.ZapfDingbatsEncoding:/Wingdings/i.test(s.name)&&(u=a.WinAnsiEncoding))),s.defaultEncoding=u),s.differences=l,s.baseEncodingName=f,s.hasEncoding=!!f||l.length>0,s.dict=t,h.then((t=>(s.toUnicode=t,this.buildToUnicode(s)))).then((t=>(s.toUnicode=t,o&&(s.cidToGidMap=this.readCidToGidMap(o,t)),s)))}_simpleFontToUnicode(t,e=!1){(0,i.assert)(!t.composite,"Must be a simple font.");const s=[],n=t.defaultEncoding.slice(),r=t.baseEncodingName,o=t.differences;for(const t in o){const e=o[t];".notdef"!==e&&(n[t]=e)}const c=(0,x.getGlyphsUnicode)();for(const i in n){let o=n[i];if(""===o)continue;let h=c[o];if(void 0!==h){s[i]=String.fromCharCode(h);continue}let l=0;switch(o[0]){case"G":3===o.length&&(l=parseInt(o.substring(1),16));break;case"g":5===o.length&&(l=parseInt(o.substring(1),16));break;case"C":case"c":if(o.length>=3&&o.length<=4){const s=o.substring(1);if(e){l=parseInt(s,16);break}if(l=+s,Number.isNaN(l)&&Number.isInteger(parseInt(s,16)))return this._simpleFontToUnicode(t,!0)}break;case"u":h=(0,S.getUnicodeForGlyph)(o,c),-1!==h&&(l=h);break;default:switch(o){case"f_h":case"f_t":case"T_h":s[i]=o.replaceAll("_","");continue}}if(l>0&&l<=1114111&&Number.isInteger(l)){if(r&&l===+i){const t=(0,a.getEncoding)(r);if(t&&(o=t[i])){s[i]=String.fromCharCode(c[o]);continue}}s[i]=String.fromCodePoint(l)}}return s}async buildToUnicode(t){if(t.hasIncludedToUnicodeMap=t.toUnicode?.length>0,t.hasIncludedToUnicodeMap)return!t.composite&&t.hasEncoding&&(t.fallbackToUnicode=this._simpleFontToUnicode(t)),t.toUnicode;if(!t.composite)return new u.ToUnicodeMap(this._simpleFontToUnicode(t));if(t.composite&&(t.cMap.builtInCMap&&!(t.cMap instanceof n.IdentityCMap)||"Adobe"===t.cidSystemInfo.registry&&("GB1"===t.cidSystemInfo.ordering||"CNS1"===t.cidSystemInfo.ordering||"Japan1"===t.cidSystemInfo.ordering||"Korea1"===t.cidSystemInfo.ordering))){const{registry:e,ordering:s}=t.cidSystemInfo,o=r.Name.get(`${e}-${s}-UCS2`),a=await n.CMapFactory.create({encoding:o,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}),c=[],h=[];return t.cMap.forEach((function(t,e){if(e>65535)throw new i.FormatError("Max size of CID is 65,535");const s=a.lookup(e);if(s){h.length=0;for(let t=0,e=s.length;t<e;t+=2)h.push((s.charCodeAt(t)<<8)+s.charCodeAt(t+1));c[t]=String.fromCharCode(...h)}})),new u.ToUnicodeMap(c)}return new u.IdentityToUnicodeMap(t.firstChar,t.lastChar)}readToUnicode(t){return t?t instanceof r.Name?n.CMapFactory.create({encoding:t,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}).then((function(t){return t instanceof n.IdentityCMap?new u.IdentityToUnicodeMap(0,65535):new u.ToUnicodeMap(t.getMap())})):t instanceof m.BaseStream?n.CMapFactory.create({encoding:t,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}).then((function(t){if(t instanceof n.IdentityCMap)return new u.IdentityToUnicodeMap(0,65535);const e=new Array(t.length);return t.forEach((function(t,s){if("number"==typeof s)return void(e[t]=String.fromCodePoint(s));const i=[];for(let t=0;t<s.length;t+=2){const e=s.charCodeAt(t)<<8|s.charCodeAt(t+1);if(55296!=(63488&e)){i.push(e);continue}t+=2;const n=s.charCodeAt(t)<<8|s.charCodeAt(t+1);i.push(((1023&e)<<10)+(1023&n)+65536)}e[t]=String.fromCodePoint(...i)})),new u.ToUnicodeMap(e)}),(t=>{if(t instanceof i.AbortException)return null;if(this.options.ignoreErrors)return(0,i.warn)(`readToUnicode - ignoring ToUnicode data: "${t}".`),null;throw t})):Promise.resolve(null):Promise.resolve(null)}readCidToGidMap(t,e){const s=[];for(let i=0,n=t.length;i<n;i++){const n=t[i++]<<8|t[i],r=i>>1;(0!==n||e.has(r))&&(s[r]=n)}return s}extractWidths(t,e,s){const i=this.xref;let n=[],o=0;const a=[];let c,h,l,u,f,d,p,g;if(s.composite){if(o=t.has("DW")?t.get("DW"):1e3,g=t.get("W"),g)for(h=0,l=g.length;h<l;h++)if(d=i.fetchIfRef(g[h++]),p=i.fetchIfRef(g[h]),Array.isArray(p))for(u=0,f=p.length;u<f;u++)n[d++]=i.fetchIfRef(p[u]);else{const t=i.fetchIfRef(g[++h]);for(u=d;u<=p;u++)n[u]=t}if(s.vertical){let e=t.getArray("DW2")||[880,-1e3];if(c=[e[1],.5*o,e[0]],e=t.get("W2"),e)for(h=0,l=e.length;h<l;h++)if(d=i.fetchIfRef(e[h++]),p=i.fetchIfRef(e[h]),Array.isArray(p))for(u=0,f=p.length;u<f;u++)a[d++]=[i.fetchIfRef(p[u++]),i.fetchIfRef(p[u++]),i.fetchIfRef(p[u])];else{const t=[i.fetchIfRef(e[++h]),i.fetchIfRef(e[++h]),i.fetchIfRef(e[++h])];for(u=d;u<=p;u++)a[u]=t}}}else{const a=s.firstChar;if(g=t.get("Widths"),g){for(u=a,h=0,l=g.length;h<l;h++)n[u++]=i.fetchIfRef(g[h]);o=parseFloat(e.get("MissingWidth"))||0}else{const e=t.get("BaseFont");if(e instanceof r.Name){const t=this.getBaseFontMetrics(e.name);n=this.buildCharCodeToWidth(t.widths,s),o=t.defaultWidth}}}let m=!0,w=o;for(const t in n){const e=n[t];if(e)if(w){if(w!==e){m=!1;break}}else w=e}m?s.flags|=A.FontFlags.FixedPitch:s.flags&=~A.FontFlags.FixedPitch,s.defaultWidth=o,s.widths=n,s.defaultVMetrics=c,s.vmetrics=a}isSerifFont(t){const e=t.split("-")[0];return e in(0,c.getSerifFonts)()||/serif/gi.test(e)}getBaseFontMetrics(t){let e=0,s=Object.create(null),i=!1,n=(0,c.getStdFontMap)()[t]||t;const r=(0,k.getMetrics)();n in r||(n=this.isSerifFont(t)?"Times-Roman":"Helvetica");const o=r[n];return"number"==typeof o?(e=o,i=!0):s=o(),{defaultWidth:e,monospace:i,widths:s}}buildCharCodeToWidth(t,e){const s=Object.create(null),i=e.differences,n=e.defaultEncoding;for(let e=0;e<256;e++)e in i&&t[i[e]]?s[e]=t[i[e]]:e in n&&t[n[e]]&&(s[e]=t[n[e]]);return s}preEvaluateFont(t){const e=t;let s=t.get("Subtype");if(!(s instanceof r.Name))throw new i.FormatError("invalid font Subtype");let n,o,a=!1;if("Type0"===s.name){const e=t.get("DescendantFonts");if(!e)throw new i.FormatError("Descendant fonts are not specified");if(!((t=Array.isArray(e)?this.xref.fetchIfRef(e[0]):e)instanceof r.Dict))throw new i.FormatError("Descendant font is not a dictionary.");if(s=t.get("Subtype"),!(s instanceof r.Name))throw new i.FormatError("invalid font Subtype");a=!0}const c=t.get("FirstChar")||0,h=t.get("LastChar")||(a?65535:255),l=t.get("FontDescriptor");if(l){n=new C.MurmurHash3_64;const s=e.getRaw("Encoding");if(s instanceof r.Name)n.update(s.name);else if(s instanceof r.Ref)n.update(s.toString());else if(s instanceof r.Dict)for(const t of s.getRawValues())if(t instanceof r.Name)n.update(t.name);else if(t instanceof r.Ref)n.update(t.toString());else if(Array.isArray(t)){const e=t.length,s=new Array(e);for(let i=0;i<e;i++){const e=t[i];e instanceof r.Name?s[i]=e.name:("number"==typeof e||e instanceof r.Ref)&&(s[i]=e.toString())}n.update(s.join())}if(n.update(`${c}-${h}`),o=t.get("ToUnicode")||e.get("ToUnicode"),o instanceof m.BaseStream){const t=o.str||o,e=t.buffer?new Uint8Array(t.buffer.buffer,0,t.bufferLength):new Uint8Array(t.bytes.buffer,t.start,t.end-t.start);n.update(e)}else o instanceof r.Name&&n.update(o.name);const i=t.get("Widths")||e.get("Widths");if(Array.isArray(i)){const t=[];for(const e of i)("number"==typeof e||e instanceof r.Ref)&&t.push(e.toString());n.update(t.join())}if(a){n.update("compositeFont");const s=t.get("W")||e.get("W");if(Array.isArray(s)){const t=[];for(const e of s)if("number"==typeof e||e instanceof r.Ref)t.push(e.toString());else if(Array.isArray(e)){const s=[];for(const t of e)("number"==typeof t||t instanceof r.Ref)&&s.push(t.toString());t.push(`[${s.join()}]`)}n.update(t.join())}const i=t.getRaw("CIDToGIDMap")||e.getRaw("CIDToGIDMap");i instanceof r.Name?n.update(i.name):i instanceof r.Ref?n.update(i.toString()):i instanceof m.BaseStream&&n.update(i.peekBytes())}}return{descriptor:l,dict:t,baseDict:e,composite:a,type:s.name,firstChar:c,lastChar:h,toUnicode:o,hash:n?n.hexdigest():""}}async translateFont({descriptor:t,dict:e,baseDict:s,composite:a,type:h,firstChar:u,lastChar:f,toUnicode:d,cssFontInfo:p}){const m="Type3"===h;let w;if(!t){if(!m){let t=e.get("BaseFont");if(!(t instanceof r.Name))throw new i.FormatError("Base font is not specified");t=t.name.replaceAll(/[,_]/g,"-");const n=this.getBaseFontMetrics(t),a=t.split("-")[0],l=(this.isSerifFont(a)?A.FontFlags.Serif:0)|(n.monospace?A.FontFlags.FixedPitch:0)|((0,c.getSymbolsFonts)()[a]?A.FontFlags.Symbolic:A.FontFlags.Nonsymbolic);w={type:h,name:t,loadedName:s.loadedName,systemFontInfo:null,widths:n.widths,defaultWidth:n.defaultWidth,isSimulatedFlags:!0,flags:l,firstChar:u,lastChar:f,toUnicode:d,xHeight:0,capHeight:0,italicAngle:0,isType3Font:m};const p=e.get("Widths"),g=(0,c.getStandardFontName)(t);let b=null;return g&&(b=await this.fetchStandardFontData(g),w.isInternalFont=!!b),!w.isInternalFont&&this.options.useSystemFonts&&(w.systemFontInfo=(0,v.getFontSubstitution)(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,t,g)),this.extractDataStructures(e,e,w).then((e=>{if(p){const t=[];let s=u;for(const e of p)t[s++]=this.xref.fetchIfRef(e);e.widths=t}else e.widths=this.buildCharCodeToWidth(n.widths,e);return new o.Font(t,b,e)}))}(t=new r.Dict(null)).set("FontName",r.Name.get(h)),t.set("FontBBox",e.getArray("FontBBox")||[0,0,0,0])}let b=t.get("FontName"),y=e.get("BaseFont");"string"==typeof b&&(b=r.Name.get(b)),"string"==typeof y&&(y=r.Name.get(y));const x=b?.name,k=y?.name;if(m||x===k||((0,i.info)(`The FontDescriptor's FontName is "${x}" but should be the same as the Font's BaseFont "${k}".`),x&&k&&(k.startsWith(x)||!(0,c.isKnownFontName)(x)&&(0,c.isKnownFontName)(k))&&(b=null)),b||=y,!(b instanceof r.Name))throw new i.FormatError("invalid font name");let S,M,C,_,I;try{S=t.get("FontFile","FontFile2","FontFile3")}catch(t){if(!this.options.ignoreErrors)throw t;(0,i.warn)(`translateFont - fetching "${b.name}" font file: "${t}".`),S=new g.NullStream}let F=!1,O=null,E=null;if(S){if(S.dict){const t=S.dict.get("Subtype");t instanceof r.Name&&(M=t.name),C=S.dict.get("Length1"),_=S.dict.get("Length2"),I=S.dict.get("Length3")}}else if(p){const t=(0,l.getXfaFontName)(b.name);t&&(p.fontFamily=`${p.fontFamily}-PdfJS-XFA`,p.metrics=t.metrics||null,O=t.factors||null,S=await this.fetchStandardFontData(t.name),F=!!S,s=e=(0,l.getXfaFontDict)(b.name),a=!0)}else if(!m){const t=(0,c.getStandardFontName)(b.name);t&&(S=await this.fetchStandardFontData(t),F=!!S),!F&&this.options.useSystemFonts&&(E=(0,v.getFontSubstitution)(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,b.name,t))}if(w={type:h,name:b.name,subtype:M,file:S,length1:C,length2:_,length3:I,isInternalFont:F,loadedName:s.loadedName,composite:a,fixedPitch:!1,fontMatrix:e.getArray("FontMatrix")||i.FONT_IDENTITY_MATRIX,firstChar:u,lastChar:f,toUnicode:d,bbox:t.getArray("FontBBox")||e.getArray("FontBBox"),ascent:t.get("Ascent"),descent:t.get("Descent"),xHeight:t.get("XHeight")||0,capHeight:t.get("CapHeight")||0,flags:t.get("Flags"),italicAngle:t.get("ItalicAngle")||0,isType3Font:m,cssFontInfo:p,scaleFactors:O,systemFontInfo:E},a){const t=s.get("Encoding");t instanceof r.Name&&(w.cidEncoding=t.name);const e=await n.CMapFactory.create({encoding:t,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});w.cMap=e,w.vertical=w.cMap.vertical}return this.extractDataStructures(e,s,w).then((s=>(this.extractWidths(e,t,s),new o.Font(b.name,S,s))))}static buildFontPaths(t,e,s,n){function r(e){const r=`${t.loadedName}_path_${e}`;try{if(t.renderer.hasBuiltPath(e))return;s.send("commonobj",[r,"FontPath",t.renderer.getPathJs(e)])}catch(t){if(n.ignoreErrors)return void(0,i.warn)(`buildFontPaths - ignoring ${r} glyph: "${t}".`);throw t}}for(const t of e){r(t.fontChar);const e=t.accent;e?.fontChar&&r(e.fontChar)}}static get fallbackFontDict(){const t=new r.Dict;return t.set("BaseFont",r.Name.get("Helvetica")),t.set("Type",r.Name.get("FallbackType")),t.set("Subtype",r.Name.get("FallbackType")),t.set("Encoding",r.Name.get("WinAnsiEncoding")),(0,i.shadow)(this,"fallbackFontDict",t)}}e.PartialEvaluator=P;class R{constructor({loadedName:t,font:e,dict:s,evaluatorOptions:i}){this.loadedName=t,this.font=e,this.dict=s,this._evaluatorOptions=i||F,this.type3Loaded=null,this.type3Dependencies=e.isType3Font?new Set:null,this.sent=!1}send(t){this.sent||(this.sent=!0,t.send("commonobj",[this.loadedName,"Font",this.font.exportData(this._evaluatorOptions.fontExtraProperties)]))}fallback(t){this.font.data&&(this.font.disableFontFace=!0,P.buildFontPaths(this.font,this.font.glyphCacheValues,t,this._evaluatorOptions))}loadType3Data(t,e,s){if(this.type3Loaded)return this.type3Loaded;if(!this.font.isType3Font)throw new Error("Must be a Type3 font.");const n=t.clone({ignoreErrors:!1});n.parsingType3Font=!0;const o=new r.RefSet(t.type3FontRefs);this.dict.objId&&!o.has(this.dict.objId)&&o.put(this.dict.objId),n.type3FontRefs=o;const a=this.font,c=this.type3Dependencies;let h=Promise.resolve();const l=this.dict.get("CharProcs"),u=this.dict.get("Resources")||e,f=Object.create(null),d=i.Util.normalizeRect(a.bbox||[0,0,0,0]),p=Math.hypot(d[2]-d[0],d[3]-d[1]);for(const t of l.getKeys())h=h.then((()=>{const e=l.get(t),r=new _.OperatorList;return n.getOperatorList({stream:e,task:s,resources:u,operatorList:r}).then((()=>{r.fnArray[0]===i.OPS.setCharWidthAndBounds&&this._removeType3ColorOperators(r,p),f[t]=r.getIR();for(const t of r.dependencies)c.add(t)})).catch((function(){(0,i.warn)(`Type3 font resource "${t}" is not available.`);const e=new _.OperatorList;f[t]=e.getIR()}))}));return this.type3Loaded=h.then((()=>{a.charProcOperatorList=f,this._bbox&&(a.isCharBBox=!0,a.bbox=this._bbox)})),this.type3Loaded}_removeType3ColorOperators(t,e=NaN){const s=i.Util.normalizeRect(t.argsArray[0].slice(2)),n=s[2]-s[0],r=s[3]-s[1],o=Math.hypot(n,r);0===n||0===r?(t.fnArray.splice(0,1),t.argsArray.splice(0,1)):(0===e||Math.round(o/e)>=10)&&(this._bbox||(this._bbox=[1/0,1/0,-1/0,-1/0]),this._bbox[0]=Math.min(this._bbox[0],s[0]),this._bbox[1]=Math.min(this._bbox[1],s[1]),this._bbox[2]=Math.max(this._bbox[2],s[2]),this._bbox[3]=Math.max(this._bbox[3],s[3]));let a=0,c=t.length;for(;a<c;){switch(t.fnArray[a]){case i.OPS.setCharWidthAndBounds:break;case i.OPS.setStrokeColorSpace:case i.OPS.setFillColorSpace:case i.OPS.setStrokeColor:case i.OPS.setStrokeColorN:case i.OPS.setFillColor:case i.OPS.setFillColorN:case i.OPS.setStrokeGray:case i.OPS.setFillGray:case i.OPS.setStrokeRGBColor:case i.OPS.setFillRGBColor:case i.OPS.setStrokeCMYKColor:case i.OPS.setFillCMYKColor:case i.OPS.shadingFill:case i.OPS.setRenderingIntent:t.fnArray.splice(a,1),t.argsArray.splice(a,1),c--;continue;case i.OPS.setGState:const[e]=t.argsArray[a];let s=0,n=e.length;for(;s<n;){const[t]=e[s];switch(t){case"TR":case"TR2":case"HT":case"BG":case"BG2":case"UCR":case"UCR2":e.splice(s,1),n--;continue}s++}}a++}}}class N{constructor(t=new B){this.state=t,this.stateStack=[]}save(){const t=this.state;this.stateStack.push(this.state),this.state=t.clone()}restore(){const t=this.stateStack.pop();t&&(this.state=t)}transform(t){this.state.ctm=i.Util.transform(this.state.ctm,t)}}class L{constructor(){this.ctm=new Float32Array(i.IDENTITY_MATRIX),this.fontName=null,this.fontSize=0,this.loadedName=null,this.font=null,this.fontMatrix=i.FONT_IDENTITY_MATRIX,this.textMatrix=i.IDENTITY_MATRIX.slice(),this.textLineMatrix=i.IDENTITY_MATRIX.slice(),this.charSpacing=0,this.wordSpacing=0,this.leading=0,this.textHScale=1,this.textRise=0}setTextMatrix(t,e,s,i,n,r){const o=this.textMatrix;o[0]=t,o[1]=e,o[2]=s,o[3]=i,o[4]=n,o[5]=r}setTextLineMatrix(t,e,s,i,n,r){const o=this.textLineMatrix;o[0]=t,o[1]=e,o[2]=s,o[3]=i,o[4]=n,o[5]=r}translateTextMatrix(t,e){const s=this.textMatrix;s[4]=s[0]*t+s[2]*e+s[4],s[5]=s[1]*t+s[3]*e+s[5]}translateTextLineMatrix(t,e){const s=this.textLineMatrix;s[4]=s[0]*t+s[2]*e+s[4],s[5]=s[1]*t+s[3]*e+s[5]}carriageReturn(){this.translateTextLineMatrix(0,-this.leading),this.textMatrix=this.textLineMatrix.slice()}clone(){const t=Object.create(this);return t.textMatrix=this.textMatrix.slice(),t.textLineMatrix=this.textLineMatrix.slice(),t.fontMatrix=this.fontMatrix.slice(),t}}class B{constructor(){this.ctm=new Float32Array(i.IDENTITY_MATRIX),this.font=null,this.textRenderingMode=i.TextRenderingMode.FILL,this.fillColorSpace=b.ColorSpace.singletons.gray,this.strokeColorSpace=b.ColorSpace.singletons.gray}clone(){return Object.create(this)}}class ${static get opMap(){return(0,i.shadow)(this,"opMap",{w:{id:i.OPS.setLineWidth,numArgs:1,variableArgs:!1},J:{id:i.OPS.setLineCap,numArgs:1,variableArgs:!1},j:{id:i.OPS.setLineJoin,numArgs:1,variableArgs:!1},M:{id:i.OPS.setMiterLimit,numArgs:1,variableArgs:!1},d:{id:i.OPS.setDash,numArgs:2,variableArgs:!1},ri:{id:i.OPS.setRenderingIntent,numArgs:1,variableArgs:!1},i:{id:i.OPS.setFlatness,numArgs:1,variableArgs:!1},gs:{id:i.OPS.setGState,numArgs:1,variableArgs:!1},q:{id:i.OPS.save,numArgs:0,variableArgs:!1},Q:{id:i.OPS.restore,numArgs:0,variableArgs:!1},cm:{id:i.OPS.transform,numArgs:6,variableArgs:!1},m:{id:i.OPS.moveTo,numArgs:2,variableArgs:!1},l:{id:i.OPS.lineTo,numArgs:2,variableArgs:!1},c:{id:i.OPS.curveTo,numArgs:6,variableArgs:!1},v:{id:i.OPS.curveTo2,numArgs:4,variableArgs:!1},y:{id:i.OPS.curveTo3,numArgs:4,variableArgs:!1},h:{id:i.OPS.closePath,numArgs:0,variableArgs:!1},re:{id:i.OPS.rectangle,numArgs:4,variableArgs:!1},S:{id:i.OPS.stroke,numArgs:0,variableArgs:!1},s:{id:i.OPS.closeStroke,numArgs:0,variableArgs:!1},f:{id:i.OPS.fill,numArgs:0,variableArgs:!1},F:{id:i.OPS.fill,numArgs:0,variableArgs:!1},"f*":{id:i.OPS.eoFill,numArgs:0,variableArgs:!1},B:{id:i.OPS.fillStroke,numArgs:0,variableArgs:!1},"B*":{id:i.OPS.eoFillStroke,numArgs:0,variableArgs:!1},b:{id:i.OPS.closeFillStroke,numArgs:0,variableArgs:!1},"b*":{id:i.OPS.closeEOFillStroke,numArgs:0,variableArgs:!1},n:{id:i.OPS.endPath,numArgs:0,variableArgs:!1},W:{id:i.OPS.clip,numArgs:0,variableArgs:!1},"W*":{id:i.OPS.eoClip,numArgs:0,variableArgs:!1},BT:{id:i.OPS.beginText,numArgs:0,variableArgs:!1},ET:{id:i.OPS.endText,numArgs:0,variableArgs:!1},Tc:{id:i.OPS.setCharSpacing,numArgs:1,variableArgs:!1},Tw:{id:i.OPS.setWordSpacing,numArgs:1,variableArgs:!1},Tz:{id:i.OPS.setHScale,numArgs:1,variableArgs:!1},TL:{id:i.OPS.setLeading,numArgs:1,variableArgs:!1},Tf:{id:i.OPS.setFont,numArgs:2,variableArgs:!1},Tr:{id:i.OPS.setTextRenderingMode,numArgs:1,variableArgs:!1},Ts:{id:i.OPS.setTextRise,numArgs:1,variableArgs:!1},Td:{id:i.OPS.moveText,numArgs:2,variableArgs:!1},TD:{id:i.OPS.setLeadingMoveText,numArgs:2,variableArgs:!1},Tm:{id:i.OPS.setTextMatrix,numArgs:6,variableArgs:!1},"T*":{id:i.OPS.nextLine,numArgs:0,variableArgs:!1},Tj:{id:i.OPS.showText,numArgs:1,variableArgs:!1},TJ:{id:i.OPS.showSpacedText,numArgs:1,variableArgs:!1},"'":{id:i.OPS.nextLineShowText,numArgs:1,variableArgs:!1},'"':{id:i.OPS.nextLineSetSpacingShowText,numArgs:3,variableArgs:!1},d0:{id:i.OPS.setCharWidth,numArgs:2,variableArgs:!1},d1:{id:i.OPS.setCharWidthAndBounds,numArgs:6,variableArgs:!1},CS:{id:i.OPS.setStrokeColorSpace,numArgs:1,variableArgs:!1},cs:{id:i.OPS.setFillColorSpace,numArgs:1,variableArgs:!1},SC:{id:i.OPS.setStrokeColor,numArgs:4,variableArgs:!0},SCN:{id:i.OPS.setStrokeColorN,numArgs:33,variableArgs:!0},sc:{id:i.OPS.setFillColor,numArgs:4,variableArgs:!0},scn:{id:i.OPS.setFillColorN,numArgs:33,variableArgs:!0},G:{id:i.OPS.setStrokeGray,numArgs:1,variableArgs:!1},g:{id:i.OPS.setFillGray,numArgs:1,variableArgs:!1},RG:{id:i.OPS.setStrokeRGBColor,numArgs:3,variableArgs:!1},rg:{id:i.OPS.setFillRGBColor,numArgs:3,variableArgs:!1},K:{id:i.OPS.setStrokeCMYKColor,numArgs:4,variableArgs:!1},k:{id:i.OPS.setFillCMYKColor,numArgs:4,variableArgs:!1},sh:{id:i.OPS.shadingFill,numArgs:1,variableArgs:!1},BI:{id:i.OPS.beginInlineImage,numArgs:0,variableArgs:!1},ID:{id:i.OPS.beginImageData,numArgs:0,variableArgs:!1},EI:{id:i.OPS.endInlineImage,numArgs:1,variableArgs:!1},Do:{id:i.OPS.paintXObject,numArgs:1,variableArgs:!1},MP:{id:i.OPS.markPoint,numArgs:1,variableArgs:!1},DP:{id:i.OPS.markPointProps,numArgs:2,variableArgs:!1},BMC:{id:i.OPS.beginMarkedContent,numArgs:1,variableArgs:!1},BDC:{id:i.OPS.beginMarkedContentProps,numArgs:2,variableArgs:!1},EMC:{id:i.OPS.endMarkedContent,numArgs:0,variableArgs:!1},BX:{id:i.OPS.beginCompat,numArgs:0,variableArgs:!1},EX:{id:i.OPS.endCompat,numArgs:0,variableArgs:!1},BM:null,BD:null,true:null,fa:null,fal:null,fals:null,false:null,nu:null,nul:null,null:null})}static MAX_INVALID_PATH_OPS=10;constructor(t,e,s=new N){this.parser=new d.Parser({lexer:new d.Lexer(t,$.opMap),xref:e}),this.stateManager=s,this.nonProcessedArgs=[],this._isPathOp=!1,this._numInvalidPathOPS=0}get savedStatesDepth(){return this.stateManager.stateStack.length}read(t){let e=t.args;for(;;){const s=this.parser.getObj();if(s instanceof r.Cmd){const n=s.cmd,r=$.opMap[n];if(!r){(0,i.warn)(`Unknown command "${n}".`);continue}const o=r.id,a=r.numArgs;let c=null!==e?e.length:0;if(this._isPathOp||(this._numInvalidPathOPS=0),this._isPathOp=o>=i.OPS.moveTo&&o<=i.OPS.endPath,r.variableArgs)c>a&&(0,i.info)(`Command ${n}: expected [0, ${a}] args, but received ${c} args.`);else{if(c!==a){const t=this.nonProcessedArgs;for(;c>a;)t.push(e.shift()),c--;for(;c<a&&0!==t.length;)null===e&&(e=[]),e.unshift(t.pop()),c++}if(c<a){const t=`command ${n}: expected ${a} args, but received ${c} args.`;if(this._isPathOp&&++this._numInvalidPathOPS>$.MAX_INVALID_PATH_OPS)throw new i.FormatError(`Invalid ${t}`);(0,i.warn)(`Skipping ${t}`),null!==e&&(e.length=0);continue}}return this.preprocessCommand(o,e),t.fn=o,t.args=e,!0}if(s===r.EOF)return!1;if(null!==s&&(null===e&&(e=[]),e.push(s),e.length>33))throw new i.FormatError("Too many arguments")}}preprocessCommand(t,e){switch(0|t){case i.OPS.save:this.stateManager.save();break;case i.OPS.restore:this.stateManager.restore();break;case i.OPS.transform:this.stateManager.transform(e)}}}e.EvaluatorPreprocessor=$},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.IdentityCMap=e.CMapFactory=e.CMap=void 0;var i=s(2),n=s(4),r=s(5),o=s(15),a=s(16),c=s(3),h=s(8);const l=["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"],u=2**24-1;class f{constructor(t=!1){this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=t}addCodespaceRange(t,e,s){this.codespaceRanges[t-1].push(e,s),this.numCodespaceRanges++}mapCidRange(t,e,s){if(e-t>u)throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;t<=e;)this._map[t++]=s++}mapBfRange(t,e,s){if(e-t>u)throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");const i=s.length-1;for(;t<=e;){this._map[t++]=s;const e=s.charCodeAt(i)+1;s=e>255?s.substring(0,i-1)+String.fromCharCode(s.charCodeAt(i-1)+1)+"\0":s.substring(0,i)+String.fromCharCode(e)}}mapBfRangeToArray(t,e,s){if(e-t>u)throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");const i=s.length;let n=0;for(;t<=e&&n<i;)this._map[t]=s[n++],++t}mapOne(t,e){this._map[t]=e}lookup(t){return this._map[t]}contains(t){return void 0!==this._map[t]}forEach(t){const e=this._map,s=e.length;if(s<=65536)for(let i=0;i<s;i++)void 0!==e[i]&&t(i,e[i]);else for(const s in e)t(s,e[s])}charCodeOf(t){const e=this._map;if(e.length<=65536)return e.indexOf(t);for(const s in e)if(e[s]===t)return 0|s;return-1}getMap(){return this._map}readCharCode(t,e,s){let i=0;const n=this.codespaceRanges;for(let r=0,o=n.length;r<o;r++){i=(i<<8|t.charCodeAt(e+r))>>>0;const o=n[r];for(let t=0,e=o.length;t<e;){const e=o[t++],n=o[t++];if(i>=e&&i<=n)return s.charcode=i,void(s.length=r+1)}}s.charcode=0,s.length=1}getCharCodeLength(t){const e=this.codespaceRanges;for(let s=0,i=e.length;s<i;s++){const i=e[s];for(let e=0,n=i.length;e<n;){const n=i[e++],r=i[e++];if(t>=n&&t<=r)return s+1}}return 1}get length(){return this._map.length}get isIdentityCMap(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(let t=0;t<65536;t++)if(this._map[t]!==t)return!1;return!0}}e.CMap=f;class d extends f{constructor(t,e){super(),this.vertical=t,this.addCodespaceRange(e,0,65535)}mapCidRange(t,e,s){(0,i.unreachable)("should not call mapCidRange")}mapBfRange(t,e,s){(0,i.unreachable)("should not call mapBfRange")}mapBfRangeToArray(t,e,s){(0,i.unreachable)("should not call mapBfRangeToArray")}mapOne(t,e){(0,i.unreachable)("should not call mapCidOne")}lookup(t){return Number.isInteger(t)&&t<=65535?t:void 0}contains(t){return Number.isInteger(t)&&t<=65535}forEach(t){for(let e=0;e<=65535;e++)t(e,e)}charCodeOf(t){return Number.isInteger(t)&&t<=65535?t:-1}getMap(){const t=new Array(65536);for(let e=0;e<=65535;e++)t[e]=e;return t}get length(){return 65536}get isIdentityCMap(){(0,i.unreachable)("should not access .isIdentityCMap")}}function p(t){let e=0;for(let s=0;s<t.length;s++)e=e<<8|t.charCodeAt(s);return e>>>0}function g(t){if("string"!=typeof t)throw new i.FormatError("Malformed CMap: expected string.")}function m(t){if(!Number.isInteger(t))throw new i.FormatError("Malformed CMap: expected int.")}function w(t,e){for(;;){let s=e.getObj();if(s===n.EOF)break;if((0,n.isCmd)(s,"endbfchar"))return;g(s);const i=p(s);s=e.getObj(),g(s),t.mapOne(i,s)}}function b(t,e){for(;;){let s=e.getObj();if(s===n.EOF)break;if((0,n.isCmd)(s,"endbfrange"))return;g(s);const i=p(s);s=e.getObj(),g(s);const r=p(s);if(s=e.getObj(),Number.isInteger(s)||"string"==typeof s){const e=Number.isInteger(s)?String.fromCharCode(s):s;t.mapBfRange(i,r,e)}else{if(!(0,n.isCmd)(s,"["))break;{s=e.getObj();const o=[];for(;!(0,n.isCmd)(s,"]")&&s!==n.EOF;)o.push(s),s=e.getObj();t.mapBfRangeToArray(i,r,o)}}}throw new i.FormatError("Invalid bf range.")}function y(t,e){for(;;){let s=e.getObj();if(s===n.EOF)break;if((0,n.isCmd)(s,"endcidchar"))return;g(s);const i=p(s);s=e.getObj(),m(s),t.mapOne(i,s)}}function A(t,e){for(;;){let s=e.getObj();if(s===n.EOF)break;if((0,n.isCmd)(s,"endcidrange"))return;g(s);const i=p(s);s=e.getObj(),g(s);const r=p(s);s=e.getObj(),m(s),t.mapCidRange(i,r,s)}}function v(t,e){for(;;){let s=e.getObj();if(s===n.EOF)break;if((0,n.isCmd)(s,"endcodespacerange"))return;if("string"!=typeof s)break;const i=p(s);if(s=e.getObj(),"string"!=typeof s)break;const r=p(s);t.addCodespaceRange(s.length,i,r)}throw new i.FormatError("Invalid codespace range.")}function x(t,e){const s=e.getObj();Number.isInteger(s)&&(t.vertical=!!s)}function k(t,e){const s=e.getObj();s instanceof n.Name&&(t.name=s.name)}async function S(t,e,s,r){let o,a;t:for(;;)try{const s=e.getObj();if(s===n.EOF)break;if(s instanceof n.Name)"WMode"===s.name?x(t,e):"CMapName"===s.name&&k(t,e),o=s;else if(s instanceof n.Cmd)switch(s.cmd){case"endcmap":break t;case"usecmap":o instanceof n.Name&&(a=o.name);break;case"begincodespacerange":v(t,e);break;case"beginbfchar":w(t,e);break;case"begincidchar":y(t,e);break;case"beginbfrange":b(t,e);break;case"begincidrange":A(t,e)}}catch(t){if(t instanceof c.MissingDataException)throw t;(0,i.warn)("Invalid cMap data: "+t);continue}return!r&&a&&(r=a),r?M(t,s,r):t}async function M(t,e,s){if(t.useCMap=await C(s,e),0===t.numCodespaceRanges){const e=t.useCMap.codespaceRanges;for(let s=0;s<e.length;s++)t.codespaceRanges[s]=e[s].slice();t.numCodespaceRanges=t.useCMap.numCodespaceRanges}return t.useCMap.forEach((function(e){t.contains(e)||t.mapOne(e,t.useCMap.lookup(e))})),t}async function C(t,e){if("Identity-H"===t)return new d(!1,2);if("Identity-V"===t)return new d(!0,2);if(!l.includes(t))throw new Error("Unknown CMap name: "+t);if(!e)throw new Error("Built-in CMap parameters are not provided.");const{cMapData:s,compressionType:n}=await e(t),r=new f(!0);if(n===i.CMapCompressionType.BINARY)return(new o.BinaryCMapReader).process(s,r,(t=>M(r,e,t)));if(n===i.CMapCompressionType.NONE){const t=new a.Lexer(new h.Stream(s));return S(r,t,e,null)}throw new Error(`Invalid CMap "compressionType" value: ${n}`)}e.IdentityCMap=d,e.CMapFactory=class{static async create({encoding:t,fetchBuiltInCMap:e,useCMap:s}){if(t instanceof n.Name)return C(t.name,e);if(t instanceof r.BaseStream){const i=await S(new f,new a.Lexer(t),e,s);return i.isIdentityCMap?C(i.name,e):i}throw new Error("Encoding required.")}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BinaryCMapReader=void 0;var i=s(2);function n(t,e){let s=0;for(let i=0;i<=e;i++)s=s<<8|t[i];return s>>>0}function r(t,e){return 1===e?String.fromCharCode(t[0],t[1]):3===e?String.fromCharCode(t[0],t[1],t[2],t[3]):String.fromCharCode(...t.subarray(0,e+1))}function o(t,e,s){let i=0;for(let n=s;n>=0;n--)i+=t[n]+e[n],t[n]=255&i,i>>=8}function a(t,e){let s=1;for(let i=e;i>=0&&s>0;i--)s+=t[i],t[i]=255&s,s>>=8}const c=16;class h{constructor(t){this.buffer=t,this.pos=0,this.end=t.length,this.tmpBuf=new Uint8Array(19)}readByte(){return this.pos>=this.end?-1:this.buffer[this.pos++]}readNumber(){let t,e=0;do{const s=this.readByte();if(s<0)throw new i.FormatError("unexpected EOF in bcmap");t=!(128&s),e=e<<7|127&s}while(!t);return e}readSigned(){const t=this.readNumber();return 1&t?~(t>>>1):t>>>1}readHex(t,e){t.set(this.buffer.subarray(this.pos,this.pos+e+1)),this.pos+=e+1}readHexNumber(t,e){let s;const n=this.tmpBuf;let r=0;do{const t=this.readByte();if(t<0)throw new i.FormatError("unexpected EOF in bcmap");s=!(128&t),n[r++]=127&t}while(!s);let o=e,a=0,c=0;for(;o>=0;){for(;c<8&&n.length>0;)a|=n[--r]<<c,c+=7;t[o]=255&a,o--,a>>=8,c-=8}}readHexSigned(t,e){this.readHexNumber(t,e);const s=1&t[e]?255:0;let i=0;for(let n=0;n<=e;n++)i=(1&i)<<8|t[n],t[n]=i>>1^s}readString(){const t=this.readNumber(),e=new Array(t);for(let s=0;s<t;s++)e[s]=this.readNumber();return String.fromCharCode(...e)}}e.BinaryCMapReader=class{async process(t,e,s){const i=new h(t),l=i.readByte();e.vertical=!!(1&l);let u=null;const f=new Uint8Array(c),d=new Uint8Array(c),p=new Uint8Array(c),g=new Uint8Array(c),m=new Uint8Array(c);let w,b;for(;(b=i.readByte())>=0;){const t=b>>5;if(7===t){switch(31&b){case 0:i.readString();break;case 1:u=i.readString()}continue}const s=!!(16&b),h=15&b;if(h+1>c)throw new Error("BinaryCMapReader.process: Invalid dataSize.");const l=1,y=i.readNumber();switch(t){case 0:i.readHex(f,h),i.readHexNumber(d,h),o(d,f,h),e.addCodespaceRange(h+1,n(f,h),n(d,h));for(let t=1;t<y;t++)a(d,h),i.readHexNumber(f,h),o(f,d,h),i.readHexNumber(d,h),o(d,f,h),e.addCodespaceRange(h+1,n(f,h),n(d,h));break;case 1:i.readHex(f,h),i.readHexNumber(d,h),o(d,f,h),i.readNumber();for(let t=1;t<y;t++)a(d,h),i.readHexNumber(f,h),o(f,d,h),i.readHexNumber(d,h),o(d,f,h),i.readNumber();break;case 2:i.readHex(p,h),w=i.readNumber(),e.mapOne(n(p,h),w);for(let t=1;t<y;t++)a(p,h),s||(i.readHexNumber(m,h),o(p,m,h)),w=i.readSigned()+(w+1),e.mapOne(n(p,h),w);break;case 3:i.readHex(f,h),i.readHexNumber(d,h),o(d,f,h),w=i.readNumber(),e.mapCidRange(n(f,h),n(d,h),w);for(let t=1;t<y;t++)a(d,h),s?f.set(d):(i.readHexNumber(f,h),o(f,d,h)),i.readHexNumber(d,h),o(d,f,h),w=i.readNumber(),e.mapCidRange(n(f,h),n(d,h),w);break;case 4:i.readHex(p,l),i.readHex(g,h),e.mapOne(n(p,l),r(g,h));for(let t=1;t<y;t++)a(p,l),s||(i.readHexNumber(m,l),o(p,m,l)),a(g,h),i.readHexSigned(m,h),o(g,m,h),e.mapOne(n(p,l),r(g,h));break;case 5:i.readHex(f,l),i.readHexNumber(d,l),o(d,f,l),i.readHex(g,h),e.mapBfRange(n(f,l),n(d,l),r(g,h));for(let t=1;t<y;t++)a(d,l),s?f.set(d):(i.readHexNumber(f,l),o(f,d,l)),i.readHexNumber(d,l),o(d,f,l),i.readHex(g,h),e.mapBfRange(n(f,l),n(d,l),r(g,h));break;default:throw new Error(`BinaryCMapReader.process - unknown type: ${t}`)}}return u?s(u):e}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=e.Linearization=e.Lexer=void 0;var i=s(2),n=s(4),r=s(3),o=s(8),a=s(17),c=s(19),h=s(20),l=s(22),u=s(23),f=s(26),d=s(29),p=s(31),g=s(32),m=s(33);class w{constructor({lexer:t,xref:e,allowStreams:s=!1,recoveryMode:i=!1}){this.lexer=t,this.xref=e,this.allowStreams=s,this.recoveryMode=i,this.imageCache=Object.create(null),this._imageId=0,this.refill()}refill(){this.buf1=this.lexer.getObj(),this.buf2=this.lexer.getObj()}shift(){this.buf2 instanceof n.Cmd&&"ID"===this.buf2.cmd?(this.buf1=this.buf2,this.buf2=null):(this.buf1=this.buf2,this.buf2=this.lexer.getObj())}tryShift(){try{return this.shift(),!0}catch(t){if(t instanceof r.MissingDataException)throw t;return!1}}getObj(t=null){const e=this.buf1;if(this.shift(),e instanceof n.Cmd)switch(e.cmd){case"BI":return this.makeInlineImage(t);case"[":const s=[];for(;!(0,n.isCmd)(this.buf1,"]")&&this.buf1!==n.EOF;)s.push(this.getObj(t));if(this.buf1===n.EOF){if(this.recoveryMode)return s;throw new r.ParserEOFException("End of file inside array.")}return this.shift(),s;case"<<":const o=new n.Dict(this.xref);for(;!(0,n.isCmd)(this.buf1,">>")&&this.buf1!==n.EOF;){if(!(this.buf1 instanceof n.Name)){(0,i.info)("Malformed dictionary: key must be a name object"),this.shift();continue}const e=this.buf1.name;if(this.shift(),this.buf1===n.EOF)break;o.set(e,this.getObj(t))}if(this.buf1===n.EOF){if(this.recoveryMode)return o;throw new r.ParserEOFException("End of file inside dictionary.")}return(0,n.isCmd)(this.buf2,"stream")?this.allowStreams?this.makeStream(o,t):o:(this.shift(),o);default:return e}if(Number.isInteger(e)){if(Number.isInteger(this.buf1)&&(0,n.isCmd)(this.buf2,"R")){const t=n.Ref.get(e,this.buf1);return this.shift(),this.shift(),t}return e}return"string"==typeof e&&t?t.decryptString(e):e}findDefaultInlineStreamEnd(t){const{knownCommands:e}=this.lexer,s=t.pos;let a,c,h=0;for(;-1!==(a=t.getByte());)if(0===h)h=69===a?1:0;else if(1===h)h=73===a?2:0;else if(32===a||10===a||13===a){c=t.pos;const s=t.peekBytes(15),r=s.length;if(0===r)break;for(let t=0;t<r;t++)if(a=s[t],(0!==a||0===s[t+1])&&10!==a&&13!==a&&(a<32||a>127)){h=0;break}if(2!==h)continue;if(!e){(0,i.warn)("findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.");continue}const l=new A(new o.Stream(s.slice()),e);l._hexStringWarn=()=>{};let u=0;for(;;){const t=l.getObj();if(t===n.EOF){h=0;break}if(t instanceof n.Cmd){const s=e[t.cmd];if(!s){h=0;break}if(s.variableArgs?u<=s.numArgs:u===s.numArgs)break;u=0}else u++}if(2===h)break}else h=0;-1===a&&((0,i.warn)("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker"),c&&((0,i.warn)('... trying to recover by using the last "EI" occurrence.'),t.skip(-(t.pos-c))));let l=4;return t.skip(-l),a=t.peekByte(),t.skip(l),(0,r.isWhiteSpace)(a)||l--,t.pos-l-s}findDCTDecodeInlineStreamEnd(t){const e=t.pos;let s,n,r=!1;for(;-1!==(s=t.getByte());)if(255===s){switch(t.getByte()){case 0:break;case 255:t.skip(-1);break;case 217:r=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:n=t.getUint16(),t.skip(n>2?n-2:-2)}if(r)break}const o=t.pos-e;return-1===s?((0,i.warn)("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),t.skip(-o),this.findDefaultInlineStreamEnd(t)):(this.inlineStreamSkipEI(t),o)}findASCII85DecodeInlineStreamEnd(t){const e=t.pos;let s;for(;-1!==(s=t.getByte());)if(126===s){const e=t.pos;for(s=t.peekByte();(0,r.isWhiteSpace)(s);)t.skip(),s=t.peekByte();if(62===s){t.skip();break}if(t.pos>e){const e=t.peekBytes(2);if(69===e[0]&&73===e[1])break}}const n=t.pos-e;return-1===s?((0,i.warn)("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),t.skip(-n),this.findDefaultInlineStreamEnd(t)):(this.inlineStreamSkipEI(t),n)}findASCIIHexDecodeInlineStreamEnd(t){const e=t.pos;let s;for(;-1!==(s=t.getByte())&&62!==s;);const n=t.pos-e;return-1===s?((0,i.warn)("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),t.skip(-n),this.findDefaultInlineStreamEnd(t)):(this.inlineStreamSkipEI(t),n)}inlineStreamSkipEI(t){let e,s=0;for(;-1!==(e=t.getByte());)if(0===s)s=69===e?1:0;else if(1===s)s=73===e?2:0;else if(2===s)break}makeInlineImage(t){const e=this.lexer,s=e.stream,r=Object.create(null);let o;for(;!(0,n.isCmd)(this.buf1,"ID")&&this.buf1!==n.EOF;){if(!(this.buf1 instanceof n.Name))throw new i.FormatError("Dictionary key must be a name object");const e=this.buf1.name;if(this.shift(),this.buf1===n.EOF)break;r[e]=this.getObj(t)}-1!==e.beginInlineImagePos&&(o=s.pos-e.beginInlineImagePos);const a=this.xref.fetchIfRef(r.F||r.Filter);let c;if(a instanceof n.Name)c=a.name;else if(Array.isArray(a)){const t=this.xref.fetchIfRef(a[0]);t instanceof n.Name&&(c=t.name)}const h=s.pos;let l,u;switch(c){case"DCT":case"DCTDecode":l=this.findDCTDecodeInlineStreamEnd(s);break;case"A85":case"ASCII85Decode":l=this.findASCII85DecodeInlineStreamEnd(s);break;case"AHx":case"ASCIIHexDecode":l=this.findASCIIHexDecodeInlineStreamEnd(s);break;default:l=this.findDefaultInlineStreamEnd(s)}if(l<1e3&&o>0){const t=s.pos;s.pos=e.beginInlineImagePos,u=function(t){const e=[],s=t.length;let i=0;for(;i<s-1;)e.push(t[i++]<<8|t[i++]);return i<s&&e.push(t[i]),s+"_"+String.fromCharCode.apply(null,e)}(s.getBytes(o+l)),s.pos=t;const i=this.imageCache[u];if(void 0!==i)return this.buf2=n.Cmd.get("EI"),this.shift(),i.reset(),i}const f=new n.Dict(this.xref);for(const t in r)f.set(t,r[t]);let d=s.makeSubStream(h,l,f);return t&&(d=t.createStream(d,l)),d=this.filter(d,f,l),d.dict=f,void 0!==u&&(d.cacheKey="inline_img_"+ ++this._imageId,this.imageCache[u]=d),this.buf2=n.Cmd.get("EI"),this.shift(),d}_findStreamLength(t,e){const{stream:s}=this.lexer;s.pos=t;const i=e.length;for(;s.pos<s.end;){const n=s.peekBytes(2048),r=n.length-i;if(r<=0)break;let o=0;for(;o<r;){let r=0;for(;r<i&&n[o+r]===e[r];)r++;if(r>=i)return s.pos+=o,s.pos-t;o++}s.pos+=r}return-1}makeStream(t,e){const s=this.lexer;let o=s.stream;s.skipToNextLine();const a=o.pos-1;let c=t.get("Length");if(Number.isInteger(c)||((0,i.info)(`Bad length "${c&&c.toString()}" in stream.`),c=0),o.pos=a+c,s.nextChar(),this.tryShift()&&(0,n.isCmd)(this.buf2,"endstream"))this.shift();else{const t=new Uint8Array([101,110,100,115,116,114,101,97,109]);let e=this._findStreamLength(a,t);if(e<0){const s=1;for(let n=1;n<=s;n++){const s=t.length-n,c=t.slice(0,s),h=this._findStreamLength(a,c);if(h>=0){const t=o.peekBytes(s+1)[s];if(!(0,r.isWhiteSpace)(t))break;(0,i.info)(`Found "${(0,i.bytesToString)(c)}" when searching for endstream command.`),e=h;break}}if(e<0)throw new i.FormatError("Missing endstream command.")}c=e,s.nextChar(),this.shift(),this.shift()}return this.shift(),o=o.makeSubStream(a,c,t),e&&(o=e.createStream(o,c)),o=this.filter(o,t,c),o.dict=t,o}filter(t,e,s){let r=e.get("F","Filter"),o=e.get("DP","DecodeParms");if(r instanceof n.Name)return Array.isArray(o)&&(0,i.warn)("/DecodeParms should not be an Array, when /Filter is a Name."),this.makeFilter(t,r.name,s,o);let a=s;if(Array.isArray(r)){const e=r,s=o;for(let c=0,h=e.length;c<h;++c){if(r=this.xref.fetchIfRef(e[c]),!(r instanceof n.Name))throw new i.FormatError(`Bad filter name "${r}"`);o=null,Array.isArray(s)&&c in s&&(o=this.xref.fetchIfRef(s[c])),t=this.makeFilter(t,r.name,a,o),a=null}}return t}makeFilter(t,e,s,n){if(0===s)return(0,i.warn)(`Empty "${e}" stream.`),new o.NullStream;try{switch(e){case"Fl":case"FlateDecode":return n?new g.PredictorStream(new l.FlateStream(t,s),s,n):new l.FlateStream(t,s);case"LZW":case"LZWDecode":let e=1;return n?(n.has("EarlyChange")&&(e=n.get("EarlyChange")),new g.PredictorStream(new p.LZWStream(t,s,e),s,n)):new p.LZWStream(t,s,e);case"DCT":case"DCTDecode":return new f.JpegStream(t,s,n);case"JPX":case"JPXDecode":return new d.JpxStream(t,s,n);case"A85":case"ASCII85Decode":return new a.Ascii85Stream(t,s);case"AHx":case"ASCIIHexDecode":return new c.AsciiHexStream(t,s);case"CCF":case"CCITTFaxDecode":return new h.CCITTFaxStream(t,s,n);case"RL":case"RunLengthDecode":return new m.RunLengthStream(t,s);case"JBIG2Decode":return new u.Jbig2Stream(t,s,n)}return(0,i.warn)(`Filter "${e}" is not supported.`),t}catch(t){if(t instanceof r.MissingDataException)throw t;return(0,i.warn)(`Invalid stream: "${t}"`),new o.NullStream}}}e.Parser=w;const b=[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];function y(t){return t>=48&&t<=57?15&t:t>=65&&t<=70||t>=97&&t<=102?9+(15&t):-1}class A{constructor(t,e=null){this.stream=t,this.nextChar(),this.strBuf=[],this.knownCommands=e,this._hexStringNumWarn=0,this.beginInlineImagePos=-1}nextChar(){return this.currentChar=this.stream.getByte()}peekChar(){return this.stream.peekByte()}getNumber(){let t=this.currentChar,e=!1,s=0,n=1;if(45===t?(n=-1,t=this.nextChar(),45===t&&(t=this.nextChar())):43===t&&(t=this.nextChar()),10===t||13===t)do{t=this.nextChar()}while(10===t||13===t);if(46===t&&(s=10,t=this.nextChar()),t<48||t>57){const e=`Invalid number: ${String.fromCharCode(t)} (charCode ${t})`;if((0,r.isWhiteSpace)(t)||-1===t)return(0,i.info)(`Lexer.getNumber - "${e}".`),0;throw new i.FormatError(e)}let o=t-48,a=0,c=1;for(;(t=this.nextChar())>=0;)if(t>=48&&t<=57){const i=t-48;e?a=10*a+i:(0!==s&&(s*=10),o=10*o+i)}else if(46===t){if(0!==s)break;s=1}else if(45===t)(0,i.warn)("Badly formatted number: minus sign in the middle");else{if(69!==t&&101!==t)break;if(t=this.peekChar(),43===t||45===t)c=45===t?-1:1,this.nextChar();else if(t<48||t>57)break;e=!0}return 0!==s&&(o/=s),e&&(o*=10**(c*a)),n*o}getString(){let t=1,e=!1;const s=this.strBuf;s.length=0;let n=this.nextChar();for(;;){let r=!1;switch(0|n){case-1:(0,i.warn)("Unterminated string"),e=!0;break;case 40:++t,s.push("(");break;case 41:0==--t?(this.nextChar(),e=!0):s.push(")");break;case 92:switch(n=this.nextChar(),n){case-1:(0,i.warn)("Unterminated string"),e=!0;break;case 110:s.push("\n");break;case 114:s.push("\r");break;case 116:s.push("\t");break;case 98:s.push("\b");break;case 102:s.push("\f");break;case 92:case 40:case 41:s.push(String.fromCharCode(n));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:let t=15&n;n=this.nextChar(),r=!0,n>=48&&n<=55&&(t=(t<<3)+(15&n),n=this.nextChar(),n>=48&&n<=55&&(r=!1,t=(t<<3)+(15&n))),s.push(String.fromCharCode(t));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:s.push(String.fromCharCode(n))}break;default:s.push(String.fromCharCode(n))}if(e)break;r||(n=this.nextChar())}return s.join("")}getName(){let t,e;const s=this.strBuf;for(s.length=0;(t=this.nextChar())>=0&&!b[t];)if(35===t){if(t=this.nextChar(),b[t]){(0,i.warn)("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number."),s.push("#");break}const n=y(t);if(-1!==n){e=t,t=this.nextChar();const r=y(t);if(-1===r){if((0,i.warn)(`Lexer_getName: Illegal digit (${String.fromCharCode(t)}) in hexadecimal number.`),s.push("#",String.fromCharCode(e)),b[t])break;s.push(String.fromCharCode(t));continue}s.push(String.fromCharCode(n<<4|r))}else s.push("#",String.fromCharCode(t))}else s.push(String.fromCharCode(t));return s.length>127&&(0,i.warn)(`Name token is longer than allowed by the spec: ${s.length}`),n.Name.get(s.join(""))}_hexStringWarn(t){5!=this._hexStringNumWarn++?this._hexStringNumWarn>5||(0,i.warn)(`getHexString - ignoring invalid character: ${t}`):(0,i.warn)("getHexString - ignoring additional invalid characters.")}getHexString(){const t=this.strBuf;t.length=0;let e,s,n=this.currentChar,r=!0;for(this._hexStringNumWarn=0;;){if(n<0){(0,i.warn)("Unterminated hex string");break}if(62===n){this.nextChar();break}if(1!==b[n]){if(r){if(e=y(n),-1===e){this._hexStringWarn(n),n=this.nextChar();continue}}else{if(s=y(n),-1===s){this._hexStringWarn(n),n=this.nextChar();continue}t.push(String.fromCharCode(e<<4|s))}r=!r,n=this.nextChar()}else n=this.nextChar()}return t.join("")}getObj(){let t=!1,e=this.currentChar;for(;;){if(e<0)return n.EOF;if(t)10!==e&&13!==e||(t=!1);else if(37===e)t=!0;else if(1!==b[e])break;e=this.nextChar()}switch(0|e){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),n.Cmd.get("[");case 93:return this.nextChar(),n.Cmd.get("]");case 60:return e=this.nextChar(),60===e?(this.nextChar(),n.Cmd.get("<<")):this.getHexString();case 62:return e=this.nextChar(),62===e?(this.nextChar(),n.Cmd.get(">>")):n.Cmd.get(">");case 123:return this.nextChar(),n.Cmd.get("{");case 125:return this.nextChar(),n.Cmd.get("}");case 41:throw this.nextChar(),new i.FormatError(`Illegal character: ${e}`)}let s=String.fromCharCode(e);if(e<32||e>127){const t=this.peekChar();if(t>=32&&t<=127)return this.nextChar(),n.Cmd.get(s)}const r=this.knownCommands;let o=void 0!==r?.[s];for(;(e=this.nextChar())>=0&&!b[e];){const t=s+String.fromCharCode(e);if(o&&void 0===r[t])break;if(128===s.length)throw new i.FormatError(`Command token too long: ${s.length}`);s=t,o=void 0!==r?.[s]}return"true"===s||"false"!==s&&("null"===s?null:("BI"===s&&(this.beginInlineImagePos=this.stream.pos),n.Cmd.get(s)))}skipToNextLine(){let t=this.currentChar;for(;t>=0;){if(13===t){t=this.nextChar(),10===t&&this.nextChar();break}if(10===t){this.nextChar();break}t=this.nextChar()}}}e.Lexer=A,e.Linearization=class{static create(t){function e(t,e,s=!1){const i=t.get(e);if(Number.isInteger(i)&&(s?i>=0:i>0))return i;throw new Error(`The "${e}" parameter in the linearization dictionary is invalid.`)}const s=new w({lexer:new A(t),xref:null}),i=s.getObj(),r=s.getObj(),o=s.getObj(),a=s.getObj();let c,h;if(!(Number.isInteger(i)&&Number.isInteger(r)&&(0,n.isCmd)(o,"obj")&&a instanceof n.Dict&&"number"==typeof(c=a.get("Linearized"))&&c>0))return null;if((h=e(a,"L"))!==t.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:h,hints:function(t){const e=t.get("H");let s;if(Array.isArray(e)&&(2===(s=e.length)||4===s)){for(let t=0;t<s;t++){const s=e[t];if(!(Number.isInteger(s)&&s>0))throw new Error(`Hint (${t}) in the linearization dictionary is invalid.`)}return e}throw new Error("Hint array in the linearization dictionary is invalid.")}(a),objectNumberFirst:e(a,"O"),endFirst:e(a,"E"),numPages:e(a,"N"),mainXRefEntriesOffset:e(a,"T"),pageFirst:a.has("P")?e(a,"P",!0):0}}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Ascii85Stream=void 0;var i=s(18),n=s(3);e.Ascii85Stream=class extends i.DecodeStream{constructor(t,e){e&&(e*=.8),super(e),this.str=t,this.dict=t.dict,this.input=new Uint8Array(5)}readBlock(){const t=this.str;let e=t.getByte();for(;(0,n.isWhiteSpace)(e);)e=t.getByte();if(-1===e||126===e)return void(this.eof=!0);const s=this.bufferLength;let i,r;if(122===e){for(i=this.ensureBuffer(s+4),r=0;r<4;++r)i[s+r]=0;this.bufferLength+=4}else{const o=this.input;for(o[0]=e,r=1;r<5;++r){for(e=t.getByte();(0,n.isWhiteSpace)(e);)e=t.getByte();if(o[r]=e,-1===e||126===e)break}if(i=this.ensureBuffer(s+r-1),this.bufferLength+=r-1,r<5){for(;r<5;++r)o[r]=117;this.eof=!0}let a=0;for(r=0;r<5;++r)a=85*a+(o[r]-33);for(r=3;r>=0;--r)i[s+r]=255&a,a>>=8}}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.StreamsSequenceStream=e.DecodeStream=void 0;var i=s(5),n=s(8);const r=new Uint8Array(0);class o extends i.BaseStream{constructor(t){if(super(),this._rawMinBufferLength=t||0,this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=r,this.minBufferLength=512,t)for(;this.minBufferLength<t;)this.minBufferLength*=2}get isEmpty(){for(;!this.eof&&0===this.bufferLength;)this.readBlock();return 0===this.bufferLength}ensureBuffer(t){const e=this.buffer;if(t<=e.byteLength)return e;let s=this.minBufferLength;for(;s<t;)s*=2;const i=new Uint8Array(s);return i.set(e),this.buffer=i}getByte(){const t=this.pos;for(;this.bufferLength<=t;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]}getBytes(t){const e=this.pos;let s;if(t){for(this.ensureBuffer(e+t),s=e+t;!this.eof&&this.bufferLength<s;)this.readBlock();const i=this.bufferLength;s>i&&(s=i)}else{for(;!this.eof;)this.readBlock();s=this.bufferLength}return this.pos=s,this.buffer.subarray(e,s)}reset(){this.pos=0}makeSubStream(t,e,s=null){if(void 0===e)for(;!this.eof;)this.readBlock();else{const s=t+e;for(;this.bufferLength<=s&&!this.eof;)this.readBlock()}return new n.Stream(this.buffer,t,e,s)}getBaseStreams(){return this.str?this.str.getBaseStreams():null}}e.DecodeStream=o,e.StreamsSequenceStream=class extends o{constructor(t,e=null){let s=0;for(const e of t)s+=e instanceof o?e._rawMinBufferLength:e.length;super(s),this.streams=t,this._onError=e}readBlock(){const t=this.streams;if(0===t.length)return void(this.eof=!0);const e=t.shift();let s;try{s=e.getBytes()}catch(t){if(this._onError)return void this._onError(t,e.dict?.objId);throw t}const i=this.bufferLength,n=i+s.length;this.ensureBuffer(n).set(s,i),this.bufferLength=n}getBaseStreams(){const t=[];for(const e of this.streams){const s=e.getBaseStreams();s&&t.push(...s)}return t.length>0?t:null}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AsciiHexStream=void 0;var i=s(18);e.AsciiHexStream=class extends i.DecodeStream{constructor(t,e){e&&(e*=.5),super(e),this.str=t,this.dict=t.dict,this.firstDigit=-1}readBlock(){const t=this.str.getBytes(8e3);if(!t.length)return void(this.eof=!0);const e=this.ensureBuffer(this.bufferLength+(t.length+1>>1));let s=this.bufferLength,i=this.firstDigit;for(const n of t){let t;if(n>=48&&n<=57)t=15&n;else{if(!(n>=65&&n<=70||n>=97&&n<=102)){if(62===n){this.eof=!0;break}continue}t=9+(15&n)}i<0?i=t:(e[s++]=i<<4|t,i=-1)}i>=0&&this.eof&&(e[s++]=i<<4,i=-1),this.firstDigit=i,this.bufferLength=s}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CCITTFaxStream=void 0;var i=s(21),n=s(18),r=s(4);e.CCITTFaxStream=class extends n.DecodeStream{constructor(t,e,s){super(e),this.str=t,this.dict=t.dict,s instanceof r.Dict||(s=r.Dict.empty),this.ccittFaxDecoder=new i.CCITTFaxDecoder({next:()=>t.getByte()},{K:s.get("K"),EndOfLine:s.get("EndOfLine"),EncodedByteAlign:s.get("EncodedByteAlign"),Columns:s.get("Columns"),Rows:s.get("Rows"),EndOfBlock:s.get("EndOfBlock"),BlackIs1:s.get("BlackIs1")})}readBlock(){for(;!this.eof;){const t=this.ccittFaxDecoder.readNextChar();if(-1===t)return void(this.eof=!0);this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=t}}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CCITTFaxDecoder=void 0;var i=s(2);const n=-1,r=[[-1,-1],[-1,-1],[7,8],[7,7],[6,6],[6,6],[6,5],[6,5],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[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],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2]],o=[[-1,-1],[12,-2],[-1,-1],[-1,-1],[-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]],a=[[-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]],c=[[-1,-1],[-1,-1],[12,-2],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-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]],h=[[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]],l=[[-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]];e.CCITTFaxDecoder=class{constructor(t,e={}){if(!t||"function"!=typeof t.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');let s;for(this.source=t,this.eof=!1,this.encoding=e.K||0,this.eoline=e.EndOfLine||!1,this.byteAlign=e.EncodedByteAlign||!1,this.columns=e.Columns||1728,this.rows=e.Rows||0,this.eoblock=e.EndOfBlock??!0,this.black=e.BlackIs1||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0,this.rowsDone=!1;0===(s=this._lookBits(12));)this._eatBits(1);1===s&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))}readNextChar(){if(this.eof)return-1;const t=this.refLine,e=this.codingLine,s=this.columns;let r,o,a,c,h;if(0===this.outputBits){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;let a,h,l;if(this.err=!1,this.nextLine2D){for(c=0;e[c]<s;++c)t[c]=e[c];for(t[c++]=s,t[c]=s,e[0]=0,this.codingPos=0,r=0,o=0;e[this.codingPos]<s;)switch(a=this._getTwoDimCode(),a){case 0:this._addPixels(t[r+1],o),t[r+1]<s&&(r+=2);break;case 1:if(a=h=0,o){do{a+=l=this._getBlackCode()}while(l>=64);do{h+=l=this._getWhiteCode()}while(l>=64)}else{do{a+=l=this._getWhiteCode()}while(l>=64);do{h+=l=this._getBlackCode()}while(l>=64)}for(this._addPixels(e[this.codingPos]+a,o),e[this.codingPos]<s&&this._addPixels(e[this.codingPos]+h,1^o);t[r]<=e[this.codingPos]&&t[r]<s;)r+=2;break;case 7:if(this._addPixels(t[r]+3,o),o^=1,e[this.codingPos]<s)for(++r;t[r]<=e[this.codingPos]&&t[r]<s;)r+=2;break;case 5:if(this._addPixels(t[r]+2,o),o^=1,e[this.codingPos]<s)for(++r;t[r]<=e[this.codingPos]&&t[r]<s;)r+=2;break;case 3:if(this._addPixels(t[r]+1,o),o^=1,e[this.codingPos]<s)for(++r;t[r]<=e[this.codingPos]&&t[r]<s;)r+=2;break;case 2:if(this._addPixels(t[r],o),o^=1,e[this.codingPos]<s)for(++r;t[r]<=e[this.codingPos]&&t[r]<s;)r+=2;break;case 8:if(this._addPixelsNeg(t[r]-3,o),o^=1,e[this.codingPos]<s)for(r>0?--r:++r;t[r]<=e[this.codingPos]&&t[r]<s;)r+=2;break;case 6:if(this._addPixelsNeg(t[r]-2,o),o^=1,e[this.codingPos]<s)for(r>0?--r:++r;t[r]<=e[this.codingPos]&&t[r]<s;)r+=2;break;case 4:if(this._addPixelsNeg(t[r]-1,o),o^=1,e[this.codingPos]<s)for(r>0?--r:++r;t[r]<=e[this.codingPos]&&t[r]<s;)r+=2;break;case n:this._addPixels(s,0),this.eof=!0;break;default:(0,i.info)("bad 2d code"),this._addPixels(s,0),this.err=!0}}else for(e[0]=0,this.codingPos=0,o=0;e[this.codingPos]<s;){if(a=0,o)do{a+=l=this._getBlackCode()}while(l>=64);else do{a+=l=this._getWhiteCode()}while(l>=64);this._addPixels(e[this.codingPos]+a,o),o^=1}let u=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(a=this._lookBits(12),this.eoline)for(;a!==n&&1!==a;)this._eatBits(1),a=this._lookBits(12);else for(;0===a;)this._eatBits(1),a=this._lookBits(12);1===a?(this._eatBits(12),u=!0):a===n&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1)),this.eoblock&&u&&this.byteAlign){if(a=this._lookBits(12),1===a){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(c=0;c<4;++c)a=this._lookBits(12),1!==a&&(0,i.info)("bad rtc code: "+a),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if(a=this._lookBits(13),a===n)return this.eof=!0,-1;if(a>>1==1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(1&a))}this.outputBits=e[0]>0?e[this.codingPos=0]:e[this.codingPos=1],this.row++}if(this.outputBits>=8)h=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&e[this.codingPos]<s&&(this.codingPos++,this.outputBits=e[this.codingPos]-e[this.codingPos-1]);else{a=8,h=0;do{if("number"!=typeof this.outputBits)throw new i.FormatError('Invalid /CCITTFaxDecode data, "outputBits" must be a number.');this.outputBits>a?(h<<=a,1&this.codingPos||(h|=255>>8-a),this.outputBits-=a,a=0):(h<<=this.outputBits,1&this.codingPos||(h|=255>>8-this.outputBits),a-=this.outputBits,this.outputBits=0,e[this.codingPos]<s?(this.codingPos++,this.outputBits=e[this.codingPos]-e[this.codingPos-1]):a>0&&(h<<=a,a=0))}while(a)}return this.black&&(h^=255),h}_addPixels(t,e){const s=this.codingLine;let n=this.codingPos;t>s[n]&&(t>this.columns&&((0,i.info)("row is wrong length"),this.err=!0,t=this.columns),1&n^e&&++n,s[n]=t),this.codingPos=n}_addPixelsNeg(t,e){const s=this.codingLine;let n=this.codingPos;if(t>s[n])t>this.columns&&((0,i.info)("row is wrong length"),this.err=!0,t=this.columns),1&n^e&&++n,s[n]=t;else if(t<s[n]){for(t<0&&((0,i.info)("invalid code"),this.err=!0,t=0);n>0&&t<s[n-1];)--n;s[n]=t}this.codingPos=n}_findTableCode(t,e,s,i){const r=i||0;for(let i=t;i<=e;++i){let t=this._lookBits(i);if(t===n)return[!0,1,!1];if(i<e&&(t<<=e-i),!r||t>=r){const e=s[t-r];if(e[0]===i)return this._eatBits(i),[!0,e[1],!0]}}return[!1,0,!1]}_getTwoDimCode(){let t,e=0;if(this.eoblock){if(e=this._lookBits(7),t=r[e],t?.[0]>0)return this._eatBits(t[0]),t[1]}else{const t=this._findTableCode(1,7,r);if(t[0]&&t[2])return t[1]}return(0,i.info)("Bad two dim code"),n}_getWhiteCode(){let t,e=0;if(this.eoblock){if(e=this._lookBits(12),e===n)return 1;if(t=e>>5?a[e>>3]:o[e],t[0]>0)return this._eatBits(t[0]),t[1]}else{let t=this._findTableCode(1,9,a);if(t[0])return t[1];if(t=this._findTableCode(11,12,o),t[0])return t[1]}return(0,i.info)("bad white code"),this._eatBits(1),1}_getBlackCode(){let t,e;if(this.eoblock){if(t=this._lookBits(13),t===n)return 1;if(e=t>>7?!(t>>9)&&t>>7?h[(t>>1)-64]:l[t>>7]:c[t],e[0]>0)return this._eatBits(e[0]),e[1]}else{let t=this._findTableCode(2,6,l);if(t[0])return t[1];if(t=this._findTableCode(7,12,h,64),t[0])return t[1];if(t=this._findTableCode(10,13,c),t[0])return t[1]}return(0,i.info)("bad black code"),this._eatBits(1),1}_lookBits(t){let e;for(;this.inputBits<t;){if(-1===(e=this.source.next()))return 0===this.inputBits?n:this.inputBuf<<t-this.inputBits&65535>>16-t;this.inputBuf=this.inputBuf<<8|e,this.inputBits+=8}return this.inputBuf>>this.inputBits-t&65535>>16-t}_eatBits(t){(this.inputBits-=t)<0&&(this.inputBits=0)}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FlateStream=void 0;var i=s(18),n=s(2);const r=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),a=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),c=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],h=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];e.FlateStream=class extends i.DecodeStream{constructor(t,e){super(e),this.str=t,this.dict=t.dict;const s=t.getByte(),i=t.getByte();if(-1===s||-1===i)throw new n.FormatError(`Invalid header in flate stream: ${s}, ${i}`);if(8!=(15&s))throw new n.FormatError(`Unknown compression method in flate stream: ${s}, ${i}`);if(((s<<8)+i)%31!=0)throw new n.FormatError(`Bad FCHECK in flate stream: ${s}, ${i}`);if(32&i)throw new n.FormatError(`FDICT bit set in flate stream: ${s}, ${i}`);this.codeSize=0,this.codeBuf=0}getBits(t){const e=this.str;let s,i=this.codeSize,r=this.codeBuf;for(;i<t;){if(-1===(s=e.getByte()))throw new n.FormatError("Bad encoding in flate stream");r|=s<<i,i+=8}return s=r&(1<<t)-1,this.codeBuf=r>>t,this.codeSize=i-=t,s}getCode(t){const e=this.str,s=t[0],i=t[1];let r,o=this.codeSize,a=this.codeBuf;for(;o<i&&-1!==(r=e.getByte());)a|=r<<o,o+=8;const c=s[a&(1<<i)-1],h=c>>16,l=65535&c;if(h<1||o<h)throw new n.FormatError("Bad encoding in flate stream");return this.codeBuf=a>>h,this.codeSize=o-h,l}generateHuffmanTable(t){const e=t.length;let s,i=0;for(s=0;s<e;++s)t[s]>i&&(i=t[s]);const n=1<<i,r=new Int32Array(n);for(let o=1,a=0,c=2;o<=i;++o,a<<=1,c<<=1)for(let i=0;i<e;++i)if(t[i]===o){let t=0,e=a;for(s=0;s<o;++s)t=t<<1|1&e,e>>=1;for(s=t;s<n;s+=c)r[s]=o<<16|i;++a}return[r,i]}readBlock(){let t,e;const s=this.str;let i,l,u=this.getBits(3);if(1&u&&(this.eof=!0),u>>=1,0===u){let e;if(-1===(e=s.getByte()))throw new n.FormatError("Bad block header in flate stream");let i=e;if(-1===(e=s.getByte()))throw new n.FormatError("Bad block header in flate stream");if(i|=e<<8,-1===(e=s.getByte()))throw new n.FormatError("Bad block header in flate stream");let r=e;if(-1===(e=s.getByte()))throw new n.FormatError("Bad block header in flate stream");if(r|=e<<8,r!==(65535&~i)&&(0!==i||0!==r))throw new n.FormatError("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;const o=this.bufferLength,a=o+i;if(t=this.ensureBuffer(a),this.bufferLength=a,0===i)-1===s.peekByte()&&(this.eof=!0);else{const e=s.getBytes(i);t.set(e,o),e.length<i&&(this.eof=!0)}return}if(1===u)i=c,l=h;else{if(2!==u)throw new n.FormatError("Unknown block type in flate stream");{const t=this.getBits(5)+257,s=this.getBits(5)+1,n=this.getBits(4)+4,o=new Uint8Array(r.length);let a;for(a=0;a<n;++a)o[r[a]]=this.getBits(3);const c=this.generateHuffmanTable(o);e=0,a=0;const h=t+s,u=new Uint8Array(h);let f,d,p;for(;a<h;){const t=this.getCode(c);if(16===t)f=2,d=3,p=e;else if(17===t)f=3,d=3,p=e=0;else{if(18!==t){u[a++]=e=t;continue}f=7,d=11,p=e=0}let s=this.getBits(f)+d;for(;s-- >0;)u[a++]=p}i=this.generateHuffmanTable(u.subarray(0,t)),l=this.generateHuffmanTable(u.subarray(t,h))}}t=this.buffer;let f=t?t.length:0,d=this.bufferLength;for(;;){let s=this.getCode(i);if(s<256){d+1>=f&&(t=this.ensureBuffer(d+1),f=t.length),t[d++]=s;continue}if(256===s)return void(this.bufferLength=d);s-=257,s=o[s];let n=s>>16;n>0&&(n=this.getBits(n)),e=(65535&s)+n,s=this.getCode(l),s=a[s],n=s>>16,n>0&&(n=this.getBits(n));const r=(65535&s)+n;d+e>=f&&(t=this.ensureBuffer(d+e),f=t.length);for(let s=0;s<e;++s,++d)t[d]=t[d-r]}}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Jbig2Stream=void 0;var i=s(5),n=s(18),r=s(4),o=s(24),a=s(2);e.Jbig2Stream=class extends n.DecodeStream{constructor(t,e,s){super(e),this.stream=t,this.dict=t.dict,this.maybeLength=e,this.params=s}get bytes(){return(0,a.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(t){}readBlock(){if(this.eof)return;const t=new o.Jbig2Image,e=[];if(this.params instanceof r.Dict){const t=this.params.get("JBIG2Globals");if(t instanceof i.BaseStream){const s=t.getBytes();e.push({data:s,start:0,end:s.length})}}e.push({data:this.bytes,start:0,end:this.bytes.length});const s=t.parseChunks(e),n=s.length;for(let t=0;t<n;t++)s[t]^=255;this.buffer=s,this.bufferLength=n,this.eof=!0}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Jbig2Image=void 0;var i=s(2),n=s(3),r=s(25),o=s(21);class a extends i.BaseException{constructor(t){super(`JBIG2 error: ${t}`,"Jbig2Error")}}class c{getContexts(t){return t in this?this[t]:this[t]=new Int8Array(65536)}}class h{constructor(t,e,s){this.data=t,this.start=e,this.end=s}get decoder(){const t=new r.ArithmeticDecoder(this.data,this.start,this.end);return(0,i.shadow)(this,"decoder",t)}get contextCache(){const t=new c;return(0,i.shadow)(this,"contextCache",t)}}const l=2**31-1,u=-(2**31);function f(t,e,s){const i=t.getContexts(e);let n=1;function r(t){let e=0;for(let r=0;r<t;r++){const t=s.readBit(i,n);n=n<256?n<<1|t:511&(n<<1|t)|256,e=e<<1|t}return e>>>0}const o=r(1),a=r(1)?r(1)?r(1)?r(1)?r(1)?r(32)+4436:r(12)+340:r(8)+84:r(6)+20:r(4)+4:r(2);let c;return 0===o?c=a:a>0&&(c=-a),c>=u&&c<=l?c:null}function d(t,e,s){const i=t.getContexts("IAID");let n=1;for(let t=0;t<s;t++)n=n<<1|e.readBit(i,n);return s<31?n&(1<<s)-1:2147483647&n}const p=["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"],g=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],m=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],w=[39717,1941,229,405],b=[32,8];function y(t,e,s,i,n,r,o,a){if(t)return L(new P(a.data,a.start,a.end),e,s,!1);if(0===i&&!r&&!n&&4===o.length&&3===o[0].x&&-1===o[0].y&&-3===o[1].x&&-1===o[1].y&&2===o[2].x&&-2===o[2].y&&-2===o[3].x&&-2===o[3].y)return function(t,e,s){const i=s.decoder,n=s.contextCache.getContexts("GB"),r=[];let o,a,c,h,l,u,f;for(a=0;a<e;a++)for(l=r[a]=new Uint8Array(t),u=a<1?l:r[a-1],f=a<2?l:r[a-2],o=f[0]<<13|f[1]<<12|f[2]<<11|u[0]<<7|u[1]<<6|u[2]<<5|u[3]<<4,c=0;c<t;c++)l[c]=h=i.readBit(n,o),o=(31735&o)<<1|(c+3<t?f[c+3]<<11:0)|(c+4<t?u[c+4]<<4:0)|h;return r}(e,s,a);const c=!!r,h=g[i].concat(o);h.sort((function(t,e){return t.y-e.y||t.x-e.x}));const l=h.length,u=new Int8Array(l),f=new Int8Array(l),d=[];let p,m,b=0,y=0,A=0,v=0;for(m=0;m<l;m++)u[m]=h[m].x,f[m]=h[m].y,y=Math.min(y,h[m].x),A=Math.max(A,h[m].x),v=Math.min(v,h[m].y),m<l-1&&h[m].y===h[m+1].y&&h[m].x===h[m+1].x-1?b|=1<<l-1-m:d.push(m);const x=d.length,k=new Int8Array(x),S=new Int8Array(x),M=new Uint16Array(x);for(p=0;p<x;p++)m=d[p],k[p]=h[m].x,S[p]=h[m].y,M[p]=1<<l-1-m;const C=-y,_=-v,I=e-A,F=w[i];let O=new Uint8Array(e);const E=[],T=a.decoder,D=a.contextCache.getContexts("GB");let R,N,B,$,U,j=0,H=0;for(let t=0;t<s;t++)if(n&&(j^=T.readBit(D,F),j))E.push(O);else for(O=new Uint8Array(O),E.push(O),R=0;R<e;R++){if(c&&r[t][R]){O[R]=0;continue}if(R>=C&&R<I&&t>=_)for(H=H<<1&b,m=0;m<x;m++)N=t+S[m],B=R+k[m],$=E[N][B],$&&($=M[m],H|=$);else for(H=0,U=l-1,m=0;m<l;m++,U--)B=R+u[m],B>=0&&B<e&&(N=t+f[m],N>=0&&($=E[N][B],$&&(H|=$<<U)));const s=T.readBit(D,H);O[R]=s}return E}function A(t,e,s,i,n,r,o,c,h){let l=m[s].coding;0===s&&(l=l.concat([c[0]]));const u=l.length,f=new Int32Array(u),d=new Int32Array(u);let p;for(p=0;p<u;p++)f[p]=l[p].x,d[p]=l[p].y;let g=m[s].reference;0===s&&(g=g.concat([c[1]]));const w=g.length,y=new Int32Array(w),A=new Int32Array(w);for(p=0;p<w;p++)y[p]=g[p].x,A[p]=g[p].y;const v=i[0].length,x=i.length,k=b[s],S=[],M=h.decoder,C=h.contextCache.getContexts("GR");let _=0;for(let s=0;s<e;s++){if(o&&(_^=M.readBit(C,k),_))throw new a("prediction is not supported");const e=new Uint8Array(t);S.push(e);for(let o=0;o<t;o++){let a,c,h=0;for(p=0;p<u;p++)a=s+d[p],c=o+f[p],a<0||c<0||c>=t?h<<=1:h=h<<1|S[a][c];for(p=0;p<w;p++)a=s+A[p]-r,c=o+y[p]-n,a<0||a>=x||c<0||c>=v?h<<=1:h=h<<1|i[a][c];const l=M.readBit(C,h);e[o]=l}}return S}function v(t,e,s,i,n,r,o,c,h,l,u,p,g,m,w,b,y,v,x){if(t&&e)throw new a("refinement with Huffman is not supported");const k=[];let S,M;for(S=0;S<i;S++){if(M=new Uint8Array(s),n)for(let t=0;t<s;t++)M[t]=n;k.push(M)}const C=y.decoder,_=y.contextCache;let I=t?-m.tableDeltaT.decode(x):-f(_,"IADT",C),F=0;for(S=0;S<r;){I+=t?m.tableDeltaT.decode(x):f(_,"IADT",C),F+=t?m.tableFirstS.decode(x):f(_,"IAFS",C);let i=F;for(;;){let n=0;o>1&&(n=t?x.readBits(v):f(_,"IAIT",C));const r=o*I+n,F=t?m.symbolIDTable.decode(x):d(_,C,h),O=e&&(t?x.readBit():f(_,"IARI",C));let E=c[F],T=E[0].length,D=E.length;if(O){const t=f(_,"IARDW",C),e=f(_,"IARDH",C);T+=t,D+=e,E=A(T,D,w,E,(t>>1)+f(_,"IARDX",C),(e>>1)+f(_,"IARDY",C),!1,b,y)}const P=r-(1&p?0:D-1),R=i-(2&p?T-1:0);let N,L,B;if(l){for(N=0;N<D;N++){if(M=k[R+N],!M)continue;B=E[N];const t=Math.min(s-P,T);switch(g){case 0:for(L=0;L<t;L++)M[P+L]|=B[L];break;case 2:for(L=0;L<t;L++)M[P+L]^=B[L];break;default:throw new a(`operator ${g} is not supported`)}}i+=D-1}else{for(L=0;L<D;L++)if(M=k[P+L],M)switch(B=E[L],g){case 0:for(N=0;N<T;N++)M[R+N]|=B[N];break;case 2:for(N=0;N<T;N++)M[R+N]^=B[N];break;default:throw new a(`operator ${g} is not supported`)}i+=T-1}S++;const $=t?m.tableDeltaS.decode(x):f(_,"IADS",C);if(null===$)break;i+=$+u}}return k}function x(t,e){const s={};s.number=(0,n.readUint32)(t,e);const i=t[e+4],r=63&i;if(!p[r])throw new a("invalid segment type: "+r);s.type=r,s.typeName=p[r],s.deferredNonRetain=!!(128&i);const o=!!(64&i),c=t[e+5];let h=c>>5&7;const l=[31&c];let u=e+6;if(7===c){h=536870911&(0,n.readUint32)(t,u-1),u+=3;let e=h+7>>3;for(l[0]=t[u++];--e>0;)l.push(t[u++])}else if(5===c||6===c)throw new a("invalid referred-to flags");s.retainBits=l;let f=4;s.number<=256?f=1:s.number<=65536&&(f=2);const d=[];let g,m;for(g=0;g<h;g++){let e;e=1===f?t[u]:2===f?(0,n.readUint16)(t,u):(0,n.readUint32)(t,u),d.push(e),u+=f}if(s.referredTo=d,o?(s.pageAssociation=(0,n.readUint32)(t,u),u+=4):s.pageAssociation=t[u++],s.length=(0,n.readUint32)(t,u),u+=4,4294967295===s.length){if(38!==r)throw new a("invalid unknown segment length");{const e=S(t,u),i=!!(1&t[u+M]),n=6,r=new Uint8Array(n);for(i||(r[0]=255,r[1]=172),r[2]=e.height>>>24&255,r[3]=e.height>>16&255,r[4]=e.height>>8&255,r[5]=255&e.height,g=u,m=t.length;g<m;g++){let e=0;for(;e<n&&r[e]===t[g+e];)e++;if(e===n){s.length=g+n;break}}if(4294967295===s.length)throw new a("segment end was not found")}}return s.headerEnd=u,s}function k(t,e,s,i){const n=[];let r=s;for(;r<i;){const s=x(e,r);r=s.headerEnd;const i={header:s,data:e};if(t.randomAccess||(i.start=r,r+=s.length,i.end=r),n.push(i),51===s.type)break}if(t.randomAccess)for(let t=0,e=n.length;t<e;t++)n[t].start=r,r+=n[t].header.length,n[t].end=r;return n}function S(t,e){return{width:(0,n.readUint32)(t,e),height:(0,n.readUint32)(t,e+4),x:(0,n.readUint32)(t,e+8),y:(0,n.readUint32)(t,e+12),combinationOperator:7&t[e+16]}}const M=17;function C(t,e){const s=t.header,i=t.data,r=t.end;let o,c,h,l,u=t.start;switch(s.type){case 0:const t={},e=(0,n.readUint16)(i,u);if(t.huffman=!!(1&e),t.refinement=!!(2&e),t.huffmanDHSelector=e>>2&3,t.huffmanDWSelector=e>>4&3,t.bitmapSizeSelector=e>>6&1,t.aggregationInstancesSelector=e>>7&1,t.bitmapCodingContextUsed=!!(256&e),t.bitmapCodingContextRetained=!!(512&e),t.template=e>>10&3,t.refinementTemplate=e>>12&1,u+=2,!t.huffman){for(l=0===t.template?4:1,c=[],h=0;h<l;h++)c.push({x:(0,n.readInt8)(i,u),y:(0,n.readInt8)(i,u+1)}),u+=2;t.at=c}if(t.refinement&&!t.refinementTemplate){for(c=[],h=0;h<2;h++)c.push({x:(0,n.readInt8)(i,u),y:(0,n.readInt8)(i,u+1)}),u+=2;t.refinementAt=c}t.numberOfExportedSymbols=(0,n.readUint32)(i,u),u+=4,t.numberOfNewSymbols=(0,n.readUint32)(i,u),u+=4,o=[t,s.number,s.referredTo,i,u,r];break;case 6:case 7:const f={};f.info=S(i,u),u+=M;const d=(0,n.readUint16)(i,u);if(u+=2,f.huffman=!!(1&d),f.refinement=!!(2&d),f.logStripSize=d>>2&3,f.stripSize=1<<f.logStripSize,f.referenceCorner=d>>4&3,f.transposed=!!(64&d),f.combinationOperator=d>>7&3,f.defaultPixelValue=d>>9&1,f.dsOffset=d<<17>>27,f.refinementTemplate=d>>15&1,f.huffman){const t=(0,n.readUint16)(i,u);u+=2,f.huffmanFS=3&t,f.huffmanDS=t>>2&3,f.huffmanDT=t>>4&3,f.huffmanRefinementDW=t>>6&3,f.huffmanRefinementDH=t>>8&3,f.huffmanRefinementDX=t>>10&3,f.huffmanRefinementDY=t>>12&3,f.huffmanRefinementSizeSelector=!!(16384&t)}if(f.refinement&&!f.refinementTemplate){for(c=[],h=0;h<2;h++)c.push({x:(0,n.readInt8)(i,u),y:(0,n.readInt8)(i,u+1)}),u+=2;f.refinementAt=c}f.numberOfSymbolInstances=(0,n.readUint32)(i,u),u+=4,o=[f,s.referredTo,i,u,r];break;case 16:const p={},g=i[u++];p.mmr=!!(1&g),p.template=g>>1&3,p.patternWidth=i[u++],p.patternHeight=i[u++],p.maxPatternIndex=(0,n.readUint32)(i,u),u+=4,o=[p,s.number,i,u,r];break;case 22:case 23:const m={};m.info=S(i,u),u+=M;const w=i[u++];m.mmr=!!(1&w),m.template=w>>1&3,m.enableSkip=!!(8&w),m.combinationOperator=w>>4&7,m.defaultPixelValue=w>>7&1,m.gridWidth=(0,n.readUint32)(i,u),u+=4,m.gridHeight=(0,n.readUint32)(i,u),u+=4,m.gridOffsetX=4294967295&(0,n.readUint32)(i,u),u+=4,m.gridOffsetY=4294967295&(0,n.readUint32)(i,u),u+=4,m.gridVectorX=(0,n.readUint16)(i,u),u+=2,m.gridVectorY=(0,n.readUint16)(i,u),u+=2,o=[m,s.referredTo,i,u,r];break;case 38:case 39:const b={};b.info=S(i,u),u+=M;const y=i[u++];if(b.mmr=!!(1&y),b.template=y>>1&3,b.prediction=!!(8&y),!b.mmr){for(l=0===b.template?4:1,c=[],h=0;h<l;h++)c.push({x:(0,n.readInt8)(i,u),y:(0,n.readInt8)(i,u+1)}),u+=2;b.at=c}o=[b,i,u,r];break;case 48:const A={width:(0,n.readUint32)(i,u),height:(0,n.readUint32)(i,u+4),resolutionX:(0,n.readUint32)(i,u+8),resolutionY:(0,n.readUint32)(i,u+12)};4294967295===A.height&&delete A.height;const v=i[u+16];(0,n.readUint16)(i,u+17),A.lossless=!!(1&v),A.refinement=!!(2&v),A.defaultPixelValue=v>>2&1,A.combinationOperator=v>>3&3,A.requiresBuffer=!!(32&v),A.combinationOperatorOverride=!!(64&v),o=[A];break;case 49:case 50:case 51:case 62:break;case 53:o=[s.number,i,u,r];break;default:throw new a(`segment type ${s.typeName}(${s.type}) is not implemented`)}const f="on"+s.typeName;f in e&&e[f].apply(e,o)}function _(t,e){for(let s=0,i=t.length;s<i;s++)C(t[s],e)}class I{onPageInformation(t){this.currentPageInfo=t;const e=new Uint8ClampedArray((t.width+7>>3)*t.height);t.defaultPixelValue&&e.fill(255),this.buffer=e}drawBitmap(t,e){const s=this.currentPageInfo,i=t.width,n=t.height,r=s.width+7>>3,o=s.combinationOperatorOverride?t.combinationOperator:s.combinationOperator,c=this.buffer,h=128>>(7&t.x);let l,u,f,d,p=t.y*r+(t.x>>3);switch(o){case 0:for(l=0;l<n;l++){for(f=h,d=p,u=0;u<i;u++)e[l][u]&&(c[d]|=f),f>>=1,f||(f=128,d++);p+=r}break;case 2:for(l=0;l<n;l++){for(f=h,d=p,u=0;u<i;u++)e[l][u]&&(c[d]^=f),f>>=1,f||(f=128,d++);p+=r}break;default:throw new a(`operator ${o} is not supported`)}}onImmediateGenericRegion(t,e,s,i){const n=t.info,r=new h(e,s,i),o=y(t.mmr,n.width,n.height,t.template,t.prediction,null,t.at,r);this.drawBitmap(n,o)}onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion(...arguments)}onSymbolDictionary(t,e,s,i,r,o){let c,l;t.huffman&&(c=function(t,e,s){let i,n,r,o,c=0;switch(t.huffmanDHSelector){case 0:case 1:i=D(t.huffmanDHSelector+4);break;case 3:i=R(c,e,s),c++;break;default:throw new a("invalid Huffman DH selector")}switch(t.huffmanDWSelector){case 0:case 1:n=D(t.huffmanDWSelector+2);break;case 3:n=R(c,e,s),c++;break;default:throw new a("invalid Huffman DW selector")}return t.bitmapSizeSelector?(r=R(c,e,s),c++):r=D(1),o=t.aggregationInstancesSelector?R(c,e,s):D(1),{tableDeltaHeight:i,tableDeltaWidth:n,tableBitmapSize:r,tableAggregateInstances:o}}(t,s,this.customTables),l=new P(i,r,o));let u=this.symbols;u||(this.symbols=u={});const p=[];for(const t of s){const e=u[t];e&&p.push(...e)}const g=new h(i,r,o);u[e]=function(t,e,s,i,r,o,c,h,l,u,p,g){if(t&&e)throw new a("symbol refinement with Huffman is not supported");const m=[];let w=0,b=(0,n.log2)(s.length+i);const x=p.decoder,k=p.contextCache;let S,M;for(t&&(S=D(1),M=[],b=Math.max(b,1));m.length<i;){w+=t?o.tableDeltaHeight.decode(g):f(k,"IADH",x);let i=0,n=0;const r=t?M.length:0;for(;;){const r=t?o.tableDeltaWidth.decode(g):f(k,"IADW",x);if(null===r)break;let a;if(i+=r,n+=i,e){const n=f(k,"IAAI",x);if(n>1)a=v(t,e,i,w,0,n,1,s.concat(m),b,0,0,1,0,o,l,u,p,0,g);else{const t=d(k,x,b),e=f(k,"IARDX",x),n=f(k,"IARDY",x);a=A(i,w,l,t<s.length?s[t]:m[t-s.length],e,n,!1,u,p)}m.push(a)}else t?M.push(i):(a=y(!1,i,w,c,!1,null,h,p),m.push(a))}if(t&&!e){const t=o.tableBitmapSize.decode(g);let e;if(g.byteAlign(),0===t)e=N(g,n,w);else{const s=g.end,i=g.position+t;g.end=i,e=L(g,n,w,!1),g.end=s,g.position=i}const s=M.length;if(r===s-1)m.push(e);else{let t,i,n,o,a,c=0;for(t=r;t<s;t++){for(o=M[t],n=c+o,a=[],i=0;i<w;i++)a.push(e[i].subarray(c,n));m.push(a),c=n}}}}const C=[],_=[];let I,F,O=!1;const E=s.length+i;for(;_.length<E;){let e=t?S.decode(g):f(k,"IAEX",x);for(;e--;)_.push(O);O=!O}for(I=0,F=s.length;I<F;I++)_[I]&&C.push(s[I]);for(let t=0;t<i;I++,t++)_[I]&&C.push(m[t]);return C}(t.huffman,t.refinement,p,t.numberOfNewSymbols,0,c,t.template,t.at,t.refinementTemplate,t.refinementAt,g,l)}onImmediateTextRegion(t,e,s,i,r){const o=t.info;let c,l;const u=this.symbols,f=[];for(const t of e){const e=u[t];e&&f.push(...e)}const d=(0,n.log2)(f.length);t.huffman&&(l=new P(s,i,r),c=function(t,e,s,i,n){const r=[];for(let t=0;t<=34;t++){const e=n.readBits(4);r.push(new F([t,e,0,0]))}const o=new E(r,!1);r.length=0;for(let t=0;t<i;){const e=o.decode(n);if(e>=32){let s,i,o;switch(e){case 32:if(0===t)throw new a("no previous value in symbol ID table");i=n.readBits(2)+3,s=r[t-1].prefixLength;break;case 33:i=n.readBits(3)+3,s=0;break;case 34:i=n.readBits(7)+11,s=0;break;default:throw new a("invalid code length in symbol ID table")}for(o=0;o<i;o++)r.push(new F([t,s,0,0])),t++}else r.push(new F([t,e,0,0])),t++}n.byteAlign();const c=new E(r,!1);let h,l,u,f=0;switch(t.huffmanFS){case 0:case 1:h=D(t.huffmanFS+6);break;case 3:h=R(f,e,s),f++;break;default:throw new a("invalid Huffman FS selector")}switch(t.huffmanDS){case 0:case 1:case 2:l=D(t.huffmanDS+8);break;case 3:l=R(f,e,s),f++;break;default:throw new a("invalid Huffman DS selector")}switch(t.huffmanDT){case 0:case 1:case 2:u=D(t.huffmanDT+11);break;case 3:u=R(f,e,s),f++;break;default:throw new a("invalid Huffman DT selector")}if(t.refinement)throw new a("refinement with Huffman is not supported");return{symbolIDTable:c,tableFirstS:h,tableDeltaS:l,tableDeltaT:u}}(t,e,this.customTables,f.length,l));const p=new h(s,i,r),g=v(t.huffman,t.refinement,o.width,o.height,t.defaultPixelValue,t.numberOfSymbolInstances,t.stripSize,f,d,t.transposed,t.dsOffset,t.referenceCorner,t.combinationOperator,c,t.refinementTemplate,t.refinementAt,p,t.logStripSize,l);this.drawBitmap(o,g)}onImmediateLosslessTextRegion(){this.onImmediateTextRegion(...arguments)}onPatternDictionary(t,e,s,i,n){let r=this.patterns;r||(this.patterns=r={});const o=new h(s,i,n);r[e]=function(t,e,s,i,n,r){const o=[];t||(o.push({x:-e,y:0}),0===n&&o.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));const a=y(t,(i+1)*e,s,n,!1,null,o,r),c=[];for(let t=0;t<=i;t++){const i=[],n=e*t,r=n+e;for(let t=0;t<s;t++)i.push(a[t].subarray(n,r));c.push(i)}return c}(t.mmr,t.patternWidth,t.patternHeight,t.maxPatternIndex,t.template,o)}onImmediateHalftoneRegion(t,e,s,i,r){const o=this.patterns[e[0]],c=t.info,l=new h(s,i,r),u=function(t,e,s,i,r,o,c,h,l,u,f,d,p,g,m){if(c)throw new a("skip is not supported");if(0!==h)throw new a(`operator "${h}" is not supported in halftone region`);const w=[];let b,A,v;for(b=0;b<r;b++){if(v=new Uint8Array(i),o)for(A=0;A<i;A++)v[A]=o;w.push(v)}const x=e[0],k=x[0].length,S=x.length,M=(0,n.log2)(e.length),C=[];t||(C.push({x:s<=1?3:2,y:-1}),0===s&&C.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));const _=[];let I,F,O,E,T,D,R,N,B,$,U;for(t&&(I=new P(m.data,m.start,m.end)),b=M-1;b>=0;b--)F=t?L(I,l,u,!0):y(!1,l,u,s,!1,null,C,m),_[b]=F;for(O=0;O<u;O++)for(E=0;E<l;E++){for(T=0,D=0,A=M-1;A>=0;A--)T^=_[A][O][E],D|=T<<A;if(R=e[D],N=f+O*g+E*p>>8,B=d+O*p-E*g>>8,N>=0&&N+k<=i&&B>=0&&B+S<=r)for(b=0;b<S;b++)for(U=w[B+b],$=R[b],A=0;A<k;A++)U[N+A]|=$[A];else{let t,e;for(b=0;b<S;b++)if(e=B+b,!(e<0||e>=r))for(U=w[e],$=R[b],A=0;A<k;A++)t=N+A,t>=0&&t<i&&(U[t]|=$[A])}}return w}(t.mmr,o,t.template,c.width,c.height,t.defaultPixelValue,t.enableSkip,t.combinationOperator,t.gridWidth,t.gridHeight,t.gridOffsetX,t.gridOffsetY,t.gridVectorX,t.gridVectorY,l);this.drawBitmap(c,u)}onImmediateLosslessHalftoneRegion(){this.onImmediateHalftoneRegion(...arguments)}onTables(t,e,s,i){let r=this.customTables;r||(this.customTables=r={}),r[t]=function(t,e,s){const i=t[e],r=4294967295&(0,n.readUint32)(t,e+1),o=4294967295&(0,n.readUint32)(t,e+5),a=new P(t,e+9,s),c=1+(i>>1&7),h=1+(i>>4&7),l=[];let u,f,d=r;do{u=a.readBits(c),f=a.readBits(h),l.push(new F([d,u,f,0])),d+=1<<f}while(d<o);return u=a.readBits(c),l.push(new F([r-1,u,32,0,"lower"])),u=a.readBits(c),l.push(new F([o,u,32,0])),1&i&&(u=a.readBits(c),l.push(new F([u,0]))),new E(l,!1)}(e,s,i)}}class F{constructor(t){2===t.length?(this.isOOB=!0,this.rangeLow=0,this.prefixLength=t[0],this.rangeLength=0,this.prefixCode=t[1],this.isLowerRange=!1):(this.isOOB=!1,this.rangeLow=t[0],this.prefixLength=t[1],this.rangeLength=t[2],this.prefixCode=t[3],this.isLowerRange="lower"===t[4])}}class O{constructor(t){this.children=[],t?(this.isLeaf=!0,this.rangeLength=t.rangeLength,this.rangeLow=t.rangeLow,this.isLowerRange=t.isLowerRange,this.isOOB=t.isOOB):this.isLeaf=!1}buildTree(t,e){const s=t.prefixCode>>e&1;if(e<=0)this.children[s]=new O(t);else{let i=this.children[s];i||(this.children[s]=i=new O(null)),i.buildTree(t,e-1)}}decodeNode(t){if(this.isLeaf){if(this.isOOB)return null;const e=t.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-e:e)}const e=this.children[t.readBit()];if(!e)throw new a("invalid Huffman data");return e.decodeNode(t)}}class E{constructor(t,e){e||this.assignPrefixCodes(t),this.rootNode=new O(null);for(let e=0,s=t.length;e<s;e++){const s=t[e];s.prefixLength>0&&this.rootNode.buildTree(s,s.prefixLength-1)}}decode(t){return this.rootNode.decodeNode(t)}assignPrefixCodes(t){const e=t.length;let s=0;for(let i=0;i<e;i++)s=Math.max(s,t[i].prefixLength);const i=new Uint32Array(s+1);for(let s=0;s<e;s++)i[t[s].prefixLength]++;let n,r,o,a=1,c=0;for(i[0]=0;a<=s;){for(c=c+i[a-1]<<1,n=c,r=0;r<e;)o=t[r],o.prefixLength===a&&(o.prefixCode=n,n++),r++;a++}}}const T={};function D(t){let e,s=T[t];if(s)return s;switch(t){case 1:e=[[0,1,4,0],[16,2,8,2],[272,3,16,6],[65808,3,32,7]];break;case 2:e=[[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[75,6,32,62],[6,63]];break;case 3:e=[[-256,8,8,254],[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[-257,8,32,255,"lower"],[75,7,32,126],[6,62]];break;case 4:e=[[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[76,5,32,31]];break;case 5:e=[[-255,7,8,126],[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[-256,7,32,127,"lower"],[76,6,32,62]];break;case 6:e=[[-2048,5,10,28],[-1024,4,9,8],[-512,4,8,9],[-256,4,7,10],[-128,5,6,29],[-64,5,5,30],[-32,4,5,11],[0,2,7,0],[128,3,7,2],[256,3,8,3],[512,4,9,12],[1024,4,10,13],[-2049,6,32,62,"lower"],[2048,6,32,63]];break;case 7:e=[[-1024,4,9,8],[-512,3,8,0],[-256,4,7,9],[-128,5,6,26],[-64,5,5,27],[-32,4,5,10],[0,4,5,11],[32,5,5,28],[64,5,6,29],[128,4,7,12],[256,3,8,1],[512,3,9,2],[1024,3,10,3],[-1025,5,32,30,"lower"],[2048,5,32,31]];break;case 8:e=[[-15,8,3,252],[-7,9,1,508],[-5,8,1,253],[-3,9,0,509],[-2,7,0,124],[-1,4,0,10],[0,2,1,0],[2,5,0,26],[3,6,0,58],[4,3,4,4],[20,6,1,59],[22,4,4,11],[38,4,5,12],[70,5,6,27],[134,5,7,28],[262,6,7,60],[390,7,8,125],[646,6,10,61],[-16,9,32,510,"lower"],[1670,9,32,511],[2,1]];break;case 9:e=[[-31,8,4,252],[-15,9,2,508],[-11,8,2,253],[-7,9,1,509],[-5,7,1,124],[-3,4,1,10],[-1,3,1,2],[1,3,1,3],[3,5,1,26],[5,6,1,58],[7,3,5,4],[39,6,2,59],[43,4,5,11],[75,4,6,12],[139,5,7,27],[267,5,8,28],[523,6,8,60],[779,7,9,125],[1291,6,11,61],[-32,9,32,510,"lower"],[3339,9,32,511],[2,0]];break;case 10:e=[[-21,7,4,122],[-5,8,0,252],[-4,7,0,123],[-3,5,0,24],[-2,2,2,0],[2,5,0,25],[3,6,0,54],[4,7,0,124],[5,8,0,253],[6,2,6,1],[70,5,5,26],[102,6,5,55],[134,6,6,56],[198,6,7,57],[326,6,8,58],[582,6,9,59],[1094,6,10,60],[2118,7,11,125],[-22,8,32,254,"lower"],[4166,8,32,255],[2,2]];break;case 11:e=[[1,1,0,0],[2,2,1,2],[4,4,0,12],[5,4,1,13],[7,5,1,28],[9,5,2,29],[13,6,2,60],[17,7,2,122],[21,7,3,123],[29,7,4,124],[45,7,5,125],[77,7,6,126],[141,7,32,127]];break;case 12:e=[[1,1,0,0],[2,2,0,2],[3,3,1,6],[5,5,0,28],[6,5,1,29],[8,6,1,60],[10,7,0,122],[11,7,1,123],[13,7,2,124],[17,7,3,125],[25,7,4,126],[41,8,5,254],[73,8,32,255]];break;case 13:e=[[1,1,0,0],[2,3,0,4],[3,4,0,12],[4,5,0,28],[5,4,1,13],[7,3,3,5],[15,6,1,58],[17,6,2,59],[21,6,3,60],[29,6,4,61],[45,6,5,62],[77,7,6,126],[141,7,32,127]];break;case 14:e=[[-2,3,0,4],[-1,3,0,5],[0,1,0,0],[1,3,0,6],[2,3,0,7]];break;case 15:e=[[-24,7,4,124],[-8,6,2,60],[-4,5,1,28],[-2,4,0,12],[-1,3,0,4],[0,1,0,0],[1,3,0,5],[2,4,0,13],[3,5,1,29],[5,6,2,61],[9,7,4,125],[-25,7,32,126,"lower"],[25,7,32,127]];break;default:throw new a(`standard table B.${t} does not exist`)}for(let t=0,s=e.length;t<s;t++)e[t]=new F(e[t]);return s=new E(e,!0),T[t]=s,s}class P{constructor(t,e,s){this.data=t,this.start=e,this.end=s,this.position=e,this.shift=-1,this.currentByte=0}readBit(){if(this.shift<0){if(this.position>=this.end)throw new a("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}const t=this.currentByte>>this.shift&1;return this.shift--,t}readBits(t){let e,s=0;for(e=t-1;e>=0;e--)s|=this.readBit()<<e;return s}byteAlign(){this.shift=-1}next(){return this.position>=this.end?-1:this.data[this.position++]}}function R(t,e,s){let i=0;for(let n=0,r=e.length;n<r;n++){const r=s[e[n]];if(r){if(t===i)return r;i++}}throw new a("can't find custom Huffman table")}function N(t,e,s){const i=[];for(let n=0;n<s;n++){const s=new Uint8Array(e);i.push(s);for(let i=0;i<e;i++)s[i]=t.readBit();t.byteAlign()}return i}function L(t,e,s,i){const n=new o.CCITTFaxDecoder(t,{K:-1,Columns:e,Rows:s,BlackIs1:!0,EndOfBlock:i}),r=[];let a,c=!1;for(let t=0;t<s;t++){const t=new Uint8Array(e);r.push(t);let s=-1;for(let i=0;i<e;i++)s<0&&(a=n.readNextChar(),-1===a&&(a=0,c=!0),s=7),t[i]=a>>s&1,s--}if(i&&!c){const t=5;for(let e=0;e<t&&-1!==n.readNextChar();e++);}return r}e.Jbig2Image=class{parseChunks(t){return function(t){const e=new I;for(let s=0,i=t.length;s<i;s++){const i=t[s];_(k({},i.data,i.start,i.end),e)}return e.buffer}(t)}parse(t){throw new Error("Not implemented: Jbig2Image.parse")}}},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ArithmeticDecoder=void 0;const s=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];e.ArithmeticDecoder=class{constructor(t,e,s){this.data=t,this.bp=e,this.dataEnd=s,this.chigh=t[e],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}byteIn(){const t=this.data;let e=this.bp;255===t[e]?t[e+1]>143?(this.clow+=65280,this.ct=8):(e++,this.clow+=t[e]<<9,this.ct=7,this.bp=e):(e++,this.clow+=e<this.dataEnd?t[e]<<8:65280,this.ct=8,this.bp=e),this.clow>65535&&(this.chigh+=this.clow>>16,this.clow&=65535)}readBit(t,e){let i=t[e]>>1,n=1&t[e];const r=s[i],o=r.qe;let a,c=this.a-o;if(this.chigh<o)c<o?(c=o,a=n,i=r.nmps):(c=o,a=1^n,1===r.switchFlag&&(n=a),i=r.nlps);else{if(this.chigh-=o,32768&c)return this.a=c,n;c<o?(a=1^n,1===r.switchFlag&&(n=a),i=r.nlps):(a=n,i=r.nmps)}do{0===this.ct&&this.byteIn(),c<<=1,this.chigh=this.chigh<<1&65535|this.clow>>15&1,this.clow=this.clow<<1&65535,this.ct--}while(!(32768&c));return this.a=c,t[e]=i<<1|n,a}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.JpegStream=void 0;var i=s(18),n=s(4),r=s(27),o=s(2);e.JpegStream=class extends i.DecodeStream{constructor(t,e,s){let i;for(;-1!==(i=t.getByte());)if(255===i){t.skip(-1);break}super(e),this.stream=t,this.dict=t.dict,this.maybeLength=e,this.params=s}get bytes(){return(0,o.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(t){}readBlock(){if(this.eof)return;const t={decodeTransform:void 0,colorTransform:void 0},e=this.dict.getArray("D","Decode");if((this.forceRGBA||this.forceRGB)&&Array.isArray(e)){const s=this.dict.get("BPC","BitsPerComponent")||8,i=e.length,n=new Int32Array(i);let r=!1;const o=(1<<s)-1;for(let t=0;t<i;t+=2)n[t]=256*(e[t+1]-e[t])|0,n[t+1]=e[t]*o|0,256===n[t]&&0===n[t+1]||(r=!0);r&&(t.decodeTransform=n)}if(this.params instanceof n.Dict){const e=this.params.get("ColorTransform");Number.isInteger(e)&&(t.colorTransform=e)}const s=new r.JpegImage(t);s.parse(this.bytes);const i=s.getData({width:this.drawWidth,height:this.drawHeight,forceRGBA:this.forceRGBA,forceRGB:this.forceRGB,isSourcePDF:!0});this.buffer=i,this.bufferLength=i.length,this.eof=!0}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.JpegImage=void 0;var i=s(2),n=s(28),r=s(3);class o extends i.BaseException{constructor(t){super(`JPEG error: ${t}`,"JpegError")}}class a extends i.BaseException{constructor(t,e){super(t,"DNLMarkerError"),this.scanLines=e}}class c extends i.BaseException{constructor(t){super(t,"EOIMarkerError")}}const h=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]),l=4017,u=799,f=3406,d=2276,p=1567,g=3784,m=5793,w=2896;function b(t,e){let s,i,n=0,r=16;for(;r>0&&!t[r-1];)r--;const o=[{children:[],index:0}];let a,c=o[0];for(s=0;s<r;s++){for(i=0;i<t[s];i++){for(c=o.pop(),c.children[c.index]=e[n];c.index>0;)c=o.pop();for(c.index++,o.push(c);o.length<=s;)o.push(a={children:[],index:0}),c.children[c.index]=a.children,c=a;n++}s+1<r&&(o.push(a={children:[],index:0}),c.children[c.index]=a.children,c=a)}return o[0].children}function y(t,e,s){return 64*((t.blocksPerLine+1)*e+s)}function A(t,e,s,n,l,u,f,d,p,g=!1){const m=s.mcusPerLine,w=e;let b=0,A=0;function v(){if(A>0)return A--,b>>A&1;if(b=t[e++],255===b){const i=t[e++];if(i){if(220===i&&g){const i=(0,r.readUint16)(t,e+=2);if(e+=2,i>0&&i!==s.scanLines)throw new a("Found DNL marker (0xFFDC) while parsing scan data",i)}else if(217===i){if(g){const t=F*(8===s.precision?8:0);if(t>0&&Math.round(s.scanLines/t)>=5)throw new a("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",t)}throw new c("Found EOI marker (0xFFD9) while parsing scan data")}throw new o(`unexpected marker ${(b<<8|i).toString(16)}`)}}return A=7,b>>>7}function x(t){let e=t;for(;;){switch(e=e[v()],typeof e){case"number":return e;case"object":continue}throw new o("invalid huffman sequence")}}function S(t){let e=0;for(;t>0;)e=e<<1|v(),t--;return e}function M(t){if(1===t)return 1===v()?1:-1;const e=S(t);return e>=1<<t-1?e:e+(-1<<t)+1}let C,_=0,I=0,F=0;function O(t,e,s,i,n){F=(s/m|0)*t.v+i,e(t,y(t,F,s%m*t.h+n))}function E(t,e,s){F=s/t.blocksPerLine|0,e(t,y(t,F,s%t.blocksPerLine))}const T=n.length;let D,P,R,N,L,B;B=s.progressive?0===u?0===d?function(t,e){const s=x(t.huffmanTableDC),i=0===s?0:M(s)<<p;t.blockData[e]=t.pred+=i}:function(t,e){t.blockData[e]|=v()<<p}:0===d?function(t,e){if(_>0)return void _--;let s=u;const i=f;for(;s<=i;){const i=x(t.huffmanTableAC),n=15&i,r=i>>4;if(0!==n)s+=r,t.blockData[e+h[s]]=M(n)*(1<<p),s++;else{if(r<15){_=S(r)+(1<<r)-1;break}s+=16}}}:function(t,e){let s=u;const i=f;let n,r,a=0;for(;s<=i;){const i=e+h[s],c=t.blockData[i]<0?-1:1;switch(I){case 0:if(r=x(t.huffmanTableAC),n=15&r,a=r>>4,0===n)a<15?(_=S(a)+(1<<a),I=4):(a=16,I=1);else{if(1!==n)throw new o("invalid ACn encoding");C=M(n),I=a?2:3}continue;case 1:case 2:t.blockData[i]?t.blockData[i]+=c*(v()<<p):(a--,0===a&&(I=2===I?3:0));break;case 3:t.blockData[i]?t.blockData[i]+=c*(v()<<p):(t.blockData[i]=C<<p,I=0);break;case 4:t.blockData[i]&&(t.blockData[i]+=c*(v()<<p))}s++}4===I&&(_--,0===_&&(I=0))}:function(t,e){const s=x(t.huffmanTableDC),i=0===s?0:M(s);t.blockData[e]=t.pred+=i;let n=1;for(;n<64;){const s=x(t.huffmanTableAC),i=15&s,r=s>>4;if(0!==i)n+=r,t.blockData[e+h[n]]=M(i),n++;else{if(r<15)break;n+=16}}};let $,U=0;const j=1===T?n[0].blocksPerLine*n[0].blocksPerColumn:m*s.mcusPerColumn;let H,G;for(;U<=j;){const s=l?Math.min(j-U,l):j;if(s>0){for(P=0;P<T;P++)n[P].pred=0;if(_=0,1===T)for(D=n[0],L=0;L<s;L++)E(D,B,U),U++;else for(L=0;L<s;L++){for(P=0;P<T;P++)for(D=n[P],H=D.h,G=D.v,R=0;R<G;R++)for(N=0;N<H;N++)O(D,B,U,R,N);U++}}if(A=0,$=k(t,e),!$)break;if($.invalid&&((0,i.warn)(`decodeScan - ${s>0?"unexpected":"excessive"} MCU data, current marker is: ${$.invalid}`),e=$.offset),!($.marker>=65488&&$.marker<=65495))break;e+=2}return e-w}function v(t,e,s){const i=t.quantizationTable,n=t.blockData;let r,a,c,h,b,y,A,v,x,k,S,M,C,_,I,F,O;if(!i)throw new o("missing required Quantization Table.");for(let t=0;t<64;t+=8)x=n[e+t],k=n[e+t+1],S=n[e+t+2],M=n[e+t+3],C=n[e+t+4],_=n[e+t+5],I=n[e+t+6],F=n[e+t+7],x*=i[t],k|S|M|C|_|I|F?(k*=i[t+1],S*=i[t+2],M*=i[t+3],C*=i[t+4],_*=i[t+5],I*=i[t+6],F*=i[t+7],r=m*x+128>>8,a=m*C+128>>8,c=S,h=I,b=w*(k-F)+128>>8,v=w*(k+F)+128>>8,y=M<<4,A=_<<4,r=r+a+1>>1,a=r-a,O=c*g+h*p+128>>8,c=c*p-h*g+128>>8,h=O,b=b+A+1>>1,A=b-A,v=v+y+1>>1,y=v-y,r=r+h+1>>1,h=r-h,a=a+c+1>>1,c=a-c,O=b*d+v*f+2048>>12,b=b*f-v*d+2048>>12,v=O,O=y*u+A*l+2048>>12,y=y*l-A*u+2048>>12,A=O,s[t]=r+v,s[t+7]=r-v,s[t+1]=a+A,s[t+6]=a-A,s[t+2]=c+y,s[t+5]=c-y,s[t+3]=h+b,s[t+4]=h-b):(O=m*x+512>>10,s[t]=O,s[t+1]=O,s[t+2]=O,s[t+3]=O,s[t+4]=O,s[t+5]=O,s[t+6]=O,s[t+7]=O);for(let t=0;t<8;++t)x=s[t],k=s[t+8],S=s[t+16],M=s[t+24],C=s[t+32],_=s[t+40],I=s[t+48],F=s[t+56],k|S|M|C|_|I|F?(r=m*x+2048>>12,a=m*C+2048>>12,c=S,h=I,b=w*(k-F)+2048>>12,v=w*(k+F)+2048>>12,y=M,A=_,r=4112+(r+a+1>>1),a=r-a,O=c*g+h*p+2048>>12,c=c*p-h*g+2048>>12,h=O,b=b+A+1>>1,A=b-A,v=v+y+1>>1,y=v-y,r=r+h+1>>1,h=r-h,a=a+c+1>>1,c=a-c,O=b*d+v*f+2048>>12,b=b*f-v*d+2048>>12,v=O,O=y*u+A*l+2048>>12,y=y*l-A*u+2048>>12,A=O,x=r+v,F=r-v,k=a+A,I=a-A,S=c+y,_=c-y,M=h+b,C=h-b,x<16?x=0:x>=4080?x=255:x>>=4,k<16?k=0:k>=4080?k=255:k>>=4,S<16?S=0:S>=4080?S=255:S>>=4,M<16?M=0:M>=4080?M=255:M>>=4,C<16?C=0:C>=4080?C=255:C>>=4,_<16?_=0:_>=4080?_=255:_>>=4,I<16?I=0:I>=4080?I=255:I>>=4,F<16?F=0:F>=4080?F=255:F>>=4,n[e+t]=x,n[e+t+8]=k,n[e+t+16]=S,n[e+t+24]=M,n[e+t+32]=C,n[e+t+40]=_,n[e+t+48]=I,n[e+t+56]=F):(O=m*x+8192>>14,O=O<-2040?0:O>=2024?255:O+2056>>4,n[e+t]=O,n[e+t+8]=O,n[e+t+16]=O,n[e+t+24]=O,n[e+t+32]=O,n[e+t+40]=O,n[e+t+48]=O,n[e+t+56]=O)}function x(t,e){const s=e.blocksPerLine,i=e.blocksPerColumn,n=new Int16Array(64);for(let t=0;t<i;t++)for(let i=0;i<s;i++)v(e,y(e,t,i),n);return e.blockData}function k(t,e,s=e){const i=t.length-1;let n=s<e?s:e;if(e>=i)return null;const o=(0,r.readUint16)(t,e);if(o>=65472&&o<=65534)return{invalid:null,marker:o,offset:e};let a=(0,r.readUint16)(t,n);for(;!(a>=65472&&a<=65534);){if(++n>=i)return null;a=(0,r.readUint16)(t,n)}return{invalid:o.toString(16),marker:a,offset:n}}e.JpegImage=class{constructor({decodeTransform:t=null,colorTransform:e=-1}={}){this._decodeTransform=t,this._colorTransform=e}parse(t,{dnlScanLines:e=null}={}){function s(){const e=(0,r.readUint16)(t,f);f+=2;let s=f+e-2;const n=k(t,s,f);n?.invalid&&((0,i.warn)("readDataBlock - incorrect length, current marker is: "+n.invalid),s=n.offset);const o=t.subarray(f,s);return f+=o.length,o}function n(t){const e=Math.ceil(t.samplesPerLine/8/t.maxH),s=Math.ceil(t.scanLines/8/t.maxV);for(const i of t.components){const n=Math.ceil(Math.ceil(t.samplesPerLine/8)*i.h/t.maxH),r=Math.ceil(Math.ceil(t.scanLines/8)*i.v/t.maxV);i.blockData=new Int16Array(s*i.v*64*(e*i.h+1)),i.blocksPerLine=n,i.blocksPerColumn=r}t.mcusPerLine=e,t.mcusPerColumn=s}let l,u,f=0,d=null,p=null,g=0;const m=[],w=[],y=[];let v=(0,r.readUint16)(t,f);if(f+=2,65496!==v)throw new o("SOI not found");v=(0,r.readUint16)(t,f),f+=2;t:for(;65497!==v;){let x,S,M;switch(v){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:const C=s();65504===v&&74===C[0]&&70===C[1]&&73===C[2]&&70===C[3]&&0===C[4]&&(d={version:{major:C[5],minor:C[6]},densityUnits:C[7],xDensity:C[8]<<8|C[9],yDensity:C[10]<<8|C[11],thumbWidth:C[12],thumbHeight:C[13],thumbData:C.subarray(14,14+3*C[12]*C[13])}),65518===v&&65===C[0]&&100===C[1]&&111===C[2]&&98===C[3]&&101===C[4]&&(p={version:C[5]<<8|C[6],flags0:C[7]<<8|C[8],flags1:C[9]<<8|C[10],transformCode:C[11]});break;case 65499:const _=(0,r.readUint16)(t,f);f+=2;const I=_+f-2;let F;for(;f<I;){const e=t[f++],s=new Uint16Array(64);if(e>>4){if(e>>4!=1)throw new o("DQT - invalid table spec");for(S=0;S<64;S++)F=h[S],s[F]=(0,r.readUint16)(t,f),f+=2}else for(S=0;S<64;S++)F=h[S],s[F]=t[f++];m[15&e]=s}break;case 65472:case 65473:case 65474:if(l)throw new o("Only single frame JPEGs supported");f+=2,l={},l.extended=65473===v,l.progressive=65474===v,l.precision=t[f++];const O=(0,r.readUint16)(t,f);f+=2,l.scanLines=e||O,l.samplesPerLine=(0,r.readUint16)(t,f),f+=2,l.components=[],l.componentIds={};const E=t[f++];let T=0,D=0;for(x=0;x<E;x++){const e=t[f],s=t[f+1]>>4,i=15&t[f+1];T<s&&(T=s),D<i&&(D=i),M=l.components.push({h:s,v:i,quantizationId:t[f+2],quantizationTable:null}),l.componentIds[e]=M-1,f+=3}l.maxH=T,l.maxV=D,n(l);break;case 65476:const P=(0,r.readUint16)(t,f);for(f+=2,x=2;x<P;){const e=t[f++],s=new Uint8Array(16);let i=0;for(S=0;S<16;S++,f++)i+=s[S]=t[f];const n=new Uint8Array(i);for(S=0;S<i;S++,f++)n[S]=t[f];x+=17+i,(e>>4?w:y)[15&e]=b(s,n)}break;case 65501:f+=2,u=(0,r.readUint16)(t,f),f+=2;break;case 65498:const R=1==++g&&!e;f+=2;const N=t[f++],L=[];for(x=0;x<N;x++){const e=t[f++],s=l.components[l.componentIds[e]];s.index=e;const i=t[f++];s.huffmanTableDC=y[i>>4],s.huffmanTableAC=w[15&i],L.push(s)}const B=t[f++],$=t[f++],U=t[f++];try{const e=A(t,f,l,L,u,B,$,U>>4,15&U,R);f+=e}catch(e){if(e instanceof a)return(0,i.warn)(`${e.message} -- attempting to re-parse the JPEG image.`),this.parse(t,{dnlScanLines:e.scanLines});if(e instanceof c){(0,i.warn)(`${e.message} -- ignoring the rest of the image data.`);break t}throw e}break;case 65500:f+=4;break;case 65535:255!==t[f]&&f--;break;default:const j=k(t,f-2,f-3);if(j?.invalid){(0,i.warn)("JpegImage.parse - unexpected data, current marker is: "+j.invalid),f=j.offset;break}if(!j||f>=t.length-1){(0,i.warn)("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break t}throw new o("JpegImage.parse - unknown marker: "+v.toString(16))}v=(0,r.readUint16)(t,f),f+=2}this.width=l.samplesPerLine,this.height=l.scanLines,this.jfif=d,this.adobe=p,this.components=[];for(const t of l.components){const e=m[t.quantizationId];e&&(t.quantizationTable=e),this.components.push({index:t.index,output:x(0,t),scaleX:t.h/l.maxH,scaleY:t.v/l.maxV,blocksPerLine:t.blocksPerLine,blocksPerColumn:t.blocksPerColumn})}this.numComponents=this.components.length}_getLinearizedBlockData(t,e,s=!1){const i=this.width/t,n=this.height/e;let r,o,a,c,h,l,u,f,d,p,g,m=0;const w=this.components.length,b=t*e*w,y=new Uint8ClampedArray(b),A=new Uint32Array(t),v=4294967288;let x;for(u=0;u<w;u++){if(r=this.components[u],o=r.scaleX*i,a=r.scaleY*n,m=u,g=r.output,c=r.blocksPerLine+1<<3,o!==x){for(h=0;h<t;h++)f=0|h*o,A[h]=(f&v)<<3|7&f;x=o}for(l=0;l<e;l++)for(f=0|l*a,p=c*(f&v)|(7&f)<<3,h=0;h<t;h++)y[m]=g[p+A[h]],m+=w}let k=this._decodeTransform;if(s||4!==w||k||(k=new Int32Array([-256,255,-256,255,-256,255,-256,255])),k)for(u=0;u<b;)for(f=0,d=0;f<w;f++,u++,d+=2)y[u]=(y[u]*k[d]>>8)+k[d+1];return y}get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform}_convertYccToRgb(t){let e,s,i;for(let n=0,r=t.length;n<r;n+=3)e=t[n],s=t[n+1],i=t[n+2],t[n]=e-179.456+1.402*i,t[n+1]=e+135.459-.344*s-.714*i,t[n+2]=e-226.816+1.772*s;return t}_convertYccToRgba(t,e){for(let s=0,i=0,n=t.length;s<n;s+=3,i+=4){const n=t[s],r=t[s+1],o=t[s+2];e[i]=n-179.456+1.402*o,e[i+1]=n+135.459-.344*r-.714*o,e[i+2]=n-226.816+1.772*r,e[i+3]=255}return e}_convertYcckToRgb(t){let e,s,i,n,r=0;for(let o=0,a=t.length;o<a;o+=4)e=t[o],s=t[o+1],i=t[o+2],n=t[o+3],t[r++]=s*(-660635669420364e-19*s+.000437130475926232*i-54080610064599e-18*e+.00048449797120281*n-.154362151871126)-122.67195406894+i*(-.000957964378445773*i+.000817076911346625*e-.00477271405408747*n+1.53380253221734)+e*(.000961250184130688*e-.00266257332283933*n+.48357088451265)+n*(-.000336197177618394*n+.484791561490776),t[r++]=107.268039397724+s*(219927104525741e-19*s-.000640992018297945*i+.000659397001245577*e+.000426105652938837*n-.176491792462875)+i*(-.000778269941513683*i+.00130872261408275*e+.000770482631801132*n-.151051492775562)+e*(.00126935368114843*e-.00265090189010898*n+.25802910206845)+n*(-.000318913117588328*n-.213742400323665),t[r++]=s*(-.000570115196973677*s-263409051004589e-19*i+.0020741088115012*e-.00288260236853442*n+.814272968359295)-20.810012546947+i*(-153496057440975e-19*i-.000132689043961446*e+.000560833691242812*n-.195152027534049)+e*(.00174418132927582*e-.00255243321439347*n+.116935020465145)+n*(-.000343531996510555*n+.24165260232407);return t.subarray(0,r)}_convertYcckToRgba(t){for(let e=0,s=t.length;e<s;e+=4){const s=t[e],i=t[e+1],n=t[e+2],r=t[e+3];t[e]=i*(-660635669420364e-19*i+.000437130475926232*n-54080610064599e-18*s+.00048449797120281*r-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*s-.00477271405408747*r+1.53380253221734)+s*(.000961250184130688*s-.00266257332283933*r+.48357088451265)+r*(-.000336197177618394*r+.484791561490776),t[e+1]=107.268039397724+i*(219927104525741e-19*i-.000640992018297945*n+.000659397001245577*s+.000426105652938837*r-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*s+.000770482631801132*r-.151051492775562)+s*(.00126935368114843*s-.00265090189010898*r+.25802910206845)+r*(-.000318913117588328*r-.213742400323665),t[e+2]=i*(-.000570115196973677*i-263409051004589e-19*n+.0020741088115012*s-.00288260236853442*r+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*s+.000560833691242812*r-.195152027534049)+s*(.00174418132927582*s-.00255243321439347*r+.116935020465145)+r*(-.000343531996510555*r+.24165260232407),t[e+3]=255}return t}_convertYcckToCmyk(t){let e,s,i;for(let n=0,r=t.length;n<r;n+=4)e=t[n],s=t[n+1],i=t[n+2],t[n]=434.456-e-1.402*i,t[n+1]=119.541-e+.344*s+.714*i,t[n+2]=481.816-e-1.772*s;return t}_convertCmykToRgb(t){let e,s,i,n,r=0;for(let o=0,a=t.length;o<a;o+=4)e=t[o],s=t[o+1],i=t[o+2],n=t[o+3],t[r++]=255+e*(-6747147073602441e-20*e+.0008379262121013727*s+.0002894718188643294*i+.003264231057537806*n-1.1185611867203937)+s*(26374107616089405e-21*s-8626949158638572e-20*i-.0002748769067499491*n-.02155688794978967)+i*(-3878099212869363e-20*i-.0003267808279485286*n+.0686742238595345)-n*(.0003361971776183937*n+.7430659151342254),t[r++]=255+e*(.00013596372813588848*e+.000924537132573585*s+.00010567359618683593*i+.0004791864687436512*n-.3109689587515875)+s*(-.00023545346108370344*s+.0002702845253534714*i+.0020200308977307156*n-.7488052167015494)+i*(6834815998235662e-20*i+.00015168452363460973*n-.09751927774728933)-n*(.0003189131175883281*n+.7364883807733168),t[r++]=255+e*(13598650411385307e-21*e+.00012423956175490851*s+.0004751985097583589*i-36729317476630422e-22*n-.05562186980264034)+s*(.00016141380598724676*s+.0009692239130725186*i+.0007782692450036253*n-.44015232367526463)+i*(5.068882914068769e-7*i+.0017778369011375071*n-.7591454649749609)-n*(.0003435319965105553*n+.7063770186160144);return t.subarray(0,r)}_convertCmykToRgba(t){for(let e=0,s=t.length;e<s;e+=4){const s=t[e],i=t[e+1],n=t[e+2],r=t[e+3];t[e]=255+s*(-6747147073602441e-20*s+.0008379262121013727*i+.0002894718188643294*n+.003264231057537806*r-1.1185611867203937)+i*(26374107616089405e-21*i-8626949158638572e-20*n-.0002748769067499491*r-.02155688794978967)+n*(-3878099212869363e-20*n-.0003267808279485286*r+.0686742238595345)-r*(.0003361971776183937*r+.7430659151342254),t[e+1]=255+s*(.00013596372813588848*s+.000924537132573585*i+.00010567359618683593*n+.0004791864687436512*r-.3109689587515875)+i*(-.00023545346108370344*i+.0002702845253534714*n+.0020200308977307156*r-.7488052167015494)+n*(6834815998235662e-20*n+.00015168452363460973*r-.09751927774728933)-r*(.0003189131175883281*r+.7364883807733168),t[e+2]=255+s*(13598650411385307e-21*s+.00012423956175490851*i+.0004751985097583589*n-36729317476630422e-22*r-.05562186980264034)+i*(.00016141380598724676*i+.0009692239130725186*n+.0007782692450036253*r-.44015232367526463)+n*(5.068882914068769e-7*n+.0017778369011375071*r-.7591454649749609)-r*(.0003435319965105553*r+.7063770186160144),t[e+3]=255}return t}getData({width:t,height:e,forceRGBA:s=!1,forceRGB:i=!1,isSourcePDF:r=!1}){if(this.numComponents>4)throw new o("Unsupported color mode");const a=this._getLinearizedBlockData(t,e,r);if(1===this.numComponents&&(s||i)){const t=new Uint8ClampedArray(a.length*(s?4:3));let e=0;if(s)(0,n.grayToRGBA)(a,new Uint32Array(t.buffer));else for(const s of a)t[e++]=s,t[e++]=s,t[e++]=s;return t}if(3===this.numComponents&&this._isColorConversionNeeded){if(s){const t=new Uint8ClampedArray(a.length/3*4);return this._convertYccToRgba(a,t)}return this._convertYccToRgb(a)}if(4===this.numComponents){if(this._isColorConversionNeeded)return s?this._convertYcckToRgba(a):i?this._convertYcckToRgb(a):this._convertYcckToCmyk(a);if(s)return this._convertCmykToRgba(a);if(i)return this._convertCmykToRgb(a)}return a}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.convertBlackAndWhiteToRGBA=n,e.convertToRGBA=function(t){switch(t.kind){case i.ImageKind.GRAYSCALE_1BPP:return n(t);case i.ImageKind.RGB_24BPP:return function({src:t,srcPos:e=0,dest:s,destPos:n=0}){let r=0;const o=t.length>>2,a=new Uint32Array(t.buffer,e,o);if(i.FeatureTest.isLittleEndian){for(;r<o-2;r+=3,n+=4){const t=a[r],e=a[r+1],i=a[r+2];s[n]=4278190080|t,s[n+1]=t>>>24|e<<8|4278190080,s[n+2]=e>>>16|i<<16|4278190080,s[n+3]=i>>>8|4278190080}for(let e=4*r,i=t.length;e<i;e+=3)s[n++]=t[e]|t[e+1]<<8|t[e+2]<<16|4278190080}else{for(;r<o-2;r+=3,n+=4){const t=a[r],e=a[r+1],i=a[r+2];s[n]=255|t,s[n+1]=t<<24|e>>>8|255,s[n+2]=e<<16|i>>>16|255,s[n+3]=i<<8|255}for(let e=4*r,i=t.length;e<i;e+=3)s[n++]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|255}return{srcPos:e,destPos:n}}(t)}return null},e.grayToRGBA=function(t,e){if(i.FeatureTest.isLittleEndian)for(let s=0,i=t.length;s<i;s++)e[s]=65793*t[s]|4278190080;else for(let s=0,i=t.length;s<i;s++)e[s]=16843008*t[s]|255};var i=s(2);function n({src:t,srcPos:e=0,dest:s,width:n,height:r,nonBlackColor:o=4294967295,inverseDecode:a=!1}){const c=i.FeatureTest.isLittleEndian?4278190080:255,[h,l]=a?[o,c]:[c,o],u=n>>3,f=7&n,d=t.length;s=new Uint32Array(s.buffer);let p=0;for(let i=0;i<r;i++){for(const i=e+u;e<i;e++){const i=e<d?t[e]:255;s[p++]=128&i?l:h,s[p++]=64&i?l:h,s[p++]=32&i?l:h,s[p++]=16&i?l:h,s[p++]=8&i?l:h,s[p++]=4&i?l:h,s[p++]=2&i?l:h,s[p++]=1&i?l:h}if(0===f)continue;const i=e<d?t[e++]:255;for(let t=0;t<f;t++)s[p++]=i&1<<7-t?l:h}return{srcPos:e,destPos:p}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.JpxStream=void 0;var i=s(18),n=s(30),r=s(2);e.JpxStream=class extends i.DecodeStream{constructor(t,e,s){super(e),this.stream=t,this.dict=t.dict,this.maybeLength=e,this.params=s}get bytes(){return(0,r.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(t){}readBlock(){if(this.eof)return;const t=new n.JpxImage;t.parse(this.bytes);const e=t.width,s=t.height,i=t.componentsCount,r=t.tiles.length;if(1===r)this.buffer=t.tiles[0].items;else{const n=new Uint8ClampedArray(e*s*i);for(let s=0;s<r;s++){const r=t.tiles[s],o=r.height,a=r.items;let c=0,h=(e*r.top+r.left)*i;const l=e*i,u=r.width*i;for(let t=0;t<o;t++){const t=a.subarray(c,c+u);n.set(t,h),c+=u,h+=l}}this.buffer=n}this.bufferLength=this.buffer.length,this.eof=!0}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.JpxImage=void 0;var i=s(2),n=s(3),r=s(25);class o extends i.BaseException{constructor(t){super(`JPX error: ${t}`,"JpxError")}}const a={LL:0,LH:1,HL:1,HH:2};function c(t,e){t.x0=Math.ceil(e.XOsiz/t.XRsiz),t.x1=Math.ceil(e.Xsiz/t.XRsiz),t.y0=Math.ceil(e.YOsiz/t.YRsiz),t.y1=Math.ceil(e.Ysiz/t.YRsiz),t.width=t.x1-t.x0,t.height=t.y1-t.y0}function h(t,e){const s=t.SIZ,i=[];let n;const r=Math.ceil((s.Xsiz-s.XTOsiz)/s.XTsiz),o=Math.ceil((s.Ysiz-s.YTOsiz)/s.YTsiz);for(let t=0;t<o;t++)for(let e=0;e<r;e++)n={},n.tx0=Math.max(s.XTOsiz+e*s.XTsiz,s.XOsiz),n.ty0=Math.max(s.YTOsiz+t*s.YTsiz,s.YOsiz),n.tx1=Math.min(s.XTOsiz+(e+1)*s.XTsiz,s.Xsiz),n.ty1=Math.min(s.YTOsiz+(t+1)*s.YTsiz,s.Ysiz),n.width=n.tx1-n.tx0,n.height=n.ty1-n.ty0,n.components=[],i.push(n);t.tiles=i;for(let t=0,r=s.Csiz;t<r;t++){const s=e[t];for(let e=0,r=i.length;e<r;e++){const r={};n=i[e],r.tcx0=Math.ceil(n.tx0/s.XRsiz),r.tcy0=Math.ceil(n.ty0/s.YRsiz),r.tcx1=Math.ceil(n.tx1/s.XRsiz),r.tcy1=Math.ceil(n.ty1/s.YRsiz),r.width=r.tcx1-r.tcx0,r.height=r.tcy1-r.tcy0,n.components[t]=r}}}function l(t,e,s){const i=e.codingStyleParameters,n={};return i.entropyCoderWithCustomPrecincts?(n.PPx=i.precinctsSizes[s].PPx,n.PPy=i.precinctsSizes[s].PPy):(n.PPx=15,n.PPy=15),n.xcb_=s>0?Math.min(i.xcb,n.PPx-1):Math.min(i.xcb,n.PPx),n.ycb_=s>0?Math.min(i.ycb,n.PPy-1):Math.min(i.ycb,n.PPy),n}function u(t,e,s){const i=1<<s.PPx,n=1<<s.PPy,r=0===e.resLevel,o=1<<s.PPx+(r?0:-1),a=1<<s.PPy+(r?0:-1),c=e.trx1>e.trx0?Math.ceil(e.trx1/i)-Math.floor(e.trx0/i):0,h=e.try1>e.try0?Math.ceil(e.try1/n)-Math.floor(e.try0/n):0;e.precinctParameters={precinctWidth:i,precinctHeight:n,numprecinctswide:c,numprecinctshigh:h,numprecincts:c*h,precinctWidthInSubband:o,precinctHeightInSubband:a}}function f(t,e,s){const i=s.xcb_,n=s.ycb_,r=1<<i,o=1<<n,a=e.tbx0>>i,c=e.tby0>>n,h=e.tbx1+r-1>>i,l=e.tby1+o-1>>n,u=e.resolution.precinctParameters,f=[],d=[];let p,g,m,w;for(g=c;g<l;g++)for(p=a;p<h;p++){if(m={cbx:p,cby:g,tbx0:r*p,tby0:o*g,tbx1:r*(p+1),tby1:o*(g+1)},m.tbx0_=Math.max(e.tbx0,m.tbx0),m.tby0_=Math.max(e.tby0,m.tby0),m.tbx1_=Math.min(e.tbx1,m.tbx1),m.tby1_=Math.min(e.tby1,m.tby1),w=Math.floor((m.tbx0_-e.tbx0)/u.precinctWidthInSubband)+Math.floor((m.tby0_-e.tby0)/u.precinctHeightInSubband)*u.numprecinctswide,m.precinctNumber=w,m.subbandType=e.type,m.Lblock=3,m.tbx1_<=m.tbx0_||m.tby1_<=m.tby0_)continue;f.push(m);let t=d[w];void 0!==t?(p<t.cbxMin?t.cbxMin=p:p>t.cbxMax&&(t.cbxMax=p),g<t.cbyMin?t.cbxMin=g:g>t.cbyMax&&(t.cbyMax=g)):d[w]=t={cbxMin:p,cbyMin:g,cbxMax:p,cbyMax:g},m.precinct=t}e.codeblockParameters={codeblockWidth:i,codeblockHeight:n,numcodeblockwide:h-a+1,numcodeblockhigh:l-c+1},e.codeblocks=f,e.precincts=d}function d(t,e,s){const i=[],n=t.subbands;for(let t=0,s=n.length;t<s;t++){const s=n[t].codeblocks;for(let t=0,n=s.length;t<n;t++){const n=s[t];n.precinctNumber===e&&i.push(n)}}return{layerNumber:s,codeblocks:i}}function p(t){const e=t.tiles[t.currentTile.index],s=e.codingStyleDefaultParameters.layersCount,i=t.SIZ.Csiz;let n=0;for(let t=0;t<i;t++)n=Math.max(n,e.components[t].codingStyleParameters.decompositionLevelsCount);let r=0,a=0,c=0,h=0;this.nextPacket=function(){for(;r<s;r++){for(;a<=n;a++){for(;c<i;c++){const t=e.components[c];if(a>t.codingStyleParameters.decompositionLevelsCount)continue;const s=t.resolutions[a],i=s.precinctParameters.numprecincts;for(;h<i;){const t=d(s,h,r);return h++,t}h=0}c=0}a=0}throw new o("Out of packets")}}function g(t){const e=t.tiles[t.currentTile.index],s=e.codingStyleDefaultParameters.layersCount,i=t.SIZ.Csiz;let n=0;for(let t=0;t<i;t++)n=Math.max(n,e.components[t].codingStyleParameters.decompositionLevelsCount);let r=0,a=0,c=0,h=0;this.nextPacket=function(){for(;r<=n;r++){for(;a<s;a++){for(;c<i;c++){const t=e.components[c];if(r>t.codingStyleParameters.decompositionLevelsCount)continue;const s=t.resolutions[r],i=s.precinctParameters.numprecincts;for(;h<i;){const t=d(s,h,a);return h++,t}h=0}c=0}a=0}throw new o("Out of packets")}}function m(t){const e=t.tiles[t.currentTile.index],s=e.codingStyleDefaultParameters.layersCount,i=t.SIZ.Csiz;let n,r,a,c,h=0;for(a=0;a<i;a++)h=Math.max(h,e.components[a].codingStyleParameters.decompositionLevelsCount);const l=new Int32Array(h+1);for(r=0;r<=h;++r){let t=0;for(a=0;a<i;++a){const s=e.components[a].resolutions;r<s.length&&(t=Math.max(t,s[r].precinctParameters.numprecincts))}l[r]=t}n=0,r=0,a=0,c=0,this.nextPacket=function(){for(;r<=h;r++){for(;c<l[r];c++){for(;a<i;a++){const t=e.components[a];if(r>t.codingStyleParameters.decompositionLevelsCount)continue;const i=t.resolutions[r];if(!(c>=i.precinctParameters.numprecincts)){for(;n<s;){const t=d(i,c,n);return n++,t}n=0}}a=0}c=0}throw new o("Out of packets")}}function w(t){const e=t.tiles[t.currentTile.index],s=e.codingStyleDefaultParameters.layersCount,i=t.SIZ.Csiz,n=A(e),r=n;let a=0,c=0,h=0,l=0,u=0;this.nextPacket=function(){for(;u<r.maxNumHigh;u++){for(;l<r.maxNumWide;l++){for(;h<i;h++){const t=e.components[h],i=t.codingStyleParameters.decompositionLevelsCount;for(;c<=i;c++){const e=t.resolutions[c],i=y(l,u,n.components[h].resolutions[c],r,e);if(null!==i){for(;a<s;){const t=d(e,i,a);return a++,t}a=0}}c=0}h=0}l=0}throw new o("Out of packets")}}function b(t){const e=t.tiles[t.currentTile.index],s=e.codingStyleDefaultParameters.layersCount,i=t.SIZ.Csiz,n=A(e);let r=0,a=0,c=0,h=0,l=0;this.nextPacket=function(){for(;c<i;++c){const t=e.components[c],i=n.components[c],o=t.codingStyleParameters.decompositionLevelsCount;for(;l<i.maxNumHigh;l++){for(;h<i.maxNumWide;h++){for(;a<=o;a++){const e=t.resolutions[a],n=y(h,l,i.resolutions[a],i,e);if(null!==n){for(;r<s;){const t=d(e,n,r);return r++,t}r=0}}a=0}h=0}l=0}throw new o("Out of packets")}}function y(t,e,s,i,n){const r=t*i.minWidth,o=e*i.minHeight;return r%s.width!=0||o%s.height!=0?null:r/s.height+o/s.width*n.precinctParameters.numprecinctswide}function A(t){const e=t.components.length;let s=Number.MAX_VALUE,i=Number.MAX_VALUE,n=0,r=0;const o=new Array(e);for(let a=0;a<e;a++){const e=t.components[a],c=e.codingStyleParameters.decompositionLevelsCount,h=new Array(c+1);let l=Number.MAX_VALUE,u=Number.MAX_VALUE,f=0,d=0,p=1;for(let t=c;t>=0;--t){const s=e.resolutions[t],i=p*s.precinctParameters.precinctWidth,n=p*s.precinctParameters.precinctHeight;l=Math.min(l,i),u=Math.min(u,n),f=Math.max(f,s.precinctParameters.numprecinctswide),d=Math.max(d,s.precinctParameters.numprecinctshigh),h[t]={width:i,height:n},p<<=1}s=Math.min(s,l),i=Math.min(i,u),n=Math.max(n,f),r=Math.max(r,d),o[a]={resolutions:h,minWidth:l,minHeight:u,maxNumWide:f,maxNumHigh:d}}return{components:o,minWidth:s,minHeight:i,maxNumWide:n,maxNumHigh:r}}function v(t){const e=t.tiles[t.currentTile.index],s=t.SIZ.Csiz;for(let t=0;t<s;t++){const s=e.components[t],i=s.codingStyleParameters.decompositionLevelsCount,n=[],r=[];for(let t=0;t<=i;t++){const e=l(0,s,t),o={},a=1<<i-t;let c;if(o.trx0=Math.ceil(s.tcx0/a),o.try0=Math.ceil(s.tcy0/a),o.trx1=Math.ceil(s.tcx1/a),o.try1=Math.ceil(s.tcy1/a),o.resLevel=t,u(0,o,e),n.push(o),0===t)c={},c.type="LL",c.tbx0=Math.ceil(s.tcx0/a),c.tby0=Math.ceil(s.tcy0/a),c.tbx1=Math.ceil(s.tcx1/a),c.tby1=Math.ceil(s.tcy1/a),c.resolution=o,f(0,c,e),r.push(c),o.subbands=[c];else{const n=1<<i-t+1,a=[];c={},c.type="HL",c.tbx0=Math.ceil(s.tcx0/n-.5),c.tby0=Math.ceil(s.tcy0/n),c.tbx1=Math.ceil(s.tcx1/n-.5),c.tby1=Math.ceil(s.tcy1/n),c.resolution=o,f(0,c,e),r.push(c),a.push(c),c={},c.type="LH",c.tbx0=Math.ceil(s.tcx0/n),c.tby0=Math.ceil(s.tcy0/n-.5),c.tbx1=Math.ceil(s.tcx1/n),c.tby1=Math.ceil(s.tcy1/n-.5),c.resolution=o,f(0,c,e),r.push(c),a.push(c),c={},c.type="HH",c.tbx0=Math.ceil(s.tcx0/n-.5),c.tby0=Math.ceil(s.tcy0/n-.5),c.tbx1=Math.ceil(s.tcx1/n-.5),c.tby1=Math.ceil(s.tcy1/n-.5),c.resolution=o,f(0,c,e),r.push(c),a.push(c),o.subbands=a}}s.resolutions=n,s.subbands=r}const i=e.codingStyleDefaultParameters.progressionOrder;switch(i){case 0:e.packetsIterator=new p(t);break;case 1:e.packetsIterator=new g(t);break;case 2:e.packetsIterator=new m(t);break;case 3:e.packetsIterator=new w(t);break;case 4:e.packetsIterator=new b(t);break;default:throw new o(`Unsupported progression order ${i}`)}}function x(t,e,s,i){let r,a=0,c=0,h=!1;function l(t){for(;c<t;){const t=e[s+a];a++,h?(r=r<<7|t,c+=7,h=!1):(r=r<<8|t,c+=8),255===t&&(h=!0)}return c-=t,r>>>c&(1<<t)-1}function u(t){return 255===e[s+a-1]&&e[s+a]===t?(f(1),!0):255===e[s+a]&&e[s+a+1]===t&&(f(2),!0)}function f(t){a+=t}function d(){c=0,h&&(a++,h=!1)}function p(){if(0===l(1))return 1;if(0===l(1))return 2;let t=l(2);return t<3?t+3:(t=l(5),t<31?t+6:(t=l(7),t+37))}const g=t.COD.sopMarkerUsed,m=t.COD.ephMarkerUsed,w=t.tiles[t.currentTile.index].packetsIterator;for(;a<i;){d(),g&&u(145)&&f(4);const t=w.nextPacket();if(!l(1))continue;const i=t.layerNumber,r=[];let c;for(let e=0,s=t.codeblocks.length;e<s;e++){c=t.codeblocks[e];let s=c.precinct;const a=c.cbx-s.cbxMin,h=c.cby-s.cbyMin;let u,f,d=!1,g=!1;if(void 0!==c.included)d=!!l(1);else{let t;if(s=c.precinct,void 0!==s.inclusionTree)t=s.inclusionTree;else{const e=s.cbxMax-s.cbxMin+1,n=s.cbyMax-s.cbyMin+1;t=new _(e,n,i),f=new C(e,n),s.inclusionTree=t,s.zeroBitPlanesTree=f;for(let t=0;t<i;t++)if(0!==l(1))throw new o("Invalid tag tree")}if(t.reset(a,h,i))for(;;){if(!l(1)){t.incrementValue(i);break}if(u=!t.nextLevel(),u){c.included=!0,d=g=!0;break}}}if(!d)continue;if(g){for(f=s.zeroBitPlanesTree,f.reset(a,h);;)if(l(1)){if(u=!f.nextLevel(),u)break}else f.incrementValue();c.zeroBitPlanes=f.value}const m=p();for(;l(1);)c.Lblock++;const w=(0,n.log2)(m),b=l((m<1<<w?w-1:w)+c.Lblock);r.push({codeblock:c,codingpasses:m,dataLength:b})}for(d(),m&&u(146);r.length>0;){const t=r.shift();c=t.codeblock,void 0===c.data&&(c.data=[]),c.data.push({data:e,start:s+a,end:s+a+t.dataLength,codingpasses:t.codingpasses}),a+=t.dataLength}}return a}function k(t,e,s,i,n,o,a,c,h){const l=i.tbx0,u=i.tby0,f=i.tbx1-i.tbx0,d=i.codeblocks,p="H"===i.type.charAt(0)?1:0,g="H"===i.type.charAt(1)?e:0;for(let s=0,m=d.length;s<m;++s){const m=d[s],w=m.tbx1_-m.tbx0_,b=m.tby1_-m.tby0_;if(0===w||0===b)continue;if(void 0===m.data)continue;const y=new I(w,b,m.subbandType,m.zeroBitPlanes,o);let A=2;const v=m.data;let x,k,S,M=0,C=0;for(x=0,k=v.length;x<k;x++)S=v[x],M+=S.end-S.start,C+=S.codingpasses;const _=new Uint8Array(M);let F=0;for(x=0,k=v.length;x<k;x++){S=v[x];const t=S.data.subarray(S.start,S.end);_.set(t,F),F+=t.length}const O=new r.ArithmeticDecoder(_,0,M);for(y.setDecoder(O),x=0;x<C;x++){switch(A){case 0:y.runSignificancePropagationPass();break;case 1:y.runMagnitudeRefinementPass();break;case 2:y.runCleanupPass(),c&&y.checkSegmentationSymbol()}h&&y.reset(),A=(A+1)%3}let E=m.tbx0_-l+(m.tby0_-u)*f;const T=y.coefficentsSign,D=y.coefficentsMagnitude,P=y.bitsDecoded,R=a?0:.5;let N,L,B;F=0;const $="LL"!==i.type;for(x=0;x<b;x++){const s=2*(E/f|0)*(e-f)+p+g;for(N=0;N<w;N++)L=D[F],0!==L&&(L=(L+R)*n,0!==T[F]&&(L=-L),B=P[F],t[$?s+(E<<1):E]=a&&B>=o?L:L*(1<<o-B)),E++,F++;E+=f-w}}}function S(t,e,s){const i=e.components[s],n=i.codingStyleParameters,r=i.quantizationParameters,o=n.decompositionLevelsCount,c=r.SPqcds,h=r.scalarExpounded,l=r.guardBits,u=n.segmentationSymbolUsed,f=n.resetContextProbabilities,d=t.components[s].precision,p=n.reversibleTransformation,g=p?new E:new O,m=[];let w=0;for(let t=0;t<=o;t++){const e=i.resolutions[t],s=e.trx1-e.trx0,n=e.try1-e.try0,r=new Float32Array(s*n);for(let i=0,n=e.subbands.length;i<n;i++){let n,o;h?(n=c[w].mu,o=c[w].epsilon,w++):(n=c[0].mu,o=c[0].epsilon+(t>0?1-t:0));const g=e.subbands[i];k(r,s,0,g,p?1:2**(d+a[g.type]-o)*(1+n/2048),l+o-1,p,u,f)}m.push({width:s,height:n,items:r})}const b=g.calculate(m,i.tcx0,i.tcy0);return{left:i.tcx0,top:i.tcy0,width:b.width,height:b.height,items:b.items}}function M(t,e){const s=t.SIZ.Csiz,i=t.tiles[e];for(let e=0;e<s;e++){const s=i.components[e];s.quantizationParameters=void 0!==t.currentTile.QCC[e]?t.currentTile.QCC[e]:t.currentTile.QCD,s.codingStyleParameters=void 0!==t.currentTile.COC[e]?t.currentTile.COC[e]:t.currentTile.COD}i.codingStyleDefaultParameters=t.currentTile.COD}e.JpxImage=class{constructor(){this.failOnCorruptedImage=!1}parse(t){if(65359===(0,n.readUint16)(t,0))return void this.parseCodestream(t,0,t.length);const e=t.length;let s=0;for(;s<e;){let r=8,a=(0,n.readUint32)(t,s);const c=(0,n.readUint32)(t,s+4);if(s+=r,1===a&&(a=4294967296*(0,n.readUint32)(t,s)+(0,n.readUint32)(t,s+4),s+=8,r+=8),0===a&&(a=e-s+r),a<r)throw new o("Invalid box field size");const h=a-r;let l=!0;switch(c){case 1785737832:l=!1;break;case 1668246642:const e=t[s];if(1===e){const e=(0,n.readUint32)(t,s+3);switch(e){case 16:case 17:case 18:break;default:(0,i.warn)("Unknown colorspace "+e)}}else 2===e&&(0,i.info)("ICC profile not supported");break;case 1785737827:this.parseCodestream(t,s,s+h);break;case 1783636e3:218793738!==(0,n.readUint32)(t,s)&&(0,i.warn)("Invalid JP2 signature");break;case 1783634458:case 1718909296:case 1920099697:case 1919251232:case 1768449138:break;default:const r=String.fromCharCode(c>>24&255,c>>16&255,c>>8&255,255&c);(0,i.warn)(`Unsupported header type ${c} (${r}).`)}l&&(s+=h)}}parseImageProperties(t){let e=t.getByte();for(;e>=0;){const s=e;if(e=t.getByte(),65361==(s<<8|e)){t.skip(4);const e=t.getInt32()>>>0,s=t.getInt32()>>>0,i=t.getInt32()>>>0,n=t.getInt32()>>>0;t.skip(16);const r=t.getUint16();return this.width=e-i,this.height=s-n,this.componentsCount=r,void(this.bitsPerComponent=8)}}throw new o("No size marker found in JPX stream")}parseCodestream(t,e,s){const r={};let a=!1;try{let o=e;for(;o+1<s;){const e=(0,n.readUint16)(t,o);o+=2;let s,l,u,f,d,p,g=0;switch(e){case 65359:r.mainHeader=!0;break;case 65497:break;case 65361:g=(0,n.readUint16)(t,o);const m={};m.Xsiz=(0,n.readUint32)(t,o+4),m.Ysiz=(0,n.readUint32)(t,o+8),m.XOsiz=(0,n.readUint32)(t,o+12),m.YOsiz=(0,n.readUint32)(t,o+16),m.XTsiz=(0,n.readUint32)(t,o+20),m.YTsiz=(0,n.readUint32)(t,o+24),m.XTOsiz=(0,n.readUint32)(t,o+28),m.YTOsiz=(0,n.readUint32)(t,o+32);const w=(0,n.readUint16)(t,o+36);m.Csiz=w;const b=[];s=o+38;for(let e=0;e<w;e++){const e={precision:1+(127&t[s]),isSigned:!!(128&t[s]),XRsiz:t[s+1],YRsiz:t[s+2]};s+=3,c(e,m),b.push(e)}r.SIZ=m,r.components=b,h(r,b),r.QCC=[],r.COC=[];break;case 65372:g=(0,n.readUint16)(t,o);const y={};switch(s=o+2,l=t[s++],31&l){case 0:f=8,d=!0;break;case 1:f=16,d=!1;break;case 2:f=16,d=!0;break;default:throw new Error("Invalid SQcd value "+l)}for(y.noQuantization=8===f,y.scalarExpounded=d,y.guardBits=l>>5,u=[];s<g+o;){const e={};8===f?(e.epsilon=t[s++]>>3,e.mu=0):(e.epsilon=t[s]>>3,e.mu=(7&t[s])<<8|t[s+1],s+=2),u.push(e)}y.SPqcds=u,r.mainHeader?r.QCD=y:(r.currentTile.QCD=y,r.currentTile.QCC=[]);break;case 65373:g=(0,n.readUint16)(t,o);const A={};let k;switch(s=o+2,r.SIZ.Csiz<257?k=t[s++]:(k=(0,n.readUint16)(t,s),s+=2),l=t[s++],31&l){case 0:f=8,d=!0;break;case 1:f=16,d=!1;break;case 2:f=16,d=!0;break;default:throw new Error("Invalid SQcd value "+l)}for(A.noQuantization=8===f,A.scalarExpounded=d,A.guardBits=l>>5,u=[];s<g+o;){const e={};8===f?(e.epsilon=t[s++]>>3,e.mu=0):(e.epsilon=t[s]>>3,e.mu=(7&t[s])<<8|t[s+1],s+=2),u.push(e)}A.SPqcds=u,r.mainHeader?r.QCC[k]=A:r.currentTile.QCC[k]=A;break;case 65362:g=(0,n.readUint16)(t,o);const S={};s=o+2;const C=t[s++];S.entropyCoderWithCustomPrecincts=!!(1&C),S.sopMarkerUsed=!!(2&C),S.ephMarkerUsed=!!(4&C),S.progressionOrder=t[s++],S.layersCount=(0,n.readUint16)(t,s),s+=2,S.multipleComponentTransform=t[s++],S.decompositionLevelsCount=t[s++],S.xcb=2+(15&t[s++]),S.ycb=2+(15&t[s++]);const _=t[s++];if(S.selectiveArithmeticCodingBypass=!!(1&_),S.resetContextProbabilities=!!(2&_),S.terminationOnEachCodingPass=!!(4&_),S.verticallyStripe=!!(8&_),S.predictableTermination=!!(16&_),S.segmentationSymbolUsed=!!(32&_),S.reversibleTransformation=t[s++],S.entropyCoderWithCustomPrecincts){const e=[];for(;s<g+o;){const i=t[s++];e.push({PPx:15&i,PPy:i>>4})}S.precinctsSizes=e}const I=[];S.selectiveArithmeticCodingBypass&&I.push("selectiveArithmeticCodingBypass"),S.terminationOnEachCodingPass&&I.push("terminationOnEachCodingPass"),S.verticallyStripe&&I.push("verticallyStripe"),S.predictableTermination&&I.push("predictableTermination"),I.length>0&&(a=!0,(0,i.warn)(`JPX: Unsupported COD options (${I.join(", ")}).`)),r.mainHeader?r.COD=S:(r.currentTile.COD=S,r.currentTile.COC=[]);break;case 65424:g=(0,n.readUint16)(t,o),p={},p.index=(0,n.readUint16)(t,o+2),p.length=(0,n.readUint32)(t,o+4),p.dataEnd=p.length+o-2,p.partIndex=t[o+8],p.partsCount=t[o+9],r.mainHeader=!1,0===p.partIndex&&(p.COD=r.COD,p.COC=r.COC.slice(0),p.QCD=r.QCD,p.QCC=r.QCC.slice(0)),r.currentTile=p;break;case 65427:p=r.currentTile,0===p.partIndex&&(M(r,p.index),v(r)),g=p.dataEnd-o,x(r,t,o,g);break;case 65363:(0,i.warn)("JPX: Codestream code 0xFF53 (COC) is not implemented.");case 65365:case 65367:case 65368:case 65380:g=(0,n.readUint16)(t,o);break;default:throw new Error("Unknown codestream code: "+e.toString(16))}o+=g}}catch(t){if(a||this.failOnCorruptedImage)throw new o(t.message);(0,i.warn)(`JPX: Trying to recover from: "${t.message}".`)}this.tiles=function(t){const e=t.components,s=t.SIZ.Csiz,i=[];for(let n=0,r=t.tiles.length;n<r;n++){const r=t.tiles[n],o=[];for(let e=0;e<s;e++)o[e]=S(t,r,e);const a=o[0],c=new Uint8ClampedArray(a.items.length*s),h={left:a.left,top:a.top,width:a.width,height:a.height,items:c};let l,u,f,d,p,g,m,w=0;if(r.codingStyleDefaultParameters.multipleComponentTransform){const t=4===s,i=o[0].items,n=o[1].items,a=o[2].items,h=t?o[3].items:null;l=e[0].precision-8,u=.5+(128<<l);const b=s-3;if(d=i.length,r.components[0].codingStyleParameters.reversibleTransformation)for(f=0;f<d;f++,w+=b){p=i[f]+u,g=n[f],m=a[f];const t=p-(m+g>>2);c[w++]=t+m>>l,c[w++]=t>>l,c[w++]=t+g>>l}else for(f=0;f<d;f++,w+=b)p=i[f]+u,g=n[f],m=a[f],c[w++]=p+1.402*m>>l,c[w++]=p-.34413*g-.71414*m>>l,c[w++]=p+1.772*g>>l;if(t)for(f=0,w=3;f<d;f++,w+=4)c[w]=h[f]+u>>l}else for(let t=0;t<s;t++){const i=o[t].items;for(l=e[t].precision-8,u=.5+(128<<l),w=t,f=0,d=i.length;f<d;f++)c[w]=i[f]+u>>l,w+=s}i.push(h)}return i}(r),this.width=r.SIZ.Xsiz-r.SIZ.XOsiz,this.height=r.SIZ.Ysiz-r.SIZ.YOsiz,this.componentsCount=r.SIZ.Csiz}};class C{constructor(t,e){const s=(0,n.log2)(Math.max(t,e))+1;this.levels=[];for(let i=0;i<s;i++)this.levels.push({width:t,height:e,items:[]}),t=Math.ceil(t/2),e=Math.ceil(e/2)}reset(t,e){let s,i=0,n=0;for(;i<this.levels.length;){s=this.levels[i];const r=t+e*s.width;if(void 0!==s.items[r]){n=s.items[r];break}s.index=r,t>>=1,e>>=1,i++}i--,s=this.levels[i],s.items[s.index]=n,this.currentLevel=i,delete this.value}incrementValue(){const t=this.levels[this.currentLevel];t.items[t.index]++}nextLevel(){let t=this.currentLevel,e=this.levels[t];const s=e.items[e.index];return t--,t<0?(this.value=s,!1):(this.currentLevel=t,e=this.levels[t],e.items[e.index]=s,!0)}}class _{constructor(t,e,s){const i=(0,n.log2)(Math.max(t,e))+1;this.levels=[];for(let n=0;n<i;n++){const i=new Uint8Array(t*e);for(let t=0,e=i.length;t<e;t++)i[t]=s;this.levels.push({width:t,height:e,items:i}),t=Math.ceil(t/2),e=Math.ceil(e/2)}}reset(t,e,s){let i=0;for(;i<this.levels.length;){const n=this.levels[i],r=t+e*n.width;n.index=r;const o=n.items[r];if(255===o)break;if(o>s)return this.currentLevel=i,this.propagateValues(),!1;t>>=1,e>>=1,i++}return this.currentLevel=i-1,!0}incrementValue(t){const e=this.levels[this.currentLevel];e.items[e.index]=t+1,this.propagateValues()}propagateValues(){let t=this.currentLevel,e=this.levels[t];const s=e.items[e.index];for(;--t>=0;)e=this.levels[t],e.items[e.index]=s}nextLevel(){let t=this.currentLevel,e=this.levels[t];const s=e.items[e.index];return e.items[e.index]=255,t--,!(t<0||(this.currentLevel=t,e=this.levels[t],e.items[e.index]=s,0))}}class I{static UNIFORM_CONTEXT=17;static RUNLENGTH_CONTEXT=18;static LLAndLHContextsLabel=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]);static HLContextLabel=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]);static HHContextLabel=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);constructor(t,e,s,i,n){let r;this.width=t,this.height=e,r="HH"===s?I.HHContextLabel:"HL"===s?I.HLContextLabel:I.LLAndLHContextsLabel,this.contextLabelTable=r;const o=t*e;let a;this.neighborsSignificance=new Uint8Array(o),this.coefficentsSign=new Uint8Array(o),a=n>14?new Uint32Array(o):n>6?new Uint16Array(o):new Uint8Array(o),this.coefficentsMagnitude=a,this.processingFlags=new Uint8Array(o);const c=new Uint8Array(o);if(0!==i)for(let t=0;t<o;t++)c[t]=i;this.bitsDecoded=c,this.reset()}setDecoder(t){this.decoder=t}reset(){this.contexts=new Int8Array(19),this.contexts[0]=8,this.contexts[I.UNIFORM_CONTEXT]=92,this.contexts[I.RUNLENGTH_CONTEXT]=6}setNeighborsSignificance(t,e,s){const i=this.neighborsSignificance,n=this.width,r=this.height,o=e>0,a=e+1<n;let c;t>0&&(c=s-n,o&&(i[c-1]+=16),a&&(i[c+1]+=16),i[c]+=4),t+1<r&&(c=s+n,o&&(i[c-1]+=16),a&&(i[c+1]+=16),i[c]+=4),o&&(i[s-1]+=1),a&&(i[s+1]+=1),i[s]|=128}runSignificancePropagationPass(){const t=this.decoder,e=this.width,s=this.height,i=this.coefficentsMagnitude,n=this.coefficentsSign,r=this.neighborsSignificance,o=this.processingFlags,a=this.contexts,c=this.contextLabelTable,h=this.bitsDecoded;for(let l=0;l<s;l+=4)for(let u=0;u<e;u++){let f=l*e+u;for(let d=0;d<4;d++,f+=e){const e=l+d;if(e>=s)break;if(o[f]&=-2,!i[f]&&r[f]){if(t.readBit(a,c[r[f]])){const t=this.decodeSignBit(e,u,f);n[f]=t,i[f]=1,this.setNeighborsSignificance(e,u,f),o[f]|=2}h[f]++,o[f]|=1}}}}decodeSignBit(t,e,s){const i=this.width,n=this.coefficentsMagnitude,r=this.coefficentsSign;let o,a,c,h,l,u;h=e>0&&0!==n[s-1],e+1<i&&0!==n[s+1]?(c=r[s+1],h?(a=r[s-1],o=1-c-a):o=1-c-c):h?(a=r[s-1],o=1-a-a):o=0;const f=3*o;return h=t>0&&0!==n[s-i],t+1<this.height&&0!==n[s+i]?(c=r[s+i],h?(a=r[s-i],o=1-c-a+f):o=1-c-c+f):h?(a=r[s-i],o=1-a-a+f):o=f,o>=0?(l=9+o,u=this.decoder.readBit(this.contexts,l)):(l=9-o,u=1^this.decoder.readBit(this.contexts,l)),u}runMagnitudeRefinementPass(){const t=this.decoder,e=this.width,s=this.coefficentsMagnitude,i=this.neighborsSignificance,n=this.contexts,r=this.bitsDecoded,o=this.processingFlags,a=e*this.height,c=4*e;for(let h,l=0;l<a;l=h){h=Math.min(a,l+c);for(let a=0;a<e;a++)for(let c=l+a;c<h;c+=e){if(!s[c]||1&o[c])continue;let e=16;2&o[c]&&(o[c]^=2,e=127&i[c]?14:15);const a=t.readBit(n,e);s[c]=s[c]<<1|a,r[c]++,o[c]|=1}}}runCleanupPass(){const t=this.decoder,e=this.width,s=this.height,i=this.neighborsSignificance,n=this.coefficentsMagnitude,r=this.coefficentsSign,o=this.contexts,a=this.contextLabelTable,c=this.bitsDecoded,h=this.processingFlags,l=e,u=2*e,f=3*e;let d;for(let p=0;p<s;p=d){d=Math.min(p+4,s);const g=p*e,m=p+3<s;for(let s=0;s<e;s++){const w=g+s;let b,y=0,A=w,v=p;if(m&&0===h[w]&&0===h[w+l]&&0===h[w+u]&&0===h[w+f]&&0===i[w]&&0===i[w+l]&&0===i[w+u]&&0===i[w+f]){if(!t.readBit(o,I.RUNLENGTH_CONTEXT)){c[w]++,c[w+l]++,c[w+u]++,c[w+f]++;continue}y=t.readBit(o,I.UNIFORM_CONTEXT)<<1|t.readBit(o,I.UNIFORM_CONTEXT),0!==y&&(v=p+y,A+=y*e),b=this.decodeSignBit(v,s,A),r[A]=b,n[A]=1,this.setNeighborsSignificance(v,s,A),h[A]|=2,A=w;for(let t=p;t<=v;t++,A+=e)c[A]++;y++}for(v=p+y;v<d;v++,A+=e)n[A]||1&h[A]||(1===t.readBit(o,a[i[A]])&&(b=this.decodeSignBit(v,s,A),r[A]=b,n[A]=1,this.setNeighborsSignificance(v,s,A),h[A]|=2),c[A]++)}}}checkSegmentationSymbol(){const t=this.decoder,e=this.contexts;if(10!=(t.readBit(e,I.UNIFORM_CONTEXT)<<3|t.readBit(e,I.UNIFORM_CONTEXT)<<2|t.readBit(e,I.UNIFORM_CONTEXT)<<1|t.readBit(e,I.UNIFORM_CONTEXT)))throw new o("Invalid segmentation symbol")}}class F{constructor(){this.constructor===F&&(0,i.unreachable)("Cannot initialize Transform.")}calculate(t,e,s){let i=t[0];for(let n=1,r=t.length;n<r;n++)i=this.iterate(i,t[n],e,s);return i}extend(t,e,s){let i=e-1,n=e+1,r=e+s-2,o=e+s;t[i--]=t[n++],t[o++]=t[r--],t[i--]=t[n++],t[o++]=t[r--],t[i--]=t[n++],t[o++]=t[r--],t[i]=t[n],t[o]=t[r]}filter(t,e,s){(0,i.unreachable)("Abstract method `filter` called")}iterate(t,e,s,i){const n=t.width,r=t.height;let o=t.items;const a=e.width,c=e.height,h=e.items;let l,u,f,d,p,g;for(f=0,l=0;l<r;l++)for(d=2*l*a,u=0;u<n;u++,f++,d+=2)h[d]=o[f];o=t.items=null;const m=new Float32Array(a+8);if(1===a){if(1&s)for(g=0,f=0;g<c;g++,f+=a)h[f]*=.5}else for(g=0,f=0;g<c;g++,f+=a)m.set(h.subarray(f,f+a),4),this.extend(m,4,a),this.filter(m,4,a),h.set(m.subarray(4,4+a),f);let w=16;const b=[];for(l=0;l<w;l++)b.push(new Float32Array(c+8));let y,A=0;if(t=4+c,1===c){if(1&i)for(p=0;p<a;p++)h[p]*=.5}else for(p=0;p<a;p++){if(0===A){for(w=Math.min(a-p,w),f=p,d=4;d<t;f+=a,d++)for(y=0;y<w;y++)b[y][d]=h[f+y];A=w}A--;const e=b[A];if(this.extend(e,4,c),this.filter(e,4,c),0===A)for(f=p-w+1,d=4;d<t;f+=a,d++)for(y=0;y<w;y++)h[f+y]=b[y][d]}return{width:a,height:c,items:h}}}class O extends F{filter(t,e,s){const i=s>>1;let n,r,o,a;const c=-1.586134342059924,h=-.052980118572961,l=.882911075530934,u=.443506852043971,f=1.230174104914001,d=1/f;for(n=(e|=0)-3,r=i+4;r--;n+=2)t[n]*=d;for(n=e-2,o=u*t[n-1],r=i+3;r--&&(a=u*t[n+1],t[n]=f*t[n]-o-a,r--);n+=2)n+=2,o=u*t[n+1],t[n]=f*t[n]-o-a;for(n=e-1,o=l*t[n-1],r=i+2;r--&&(a=l*t[n+1],t[n]-=o+a,r--);n+=2)n+=2,o=l*t[n+1],t[n]-=o+a;for(n=e,o=h*t[n-1],r=i+1;r--&&(a=h*t[n+1],t[n]-=o+a,r--);n+=2)n+=2,o=h*t[n+1],t[n]-=o+a;if(0!==i)for(n=e+1,o=c*t[n-1],r=i;r--&&(a=c*t[n+1],t[n]-=o+a,r--);n+=2)n+=2,o=c*t[n+1],t[n]-=o+a}}class E extends F{filter(t,e,s){const i=s>>1;let n,r;for(n=e|=0,r=i+1;r--;n+=2)t[n]-=t[n-1]+t[n+1]+2>>2;for(n=e+1,r=i;r--;n+=2)t[n]+=t[n-1]+t[n+1]>>1}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LZWStream=void 0;var i=s(18);e.LZWStream=class extends i.DecodeStream{constructor(t,e,s){super(e),this.str=t,this.dict=t.dict,this.cachedData=0,this.bitsCached=0;const i=4096,n={earlyChange:s,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(i),dictionaryLengths:new Uint16Array(i),dictionaryPrevCodes:new Uint16Array(i),currentSequence:new Uint8Array(i),currentSequenceLength:0};for(let t=0;t<256;++t)n.dictionaryValues[t]=t,n.dictionaryLengths[t]=1;this.lzwState=n}readBits(t){let e=this.bitsCached,s=this.cachedData;for(;e<t;){const t=this.str.getByte();if(-1===t)return this.eof=!0,null;s=s<<8|t,e+=8}return this.bitsCached=e-=t,this.cachedData=s,this.lastCode=null,s>>>e&(1<<t)-1}readBlock(){let t,e,s,i=1024;const n=this.lzwState;if(!n)return;const r=n.earlyChange;let o=n.nextCode;const a=n.dictionaryValues,c=n.dictionaryLengths,h=n.dictionaryPrevCodes;let l=n.codeLength,u=n.prevCode;const f=n.currentSequence;let d=n.currentSequenceLength,p=0,g=this.bufferLength,m=this.ensureBuffer(this.bufferLength+i);for(t=0;t<512;t++){const t=this.readBits(l),n=d>0;if(t<256)f[0]=t,d=1;else{if(!(t>=258)){if(256===t){l=9,o=258,d=0;continue}this.eof=!0,delete this.lzwState;break}if(t<o)for(d=c[t],e=d-1,s=t;e>=0;e--)f[e]=a[s],s=h[s];else f[d++]=f[0]}if(n&&(h[o]=u,c[o]=c[u]+1,a[o]=f[0],o++,l=o+r&o+r-1?l:0|Math.min(Math.log(o+r)/.6931471805599453+1,12)),u=t,p+=d,i<p){do{i+=512}while(i<p);m=this.ensureBuffer(this.bufferLength+i)}for(e=0;e<d;e++)m[g++]=f[e]}n.nextCode=o,n.codeLength=l,n.prevCode=u,n.currentSequenceLength=d,this.bufferLength=g}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PredictorStream=void 0;var i=s(18),n=s(4),r=s(2);e.PredictorStream=class extends i.DecodeStream{constructor(t,e,s){if(super(e),!(s instanceof n.Dict))return t;const i=this.predictor=s.get("Predictor")||1;if(i<=1)return t;if(2!==i&&(i<10||i>15))throw new r.FormatError(`Unsupported predictor: ${i}`);this.readBlock=2===i?this.readBlockTiff:this.readBlockPng,this.str=t,this.dict=t.dict;const o=this.colors=s.get("Colors")||1,a=this.bits=s.get("BPC","BitsPerComponent")||8,c=this.columns=s.get("Columns")||1;return this.pixBytes=o*a+7>>3,this.rowBytes=c*o*a+7>>3,this}readBlockTiff(){const t=this.rowBytes,e=this.bufferLength,s=this.ensureBuffer(e+t),i=this.bits,n=this.colors,r=this.str.getBytes(t);if(this.eof=!r.length,this.eof)return;let o,a=0,c=0,h=0,l=0,u=e;if(1===i&&1===n)for(o=0;o<t;++o){let t=r[o]^a;t^=t>>1,t^=t>>2,t^=t>>4,a=(1&t)<<7,s[u++]=t}else if(8===i){for(o=0;o<n;++o)s[u++]=r[o];for(;o<t;++o)s[u]=s[u-n]+r[o],u++}else if(16===i){const e=2*n;for(o=0;o<e;++o)s[u++]=r[o];for(;o<t;o+=2){const t=((255&r[o])<<8)+(255&r[o+1])+((255&s[u-e])<<8)+(255&s[u-e+1]);s[u++]=t>>8&255,s[u++]=255&t}}else{const t=new Uint8Array(n+1),u=(1<<i)-1;let f=0,d=e;const p=this.columns;for(o=0;o<p;++o)for(let e=0;e<n;++e)h<i&&(a=a<<8|255&r[f++],h+=8),t[e]=t[e]+(a>>h-i)&u,h-=i,c=c<<i|t[e],l+=i,l>=8&&(s[d++]=c>>l-8&255,l-=8);l>0&&(s[d++]=(c<<8-l)+(a&(1<<8-l)-1))}this.bufferLength+=t}readBlockPng(){const t=this.rowBytes,e=this.pixBytes,s=this.str.getByte(),i=this.str.getBytes(t);if(this.eof=!i.length,this.eof)return;const n=this.bufferLength,o=this.ensureBuffer(n+t);let a=o.subarray(n-t,n);0===a.length&&(a=new Uint8Array(t));let c,h,l,u=n;switch(s){case 0:for(c=0;c<t;++c)o[u++]=i[c];break;case 1:for(c=0;c<e;++c)o[u++]=i[c];for(;c<t;++c)o[u]=o[u-e]+i[c]&255,u++;break;case 2:for(c=0;c<t;++c)o[u++]=a[c]+i[c]&255;break;case 3:for(c=0;c<e;++c)o[u++]=(a[c]>>1)+i[c];for(;c<t;++c)o[u]=(a[c]+o[u-e]>>1)+i[c]&255,u++;break;case 4:for(c=0;c<e;++c)h=a[c],l=i[c],o[u++]=h+l;for(;c<t;++c){h=a[c];const t=a[c-e],s=o[u-e],n=s+h-t;let r=n-s;r<0&&(r=-r);let f=n-h;f<0&&(f=-f);let d=n-t;d<0&&(d=-d),l=i[c],o[u++]=r<=f&&r<=d?s+l:f<=d?h+l:t+l}break;default:throw new r.FormatError(`Unsupported predictor: ${s}`)}this.bufferLength+=t}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RunLengthStream=void 0;var i=s(18);e.RunLengthStream=class extends i.DecodeStream{constructor(t,e){super(e),this.str=t,this.dict=t.dict}readBlock(){const t=this.str.getBytes(2);if(!t||t.length<2||128===t[0])return void(this.eof=!0);let e,s=this.bufferLength,i=t[0];if(i<128){if(e=this.ensureBuffer(s+i+1),e[s++]=t[1],i>0){const t=this.str.getBytes(i);e.set(t,s),s+=i}}else{i=257-i;const n=t[1];e=this.ensureBuffer(s+i+1);for(let t=0;t<i;t++)e[s++]=n}this.bufferLength=s}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Font=e.ErrorFont=void 0;var i=s(2),n=s(35),r=s(38),o=s(40),a=s(39),c=s(37),h=s(41),l=s(42),u=s(43),f=s(44),d=s(45),p=s(46),g=s(14),m=s(47),w=s(3),b=s(8),y=s(48);const A=[[57344,63743],[1048576,1114109]],v=1e3,x=["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"],k=["cMap","defaultEncoding","differences","isMonospace","isSerifFont","isSymbolicFont","seacMap","toFontChar","toUnicode","vmetrics","widths"];function S(t){if(!t.fontMatrix)return;if(t.fontMatrix[0]===i.FONT_IDENTITY_MATRIX[0])return;const e=.001/t.fontMatrix[0],s=t.widths;for(const t in s)s[t]*=e;t.defaultWidth*=e}function M(t){if(!t.fallbackToUnicode)return;if(t.toUnicode instanceof l.IdentityToUnicodeMap)return;const e=[];for(const s in t.fallbackToUnicode)t.toUnicode.has(s)||(e[s]=t.fallbackToUnicode[s]);e.length>0&&t.toUnicode.amend(e)}class C{constructor(t,e,s,i,n,r,o,a,c){this.originalCharCode=t,this.fontChar=e,this.unicode=s,this.accent=i,this.width=n,this.vmetric=r,this.operatorListId=o,this.isSpace=a,this.isInFont=c}get category(){return(0,i.shadow)(this,"category",(0,o.getCharUnicodeCategory)(this.unicode),!0)}}function _(t,e){return(t<<8)+e}function I(t,e,s){t[e+1]=s,t[e]=s>>>8}function F(t,e){const s=(t<<8)+e;return 32768&s?s-65536:s}function O(t){return String.fromCharCode(t>>8&255,255&t)}function E(t){return t>32767?t=32767:t<-32768&&(t=-32768),String.fromCharCode(t>>8&255,255&t)}function T(t){const e=t.peekBytes(4);return"ttcf"===(0,i.bytesToString)(e)}function D(t,e){for(const s in e)t[+s]=e[s]}function P(t,e,s){const i=[];let n;for(let s=0,r=t.length;s<r;s++)n=(0,o.getUnicodeForGlyph)(t[s],e),-1!==n&&(i[s]=n);for(const t in s)n=(0,o.getUnicodeForGlyph)(s[t],e),-1!==n&&(i[+t]=n);return i}function R(t){return 1===t.platform&&0===t.encoding&&0===t.language}function N(t){return 3===t.platform&&1===t.encoding&&1033===t.language}function L(t,e,s=!1){switch(e.length){case 1:return e.charCodeAt(0);case 2:return e.charCodeAt(0)<<8|e.charCodeAt(1)}const n=`Unsupported CID string (charCode ${t}): "${e}".`;if(s)throw new i.FormatError(n);return(0,i.warn)(n),e}function B(t,e,s,n){const r=Object.create(null),o=new Map,a=[],c=new Set;let h=0,l=A[h][0],u=A[h][1];for(let d in t){d|=0;let p=t[d];if(!e(p))continue;if(l>u){if(h++,h>=A.length){(0,i.warn)("Ran out of space in font private use area.");break}l=A[h][0],u=A[h][1]}const g=l++;0===p&&(p=s);let m=n.get(d);"string"==typeof m&&(m=m.codePointAt(0)),!m||A[0][0]<=(f=m)&&f<=A[0][1]||A[1][0]<=f&&f<=A[1][1]||c.has(p)||(o.set(m,p),c.add(p)),r[g]=p,a[d]=g}var f;return{toFontChar:a,charCodeToGlyphId:r,toUnicodeExtraMap:o,nextAvailableFontCharCode:l}}function $(t,e,s){const n=function(t,e,s){const i=[];for(const e in t)t[e]>=s||i.push({fontCharCode:0|e,glyphId:t[e]});if(e)for(const[t,n]of e)n>=s||i.push({fontCharCode:t,glyphId:n});0===i.length&&i.push({fontCharCode:0,glyphId:0}),i.sort((function(t,e){return t.fontCharCode-e.fontCharCode}));const n=[],r=i.length;for(let t=0;t<r;){const e=i[t].fontCharCode,s=[i[t].glyphId];++t;let o=e;for(;t<r&&o+1===i[t].fontCharCode&&(s.push(i[t].glyphId),++o,++t,65535!==o););n.push([e,o,s])}return n}(t,e,s),r=n.at(-1)[1]>65535?2:1;let o,a,c,h,l="\0\0"+O(r)+"\0\0"+(0,i.string32)(4+8*r);for(o=n.length-1;o>=0&&!(n[o][0]<=65535);--o);const u=o+1;n[o][0]<65535&&65535===n[o][1]&&(n[o][1]=65534);const f=n[o][1]<65535?1:0,d=u+f,p=m.OpenTypeFileBuilder.getSearchParams(d,2);let g,w,b,y,A="",v="",x="",k="",S="",M=0;for(o=0,a=u;o<a;o++){g=n[o],w=g[0],b=g[1],A+=O(w),v+=O(b),y=g[2];let t=!0;for(c=1,h=y.length;c<h;++c)if(y[c]!==y[c-1]+1){t=!1;break}if(t)x+=O(y[0]-w&65535),k+=O(0);else{const t=2*(d-o)+2*M;for(M+=b-w+1,x+=O(0),k+=O(t),c=0,h=y.length;c<h;++c)S+=O(y[c])}}f>0&&(v+="ÿÿ",A+="ÿÿ",x+="\0",k+="\0\0");const C="\0\0"+O(2*d)+O(p.range)+O(p.entry)+O(p.rangeShift)+v+"\0\0"+A+x+k+S;let _="",I="";if(r>1){for(l+="\0\0\n"+(0,i.string32)(4+8*r+4+C.length),_="",o=0,a=n.length;o<a;o++){g=n[o],w=g[0],y=g[2];let t=y[0];for(c=1,h=y.length;c<h;++c)y[c]!==y[c-1]+1&&(b=g[0]+c-1,_+=(0,i.string32)(w)+(0,i.string32)(b)+(0,i.string32)(t),w=b+1,t=y[c]);_+=(0,i.string32)(w)+(0,i.string32)(g[1])+(0,i.string32)(t)}I="\0\f\0\0"+(0,i.string32)(_.length+16)+"\0\0\0\0"+(0,i.string32)(_.length/12)}return l+"\0"+O(C.length+4)+C+I+_}function U(t,e,s){s||={unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};let n=0,r=0,a=0,c=0,h=null,l=0,u=-1;if(e){for(let t in e)if(t|=0,(h>t||!h)&&(h=t),l<t&&(l=t),u=(0,o.getUnicodeRangeFor)(t,u),u<32)n|=1<<u;else if(u<64)r|=1<<u-32;else if(u<96)a|=1<<u-64;else{if(!(u<123))throw new i.FormatError("Unicode ranges Bits > 123 are reserved for internal usage");c|=1<<u-96}l>65535&&(l=65535)}else h=0,l=255;const f=t.bbox||[0,0,0,0],d=t.ascentScaled?1:(s.unitsPerEm||1/(t.fontMatrix||i.FONT_IDENTITY_MATRIX)[0])/v,p=s.ascent||Math.round(d*(t.ascent||f[3]));let g=s.descent||Math.round(d*(t.descent||f[1]));g>0&&t.descent>0&&f[1]<0&&(g=-g);const m=s.yMax||p,w=-s.yMin||-g;return"\0$ô\0\0\0Š»\0\0\0ŒŠ»\0\0ß\x001\0\0\0\0"+String.fromCharCode(t.fixedPitch?9:0)+"\0\0\0\0\0\0"+(0,i.string32)(n)+(0,i.string32)(r)+(0,i.string32)(a)+(0,i.string32)(c)+"*21*"+O(t.italicAngle?1:0)+O(h||t.firstChar)+O(l||t.lastChar)+O(p)+O(g)+"\0d"+O(m)+O(w)+"\0\0\0\0\0\0\0\0"+O(t.xHeight)+O(t.capHeight)+O(0)+O(h||t.firstChar)+"\0"}function j(t){const e=Math.floor(65536*t.italicAngle);return"\0\0\0"+(0,i.string32)(e)+"\0\0\0\0"+(0,i.string32)(t.fixedPitch?1:0)+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}function H(t){return t.replaceAll(/[^\x21-\x7E]|[[\](){}<>/%]/g,"").slice(0,63)}function G(t,e){e||(e=[[],[]]);const s=[e[0][0]||"Original licence",e[0][1]||t,e[0][2]||"Unknown",e[0][3]||"uniqueID",e[0][4]||t,e[0][5]||"Version 0.11",e[0][6]||H(t),e[0][7]||"Unknown",e[0][8]||"Unknown",e[0][9]||"Unknown"],i=[];let n,r,o,a,c;for(n=0,r=s.length;n<r;n++){c=e[1][n]||s[n];const t=[];for(o=0,a=c.length;o<a;o++)t.push(O(c.charCodeAt(o)));i.push(t.join(""))}const h=[s,i],l=["\0","\0"],u=["\0\0","\0"],f=["\0\0","\t"],d=s.length*l.length;let p="\0\0"+O(d)+O(12*d+6),g=0;for(n=0,r=l.length;n<r;n++){const t=h[n];for(o=0,a=t.length;o<a;o++)c=t[o],p+=l[n]+u[n]+f[n]+O(o)+O(c.length)+O(g),g+=c.length}return p+=s.join("")+i.join(""),p}e.Font=class{constructor(t,e,s){this.name=t,this.psName=null,this.mimetype=null,this.disableFontFace=!1,this.loadedName=s.loadedName,this.isType3Font=s.isType3Font,this.missingFile=!1,this.cssFontInfo=s.cssFontInfo,this._charsCache=Object.create(null),this._glyphCache=Object.create(null);let n=!!(s.flags&r.FontFlags.Serif);if(!n&&!s.isSimulatedFlags){const e=t.replaceAll(/[,_]/g,"-").split("-")[0],s=(0,h.getSerifFonts)();for(const t of e.split("+"))if(s[t]){n=!0;break}}this.isSerifFont=n,this.isSymbolicFont=!!(s.flags&r.FontFlags.Symbolic),this.isMonospace=!!(s.flags&r.FontFlags.FixedPitch);let{type:o,subtype:a}=s;this.type=o,this.subtype=a,this.systemFontInfo=s.systemFontInfo;const c=t.match(/^InvalidPDFjsFont_(.*)_\d+$/);if(this.isInvalidPDFjsFont=!!c,this.fallbackName=this.isInvalidPDFjsFont?c[1]:this.isMonospace?"monospace":this.isSerifFont?"serif":"sans-serif",this.systemFontInfo?.guessFallback&&(this.systemFontInfo.guessFallback=!1,this.systemFontInfo.css+=`,${this.fallbackName}`),this.differences=s.differences,this.widths=s.widths,this.defaultWidth=s.defaultWidth,this.composite=s.composite,this.cMap=s.cMap,this.capHeight=s.capHeight/v,this.ascent=s.ascent/v,this.descent=s.descent/v,this.lineHeight=this.ascent-this.descent,this.fontMatrix=s.fontMatrix,this.bbox=s.bbox,this.defaultEncoding=s.defaultEncoding,this.toUnicode=s.toUnicode,this.toFontChar=[],"Type3"===s.type){for(let t=0;t<256;t++)this.toFontChar[t]=this.differences[t]||s.defaultEncoding[t];return}if(this.cidEncoding=s.cidEncoding||"",this.vertical=!!s.vertical,this.vertical&&(this.vmetrics=s.vmetrics,this.defaultVMetrics=s.defaultVMetrics),!e||e.isEmpty)return e&&(0,i.warn)('Font file is empty in "'+t+'" ('+this.loadedName+")"),void this.fallbackToSystemFont(s);let l;[o,a]=function(t,{type:e,subtype:s,composite:n}){let r,o;return function(t){const e=t.peekBytes(4);return 65536===(0,w.readUint32)(e,0)||"true"===(0,i.bytesToString)(e)}(t)||T(t)?r=n?"CIDFontType2":"TrueType":function(t){const e=t.peekBytes(4);return"OTTO"===(0,i.bytesToString)(e)}(t)?r=n?"CIDFontType2":"OpenType":function(t){const e=t.peekBytes(2);return 37===e[0]&&33===e[1]||128===e[0]&&1===e[1]}(t)?r=n?"CIDFontType0":"MMType1"===e?"MMType1":"Type1":function(t){const e=t.peekBytes(4);return e[0]>=1&&e[3]>=1&&e[3]<=4}(t)?n?(r="CIDFontType0",o="CIDFontType0C"):(r="MMType1"===e?"MMType1":"Type1",o="Type1C"):((0,i.warn)("getFontFileType: Unable to detect correct font file Type/Subtype."),r=e,o=s),[r,o]}(e,s),o===this.type&&a===this.subtype||(0,i.info)(`Inconsistent font file Type/SubType, expected: ${this.type}/${this.subtype} but found: ${o}/${a}.`);try{switch(o){case"MMType1":(0,i.info)("MMType1 font ("+t+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";const n="Type1C"===a||"CIDFontType0C"===a?new u.CFFFont(e,s):new y.Type1Font(t,e,s);S(s),l=this.convert(t,n,s);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",l=this.checkAndRepair(t,e,s),this.isOpenType&&(S(s),o="OpenType");break;default:throw new i.FormatError(`Font ${o} is not supported`)}}catch(t){return(0,i.warn)(t),void this.fallbackToSystemFont(s)}M(s),this.data=l,this.type=o,this.subtype=a,this.fontMatrix=s.fontMatrix,this.widths=s.widths,this.defaultWidth=s.defaultWidth,this.toUnicode=s.toUnicode,this.seacMap=s.seacMap}get renderer(){const t=f.FontRendererFactory.create(this,r.SEAC_ANALYSIS_ENABLED);return(0,i.shadow)(this,"renderer",t)}exportData(t=!1){const e=t?[...x,...k]:x,s=Object.create(null);let i,n;for(i of e)n=this[i],void 0!==n&&(s[i]=n);return s}fallbackToSystemFont(t){this.missingFile=!0;const{name:e,type:s}=this;let i=(0,r.normalizeFontName)(e);const n=(0,h.getStdFontMap)(),u=(0,h.getNonStdFontMap)(),f=!!n[i],p=!(!u[i]||!n[u[i]]);i=n[i]||u[i]||i;const g=(0,d.getFontBasicMetrics)()[i];g&&(isNaN(this.ascent)&&(this.ascent=g.ascent/v),isNaN(this.descent)&&(this.descent=g.descent/v),isNaN(this.capHeight)&&(this.capHeight=g.capHeight/v)),this.bold=/bold/gi.test(i),this.italic=/oblique|italic/gi.test(i),this.black=/Black/g.test(e);const m=/Narrow/g.test(e);if(this.remeasure=(!f||m)&&Object.keys(this.widths).length>0,(f||p)&&"CIDFontType2"===s&&this.cidEncoding.startsWith("Identity-")){const s=t.cidToGidMap,i=[];if(D(i,(0,h.getGlyphMapForStandardFonts)()),/Arial-?Black/i.test(e)?D(i,(0,h.getSupplementalGlyphMapForArialBlack)()):/Calibri/i.test(e)&&D(i,(0,h.getSupplementalGlyphMapForCalibri)()),s){for(const t in i){const e=i[t];void 0!==s[e]&&(i[+t]=s[e])}s.length!==this.toUnicode.length&&t.hasIncludedToUnicodeMap&&this.toUnicode instanceof l.IdentityToUnicodeMap&&this.toUnicode.forEach((function(t,e){void 0===s[i[t]]&&(i[+t]=e)}))}this.toUnicode instanceof l.IdentityToUnicodeMap||this.toUnicode.forEach((function(t,e){i[+t]=e})),this.toFontChar=i,this.toUnicode=new l.ToUnicodeMap(i)}else if(/Symbol/i.test(i))this.toFontChar=P(c.SymbolSetEncoding,(0,a.getGlyphsUnicode)(),this.differences);else if(/Dingbats/i.test(i))this.toFontChar=P(c.ZapfDingbatsEncoding,(0,a.getDingbatsGlyphsUnicode)(),this.differences);else if(f){const t=P(this.defaultEncoding,(0,a.getGlyphsUnicode)(),this.differences);"CIDFontType2"!==s||this.cidEncoding.startsWith("Identity-")||this.toUnicode instanceof l.IdentityToUnicodeMap||this.toUnicode.forEach((function(e,s){t[+e]=s})),this.toFontChar=t}else{const t=(0,a.getGlyphsUnicode)(),s=[];this.toUnicode.forEach(((e,i)=>{if(!this.composite){const s=(0,o.getUnicodeForGlyph)(this.differences[e]||this.defaultEncoding[e],t);-1!==s&&(i=s)}s[+e]=i})),this.composite&&this.toUnicode instanceof l.IdentityToUnicodeMap&&/Tahoma|Verdana/i.test(e)&&D(s,(0,h.getGlyphMapForStandardFonts)()),this.toFontChar=s}M(t),this.loadedName=i.split("-")[0]}checkAndRepair(t,e,s){const o=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function h(t,e){const s=Object.create(null);s["OS/2"]=null,s.cmap=null,s.head=null,s.hhea=null,s.hmtx=null,s.maxp=null,s.name=null,s.post=null;for(let i=0;i<e;i++){const e=f(t);o.includes(e.tag)&&0!==e.length&&(s[e.tag]=e)}return s}function f(t){const e=t.getString(4),s=t.getInt32()>>>0,i=t.getInt32()>>>0,n=t.getInt32()>>>0,r=t.pos;t.pos=t.start||0,t.skip(i);const o=t.getBytes(n);return t.pos=r,"head"===e&&(o[8]=o[9]=o[10]=o[11]=0,o[17]|=32),{tag:e,checksum:s,length:n,offset:i,data:o}}function d(t){return{version:t.getString(4),numTables:t.getUint16(),searchRange:t.getUint16(),entrySelector:t.getUint16(),rangeShift:t.getUint16()}}function w(t,e,s,i,n,r){const o={length:0,sizeOfInstructions:0};if(e<0||e>=t.length||s>t.length||s-e<=12)return o;const a=t.subarray(e,s),c=F(a[2],a[3]),h=F(a[4],a[5]),l=F(a[6],a[7]),u=F(a[8],a[9]);c>l&&(I(a,2,l),I(a,6,c)),h>u&&(I(a,4,u),I(a,8,h));const f=F(a[0],a[1]);if(f<0)return f<-1||(i.set(a,n),o.length=a.length),o;let d,p=10,g=0;for(d=0;d<f;d++)g=1+(a[p]<<8|a[p+1]),p+=2;const m=p,w=a[p]<<8|a[p+1];o.sizeOfInstructions=w,p+=2+w;const b=p;let y=0;for(d=0;d<g;d++){const t=a[p++];192&t&&(a[p-1]=63&t);let e=2;2&t?e=1:16&t&&(e=0);let s=2;4&t?s=1:32&t&&(s=0);const i=e+s;if(y+=i,8&t){const t=a[p++];0===t&&(a[p-1]^=8),d+=t,y+=t*i}}if(0===y)return o;let A=p+y;return A>a.length?o:!r&&w>0?(i.set(a.subarray(0,m),n),i.set([0,0],n+m),i.set(a.subarray(b,A),n+m+2),A-=w,a.length-A>3&&(A=A+3&-4),o.length=A,o):a.length-A>3?(A=A+3&-4,i.set(a.subarray(0,A),n),o.length=A,o):(i.set(a,n),o.length=a.length,o)}function y(t){const s=(e.start||0)+t.offset;e.pos=s;const i=[[],[]],n=[],r=t.length,o=s+r;if(0!==e.getUint16()||r<6)return[i,n];const a=e.getUint16(),c=e.getUint16();let h,l;for(h=0;h<a&&e.pos+12<=o;h++){const t={platform:e.getUint16(),encoding:e.getUint16(),language:e.getUint16(),name:e.getUint16(),length:e.getUint16(),offset:e.getUint16()};(R(t)||N(t))&&n.push(t)}for(h=0,l=n.length;h<l;h++){const t=n[h];if(t.length<=0)continue;const r=s+c+t.offset;if(r+t.length>o)continue;e.pos=r;const a=t.name;if(t.encoding){let s="";for(let i=0,n=t.length;i<n;i+=2)s+=String.fromCharCode(e.getUint16());i[1][a]=s}else i[0][a]=e.getString(t.length)}return[i,n]}const A=[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];function v(t,e){let s,n,r,o,a,c=t.data,h=0,l=0,u=0;const f=[],d=[],p=[];let g=e.tooComplexToFollowFunctions,m=!1,w=0,b=0;for(let t=c.length;h<t;){const t=c[h++];if(64===t)if(n=c[h++],m||b)h+=n;else for(s=0;s<n;s++)f.push(c[h++]);else if(65===t)if(n=c[h++],m||b)h+=2*n;else for(s=0;s<n;s++)r=c[h++],f.push(r<<8|c[h++]);else if(176==(248&t))if(n=t-176+1,m||b)h+=n;else for(s=0;s<n;s++)f.push(c[h++]);else if(184==(248&t))if(n=t-184+1,m||b)h+=2*n;else for(s=0;s<n;s++)r=c[h++],f.push(r<<8|c[h++]);else if(43!==t||g)if(44!==t||g){if(45===t)if(m)m=!1,l=h;else{if(a=d.pop(),!a)return(0,i.warn)("TT: ENDF bad stack"),void(e.hintsValid=!1);o=p.pop(),c=a.data,h=a.i,e.functionsStackDeltas[o]=f.length-a.stackTop}else if(137===t)(m||b)&&((0,i.warn)("TT: nested IDEFs not allowed"),g=!0),m=!0,u=h;else if(88===t)++w;else if(27===t)b=w;else if(89===t)b===w&&(b=0),--w;else if(28===t&&!m&&!b){const t=f.at(-1);t>0&&(h+=t-1)}}else(m||b)&&((0,i.warn)("TT: nested FDEFs not allowed"),g=!0),m=!0,u=h,o=f.pop(),e.functionsDefined[o]={data:c,i:h};else if(!m&&!b)if(o=f.at(-1),isNaN(o))(0,i.info)("TT: CALL empty stack (or invalid entry).");else if(e.functionsUsed[o]=!0,o in e.functionsStackDeltas){const t=f.length+e.functionsStackDeltas[o];if(t<0)return(0,i.warn)("TT: CALL invalid functions stack delta."),void(e.hintsValid=!1);f.length=t}else if(o in e.functionsDefined&&!p.includes(o)){if(d.push({data:c,i:h,stackTop:f.length-1}),p.push(o),a=e.functionsDefined[o],!a)return(0,i.warn)("TT: CALL non-existent function"),void(e.hintsValid=!1);c=a.data,h=a.i}if(!m&&!b){let e=0;for(t<=142?e=A[t]:t>=192&&t<=223?e=-1:t>=224&&(e=-2),t>=113&&t<=117&&(n=f.pop(),isNaN(n)||(e=2*-n));e<0&&f.length>0;)f.pop(),e++;for(;e>0;)f.push(NaN),e--}}e.tooComplexToFollowFunctions=g;const y=[c];h>c.length&&y.push(new Uint8Array(h-c.length)),u>l&&((0,i.warn)("TT: complementing a missing function tail"),y.push(new Uint8Array([34,45]))),function(t,e){if(e.length>1){let s,i,n=0;for(s=0,i=e.length;s<i;s++)n+=e[s].length;n=n+3&-4;const r=new Uint8Array(n);let o=0;for(s=0,i=e.length;s<i;s++)r.set(e[s],o),o+=e[s].length;t.data=r,t.length=n}}(t,y)}let x,k,M,C;if(T(e=new b.Stream(new Uint8Array(e.getBytes())))){const t=function(t,e){const{numFonts:s,offsetTable:n}=function(t){const e=t.getString(4);(0,i.assert)("ttcf"===e,"Must be a TrueType Collection font.");const s=t.getUint16(),n=t.getUint16(),r=t.getInt32()>>>0,o=[];for(let e=0;e<r;e++)o.push(t.getInt32()>>>0);const a={ttcTag:e,majorVersion:s,minorVersion:n,numFonts:r,offsetTable:o};switch(s){case 1:return a;case 2:return a.dsigTag=t.getInt32()>>>0,a.dsigLength=t.getInt32()>>>0,a.dsigOffset=t.getInt32()>>>0,a}throw new i.FormatError(`Invalid TrueType Collection majorVersion: ${s}.`)}(t),r=e.split("+");let o;for(let a=0;a<s;a++){t.pos=(t.start||0)+n[a];const s=d(t),c=h(t,s.numTables);if(!c.name)throw new i.FormatError('TrueType Collection font must contain a "name" table.');const[l]=y(c.name);for(let t=0,i=l.length;t<i;t++)for(let i=0,n=l[t].length;i<n;i++){const n=l[t][i]?.replaceAll(/\s/g,"");if(n){if(n===e)return{header:s,tables:c};if(!(r.length<2))for(const t of r)n===t&&(o={name:t,header:s,tables:c})}}}if(o)return(0,i.warn)(`TrueType Collection does not contain "${e}" font, falling back to "${o.name}" font instead.`),{header:o.header,tables:o.tables};throw new i.FormatError(`TrueType Collection does not contain "${e}" font.`)}(e,this.name);x=t.header,k=t.tables}else x=d(e),k=h(e,x.numTables);const O=!k["CFF "];if(O){if(!k.loca)throw new i.FormatError('Required "loca" table is not found');k.glyf||((0,i.warn)('Required "glyf" table is not found -- trying to recover.'),k.glyf={tag:"glyf",data:new Uint8Array(0)}),this.isOpenType=!1}else{if("OTTO"===x.version&&(!s.composite||!(s.cidToGidMap?.length>0)&&s.cMap instanceof g.IdentityCMap)||!k.head||!k.hhea||!k.maxp||!k.post)return C=new b.Stream(k["CFF "].data),M=new u.CFFFont(C,s),S(s),this.convert(t,M,s);delete k.glyf,delete k.loca,delete k.fpgm,delete k.prep,delete k["cvt "],this.isOpenType=!0}if(!k.maxp)throw new i.FormatError('Required "maxp" table is not found');e.pos=(e.start||0)+k.maxp.offset;const E=e.getInt32(),D=e.getUint16();if(s.scaleFactors?.length===D&&O){const{scaleFactors:t}=s,e=_(k.head.data[50],k.head.data[51]),i=new p.GlyfTable({glyfTable:k.glyf.data,isGlyphLocationsLong:e,locaTable:k.loca.data,numGlyphs:D});i.scale(t);const{glyf:n,loca:r,isLocationLong:o}=i.write();k.glyf.data=n,k.loca.data=r,o!==!!e&&(k.head.data[50]=0,k.head.data[51]=o?1:0);const a=k.hmtx.data;for(let e=0;e<D;e++){const s=4*e,i=Math.round(t[e]*_(a[s],a[s+1]));a[s]=i>>8&255,a[s+1]=255&i,I(a,s+2,Math.round(t[e]*F(a[s+2],a[s+3])))}}let P=D+1,H=!0;P>65535&&(H=!1,P=D,(0,i.warn)("Not enough space in glyfs to duplicate first glyph."));let q=0,X=0;E>=65536&&k.maxp.length>=22&&(e.pos+=8,e.getUint16()>2&&(k.maxp.data[14]=0,k.maxp.data[15]=2),e.pos+=4,q=e.getUint16(),e.pos+=4,X=e.getUint16()),k.maxp.data[4]=P>>8,k.maxp.data[5]=255&P;const W=function(t,e,s,n){const r={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(t&&v(t,r),e&&v(e,r),t&&function(t,e){if(!t.tooComplexToFollowFunctions){if(t.functionsDefined.length>e)return(0,i.warn)("TT: more functions defined than expected"),void(t.hintsValid=!1);for(let s=0,n=t.functionsUsed.length;s<n;s++){if(s>e)return(0,i.warn)("TT: invalid function id: "+s),void(t.hintsValid=!1);if(t.functionsUsed[s]&&!t.functionsDefined[s])return(0,i.warn)("TT: undefined function: "+s),void(t.hintsValid=!1)}}}(r,n),s&&1&s.length){const t=new Uint8Array(s.length+1);t.set(s.data),s.data=t}return r.hintsValid}(k.fpgm,k.prep,k["cvt "],q);if(W||(delete k.fpgm,delete k.prep,delete k["cvt "]),function(t,e,s,n,r,o){if(!e)return void(s&&(s.data=null));t.pos=(t.start||0)+e.offset,t.pos+=4,t.pos+=2,t.pos+=2,t.pos+=2,t.pos+=2,t.pos+=2,t.pos+=2,t.pos+=2,t.pos+=2,t.pos+=2;const a=t.getUint16();t.pos+=8,t.pos+=2;let c=t.getUint16();0!==a&&(2&_(n.data[44],n.data[45])||(e.data[22]=0,e.data[23]=0)),c>r&&((0,i.info)(`The numOfMetrics (${c}) should not be greater than the numGlyphs (${r}).`),c=r,e.data[34]=(65280&c)>>8,e.data[35]=255&c);const h=r-c-(s.length-4*c>>1);if(h>0){const t=new Uint8Array(s.length+2*h);t.set(s.data),o&&(t[s.length]=s.data[2],t[s.length+1]=s.data[3]),s.data=t}}(e,k.hhea,k.hmtx,k.head,P,H),!k.head)throw new i.FormatError('Required "head" table is not found');!function(t,e,s){const n=t.data,r=(n[0]<<24)+(n[1]<<16)+(n[2]<<8)+n[3];r>>16!=1&&((0,i.info)("Attempting to fix invalid version in head table: "+r),n[0]=0,n[1]=1,n[2]=0,n[3]=0);const o=_(n[50],n[51]);if(o<0||o>1){(0,i.info)("Attempting to fix invalid indexToLocFormat in head table: "+o);const t=e+1;if(s===t<<1)n[50]=0,n[51]=0;else{if(s!==t<<2)throw new i.FormatError("Could not fix indexToLocFormat: "+o);n[50]=0,n[51]=1}}}(k.head,D,O?k.loca.length:0);let z=Object.create(null);if(O){const t=_(k.head.data[50],k.head.data[51]),e=function(t,e,s,i,n,r,o){let a,c,h;i?(a=4,c=function(t,e){return t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]},h=function(t,e,s){t[e]=s>>>24&255,t[e+1]=s>>16&255,t[e+2]=s>>8&255,t[e+3]=255&s}):(a=2,c=function(t,e){return t[e]<<9|t[e+1]<<1},h=function(t,e,s){t[e]=s>>9&255,t[e+1]=s>>1&255});const l=r?s+1:s,u=a*(1+l),f=new Uint8Array(u);f.set(t.data.subarray(0,u)),t.data=f;const d=e.data,p=d.length,g=new Uint8Array(p);let m,b;const y=[];for(m=0,b=0;m<s+1;m++,b+=a){let t=c(f,b);t>p&&(t=p),y.push({index:m,offset:t,endOffset:0})}for(y.sort(((t,e)=>t.offset-e.offset)),m=0;m<s;m++)y[m].endOffset=y[m+1].offset;for(y.sort(((t,e)=>t.index-e.index)),m=0;m<s;m++){const{offset:t,endOffset:e}=y[m];if(0!==t||0!==e)break;const s=y[m+1].offset;if(0!==s){y[m].endOffset=s;break}}const A=Object.create(null);let v=0;for(h(f,0,v),m=0,b=a;m<s;m++,b+=a){const t=w(d,y[m].offset,y[m].endOffset,g,v,n),e=t.length;0===e&&(A[m]=!0),t.sizeOfInstructions>o&&(o=t.sizeOfInstructions),v+=e,h(f,b,v)}if(0===v){const t=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(m=0,b=a;m<l;m++,b+=a)h(f,b,t.length);e.data=t}else if(r){const s=c(f,a);g.length>s+v?e.data=g.subarray(0,s+v):(e.data=new Uint8Array(s+v),e.data.set(g.subarray(0,v))),e.data.set(g.subarray(0,s),v),h(t.data,f.length-a,v+s)}else e.data=g.subarray(0,v);return{missingGlyphs:A,maxSizeOfInstructions:o}}(k.loca,k.glyf,D,t,W,H,X);z=e.missingGlyphs,E>=65536&&k.maxp.length>=22&&(k.maxp.data[26]=e.maxSizeOfInstructions>>8,k.maxp.data[27]=255&e.maxSizeOfInstructions)}if(!k.hhea)throw new i.FormatError('Required "hhea" table is not found');0===k.hhea.data[10]&&0===k.hhea.data[11]&&(k.hhea.data[10]=255,k.hhea.data[11]=255);const V={unitsPerEm:_(k.head.data[18],k.head.data[19]),yMax:F(k.head.data[42],k.head.data[43]),yMin:F(k.head.data[38],k.head.data[39]),ascent:F(k.hhea.data[4],k.hhea.data[5]),descent:F(k.hhea.data[6],k.hhea.data[7]),lineGap:F(k.hhea.data[8],k.hhea.data[9])};this.ascent=V.ascent/V.unitsPerEm,this.descent=V.descent/V.unitsPerEm,this.lineGap=V.lineGap/V.unitsPerEm,this.cssFontInfo?.lineHeight?(this.lineHeight=this.cssFontInfo.metrics.lineHeight,this.lineGap=this.cssFontInfo.metrics.lineGap):this.lineHeight=this.ascent-this.descent+this.lineGap,k.post&&function(t,s,n){const o=(e.start||0)+t.offset;e.pos=o;const a=o+t.length,c=e.getInt32();let h;e.skip(28);let l,u=!0;switch(c){case 65536:h=r.MacStandardGlyphOrdering;break;case 131072:const t=e.getUint16();if(t!==n){u=!1;break}const o=[];for(l=0;l<t;++l){const t=e.getUint16();if(t>=32768){u=!1;break}o.push(t)}if(!u)break;const f=[],d=[];for(;e.pos<a;){const t=e.getByte();for(d.length=t,l=0;l<t;++l)d[l]=String.fromCharCode(e.getByte());f.push(d.join(""))}for(h=[],l=0;l<t;++l){const t=o[l];h.push(t<258?r.MacStandardGlyphOrdering[t]:f[t-258])}break;case 196608:break;default:(0,i.warn)("Unknown/unsupported post table version "+c),u=!1,s.defaultEncoding&&(h=s.defaultEncoding)}s.glyphNames=h}(k.post,s,D),k.post={tag:"post",data:j(s)};const K=[];function J(t){return!z[t]}if(s.composite){const t=s.cidToGidMap||[],e=0===t.length;s.cMap.forEach((function(s,n){if("string"==typeof n&&(n=L(s,n,!0)),n>65535)throw new i.FormatError("Max size of CID is 65,535");let r=-1;e?r=n:void 0!==t[n]&&(r=t[n]),r>=0&&r<D&&J(r)&&(K[s]=r)}))}else{const t=function(t,e,s,n){if(!t)return(0,i.warn)("No cmap table available."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};let r,o=(e.start||0)+t.offset;e.pos=o,e.skip(2);const a=e.getUint16();let c,h=!1;for(let t=0;t<a;t++){const i=e.getUint16(),r=e.getUint16(),o=e.getInt32()>>>0;let l=!1;if(c?.platformId!==i||c?.encodingId!==r){if(0!==i||0!==r&&1!==r&&3!==r)if(1===i&&0===r)l=!0;else if(3!==i||1!==r||!n&&c){if(s&&3===i&&0===r){l=!0;let s=!0;if(t<a-1){const t=e.peekBytes(2);_(t[0],t[1])<i&&(s=!1)}s&&(h=!0)}}else l=!0,s||(h=!0);else l=!0;if(l&&(c={platformId:i,encodingId:r,offset:o}),h)break}}if(c&&(e.pos=o+c.offset),!c||-1===e.peekByte())return(0,i.warn)("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};const l=e.getUint16();let u=!1;const f=[];let d,p;if(0===l){for(e.skip(4),d=0;d<256;d++){const t=e.getByte();t&&f.push({charCode:d,glyphId:t})}u=!0}else if(2===l){e.skip(4);const t=[];let s=0;for(let i=0;i<256;i++){const i=e.getUint16()>>3;t.push(i),s=Math.max(i,s)}const i=[];for(let t=0;t<=s;t++)i.push({firstCode:e.getUint16(),entryCount:e.getUint16(),idDelta:F(e.getByte(),e.getByte()),idRangePos:e.pos+e.getUint16()});for(let s=0;s<256;s++)if(0===t[s])e.pos=i[0].idRangePos+2*s,p=e.getUint16(),f.push({charCode:s,glyphId:p});else{const n=i[t[s]];for(d=0;d<n.entryCount;d++){const t=(s<<8)+d+n.firstCode;e.pos=n.idRangePos+2*d,p=e.getUint16(),0!==p&&(p=(p+n.idDelta)%65536),f.push({charCode:t,glyphId:p})}}}else if(4===l){e.skip(4);const t=e.getUint16()>>1;e.skip(6);const s=[];let i;for(i=0;i<t;i++)s.push({end:e.getUint16()});for(e.skip(2),i=0;i<t;i++)s[i].start=e.getUint16();for(i=0;i<t;i++)s[i].delta=e.getUint16();let n,a=0;for(i=0;i<t;i++){r=s[i];const o=e.getUint16();o?(n=(o>>1)-(t-i),r.offsetIndex=n,a=Math.max(a,n+r.end-r.start+1)):r.offsetIndex=-1}const c=[];for(d=0;d<a;d++)c.push(e.getUint16());for(i=0;i<t;i++){r=s[i],o=r.start;const t=r.end,e=r.delta;for(n=r.offsetIndex,d=o;d<=t;d++)65535!==d&&(p=n<0?d:c[n+d-o],p=p+e&65535,f.push({charCode:d,glyphId:p}))}}else if(6===l){e.skip(4);const t=e.getUint16(),s=e.getUint16();for(d=0;d<s;d++)p=e.getUint16(),f.push({charCode:t+d,glyphId:p})}else{if(12!==l)return(0,i.warn)("cmap table has unsupported format: "+l),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};{e.skip(10);const t=e.getInt32()>>>0;for(d=0;d<t;d++){const t=e.getInt32()>>>0,s=e.getInt32()>>>0;let i=e.getInt32()>>>0;for(let e=t;e<=s;e++)f.push({charCode:e,glyphId:i++})}}}f.sort((function(t,e){return t.charCode-e.charCode}));for(let t=1;t<f.length;t++)f[t-1].charCode===f[t].charCode&&(f.splice(t,1),t--);return{platformId:c.platformId,encodingId:c.encodingId,mappings:f,hasShortCmap:u}}(k.cmap,e,this.isSymbolicFont,s.hasEncoding),n=t.platformId,o=t.encodingId,h=t.mappings;let u=[],f=!1;if(!s.hasEncoding||"MacRomanEncoding"!==s.baseEncodingName&&"WinAnsiEncoding"!==s.baseEncodingName||(u=(0,c.getEncoding)(s.baseEncodingName)),s.hasEncoding&&!this.isSymbolicFont&&(3===n&&1===o||1===n&&0===o)){const t=(0,a.getGlyphsUnicode)();for(let e=0;e<256;e++){let i;if(i=void 0!==this.differences[e]?this.differences[e]:u.length&&""!==u[e]?u[e]:c.StandardEncoding[e],!i)continue;const a=(0,r.recoverGlyphName)(i,t);let f;if(3===n&&1===o?f=t[a]:1===n&&0===o&&(f=c.MacRomanEncoding.indexOf(a)),void 0===f){if(!s.glyphNames&&s.hasIncludedToUnicodeMap&&!(this.toUnicode instanceof l.IdentityToUnicodeMap)){const t=this.toUnicode.get(e);t&&(f=t.codePointAt(0))}if(void 0===f)continue}for(const t of h)if(t.charCode===f){K[e]=t.glyphId;break}}}else if(0===n){for(const t of h)K[t.charCode]=t.glyphId;f=!0}else for(const t of h){let e=t.charCode;3===n&&e>=61440&&e<=61695&&(e&=255),K[e]=t.glyphId}if(s.glyphNames&&(u.length||this.differences.length))for(let t=0;t<256;++t){if(!f&&void 0!==K[t])continue;const e=this.differences[t]||u[t];if(!e)continue;const i=s.glyphNames.indexOf(e);i>0&&J(i)&&(K[t]=i)}}0===K.length&&(K[0]=0);let Y=P-1;if(H||(Y=0),!s.cssFontInfo){const t=B(K,J,Y,this.toUnicode);this.toFontChar=t.toFontChar,k.cmap={tag:"cmap",data:$(t.charCodeToGlyphId,t.toUnicodeExtraMap,P)},k["OS/2"]&&function(t,e){e.pos=(e.start||0)+t.offset;const s=e.getUint16();e.skip(60);const i=e.getUint16();return!(s<4&&768&i||e.getUint16()>e.getUint16()||(e.skip(6),0===e.getUint16()||(t.data[8]=t.data[9]=0,0)))}(k["OS/2"],e)||(k["OS/2"]={tag:"OS/2",data:U(s,t.charCodeToGlyphId,V)})}if(!O)try{C=new b.Stream(k["CFF "].data),M=new n.CFFParser(C,s,r.SEAC_ANALYSIS_ENABLED).parse(),M.duplicateFirstGlyph();const t=new n.CFFCompiler(M);k["CFF "].data=t.compile()}catch{(0,i.warn)("Failed to compile font "+s.loadedName)}if(k.name){const[e,i]=y(k.name);k.name.data=G(t,e),this.psName=e[0][6]||null,s.composite||function(t,e,s){if(t.isInternalFont)return;if(t.hasIncludedToUnicodeMap)return;if(t.hasEncoding)return;if(t.toUnicode instanceof l.IdentityToUnicodeMap)return;if(!e)return;if(0===s.length)return;if(t.defaultEncoding===c.WinAnsiEncoding)return;for(const t of s)if(!N(t))return;const i=c.WinAnsiEncoding,n=[],r=(0,a.getGlyphsUnicode)();for(const t in i){const e=i[t];if(""===e)continue;const s=r[e];void 0!==s&&(n[t]=String.fromCharCode(s))}n.length>0&&t.toUnicode.amend(n)}(s,this.isSymbolicFont,i)}else k.name={tag:"name",data:G(this.name)};const Q=new m.OpenTypeFileBuilder(x.version);for(const t in k)Q.addTable(t,k[t].data);return Q.toArray()}convert(t,e,s){s.fixedPitch=!1,s.builtInEncoding&&function(t,e){if(t.isInternalFont)return;if(t.hasIncludedToUnicodeMap)return;if(e===t.defaultEncoding)return;if(t.toUnicode instanceof l.IdentityToUnicodeMap)return;const s=[],i=(0,a.getGlyphsUnicode)();for(const n in e){if(t.hasEncoding&&(t.baseEncodingName||void 0!==t.differences[n]))continue;const r=(0,o.getUnicodeForGlyph)(e[n],i);-1!==r&&(s[n]=String.fromCharCode(r))}s.length>0&&t.toUnicode.amend(s)}(s,s.builtInEncoding);let n=1;e instanceof u.CFFFont&&(n=e.numGlyphs-1);const h=e.getGlyphMapping(s);let f=null,d=h,p=null;s.cssFontInfo||(f=B(h,e.hasGlyphId.bind(e),n,this.toUnicode),this.toFontChar=f.toFontChar,d=f.charCodeToGlyphId,p=f.toUnicodeExtraMap);const g=e.numGlyphs;function w(t,e){let s=null;for(const i in t)e===t[i]&&(s||=[]).push(0|i);return s}function b(t,e){for(const s in t)if(e===t[s])return 0|s;return f.charCodeToGlyphId[f.nextAvailableFontCharCode]=e,f.nextAvailableFontCharCode++}const y=e.seacs;if(f&&r.SEAC_ANALYSIS_ENABLED&&y?.length){const t=s.fontMatrix||i.FONT_IDENTITY_MATRIX,n=e.getCharset(),r=Object.create(null);for(let e in y){e|=0;const s=y[e],i=c.StandardEncoding[s[3]],o=n.indexOf(c.StandardEncoding[s[2]]),a=n.indexOf(i);if(o<0||a<0)continue;const l={x:s[0]*t[0]+s[1]*t[2]+t[4],y:s[0]*t[1]+s[1]*t[3]+t[5]},u=w(h,e);if(u)for(const t of u){const e=f.charCodeToGlyphId,s=b(e,o),i=b(e,a);r[t]={baseFontCharCode:s,accentFontCharCode:i,accentOffset:l}}}s.seacMap=r}const A=1/(s.fontMatrix||i.FONT_IDENTITY_MATRIX)[0],v=new m.OpenTypeFileBuilder("OTTO");return v.addTable("CFF ",e.data),v.addTable("OS/2",U(s,d)),v.addTable("cmap",$(d,p,g)),v.addTable("head","\0\0\0\0\0\0\0\0\0\0_<õ\0\0"+E(A)+"\0\0\0\0ž\v~'\0\0\0\0ž\v~'\0\0"+E(s.descent)+"ÿ"+E(s.ascent)+O(s.italicAngle?2:0)+"\0\0\0\0\0\0\0"),v.addTable("hhea","\0\0\0"+E(s.ascent)+E(s.descent)+"\0\0ÿÿ\0\0\0\0\0\0"+E(s.capHeight)+E(Math.tan(s.italicAngle)*s.xHeight)+"\0\0\0\0\0\0\0\0\0\0\0\0"+O(g)),v.addTable("hmtx",function(){const t=e.charstrings,s=e.cff?e.cff.widths:null;let i="\0\0\0\0";for(let e=1,n=g;e<n;e++){let n=0;if(t){const s=t[e-1];n="width"in s?s.width:0}else s&&(n=Math.ceil(s[e]||0));i+=O(n)+O(0)}return i}()),v.addTable("maxp","\0\0P\0"+O(g)),v.addTable("name",G(t)),v.addTable("post",j(s)),v.toArray()}get spaceWidth(){const t=["space","minus","one","i","I"];let e;for(const s of t){if(s in this.widths){e=this.widths[s];break}const t=(0,a.getGlyphsUnicode)()[s];let i=0;if(this.composite&&this.cMap.contains(t)&&(i=this.cMap.lookup(t),"string"==typeof i&&(i=L(t,i))),!i&&this.toUnicode&&(i=this.toUnicode.charCodeOf(t)),i<=0&&(i=t),e=this.widths[i],e)break}return(0,i.shadow)(this,"spaceWidth",e||this.defaultWidth)}_charToGlyph(t,e=!1){let s,n,r,a=this._glyphCache[t];if(a?.isSpace===e)return a;let c=t;this.cMap?.contains(t)&&(c=this.cMap.lookup(t),"string"==typeof c&&(c=L(t,c))),n=this.widths[c],"number"!=typeof n&&(n=this.defaultWidth);const h=this.vmetrics?.[c];let l=this.toUnicode.get(t)||t;"number"==typeof l&&(l=String.fromCharCode(l));let u=void 0!==this.toFontChar[t];if(s=this.toFontChar[t]||t,this.missingFile){const e=this.differences[t]||this.defaultEncoding[t];".notdef"!==e&&""!==e||"Type1"!==this.type||(s=32),s=(0,o.mapSpecialUnicodeValues)(s)}this.isType3Font&&(r=s);let f=null;if(this.seacMap?.[t]){u=!0;const e=this.seacMap[t];s=e.baseFontCharCode,f={fontChar:String.fromCodePoint(e.accentFontCharCode),offset:e.accentOffset}}let d="";return"number"==typeof s&&(s<=1114111?d=String.fromCodePoint(s):(0,i.warn)(`charToGlyph - invalid fontCharCode: ${s}`)),a=new C(t,d,l,f,n,h,r,e,u),this._glyphCache[t]=a}charsToGlyphs(t){let e=this._charsCache[t];if(e)return e;if(e=[],this.cMap){const s=Object.create(null),i=t.length;let n=0;for(;n<i;){this.cMap.readCharCode(t,n,s);const{charcode:i,length:r}=s;n+=r;const o=this._charToGlyph(i,1===r&&32===t.charCodeAt(n-1));e.push(o)}}else for(let s=0,i=t.length;s<i;++s){const i=t.charCodeAt(s),n=this._charToGlyph(i,32===i);e.push(n)}return this._charsCache[t]=e}getCharPositions(t){const e=[];if(this.cMap){const s=Object.create(null);let i=0;for(;i<t.length;){this.cMap.readCharCode(t,i,s);const n=s.length;e.push([i,i+n]),i+=n}}else for(let s=0,i=t.length;s<i;++s)e.push([s,s+1]);return e}get glyphCacheValues(){return Object.values(this._glyphCache)}encodeString(t){const e=[],s=[],i=()=>e.length%2==1,n=this.toUnicode instanceof l.IdentityToUnicodeMap?t=>this.toUnicode.charCodeOf(t):t=>this.toUnicode.charCodeOf(String.fromCodePoint(t));for(let r=0,o=t.length;r<o;r++){const o=t.codePointAt(r);if(o>55295&&(o<57344||o>65533)&&r++,this.toUnicode){const t=n(o);if(-1!==t){i()&&(e.push(s.join("")),s.length=0);for(let e=(this.cMap?this.cMap.getCharCodeLength(t):1)-1;e>=0;e--)s.push(String.fromCharCode(t>>8*e&255));continue}}i()||(e.push(s.join("")),s.length=0),s.push(String.fromCodePoint(o))}return e.push(s.join("")),e}},e.ErrorFont=class{constructor(t){this.error=t,this.loadedName="g_font_error",this.missingFile=!0}charsToGlyphs(){return[]}encodeString(t){return[t]}exportData(t=!1){return{error:this.error}}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CFFTopDict=e.CFFStrings=e.CFFStandardStrings=e.CFFPrivateDict=e.CFFParser=e.CFFIndex=e.CFFHeader=e.CFFFDSelect=e.CFFCompiler=e.CFFCharset=e.CFF=void 0;var i=s(2),n=s(36),r=s(37);const o=[".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"];e.CFFStandardStrings=o;const a=[null,{id:"hstem",min:2,stackClearing:!0,stem:!0},null,{id:"vstem",min:2,stackClearing:!0,stem:!0},{id:"vmoveto",min:1,stackClearing:!0},{id:"rlineto",min:2,resetStack:!0},{id:"hlineto",min:1,resetStack:!0},{id:"vlineto",min:1,resetStack:!0},{id:"rrcurveto",min:6,resetStack:!0},null,{id:"callsubr",min:1,undefStack:!0},{id:"return",min:0,undefStack:!0},null,null,{id:"endchar",min:0,stackClearing:!0},null,null,null,{id:"hstemhm",min:2,stackClearing:!0,stem:!0},{id:"hintmask",min:0,stackClearing:!0},{id:"cntrmask",min:0,stackClearing:!0},{id:"rmoveto",min:2,stackClearing:!0},{id:"hmoveto",min:1,stackClearing:!0},{id:"vstemhm",min:2,stackClearing:!0,stem:!0},{id:"rcurveline",min:8,resetStack:!0},{id:"rlinecurve",min:8,resetStack:!0},{id:"vvcurveto",min:4,resetStack:!0},{id:"hhcurveto",min:4,resetStack:!0},null,{id:"callgsubr",min:1,undefStack:!0},{id:"vhcurveto",min:4,resetStack:!0},{id:"hvcurveto",min:4,resetStack:!0}],c=[null,null,null,{id:"and",min:2,stackDelta:-1},{id:"or",min:2,stackDelta:-1},{id:"not",min:1,stackDelta:0},null,null,null,{id:"abs",min:1,stackDelta:0},{id:"add",min:2,stackDelta:-1,stackFn(t,e){t[e-2]=t[e-2]+t[e-1]}},{id:"sub",min:2,stackDelta:-1,stackFn(t,e){t[e-2]=t[e-2]-t[e-1]}},{id:"div",min:2,stackDelta:-1,stackFn(t,e){t[e-2]=t[e-2]/t[e-1]}},null,{id:"neg",min:1,stackDelta:0,stackFn(t,e){t[e-1]=-t[e-1]}},{id:"eq",min:2,stackDelta:-1},null,null,{id:"drop",min:1,stackDelta:-1},null,{id:"put",min:2,stackDelta:-2},{id:"get",min:1,stackDelta:0},{id:"ifelse",min:4,stackDelta:-3},{id:"random",min:0,stackDelta:1},{id:"mul",min:2,stackDelta:-1,stackFn(t,e){t[e-2]=t[e-2]*t[e-1]}},null,{id:"sqrt",min:1,stackDelta:0},{id:"dup",min:1,stackDelta:1},{id:"exch",min:2,stackDelta:0},{id:"index",min:2,stackDelta:0},{id:"roll",min:3,stackDelta:-2},null,null,null,{id:"hflex",min:7,resetStack:!0},{id:"flex",min:13,resetStack:!0},{id:"hflex1",min:9,resetStack:!0},{id:"flex1",min:11,resetStack:!0}];e.CFFParser=class{constructor(t,e,s){this.bytes=t.getBytes(),this.properties=e,this.seacAnalysisEnabled=!!s}parse(){const t=this.properties,e=new h;this.cff=e;const s=this.parseHeader(),i=this.parseIndex(s.endPos),n=this.parseIndex(i.endPos),r=this.parseIndex(n.endPos),o=this.parseIndex(r.endPos),a=this.parseDict(n.obj.get(0)),c=this.createDict(g,a,e.strings);e.header=s.obj,e.names=this.parseNameIndex(i.obj),e.strings=this.parseStringIndex(r.obj),e.topDict=c,e.globalSubrIndex=o.obj,this.parsePrivateDict(e.topDict),e.isCIDFont=c.hasName("ROS");const l=c.getByName("CharStrings"),u=this.parseIndex(l).obj,f=c.getByName("FontMatrix");f&&(t.fontMatrix=f);const d=c.getByName("FontBBox");let p,m;if(d&&(t.ascent=Math.max(d[3],d[1]),t.descent=Math.min(d[1],d[3]),t.ascentScaled=!0),e.isCIDFont){const t=this.parseIndex(c.getByName("FDArray")).obj;for(let s=0,i=t.count;s<i;++s){const i=t.get(s),n=this.createDict(g,this.parseDict(i),e.strings);this.parsePrivateDict(n),e.fdArray.push(n)}m=null,p=this.parseCharsets(c.getByName("charset"),u.count,e.strings,!0),e.fdSelect=this.parseFDSelect(c.getByName("FDSelect"),u.count)}else p=this.parseCharsets(c.getByName("charset"),u.count,e.strings,!1),m=this.parseEncoding(c.getByName("Encoding"),t,e.strings,p.charset);e.charset=p,e.encoding=m;const w=this.parseCharStrings({charStrings:u,localSubrIndex:c.privateDict.subrsIndex,globalSubrIndex:o.obj,fdSelect:e.fdSelect,fdArray:e.fdArray,privateDict:c.privateDict});return e.charStrings=w.charStrings,e.seacs=w.seacs,e.widths=w.widths,e}parseHeader(){let t=this.bytes;const e=t.length;let s=0;for(;s<e&&1!==t[s];)++s;if(s>=e)throw new i.FormatError("Invalid CFF header");0!==s&&((0,i.info)("cff data is shifted"),t=t.subarray(s),this.bytes=t);const n=t[2];return{obj:new l(t[0],t[1],n,t[3]),endPos:n}}parseDict(t){let e=0;function s(){let s=t[e++];return 30===s?function(){let s="";const i=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],n=t.length;for(;e<n;){const n=t[e++],r=n>>4,o=15&n;if(15===r)break;if(s+=i[r],15===o)break;s+=i[o]}return parseFloat(s)}():28===s?(s=t[e++],s=(s<<24|t[e++]<<16)>>16,s):29===s?(s=t[e++],s=s<<8|t[e++],s=s<<8|t[e++],s=s<<8|t[e++],s):s>=32&&s<=246?s-139:s>=247&&s<=250?256*(s-247)+t[e++]+108:s>=251&&s<=254?-256*(s-251)-t[e++]-108:((0,i.warn)('CFFParser_parseDict: "'+s+'" is a reserved command.'),NaN)}let n=[];const r=[];e=0;const o=t.length;for(;e<o;){let i=t[e];i<=21?(12===i&&(i=i<<8|t[++e]),r.push([i,n]),n=[],++e):n.push(s())}return r}parseIndex(t){const e=new f,s=this.bytes,i=s[t++]<<8|s[t++],n=[];let r,o,a=t;if(0!==i){const e=s[t++],c=t+(i+1)*e-1;for(r=0,o=i+1;r<o;++r){let i=0;for(let n=0;n<e;++n)i<<=8,i+=s[t++];n.push(c+i)}a=n[i]}for(r=0,o=n.length-1;r<o;++r)e.add(s.subarray(n[r],n[r+1]));return{obj:e,endPos:a}}parseNameIndex(t){const e=[];for(let s=0,n=t.count;s<n;++s){const n=t.get(s);e.push((0,i.bytesToString)(n))}return e}parseStringIndex(t){const e=new u;for(let s=0,n=t.count;s<n;++s){const n=t.get(s);e.add((0,i.bytesToString)(n))}return e}createDict(t,e,s){const i=new t(s);for(const[t,s]of e)i.setByKey(t,s);return i}parseCharString(t,e,s,n){if(!e||t.callDepth>10)return!1;let r=t.stackSize;const o=t.stack;let h=e.length;for(let l=0;l<h;){const u=e[l++];let f=null;if(12===u){const t=e[l++];0===t?(e[l-2]=139,e[l-1]=22,r=0):f=c[t]}else if(28===u)o[r]=(e[l]<<24|e[l+1]<<16)>>16,l+=2,r++;else if(14===u){if(r>=4&&(r-=4,this.seacAnalysisEnabled))return t.seac=o.slice(r,r+4),!1;f=a[u]}else if(u>=32&&u<=246)o[r]=u-139,r++;else if(u>=247&&u<=254)o[r]=u<251?(u-247<<8)+e[l]+108:-(u-251<<8)-e[l]-108,l++,r++;else if(255===u)o[r]=(e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3])/65536,l+=4,r++;else if(19===u||20===u){if(t.hints+=r>>1,0===t.hints){e.copyWithin(l-1,l,-1),l-=1,h-=1;continue}l+=t.hints+7>>3,r%=2,f=a[u]}else{if(10===u||29===u){const e=10===u?s:n;if(!e)return f=a[u],(0,i.warn)("Missing subrsIndex for "+f.id),!1;let c=32768;e.count<1240?c=107:e.count<33900&&(c=1131);const h=o[--r]+c;if(h<0||h>=e.count||isNaN(h))return f=a[u],(0,i.warn)("Out of bounds subrIndex for "+f.id),!1;if(t.stackSize=r,t.callDepth++,!this.parseCharString(t,e.get(h),s,n))return!1;t.callDepth--,r=t.stackSize;continue}if(11===u)return t.stackSize=r,!0;if(0===u&&l===e.length)e[l-1]=14,f=a[14];else{if(9===u){e.copyWithin(l-1,l,-1),l-=1,h-=1;continue}f=a[u]}}if(f){if(f.stem&&(t.hints+=r>>1,3===u||23===u?t.hasVStems=!0:!t.hasVStems||1!==u&&18!==u||((0,i.warn)("CFF stem hints are in wrong order"),e[l-1]=1===u?3:23)),"min"in f&&!t.undefStack&&r<f.min)return(0,i.warn)("Not enough parameters for "+f.id+"; actual: "+r+", expected: "+f.min),0===r&&(e[l-1]=14,!0);t.firstStackClearing&&f.stackClearing&&(t.firstStackClearing=!1,r-=f.min,r>=2&&f.stem?r%=2:r>1&&(0,i.warn)("Found too many parameters for stack-clearing command"),r>0&&(t.width=o[r-1])),"stackDelta"in f?("stackFn"in f&&f.stackFn(o,r),r+=f.stackDelta):f.stackClearing?r=0:f.resetStack?(r=0,t.undefStack=!1):f.undefStack&&(r=0,t.undefStack=!0,t.firstStackClearing=!1)}}return h<e.length&&e.fill(14,h),t.stackSize=r,!0}parseCharStrings({charStrings:t,localSubrIndex:e,globalSubrIndex:s,fdSelect:n,fdArray:r,privateDict:o}){const a=[],c=[],h=t.count;for(let l=0;l<h;l++){const h=t.get(l),u={callDepth:0,stackSize:0,stack:[],undefStack:!0,hints:0,firstStackClearing:!0,seac:null,width:null,hasVStems:!1};let f=!0,d=null,p=o;if(n&&r.length){const t=n.getFDIndex(l);-1===t&&((0,i.warn)("Glyph index is not in fd select."),f=!1),t>=r.length&&((0,i.warn)("Invalid fd index for glyph index."),f=!1),f&&(p=r[t].privateDict,d=p.subrsIndex)}else e&&(d=e);if(f&&(f=this.parseCharString(u,h,d,s)),null!==u.width){const t=p.getByName("nominalWidthX");c[l]=t+u.width}else{const t=p.getByName("defaultWidthX");c[l]=t}null!==u.seac&&(a[l]=u.seac),f||t.set(l,new Uint8Array([14]))}return{charStrings:t,seacs:a,widths:c}}emptyPrivateDictionary(t){const e=this.createDict(w,[],t.strings);t.setByKey(18,[0,0]),t.privateDict=e}parsePrivateDict(t){if(!t.hasName("Private"))return void this.emptyPrivateDictionary(t);const e=t.getByName("Private");if(!Array.isArray(e)||2!==e.length)return void t.removeByName("Private");const s=e[0],i=e[1];if(0===s||i>=this.bytes.length)return void this.emptyPrivateDictionary(t);const n=this.bytes.subarray(i,i+s),r=this.parseDict(n),o=this.createDict(w,r,t.strings);if(t.privateDict=o,0===o.getByName("ExpansionFactor")&&o.setByName("ExpansionFactor",.06),!o.getByName("Subrs"))return;const a=o.getByName("Subrs"),c=i+a;if(0===a||c>=this.bytes.length)return void this.emptyPrivateDictionary(t);const h=this.parseIndex(c);o.subrsIndex=h.obj}parseCharsets(t,e,s,r){if(0===t)return new y(!0,b.ISO_ADOBE,n.ISOAdobeCharset);if(1===t)return new y(!0,b.EXPERT,n.ExpertCharset);if(2===t)return new y(!0,b.EXPERT_SUBSET,n.ExpertSubsetCharset);const o=this.bytes,a=t,c=o[t++],h=[r?0:".notdef"];let l,u,f;switch(e-=1,c){case 0:for(f=0;f<e;f++)l=o[t++]<<8|o[t++],h.push(r?l:s.get(l));break;case 1:for(;h.length<=e;)for(l=o[t++]<<8|o[t++],u=o[t++],f=0;f<=u;f++)h.push(r?l++:s.get(l++));break;case 2:for(;h.length<=e;)for(l=o[t++]<<8|o[t++],u=o[t++]<<8|o[t++],f=0;f<=u;f++)h.push(r?l++:s.get(l++));break;default:throw new i.FormatError("Unknown charset format")}const d=o.subarray(a,t);return new y(!1,c,h,d)}parseEncoding(t,e,s,n){const o=Object.create(null),a=this.bytes;let c,h,l,u=!1,f=null;if(0===t||1===t){u=!0,c=t;const e=t?r.ExpertEncoding:r.StandardEncoding;for(h=0,l=n.length;h<l;h++){const t=e.indexOf(n[h]);-1!==t&&(o[t]=h)}}else{const e=t;switch(c=a[t++],127&c){case 0:const e=a[t++];for(h=1;h<=e;h++)o[a[t++]]=h;break;case 1:const s=a[t++];let n=1;for(h=0;h<s;h++){const e=a[t++],s=a[t++];for(let t=e;t<=e+s;t++)o[t]=n++}break;default:throw new i.FormatError(`Unknown encoding format: ${c} in CFF`)}const r=t;128&c&&(a[e]&=127,function(){const e=a[t++];for(h=0;h<e;h++){const e=a[t++],i=(a[t++]<<8)+(255&a[t++]);o[e]=n.indexOf(s.get(i))}}()),f=a.subarray(e,r)}return c&=127,new A(u,c,o,f)}parseFDSelect(t,e){const s=this.bytes,n=s[t++],r=[];let o;switch(n){case 0:for(o=0;o<e;++o){const e=s[t++];r.push(e)}break;case 3:const a=s[t++]<<8|s[t++];for(o=0;o<a;++o){let e=s[t++]<<8|s[t++];0===o&&0!==e&&((0,i.warn)("parseFDSelect: The first range must have a first GID of 0 -- trying to recover."),e=0);const n=s[t++],a=s[t]<<8|s[t+1];for(let t=e;t<a;++t)r.push(n)}t+=2;break;default:throw new i.FormatError(`parseFDSelect: Unknown format "${n}".`)}if(r.length!==e)throw new i.FormatError("parseFDSelect: Invalid font data.");return new v(n,r)}};class h{constructor(){this.header=null,this.names=[],this.topDict=null,this.strings=new u,this.globalSubrIndex=null,this.encoding=null,this.charset=null,this.charStrings=null,this.fdArray=[],this.fdSelect=null,this.isCIDFont=!1}duplicateFirstGlyph(){if(this.charStrings.count>=65535)return void(0,i.warn)("Not enough space in charstrings to duplicate first glyph.");const t=this.charStrings.get(0);this.charStrings.add(t),this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}hasGlyphId(t){return!(t<0||t>=this.charStrings.count)&&this.charStrings.get(t).length>0}}e.CFF=h;class l{constructor(t,e,s,i){this.major=t,this.minor=e,this.hdrSize=s,this.offSize=i}}e.CFFHeader=l;class u{constructor(){this.strings=[]}get(t){return t>=0&&t<=390?o[t]:t-391<=this.strings.length?this.strings[t-391]:o[0]}getSID(t){let e=o.indexOf(t);return-1!==e?e:(e=this.strings.indexOf(t),-1!==e?e+391:-1)}add(t){this.strings.push(t)}get count(){return this.strings.length}}e.CFFStrings=u;class f{constructor(){this.objects=[],this.length=0}add(t){this.length+=t.length,this.objects.push(t)}set(t,e){this.length+=e.length-this.objects[t].length,this.objects[t]=e}get(t){return this.objects[t]}get count(){return this.objects.length}}e.CFFIndex=f;class d{constructor(t,e){this.keyToNameMap=t.keyToNameMap,this.nameToKeyMap=t.nameToKeyMap,this.defaults=t.defaults,this.types=t.types,this.opcodes=t.opcodes,this.order=t.order,this.strings=e,this.values=Object.create(null)}setByKey(t,e){if(!(t in this.keyToNameMap))return!1;if(0===e.length)return!0;for(const s of e)if(isNaN(s))return(0,i.warn)(`Invalid CFFDict value: "${e}" for key "${t}".`),!0;const s=this.types[t];return"num"!==s&&"sid"!==s&&"offset"!==s||(e=e[0]),this.values[t]=e,!0}setByName(t,e){if(!(t in this.nameToKeyMap))throw new i.FormatError(`Invalid dictionary name "${t}"`);this.values[this.nameToKeyMap[t]]=e}hasName(t){return this.nameToKeyMap[t]in this.values}getByName(t){if(!(t in this.nameToKeyMap))throw new i.FormatError(`Invalid dictionary name ${t}"`);const e=this.nameToKeyMap[t];return e in this.values?this.values[e]:this.defaults[e]}removeByName(t){delete this.values[this.nameToKeyMap[t]]}static createTables(t){const e={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]};for(const s of t){const t=Array.isArray(s[0])?(s[0][0]<<8)+s[0][1]:s[0];e.keyToNameMap[t]=s[1],e.nameToKeyMap[s[1]]=t,e.types[t]=s[2],e.defaults[t]=s[3],e.opcodes[t]=Array.isArray(s[0])?s[0]:[s[0]],e.order.push(t)}return e}}const p=[[[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"],[.001,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]];class g extends d{static get tables(){return(0,i.shadow)(this,"tables",this.createTables(p))}constructor(t){super(g.tables,t),this.privateDict=null}}e.CFFTopDict=g;const m=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",.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",.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]];class w extends d{static get tables(){return(0,i.shadow)(this,"tables",this.createTables(m))}constructor(t){super(w.tables,t),this.subrsIndex=null}}e.CFFPrivateDict=w;const b={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2};class y{constructor(t,e,s,i){this.predefined=t,this.format=e,this.charset=s,this.raw=i}}e.CFFCharset=y;class A{constructor(t,e,s,i){this.predefined=t,this.format=e,this.encoding=s,this.raw=i}}class v{constructor(t,e){this.format=t,this.fdSelect=e}getFDIndex(t){return t<0||t>=this.fdSelect.length?-1:this.fdSelect[t]}}e.CFFFDSelect=v;class x{constructor(){this.offsets=Object.create(null)}isTracking(t){return t in this.offsets}track(t,e){if(t in this.offsets)throw new i.FormatError(`Already tracking location of ${t}`);this.offsets[t]=e}offset(t){for(const e in this.offsets)this.offsets[e]+=t}setEntryLocation(t,e,s){if(!(t in this.offsets))throw new i.FormatError(`Not tracking location of ${t}`);const n=s.data,r=this.offsets[t];for(let t=0,s=e.length;t<s;++t){const s=5*t+r,o=s+1,a=s+2,c=s+3,h=s+4;if(29!==n[s]||0!==n[o]||0!==n[a]||0!==n[c]||0!==n[h])throw new i.FormatError("writing to an offset that is not empty");const l=e[t];n[s]=29,n[o]=l>>24&255,n[a]=l>>16&255,n[c]=l>>8&255,n[h]=255&l}}}class k{constructor(t){this.cff=t}compile(){const t=this.cff,e={data:[],length:0,add(t){try{this.data.push(...t)}catch{this.data=this.data.concat(t)}this.length=this.data.length}},s=this.compileHeader(t.header);e.add(s);const n=this.compileNameIndex(t.names);if(e.add(n),t.isCIDFont&&t.topDict.hasName("FontMatrix")){const e=t.topDict.getByName("FontMatrix");t.topDict.removeByName("FontMatrix");for(const s of t.fdArray){let t=e.slice(0);s.hasName("FontMatrix")&&(t=i.Util.transform(t,s.getByName("FontMatrix"))),s.setByName("FontMatrix",t)}}const r=t.topDict.getByName("XUID");r?.length>16&&t.topDict.removeByName("XUID"),t.topDict.setByName("charset",0);let o=this.compileTopDicts([t.topDict],e.length,t.isCIDFont);e.add(o.output);const a=o.trackers[0],c=this.compileStringIndex(t.strings.strings);e.add(c);const h=this.compileIndex(t.globalSubrIndex);if(e.add(h),t.encoding&&t.topDict.hasName("Encoding"))if(t.encoding.predefined)a.setEntryLocation("Encoding",[t.encoding.format],e);else{const s=this.compileEncoding(t.encoding);a.setEntryLocation("Encoding",[e.length],e),e.add(s)}const l=this.compileCharset(t.charset,t.charStrings.count,t.strings,t.isCIDFont);a.setEntryLocation("charset",[e.length],e),e.add(l);const u=this.compileCharStrings(t.charStrings);if(a.setEntryLocation("CharStrings",[e.length],e),e.add(u),t.isCIDFont){a.setEntryLocation("FDSelect",[e.length],e);const s=this.compileFDSelect(t.fdSelect);e.add(s),o=this.compileTopDicts(t.fdArray,e.length,!0),a.setEntryLocation("FDArray",[e.length],e),e.add(o.output),this.compilePrivateDicts(t.fdArray,o.trackers,e)}return this.compilePrivateDicts([t.topDict],[a],e),e.add([0]),e.data}encodeNumber(t){return Number.isInteger(t)?this.encodeInteger(t):this.encodeFloat(t)}static get EncodeFloatRegExp(){return(0,i.shadow)(this,"EncodeFloatRegExp",/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/)}encodeFloat(t){let e=t.toString();const s=k.EncodeFloatRegExp.exec(e);if(s){const i=parseFloat("1e"+((s[2]?+s[2]:0)+s[1].length));e=(Math.round(t*i)/i).toString()}let i,n,r="";for(i=0,n=e.length;i<n;++i){const t=e[i];r+="e"===t?"-"===e[++i]?"c":"b":"."===t?"a":"-"===t?"e":t}r+=1&r.length?"f":"ff";const o=[30];for(i=0,n=r.length;i<n;i+=2)o.push(parseInt(r.substring(i,i+2),16));return o}encodeInteger(t){let e;return e=t>=-107&&t<=107?[t+139]:t>=108&&t<=1131?[247+((t-=108)>>8),255&t]:t>=-1131&&t<=-108?[251+((t=-t-108)>>8),255&t]:t>=-32768&&t<=32767?[28,t>>8&255,255&t]:[29,t>>24&255,t>>16&255,t>>8&255,255&t],e}compileHeader(t){return[t.major,t.minor,4,t.offSize]}compileNameIndex(t){const e=new f;for(const s of t){const t=Math.min(s.length,127);let n=new Array(t);for(let e=0;e<t;e++){let t=s[e];(t<"!"||t>"~"||"["===t||"]"===t||"("===t||")"===t||"{"===t||"}"===t||"<"===t||">"===t||"/"===t||"%"===t)&&(t="_"),n[e]=t}n=n.join(""),""===n&&(n="Bad_Font_Name"),e.add((0,i.stringToBytes)(n))}return this.compileIndex(e)}compileTopDicts(t,e,s){const i=[];let n=new f;for(const r of t){s&&(r.removeByName("CIDFontVersion"),r.removeByName("CIDFontRevision"),r.removeByName("CIDFontType"),r.removeByName("CIDCount"),r.removeByName("UIDBase"));const t=new x,o=this.compileDict(r,t);i.push(t),n.add(o),t.offset(e)}return n=this.compileIndex(n,i),{trackers:i,output:n}}compilePrivateDicts(t,e,s){for(let n=0,r=t.length;n<r;++n){const r=t[n],o=r.privateDict;if(!o||!r.hasName("Private"))throw new i.FormatError("There must be a private dictionary.");const a=new x,c=this.compileDict(o,a);let h=s.length;if(a.offset(h),c.length||(h=0),e[n].setEntryLocation("Private",[c.length,h],s),s.add(c),o.subrsIndex&&o.hasName("Subrs")){const t=this.compileIndex(o.subrsIndex);a.setEntryLocation("Subrs",[c.length],s),s.add(t)}}}compileDict(t,e){const s=[];for(const n of t.order){if(!(n in t.values))continue;let r=t.values[n],o=t.types[n];if(Array.isArray(o)||(o=[o]),Array.isArray(r)||(r=[r]),0!==r.length){for(let a=0,c=o.length;a<c;++a){const c=o[a],h=r[a];switch(c){case"num":case"sid":s.push(...this.encodeNumber(h));break;case"offset":const o=t.keyToNameMap[n];e.isTracking(o)||e.track(o,s.length),s.push(29,0,0,0,0);break;case"array":case"delta":s.push(...this.encodeNumber(h));for(let t=1,e=r.length;t<e;++t)s.push(...this.encodeNumber(r[t]));break;default:throw new i.FormatError(`Unknown data type of ${c}`)}}s.push(...t.opcodes[n])}}return s}compileStringIndex(t){const e=new f;for(const s of t)e.add((0,i.stringToBytes)(s));return this.compileIndex(e)}compileCharStrings(t){const e=new f;for(let s=0;s<t.count;s++){const i=t.get(s);e.add(0!==i.length?i:new Uint8Array([139,14]))}return this.compileIndex(e)}compileCharset(t,e,s,n){let r;const o=e-1;if(n)r=new Uint8Array([2,0,0,o>>8&255,255&o]);else{r=new Uint8Array(1+2*o),r[0]=0;let e=0;const n=t.charset.length;let a=!1;for(let o=1;o<r.length;o+=2){let c=0;if(e<n){const n=t.charset[e++];c=s.getSID(n),-1===c&&(c=0,a||(a=!0,(0,i.warn)(`Couldn't find ${n} in CFF strings`)))}r[o]=c>>8&255,r[o+1]=255&c}}return this.compileTypedArray(r)}compileEncoding(t){return this.compileTypedArray(t.raw)}compileFDSelect(t){const e=t.format;let s,i;switch(e){case 0:for(s=new Uint8Array(1+t.fdSelect.length),s[0]=e,i=0;i<t.fdSelect.length;i++)s[i+1]=t.fdSelect[i];break;case 3:const n=0;let r=t.fdSelect[0];const o=[e,0,0,n>>8&255,255&n,r];for(i=1;i<t.fdSelect.length;i++){const e=t.fdSelect[i];e!==r&&(o.push(i>>8&255,255&i,e),r=e)}const a=(o.length-3)/3;o[1]=a>>8&255,o[2]=255&a,o.push(i>>8&255,255&i),s=new Uint8Array(o)}return this.compileTypedArray(s)}compileTypedArray(t){return Array.from(t)}compileIndex(t,e=[]){const s=t.objects,i=s.length;if(0===i)return[0,0];const n=[i>>8&255,255&i];let r,o,a=1;for(r=0;r<i;++r)a+=s[r].length;o=a<256?1:a<65536?2:a<16777216?3:4,n.push(o);let c=1;for(r=0;r<i+1;r++)1===o?n.push(255&c):2===o?n.push(c>>8&255,255&c):3===o?n.push(c>>16&255,c>>8&255,255&c):n.push(c>>>24&255,c>>16&255,c>>8&255,255&c),s[r]&&(c+=s[r].length);for(r=0;r<i;r++)e[r]&&e[r].offset(n.length),n.push(...s[r]);return n}}e.CFFCompiler=k},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ISOAdobeCharset=e.ExpertSubsetCharset=e.ExpertCharset=void 0,e.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"],e.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"],e.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"]},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ZapfDingbatsEncoding=e.WinAnsiEncoding=e.SymbolSetEncoding=e.StandardEncoding=e.MacRomanEncoding=e.ExpertEncoding=void 0,e.getEncoding=function(t){switch(t){case"WinAnsiEncoding":return o;case"StandardEncoding":return r;case"MacRomanEncoding":return n;case"SymbolSetEncoding":return a;case"ZapfDingbatsEncoding":return c;case"ExpertEncoding":return s;case"MacExpertEncoding":return i;default:return null}};const s=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"];e.ExpertEncoding=s;const i=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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","","","",""],n=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"];e.MacRomanEncoding=n;const r=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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","","","",""];e.StandardEncoding=r;const o=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"];e.WinAnsiEncoding=o;const a=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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",""];e.SymbolSetEncoding=a;const c=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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",""];e.ZapfDingbatsEncoding=c},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SEAC_ANALYSIS_ENABLED=e.MacStandardGlyphOrdering=e.FontFlags=void 0,e.normalizeFontName=function(t){return t.replaceAll(/[,_]/g,"-").replaceAll(/\s/g,"")},e.recoverGlyphName=c,e.type1FontGlyphMapping=function(t,e,s){const r=Object.create(null);let o,h,l;const u=!!(t.flags&a.Symbolic);if(t.isInternalFont)for(l=e,h=0;h<l.length;h++)o=s.indexOf(l[h]),r[h]=o>=0?o:0;else if(t.baseEncodingName)for(l=(0,i.getEncoding)(t.baseEncodingName),h=0;h<l.length;h++)o=s.indexOf(l[h]),r[h]=o>=0?o:0;else if(u)for(h in e)r[h]=e[h];else for(l=i.StandardEncoding,h=0;h<l.length;h++)o=s.indexOf(l[h]),r[h]=o>=0?o:0;const f=t.differences;let d;if(f)for(h in f){const t=f[h];if(o=s.indexOf(t),-1===o){d||(d=(0,n.getGlyphsUnicode)());const e=c(t,d);e!==t&&(o=s.indexOf(e))}r[h]=o>=0?o:0}return r};var i=s(37),n=s(39),r=s(40),o=s(2);e.SEAC_ANALYSIS_ENABLED=!0;const a={FixedPitch:1,Serif:2,Symbolic:4,Script:8,Nonsymbolic:32,Italic:64,AllCap:65536,SmallCap:131072,ForceBold:262144};function c(t,e){if(void 0!==e[t])return t;const s=(0,r.getUnicodeForGlyph)(t,e);if(-1!==s)for(const t in e)if(e[t]===s)return t;return(0,o.info)("Unable to recover a standard glyph name for: "+t),t}e.FontFlags=a,e.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","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","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"]},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getGlyphsUnicode=e.getDingbatsGlyphsUnicode=void 0;var i=s(3);const n=(0,i.getLookupTableFactory)((function(t){t.A=65,t.AE=198,t.AEacute=508,t.AEmacron=482,t.AEsmall=63462,t.Aacute=193,t.Aacutesmall=63457,t.Abreve=258,t.Abreveacute=7854,t.Abrevecyrillic=1232,t.Abrevedotbelow=7862,t.Abrevegrave=7856,t.Abrevehookabove=7858,t.Abrevetilde=7860,t.Acaron=461,t.Acircle=9398,t.Acircumflex=194,t.Acircumflexacute=7844,t.Acircumflexdotbelow=7852,t.Acircumflexgrave=7846,t.Acircumflexhookabove=7848,t.Acircumflexsmall=63458,t.Acircumflextilde=7850,t.Acute=63177,t.Acutesmall=63412,t.Acyrillic=1040,t.Adblgrave=512,t.Adieresis=196,t.Adieresiscyrillic=1234,t.Adieresismacron=478,t.Adieresissmall=63460,t.Adotbelow=7840,t.Adotmacron=480,t.Agrave=192,t.Agravesmall=63456,t.Ahookabove=7842,t.Aiecyrillic=1236,t.Ainvertedbreve=514,t.Alpha=913,t.Alphatonos=902,t.Amacron=256,t.Amonospace=65313,t.Aogonek=260,t.Aring=197,t.Aringacute=506,t.Aringbelow=7680,t.Aringsmall=63461,t.Asmall=63329,t.Atilde=195,t.Atildesmall=63459,t.Aybarmenian=1329,t.B=66,t.Bcircle=9399,t.Bdotaccent=7682,t.Bdotbelow=7684,t.Becyrillic=1041,t.Benarmenian=1330,t.Beta=914,t.Bhook=385,t.Blinebelow=7686,t.Bmonospace=65314,t.Brevesmall=63220,t.Bsmall=63330,t.Btopbar=386,t.C=67,t.Caarmenian=1342,t.Cacute=262,t.Caron=63178,t.Caronsmall=63221,t.Ccaron=268,t.Ccedilla=199,t.Ccedillaacute=7688,t.Ccedillasmall=63463,t.Ccircle=9400,t.Ccircumflex=264,t.Cdot=266,t.Cdotaccent=266,t.Cedillasmall=63416,t.Chaarmenian=1353,t.Cheabkhasiancyrillic=1212,t.Checyrillic=1063,t.Chedescenderabkhasiancyrillic=1214,t.Chedescendercyrillic=1206,t.Chedieresiscyrillic=1268,t.Cheharmenian=1347,t.Chekhakassiancyrillic=1227,t.Cheverticalstrokecyrillic=1208,t.Chi=935,t.Chook=391,t.Circumflexsmall=63222,t.Cmonospace=65315,t.Coarmenian=1361,t.Csmall=63331,t.D=68,t.DZ=497,t.DZcaron=452,t.Daarmenian=1332,t.Dafrican=393,t.Dcaron=270,t.Dcedilla=7696,t.Dcircle=9401,t.Dcircumflexbelow=7698,t.Dcroat=272,t.Ddotaccent=7690,t.Ddotbelow=7692,t.Decyrillic=1044,t.Deicoptic=1006,t.Delta=8710,t.Deltagreek=916,t.Dhook=394,t.Dieresis=63179,t.DieresisAcute=63180,t.DieresisGrave=63181,t.Dieresissmall=63400,t.Digammagreek=988,t.Djecyrillic=1026,t.Dlinebelow=7694,t.Dmonospace=65316,t.Dotaccentsmall=63223,t.Dslash=272,t.Dsmall=63332,t.Dtopbar=395,t.Dz=498,t.Dzcaron=453,t.Dzeabkhasiancyrillic=1248,t.Dzecyrillic=1029,t.Dzhecyrillic=1039,t.E=69,t.Eacute=201,t.Eacutesmall=63465,t.Ebreve=276,t.Ecaron=282,t.Ecedillabreve=7708,t.Echarmenian=1333,t.Ecircle=9402,t.Ecircumflex=202,t.Ecircumflexacute=7870,t.Ecircumflexbelow=7704,t.Ecircumflexdotbelow=7878,t.Ecircumflexgrave=7872,t.Ecircumflexhookabove=7874,t.Ecircumflexsmall=63466,t.Ecircumflextilde=7876,t.Ecyrillic=1028,t.Edblgrave=516,t.Edieresis=203,t.Edieresissmall=63467,t.Edot=278,t.Edotaccent=278,t.Edotbelow=7864,t.Efcyrillic=1060,t.Egrave=200,t.Egravesmall=63464,t.Eharmenian=1335,t.Ehookabove=7866,t.Eightroman=8551,t.Einvertedbreve=518,t.Eiotifiedcyrillic=1124,t.Elcyrillic=1051,t.Elevenroman=8554,t.Emacron=274,t.Emacronacute=7702,t.Emacrongrave=7700,t.Emcyrillic=1052,t.Emonospace=65317,t.Encyrillic=1053,t.Endescendercyrillic=1186,t.Eng=330,t.Enghecyrillic=1188,t.Enhookcyrillic=1223,t.Eogonek=280,t.Eopen=400,t.Epsilon=917,t.Epsilontonos=904,t.Ercyrillic=1056,t.Ereversed=398,t.Ereversedcyrillic=1069,t.Escyrillic=1057,t.Esdescendercyrillic=1194,t.Esh=425,t.Esmall=63333,t.Eta=919,t.Etarmenian=1336,t.Etatonos=905,t.Eth=208,t.Ethsmall=63472,t.Etilde=7868,t.Etildebelow=7706,t.Euro=8364,t.Ezh=439,t.Ezhcaron=494,t.Ezhreversed=440,t.F=70,t.Fcircle=9403,t.Fdotaccent=7710,t.Feharmenian=1366,t.Feicoptic=996,t.Fhook=401,t.Fitacyrillic=1138,t.Fiveroman=8548,t.Fmonospace=65318,t.Fourroman=8547,t.Fsmall=63334,t.G=71,t.GBsquare=13191,t.Gacute=500,t.Gamma=915,t.Gammaafrican=404,t.Gangiacoptic=1002,t.Gbreve=286,t.Gcaron=486,t.Gcedilla=290,t.Gcircle=9404,t.Gcircumflex=284,t.Gcommaaccent=290,t.Gdot=288,t.Gdotaccent=288,t.Gecyrillic=1043,t.Ghadarmenian=1346,t.Ghemiddlehookcyrillic=1172,t.Ghestrokecyrillic=1170,t.Gheupturncyrillic=1168,t.Ghook=403,t.Gimarmenian=1331,t.Gjecyrillic=1027,t.Gmacron=7712,t.Gmonospace=65319,t.Grave=63182,t.Gravesmall=63328,t.Gsmall=63335,t.Gsmallhook=667,t.Gstroke=484,t.H=72,t.H18533=9679,t.H18543=9642,t.H18551=9643,t.H22073=9633,t.HPsquare=13259,t.Haabkhasiancyrillic=1192,t.Hadescendercyrillic=1202,t.Hardsigncyrillic=1066,t.Hbar=294,t.Hbrevebelow=7722,t.Hcedilla=7720,t.Hcircle=9405,t.Hcircumflex=292,t.Hdieresis=7718,t.Hdotaccent=7714,t.Hdotbelow=7716,t.Hmonospace=65320,t.Hoarmenian=1344,t.Horicoptic=1e3,t.Hsmall=63336,t.Hungarumlaut=63183,t.Hungarumlautsmall=63224,t.Hzsquare=13200,t.I=73,t.IAcyrillic=1071,t.IJ=306,t.IUcyrillic=1070,t.Iacute=205,t.Iacutesmall=63469,t.Ibreve=300,t.Icaron=463,t.Icircle=9406,t.Icircumflex=206,t.Icircumflexsmall=63470,t.Icyrillic=1030,t.Idblgrave=520,t.Idieresis=207,t.Idieresisacute=7726,t.Idieresiscyrillic=1252,t.Idieresissmall=63471,t.Idot=304,t.Idotaccent=304,t.Idotbelow=7882,t.Iebrevecyrillic=1238,t.Iecyrillic=1045,t.Ifraktur=8465,t.Igrave=204,t.Igravesmall=63468,t.Ihookabove=7880,t.Iicyrillic=1048,t.Iinvertedbreve=522,t.Iishortcyrillic=1049,t.Imacron=298,t.Imacroncyrillic=1250,t.Imonospace=65321,t.Iniarmenian=1339,t.Iocyrillic=1025,t.Iogonek=302,t.Iota=921,t.Iotaafrican=406,t.Iotadieresis=938,t.Iotatonos=906,t.Ismall=63337,t.Istroke=407,t.Itilde=296,t.Itildebelow=7724,t.Izhitsacyrillic=1140,t.Izhitsadblgravecyrillic=1142,t.J=74,t.Jaarmenian=1345,t.Jcircle=9407,t.Jcircumflex=308,t.Jecyrillic=1032,t.Jheharmenian=1355,t.Jmonospace=65322,t.Jsmall=63338,t.K=75,t.KBsquare=13189,t.KKsquare=13261,t.Kabashkircyrillic=1184,t.Kacute=7728,t.Kacyrillic=1050,t.Kadescendercyrillic=1178,t.Kahookcyrillic=1219,t.Kappa=922,t.Kastrokecyrillic=1182,t.Kaverticalstrokecyrillic=1180,t.Kcaron=488,t.Kcedilla=310,t.Kcircle=9408,t.Kcommaaccent=310,t.Kdotbelow=7730,t.Keharmenian=1364,t.Kenarmenian=1343,t.Khacyrillic=1061,t.Kheicoptic=998,t.Khook=408,t.Kjecyrillic=1036,t.Klinebelow=7732,t.Kmonospace=65323,t.Koppacyrillic=1152,t.Koppagreek=990,t.Ksicyrillic=1134,t.Ksmall=63339,t.L=76,t.LJ=455,t.LL=63167,t.Lacute=313,t.Lambda=923,t.Lcaron=317,t.Lcedilla=315,t.Lcircle=9409,t.Lcircumflexbelow=7740,t.Lcommaaccent=315,t.Ldot=319,t.Ldotaccent=319,t.Ldotbelow=7734,t.Ldotbelowmacron=7736,t.Liwnarmenian=1340,t.Lj=456,t.Ljecyrillic=1033,t.Llinebelow=7738,t.Lmonospace=65324,t.Lslash=321,t.Lslashsmall=63225,t.Lsmall=63340,t.M=77,t.MBsquare=13190,t.Macron=63184,t.Macronsmall=63407,t.Macute=7742,t.Mcircle=9410,t.Mdotaccent=7744,t.Mdotbelow=7746,t.Menarmenian=1348,t.Mmonospace=65325,t.Msmall=63341,t.Mturned=412,t.Mu=924,t.N=78,t.NJ=458,t.Nacute=323,t.Ncaron=327,t.Ncedilla=325,t.Ncircle=9411,t.Ncircumflexbelow=7754,t.Ncommaaccent=325,t.Ndotaccent=7748,t.Ndotbelow=7750,t.Nhookleft=413,t.Nineroman=8552,t.Nj=459,t.Njecyrillic=1034,t.Nlinebelow=7752,t.Nmonospace=65326,t.Nowarmenian=1350,t.Nsmall=63342,t.Ntilde=209,t.Ntildesmall=63473,t.Nu=925,t.O=79,t.OE=338,t.OEsmall=63226,t.Oacute=211,t.Oacutesmall=63475,t.Obarredcyrillic=1256,t.Obarreddieresiscyrillic=1258,t.Obreve=334,t.Ocaron=465,t.Ocenteredtilde=415,t.Ocircle=9412,t.Ocircumflex=212,t.Ocircumflexacute=7888,t.Ocircumflexdotbelow=7896,t.Ocircumflexgrave=7890,t.Ocircumflexhookabove=7892,t.Ocircumflexsmall=63476,t.Ocircumflextilde=7894,t.Ocyrillic=1054,t.Odblacute=336,t.Odblgrave=524,t.Odieresis=214,t.Odieresiscyrillic=1254,t.Odieresissmall=63478,t.Odotbelow=7884,t.Ogoneksmall=63227,t.Ograve=210,t.Ogravesmall=63474,t.Oharmenian=1365,t.Ohm=8486,t.Ohookabove=7886,t.Ohorn=416,t.Ohornacute=7898,t.Ohorndotbelow=7906,t.Ohorngrave=7900,t.Ohornhookabove=7902,t.Ohorntilde=7904,t.Ohungarumlaut=336,t.Oi=418,t.Oinvertedbreve=526,t.Omacron=332,t.Omacronacute=7762,t.Omacrongrave=7760,t.Omega=8486,t.Omegacyrillic=1120,t.Omegagreek=937,t.Omegaroundcyrillic=1146,t.Omegatitlocyrillic=1148,t.Omegatonos=911,t.Omicron=927,t.Omicrontonos=908,t.Omonospace=65327,t.Oneroman=8544,t.Oogonek=490,t.Oogonekmacron=492,t.Oopen=390,t.Oslash=216,t.Oslashacute=510,t.Oslashsmall=63480,t.Osmall=63343,t.Ostrokeacute=510,t.Otcyrillic=1150,t.Otilde=213,t.Otildeacute=7756,t.Otildedieresis=7758,t.Otildesmall=63477,t.P=80,t.Pacute=7764,t.Pcircle=9413,t.Pdotaccent=7766,t.Pecyrillic=1055,t.Peharmenian=1354,t.Pemiddlehookcyrillic=1190,t.Phi=934,t.Phook=420,t.Pi=928,t.Piwrarmenian=1363,t.Pmonospace=65328,t.Psi=936,t.Psicyrillic=1136,t.Psmall=63344,t.Q=81,t.Qcircle=9414,t.Qmonospace=65329,t.Qsmall=63345,t.R=82,t.Raarmenian=1356,t.Racute=340,t.Rcaron=344,t.Rcedilla=342,t.Rcircle=9415,t.Rcommaaccent=342,t.Rdblgrave=528,t.Rdotaccent=7768,t.Rdotbelow=7770,t.Rdotbelowmacron=7772,t.Reharmenian=1360,t.Rfraktur=8476,t.Rho=929,t.Ringsmall=63228,t.Rinvertedbreve=530,t.Rlinebelow=7774,t.Rmonospace=65330,t.Rsmall=63346,t.Rsmallinverted=641,t.Rsmallinvertedsuperior=694,t.S=83,t.SF010000=9484,t.SF020000=9492,t.SF030000=9488,t.SF040000=9496,t.SF050000=9532,t.SF060000=9516,t.SF070000=9524,t.SF080000=9500,t.SF090000=9508,t.SF100000=9472,t.SF110000=9474,t.SF190000=9569,t.SF200000=9570,t.SF210000=9558,t.SF220000=9557,t.SF230000=9571,t.SF240000=9553,t.SF250000=9559,t.SF260000=9565,t.SF270000=9564,t.SF280000=9563,t.SF360000=9566,t.SF370000=9567,t.SF380000=9562,t.SF390000=9556,t.SF400000=9577,t.SF410000=9574,t.SF420000=9568,t.SF430000=9552,t.SF440000=9580,t.SF450000=9575,t.SF460000=9576,t.SF470000=9572,t.SF480000=9573,t.SF490000=9561,t.SF500000=9560,t.SF510000=9554,t.SF520000=9555,t.SF530000=9579,t.SF540000=9578,t.Sacute=346,t.Sacutedotaccent=7780,t.Sampigreek=992,t.Scaron=352,t.Scarondotaccent=7782,t.Scaronsmall=63229,t.Scedilla=350,t.Schwa=399,t.Schwacyrillic=1240,t.Schwadieresiscyrillic=1242,t.Scircle=9416,t.Scircumflex=348,t.Scommaaccent=536,t.Sdotaccent=7776,t.Sdotbelow=7778,t.Sdotbelowdotaccent=7784,t.Seharmenian=1357,t.Sevenroman=8550,t.Shaarmenian=1351,t.Shacyrillic=1064,t.Shchacyrillic=1065,t.Sheicoptic=994,t.Shhacyrillic=1210,t.Shimacoptic=1004,t.Sigma=931,t.Sixroman=8549,t.Smonospace=65331,t.Softsigncyrillic=1068,t.Ssmall=63347,t.Stigmagreek=986,t.T=84,t.Tau=932,t.Tbar=358,t.Tcaron=356,t.Tcedilla=354,t.Tcircle=9417,t.Tcircumflexbelow=7792,t.Tcommaaccent=354,t.Tdotaccent=7786,t.Tdotbelow=7788,t.Tecyrillic=1058,t.Tedescendercyrillic=1196,t.Tenroman=8553,t.Tetsecyrillic=1204,t.Theta=920,t.Thook=428,t.Thorn=222,t.Thornsmall=63486,t.Threeroman=8546,t.Tildesmall=63230,t.Tiwnarmenian=1359,t.Tlinebelow=7790,t.Tmonospace=65332,t.Toarmenian=1337,t.Tonefive=444,t.Tonesix=388,t.Tonetwo=423,t.Tretroflexhook=430,t.Tsecyrillic=1062,t.Tshecyrillic=1035,t.Tsmall=63348,t.Twelveroman=8555,t.Tworoman=8545,t.U=85,t.Uacute=218,t.Uacutesmall=63482,t.Ubreve=364,t.Ucaron=467,t.Ucircle=9418,t.Ucircumflex=219,t.Ucircumflexbelow=7798,t.Ucircumflexsmall=63483,t.Ucyrillic=1059,t.Udblacute=368,t.Udblgrave=532,t.Udieresis=220,t.Udieresisacute=471,t.Udieresisbelow=7794,t.Udieresiscaron=473,t.Udieresiscyrillic=1264,t.Udieresisgrave=475,t.Udieresismacron=469,t.Udieresissmall=63484,t.Udotbelow=7908,t.Ugrave=217,t.Ugravesmall=63481,t.Uhookabove=7910,t.Uhorn=431,t.Uhornacute=7912,t.Uhorndotbelow=7920,t.Uhorngrave=7914,t.Uhornhookabove=7916,t.Uhorntilde=7918,t.Uhungarumlaut=368,t.Uhungarumlautcyrillic=1266,t.Uinvertedbreve=534,t.Ukcyrillic=1144,t.Umacron=362,t.Umacroncyrillic=1262,t.Umacrondieresis=7802,t.Umonospace=65333,t.Uogonek=370,t.Upsilon=933,t.Upsilon1=978,t.Upsilonacutehooksymbolgreek=979,t.Upsilonafrican=433,t.Upsilondieresis=939,t.Upsilondieresishooksymbolgreek=980,t.Upsilonhooksymbol=978,t.Upsilontonos=910,t.Uring=366,t.Ushortcyrillic=1038,t.Usmall=63349,t.Ustraightcyrillic=1198,t.Ustraightstrokecyrillic=1200,t.Utilde=360,t.Utildeacute=7800,t.Utildebelow=7796,t.V=86,t.Vcircle=9419,t.Vdotbelow=7806,t.Vecyrillic=1042,t.Vewarmenian=1358,t.Vhook=434,t.Vmonospace=65334,t.Voarmenian=1352,t.Vsmall=63350,t.Vtilde=7804,t.W=87,t.Wacute=7810,t.Wcircle=9420,t.Wcircumflex=372,t.Wdieresis=7812,t.Wdotaccent=7814,t.Wdotbelow=7816,t.Wgrave=7808,t.Wmonospace=65335,t.Wsmall=63351,t.X=88,t.Xcircle=9421,t.Xdieresis=7820,t.Xdotaccent=7818,t.Xeharmenian=1341,t.Xi=926,t.Xmonospace=65336,t.Xsmall=63352,t.Y=89,t.Yacute=221,t.Yacutesmall=63485,t.Yatcyrillic=1122,t.Ycircle=9422,t.Ycircumflex=374,t.Ydieresis=376,t.Ydieresissmall=63487,t.Ydotaccent=7822,t.Ydotbelow=7924,t.Yericyrillic=1067,t.Yerudieresiscyrillic=1272,t.Ygrave=7922,t.Yhook=435,t.Yhookabove=7926,t.Yiarmenian=1349,t.Yicyrillic=1031,t.Yiwnarmenian=1362,t.Ymonospace=65337,t.Ysmall=63353,t.Ytilde=7928,t.Yusbigcyrillic=1130,t.Yusbigiotifiedcyrillic=1132,t.Yuslittlecyrillic=1126,t.Yuslittleiotifiedcyrillic=1128,t.Z=90,t.Zaarmenian=1334,t.Zacute=377,t.Zcaron=381,t.Zcaronsmall=63231,t.Zcircle=9423,t.Zcircumflex=7824,t.Zdot=379,t.Zdotaccent=379,t.Zdotbelow=7826,t.Zecyrillic=1047,t.Zedescendercyrillic=1176,t.Zedieresiscyrillic=1246,t.Zeta=918,t.Zhearmenian=1338,t.Zhebrevecyrillic=1217,t.Zhecyrillic=1046,t.Zhedescendercyrillic=1174,t.Zhedieresiscyrillic=1244,t.Zlinebelow=7828,t.Zmonospace=65338,t.Zsmall=63354,t.Zstroke=437,t.a=97,t.aabengali=2438,t.aacute=225,t.aadeva=2310,t.aagujarati=2694,t.aagurmukhi=2566,t.aamatragurmukhi=2622,t.aarusquare=13059,t.aavowelsignbengali=2494,t.aavowelsigndeva=2366,t.aavowelsigngujarati=2750,t.abbreviationmarkarmenian=1375,t.abbreviationsigndeva=2416,t.abengali=2437,t.abopomofo=12570,t.abreve=259,t.abreveacute=7855,t.abrevecyrillic=1233,t.abrevedotbelow=7863,t.abrevegrave=7857,t.abrevehookabove=7859,t.abrevetilde=7861,t.acaron=462,t.acircle=9424,t.acircumflex=226,t.acircumflexacute=7845,t.acircumflexdotbelow=7853,t.acircumflexgrave=7847,t.acircumflexhookabove=7849,t.acircumflextilde=7851,t.acute=180,t.acutebelowcmb=791,t.acutecmb=769,t.acutecomb=769,t.acutedeva=2388,t.acutelowmod=719,t.acutetonecmb=833,t.acyrillic=1072,t.adblgrave=513,t.addakgurmukhi=2673,t.adeva=2309,t.adieresis=228,t.adieresiscyrillic=1235,t.adieresismacron=479,t.adotbelow=7841,t.adotmacron=481,t.ae=230,t.aeacute=509,t.aekorean=12624,t.aemacron=483,t.afii00208=8213,t.afii08941=8356,t.afii10017=1040,t.afii10018=1041,t.afii10019=1042,t.afii10020=1043,t.afii10021=1044,t.afii10022=1045,t.afii10023=1025,t.afii10024=1046,t.afii10025=1047,t.afii10026=1048,t.afii10027=1049,t.afii10028=1050,t.afii10029=1051,t.afii10030=1052;t.afii10031=1053,t.afii10032=1054,t.afii10033=1055,t.afii10034=1056,t.afii10035=1057,t.afii10036=1058,t.afii10037=1059,t.afii10038=1060,t.afii10039=1061,t.afii10040=1062,t.afii10041=1063,t.afii10042=1064,t.afii10043=1065,t.afii10044=1066,t.afii10045=1067,t.afii10046=1068,t.afii10047=1069,t.afii10048=1070,t.afii10049=1071,t.afii10050=1168,t.afii10051=1026,t.afii10052=1027,t.afii10053=1028,t.afii10054=1029,t.afii10055=1030,t.afii10056=1031,t.afii10057=1032,t.afii10058=1033,t.afii10059=1034,t.afii10060=1035,t.afii10061=1036,t.afii10062=1038,t.afii10063=63172,t.afii10064=63173,t.afii10065=1072,t.afii10066=1073,t.afii10067=1074,t.afii10068=1075,t.afii10069=1076,t.afii10070=1077,t.afii10071=1105,t.afii10072=1078,t.afii10073=1079,t.afii10074=1080,t.afii10075=1081,t.afii10076=1082,t.afii10077=1083,t.afii10078=1084,t.afii10079=1085,t.afii10080=1086,t.afii10081=1087,t.afii10082=1088,t.afii10083=1089,t.afii10084=1090,t.afii10085=1091,t.afii10086=1092,t.afii10087=1093,t.afii10088=1094,t.afii10089=1095,t.afii10090=1096,t.afii10091=1097,t.afii10092=1098,t.afii10093=1099,t.afii10094=1100,t.afii10095=1101,t.afii10096=1102,t.afii10097=1103,t.afii10098=1169,t.afii10099=1106,t.afii10100=1107,t.afii10101=1108,t.afii10102=1109,t.afii10103=1110,t.afii10104=1111,t.afii10105=1112,t.afii10106=1113,t.afii10107=1114,t.afii10108=1115,t.afii10109=1116,t.afii10110=1118,t.afii10145=1039,t.afii10146=1122,t.afii10147=1138,t.afii10148=1140,t.afii10192=63174,t.afii10193=1119,t.afii10194=1123,t.afii10195=1139,t.afii10196=1141,t.afii10831=63175,t.afii10832=63176,t.afii10846=1241,t.afii299=8206,t.afii300=8207,t.afii301=8205,t.afii57381=1642,t.afii57388=1548,t.afii57392=1632,t.afii57393=1633,t.afii57394=1634,t.afii57395=1635,t.afii57396=1636,t.afii57397=1637,t.afii57398=1638,t.afii57399=1639,t.afii57400=1640,t.afii57401=1641,t.afii57403=1563,t.afii57407=1567,t.afii57409=1569,t.afii57410=1570,t.afii57411=1571,t.afii57412=1572,t.afii57413=1573,t.afii57414=1574,t.afii57415=1575,t.afii57416=1576,t.afii57417=1577,t.afii57418=1578,t.afii57419=1579,t.afii57420=1580,t.afii57421=1581,t.afii57422=1582,t.afii57423=1583,t.afii57424=1584,t.afii57425=1585,t.afii57426=1586,t.afii57427=1587,t.afii57428=1588,t.afii57429=1589,t.afii57430=1590,t.afii57431=1591,t.afii57432=1592,t.afii57433=1593,t.afii57434=1594,t.afii57440=1600,t.afii57441=1601,t.afii57442=1602,t.afii57443=1603,t.afii57444=1604,t.afii57445=1605,t.afii57446=1606,t.afii57448=1608,t.afii57449=1609,t.afii57450=1610,t.afii57451=1611,t.afii57452=1612,t.afii57453=1613,t.afii57454=1614,t.afii57455=1615,t.afii57456=1616,t.afii57457=1617,t.afii57458=1618,t.afii57470=1607,t.afii57505=1700,t.afii57506=1662,t.afii57507=1670,t.afii57508=1688,t.afii57509=1711,t.afii57511=1657,t.afii57512=1672,t.afii57513=1681,t.afii57514=1722,t.afii57519=1746,t.afii57534=1749,t.afii57636=8362,t.afii57645=1470,t.afii57658=1475,t.afii57664=1488,t.afii57665=1489,t.afii57666=1490,t.afii57667=1491,t.afii57668=1492,t.afii57669=1493,t.afii57670=1494,t.afii57671=1495,t.afii57672=1496,t.afii57673=1497,t.afii57674=1498,t.afii57675=1499,t.afii57676=1500,t.afii57677=1501,t.afii57678=1502,t.afii57679=1503,t.afii57680=1504,t.afii57681=1505,t.afii57682=1506,t.afii57683=1507,t.afii57684=1508,t.afii57685=1509,t.afii57686=1510,t.afii57687=1511,t.afii57688=1512,t.afii57689=1513,t.afii57690=1514,t.afii57694=64298,t.afii57695=64299,t.afii57700=64331,t.afii57705=64287,t.afii57716=1520,t.afii57717=1521,t.afii57718=1522,t.afii57723=64309,t.afii57793=1460,t.afii57794=1461,t.afii57795=1462,t.afii57796=1467,t.afii57797=1464,t.afii57798=1463,t.afii57799=1456,t.afii57800=1458,t.afii57801=1457,t.afii57802=1459,t.afii57803=1474,t.afii57804=1473,t.afii57806=1465,t.afii57807=1468,t.afii57839=1469,t.afii57841=1471,t.afii57842=1472,t.afii57929=700,t.afii61248=8453,t.afii61289=8467,t.afii61352=8470,t.afii61573=8236,t.afii61574=8237,t.afii61575=8238,t.afii61664=8204,t.afii63167=1645,t.afii64937=701,t.agrave=224,t.agujarati=2693,t.agurmukhi=2565,t.ahiragana=12354,t.ahookabove=7843,t.aibengali=2448,t.aibopomofo=12574,t.aideva=2320,t.aiecyrillic=1237,t.aigujarati=2704,t.aigurmukhi=2576,t.aimatragurmukhi=2632,t.ainarabic=1593,t.ainfinalarabic=65226,t.aininitialarabic=65227,t.ainmedialarabic=65228,t.ainvertedbreve=515,t.aivowelsignbengali=2504,t.aivowelsigndeva=2376,t.aivowelsigngujarati=2760,t.akatakana=12450,t.akatakanahalfwidth=65393,t.akorean=12623,t.alef=1488,t.alefarabic=1575,t.alefdageshhebrew=64304,t.aleffinalarabic=65166,t.alefhamzaabovearabic=1571,t.alefhamzaabovefinalarabic=65156,t.alefhamzabelowarabic=1573,t.alefhamzabelowfinalarabic=65160,t.alefhebrew=1488,t.aleflamedhebrew=64335,t.alefmaddaabovearabic=1570,t.alefmaddaabovefinalarabic=65154,t.alefmaksuraarabic=1609,t.alefmaksurafinalarabic=65264,t.alefmaksurainitialarabic=65267,t.alefmaksuramedialarabic=65268,t.alefpatahhebrew=64302,t.alefqamatshebrew=64303,t.aleph=8501,t.allequal=8780,t.alpha=945,t.alphatonos=940,t.amacron=257,t.amonospace=65345,t.ampersand=38,t.ampersandmonospace=65286,t.ampersandsmall=63270,t.amsquare=13250,t.anbopomofo=12578,t.angbopomofo=12580,t.angbracketleft=12296,t.angbracketright=12297,t.angkhankhuthai=3674,t.angle=8736,t.anglebracketleft=12296,t.anglebracketleftvertical=65087,t.anglebracketright=12297,t.anglebracketrightvertical=65088,t.angleleft=9001,t.angleright=9002,t.angstrom=8491,t.anoteleia=903,t.anudattadeva=2386,t.anusvarabengali=2434,t.anusvaradeva=2306,t.anusvaragujarati=2690,t.aogonek=261,t.apaatosquare=13056,t.aparen=9372,t.apostrophearmenian=1370,t.apostrophemod=700,t.apple=63743,t.approaches=8784,t.approxequal=8776,t.approxequalorimage=8786,t.approximatelyequal=8773,t.araeaekorean=12686,t.araeakorean=12685,t.arc=8978,t.arighthalfring=7834,t.aring=229,t.aringacute=507,t.aringbelow=7681,t.arrowboth=8596,t.arrowdashdown=8675,t.arrowdashleft=8672,t.arrowdashright=8674,t.arrowdashup=8673,t.arrowdblboth=8660,t.arrowdbldown=8659,t.arrowdblleft=8656,t.arrowdblright=8658,t.arrowdblup=8657,t.arrowdown=8595,t.arrowdownleft=8601,t.arrowdownright=8600,t.arrowdownwhite=8681,t.arrowheaddownmod=709,t.arrowheadleftmod=706,t.arrowheadrightmod=707,t.arrowheadupmod=708,t.arrowhorizex=63719,t.arrowleft=8592,t.arrowleftdbl=8656,t.arrowleftdblstroke=8653,t.arrowleftoverright=8646,t.arrowleftwhite=8678,t.arrowright=8594,t.arrowrightdblstroke=8655,t.arrowrightheavy=10142,t.arrowrightoverleft=8644,t.arrowrightwhite=8680,t.arrowtableft=8676,t.arrowtabright=8677,t.arrowup=8593,t.arrowupdn=8597,t.arrowupdnbse=8616,t.arrowupdownbase=8616,t.arrowupleft=8598,t.arrowupleftofdown=8645,t.arrowupright=8599,t.arrowupwhite=8679,t.arrowvertex=63718,t.asciicircum=94,t.asciicircummonospace=65342,t.asciitilde=126,t.asciitildemonospace=65374,t.ascript=593,t.ascriptturned=594,t.asmallhiragana=12353,t.asmallkatakana=12449,t.asmallkatakanahalfwidth=65383,t.asterisk=42,t.asteriskaltonearabic=1645,t.asteriskarabic=1645,t.asteriskmath=8727,t.asteriskmonospace=65290,t.asterisksmall=65121,t.asterism=8258,t.asuperior=63209,t.asymptoticallyequal=8771,t.at=64,t.atilde=227,t.atmonospace=65312,t.atsmall=65131,t.aturned=592,t.aubengali=2452,t.aubopomofo=12576,t.audeva=2324,t.augujarati=2708,t.augurmukhi=2580,t.aulengthmarkbengali=2519,t.aumatragurmukhi=2636,t.auvowelsignbengali=2508,t.auvowelsigndeva=2380,t.auvowelsigngujarati=2764,t.avagrahadeva=2365,t.aybarmenian=1377,t.ayin=1506,t.ayinaltonehebrew=64288,t.ayinhebrew=1506,t.b=98,t.babengali=2476,t.backslash=92,t.backslashmonospace=65340,t.badeva=2348,t.bagujarati=2732,t.bagurmukhi=2604,t.bahiragana=12400,t.bahtthai=3647,t.bakatakana=12496,t.bar=124,t.barmonospace=65372,t.bbopomofo=12549,t.bcircle=9425,t.bdotaccent=7683,t.bdotbelow=7685,t.beamedsixteenthnotes=9836,t.because=8757,t.becyrillic=1073,t.beharabic=1576,t.behfinalarabic=65168,t.behinitialarabic=65169,t.behiragana=12409,t.behmedialarabic=65170,t.behmeeminitialarabic=64671,t.behmeemisolatedarabic=64520,t.behnoonfinalarabic=64621,t.bekatakana=12505,t.benarmenian=1378,t.bet=1489,t.beta=946,t.betasymbolgreek=976,t.betdagesh=64305,t.betdageshhebrew=64305,t.bethebrew=1489,t.betrafehebrew=64332,t.bhabengali=2477,t.bhadeva=2349,t.bhagujarati=2733,t.bhagurmukhi=2605,t.bhook=595,t.bihiragana=12403,t.bikatakana=12499,t.bilabialclick=664,t.bindigurmukhi=2562,t.birusquare=13105,t.blackcircle=9679,t.blackdiamond=9670,t.blackdownpointingtriangle=9660,t.blackleftpointingpointer=9668,t.blackleftpointingtriangle=9664,t.blacklenticularbracketleft=12304,t.blacklenticularbracketleftvertical=65083,t.blacklenticularbracketright=12305,t.blacklenticularbracketrightvertical=65084,t.blacklowerlefttriangle=9699,t.blacklowerrighttriangle=9698,t.blackrectangle=9644,t.blackrightpointingpointer=9658,t.blackrightpointingtriangle=9654,t.blacksmallsquare=9642,t.blacksmilingface=9787,t.blacksquare=9632,t.blackstar=9733,t.blackupperlefttriangle=9700,t.blackupperrighttriangle=9701,t.blackuppointingsmalltriangle=9652,t.blackuppointingtriangle=9650,t.blank=9251,t.blinebelow=7687,t.block=9608,t.bmonospace=65346,t.bobaimaithai=3610,t.bohiragana=12412,t.bokatakana=12508,t.bparen=9373,t.bqsquare=13251,t.braceex=63732,t.braceleft=123,t.braceleftbt=63731,t.braceleftmid=63730,t.braceleftmonospace=65371,t.braceleftsmall=65115,t.bracelefttp=63729,t.braceleftvertical=65079,t.braceright=125,t.bracerightbt=63742,t.bracerightmid=63741,t.bracerightmonospace=65373,t.bracerightsmall=65116,t.bracerighttp=63740,t.bracerightvertical=65080,t.bracketleft=91,t.bracketleftbt=63728,t.bracketleftex=63727,t.bracketleftmonospace=65339,t.bracketlefttp=63726,t.bracketright=93,t.bracketrightbt=63739,t.bracketrightex=63738,t.bracketrightmonospace=65341,t.bracketrighttp=63737,t.breve=728,t.brevebelowcmb=814,t.brevecmb=774,t.breveinvertedbelowcmb=815,t.breveinvertedcmb=785,t.breveinverteddoublecmb=865,t.bridgebelowcmb=810,t.bridgeinvertedbelowcmb=826,t.brokenbar=166,t.bstroke=384,t.bsuperior=63210,t.btopbar=387,t.buhiragana=12406,t.bukatakana=12502,t.bullet=8226,t.bulletinverse=9688,t.bulletoperator=8729,t.bullseye=9678,t.c=99,t.caarmenian=1390,t.cabengali=2458,t.cacute=263,t.cadeva=2330,t.cagujarati=2714,t.cagurmukhi=2586,t.calsquare=13192,t.candrabindubengali=2433,t.candrabinducmb=784,t.candrabindudeva=2305,t.candrabindugujarati=2689,t.capslock=8682,t.careof=8453,t.caron=711,t.caronbelowcmb=812,t.caroncmb=780,t.carriagereturn=8629,t.cbopomofo=12568,t.ccaron=269,t.ccedilla=231,t.ccedillaacute=7689,t.ccircle=9426,t.ccircumflex=265,t.ccurl=597,t.cdot=267,t.cdotaccent=267,t.cdsquare=13253,t.cedilla=184,t.cedillacmb=807,t.cent=162,t.centigrade=8451,t.centinferior=63199,t.centmonospace=65504,t.centoldstyle=63394,t.centsuperior=63200,t.chaarmenian=1401,t.chabengali=2459,t.chadeva=2331,t.chagujarati=2715,t.chagurmukhi=2587,t.chbopomofo=12564,t.cheabkhasiancyrillic=1213,t.checkmark=10003,t.checyrillic=1095,t.chedescenderabkhasiancyrillic=1215,t.chedescendercyrillic=1207,t.chedieresiscyrillic=1269,t.cheharmenian=1395,t.chekhakassiancyrillic=1228,t.cheverticalstrokecyrillic=1209,t.chi=967,t.chieuchacirclekorean=12919,t.chieuchaparenkorean=12823,t.chieuchcirclekorean=12905,t.chieuchkorean=12618,t.chieuchparenkorean=12809,t.chochangthai=3594,t.chochanthai=3592,t.chochingthai=3593,t.chochoethai=3596,t.chook=392,t.cieucacirclekorean=12918,t.cieucaparenkorean=12822,t.cieuccirclekorean=12904,t.cieuckorean=12616,t.cieucparenkorean=12808,t.cieucuparenkorean=12828,t.circle=9675,t.circlecopyrt=169,t.circlemultiply=8855,t.circleot=8857,t.circleplus=8853,t.circlepostalmark=12342,t.circlewithlefthalfblack=9680,t.circlewithrighthalfblack=9681,t.circumflex=710,t.circumflexbelowcmb=813,t.circumflexcmb=770,t.clear=8999,t.clickalveolar=450,t.clickdental=448,t.clicklateral=449,t.clickretroflex=451,t.club=9827,t.clubsuitblack=9827,t.clubsuitwhite=9831,t.cmcubedsquare=13220,t.cmonospace=65347,t.cmsquaredsquare=13216,t.coarmenian=1409,t.colon=58,t.colonmonetary=8353,t.colonmonospace=65306,t.colonsign=8353,t.colonsmall=65109,t.colontriangularhalfmod=721,t.colontriangularmod=720,t.comma=44,t.commaabovecmb=787,t.commaaboverightcmb=789,t.commaaccent=63171,t.commaarabic=1548,t.commaarmenian=1373,t.commainferior=63201,t.commamonospace=65292,t.commareversedabovecmb=788,t.commareversedmod=701,t.commasmall=65104,t.commasuperior=63202,t.commaturnedabovecmb=786,t.commaturnedmod=699,t.compass=9788,t.congruent=8773,t.contourintegral=8750,t.control=8963,t.controlACK=6,t.controlBEL=7,t.controlBS=8,t.controlCAN=24,t.controlCR=13,t.controlDC1=17,t.controlDC2=18,t.controlDC3=19,t.controlDC4=20,t.controlDEL=127,t.controlDLE=16,t.controlEM=25,t.controlENQ=5,t.controlEOT=4,t.controlESC=27,t.controlETB=23,t.controlETX=3,t.controlFF=12,t.controlFS=28,t.controlGS=29,t.controlHT=9,t.controlLF=10,t.controlNAK=21,t.controlNULL=0,t.controlRS=30,t.controlSI=15,t.controlSO=14,t.controlSOT=2,t.controlSTX=1,t.controlSUB=26,t.controlSYN=22,t.controlUS=31,t.controlVT=11,t.copyright=169,t.copyrightsans=63721,t.copyrightserif=63193,t.cornerbracketleft=12300,t.cornerbracketlefthalfwidth=65378,t.cornerbracketleftvertical=65089,t.cornerbracketright=12301,t.cornerbracketrighthalfwidth=65379,t.cornerbracketrightvertical=65090,t.corporationsquare=13183,t.cosquare=13255,t.coverkgsquare=13254,t.cparen=9374,t.cruzeiro=8354,t.cstretched=663,t.curlyand=8911,t.curlyor=8910,t.currency=164,t.cyrBreve=63185,t.cyrFlex=63186,t.cyrbreve=63188,t.cyrflex=63189,t.d=100,t.daarmenian=1380,t.dabengali=2470,t.dadarabic=1590,t.dadeva=2342,t.dadfinalarabic=65214,t.dadinitialarabic=65215,t.dadmedialarabic=65216,t.dagesh=1468,t.dageshhebrew=1468,t.dagger=8224,t.daggerdbl=8225,t.dagujarati=2726,t.dagurmukhi=2598,t.dahiragana=12384,t.dakatakana=12480,t.dalarabic=1583,t.dalet=1491,t.daletdagesh=64307,t.daletdageshhebrew=64307,t.dalethebrew=1491,t.dalfinalarabic=65194,t.dammaarabic=1615,t.dammalowarabic=1615,t.dammatanaltonearabic=1612,t.dammatanarabic=1612,t.danda=2404,t.dargahebrew=1447,t.dargalefthebrew=1447,t.dasiapneumatacyrilliccmb=1157,t.dblGrave=63187,t.dblanglebracketleft=12298,t.dblanglebracketleftvertical=65085,t.dblanglebracketright=12299,t.dblanglebracketrightvertical=65086,t.dblarchinvertedbelowcmb=811,t.dblarrowleft=8660,t.dblarrowright=8658,t.dbldanda=2405,t.dblgrave=63190,t.dblgravecmb=783,t.dblintegral=8748,t.dbllowline=8215,t.dbllowlinecmb=819,t.dbloverlinecmb=831,t.dblprimemod=698,t.dblverticalbar=8214,t.dblverticallineabovecmb=782,t.dbopomofo=12553,t.dbsquare=13256,t.dcaron=271,t.dcedilla=7697,t.dcircle=9427,t.dcircumflexbelow=7699,t.dcroat=273,t.ddabengali=2465,t.ddadeva=2337,t.ddagujarati=2721,t.ddagurmukhi=2593,t.ddalarabic=1672,t.ddalfinalarabic=64393,t.dddhadeva=2396,t.ddhabengali=2466,t.ddhadeva=2338,t.ddhagujarati=2722,t.ddhagurmukhi=2594,t.ddotaccent=7691,t.ddotbelow=7693,t.decimalseparatorarabic=1643,t.decimalseparatorpersian=1643,t.decyrillic=1076,t.degree=176,t.dehihebrew=1453,t.dehiragana=12391,t.deicoptic=1007,t.dekatakana=12487,t.deleteleft=9003,t.deleteright=8998,t.delta=948,t.deltaturned=397,t.denominatorminusonenumeratorbengali=2552,t.dezh=676,t.dhabengali=2471,t.dhadeva=2343,t.dhagujarati=2727,t.dhagurmukhi=2599,t.dhook=599,t.dialytikatonos=901,t.dialytikatonoscmb=836,t.diamond=9830,t.diamondsuitwhite=9826,t.dieresis=168,t.dieresisacute=63191,t.dieresisbelowcmb=804,t.dieresiscmb=776,t.dieresisgrave=63192,t.dieresistonos=901,t.dihiragana=12386,t.dikatakana=12482,t.dittomark=12291,t.divide=247,t.divides=8739,t.divisionslash=8725,t.djecyrillic=1106,t.dkshade=9619,t.dlinebelow=7695,t.dlsquare=13207,t.dmacron=273,t.dmonospace=65348,t.dnblock=9604,t.dochadathai=3598,t.dodekthai=3604,t.dohiragana=12393,t.dokatakana=12489,t.dollar=36;t.dollarinferior=63203,t.dollarmonospace=65284,t.dollaroldstyle=63268,t.dollarsmall=65129,t.dollarsuperior=63204,t.dong=8363,t.dorusquare=13094,t.dotaccent=729,t.dotaccentcmb=775,t.dotbelowcmb=803,t.dotbelowcomb=803,t.dotkatakana=12539,t.dotlessi=305,t.dotlessj=63166,t.dotlessjstrokehook=644,t.dotmath=8901,t.dottedcircle=9676,t.doubleyodpatah=64287,t.doubleyodpatahhebrew=64287,t.downtackbelowcmb=798,t.downtackmod=725,t.dparen=9375,t.dsuperior=63211,t.dtail=598,t.dtopbar=396,t.duhiragana=12389,t.dukatakana=12485,t.dz=499,t.dzaltone=675,t.dzcaron=454,t.dzcurl=677,t.dzeabkhasiancyrillic=1249,t.dzecyrillic=1109,t.dzhecyrillic=1119,t.e=101,t.eacute=233,t.earth=9793,t.ebengali=2447,t.ebopomofo=12572,t.ebreve=277,t.ecandradeva=2317,t.ecandragujarati=2701,t.ecandravowelsigndeva=2373,t.ecandravowelsigngujarati=2757,t.ecaron=283,t.ecedillabreve=7709,t.echarmenian=1381,t.echyiwnarmenian=1415,t.ecircle=9428,t.ecircumflex=234,t.ecircumflexacute=7871,t.ecircumflexbelow=7705,t.ecircumflexdotbelow=7879,t.ecircumflexgrave=7873,t.ecircumflexhookabove=7875,t.ecircumflextilde=7877,t.ecyrillic=1108,t.edblgrave=517,t.edeva=2319,t.edieresis=235,t.edot=279,t.edotaccent=279,t.edotbelow=7865,t.eegurmukhi=2575,t.eematragurmukhi=2631,t.efcyrillic=1092,t.egrave=232,t.egujarati=2703,t.eharmenian=1383,t.ehbopomofo=12573,t.ehiragana=12360,t.ehookabove=7867,t.eibopomofo=12575,t.eight=56,t.eightarabic=1640,t.eightbengali=2542,t.eightcircle=9319,t.eightcircleinversesansserif=10129,t.eightdeva=2414,t.eighteencircle=9329,t.eighteenparen=9349,t.eighteenperiod=9369,t.eightgujarati=2798,t.eightgurmukhi=2670,t.eighthackarabic=1640,t.eighthangzhou=12328,t.eighthnotebeamed=9835,t.eightideographicparen=12839,t.eightinferior=8328,t.eightmonospace=65304,t.eightoldstyle=63288,t.eightparen=9339,t.eightperiod=9359,t.eightpersian=1784,t.eightroman=8567,t.eightsuperior=8312,t.eightthai=3672,t.einvertedbreve=519,t.eiotifiedcyrillic=1125,t.ekatakana=12456,t.ekatakanahalfwidth=65396,t.ekonkargurmukhi=2676,t.ekorean=12628,t.elcyrillic=1083,t.element=8712,t.elevencircle=9322,t.elevenparen=9342,t.elevenperiod=9362,t.elevenroman=8570,t.ellipsis=8230,t.ellipsisvertical=8942,t.emacron=275,t.emacronacute=7703,t.emacrongrave=7701,t.emcyrillic=1084,t.emdash=8212,t.emdashvertical=65073,t.emonospace=65349,t.emphasismarkarmenian=1371,t.emptyset=8709,t.enbopomofo=12579,t.encyrillic=1085,t.endash=8211,t.endashvertical=65074,t.endescendercyrillic=1187,t.eng=331,t.engbopomofo=12581,t.enghecyrillic=1189,t.enhookcyrillic=1224,t.enspace=8194,t.eogonek=281,t.eokorean=12627,t.eopen=603,t.eopenclosed=666,t.eopenreversed=604,t.eopenreversedclosed=606,t.eopenreversedhook=605,t.eparen=9376,t.epsilon=949,t.epsilontonos=941,t.equal=61,t.equalmonospace=65309,t.equalsmall=65126,t.equalsuperior=8316,t.equivalence=8801,t.erbopomofo=12582,t.ercyrillic=1088,t.ereversed=600,t.ereversedcyrillic=1101,t.escyrillic=1089,t.esdescendercyrillic=1195,t.esh=643,t.eshcurl=646,t.eshortdeva=2318,t.eshortvowelsigndeva=2374,t.eshreversedloop=426,t.eshsquatreversed=645,t.esmallhiragana=12359,t.esmallkatakana=12455,t.esmallkatakanahalfwidth=65386,t.estimated=8494,t.esuperior=63212,t.eta=951,t.etarmenian=1384,t.etatonos=942,t.eth=240,t.etilde=7869,t.etildebelow=7707,t.etnahtafoukhhebrew=1425,t.etnahtafoukhlefthebrew=1425,t.etnahtahebrew=1425,t.etnahtalefthebrew=1425,t.eturned=477,t.eukorean=12641,t.euro=8364,t.evowelsignbengali=2503,t.evowelsigndeva=2375,t.evowelsigngujarati=2759,t.exclam=33,t.exclamarmenian=1372,t.exclamdbl=8252,t.exclamdown=161,t.exclamdownsmall=63393,t.exclammonospace=65281,t.exclamsmall=63265,t.existential=8707,t.ezh=658,t.ezhcaron=495,t.ezhcurl=659,t.ezhreversed=441,t.ezhtail=442,t.f=102,t.fadeva=2398,t.fagurmukhi=2654,t.fahrenheit=8457,t.fathaarabic=1614,t.fathalowarabic=1614,t.fathatanarabic=1611,t.fbopomofo=12552,t.fcircle=9429,t.fdotaccent=7711,t.feharabic=1601,t.feharmenian=1414,t.fehfinalarabic=65234,t.fehinitialarabic=65235,t.fehmedialarabic=65236,t.feicoptic=997,t.female=9792,t.ff=64256,t.f_f=64256,t.ffi=64259,t.f_f_i=64259,t.ffl=64260,t.f_f_l=64260,t.fi=64257,t.f_i=64257,t.fifteencircle=9326,t.fifteenparen=9346,t.fifteenperiod=9366,t.figuredash=8210,t.filledbox=9632,t.filledrect=9644,t.finalkaf=1498,t.finalkafdagesh=64314,t.finalkafdageshhebrew=64314,t.finalkafhebrew=1498,t.finalmem=1501,t.finalmemhebrew=1501,t.finalnun=1503,t.finalnunhebrew=1503,t.finalpe=1507,t.finalpehebrew=1507,t.finaltsadi=1509,t.finaltsadihebrew=1509,t.firsttonechinese=713,t.fisheye=9673,t.fitacyrillic=1139,t.five=53,t.fivearabic=1637,t.fivebengali=2539,t.fivecircle=9316,t.fivecircleinversesansserif=10126,t.fivedeva=2411,t.fiveeighths=8541,t.fivegujarati=2795,t.fivegurmukhi=2667,t.fivehackarabic=1637,t.fivehangzhou=12325,t.fiveideographicparen=12836,t.fiveinferior=8325,t.fivemonospace=65301,t.fiveoldstyle=63285,t.fiveparen=9336,t.fiveperiod=9356,t.fivepersian=1781,t.fiveroman=8564,t.fivesuperior=8309,t.fivethai=3669,t.fl=64258,t.f_l=64258,t.florin=402,t.fmonospace=65350,t.fmsquare=13209,t.fofanthai=3615,t.fofathai=3613,t.fongmanthai=3663,t.forall=8704,t.four=52,t.fourarabic=1636,t.fourbengali=2538,t.fourcircle=9315,t.fourcircleinversesansserif=10125,t.fourdeva=2410,t.fourgujarati=2794,t.fourgurmukhi=2666,t.fourhackarabic=1636,t.fourhangzhou=12324,t.fourideographicparen=12835,t.fourinferior=8324,t.fourmonospace=65300,t.fournumeratorbengali=2551,t.fouroldstyle=63284,t.fourparen=9335,t.fourperiod=9355,t.fourpersian=1780,t.fourroman=8563,t.foursuperior=8308,t.fourteencircle=9325,t.fourteenparen=9345,t.fourteenperiod=9365,t.fourthai=3668,t.fourthtonechinese=715,t.fparen=9377,t.fraction=8260,t.franc=8355,t.g=103,t.gabengali=2455,t.gacute=501,t.gadeva=2327,t.gafarabic=1711,t.gaffinalarabic=64403,t.gafinitialarabic=64404,t.gafmedialarabic=64405,t.gagujarati=2711,t.gagurmukhi=2583,t.gahiragana=12364,t.gakatakana=12460,t.gamma=947,t.gammalatinsmall=611,t.gammasuperior=736,t.gangiacoptic=1003,t.gbopomofo=12557,t.gbreve=287,t.gcaron=487,t.gcedilla=291,t.gcircle=9430,t.gcircumflex=285,t.gcommaaccent=291,t.gdot=289,t.gdotaccent=289,t.gecyrillic=1075,t.gehiragana=12370,t.gekatakana=12466,t.geometricallyequal=8785,t.gereshaccenthebrew=1436,t.gereshhebrew=1523,t.gereshmuqdamhebrew=1437,t.germandbls=223,t.gershayimaccenthebrew=1438,t.gershayimhebrew=1524,t.getamark=12307,t.ghabengali=2456,t.ghadarmenian=1394,t.ghadeva=2328,t.ghagujarati=2712,t.ghagurmukhi=2584,t.ghainarabic=1594,t.ghainfinalarabic=65230,t.ghaininitialarabic=65231,t.ghainmedialarabic=65232,t.ghemiddlehookcyrillic=1173,t.ghestrokecyrillic=1171,t.gheupturncyrillic=1169,t.ghhadeva=2394,t.ghhagurmukhi=2650,t.ghook=608,t.ghzsquare=13203,t.gihiragana=12366,t.gikatakana=12462,t.gimarmenian=1379,t.gimel=1490,t.gimeldagesh=64306,t.gimeldageshhebrew=64306,t.gimelhebrew=1490,t.gjecyrillic=1107,t.glottalinvertedstroke=446,t.glottalstop=660,t.glottalstopinverted=662,t.glottalstopmod=704,t.glottalstopreversed=661,t.glottalstopreversedmod=705,t.glottalstopreversedsuperior=740,t.glottalstopstroke=673,t.glottalstopstrokereversed=674,t.gmacron=7713,t.gmonospace=65351,t.gohiragana=12372,t.gokatakana=12468,t.gparen=9378,t.gpasquare=13228,t.gradient=8711,t.grave=96,t.gravebelowcmb=790,t.gravecmb=768,t.gravecomb=768,t.gravedeva=2387,t.gravelowmod=718,t.gravemonospace=65344,t.gravetonecmb=832,t.greater=62,t.greaterequal=8805,t.greaterequalorless=8923,t.greatermonospace=65310,t.greaterorequivalent=8819,t.greaterorless=8823,t.greateroverequal=8807,t.greatersmall=65125,t.gscript=609,t.gstroke=485,t.guhiragana=12368,t.guillemotleft=171,t.guillemotright=187,t.guilsinglleft=8249,t.guilsinglright=8250,t.gukatakana=12464,t.guramusquare=13080,t.gysquare=13257,t.h=104,t.haabkhasiancyrillic=1193,t.haaltonearabic=1729,t.habengali=2489,t.hadescendercyrillic=1203,t.hadeva=2361,t.hagujarati=2745,t.hagurmukhi=2617,t.haharabic=1581,t.hahfinalarabic=65186,t.hahinitialarabic=65187,t.hahiragana=12399,t.hahmedialarabic=65188,t.haitusquare=13098,t.hakatakana=12495,t.hakatakanahalfwidth=65418,t.halantgurmukhi=2637,t.hamzaarabic=1569,t.hamzalowarabic=1569,t.hangulfiller=12644,t.hardsigncyrillic=1098,t.harpoonleftbarbup=8636,t.harpoonrightbarbup=8640,t.hasquare=13258,t.hatafpatah=1458,t.hatafpatah16=1458,t.hatafpatah23=1458,t.hatafpatah2f=1458,t.hatafpatahhebrew=1458,t.hatafpatahnarrowhebrew=1458,t.hatafpatahquarterhebrew=1458,t.hatafpatahwidehebrew=1458,t.hatafqamats=1459,t.hatafqamats1b=1459,t.hatafqamats28=1459,t.hatafqamats34=1459,t.hatafqamatshebrew=1459,t.hatafqamatsnarrowhebrew=1459,t.hatafqamatsquarterhebrew=1459,t.hatafqamatswidehebrew=1459,t.hatafsegol=1457,t.hatafsegol17=1457,t.hatafsegol24=1457,t.hatafsegol30=1457,t.hatafsegolhebrew=1457,t.hatafsegolnarrowhebrew=1457,t.hatafsegolquarterhebrew=1457,t.hatafsegolwidehebrew=1457,t.hbar=295,t.hbopomofo=12559,t.hbrevebelow=7723,t.hcedilla=7721,t.hcircle=9431,t.hcircumflex=293,t.hdieresis=7719,t.hdotaccent=7715,t.hdotbelow=7717,t.he=1492,t.heart=9829,t.heartsuitblack=9829,t.heartsuitwhite=9825,t.hedagesh=64308,t.hedageshhebrew=64308,t.hehaltonearabic=1729,t.heharabic=1607,t.hehebrew=1492,t.hehfinalaltonearabic=64423,t.hehfinalalttwoarabic=65258,t.hehfinalarabic=65258,t.hehhamzaabovefinalarabic=64421,t.hehhamzaaboveisolatedarabic=64420,t.hehinitialaltonearabic=64424,t.hehinitialarabic=65259,t.hehiragana=12408,t.hehmedialaltonearabic=64425,t.hehmedialarabic=65260,t.heiseierasquare=13179,t.hekatakana=12504,t.hekatakanahalfwidth=65421,t.hekutaarusquare=13110,t.henghook=615,t.herutusquare=13113,t.het=1495,t.hethebrew=1495,t.hhook=614,t.hhooksuperior=689,t.hieuhacirclekorean=12923,t.hieuhaparenkorean=12827,t.hieuhcirclekorean=12909,t.hieuhkorean=12622,t.hieuhparenkorean=12813,t.hihiragana=12402,t.hikatakana=12498,t.hikatakanahalfwidth=65419,t.hiriq=1460,t.hiriq14=1460,t.hiriq21=1460,t.hiriq2d=1460,t.hiriqhebrew=1460,t.hiriqnarrowhebrew=1460,t.hiriqquarterhebrew=1460,t.hiriqwidehebrew=1460,t.hlinebelow=7830,t.hmonospace=65352,t.hoarmenian=1392,t.hohipthai=3627,t.hohiragana=12411,t.hokatakana=12507,t.hokatakanahalfwidth=65422,t.holam=1465,t.holam19=1465,t.holam26=1465,t.holam32=1465,t.holamhebrew=1465,t.holamnarrowhebrew=1465,t.holamquarterhebrew=1465,t.holamwidehebrew=1465,t.honokhukthai=3630,t.hookabovecomb=777,t.hookcmb=777,t.hookpalatalizedbelowcmb=801,t.hookretroflexbelowcmb=802,t.hoonsquare=13122,t.horicoptic=1001,t.horizontalbar=8213,t.horncmb=795,t.hotsprings=9832,t.house=8962,t.hparen=9379,t.hsuperior=688,t.hturned=613,t.huhiragana=12405,t.huiitosquare=13107,t.hukatakana=12501,t.hukatakanahalfwidth=65420,t.hungarumlaut=733,t.hungarumlautcmb=779,t.hv=405,t.hyphen=45,t.hypheninferior=63205,t.hyphenmonospace=65293,t.hyphensmall=65123,t.hyphensuperior=63206,t.hyphentwo=8208,t.i=105,t.iacute=237,t.iacyrillic=1103,t.ibengali=2439,t.ibopomofo=12583,t.ibreve=301,t.icaron=464,t.icircle=9432,t.icircumflex=238,t.icyrillic=1110,t.idblgrave=521,t.ideographearthcircle=12943,t.ideographfirecircle=12939,t.ideographicallianceparen=12863,t.ideographiccallparen=12858,t.ideographiccentrecircle=12965,t.ideographicclose=12294,t.ideographiccomma=12289,t.ideographiccommaleft=65380,t.ideographiccongratulationparen=12855,t.ideographiccorrectcircle=12963,t.ideographicearthparen=12847,t.ideographicenterpriseparen=12861,t.ideographicexcellentcircle=12957,t.ideographicfestivalparen=12864,t.ideographicfinancialcircle=12950,t.ideographicfinancialparen=12854,t.ideographicfireparen=12843,t.ideographichaveparen=12850,t.ideographichighcircle=12964,t.ideographiciterationmark=12293,t.ideographiclaborcircle=12952,t.ideographiclaborparen=12856,t.ideographicleftcircle=12967,t.ideographiclowcircle=12966,t.ideographicmedicinecircle=12969,t.ideographicmetalparen=12846,t.ideographicmoonparen=12842,t.ideographicnameparen=12852,t.ideographicperiod=12290,t.ideographicprintcircle=12958,t.ideographicreachparen=12867,t.ideographicrepresentparen=12857,t.ideographicresourceparen=12862,t.ideographicrightcircle=12968,t.ideographicsecretcircle=12953,t.ideographicselfparen=12866,t.ideographicsocietyparen=12851,t.ideographicspace=12288,t.ideographicspecialparen=12853,t.ideographicstockparen=12849,t.ideographicstudyparen=12859,t.ideographicsunparen=12848,t.ideographicsuperviseparen=12860,t.ideographicwaterparen=12844,t.ideographicwoodparen=12845,t.ideographiczero=12295,t.ideographmetalcircle=12942,t.ideographmooncircle=12938,t.ideographnamecircle=12948,t.ideographsuncircle=12944,t.ideographwatercircle=12940,t.ideographwoodcircle=12941,t.ideva=2311,t.idieresis=239,t.idieresisacute=7727,t.idieresiscyrillic=1253,t.idotbelow=7883,t.iebrevecyrillic=1239,t.iecyrillic=1077,t.ieungacirclekorean=12917,t.ieungaparenkorean=12821,t.ieungcirclekorean=12903,t.ieungkorean=12615,t.ieungparenkorean=12807,t.igrave=236,t.igujarati=2695,t.igurmukhi=2567,t.ihiragana=12356,t.ihookabove=7881,t.iibengali=2440,t.iicyrillic=1080,t.iideva=2312,t.iigujarati=2696,t.iigurmukhi=2568,t.iimatragurmukhi=2624,t.iinvertedbreve=523,t.iishortcyrillic=1081,t.iivowelsignbengali=2496,t.iivowelsigndeva=2368,t.iivowelsigngujarati=2752,t.ij=307,t.ikatakana=12452,t.ikatakanahalfwidth=65394,t.ikorean=12643,t.ilde=732,t.iluyhebrew=1452,t.imacron=299,t.imacroncyrillic=1251,t.imageorapproximatelyequal=8787,t.imatragurmukhi=2623,t.imonospace=65353,t.increment=8710,t.infinity=8734,t.iniarmenian=1387,t.integral=8747,t.integralbottom=8993,t.integralbt=8993,t.integralex=63733,t.integraltop=8992,t.integraltp=8992,t.intersection=8745,t.intisquare=13061,t.invbullet=9688,t.invcircle=9689,t.invsmileface=9787,t.iocyrillic=1105,t.iogonek=303,t.iota=953,t.iotadieresis=970,t.iotadieresistonos=912,t.iotalatin=617,t.iotatonos=943,t.iparen=9380,t.irigurmukhi=2674,t.ismallhiragana=12355,t.ismallkatakana=12451,t.ismallkatakanahalfwidth=65384,t.issharbengali=2554,t.istroke=616,t.isuperior=63213,t.iterationhiragana=12445,t.iterationkatakana=12541,t.itilde=297,t.itildebelow=7725,t.iubopomofo=12585,t.iucyrillic=1102,t.ivowelsignbengali=2495,t.ivowelsigndeva=2367,t.ivowelsigngujarati=2751,t.izhitsacyrillic=1141,t.izhitsadblgravecyrillic=1143,t.j=106,t.jaarmenian=1393,t.jabengali=2460,t.jadeva=2332,t.jagujarati=2716,t.jagurmukhi=2588,t.jbopomofo=12560,t.jcaron=496,t.jcircle=9433,t.jcircumflex=309,t.jcrossedtail=669,t.jdotlessstroke=607,t.jecyrillic=1112,t.jeemarabic=1580,t.jeemfinalarabic=65182,t.jeeminitialarabic=65183,t.jeemmedialarabic=65184,t.jeharabic=1688,t.jehfinalarabic=64395,t.jhabengali=2461,t.jhadeva=2333,t.jhagujarati=2717,t.jhagurmukhi=2589,t.jheharmenian=1403,t.jis=12292,t.jmonospace=65354,t.jparen=9381,t.jsuperior=690,t.k=107,t.kabashkircyrillic=1185,t.kabengali=2453,t.kacute=7729,t.kacyrillic=1082,t.kadescendercyrillic=1179,t.kadeva=2325,t.kaf=1499,t.kafarabic=1603,t.kafdagesh=64315,t.kafdageshhebrew=64315,t.kaffinalarabic=65242,t.kafhebrew=1499,t.kafinitialarabic=65243,t.kafmedialarabic=65244,t.kafrafehebrew=64333,t.kagujarati=2709,t.kagurmukhi=2581,t.kahiragana=12363,t.kahookcyrillic=1220,t.kakatakana=12459,t.kakatakanahalfwidth=65398,t.kappa=954,t.kappasymbolgreek=1008,t.kapyeounmieumkorean=12657,t.kapyeounphieuphkorean=12676,t.kapyeounpieupkorean=12664,t.kapyeounssangpieupkorean=12665,t.karoriisquare=13069,t.kashidaautoarabic=1600,t.kashidaautonosidebearingarabic=1600,t.kasmallkatakana=12533,t.kasquare=13188,t.kasraarabic=1616,t.kasratanarabic=1613,t.kastrokecyrillic=1183,t.katahiraprolongmarkhalfwidth=65392,t.kaverticalstrokecyrillic=1181,t.kbopomofo=12558,t.kcalsquare=13193,t.kcaron=489,t.kcedilla=311,t.kcircle=9434,t.kcommaaccent=311,t.kdotbelow=7731,t.keharmenian=1412,t.kehiragana=12369,t.kekatakana=12465,t.kekatakanahalfwidth=65401,t.kenarmenian=1391,t.kesmallkatakana=12534,t.kgreenlandic=312,t.khabengali=2454,t.khacyrillic=1093,t.khadeva=2326,t.khagujarati=2710,t.khagurmukhi=2582,t.khaharabic=1582,t.khahfinalarabic=65190,t.khahinitialarabic=65191,t.khahmedialarabic=65192,t.kheicoptic=999,t.khhadeva=2393,t.khhagurmukhi=2649,t.khieukhacirclekorean=12920,t.khieukhaparenkorean=12824,t.khieukhcirclekorean=12906,t.khieukhkorean=12619,t.khieukhparenkorean=12810,t.khokhaithai=3586,t.khokhonthai=3589,t.khokhuatthai=3587,t.khokhwaithai=3588,t.khomutthai=3675,t.khook=409,t.khorakhangthai=3590,t.khzsquare=13201,t.kihiragana=12365,t.kikatakana=12461,t.kikatakanahalfwidth=65399,t.kiroguramusquare=13077,t.kiromeetorusquare=13078,t.kirosquare=13076,t.kiyeokacirclekorean=12910,t.kiyeokaparenkorean=12814,t.kiyeokcirclekorean=12896,t.kiyeokkorean=12593,t.kiyeokparenkorean=12800,t.kiyeoksioskorean=12595;t.kjecyrillic=1116,t.klinebelow=7733,t.klsquare=13208,t.kmcubedsquare=13222,t.kmonospace=65355,t.kmsquaredsquare=13218,t.kohiragana=12371,t.kohmsquare=13248,t.kokaithai=3585,t.kokatakana=12467,t.kokatakanahalfwidth=65402,t.kooposquare=13086,t.koppacyrillic=1153,t.koreanstandardsymbol=12927,t.koroniscmb=835,t.kparen=9382,t.kpasquare=13226,t.ksicyrillic=1135,t.ktsquare=13263,t.kturned=670,t.kuhiragana=12367,t.kukatakana=12463,t.kukatakanahalfwidth=65400,t.kvsquare=13240,t.kwsquare=13246,t.l=108,t.labengali=2482,t.lacute=314,t.ladeva=2354,t.lagujarati=2738,t.lagurmukhi=2610,t.lakkhangyaothai=3653,t.lamaleffinalarabic=65276,t.lamalefhamzaabovefinalarabic=65272,t.lamalefhamzaaboveisolatedarabic=65271,t.lamalefhamzabelowfinalarabic=65274,t.lamalefhamzabelowisolatedarabic=65273,t.lamalefisolatedarabic=65275,t.lamalefmaddaabovefinalarabic=65270,t.lamalefmaddaaboveisolatedarabic=65269,t.lamarabic=1604,t.lambda=955,t.lambdastroke=411,t.lamed=1500,t.lameddagesh=64316,t.lameddageshhebrew=64316,t.lamedhebrew=1500,t.lamfinalarabic=65246,t.lamhahinitialarabic=64714,t.laminitialarabic=65247,t.lamjeeminitialarabic=64713,t.lamkhahinitialarabic=64715,t.lamlamhehisolatedarabic=65010,t.lammedialarabic=65248,t.lammeemhahinitialarabic=64904,t.lammeeminitialarabic=64716,t.largecircle=9711,t.lbar=410,t.lbelt=620,t.lbopomofo=12556,t.lcaron=318,t.lcedilla=316,t.lcircle=9435,t.lcircumflexbelow=7741,t.lcommaaccent=316,t.ldot=320,t.ldotaccent=320,t.ldotbelow=7735,t.ldotbelowmacron=7737,t.leftangleabovecmb=794,t.lefttackbelowcmb=792,t.less=60,t.lessequal=8804,t.lessequalorgreater=8922,t.lessmonospace=65308,t.lessorequivalent=8818,t.lessorgreater=8822,t.lessoverequal=8806,t.lesssmall=65124,t.lezh=622,t.lfblock=9612,t.lhookretroflex=621,t.lira=8356,t.liwnarmenian=1388,t.lj=457,t.ljecyrillic=1113,t.ll=63168,t.lladeva=2355,t.llagujarati=2739,t.llinebelow=7739,t.llladeva=2356,t.llvocalicbengali=2529,t.llvocalicdeva=2401,t.llvocalicvowelsignbengali=2531,t.llvocalicvowelsigndeva=2403,t.lmiddletilde=619,t.lmonospace=65356,t.lmsquare=13264,t.lochulathai=3628,t.logicaland=8743,t.logicalnot=172,t.logicalnotreversed=8976,t.logicalor=8744,t.lolingthai=3621,t.longs=383,t.lowlinecenterline=65102,t.lowlinecmb=818,t.lowlinedashed=65101,t.lozenge=9674,t.lparen=9383,t.lslash=322,t.lsquare=8467,t.lsuperior=63214,t.ltshade=9617,t.luthai=3622,t.lvocalicbengali=2444,t.lvocalicdeva=2316,t.lvocalicvowelsignbengali=2530,t.lvocalicvowelsigndeva=2402,t.lxsquare=13267,t.m=109,t.mabengali=2478,t.macron=175,t.macronbelowcmb=817,t.macroncmb=772,t.macronlowmod=717,t.macronmonospace=65507,t.macute=7743,t.madeva=2350,t.magujarati=2734,t.magurmukhi=2606,t.mahapakhhebrew=1444,t.mahapakhlefthebrew=1444,t.mahiragana=12414,t.maichattawalowleftthai=63637,t.maichattawalowrightthai=63636,t.maichattawathai=3659,t.maichattawaupperleftthai=63635,t.maieklowleftthai=63628,t.maieklowrightthai=63627,t.maiekthai=3656,t.maiekupperleftthai=63626,t.maihanakatleftthai=63620,t.maihanakatthai=3633,t.maitaikhuleftthai=63625,t.maitaikhuthai=3655,t.maitholowleftthai=63631,t.maitholowrightthai=63630,t.maithothai=3657,t.maithoupperleftthai=63629,t.maitrilowleftthai=63634,t.maitrilowrightthai=63633,t.maitrithai=3658,t.maitriupperleftthai=63632,t.maiyamokthai=3654,t.makatakana=12510,t.makatakanahalfwidth=65423,t.male=9794,t.mansyonsquare=13127,t.maqafhebrew=1470,t.mars=9794,t.masoracirclehebrew=1455,t.masquare=13187,t.mbopomofo=12551,t.mbsquare=13268,t.mcircle=9436,t.mcubedsquare=13221,t.mdotaccent=7745,t.mdotbelow=7747,t.meemarabic=1605,t.meemfinalarabic=65250,t.meeminitialarabic=65251,t.meemmedialarabic=65252,t.meemmeeminitialarabic=64721,t.meemmeemisolatedarabic=64584,t.meetorusquare=13133,t.mehiragana=12417,t.meizierasquare=13182,t.mekatakana=12513,t.mekatakanahalfwidth=65426,t.mem=1502,t.memdagesh=64318,t.memdageshhebrew=64318,t.memhebrew=1502,t.menarmenian=1396,t.merkhahebrew=1445,t.merkhakefulahebrew=1446,t.merkhakefulalefthebrew=1446,t.merkhalefthebrew=1445,t.mhook=625,t.mhzsquare=13202,t.middledotkatakanahalfwidth=65381,t.middot=183,t.mieumacirclekorean=12914,t.mieumaparenkorean=12818,t.mieumcirclekorean=12900,t.mieumkorean=12609,t.mieumpansioskorean=12656,t.mieumparenkorean=12804,t.mieumpieupkorean=12654,t.mieumsioskorean=12655,t.mihiragana=12415,t.mikatakana=12511,t.mikatakanahalfwidth=65424,t.minus=8722,t.minusbelowcmb=800,t.minuscircle=8854,t.minusmod=727,t.minusplus=8723,t.minute=8242,t.miribaarusquare=13130,t.mirisquare=13129,t.mlonglegturned=624,t.mlsquare=13206,t.mmcubedsquare=13219,t.mmonospace=65357,t.mmsquaredsquare=13215,t.mohiragana=12418,t.mohmsquare=13249,t.mokatakana=12514,t.mokatakanahalfwidth=65427,t.molsquare=13270,t.momathai=3617,t.moverssquare=13223,t.moverssquaredsquare=13224,t.mparen=9384,t.mpasquare=13227,t.mssquare=13235,t.msuperior=63215,t.mturned=623,t.mu=181,t.mu1=181,t.muasquare=13186,t.muchgreater=8811,t.muchless=8810,t.mufsquare=13196,t.mugreek=956,t.mugsquare=13197,t.muhiragana=12416,t.mukatakana=12512,t.mukatakanahalfwidth=65425,t.mulsquare=13205,t.multiply=215,t.mumsquare=13211,t.munahhebrew=1443,t.munahlefthebrew=1443,t.musicalnote=9834,t.musicalnotedbl=9835,t.musicflatsign=9837,t.musicsharpsign=9839,t.mussquare=13234,t.muvsquare=13238,t.muwsquare=13244,t.mvmegasquare=13241,t.mvsquare=13239,t.mwmegasquare=13247,t.mwsquare=13245,t.n=110,t.nabengali=2472,t.nabla=8711,t.nacute=324,t.nadeva=2344,t.nagujarati=2728,t.nagurmukhi=2600,t.nahiragana=12394,t.nakatakana=12490,t.nakatakanahalfwidth=65413,t.napostrophe=329,t.nasquare=13185,t.nbopomofo=12555,t.nbspace=160,t.ncaron=328,t.ncedilla=326,t.ncircle=9437,t.ncircumflexbelow=7755,t.ncommaaccent=326,t.ndotaccent=7749,t.ndotbelow=7751,t.nehiragana=12397,t.nekatakana=12493,t.nekatakanahalfwidth=65416,t.newsheqelsign=8362,t.nfsquare=13195,t.ngabengali=2457,t.ngadeva=2329,t.ngagujarati=2713,t.ngagurmukhi=2585,t.ngonguthai=3591,t.nhiragana=12435,t.nhookleft=626,t.nhookretroflex=627,t.nieunacirclekorean=12911,t.nieunaparenkorean=12815,t.nieuncieuckorean=12597,t.nieuncirclekorean=12897,t.nieunhieuhkorean=12598,t.nieunkorean=12596,t.nieunpansioskorean=12648,t.nieunparenkorean=12801,t.nieunsioskorean=12647,t.nieuntikeutkorean=12646,t.nihiragana=12395,t.nikatakana=12491,t.nikatakanahalfwidth=65414,t.nikhahitleftthai=63641,t.nikhahitthai=3661,t.nine=57,t.ninearabic=1641,t.ninebengali=2543,t.ninecircle=9320,t.ninecircleinversesansserif=10130,t.ninedeva=2415,t.ninegujarati=2799,t.ninegurmukhi=2671,t.ninehackarabic=1641,t.ninehangzhou=12329,t.nineideographicparen=12840,t.nineinferior=8329,t.ninemonospace=65305,t.nineoldstyle=63289,t.nineparen=9340,t.nineperiod=9360,t.ninepersian=1785,t.nineroman=8568,t.ninesuperior=8313,t.nineteencircle=9330,t.nineteenparen=9350,t.nineteenperiod=9370,t.ninethai=3673,t.nj=460,t.njecyrillic=1114,t.nkatakana=12531,t.nkatakanahalfwidth=65437,t.nlegrightlong=414,t.nlinebelow=7753,t.nmonospace=65358,t.nmsquare=13210,t.nnabengali=2467,t.nnadeva=2339,t.nnagujarati=2723,t.nnagurmukhi=2595,t.nnnadeva=2345,t.nohiragana=12398,t.nokatakana=12494,t.nokatakanahalfwidth=65417,t.nonbreakingspace=160,t.nonenthai=3603,t.nonuthai=3609,t.noonarabic=1606,t.noonfinalarabic=65254,t.noonghunnaarabic=1722,t.noonghunnafinalarabic=64415,t.nooninitialarabic=65255,t.noonjeeminitialarabic=64722,t.noonjeemisolatedarabic=64587,t.noonmedialarabic=65256,t.noonmeeminitialarabic=64725,t.noonmeemisolatedarabic=64590,t.noonnoonfinalarabic=64653,t.notcontains=8716,t.notelement=8713,t.notelementof=8713,t.notequal=8800,t.notgreater=8815,t.notgreaternorequal=8817,t.notgreaternorless=8825,t.notidentical=8802,t.notless=8814,t.notlessnorequal=8816,t.notparallel=8742,t.notprecedes=8832,t.notsubset=8836,t.notsucceeds=8833,t.notsuperset=8837,t.nowarmenian=1398,t.nparen=9385,t.nssquare=13233,t.nsuperior=8319,t.ntilde=241,t.nu=957,t.nuhiragana=12396,t.nukatakana=12492,t.nukatakanahalfwidth=65415,t.nuktabengali=2492,t.nuktadeva=2364,t.nuktagujarati=2748,t.nuktagurmukhi=2620,t.numbersign=35,t.numbersignmonospace=65283,t.numbersignsmall=65119,t.numeralsigngreek=884,t.numeralsignlowergreek=885,t.numero=8470,t.nun=1504,t.nundagesh=64320,t.nundageshhebrew=64320,t.nunhebrew=1504,t.nvsquare=13237,t.nwsquare=13243,t.nyabengali=2462,t.nyadeva=2334,t.nyagujarati=2718,t.nyagurmukhi=2590,t.o=111,t.oacute=243,t.oangthai=3629,t.obarred=629,t.obarredcyrillic=1257,t.obarreddieresiscyrillic=1259,t.obengali=2451,t.obopomofo=12571,t.obreve=335,t.ocandradeva=2321,t.ocandragujarati=2705,t.ocandravowelsigndeva=2377,t.ocandravowelsigngujarati=2761,t.ocaron=466,t.ocircle=9438,t.ocircumflex=244,t.ocircumflexacute=7889,t.ocircumflexdotbelow=7897,t.ocircumflexgrave=7891,t.ocircumflexhookabove=7893,t.ocircumflextilde=7895,t.ocyrillic=1086,t.odblacute=337,t.odblgrave=525,t.odeva=2323,t.odieresis=246,t.odieresiscyrillic=1255,t.odotbelow=7885,t.oe=339,t.oekorean=12634,t.ogonek=731,t.ogonekcmb=808,t.ograve=242,t.ogujarati=2707,t.oharmenian=1413,t.ohiragana=12362,t.ohookabove=7887,t.ohorn=417,t.ohornacute=7899,t.ohorndotbelow=7907,t.ohorngrave=7901,t.ohornhookabove=7903,t.ohorntilde=7905,t.ohungarumlaut=337,t.oi=419,t.oinvertedbreve=527,t.okatakana=12458,t.okatakanahalfwidth=65397,t.okorean=12631,t.olehebrew=1451,t.omacron=333,t.omacronacute=7763,t.omacrongrave=7761,t.omdeva=2384,t.omega=969,t.omega1=982,t.omegacyrillic=1121,t.omegalatinclosed=631,t.omegaroundcyrillic=1147,t.omegatitlocyrillic=1149,t.omegatonos=974,t.omgujarati=2768,t.omicron=959,t.omicrontonos=972,t.omonospace=65359,t.one=49,t.onearabic=1633,t.onebengali=2535,t.onecircle=9312,t.onecircleinversesansserif=10122,t.onedeva=2407,t.onedotenleader=8228,t.oneeighth=8539,t.onefitted=63196,t.onegujarati=2791,t.onegurmukhi=2663,t.onehackarabic=1633,t.onehalf=189,t.onehangzhou=12321,t.oneideographicparen=12832,t.oneinferior=8321,t.onemonospace=65297,t.onenumeratorbengali=2548,t.oneoldstyle=63281,t.oneparen=9332,t.oneperiod=9352,t.onepersian=1777,t.onequarter=188,t.oneroman=8560,t.onesuperior=185,t.onethai=3665,t.onethird=8531,t.oogonek=491,t.oogonekmacron=493,t.oogurmukhi=2579,t.oomatragurmukhi=2635,t.oopen=596,t.oparen=9386,t.openbullet=9702,t.option=8997,t.ordfeminine=170,t.ordmasculine=186,t.orthogonal=8735,t.oshortdeva=2322,t.oshortvowelsigndeva=2378,t.oslash=248,t.oslashacute=511,t.osmallhiragana=12361,t.osmallkatakana=12457,t.osmallkatakanahalfwidth=65387,t.ostrokeacute=511,t.osuperior=63216,t.otcyrillic=1151,t.otilde=245,t.otildeacute=7757,t.otildedieresis=7759,t.oubopomofo=12577,t.overline=8254,t.overlinecenterline=65098,t.overlinecmb=773,t.overlinedashed=65097,t.overlinedblwavy=65100,t.overlinewavy=65099,t.overscore=175,t.ovowelsignbengali=2507,t.ovowelsigndeva=2379,t.ovowelsigngujarati=2763,t.p=112,t.paampssquare=13184,t.paasentosquare=13099,t.pabengali=2474,t.pacute=7765,t.padeva=2346,t.pagedown=8671,t.pageup=8670,t.pagujarati=2730,t.pagurmukhi=2602,t.pahiragana=12401,t.paiyannoithai=3631,t.pakatakana=12497,t.palatalizationcyrilliccmb=1156,t.palochkacyrillic=1216,t.pansioskorean=12671,t.paragraph=182,t.parallel=8741,t.parenleft=40,t.parenleftaltonearabic=64830,t.parenleftbt=63725,t.parenleftex=63724,t.parenleftinferior=8333,t.parenleftmonospace=65288,t.parenleftsmall=65113,t.parenleftsuperior=8317,t.parenlefttp=63723,t.parenleftvertical=65077,t.parenright=41,t.parenrightaltonearabic=64831,t.parenrightbt=63736,t.parenrightex=63735,t.parenrightinferior=8334,t.parenrightmonospace=65289,t.parenrightsmall=65114,t.parenrightsuperior=8318,t.parenrighttp=63734,t.parenrightvertical=65078,t.partialdiff=8706,t.paseqhebrew=1472,t.pashtahebrew=1433,t.pasquare=13225,t.patah=1463,t.patah11=1463,t.patah1d=1463,t.patah2a=1463,t.patahhebrew=1463,t.patahnarrowhebrew=1463,t.patahquarterhebrew=1463,t.patahwidehebrew=1463,t.pazerhebrew=1441,t.pbopomofo=12550,t.pcircle=9439,t.pdotaccent=7767,t.pe=1508,t.pecyrillic=1087,t.pedagesh=64324,t.pedageshhebrew=64324,t.peezisquare=13115,t.pefinaldageshhebrew=64323,t.peharabic=1662,t.peharmenian=1402,t.pehebrew=1508,t.pehfinalarabic=64343,t.pehinitialarabic=64344,t.pehiragana=12410,t.pehmedialarabic=64345,t.pekatakana=12506,t.pemiddlehookcyrillic=1191,t.perafehebrew=64334,t.percent=37,t.percentarabic=1642,t.percentmonospace=65285,t.percentsmall=65130,t.period=46,t.periodarmenian=1417,t.periodcentered=183,t.periodhalfwidth=65377,t.periodinferior=63207,t.periodmonospace=65294,t.periodsmall=65106,t.periodsuperior=63208,t.perispomenigreekcmb=834,t.perpendicular=8869,t.perthousand=8240,t.peseta=8359,t.pfsquare=13194,t.phabengali=2475,t.phadeva=2347,t.phagujarati=2731,t.phagurmukhi=2603,t.phi=966,t.phi1=981,t.phieuphacirclekorean=12922,t.phieuphaparenkorean=12826,t.phieuphcirclekorean=12908,t.phieuphkorean=12621,t.phieuphparenkorean=12812,t.philatin=632,t.phinthuthai=3642,t.phisymbolgreek=981,t.phook=421,t.phophanthai=3614,t.phophungthai=3612,t.phosamphaothai=3616,t.pi=960,t.pieupacirclekorean=12915,t.pieupaparenkorean=12819,t.pieupcieuckorean=12662,t.pieupcirclekorean=12901,t.pieupkiyeokkorean=12658,t.pieupkorean=12610,t.pieupparenkorean=12805,t.pieupsioskiyeokkorean=12660,t.pieupsioskorean=12612,t.pieupsiostikeutkorean=12661,t.pieupthieuthkorean=12663,t.pieuptikeutkorean=12659,t.pihiragana=12404,t.pikatakana=12500,t.pisymbolgreek=982,t.piwrarmenian=1411,t.planckover2pi=8463,t.planckover2pi1=8463,t.plus=43,t.plusbelowcmb=799,t.pluscircle=8853,t.plusminus=177,t.plusmod=726,t.plusmonospace=65291,t.plussmall=65122,t.plussuperior=8314,t.pmonospace=65360,t.pmsquare=13272,t.pohiragana=12413,t.pointingindexdownwhite=9759,t.pointingindexleftwhite=9756,t.pointingindexrightwhite=9758,t.pointingindexupwhite=9757,t.pokatakana=12509,t.poplathai=3611,t.postalmark=12306,t.postalmarkface=12320,t.pparen=9387,t.precedes=8826,t.prescription=8478,t.primemod=697,t.primereversed=8245,t.product=8719,t.projective=8965,t.prolongedkana=12540,t.propellor=8984,t.propersubset=8834,t.propersuperset=8835,t.proportion=8759,t.proportional=8733,t.psi=968,t.psicyrillic=1137,t.psilipneumatacyrilliccmb=1158,t.pssquare=13232,t.puhiragana=12407,t.pukatakana=12503,t.pvsquare=13236,t.pwsquare=13242,t.q=113,t.qadeva=2392,t.qadmahebrew=1448,t.qafarabic=1602,t.qaffinalarabic=65238,t.qafinitialarabic=65239,t.qafmedialarabic=65240,t.qamats=1464,t.qamats10=1464,t.qamats1a=1464,t.qamats1c=1464,t.qamats27=1464,t.qamats29=1464,t.qamats33=1464,t.qamatsde=1464,t.qamatshebrew=1464,t.qamatsnarrowhebrew=1464,t.qamatsqatanhebrew=1464,t.qamatsqatannarrowhebrew=1464,t.qamatsqatanquarterhebrew=1464,t.qamatsqatanwidehebrew=1464,t.qamatsquarterhebrew=1464,t.qamatswidehebrew=1464,t.qarneyparahebrew=1439,t.qbopomofo=12561,t.qcircle=9440,t.qhook=672,t.qmonospace=65361,t.qof=1511,t.qofdagesh=64327,t.qofdageshhebrew=64327,t.qofhebrew=1511,t.qparen=9388,t.quarternote=9833,t.qubuts=1467,t.qubuts18=1467,t.qubuts25=1467,t.qubuts31=1467,t.qubutshebrew=1467,t.qubutsnarrowhebrew=1467,t.qubutsquarterhebrew=1467,t.qubutswidehebrew=1467,t.question=63,t.questionarabic=1567,t.questionarmenian=1374,t.questiondown=191,t.questiondownsmall=63423,t.questiongreek=894,t.questionmonospace=65311,t.questionsmall=63295,t.quotedbl=34,t.quotedblbase=8222,t.quotedblleft=8220,t.quotedblmonospace=65282,t.quotedblprime=12318,t.quotedblprimereversed=12317,t.quotedblright=8221,t.quoteleft=8216,t.quoteleftreversed=8219,t.quotereversed=8219,t.quoteright=8217,t.quoterightn=329,t.quotesinglbase=8218,t.quotesingle=39,t.quotesinglemonospace=65287,t.r=114,t.raarmenian=1404,t.rabengali=2480,t.racute=341,t.radeva=2352,t.radical=8730,t.radicalex=63717,t.radoverssquare=13230,t.radoverssquaredsquare=13231,t.radsquare=13229,t.rafe=1471,t.rafehebrew=1471,t.ragujarati=2736,t.ragurmukhi=2608,t.rahiragana=12425,t.rakatakana=12521,t.rakatakanahalfwidth=65431,t.ralowerdiagonalbengali=2545,t.ramiddlediagonalbengali=2544,t.ramshorn=612,t.ratio=8758,t.rbopomofo=12566,t.rcaron=345,t.rcedilla=343,t.rcircle=9441,t.rcommaaccent=343,t.rdblgrave=529,t.rdotaccent=7769,t.rdotbelow=7771,t.rdotbelowmacron=7773,t.referencemark=8251,t.reflexsubset=8838,t.reflexsuperset=8839,t.registered=174,t.registersans=63720,t.registerserif=63194,t.reharabic=1585,t.reharmenian=1408,t.rehfinalarabic=65198,t.rehiragana=12428,t.rekatakana=12524;t.rekatakanahalfwidth=65434,t.resh=1512,t.reshdageshhebrew=64328,t.reshhebrew=1512,t.reversedtilde=8765,t.reviahebrew=1431,t.reviamugrashhebrew=1431,t.revlogicalnot=8976,t.rfishhook=638,t.rfishhookreversed=639,t.rhabengali=2525,t.rhadeva=2397,t.rho=961,t.rhook=637,t.rhookturned=635,t.rhookturnedsuperior=693,t.rhosymbolgreek=1009,t.rhotichookmod=734,t.rieulacirclekorean=12913,t.rieulaparenkorean=12817,t.rieulcirclekorean=12899,t.rieulhieuhkorean=12608,t.rieulkiyeokkorean=12602,t.rieulkiyeoksioskorean=12649,t.rieulkorean=12601,t.rieulmieumkorean=12603,t.rieulpansioskorean=12652,t.rieulparenkorean=12803,t.rieulphieuphkorean=12607,t.rieulpieupkorean=12604,t.rieulpieupsioskorean=12651,t.rieulsioskorean=12605,t.rieulthieuthkorean=12606,t.rieultikeutkorean=12650,t.rieulyeorinhieuhkorean=12653,t.rightangle=8735,t.righttackbelowcmb=793,t.righttriangle=8895,t.rihiragana=12426,t.rikatakana=12522,t.rikatakanahalfwidth=65432,t.ring=730,t.ringbelowcmb=805,t.ringcmb=778,t.ringhalfleft=703,t.ringhalfleftarmenian=1369,t.ringhalfleftbelowcmb=796,t.ringhalfleftcentered=723,t.ringhalfright=702,t.ringhalfrightbelowcmb=825,t.ringhalfrightcentered=722,t.rinvertedbreve=531,t.rittorusquare=13137,t.rlinebelow=7775,t.rlongleg=636,t.rlonglegturned=634,t.rmonospace=65362,t.rohiragana=12429,t.rokatakana=12525,t.rokatakanahalfwidth=65435,t.roruathai=3619,t.rparen=9389,t.rrabengali=2524,t.rradeva=2353,t.rragurmukhi=2652,t.rreharabic=1681,t.rrehfinalarabic=64397,t.rrvocalicbengali=2528,t.rrvocalicdeva=2400,t.rrvocalicgujarati=2784,t.rrvocalicvowelsignbengali=2500,t.rrvocalicvowelsigndeva=2372,t.rrvocalicvowelsigngujarati=2756,t.rsuperior=63217,t.rtblock=9616,t.rturned=633,t.rturnedsuperior=692,t.ruhiragana=12427,t.rukatakana=12523,t.rukatakanahalfwidth=65433,t.rupeemarkbengali=2546,t.rupeesignbengali=2547,t.rupiah=63197,t.ruthai=3620,t.rvocalicbengali=2443,t.rvocalicdeva=2315,t.rvocalicgujarati=2699,t.rvocalicvowelsignbengali=2499,t.rvocalicvowelsigndeva=2371,t.rvocalicvowelsigngujarati=2755,t.s=115,t.sabengali=2488,t.sacute=347,t.sacutedotaccent=7781,t.sadarabic=1589,t.sadeva=2360,t.sadfinalarabic=65210,t.sadinitialarabic=65211,t.sadmedialarabic=65212,t.sagujarati=2744,t.sagurmukhi=2616,t.sahiragana=12373,t.sakatakana=12469,t.sakatakanahalfwidth=65403,t.sallallahoualayhewasallamarabic=65018,t.samekh=1505,t.samekhdagesh=64321,t.samekhdageshhebrew=64321,t.samekhhebrew=1505,t.saraaathai=3634,t.saraaethai=3649,t.saraaimaimalaithai=3652,t.saraaimaimuanthai=3651,t.saraamthai=3635,t.saraathai=3632,t.saraethai=3648,t.saraiileftthai=63622,t.saraiithai=3637,t.saraileftthai=63621,t.saraithai=3636,t.saraothai=3650,t.saraueeleftthai=63624,t.saraueethai=3639,t.saraueleftthai=63623,t.sarauethai=3638,t.sarauthai=3640,t.sarauuthai=3641,t.sbopomofo=12569,t.scaron=353,t.scarondotaccent=7783,t.scedilla=351,t.schwa=601,t.schwacyrillic=1241,t.schwadieresiscyrillic=1243,t.schwahook=602,t.scircle=9442,t.scircumflex=349,t.scommaaccent=537,t.sdotaccent=7777,t.sdotbelow=7779,t.sdotbelowdotaccent=7785,t.seagullbelowcmb=828,t.second=8243,t.secondtonechinese=714,t.section=167,t.seenarabic=1587,t.seenfinalarabic=65202,t.seeninitialarabic=65203,t.seenmedialarabic=65204,t.segol=1462,t.segol13=1462,t.segol1f=1462,t.segol2c=1462,t.segolhebrew=1462,t.segolnarrowhebrew=1462,t.segolquarterhebrew=1462,t.segoltahebrew=1426,t.segolwidehebrew=1462,t.seharmenian=1405,t.sehiragana=12379,t.sekatakana=12475,t.sekatakanahalfwidth=65406,t.semicolon=59,t.semicolonarabic=1563,t.semicolonmonospace=65307,t.semicolonsmall=65108,t.semivoicedmarkkana=12444,t.semivoicedmarkkanahalfwidth=65439,t.sentisquare=13090,t.sentosquare=13091,t.seven=55,t.sevenarabic=1639,t.sevenbengali=2541,t.sevencircle=9318,t.sevencircleinversesansserif=10128,t.sevendeva=2413,t.seveneighths=8542,t.sevengujarati=2797,t.sevengurmukhi=2669,t.sevenhackarabic=1639,t.sevenhangzhou=12327,t.sevenideographicparen=12838,t.seveninferior=8327,t.sevenmonospace=65303,t.sevenoldstyle=63287,t.sevenparen=9338,t.sevenperiod=9358,t.sevenpersian=1783,t.sevenroman=8566,t.sevensuperior=8311,t.seventeencircle=9328,t.seventeenparen=9348,t.seventeenperiod=9368,t.seventhai=3671,t.sfthyphen=173,t.shaarmenian=1399,t.shabengali=2486,t.shacyrillic=1096,t.shaddaarabic=1617,t.shaddadammaarabic=64609,t.shaddadammatanarabic=64606,t.shaddafathaarabic=64608,t.shaddakasraarabic=64610,t.shaddakasratanarabic=64607,t.shade=9618,t.shadedark=9619,t.shadelight=9617,t.shademedium=9618,t.shadeva=2358,t.shagujarati=2742,t.shagurmukhi=2614,t.shalshelethebrew=1427,t.shbopomofo=12565,t.shchacyrillic=1097,t.sheenarabic=1588,t.sheenfinalarabic=65206,t.sheeninitialarabic=65207,t.sheenmedialarabic=65208,t.sheicoptic=995,t.sheqel=8362,t.sheqelhebrew=8362,t.sheva=1456,t.sheva115=1456,t.sheva15=1456,t.sheva22=1456,t.sheva2e=1456,t.shevahebrew=1456,t.shevanarrowhebrew=1456,t.shevaquarterhebrew=1456,t.shevawidehebrew=1456,t.shhacyrillic=1211,t.shimacoptic=1005,t.shin=1513,t.shindagesh=64329,t.shindageshhebrew=64329,t.shindageshshindot=64300,t.shindageshshindothebrew=64300,t.shindageshsindot=64301,t.shindageshsindothebrew=64301,t.shindothebrew=1473,t.shinhebrew=1513,t.shinshindot=64298,t.shinshindothebrew=64298,t.shinsindot=64299,t.shinsindothebrew=64299,t.shook=642,t.sigma=963,t.sigma1=962,t.sigmafinal=962,t.sigmalunatesymbolgreek=1010,t.sihiragana=12375,t.sikatakana=12471,t.sikatakanahalfwidth=65404,t.siluqhebrew=1469,t.siluqlefthebrew=1469,t.similar=8764,t.sindothebrew=1474,t.siosacirclekorean=12916,t.siosaparenkorean=12820,t.sioscieuckorean=12670,t.sioscirclekorean=12902,t.sioskiyeokkorean=12666,t.sioskorean=12613,t.siosnieunkorean=12667,t.siosparenkorean=12806,t.siospieupkorean=12669,t.siostikeutkorean=12668,t.six=54,t.sixarabic=1638,t.sixbengali=2540,t.sixcircle=9317,t.sixcircleinversesansserif=10127,t.sixdeva=2412,t.sixgujarati=2796,t.sixgurmukhi=2668,t.sixhackarabic=1638,t.sixhangzhou=12326,t.sixideographicparen=12837,t.sixinferior=8326,t.sixmonospace=65302,t.sixoldstyle=63286,t.sixparen=9337,t.sixperiod=9357,t.sixpersian=1782,t.sixroman=8565,t.sixsuperior=8310,t.sixteencircle=9327,t.sixteencurrencydenominatorbengali=2553,t.sixteenparen=9347,t.sixteenperiod=9367,t.sixthai=3670,t.slash=47,t.slashmonospace=65295,t.slong=383,t.slongdotaccent=7835,t.smileface=9786,t.smonospace=65363,t.sofpasuqhebrew=1475,t.softhyphen=173,t.softsigncyrillic=1100,t.sohiragana=12381,t.sokatakana=12477,t.sokatakanahalfwidth=65407,t.soliduslongoverlaycmb=824,t.solidusshortoverlaycmb=823,t.sorusithai=3625,t.sosalathai=3624,t.sosothai=3595,t.sosuathai=3626,t.space=32,t.spacehackarabic=32,t.spade=9824,t.spadesuitblack=9824,t.spadesuitwhite=9828,t.sparen=9390,t.squarebelowcmb=827,t.squarecc=13252,t.squarecm=13213,t.squarediagonalcrosshatchfill=9641,t.squarehorizontalfill=9636,t.squarekg=13199,t.squarekm=13214,t.squarekmcapital=13262,t.squareln=13265,t.squarelog=13266,t.squaremg=13198,t.squaremil=13269,t.squaremm=13212,t.squaremsquared=13217,t.squareorthogonalcrosshatchfill=9638,t.squareupperlefttolowerrightfill=9639,t.squareupperrighttolowerleftfill=9640,t.squareverticalfill=9637,t.squarewhitewithsmallblack=9635,t.srsquare=13275,t.ssabengali=2487,t.ssadeva=2359,t.ssagujarati=2743,t.ssangcieuckorean=12617,t.ssanghieuhkorean=12677,t.ssangieungkorean=12672,t.ssangkiyeokkorean=12594,t.ssangnieunkorean=12645,t.ssangpieupkorean=12611,t.ssangsioskorean=12614,t.ssangtikeutkorean=12600,t.ssuperior=63218,t.sterling=163,t.sterlingmonospace=65505,t.strokelongoverlaycmb=822,t.strokeshortoverlaycmb=821,t.subset=8834,t.subsetnotequal=8842,t.subsetorequal=8838,t.succeeds=8827,t.suchthat=8715,t.suhiragana=12377,t.sukatakana=12473,t.sukatakanahalfwidth=65405,t.sukunarabic=1618,t.summation=8721,t.sun=9788,t.superset=8835,t.supersetnotequal=8843,t.supersetorequal=8839,t.svsquare=13276,t.syouwaerasquare=13180,t.t=116,t.tabengali=2468,t.tackdown=8868,t.tackleft=8867,t.tadeva=2340,t.tagujarati=2724,t.tagurmukhi=2596,t.taharabic=1591,t.tahfinalarabic=65218,t.tahinitialarabic=65219,t.tahiragana=12383,t.tahmedialarabic=65220,t.taisyouerasquare=13181,t.takatakana=12479,t.takatakanahalfwidth=65408,t.tatweelarabic=1600,t.tau=964,t.tav=1514,t.tavdages=64330,t.tavdagesh=64330,t.tavdageshhebrew=64330,t.tavhebrew=1514,t.tbar=359,t.tbopomofo=12554,t.tcaron=357,t.tccurl=680,t.tcedilla=355,t.tcheharabic=1670,t.tchehfinalarabic=64379,t.tchehinitialarabic=64380,t.tchehmedialarabic=64381,t.tcircle=9443,t.tcircumflexbelow=7793,t.tcommaaccent=355,t.tdieresis=7831,t.tdotaccent=7787,t.tdotbelow=7789,t.tecyrillic=1090,t.tedescendercyrillic=1197,t.teharabic=1578,t.tehfinalarabic=65174,t.tehhahinitialarabic=64674,t.tehhahisolatedarabic=64524,t.tehinitialarabic=65175,t.tehiragana=12390,t.tehjeeminitialarabic=64673,t.tehjeemisolatedarabic=64523,t.tehmarbutaarabic=1577,t.tehmarbutafinalarabic=65172,t.tehmedialarabic=65176,t.tehmeeminitialarabic=64676,t.tehmeemisolatedarabic=64526,t.tehnoonfinalarabic=64627,t.tekatakana=12486,t.tekatakanahalfwidth=65411,t.telephone=8481,t.telephoneblack=9742,t.telishagedolahebrew=1440,t.telishaqetanahebrew=1449,t.tencircle=9321,t.tenideographicparen=12841,t.tenparen=9341,t.tenperiod=9361,t.tenroman=8569,t.tesh=679,t.tet=1496,t.tetdagesh=64312,t.tetdageshhebrew=64312,t.tethebrew=1496,t.tetsecyrillic=1205,t.tevirhebrew=1435,t.tevirlefthebrew=1435,t.thabengali=2469,t.thadeva=2341,t.thagujarati=2725,t.thagurmukhi=2597,t.thalarabic=1584,t.thalfinalarabic=65196,t.thanthakhatlowleftthai=63640,t.thanthakhatlowrightthai=63639,t.thanthakhatthai=3660,t.thanthakhatupperleftthai=63638,t.theharabic=1579,t.thehfinalarabic=65178,t.thehinitialarabic=65179,t.thehmedialarabic=65180,t.thereexists=8707,t.therefore=8756,t.theta=952,t.theta1=977,t.thetasymbolgreek=977,t.thieuthacirclekorean=12921,t.thieuthaparenkorean=12825,t.thieuthcirclekorean=12907,t.thieuthkorean=12620,t.thieuthparenkorean=12811,t.thirteencircle=9324,t.thirteenparen=9344,t.thirteenperiod=9364,t.thonangmonthothai=3601,t.thook=429,t.thophuthaothai=3602,t.thorn=254,t.thothahanthai=3607,t.thothanthai=3600,t.thothongthai=3608,t.thothungthai=3606,t.thousandcyrillic=1154,t.thousandsseparatorarabic=1644,t.thousandsseparatorpersian=1644,t.three=51,t.threearabic=1635,t.threebengali=2537,t.threecircle=9314,t.threecircleinversesansserif=10124,t.threedeva=2409,t.threeeighths=8540,t.threegujarati=2793,t.threegurmukhi=2665,t.threehackarabic=1635,t.threehangzhou=12323,t.threeideographicparen=12834,t.threeinferior=8323,t.threemonospace=65299,t.threenumeratorbengali=2550,t.threeoldstyle=63283,t.threeparen=9334,t.threeperiod=9354,t.threepersian=1779,t.threequarters=190,t.threequartersemdash=63198,t.threeroman=8562,t.threesuperior=179,t.threethai=3667,t.thzsquare=13204,t.tihiragana=12385,t.tikatakana=12481,t.tikatakanahalfwidth=65409,t.tikeutacirclekorean=12912,t.tikeutaparenkorean=12816,t.tikeutcirclekorean=12898,t.tikeutkorean=12599,t.tikeutparenkorean=12802,t.tilde=732,t.tildebelowcmb=816,t.tildecmb=771,t.tildecomb=771,t.tildedoublecmb=864,t.tildeoperator=8764,t.tildeoverlaycmb=820,t.tildeverticalcmb=830,t.timescircle=8855,t.tipehahebrew=1430,t.tipehalefthebrew=1430,t.tippigurmukhi=2672,t.titlocyrilliccmb=1155,t.tiwnarmenian=1407,t.tlinebelow=7791,t.tmonospace=65364,t.toarmenian=1385,t.tohiragana=12392,t.tokatakana=12488,t.tokatakanahalfwidth=65412,t.tonebarextrahighmod=741,t.tonebarextralowmod=745,t.tonebarhighmod=742,t.tonebarlowmod=744,t.tonebarmidmod=743,t.tonefive=445,t.tonesix=389,t.tonetwo=424,t.tonos=900,t.tonsquare=13095,t.topatakthai=3599,t.tortoiseshellbracketleft=12308,t.tortoiseshellbracketleftsmall=65117,t.tortoiseshellbracketleftvertical=65081,t.tortoiseshellbracketright=12309,t.tortoiseshellbracketrightsmall=65118,t.tortoiseshellbracketrightvertical=65082,t.totaothai=3605,t.tpalatalhook=427,t.tparen=9391,t.trademark=8482,t.trademarksans=63722,t.trademarkserif=63195,t.tretroflexhook=648,t.triagdn=9660,t.triaglf=9668,t.triagrt=9658,t.triagup=9650,t.ts=678,t.tsadi=1510,t.tsadidagesh=64326,t.tsadidageshhebrew=64326,t.tsadihebrew=1510,t.tsecyrillic=1094,t.tsere=1461,t.tsere12=1461,t.tsere1e=1461,t.tsere2b=1461,t.tserehebrew=1461,t.tserenarrowhebrew=1461,t.tserequarterhebrew=1461,t.tserewidehebrew=1461,t.tshecyrillic=1115,t.tsuperior=63219,t.ttabengali=2463,t.ttadeva=2335,t.ttagujarati=2719,t.ttagurmukhi=2591,t.tteharabic=1657,t.ttehfinalarabic=64359,t.ttehinitialarabic=64360,t.ttehmedialarabic=64361,t.tthabengali=2464,t.tthadeva=2336,t.tthagujarati=2720,t.tthagurmukhi=2592,t.tturned=647,t.tuhiragana=12388,t.tukatakana=12484,t.tukatakanahalfwidth=65410,t.tusmallhiragana=12387,t.tusmallkatakana=12483,t.tusmallkatakanahalfwidth=65391,t.twelvecircle=9323,t.twelveparen=9343,t.twelveperiod=9363,t.twelveroman=8571,t.twentycircle=9331,t.twentyhangzhou=21316,t.twentyparen=9351,t.twentyperiod=9371,t.two=50,t.twoarabic=1634,t.twobengali=2536,t.twocircle=9313,t.twocircleinversesansserif=10123,t.twodeva=2408,t.twodotenleader=8229,t.twodotleader=8229,t.twodotleadervertical=65072,t.twogujarati=2792,t.twogurmukhi=2664,t.twohackarabic=1634,t.twohangzhou=12322,t.twoideographicparen=12833,t.twoinferior=8322,t.twomonospace=65298,t.twonumeratorbengali=2549,t.twooldstyle=63282,t.twoparen=9333,t.twoperiod=9353,t.twopersian=1778,t.tworoman=8561,t.twostroke=443,t.twosuperior=178,t.twothai=3666,t.twothirds=8532,t.u=117,t.uacute=250,t.ubar=649,t.ubengali=2441,t.ubopomofo=12584,t.ubreve=365,t.ucaron=468,t.ucircle=9444,t.ucircumflex=251,t.ucircumflexbelow=7799,t.ucyrillic=1091,t.udattadeva=2385,t.udblacute=369,t.udblgrave=533,t.udeva=2313,t.udieresis=252,t.udieresisacute=472,t.udieresisbelow=7795,t.udieresiscaron=474,t.udieresiscyrillic=1265,t.udieresisgrave=476,t.udieresismacron=470,t.udotbelow=7909,t.ugrave=249,t.ugujarati=2697,t.ugurmukhi=2569,t.uhiragana=12358,t.uhookabove=7911,t.uhorn=432,t.uhornacute=7913,t.uhorndotbelow=7921,t.uhorngrave=7915,t.uhornhookabove=7917,t.uhorntilde=7919,t.uhungarumlaut=369,t.uhungarumlautcyrillic=1267,t.uinvertedbreve=535,t.ukatakana=12454,t.ukatakanahalfwidth=65395,t.ukcyrillic=1145,t.ukorean=12636,t.umacron=363,t.umacroncyrillic=1263,t.umacrondieresis=7803,t.umatragurmukhi=2625,t.umonospace=65365,t.underscore=95,t.underscoredbl=8215,t.underscoremonospace=65343,t.underscorevertical=65075,t.underscorewavy=65103,t.union=8746,t.universal=8704,t.uogonek=371,t.uparen=9392,t.upblock=9600,t.upperdothebrew=1476,t.upsilon=965,t.upsilondieresis=971,t.upsilondieresistonos=944,t.upsilonlatin=650,t.upsilontonos=973,t.uptackbelowcmb=797,t.uptackmod=724,t.uragurmukhi=2675,t.uring=367,t.ushortcyrillic=1118,t.usmallhiragana=12357,t.usmallkatakana=12453,t.usmallkatakanahalfwidth=65385,t.ustraightcyrillic=1199,t.ustraightstrokecyrillic=1201,t.utilde=361,t.utildeacute=7801,t.utildebelow=7797,t.uubengali=2442,t.uudeva=2314,t.uugujarati=2698,t.uugurmukhi=2570,t.uumatragurmukhi=2626,t.uuvowelsignbengali=2498,t.uuvowelsigndeva=2370,t.uuvowelsigngujarati=2754,t.uvowelsignbengali=2497,t.uvowelsigndeva=2369,t.uvowelsigngujarati=2753,t.v=118,t.vadeva=2357,t.vagujarati=2741,t.vagurmukhi=2613,t.vakatakana=12535,t.vav=1493,t.vavdagesh=64309,t.vavdagesh65=64309,t.vavdageshhebrew=64309,t.vavhebrew=1493,t.vavholam=64331,t.vavholamhebrew=64331,t.vavvavhebrew=1520,t.vavyodhebrew=1521,t.vcircle=9445,t.vdotbelow=7807,t.vecyrillic=1074,t.veharabic=1700,t.vehfinalarabic=64363,t.vehinitialarabic=64364,t.vehmedialarabic=64365,t.vekatakana=12537,t.venus=9792,t.verticalbar=124,t.verticallineabovecmb=781,t.verticallinebelowcmb=809,t.verticallinelowmod=716,t.verticallinemod=712,t.vewarmenian=1406,t.vhook=651,t.vikatakana=12536,t.viramabengali=2509,t.viramadeva=2381,t.viramagujarati=2765,t.visargabengali=2435,t.visargadeva=2307,t.visargagujarati=2691,t.vmonospace=65366,t.voarmenian=1400,t.voicediterationhiragana=12446,t.voicediterationkatakana=12542,t.voicedmarkkana=12443,t.voicedmarkkanahalfwidth=65438,t.vokatakana=12538,t.vparen=9393,t.vtilde=7805,t.vturned=652,t.vuhiragana=12436,t.vukatakana=12532,t.w=119,t.wacute=7811,t.waekorean=12633,t.wahiragana=12431,t.wakatakana=12527,t.wakatakanahalfwidth=65436,t.wakorean=12632,t.wasmallhiragana=12430,t.wasmallkatakana=12526,t.wattosquare=13143,t.wavedash=12316,t.wavyunderscorevertical=65076,t.wawarabic=1608,t.wawfinalarabic=65262,t.wawhamzaabovearabic=1572,t.wawhamzaabovefinalarabic=65158,t.wbsquare=13277,t.wcircle=9446,t.wcircumflex=373,t.wdieresis=7813,t.wdotaccent=7815,t.wdotbelow=7817,t.wehiragana=12433,t.weierstrass=8472,t.wekatakana=12529,t.wekorean=12638,t.weokorean=12637,t.wgrave=7809,t.whitebullet=9702,t.whitecircle=9675,t.whitecircleinverse=9689,t.whitecornerbracketleft=12302,t.whitecornerbracketleftvertical=65091,t.whitecornerbracketright=12303,t.whitecornerbracketrightvertical=65092,t.whitediamond=9671,t.whitediamondcontainingblacksmalldiamond=9672,t.whitedownpointingsmalltriangle=9663;t.whitedownpointingtriangle=9661,t.whiteleftpointingsmalltriangle=9667,t.whiteleftpointingtriangle=9665,t.whitelenticularbracketleft=12310,t.whitelenticularbracketright=12311,t.whiterightpointingsmalltriangle=9657,t.whiterightpointingtriangle=9655,t.whitesmallsquare=9643,t.whitesmilingface=9786,t.whitesquare=9633,t.whitestar=9734,t.whitetelephone=9743,t.whitetortoiseshellbracketleft=12312,t.whitetortoiseshellbracketright=12313,t.whiteuppointingsmalltriangle=9653,t.whiteuppointingtriangle=9651,t.wihiragana=12432,t.wikatakana=12528,t.wikorean=12639,t.wmonospace=65367,t.wohiragana=12434,t.wokatakana=12530,t.wokatakanahalfwidth=65382,t.won=8361,t.wonmonospace=65510,t.wowaenthai=3623,t.wparen=9394,t.wring=7832,t.wsuperior=695,t.wturned=653,t.wynn=447,t.x=120,t.xabovecmb=829,t.xbopomofo=12562,t.xcircle=9447,t.xdieresis=7821,t.xdotaccent=7819,t.xeharmenian=1389,t.xi=958,t.xmonospace=65368,t.xparen=9395,t.xsuperior=739,t.y=121,t.yaadosquare=13134,t.yabengali=2479,t.yacute=253,t.yadeva=2351,t.yaekorean=12626,t.yagujarati=2735,t.yagurmukhi=2607,t.yahiragana=12420,t.yakatakana=12516,t.yakatakanahalfwidth=65428,t.yakorean=12625,t.yamakkanthai=3662,t.yasmallhiragana=12419,t.yasmallkatakana=12515,t.yasmallkatakanahalfwidth=65388,t.yatcyrillic=1123,t.ycircle=9448,t.ycircumflex=375,t.ydieresis=255,t.ydotaccent=7823,t.ydotbelow=7925,t.yeharabic=1610,t.yehbarreearabic=1746,t.yehbarreefinalarabic=64431,t.yehfinalarabic=65266,t.yehhamzaabovearabic=1574,t.yehhamzaabovefinalarabic=65162,t.yehhamzaaboveinitialarabic=65163,t.yehhamzaabovemedialarabic=65164,t.yehinitialarabic=65267,t.yehmedialarabic=65268,t.yehmeeminitialarabic=64733,t.yehmeemisolatedarabic=64600,t.yehnoonfinalarabic=64660,t.yehthreedotsbelowarabic=1745,t.yekorean=12630,t.yen=165,t.yenmonospace=65509,t.yeokorean=12629,t.yeorinhieuhkorean=12678,t.yerahbenyomohebrew=1450,t.yerahbenyomolefthebrew=1450,t.yericyrillic=1099,t.yerudieresiscyrillic=1273,t.yesieungkorean=12673,t.yesieungpansioskorean=12675,t.yesieungsioskorean=12674,t.yetivhebrew=1434,t.ygrave=7923,t.yhook=436,t.yhookabove=7927,t.yiarmenian=1397,t.yicyrillic=1111,t.yikorean=12642,t.yinyang=9775,t.yiwnarmenian=1410,t.ymonospace=65369,t.yod=1497,t.yoddagesh=64313,t.yoddageshhebrew=64313,t.yodhebrew=1497,t.yodyodhebrew=1522,t.yodyodpatahhebrew=64287,t.yohiragana=12424,t.yoikorean=12681,t.yokatakana=12520,t.yokatakanahalfwidth=65430,t.yokorean=12635,t.yosmallhiragana=12423,t.yosmallkatakana=12519,t.yosmallkatakanahalfwidth=65390,t.yotgreek=1011,t.yoyaekorean=12680,t.yoyakorean=12679,t.yoyakthai=3618,t.yoyingthai=3597,t.yparen=9396,t.ypogegrammeni=890,t.ypogegrammenigreekcmb=837,t.yr=422,t.yring=7833,t.ysuperior=696,t.ytilde=7929,t.yturned=654,t.yuhiragana=12422,t.yuikorean=12684,t.yukatakana=12518,t.yukatakanahalfwidth=65429,t.yukorean=12640,t.yusbigcyrillic=1131,t.yusbigiotifiedcyrillic=1133,t.yuslittlecyrillic=1127,t.yuslittleiotifiedcyrillic=1129,t.yusmallhiragana=12421,t.yusmallkatakana=12517,t.yusmallkatakanahalfwidth=65389,t.yuyekorean=12683,t.yuyeokorean=12682,t.yyabengali=2527,t.yyadeva=2399,t.z=122,t.zaarmenian=1382,t.zacute=378,t.zadeva=2395,t.zagurmukhi=2651,t.zaharabic=1592,t.zahfinalarabic=65222,t.zahinitialarabic=65223,t.zahiragana=12374,t.zahmedialarabic=65224,t.zainarabic=1586,t.zainfinalarabic=65200,t.zakatakana=12470,t.zaqefgadolhebrew=1429,t.zaqefqatanhebrew=1428,t.zarqahebrew=1432,t.zayin=1494,t.zayindagesh=64310,t.zayindageshhebrew=64310,t.zayinhebrew=1494,t.zbopomofo=12567,t.zcaron=382,t.zcircle=9449,t.zcircumflex=7825,t.zcurl=657,t.zdot=380,t.zdotaccent=380,t.zdotbelow=7827,t.zecyrillic=1079,t.zedescendercyrillic=1177,t.zedieresiscyrillic=1247,t.zehiragana=12380,t.zekatakana=12476,t.zero=48,t.zeroarabic=1632,t.zerobengali=2534,t.zerodeva=2406,t.zerogujarati=2790,t.zerogurmukhi=2662,t.zerohackarabic=1632,t.zeroinferior=8320,t.zeromonospace=65296,t.zerooldstyle=63280,t.zeropersian=1776,t.zerosuperior=8304,t.zerothai=3664,t.zerowidthjoiner=65279,t.zerowidthnonjoiner=8204,t.zerowidthspace=8203,t.zeta=950,t.zhbopomofo=12563,t.zhearmenian=1386,t.zhebrevecyrillic=1218,t.zhecyrillic=1078,t.zhedescendercyrillic=1175,t.zhedieresiscyrillic=1245,t.zihiragana=12376,t.zikatakana=12472,t.zinorhebrew=1454,t.zlinebelow=7829,t.zmonospace=65370,t.zohiragana=12382,t.zokatakana=12478,t.zparen=9397,t.zretroflexhook=656,t.zstroke=438,t.zuhiragana=12378,t.zukatakana=12474,t[".notdef"]=0,t.angbracketleftbig=9001,t.angbracketleftBig=9001,t.angbracketleftbigg=9001,t.angbracketleftBigg=9001,t.angbracketrightBig=9002,t.angbracketrightbig=9002,t.angbracketrightBigg=9002,t.angbracketrightbigg=9002,t.arrowhookleft=8618,t.arrowhookright=8617,t.arrowlefttophalf=8636,t.arrowleftbothalf=8637,t.arrownortheast=8599,t.arrownorthwest=8598,t.arrowrighttophalf=8640,t.arrowrightbothalf=8641,t.arrowsoutheast=8600,t.arrowsouthwest=8601,t.backslashbig=8726,t.backslashBig=8726,t.backslashBigg=8726,t.backslashbigg=8726,t.bardbl=8214,t.bracehtipdownleft=65079,t.bracehtipdownright=65079,t.bracehtipupleft=65080,t.bracehtipupright=65080,t.braceleftBig=123,t.braceleftbig=123,t.braceleftbigg=123,t.braceleftBigg=123,t.bracerightBig=125,t.bracerightbig=125,t.bracerightbigg=125,t.bracerightBigg=125,t.bracketleftbig=91,t.bracketleftBig=91,t.bracketleftbigg=91,t.bracketleftBigg=91,t.bracketrightBig=93,t.bracketrightbig=93,t.bracketrightbigg=93,t.bracketrightBigg=93,t.ceilingleftbig=8968,t.ceilingleftBig=8968,t.ceilingleftBigg=8968,t.ceilingleftbigg=8968,t.ceilingrightbig=8969,t.ceilingrightBig=8969,t.ceilingrightbigg=8969,t.ceilingrightBigg=8969,t.circledotdisplay=8857,t.circledottext=8857,t.circlemultiplydisplay=8855,t.circlemultiplytext=8855,t.circleplusdisplay=8853,t.circleplustext=8853,t.contintegraldisplay=8750,t.contintegraltext=8750,t.coproductdisplay=8720,t.coproducttext=8720,t.floorleftBig=8970,t.floorleftbig=8970,t.floorleftbigg=8970,t.floorleftBigg=8970,t.floorrightbig=8971,t.floorrightBig=8971,t.floorrightBigg=8971,t.floorrightbigg=8971,t.hatwide=770,t.hatwider=770,t.hatwidest=770,t.intercal=7488,t.integraldisplay=8747,t.integraltext=8747,t.intersectiondisplay=8898,t.intersectiontext=8898,t.logicalanddisplay=8743,t.logicalandtext=8743,t.logicalordisplay=8744,t.logicalortext=8744,t.parenleftBig=40,t.parenleftbig=40,t.parenleftBigg=40,t.parenleftbigg=40,t.parenrightBig=41,t.parenrightbig=41,t.parenrightBigg=41,t.parenrightbigg=41,t.prime=8242,t.productdisplay=8719,t.producttext=8719,t.radicalbig=8730,t.radicalBig=8730,t.radicalBigg=8730,t.radicalbigg=8730,t.radicalbt=8730,t.radicaltp=8730,t.radicalvertex=8730,t.slashbig=47,t.slashBig=47,t.slashBigg=47,t.slashbigg=47,t.summationdisplay=8721,t.summationtext=8721,t.tildewide=732,t.tildewider=732,t.tildewidest=732,t.uniondisplay=8899,t.unionmultidisplay=8846,t.unionmultitext=8846,t.unionsqdisplay=8852,t.unionsqtext=8852,t.uniontext=8899,t.vextenddouble=8741,t.vextendsingle=8739}));e.getGlyphsUnicode=n;const r=(0,i.getLookupTableFactory)((function(t){t.space=32,t.a1=9985,t.a2=9986,t.a202=9987,t.a3=9988,t.a4=9742,t.a5=9990,t.a119=9991,t.a118=9992,t.a117=9993,t.a11=9755,t.a12=9758,t.a13=9996,t.a14=9997,t.a15=9998,t.a16=9999,t.a105=1e4,t.a17=10001,t.a18=10002,t.a19=10003,t.a20=10004,t.a21=10005,t.a22=10006,t.a23=10007,t.a24=10008,t.a25=10009,t.a26=10010,t.a27=10011,t.a28=10012,t.a6=10013,t.a7=10014,t.a8=10015,t.a9=10016,t.a10=10017,t.a29=10018,t.a30=10019,t.a31=10020,t.a32=10021,t.a33=10022,t.a34=10023,t.a35=9733,t.a36=10025,t.a37=10026,t.a38=10027,t.a39=10028,t.a40=10029,t.a41=10030,t.a42=10031,t.a43=10032,t.a44=10033,t.a45=10034,t.a46=10035,t.a47=10036,t.a48=10037,t.a49=10038,t.a50=10039,t.a51=10040,t.a52=10041,t.a53=10042,t.a54=10043,t.a55=10044,t.a56=10045,t.a57=10046,t.a58=10047,t.a59=10048,t.a60=10049,t.a61=10050,t.a62=10051,t.a63=10052,t.a64=10053,t.a65=10054,t.a66=10055,t.a67=10056,t.a68=10057,t.a69=10058,t.a70=10059,t.a71=9679,t.a72=10061,t.a73=9632,t.a74=10063,t.a203=10064,t.a75=10065,t.a204=10066,t.a76=9650,t.a77=9660,t.a78=9670,t.a79=10070,t.a81=9687,t.a82=10072,t.a83=10073,t.a84=10074,t.a97=10075,t.a98=10076,t.a99=10077,t.a100=10078,t.a101=10081,t.a102=10082,t.a103=10083,t.a104=10084,t.a106=10085,t.a107=10086,t.a108=10087,t.a112=9827,t.a111=9830,t.a110=9829,t.a109=9824,t.a120=9312,t.a121=9313,t.a122=9314,t.a123=9315,t.a124=9316,t.a125=9317,t.a126=9318,t.a127=9319,t.a128=9320,t.a129=9321,t.a130=10102,t.a131=10103,t.a132=10104,t.a133=10105,t.a134=10106,t.a135=10107,t.a136=10108,t.a137=10109,t.a138=10110,t.a139=10111,t.a140=10112,t.a141=10113,t.a142=10114,t.a143=10115,t.a144=10116,t.a145=10117,t.a146=10118,t.a147=10119,t.a148=10120,t.a149=10121,t.a150=10122,t.a151=10123,t.a152=10124,t.a153=10125,t.a154=10126,t.a155=10127,t.a156=10128,t.a157=10129,t.a158=10130,t.a159=10131,t.a160=10132,t.a161=8594,t.a163=8596,t.a164=8597,t.a196=10136,t.a165=10137,t.a192=10138,t.a166=10139,t.a167=10140,t.a168=10141,t.a169=10142,t.a170=10143,t.a171=10144,t.a172=10145,t.a173=10146,t.a162=10147,t.a174=10148,t.a175=10149,t.a176=10150,t.a177=10151,t.a178=10152,t.a179=10153,t.a193=10154,t.a180=10155,t.a199=10156,t.a181=10157,t.a200=10158,t.a182=10159,t.a201=10161,t.a183=10162,t.a184=10163,t.a197=10164,t.a185=10165,t.a194=10166,t.a198=10167,t.a186=10168,t.a195=10169,t.a187=10170,t.a188=10171,t.a189=10172,t.a190=10173,t.a191=10174,t.a89=10088,t.a90=10089,t.a93=10090,t.a94=10091,t.a91=10092,t.a92=10093,t.a205=10094,t.a85=10095,t.a206=10096,t.a86=10097,t.a87=10098,t.a88=10099,t.a95=10100,t.a96=10101,t[".notdef"]=0}));e.getDingbatsGlyphsUnicode=r},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.clearUnicodeCaches=function(){o.clear()},e.getCharUnicodeCategory=function(t){const e=o.get(t);if(e)return e;const s=t.match(r),i={isWhitespace:!!s?.[1],isZeroWidthDiacritic:!!s?.[2],isInvisibleFormatMark:!!s?.[3]};return o.set(t,i),i},e.getUnicodeForGlyph=function(t,e){let s=e[t];if(void 0!==s)return s;if(!t)return-1;if("u"===t[0]){const e=t.length;let i;if(7===e&&"n"===t[1]&&"i"===t[2])i=t.substring(3);else{if(!(e>=5&&e<=7))return-1;i=t.substring(1)}if(i===i.toUpperCase()&&(s=parseInt(i,16),s>=0))return s}return-1},e.getUnicodeRangeFor=function(t,e=-1){if(-1!==e){const s=n[e];for(let i=0,n=s.length;i<n;i+=2)if(t>=s[i]&&t<=s[i+1])return e}for(let e=0,s=n.length;e<s;e++){const s=n[e];for(let i=0,n=s.length;i<n;i+=2)if(t>=s[i]&&t<=s[i+1])return e}return-1},e.mapSpecialUnicodeValues=function(t){return t>=65520&&t<=65535?0:t>=62976&&t<=63743?i()[t]||t:173===t?45:t};const i=(0,s(3).getLookupTableFactory)((function(t){t[63721]=169,t[63193]=169,t[63720]=174,t[63194]=174,t[63722]=8482,t[63195]=8482,t[63729]=9127,t[63730]=9128,t[63731]=9129,t[63740]=9131,t[63741]=9132,t[63742]=9133,t[63726]=9121,t[63727]=9122,t[63728]=9123,t[63737]=9124,t[63738]=9125,t[63739]=9126,t[63723]=9115,t[63724]=9116,t[63725]=9117,t[63734]=9118,t[63735]=9119,t[63736]=9120})),n=[[0,127],[128,255],[256,383],[384,591],[592,687,7424,7551,7552,7615],[688,767,42752,42783],[768,879,7616,7679],[880,1023],[11392,11519],[1024,1279,1280,1327,11744,11775,42560,42655],[1328,1423],[1424,1535],[42240,42559],[1536,1791,1872,1919],[1984,2047],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3584,3711],[3712,3839],[4256,4351,11520,11567],[6912,7039],[4352,4607],[7680,7935,11360,11391,42784,43007],[7936,8191],[8192,8303,11776,11903],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703,10224,10239,10496,10623,11008,11263],[8704,8959,10752,11007,10176,10223,10624,10751],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[12288,12351],[12352,12447],[12448,12543,12784,12799],[12544,12591,12704,12735],[12592,12687],[43072,43135],[12800,13055],[13056,13311],[44032,55215],[55296,57343],[67840,67871],[19968,40959,11904,12031,12032,12255,12272,12287,13312,19903,131072,173791,12688,12703],[57344,63743],[12736,12783,63744,64255,194560,195103],[64256,64335],[64336,65023],[65056,65071],[65040,65055],[65104,65135],[65136,65279],[65280,65519],[65520,65535],[3840,4095],[1792,1871],[1920,1983],[3456,3583],[4096,4255],[4608,4991,4992,5023,11648,11743],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[10240,10495],[40960,42127],[5888,5919,5920,5951,5952,5983,5984,6015],[66304,66351],[66352,66383],[66560,66639],[118784,119039,119040,119295,119296,119375],[119808,120831],[1044480,1048573],[65024,65039,917760,917999],[917504,917631],[6400,6479],[6480,6527],[6528,6623],[6656,6687],[11264,11359],[11568,11647],[19904,19967],[43008,43055],[65536,65663,65664,65791,65792,65855],[65856,65935],[66432,66463],[66464,66527],[66640,66687],[66688,66735],[67584,67647],[68096,68191],[119552,119647],[73728,74751,74752,74879],[119648,119679],[7040,7103],[7168,7247],[7248,7295],[43136,43231],[43264,43311],[43312,43359],[43520,43615],[65936,65999],[66e3,66047],[66208,66271,66176,66207,67872,67903],[127024,127135,126976,127023]],r=new RegExp("^(\\s)|(\\p{Mn})|(\\p{Cf})$","u"),o=new Map},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSerifFonts=e.getNonStdFontMap=e.getGlyphMapForStandardFonts=e.getFontNameToFileMap=void 0,e.getStandardFontName=function(t){const e=(0,n.normalizeFontName)(t);return r()[e]},e.getSymbolsFonts=e.getSupplementalGlyphMapForCalibri=e.getSupplementalGlyphMapForArialBlack=e.getStdFontMap=void 0,e.isKnownFontName=function(t){const e=(0,n.normalizeFontName)(t);return!!(r()[e]||a()[e]||c()[e]||h()[e])};var i=s(3),n=s(38);const r=(0,i.getLookupTableFactory)((function(t){t["Times-Roman"]="Times-Roman",t.Helvetica="Helvetica",t.Courier="Courier",t.Symbol="Symbol",t["Times-Bold"]="Times-Bold",t["Helvetica-Bold"]="Helvetica-Bold",t["Courier-Bold"]="Courier-Bold",t.ZapfDingbats="ZapfDingbats",t["Times-Italic"]="Times-Italic",t["Helvetica-Oblique"]="Helvetica-Oblique",t["Courier-Oblique"]="Courier-Oblique",t["Times-BoldItalic"]="Times-BoldItalic",t["Helvetica-BoldOblique"]="Helvetica-BoldOblique",t["Courier-BoldOblique"]="Courier-BoldOblique",t.ArialNarrow="Helvetica",t["ArialNarrow-Bold"]="Helvetica-Bold",t["ArialNarrow-BoldItalic"]="Helvetica-BoldOblique",t["ArialNarrow-Italic"]="Helvetica-Oblique",t.ArialBlack="Helvetica",t["ArialBlack-Bold"]="Helvetica-Bold",t["ArialBlack-BoldItalic"]="Helvetica-BoldOblique",t["ArialBlack-Italic"]="Helvetica-Oblique",t["Arial-Black"]="Helvetica",t["Arial-Black-Bold"]="Helvetica-Bold",t["Arial-Black-BoldItalic"]="Helvetica-BoldOblique",t["Arial-Black-Italic"]="Helvetica-Oblique",t.Arial="Helvetica",t["Arial-Bold"]="Helvetica-Bold",t["Arial-BoldItalic"]="Helvetica-BoldOblique",t["Arial-Italic"]="Helvetica-Oblique",t.ArialMT="Helvetica",t["Arial-BoldItalicMT"]="Helvetica-BoldOblique",t["Arial-BoldMT"]="Helvetica-Bold",t["Arial-ItalicMT"]="Helvetica-Oblique",t["Arial-BoldItalicMT-BoldItalic"]="Helvetica-BoldOblique",t["Arial-BoldMT-Bold"]="Helvetica-Bold",t["Arial-ItalicMT-Italic"]="Helvetica-Oblique",t.ArialUnicodeMS="Helvetica",t["ArialUnicodeMS-Bold"]="Helvetica-Bold",t["ArialUnicodeMS-BoldItalic"]="Helvetica-BoldOblique",t["ArialUnicodeMS-Italic"]="Helvetica-Oblique",t["Courier-BoldItalic"]="Courier-BoldOblique",t["Courier-Italic"]="Courier-Oblique",t.CourierNew="Courier",t["CourierNew-Bold"]="Courier-Bold",t["CourierNew-BoldItalic"]="Courier-BoldOblique",t["CourierNew-Italic"]="Courier-Oblique",t["CourierNewPS-BoldItalicMT"]="Courier-BoldOblique",t["CourierNewPS-BoldMT"]="Courier-Bold",t["CourierNewPS-ItalicMT"]="Courier-Oblique",t.CourierNewPSMT="Courier",t["Helvetica-BoldItalic"]="Helvetica-BoldOblique",t["Helvetica-Italic"]="Helvetica-Oblique",t["Symbol-Bold"]="Symbol",t["Symbol-BoldItalic"]="Symbol",t["Symbol-Italic"]="Symbol",t.TimesNewRoman="Times-Roman",t["TimesNewRoman-Bold"]="Times-Bold",t["TimesNewRoman-BoldItalic"]="Times-BoldItalic",t["TimesNewRoman-Italic"]="Times-Italic",t.TimesNewRomanPS="Times-Roman",t["TimesNewRomanPS-Bold"]="Times-Bold",t["TimesNewRomanPS-BoldItalic"]="Times-BoldItalic",t["TimesNewRomanPS-BoldItalicMT"]="Times-BoldItalic",t["TimesNewRomanPS-BoldMT"]="Times-Bold",t["TimesNewRomanPS-Italic"]="Times-Italic",t["TimesNewRomanPS-ItalicMT"]="Times-Italic",t.TimesNewRomanPSMT="Times-Roman",t["TimesNewRomanPSMT-Bold"]="Times-Bold",t["TimesNewRomanPSMT-BoldItalic"]="Times-BoldItalic",t["TimesNewRomanPSMT-Italic"]="Times-Italic"}));e.getStdFontMap=r;const o=(0,i.getLookupTableFactory)((function(t){t.Courier="FoxitFixed.pfb",t["Courier-Bold"]="FoxitFixedBold.pfb",t["Courier-BoldOblique"]="FoxitFixedBoldItalic.pfb",t["Courier-Oblique"]="FoxitFixedItalic.pfb",t.Helvetica="LiberationSans-Regular.ttf",t["Helvetica-Bold"]="LiberationSans-Bold.ttf",t["Helvetica-BoldOblique"]="LiberationSans-BoldItalic.ttf",t["Helvetica-Oblique"]="LiberationSans-Italic.ttf",t["Times-Roman"]="FoxitSerif.pfb",t["Times-Bold"]="FoxitSerifBold.pfb",t["Times-BoldItalic"]="FoxitSerifBoldItalic.pfb",t["Times-Italic"]="FoxitSerifItalic.pfb",t.Symbol="FoxitSymbol.pfb",t.ZapfDingbats="FoxitDingbats.pfb",t["LiberationSans-Regular"]="LiberationSans-Regular.ttf",t["LiberationSans-Bold"]="LiberationSans-Bold.ttf",t["LiberationSans-Italic"]="LiberationSans-Italic.ttf",t["LiberationSans-BoldItalic"]="LiberationSans-BoldItalic.ttf"}));e.getFontNameToFileMap=o;const a=(0,i.getLookupTableFactory)((function(t){t.Calibri="Helvetica",t["Calibri-Bold"]="Helvetica-Bold",t["Calibri-BoldItalic"]="Helvetica-BoldOblique",t["Calibri-Italic"]="Helvetica-Oblique",t.CenturyGothic="Helvetica",t["CenturyGothic-Bold"]="Helvetica-Bold",t["CenturyGothic-BoldItalic"]="Helvetica-BoldOblique",t["CenturyGothic-Italic"]="Helvetica-Oblique",t.ComicSansMS="Comic Sans MS",t["ComicSansMS-Bold"]="Comic Sans MS-Bold",t["ComicSansMS-BoldItalic"]="Comic Sans MS-BoldItalic",t["ComicSansMS-Italic"]="Comic Sans MS-Italic",t.Impact="Helvetica",t["ItcSymbol-Bold"]="Helvetica-Bold",t["ItcSymbol-BoldItalic"]="Helvetica-BoldOblique",t["ItcSymbol-Book"]="Helvetica",t["ItcSymbol-BookItalic"]="Helvetica-Oblique",t["ItcSymbol-Medium"]="Helvetica",t["ItcSymbol-MediumItalic"]="Helvetica-Oblique",t.LucidaConsole="Courier",t["LucidaConsole-Bold"]="Courier-Bold",t["LucidaConsole-BoldItalic"]="Courier-BoldOblique",t["LucidaConsole-Italic"]="Courier-Oblique",t["LucidaSans-Demi"]="Helvetica-Bold",t["MS-Gothic"]="MS Gothic",t["MS-Gothic-Bold"]="MS Gothic-Bold",t["MS-Gothic-BoldItalic"]="MS Gothic-BoldItalic",t["MS-Gothic-Italic"]="MS Gothic-Italic",t["MS-Mincho"]="MS Mincho",t["MS-Mincho-Bold"]="MS Mincho-Bold",t["MS-Mincho-BoldItalic"]="MS Mincho-BoldItalic",t["MS-Mincho-Italic"]="MS Mincho-Italic",t["MS-PGothic"]="MS PGothic",t["MS-PGothic-Bold"]="MS PGothic-Bold",t["MS-PGothic-BoldItalic"]="MS PGothic-BoldItalic",t["MS-PGothic-Italic"]="MS PGothic-Italic",t["MS-PMincho"]="MS PMincho",t["MS-PMincho-Bold"]="MS PMincho-Bold",t["MS-PMincho-BoldItalic"]="MS PMincho-BoldItalic",t["MS-PMincho-Italic"]="MS PMincho-Italic",t.NuptialScript="Times-Italic",t.SegoeUISymbol="Helvetica"}));e.getNonStdFontMap=a;const c=(0,i.getLookupTableFactory)((function(t){t["Adobe Jenson"]=!0,t["Adobe Text"]=!0,t.Albertus=!0,t.Aldus=!0,t.Alexandria=!0,t.Algerian=!0,t["American Typewriter"]=!0,t.Antiqua=!0,t.Apex=!0,t.Arno=!0,t.Aster=!0,t.Aurora=!0,t.Baskerville=!0,t.Bell=!0,t.Bembo=!0,t["Bembo Schoolbook"]=!0,t.Benguiat=!0,t["Berkeley Old Style"]=!0,t["Bernhard Modern"]=!0,t["Berthold City"]=!0,t.Bodoni=!0,t["Bauer Bodoni"]=!0,t["Book Antiqua"]=!0,t.Bookman=!0,t["Bordeaux Roman"]=!0,t["Californian FB"]=!0,t.Calisto=!0,t.Calvert=!0,t.Capitals=!0,t.Cambria=!0,t.Cartier=!0,t.Caslon=!0,t.Catull=!0,t.Centaur=!0,t["Century Old Style"]=!0,t["Century Schoolbook"]=!0,t.Chaparral=!0,t["Charis SIL"]=!0,t.Cheltenham=!0,t["Cholla Slab"]=!0,t.Clarendon=!0,t.Clearface=!0,t.Cochin=!0,t.Colonna=!0,t["Computer Modern"]=!0,t["Concrete Roman"]=!0,t.Constantia=!0,t["Cooper Black"]=!0,t.Corona=!0,t.Ecotype=!0,t.Egyptienne=!0,t.Elephant=!0,t.Excelsior=!0,t.Fairfield=!0,t["FF Scala"]=!0,t.Folkard=!0,t.Footlight=!0,t.FreeSerif=!0,t["Friz Quadrata"]=!0,t.Garamond=!0,t.Gentium=!0,t.Georgia=!0,t.Gloucester=!0,t["Goudy Old Style"]=!0,t["Goudy Schoolbook"]=!0,t["Goudy Pro Font"]=!0,t.Granjon=!0,t["Guardian Egyptian"]=!0,t.Heather=!0,t.Hercules=!0,t["High Tower Text"]=!0,t.Hiroshige=!0,t["Hoefler Text"]=!0,t["Humana Serif"]=!0,t.Imprint=!0,t["Ionic No. 5"]=!0,t.Janson=!0,t.Joanna=!0,t.Korinna=!0,t.Lexicon=!0,t.LiberationSerif=!0,t["Liberation Serif"]=!0,t["Linux Libertine"]=!0,t.Literaturnaya=!0,t.Lucida=!0,t["Lucida Bright"]=!0,t.Melior=!0,t.Memphis=!0,t.Miller=!0,t.Minion=!0,t.Modern=!0,t["Mona Lisa"]=!0,t["Mrs Eaves"]=!0,t["MS Serif"]=!0,t["Museo Slab"]=!0,t["New York"]=!0,t["Nimbus Roman"]=!0,t["NPS Rawlinson Roadway"]=!0,t.NuptialScript=!0,t.Palatino=!0,t.Perpetua=!0,t.Plantin=!0,t["Plantin Schoolbook"]=!0,t.Playbill=!0,t["Poor Richard"]=!0,t["Rawlinson Roadway"]=!0,t.Renault=!0,t.Requiem=!0,t.Rockwell=!0,t.Roman=!0,t["Rotis Serif"]=!0,t.Sabon=!0,t.Scala=!0,t.Seagull=!0,t.Sistina=!0,t.Souvenir=!0,t.STIX=!0,t["Stone Informal"]=!0,t["Stone Serif"]=!0,t.Sylfaen=!0,t.Times=!0,t.Trajan=!0,t["Trinité"]=!0,t["Trump Mediaeval"]=!0,t.Utopia=!0,t["Vale Type"]=!0,t["Bitstream Vera"]=!0,t["Vera Serif"]=!0,t.Versailles=!0,t.Wanted=!0,t.Weiss=!0,t["Wide Latin"]=!0,t.Windsor=!0,t.XITS=!0}));e.getSerifFonts=c;const h=(0,i.getLookupTableFactory)((function(t){t.Dingbats=!0,t.Symbol=!0,t.ZapfDingbats=!0,t.Wingdings=!0,t["Wingdings-Bold"]=!0,t["Wingdings-Regular"]=!0}));e.getSymbolsFonts=h;const l=(0,i.getLookupTableFactory)((function(t){t[2]=10,t[3]=32,t[4]=33,t[5]=34,t[6]=35,t[7]=36,t[8]=37,t[9]=38,t[10]=39,t[11]=40,t[12]=41,t[13]=42,t[14]=43,t[15]=44,t[16]=45,t[17]=46,t[18]=47,t[19]=48,t[20]=49,t[21]=50,t[22]=51,t[23]=52,t[24]=53,t[25]=54,t[26]=55,t[27]=56,t[28]=57,t[29]=58,t[30]=894,t[31]=60,t[32]=61,t[33]=62,t[34]=63,t[35]=64,t[36]=65,t[37]=66,t[38]=67,t[39]=68,t[40]=69,t[41]=70,t[42]=71,t[43]=72,t[44]=73,t[45]=74,t[46]=75,t[47]=76,t[48]=77,t[49]=78,t[50]=79,t[51]=80,t[52]=81,t[53]=82,t[54]=83,t[55]=84,t[56]=85,t[57]=86,t[58]=87,t[59]=88,t[60]=89,t[61]=90,t[62]=91,t[63]=92,t[64]=93,t[65]=94,t[66]=95,t[67]=96,t[68]=97,t[69]=98,t[70]=99,t[71]=100,t[72]=101,t[73]=102,t[74]=103,t[75]=104,t[76]=105,t[77]=106,t[78]=107,t[79]=108,t[80]=109,t[81]=110,t[82]=111,t[83]=112,t[84]=113,t[85]=114,t[86]=115,t[87]=116,t[88]=117,t[89]=118,t[90]=119,t[91]=120,t[92]=121,t[93]=122,t[94]=123,t[95]=124,t[96]=125,t[97]=126,t[98]=196,t[99]=197,t[100]=199,t[101]=201,t[102]=209,t[103]=214,t[104]=220,t[105]=225,t[106]=224,t[107]=226,t[108]=228,t[109]=227,t[110]=229,t[111]=231,t[112]=233,t[113]=232,t[114]=234,t[115]=235,t[116]=237,t[117]=236,t[118]=238,t[119]=239,t[120]=241,t[121]=243,t[122]=242,t[123]=244,t[124]=246,t[125]=245,t[126]=250,t[127]=249,t[128]=251,t[129]=252,t[130]=8224,t[131]=176,t[132]=162,t[133]=163,t[134]=167,t[135]=8226,t[136]=182,t[137]=223,t[138]=174,t[139]=169,t[140]=8482,t[141]=180,t[142]=168,t[143]=8800,t[144]=198,t[145]=216,t[146]=8734,t[147]=177,t[148]=8804,t[149]=8805,t[150]=165,t[151]=181,t[152]=8706,t[153]=8721,t[154]=8719,t[156]=8747,t[157]=170,t[158]=186,t[159]=8486,t[160]=230,t[161]=248,t[162]=191,t[163]=161,t[164]=172,t[165]=8730,t[166]=402,t[167]=8776,t[168]=8710,t[169]=171,t[170]=187,t[171]=8230,t[179]=8220,t[180]=8221,t[181]=8216,t[182]=8217,t[200]=193,t[203]=205,t[207]=211,t[210]=218,t[223]=711,t[224]=321,t[225]=322,t[226]=352,t[227]=353,t[228]=381,t[229]=382,t[233]=221,t[234]=253,t[252]=263,t[253]=268,t[254]=269,t[258]=258,t[260]=260,t[261]=261,t[265]=280,t[266]=281,t[267]=282,t[268]=283,t[269]=313,t[275]=323,t[276]=324,t[278]=328,t[283]=344,t[284]=345,t[285]=346,t[286]=347,t[292]=367,t[295]=377,t[296]=378,t[298]=380,t[305]=963,t[306]=964,t[307]=966,t[308]=8215,t[309]=8252,t[310]=8319,t[311]=8359,t[312]=8592,t[313]=8593,t[337]=9552,t[493]=1039,t[494]=1040,t[672]=1488,t[673]=1489,t[674]=1490,t[675]=1491,t[676]=1492,t[677]=1493,t[678]=1494,t[679]=1495,t[680]=1496,t[681]=1497,t[682]=1498,t[683]=1499,t[684]=1500,t[685]=1501,t[686]=1502,t[687]=1503,t[688]=1504,t[689]=1505,t[690]=1506,t[691]=1507,t[692]=1508,t[693]=1509,t[694]=1510,t[695]=1511,t[696]=1512,t[697]=1513,t[698]=1514,t[705]=1524,t[706]=8362,t[710]=64288,t[711]=64298,t[759]=1617,t[761]=1776,t[763]=1778,t[775]=1652,t[777]=1764,t[778]=1780,t[779]=1781,t[780]=1782,t[782]=771,t[783]=64726,t[786]=8363,t[788]=8532,t[790]=768,t[791]=769,t[792]=768,t[795]=803,t[797]=64336,t[798]=64337,t[799]=64342,t[800]=64343,t[801]=64344,t[802]=64345,t[803]=64362,t[804]=64363,t[805]=64364,t[2424]=7821,t[2425]=7822,t[2426]=7823,t[2427]=7824,t[2428]=7825,t[2429]=7826,t[2430]=7827,t[2433]=7682,t[2678]=8045,t[2679]=8046,t[2830]=1552,t[2838]=686,t[2840]=751,t[2842]=753,t[2843]=754,t[2844]=755,t[2846]=757,t[2856]=767,t[2857]=848,t[2858]=849,t[2862]=853,t[2863]=854,t[2864]=855,t[2865]=861,t[2866]=862,t[2906]=7460,t[2908]=7462,t[2909]=7463,t[2910]=7464,t[2912]=7466,t[2913]=7467,t[2914]=7468,t[2916]=7470,t[2917]=7471,t[2918]=7472,t[2920]=7474,t[2921]=7475,t[2922]=7476,t[2924]=7478,t[2925]=7479,t[2926]=7480,t[2928]=7482,t[2929]=7483,t[2930]=7484,t[2932]=7486,t[2933]=7487,t[2934]=7488,t[2936]=7490,t[2937]=7491,t[2938]=7492,t[2940]=7494,t[2941]=7495,t[2942]=7496,t[2944]=7498,t[2946]=7500,t[2948]=7502,t[2950]=7504,t[2951]=7505,t[2952]=7506,t[2954]=7508,t[2955]=7509,t[2956]=7510,t[2958]=7512,t[2959]=7513,t[2960]=7514,t[2962]=7516,t[2963]=7517,t[2964]=7518,t[2966]=7520,t[2967]=7521,t[2968]=7522,t[2970]=7524,t[2971]=7525,t[2972]=7526,t[2974]=7528,t[2975]=7529,t[2976]=7530,t[2978]=1537,t[2979]=1538,t[2980]=1539,t[2982]=1549,t[2983]=1551,t[2984]=1552,t[2986]=1554,t[2987]=1555,t[2988]=1556,t[2990]=1623,t[2991]=1624,t[2995]=1775,t[2999]=1791,t[3002]=64290,t[3003]=64291,t[3004]=64292,t[3006]=64294,t[3007]=64295,t[3008]=64296,t[3011]=1900,t[3014]=8223,t[3015]=8244,t[3017]=7532,t[3018]=7533,t[3019]=7534,t[3075]=7590,t[3076]=7591,t[3079]=7594,t[3080]=7595,t[3083]=7598,t[3084]=7599,t[3087]=7602,t[3088]=7603,t[3091]=7606,t[3092]=7607,t[3095]=7610,t[3096]=7611,t[3099]=7614,t[3100]=7615,t[3103]=7618,t[3104]=7619,t[3107]=8337,t[3108]=8338,t[3116]=1884,t[3119]=1885,t[3120]=1885,t[3123]=1886,t[3124]=1886,t[3127]=1887,t[3128]=1887,t[3131]=1888,t[3132]=1888,t[3135]=1889,t[3136]=1889,t[3139]=1890,t[3140]=1890,t[3143]=1891,t[3144]=1891,t[3147]=1892,t[3148]=1892,t[3153]=580,t[3154]=581,t[3157]=584,t[3158]=585,t[3161]=588,t[3162]=589,t[3165]=891,t[3166]=892,t[3169]=1274,t[3170]=1275,t[3173]=1278,t[3174]=1279,t[3181]=7622,t[3182]=7623,t[3282]=11799,t[3316]=578,t[3379]=42785,t[3393]=1159,t[3416]=8377}));e.getGlyphMapForStandardFonts=l;const u=(0,i.getLookupTableFactory)((function(t){t[227]=322,t[264]=261,t[291]=346}));e.getSupplementalGlyphMapForArialBlack=u;const f=(0,i.getLookupTableFactory)((function(t){t[1]=32,t[4]=65,t[5]=192,t[6]=193,t[9]=196,t[17]=66,t[18]=67,t[21]=268,t[24]=68,t[28]=69,t[29]=200,t[30]=201,t[32]=282,t[38]=70,t[39]=71,t[44]=72,t[47]=73,t[48]=204,t[49]=205,t[58]=74,t[60]=75,t[62]=76,t[68]=77,t[69]=78,t[75]=79,t[76]=210,t[80]=214,t[87]=80,t[89]=81,t[90]=82,t[92]=344,t[94]=83,t[97]=352,t[100]=84,t[104]=85,t[109]=220,t[115]=86,t[116]=87,t[121]=88,t[122]=89,t[124]=221,t[127]=90,t[129]=381,t[258]=97,t[259]=224,t[260]=225,t[263]=228,t[268]=261,t[271]=98,t[272]=99,t[273]=263,t[275]=269,t[282]=100,t[286]=101,t[287]=232,t[288]=233,t[290]=283,t[295]=281,t[296]=102,t[336]=103,t[346]=104,t[349]=105,t[350]=236,t[351]=237,t[361]=106,t[364]=107,t[367]=108,t[371]=322,t[373]=109,t[374]=110,t[381]=111,t[382]=242,t[383]=243,t[386]=246,t[393]=112,t[395]=113,t[396]=114,t[398]=345,t[400]=115,t[401]=347,t[403]=353,t[410]=116,t[437]=117,t[442]=252,t[448]=118,t[449]=119,t[454]=120,t[455]=121,t[457]=253,t[460]=122,t[462]=382,t[463]=380,t[853]=44,t[855]=58,t[856]=46,t[876]=47,t[878]=45,t[882]=45,t[894]=40,t[895]=41,t[896]=91,t[897]=93,t[923]=64,t[1004]=48,t[1005]=49,t[1006]=50,t[1007]=51,t[1008]=52,t[1009]=53,t[1010]=54,t[1011]=55,t[1012]=56,t[1013]=57,t[1081]=37,t[1085]=43,t[1086]=45}));e.getSupplementalGlyphMapForCalibri=f},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ToUnicodeMap=e.IdentityToUnicodeMap=void 0;var i=s(2);e.ToUnicodeMap=class{constructor(t=[]){this._map=t}get length(){return this._map.length}forEach(t){for(const e in this._map)t(e,this._map[e].charCodeAt(0))}has(t){return void 0!==this._map[t]}get(t){return this._map[t]}charCodeOf(t){const e=this._map;if(e.length<=65536)return e.indexOf(t);for(const s in e)if(e[s]===t)return 0|s;return-1}amend(t){for(const e in t)this._map[e]=t[e]}},e.IdentityToUnicodeMap=class{constructor(t,e){this.firstChar=t,this.lastChar=e}get length(){return this.lastChar+1-this.firstChar}forEach(t){for(let e=this.firstChar,s=this.lastChar;e<=s;e++)t(e,e)}has(t){return this.firstChar<=t&&t<=this.lastChar}get(t){if(this.firstChar<=t&&t<=this.lastChar)return String.fromCharCode(t)}charCodeOf(t){return Number.isInteger(t)&&t>=this.firstChar&&t<=this.lastChar?t:-1}amend(t){(0,i.unreachable)("Should not call amend()")}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CFFFont=void 0;var i=s(35),n=s(38),r=s(2);e.CFFFont=class{constructor(t,e){this.properties=e;const s=new i.CFFParser(t,e,n.SEAC_ANALYSIS_ENABLED);this.cff=s.parse(),this.cff.duplicateFirstGlyph();const o=new i.CFFCompiler(this.cff);this.seacs=this.cff.seacs;try{this.data=o.compile()}catch{(0,r.warn)("Failed to compile font "+e.loadedName),this.data=t}this._createBuiltInEncoding()}get numGlyphs(){return this.cff.charStrings.count}getCharset(){return this.cff.charset.charset}getGlyphMapping(){const t=this.cff,e=this.properties,{cidToGidMap:s,cMap:i}=e,r=t.charset.charset;let o,a;if(e.composite){let e,n;if(s?.length>0){e=Object.create(null);for(let t=0,i=s.length;t<i;t++){const i=s[t];void 0!==i&&(e[i]=t)}}if(o=Object.create(null),t.isCIDFont)for(a=0;a<r.length;a++)n=i.charCodeOf(r[a]),void 0!==e?.[n]&&(n=e[n]),o[n]=a;else for(a=0;a<t.charStrings.count;a++)n=i.charCodeOf(a),o[n]=a;return o}let c=t.encoding?t.encoding.encoding:null;return e.isInternalFont&&(c=e.defaultEncoding),o=(0,n.type1FontGlyphMapping)(e,c,r),o}hasGlyphId(t){return this.cff.hasGlyphId(t)}_createBuiltInEncoding(){const{charset:t,encoding:e}=this.cff;if(!t||!e)return;const s=t.charset,i=e.encoding,n=[];for(const t in i){const e=i[t];if(e>=0){const i=s[e];i&&(n[t]=i)}}n.length>0&&(this.properties.builtInEncoding=n)}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FontRendererFactory=void 0;var i=s(2),n=s(35),r=s(39),o=s(37),a=s(8);function c(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}function h(t,e){return t[e]<<8|t[e+1]}function l(t,e){return(t[e]<<24|t[e+1]<<16)>>16}function u(t,e){return t[e]<<24>>24}function f(t,e){return l(t,e)/16384}function d(t){const e=t.length;let s=32768;return e<1240?s=107:e<33900&&(s=1131),s}function p(t,e){const s=1===h(t,e+2)?c(t,e+8):c(t,e+16),n=h(t,e+s);let r,o,a;if(4===n){const i=h(t,e+s+6)>>1;for(o=e+s+14,r=[],a=0;a<i;a++,o+=2)r[a]={end:h(t,o)};for(o+=2,a=0;a<i;a++,o+=2)r[a].start=h(t,o);for(a=0;a<i;a++,o+=2)r[a].idDelta=h(t,o);for(a=0;a<i;a++,o+=2){let e=h(t,o);if(0!==e){r[a].ids=[];for(let s=0,i=r[a].end-r[a].start+1;s<i;s++)r[a].ids[s]=h(t,o+e),e+=2}}return r}if(12===n){const i=c(t,e+s+12);for(o=e+s+16,r=[],a=0;a<i;a++)e=c(t,o),r.push({start:e,end:c(t,o+4),idDelta:c(t,o+8)-e}),o+=12;return r}throw new i.FormatError(`unsupported cmap: ${n}`)}function g(t,e,s,i){const r=new n.CFFParser(new a.Stream(t,e,s-e),{},i).parse();return{glyphs:r.charStrings.objects,subrs:r.topDict.privateDict?.subrsIndex?.objects,gsubrs:r.globalSubrIndex?.objects,isCFFCIDFont:r.isCIDFont,fdSelect:r.fdSelect,fdArray:r.fdArray}}function m(t,e){const s=e.codePointAt(0);let i=0,n=0,r=t.length-1;for(;n<r;){const e=n+r+1>>1;s<t[e].start?r=e-1:n=e}return t[n].start<=s&&s<=t[n].end&&(i=t[n].idDelta+(t[n].ids?t[n].ids[s-t[n].start]:s)&65535),{charCode:s,glyphId:i}}function w(t,e,s){function i(t,s){e.push({cmd:"moveTo",args:[t,s]})}function n(t,s){e.push({cmd:"lineTo",args:[t,s]})}function r(t,s,i,n){e.push({cmd:"quadraticCurveTo",args:[t,s,i,n]})}let o=0;const a=l(t,o);let c,d=0,p=0;if(o+=10,a<0)do{c=h(t,o);const i=h(t,o+2);let n,r;o+=4,1&c?(2&c?(n=l(t,o),r=l(t,o+2)):(n=h(t,o),r=h(t,o+2)),o+=4):2&c?(n=u(t,o++),r=u(t,o++)):(n=t[o++],r=t[o++]),2&c?(d=n,p=r):(d=0,p=0);let a=1,g=1,m=0,b=0;8&c?(a=g=f(t,o),o+=2):64&c?(a=f(t,o),g=f(t,o+2),o+=4):128&c&&(a=f(t,o),m=f(t,o+2),b=f(t,o+4),g=f(t,o+6),o+=8);const y=s.glyphs[i];y&&(e.push({cmd:"save"},{cmd:"transform",args:[a,m,b,g,d,p]}),w(y,e,s),e.push({cmd:"restore"}))}while(32&c);else{const e=[];let s,u;for(s=0;s<a;s++)e.push(h(t,o)),o+=2;o+=2+h(t,o);const f=e.at(-1)+1,g=[];for(;g.length<f;){c=t[o++];let e=1;for(8&c&&(e+=t[o++]);e-- >0;)g.push({flags:c})}for(s=0;s<f;s++){switch(18&g[s].flags){case 0:d+=l(t,o),o+=2;break;case 2:d-=t[o++];break;case 18:d+=t[o++]}g[s].x=d}for(s=0;s<f;s++){switch(36&g[s].flags){case 0:p+=l(t,o),o+=2;break;case 4:p-=t[o++];break;case 36:p+=t[o++]}g[s].y=p}let m=0;for(o=0;o<a;o++){const t=e[o],a=g.slice(m,t+1);if(1&a[0].flags)a.push(a[0]);else if(1&a.at(-1).flags)a.unshift(a.at(-1));else{const t={flags:1,x:(a[0].x+a.at(-1).x)/2,y:(a[0].y+a.at(-1).y)/2};a.unshift(t),a.push(t)}for(i(a[0].x,a[0].y),s=1,u=a.length;s<u;s++)1&a[s].flags?n(a[s].x,a[s].y):1&a[s+1].flags?(r(a[s].x,a[s].y,a[s+1].x,a[s+1].y),s++):r(a[s].x,a[s].y,(a[s].x+a[s+1].x)/2,(a[s].y+a[s+1].y)/2);m=t+1}}}function b(t,e,s,n){function r(t,s){e.push({cmd:"moveTo",args:[t,s]})}function a(t,s){e.push({cmd:"lineTo",args:[t,s]})}function c(t,s,i,n,r,o){e.push({cmd:"bezierCurveTo",args:[t,s,i,n,r,o]})}const h=[];let l=0,u=0,f=0;!function t(p){let g=0;for(;g<p.length;){let w,y,A,v,x,k,S,M,C,_=!1,I=p[g++];switch(I){case 1:case 3:case 18:case 23:f+=h.length>>1,_=!0;break;case 4:u+=h.pop(),r(l,u),_=!0;break;case 5:for(;h.length>0;)l+=h.shift(),u+=h.shift(),a(l,u);break;case 6:for(;h.length>0&&(l+=h.shift(),a(l,u),0!==h.length);)u+=h.shift(),a(l,u);break;case 7:for(;h.length>0&&(u+=h.shift(),a(l,u),0!==h.length);)l+=h.shift(),a(l,u);break;case 8:for(;h.length>0;)w=l+h.shift(),A=u+h.shift(),y=w+h.shift(),v=A+h.shift(),l=y+h.shift(),u=v+h.shift(),c(w,A,y,v,l,u);break;case 10:if(M=h.pop(),C=null,s.isCFFCIDFont){const t=s.fdSelect.getFDIndex(n);if(t>=0&&t<s.fdArray.length){const e=s.fdArray[t];let i;e.privateDict?.subrsIndex&&(i=e.privateDict.subrsIndex.objects),i&&(M+=d(i),C=i[M])}else(0,i.warn)("Invalid fd index for glyph index.")}else C=s.subrs[M+s.subrsBias];C&&t(C);break;case 11:return;case 12:switch(I=p[g++],I){case 34:w=l+h.shift(),y=w+h.shift(),x=u+h.shift(),l=y+h.shift(),c(w,u,y,x,l,x),w=l+h.shift(),y=w+h.shift(),l=y+h.shift(),c(w,x,y,u,l,u);break;case 35:w=l+h.shift(),A=u+h.shift(),y=w+h.shift(),v=A+h.shift(),l=y+h.shift(),u=v+h.shift(),c(w,A,y,v,l,u),w=l+h.shift(),A=u+h.shift(),y=w+h.shift(),v=A+h.shift(),l=y+h.shift(),u=v+h.shift(),c(w,A,y,v,l,u),h.pop();break;case 36:w=l+h.shift(),x=u+h.shift(),y=w+h.shift(),k=x+h.shift(),l=y+h.shift(),c(w,x,y,k,l,k),w=l+h.shift(),y=w+h.shift(),S=k+h.shift(),l=y+h.shift(),c(w,k,y,S,l,u);break;case 37:const t=l,e=u;w=l+h.shift(),A=u+h.shift(),y=w+h.shift(),v=A+h.shift(),l=y+h.shift(),u=v+h.shift(),c(w,A,y,v,l,u),w=l+h.shift(),A=u+h.shift(),y=w+h.shift(),v=A+h.shift(),l=y,u=v,Math.abs(l-t)>Math.abs(u-e)?l+=h.shift():u+=h.shift(),c(w,A,y,v,l,u);break;default:throw new i.FormatError(`unknown operator: 12 ${I}`)}break;case 14:if(h.length>=4){const t=h.pop(),i=h.pop();u=h.pop(),l=h.pop(),e.push({cmd:"save"},{cmd:"translate",args:[l,u]});let n=m(s.cmap,String.fromCharCode(s.glyphNameMap[o.StandardEncoding[t]]));b(s.glyphs[n.glyphId],e,s,n.glyphId),e.push({cmd:"restore"}),n=m(s.cmap,String.fromCharCode(s.glyphNameMap[o.StandardEncoding[i]])),b(s.glyphs[n.glyphId],e,s,n.glyphId)}return;case 19:case 20:f+=h.length>>1,g+=f+7>>3,_=!0;break;case 21:u+=h.pop(),l+=h.pop(),r(l,u),_=!0;break;case 22:l+=h.pop(),r(l,u),_=!0;break;case 24:for(;h.length>2;)w=l+h.shift(),A=u+h.shift(),y=w+h.shift(),v=A+h.shift(),l=y+h.shift(),u=v+h.shift(),c(w,A,y,v,l,u);l+=h.shift(),u+=h.shift(),a(l,u);break;case 25:for(;h.length>6;)l+=h.shift(),u+=h.shift(),a(l,u);w=l+h.shift(),A=u+h.shift(),y=w+h.shift(),v=A+h.shift(),l=y+h.shift(),u=v+h.shift(),c(w,A,y,v,l,u);break;case 26:for(h.length%2&&(l+=h.shift());h.length>0;)w=l,A=u+h.shift(),y=w+h.shift(),v=A+h.shift(),l=y,u=v+h.shift(),c(w,A,y,v,l,u);break;case 27:for(h.length%2&&(u+=h.shift());h.length>0;)w=l+h.shift(),A=u,y=w+h.shift(),v=A+h.shift(),l=y+h.shift(),u=v,c(w,A,y,v,l,u);break;case 28:h.push((p[g]<<24|p[g+1]<<16)>>16),g+=2;break;case 29:M=h.pop()+s.gsubrsBias,C=s.gsubrs[M],C&&t(C);break;case 30:for(;h.length>0&&(w=l,A=u+h.shift(),y=w+h.shift(),v=A+h.shift(),l=y+h.shift(),u=v+(1===h.length?h.shift():0),c(w,A,y,v,l,u),0!==h.length);)w=l+h.shift(),A=u,y=w+h.shift(),v=A+h.shift(),u=v+h.shift(),l=y+(1===h.length?h.shift():0),c(w,A,y,v,l,u);break;case 31:for(;h.length>0&&(w=l+h.shift(),A=u,y=w+h.shift(),v=A+h.shift(),u=v+h.shift(),l=y+(1===h.length?h.shift():0),c(w,A,y,v,l,u),0!==h.length);)w=l,A=u+h.shift(),y=w+h.shift(),v=A+h.shift(),l=y+h.shift(),u=v+(1===h.length?h.shift():0),c(w,A,y,v,l,u);break;default:if(I<32)throw new i.FormatError(`unknown operator: ${I}`);I<247?h.push(I-139):I<251?h.push(256*(I-247)+p[g++]+108):I<255?h.push(256*-(I-251)-p[g++]-108):(h.push((p[g]<<24|p[g+1]<<16|p[g+2]<<8|p[g+3])/65536),g+=4)}_&&(h.length=0)}}(t)}const y=[];class A{constructor(t){this.constructor===A&&(0,i.unreachable)("Cannot initialize CompiledFont."),this.fontMatrix=t,this.compiledGlyphs=Object.create(null),this.compiledCharCodeToGlyphId=Object.create(null)}getPathJs(t){const{charCode:e,glyphId:s}=m(this.cmap,t);let i=this.compiledGlyphs[s];if(!i)try{i=this.compileGlyph(this.glyphs[s],s),this.compiledGlyphs[s]=i}catch(t){throw this.compiledGlyphs[s]=y,void 0===this.compiledCharCodeToGlyphId[e]&&(this.compiledCharCodeToGlyphId[e]=s),t}return void 0===this.compiledCharCodeToGlyphId[e]&&(this.compiledCharCodeToGlyphId[e]=s),i}compileGlyph(t,e){if(!t||0===t.length||14===t[0])return y;let s=this.fontMatrix;if(this.isCFFCIDFont){const t=this.fdSelect.getFDIndex(e);t>=0&&t<this.fdArray.length?s=this.fdArray[t].getByName("FontMatrix")||i.FONT_IDENTITY_MATRIX:(0,i.warn)("Invalid fd index for glyph index.")}const n=[{cmd:"save"},{cmd:"transform",args:s.slice()},{cmd:"scale",args:["size","-size"]}];return this.compileGlyphImpl(t,n,e),n.push({cmd:"restore"}),n}compileGlyphImpl(){(0,i.unreachable)("Children classes should implement this.")}hasBuiltPath(t){const{charCode:e,glyphId:s}=m(this.cmap,t);return void 0!==this.compiledGlyphs[s]&&void 0!==this.compiledCharCodeToGlyphId[e]}}class v extends A{constructor(t,e,s){super(s||[488e-6,0,0,488e-6,0,0]),this.glyphs=t,this.cmap=e}compileGlyphImpl(t,e){w(t,e,this)}}class x extends A{constructor(t,e,s,i){super(s||[.001,0,0,.001,0,0]),this.glyphs=t.glyphs,this.gsubrs=t.gsubrs||[],this.subrs=t.subrs||[],this.cmap=e,this.glyphNameMap=i||(0,r.getGlyphsUnicode)(),this.gsubrsBias=d(this.gsubrs),this.subrsBias=d(this.subrs),this.isCFFCIDFont=t.isCFFCIDFont,this.fdSelect=t.fdSelect,this.fdArray=t.fdArray}compileGlyphImpl(t,e,s){b(t,e,this,s)}}e.FontRendererFactory=class{static create(t,e){const s=new Uint8Array(t.data);let n,r,o,a,l,u;const f=h(s,4);for(let t=0,d=12;t<f;t++,d+=16){const t=(0,i.bytesToString)(s.subarray(d,d+4)),f=c(s,d+8),m=c(s,d+12);switch(t){case"cmap":n=p(s,f);break;case"glyf":r=s.subarray(f,f+m);break;case"loca":o=s.subarray(f,f+m);break;case"head":u=h(s,f+18),l=h(s,f+50);break;case"CFF ":a=g(s,f,f+m,e)}}if(r){const e=u?[1/u,0,0,1/u,0,0]:t.fontMatrix;return new v(function(t,e,s){let i,n;s?(i=4,n=c):(i=2,n=(t,e)=>2*h(t,e));const r=[];let o=n(e,0);for(let s=i;s<e.length;s+=i){const i=n(e,s);r.push(t.subarray(o,i)),o=i}return r}(r,o,l),n,e)}return new x(a,n,t.fontMatrix,t.glyphNameMap)}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getMetrics=e.getFontBasicMetrics=void 0;var i=s(3);const n=(0,i.getLookupTableFactory)((function(t){t.Courier=600,t["Courier-Bold"]=600,t["Courier-BoldOblique"]=600,t["Courier-Oblique"]=600,t.Helvetica=(0,i.getLookupTableFactory)((function(t){t.space=278,t.exclam=278,t.quotedbl=355,t.numbersign=556,t.dollar=556,t.percent=889,t.ampersand=667,t.quoteright=222,t.parenleft=333,t.parenright=333,t.asterisk=389,t.plus=584,t.comma=278,t.hyphen=333,t.period=278,t.slash=278,t.zero=556,t.one=556,t.two=556,t.three=556,t.four=556,t.five=556,t.six=556,t.seven=556,t.eight=556,t.nine=556,t.colon=278,t.semicolon=278,t.less=584,t.equal=584,t.greater=584,t.question=556,t.at=1015,t.A=667,t.B=667,t.C=722,t.D=722,t.E=667,t.F=611,t.G=778,t.H=722,t.I=278,t.J=500,t.K=667,t.L=556,t.M=833,t.N=722,t.O=778,t.P=667,t.Q=778,t.R=722,t.S=667,t.T=611,t.U=722,t.V=667,t.W=944,t.X=667,t.Y=667,t.Z=611,t.bracketleft=278,t.backslash=278,t.bracketright=278,t.asciicircum=469,t.underscore=556,t.quoteleft=222,t.a=556,t.b=556,t.c=500,t.d=556,t.e=556,t.f=278,t.g=556,t.h=556,t.i=222,t.j=222,t.k=500,t.l=222,t.m=833,t.n=556,t.o=556,t.p=556,t.q=556,t.r=333,t.s=500,t.t=278,t.u=556,t.v=500,t.w=722,t.x=500,t.y=500,t.z=500,t.braceleft=334,t.bar=260,t.braceright=334,t.asciitilde=584,t.exclamdown=333,t.cent=556,t.sterling=556,t.fraction=167,t.yen=556,t.florin=556,t.section=556,t.currency=556,t.quotesingle=191,t.quotedblleft=333,t.guillemotleft=556,t.guilsinglleft=333,t.guilsinglright=333,t.fi=500,t.fl=500,t.endash=556,t.dagger=556,t.daggerdbl=556,t.periodcentered=278,t.paragraph=537,t.bullet=350,t.quotesinglbase=222,t.quotedblbase=333,t.quotedblright=333,t.guillemotright=556,t.ellipsis=1e3,t.perthousand=1e3,t.questiondown=611,t.grave=333,t.acute=333,t.circumflex=333,t.tilde=333,t.macron=333,t.breve=333,t.dotaccent=333,t.dieresis=333,t.ring=333,t.cedilla=333,t.hungarumlaut=333,t.ogonek=333,t.caron=333,t.emdash=1e3,t.AE=1e3,t.ordfeminine=370,t.Lslash=556,t.Oslash=778,t.OE=1e3,t.ordmasculine=365,t.ae=889,t.dotlessi=278,t.lslash=222,t.oslash=611,t.oe=944,t.germandbls=611,t.Idieresis=278,t.eacute=556,t.abreve=556,t.uhungarumlaut=556,t.ecaron=556,t.Ydieresis=667,t.divide=584,t.Yacute=667,t.Acircumflex=667,t.aacute=556,t.Ucircumflex=722,t.yacute=500,t.scommaaccent=500,t.ecircumflex=556,t.Uring=722,t.Udieresis=722,t.aogonek=556,t.Uacute=722,t.uogonek=556,t.Edieresis=667,t.Dcroat=722,t.commaaccent=250,t.copyright=737,t.Emacron=667,t.ccaron=500,t.aring=556,t.Ncommaaccent=722,t.lacute=222,t.agrave=556,t.Tcommaaccent=611,t.Cacute=722,t.atilde=556,t.Edotaccent=667,t.scaron=500,t.scedilla=500,t.iacute=278,t.lozenge=471,t.Rcaron=722,t.Gcommaaccent=778,t.ucircumflex=556,t.acircumflex=556,t.Amacron=667,t.rcaron=333,t.ccedilla=500,t.Zdotaccent=611,t.Thorn=667,t.Omacron=778,t.Racute=722,t.Sacute=667,t.dcaron=643,t.Umacron=722,t.uring=556,t.threesuperior=333,t.Ograve=778,t.Agrave=667,t.Abreve=667,t.multiply=584,t.uacute=556,t.Tcaron=611,t.partialdiff=476,t.ydieresis=500,t.Nacute=722,t.icircumflex=278,t.Ecircumflex=667,t.adieresis=556,t.edieresis=556,t.cacute=500,t.nacute=556,t.umacron=556,t.Ncaron=722,t.Iacute=278,t.plusminus=584,t.brokenbar=260,t.registered=737,t.Gbreve=778,t.Idotaccent=278,t.summation=600,t.Egrave=667,t.racute=333,t.omacron=556,t.Zacute=611,t.Zcaron=611,t.greaterequal=549,t.Eth=722,t.Ccedilla=722,t.lcommaaccent=222,t.tcaron=317,t.eogonek=556,t.Uogonek=722,t.Aacute=667,t.Adieresis=667,t.egrave=556,t.zacute=500,t.iogonek=222,t.Oacute=778,t.oacute=556,t.amacron=556,t.sacute=500,t.idieresis=278,t.Ocircumflex=778,t.Ugrave=722,t.Delta=612,t.thorn=556,t.twosuperior=333,t.Odieresis=778,t.mu=556,t.igrave=278,t.ohungarumlaut=556,t.Eogonek=667,t.dcroat=556,t.threequarters=834,t.Scedilla=667,t.lcaron=299,t.Kcommaaccent=667,t.Lacute=556,t.trademark=1e3,t.edotaccent=556,t.Igrave=278,t.Imacron=278,t.Lcaron=556,t.onehalf=834,t.lessequal=549,t.ocircumflex=556,t.ntilde=556,t.Uhungarumlaut=722,t.Eacute=667,t.emacron=556,t.gbreve=556,t.onequarter=834,t.Scaron=667,t.Scommaaccent=667,t.Ohungarumlaut=778,t.degree=400,t.ograve=556,t.Ccaron=722,t.ugrave=556,t.radical=453,t.Dcaron=722,t.rcommaaccent=333,t.Ntilde=722,t.otilde=556,t.Rcommaaccent=722,t.Lcommaaccent=556,t.Atilde=667,t.Aogonek=667,t.Aring=667,t.Otilde=778,t.zdotaccent=500,t.Ecaron=667,t.Iogonek=278,t.kcommaaccent=500,t.minus=584,t.Icircumflex=278,t.ncaron=556,t.tcommaaccent=278,t.logicalnot=584,t.odieresis=556,t.udieresis=556,t.notequal=549,t.gcommaaccent=556,t.eth=556,t.zcaron=500,t.ncommaaccent=556,t.onesuperior=333,t.imacron=278,t.Euro=556})),t["Helvetica-Bold"]=(0,i.getLookupTableFactory)((function(t){t.space=278,t.exclam=333,t.quotedbl=474,t.numbersign=556,t.dollar=556,t.percent=889,t.ampersand=722,t.quoteright=278,t.parenleft=333,t.parenright=333,t.asterisk=389,t.plus=584,t.comma=278,t.hyphen=333,t.period=278,t.slash=278,t.zero=556,t.one=556,t.two=556,t.three=556,t.four=556,t.five=556,t.six=556,t.seven=556,t.eight=556,t.nine=556,t.colon=333,t.semicolon=333,t.less=584,t.equal=584,t.greater=584,t.question=611,t.at=975,t.A=722,t.B=722,t.C=722,t.D=722,t.E=667,t.F=611,t.G=778,t.H=722,t.I=278,t.J=556,t.K=722,t.L=611,t.M=833,t.N=722,t.O=778,t.P=667,t.Q=778,t.R=722,t.S=667,t.T=611,t.U=722,t.V=667,t.W=944,t.X=667,t.Y=667,t.Z=611,t.bracketleft=333,t.backslash=278,t.bracketright=333,t.asciicircum=584,t.underscore=556,t.quoteleft=278,t.a=556,t.b=611,t.c=556,t.d=611,t.e=556,t.f=333,t.g=611,t.h=611,t.i=278,t.j=278,t.k=556,t.l=278,t.m=889,t.n=611,t.o=611,t.p=611,t.q=611,t.r=389,t.s=556,t.t=333,t.u=611,t.v=556,t.w=778,t.x=556,t.y=556,t.z=500,t.braceleft=389,t.bar=280,t.braceright=389,t.asciitilde=584,t.exclamdown=333,t.cent=556,t.sterling=556,t.fraction=167,t.yen=556,t.florin=556,t.section=556,t.currency=556,t.quotesingle=238,t.quotedblleft=500,t.guillemotleft=556,t.guilsinglleft=333,t.guilsinglright=333,t.fi=611,t.fl=611,t.endash=556,t.dagger=556,t.daggerdbl=556,t.periodcentered=278,t.paragraph=556,t.bullet=350,t.quotesinglbase=278,t.quotedblbase=500,t.quotedblright=500,t.guillemotright=556,t.ellipsis=1e3,t.perthousand=1e3,t.questiondown=611,t.grave=333,t.acute=333,t.circumflex=333,t.tilde=333,t.macron=333,t.breve=333,t.dotaccent=333,t.dieresis=333,t.ring=333,t.cedilla=333,t.hungarumlaut=333,t.ogonek=333,t.caron=333,t.emdash=1e3,t.AE=1e3,t.ordfeminine=370,t.Lslash=611,t.Oslash=778,t.OE=1e3,t.ordmasculine=365,t.ae=889,t.dotlessi=278,t.lslash=278,t.oslash=611,t.oe=944,t.germandbls=611,t.Idieresis=278,t.eacute=556,t.abreve=556,t.uhungarumlaut=611,t.ecaron=556,t.Ydieresis=667,t.divide=584,t.Yacute=667,t.Acircumflex=722,t.aacute=556,t.Ucircumflex=722,t.yacute=556,t.scommaaccent=556,t.ecircumflex=556,t.Uring=722,t.Udieresis=722,t.aogonek=556,t.Uacute=722,t.uogonek=611,t.Edieresis=667,t.Dcroat=722,t.commaaccent=250,t.copyright=737,t.Emacron=667,t.ccaron=556,t.aring=556,t.Ncommaaccent=722,t.lacute=278,t.agrave=556,t.Tcommaaccent=611,t.Cacute=722,t.atilde=556,t.Edotaccent=667,t.scaron=556,t.scedilla=556,t.iacute=278,t.lozenge=494,t.Rcaron=722,t.Gcommaaccent=778,t.ucircumflex=611,t.acircumflex=556,t.Amacron=722,t.rcaron=389,t.ccedilla=556,t.Zdotaccent=611,t.Thorn=667,t.Omacron=778,t.Racute=722,t.Sacute=667,t.dcaron=743,t.Umacron=722,t.uring=611,t.threesuperior=333,t.Ograve=778,t.Agrave=722,t.Abreve=722,t.multiply=584,t.uacute=611,t.Tcaron=611,t.partialdiff=494,t.ydieresis=556,t.Nacute=722,t.icircumflex=278,t.Ecircumflex=667,t.adieresis=556,t.edieresis=556,t.cacute=556,t.nacute=611,t.umacron=611,t.Ncaron=722,t.Iacute=278,t.plusminus=584,t.brokenbar=280,t.registered=737,t.Gbreve=778,t.Idotaccent=278,t.summation=600,t.Egrave=667,t.racute=389,t.omacron=611,t.Zacute=611,t.Zcaron=611,t.greaterequal=549,t.Eth=722,t.Ccedilla=722,t.lcommaaccent=278,t.tcaron=389,t.eogonek=556,t.Uogonek=722,t.Aacute=722,t.Adieresis=722,t.egrave=556,t.zacute=500,t.iogonek=278,t.Oacute=778,t.oacute=611,t.amacron=556,t.sacute=556,t.idieresis=278,t.Ocircumflex=778,t.Ugrave=722,t.Delta=612,t.thorn=611,t.twosuperior=333,t.Odieresis=778,t.mu=611,t.igrave=278,t.ohungarumlaut=611,t.Eogonek=667,t.dcroat=611,t.threequarters=834,t.Scedilla=667,t.lcaron=400,t.Kcommaaccent=722,t.Lacute=611,t.trademark=1e3,t.edotaccent=556,t.Igrave=278,t.Imacron=278,t.Lcaron=611,t.onehalf=834,t.lessequal=549,t.ocircumflex=611,t.ntilde=611,t.Uhungarumlaut=722,t.Eacute=667,t.emacron=556,t.gbreve=611,t.onequarter=834,t.Scaron=667,t.Scommaaccent=667,t.Ohungarumlaut=778,t.degree=400,t.ograve=611,t.Ccaron=722,t.ugrave=611,t.radical=549,t.Dcaron=722,t.rcommaaccent=389,t.Ntilde=722,t.otilde=611,t.Rcommaaccent=722,t.Lcommaaccent=611,t.Atilde=722,t.Aogonek=722,t.Aring=722,t.Otilde=778,t.zdotaccent=500,t.Ecaron=667,t.Iogonek=278,t.kcommaaccent=556,t.minus=584,t.Icircumflex=278,t.ncaron=611,t.tcommaaccent=333,t.logicalnot=584,t.odieresis=611,t.udieresis=611,t.notequal=549,t.gcommaaccent=611,t.eth=611,t.zcaron=500,t.ncommaaccent=611,t.onesuperior=333,t.imacron=278,t.Euro=556})),t["Helvetica-BoldOblique"]=(0,i.getLookupTableFactory)((function(t){t.space=278,t.exclam=333,t.quotedbl=474,t.numbersign=556,t.dollar=556,t.percent=889,t.ampersand=722,t.quoteright=278,t.parenleft=333,t.parenright=333,t.asterisk=389,t.plus=584,t.comma=278,t.hyphen=333,t.period=278,t.slash=278,t.zero=556,t.one=556,t.two=556,t.three=556,t.four=556,t.five=556,t.six=556,t.seven=556,t.eight=556,t.nine=556,t.colon=333,t.semicolon=333,t.less=584,t.equal=584,t.greater=584,t.question=611,t.at=975,t.A=722,t.B=722,t.C=722,t.D=722,t.E=667,t.F=611,t.G=778,t.H=722,t.I=278,t.J=556,t.K=722,t.L=611,t.M=833,t.N=722,t.O=778,t.P=667,t.Q=778,t.R=722,t.S=667,t.T=611,t.U=722,t.V=667,t.W=944,t.X=667,t.Y=667,t.Z=611,t.bracketleft=333,t.backslash=278,t.bracketright=333,t.asciicircum=584,t.underscore=556,t.quoteleft=278,t.a=556,t.b=611,t.c=556,t.d=611,t.e=556,t.f=333,t.g=611,t.h=611,t.i=278,t.j=278,t.k=556,t.l=278,t.m=889,t.n=611,t.o=611,t.p=611,t.q=611,t.r=389,t.s=556,t.t=333,t.u=611,t.v=556,t.w=778,t.x=556,t.y=556,t.z=500,t.braceleft=389,t.bar=280,t.braceright=389,t.asciitilde=584,t.exclamdown=333,t.cent=556,t.sterling=556,t.fraction=167,t.yen=556,t.florin=556,t.section=556,t.currency=556,t.quotesingle=238,t.quotedblleft=500,t.guillemotleft=556,t.guilsinglleft=333,t.guilsinglright=333,t.fi=611,t.fl=611,t.endash=556,t.dagger=556,t.daggerdbl=556,t.periodcentered=278,t.paragraph=556,t.bullet=350,t.quotesinglbase=278,t.quotedblbase=500,t.quotedblright=500,t.guillemotright=556,t.ellipsis=1e3,t.perthousand=1e3,t.questiondown=611,t.grave=333,t.acute=333,t.circumflex=333,t.tilde=333,t.macron=333,t.breve=333,t.dotaccent=333,t.dieresis=333,t.ring=333,t.cedilla=333,t.hungarumlaut=333,t.ogonek=333,t.caron=333,t.emdash=1e3,t.AE=1e3,t.ordfeminine=370,t.Lslash=611,t.Oslash=778,t.OE=1e3,t.ordmasculine=365,t.ae=889,t.dotlessi=278,t.lslash=278,t.oslash=611,t.oe=944,t.germandbls=611,t.Idieresis=278,t.eacute=556,t.abreve=556,t.uhungarumlaut=611,t.ecaron=556,t.Ydieresis=667,t.divide=584,t.Yacute=667,t.Acircumflex=722,t.aacute=556,t.Ucircumflex=722,t.yacute=556,t.scommaaccent=556,t.ecircumflex=556,t.Uring=722,t.Udieresis=722,t.aogonek=556,t.Uacute=722,t.uogonek=611,t.Edieresis=667,t.Dcroat=722,t.commaaccent=250,t.copyright=737,t.Emacron=667,t.ccaron=556,t.aring=556,t.Ncommaaccent=722,t.lacute=278,t.agrave=556,t.Tcommaaccent=611,t.Cacute=722,t.atilde=556,t.Edotaccent=667,t.scaron=556,t.scedilla=556,t.iacute=278,t.lozenge=494,t.Rcaron=722,t.Gcommaaccent=778,t.ucircumflex=611,t.acircumflex=556,t.Amacron=722,t.rcaron=389,t.ccedilla=556,t.Zdotaccent=611,t.Thorn=667,t.Omacron=778,t.Racute=722,t.Sacute=667,t.dcaron=743,t.Umacron=722,t.uring=611,t.threesuperior=333,t.Ograve=778,t.Agrave=722,t.Abreve=722,t.multiply=584,t.uacute=611,t.Tcaron=611,t.partialdiff=494,t.ydieresis=556,t.Nacute=722,t.icircumflex=278,t.Ecircumflex=667,t.adieresis=556,t.edieresis=556,t.cacute=556,t.nacute=611,t.umacron=611,t.Ncaron=722,t.Iacute=278,t.plusminus=584,t.brokenbar=280,t.registered=737,t.Gbreve=778,t.Idotaccent=278,t.summation=600,t.Egrave=667,t.racute=389,t.omacron=611,t.Zacute=611,t.Zcaron=611,t.greaterequal=549,t.Eth=722,t.Ccedilla=722,t.lcommaaccent=278,t.tcaron=389,t.eogonek=556,t.Uogonek=722,t.Aacute=722,t.Adieresis=722,t.egrave=556,t.zacute=500,t.iogonek=278,t.Oacute=778,t.oacute=611,t.amacron=556,t.sacute=556,t.idieresis=278,t.Ocircumflex=778,t.Ugrave=722,t.Delta=612,t.thorn=611,t.twosuperior=333,t.Odieresis=778,t.mu=611,t.igrave=278,t.ohungarumlaut=611,t.Eogonek=667,t.dcroat=611,t.threequarters=834,t.Scedilla=667,t.lcaron=400,t.Kcommaaccent=722,t.Lacute=611,t.trademark=1e3,t.edotaccent=556,t.Igrave=278,t.Imacron=278,t.Lcaron=611,t.onehalf=834,t.lessequal=549,t.ocircumflex=611,t.ntilde=611,t.Uhungarumlaut=722,t.Eacute=667,t.emacron=556,t.gbreve=611,t.onequarter=834,t.Scaron=667,t.Scommaaccent=667,t.Ohungarumlaut=778,t.degree=400,t.ograve=611,t.Ccaron=722,t.ugrave=611,t.radical=549,t.Dcaron=722,t.rcommaaccent=389,t.Ntilde=722,t.otilde=611,t.Rcommaaccent=722,t.Lcommaaccent=611,t.Atilde=722,t.Aogonek=722,t.Aring=722,t.Otilde=778,t.zdotaccent=500,t.Ecaron=667,t.Iogonek=278,t.kcommaaccent=556,t.minus=584,t.Icircumflex=278,t.ncaron=611,t.tcommaaccent=333,t.logicalnot=584,t.odieresis=611,t.udieresis=611,t.notequal=549,t.gcommaaccent=611,t.eth=611,t.zcaron=500,t.ncommaaccent=611,t.onesuperior=333,t.imacron=278,t.Euro=556})),t["Helvetica-Oblique"]=(0,i.getLookupTableFactory)((function(t){t.space=278,t.exclam=278,t.quotedbl=355,t.numbersign=556,t.dollar=556,t.percent=889,t.ampersand=667,t.quoteright=222,t.parenleft=333,t.parenright=333,t.asterisk=389,t.plus=584,t.comma=278,t.hyphen=333,t.period=278,t.slash=278,t.zero=556,t.one=556,t.two=556,t.three=556,t.four=556,t.five=556,t.six=556,t.seven=556,t.eight=556,t.nine=556,t.colon=278,t.semicolon=278,t.less=584,t.equal=584,t.greater=584,t.question=556,t.at=1015,t.A=667,t.B=667,t.C=722,t.D=722,t.E=667,t.F=611,t.G=778,t.H=722,t.I=278,t.J=500,t.K=667,t.L=556,t.M=833,t.N=722,t.O=778,t.P=667,t.Q=778,t.R=722,t.S=667,t.T=611,t.U=722,t.V=667,t.W=944,t.X=667,t.Y=667,t.Z=611,t.bracketleft=278,t.backslash=278,t.bracketright=278,t.asciicircum=469,t.underscore=556,t.quoteleft=222,t.a=556,t.b=556,t.c=500,t.d=556,t.e=556,t.f=278,t.g=556,t.h=556,t.i=222,t.j=222,t.k=500,t.l=222,t.m=833,t.n=556,t.o=556,t.p=556,t.q=556,t.r=333,t.s=500,t.t=278,t.u=556,t.v=500,t.w=722,t.x=500,t.y=500,t.z=500,t.braceleft=334,t.bar=260,t.braceright=334,t.asciitilde=584,t.exclamdown=333,t.cent=556,t.sterling=556,t.fraction=167,t.yen=556,t.florin=556,t.section=556,t.currency=556,t.quotesingle=191,t.quotedblleft=333,t.guillemotleft=556,t.guilsinglleft=333,t.guilsinglright=333,t.fi=500,t.fl=500,t.endash=556,t.dagger=556,t.daggerdbl=556,t.periodcentered=278,t.paragraph=537,t.bullet=350,t.quotesinglbase=222,t.quotedblbase=333,t.quotedblright=333,t.guillemotright=556,t.ellipsis=1e3,t.perthousand=1e3,t.questiondown=611,t.grave=333,t.acute=333,t.circumflex=333,t.tilde=333,t.macron=333,t.breve=333,t.dotaccent=333,t.dieresis=333,t.ring=333,t.cedilla=333,t.hungarumlaut=333,t.ogonek=333,t.caron=333,t.emdash=1e3,t.AE=1e3,t.ordfeminine=370,t.Lslash=556,t.Oslash=778,t.OE=1e3,t.ordmasculine=365,t.ae=889,t.dotlessi=278,t.lslash=222,t.oslash=611,t.oe=944,t.germandbls=611,t.Idieresis=278,t.eacute=556,t.abreve=556,t.uhungarumlaut=556,t.ecaron=556,t.Ydieresis=667,t.divide=584,t.Yacute=667,t.Acircumflex=667,t.aacute=556,t.Ucircumflex=722,t.yacute=500,t.scommaaccent=500,t.ecircumflex=556,t.Uring=722,t.Udieresis=722,t.aogonek=556,t.Uacute=722,t.uogonek=556,t.Edieresis=667,t.Dcroat=722,t.commaaccent=250,t.copyright=737,t.Emacron=667,t.ccaron=500,t.aring=556,t.Ncommaaccent=722,t.lacute=222,t.agrave=556,t.Tcommaaccent=611,t.Cacute=722,t.atilde=556,t.Edotaccent=667,t.scaron=500,t.scedilla=500,t.iacute=278,t.lozenge=471,t.Rcaron=722,t.Gcommaaccent=778,t.ucircumflex=556,t.acircumflex=556,t.Amacron=667,t.rcaron=333,t.ccedilla=500,t.Zdotaccent=611,t.Thorn=667,t.Omacron=778,t.Racute=722,t.Sacute=667,t.dcaron=643,t.Umacron=722,t.uring=556,t.threesuperior=333,t.Ograve=778,t.Agrave=667,t.Abreve=667,t.multiply=584,t.uacute=556,t.Tcaron=611,t.partialdiff=476,t.ydieresis=500,t.Nacute=722,t.icircumflex=278,t.Ecircumflex=667,t.adieresis=556,t.edieresis=556,t.cacute=500,t.nacute=556,t.umacron=556,t.Ncaron=722,t.Iacute=278,t.plusminus=584,t.brokenbar=260,t.registered=737,t.Gbreve=778,t.Idotaccent=278,t.summation=600,t.Egrave=667,t.racute=333,t.omacron=556,t.Zacute=611,t.Zcaron=611,t.greaterequal=549,t.Eth=722,t.Ccedilla=722,t.lcommaaccent=222,t.tcaron=317,t.eogonek=556,t.Uogonek=722,t.Aacute=667,t.Adieresis=667,t.egrave=556,t.zacute=500,t.iogonek=222,t.Oacute=778,t.oacute=556,t.amacron=556,t.sacute=500,t.idieresis=278,t.Ocircumflex=778,t.Ugrave=722,t.Delta=612,t.thorn=556,t.twosuperior=333,t.Odieresis=778,t.mu=556,t.igrave=278,t.ohungarumlaut=556,t.Eogonek=667,t.dcroat=556,t.threequarters=834,t.Scedilla=667,t.lcaron=299,t.Kcommaaccent=667,t.Lacute=556,t.trademark=1e3,t.edotaccent=556,t.Igrave=278,t.Imacron=278,t.Lcaron=556,t.onehalf=834,t.lessequal=549,t.ocircumflex=556,t.ntilde=556,t.Uhungarumlaut=722,t.Eacute=667,t.emacron=556,t.gbreve=556,t.onequarter=834,t.Scaron=667,t.Scommaaccent=667,t.Ohungarumlaut=778,t.degree=400,t.ograve=556,t.Ccaron=722,t.ugrave=556,t.radical=453,t.Dcaron=722,t.rcommaaccent=333,t.Ntilde=722,t.otilde=556,t.Rcommaaccent=722,t.Lcommaaccent=556,t.Atilde=667,t.Aogonek=667,t.Aring=667,t.Otilde=778,t.zdotaccent=500,t.Ecaron=667,t.Iogonek=278,t.kcommaaccent=500,t.minus=584,t.Icircumflex=278,t.ncaron=556,t.tcommaaccent=278,t.logicalnot=584,t.odieresis=556,t.udieresis=556,t.notequal=549,t.gcommaaccent=556,t.eth=556,t.zcaron=500,t.ncommaaccent=556,t.onesuperior=333,t.imacron=278,t.Euro=556})),t.Symbol=(0,i.getLookupTableFactory)((function(t){t.space=250,t.exclam=333,t.universal=713,t.numbersign=500,t.existential=549,t.percent=833,t.ampersand=778,t.suchthat=439,t.parenleft=333,t.parenright=333,t.asteriskmath=500,t.plus=549,t.comma=250,t.minus=549,t.period=250,t.slash=278,t.zero=500,t.one=500,t.two=500,t.three=500,t.four=500,t.five=500,t.six=500,t.seven=500,t.eight=500,t.nine=500,t.colon=278,t.semicolon=278,t.less=549,t.equal=549,t.greater=549,t.question=444,t.congruent=549,t.Alpha=722,t.Beta=667,t.Chi=722,t.Delta=612,t.Epsilon=611,t.Phi=763,t.Gamma=603,t.Eta=722,t.Iota=333,t.theta1=631,t.Kappa=722,t.Lambda=686,t.Mu=889,t.Nu=722,t.Omicron=722,t.Pi=768,t.Theta=741,t.Rho=556,t.Sigma=592,t.Tau=611,t.Upsilon=690,t.sigma1=439,t.Omega=768,t.Xi=645,t.Psi=795,t.Zeta=611,t.bracketleft=333,t.therefore=863,t.bracketright=333,t.perpendicular=658,t.underscore=500,t.radicalex=500,t.alpha=631,t.beta=549,t.chi=549,t.delta=494,t.epsilon=439,t.phi=521,t.gamma=411,t.eta=603,t.iota=329,t.phi1=603,t.kappa=549,t.lambda=549,t.mu=576,t.nu=521,t.omicron=549,t.pi=549,t.theta=521,t.rho=549,t.sigma=603,t.tau=439,t.upsilon=576,t.omega1=713,t.omega=686,t.xi=493,t.psi=686,t.zeta=494,t.braceleft=480,t.bar=200,t.braceright=480,t.similar=549,t.Euro=750,t.Upsilon1=620,t.minute=247,t.lessequal=549,t.fraction=167,t.infinity=713,t.florin=500,t.club=753,t.diamond=753,t.heart=753,t.spade=753,t.arrowboth=1042,t.arrowleft=987,t.arrowup=603,t.arrowright=987,t.arrowdown=603,t.degree=400,t.plusminus=549,t.second=411,t.greaterequal=549,t.multiply=549,t.proportional=713,t.partialdiff=494,t.bullet=460,t.divide=549,t.notequal=549,t.equivalence=549,t.approxequal=549,t.ellipsis=1e3,t.arrowvertex=603,t.arrowhorizex=1e3,t.carriagereturn=658,t.aleph=823,t.Ifraktur=686,t.Rfraktur=795,t.weierstrass=987,t.circlemultiply=768,t.circleplus=768,t.emptyset=823,t.intersection=768,t.union=768,t.propersuperset=713,t.reflexsuperset=713,t.notsubset=713,t.propersubset=713,t.reflexsubset=713,t.element=713,t.notelement=713,t.angle=768,t.gradient=713,t.registerserif=790,t.copyrightserif=790,t.trademarkserif=890,t.product=823,t.radical=549,t.dotmath=250,t.logicalnot=713,t.logicaland=603,t.logicalor=603,t.arrowdblboth=1042,t.arrowdblleft=987,t.arrowdblup=603,t.arrowdblright=987,t.arrowdbldown=603,t.lozenge=494,t.angleleft=329,t.registersans=790,t.copyrightsans=790,t.trademarksans=786,t.summation=713,t.parenlefttp=384,t.parenleftex=384,t.parenleftbt=384,t.bracketlefttp=384,t.bracketleftex=384,t.bracketleftbt=384,t.bracelefttp=494,t.braceleftmid=494,t.braceleftbt=494,t.braceex=494,t.angleright=329,t.integral=274,t.integraltp=686,t.integralex=686,t.integralbt=686,t.parenrighttp=384,t.parenrightex=384,t.parenrightbt=384,t.bracketrighttp=384,t.bracketrightex=384,t.bracketrightbt=384,t.bracerighttp=494,t.bracerightmid=494,t.bracerightbt=494,t.apple=790})),t["Times-Roman"]=(0,i.getLookupTableFactory)((function(t){t.space=250,t.exclam=333,t.quotedbl=408,t.numbersign=500,t.dollar=500,t.percent=833,t.ampersand=778,t.quoteright=333,t.parenleft=333,t.parenright=333,t.asterisk=500,t.plus=564,t.comma=250,t.hyphen=333,t.period=250,t.slash=278,t.zero=500,t.one=500,t.two=500,t.three=500,t.four=500,t.five=500,t.six=500,t.seven=500,t.eight=500,t.nine=500,t.colon=278,t.semicolon=278,t.less=564,t.equal=564,t.greater=564,t.question=444,t.at=921,t.A=722,t.B=667,t.C=667,t.D=722,t.E=611,t.F=556,t.G=722,t.H=722,t.I=333,t.J=389,t.K=722,t.L=611,t.M=889,t.N=722,t.O=722,t.P=556,t.Q=722,t.R=667,t.S=556,t.T=611,t.U=722,t.V=722,t.W=944,t.X=722,t.Y=722,t.Z=611,t.bracketleft=333,t.backslash=278,t.bracketright=333,t.asciicircum=469,t.underscore=500,t.quoteleft=333,t.a=444,t.b=500,t.c=444,t.d=500,t.e=444,t.f=333,t.g=500,t.h=500,t.i=278,t.j=278,t.k=500,t.l=278,t.m=778,t.n=500,t.o=500,t.p=500,t.q=500,t.r=333,t.s=389,t.t=278,t.u=500,t.v=500,t.w=722,t.x=500,t.y=500,t.z=444,t.braceleft=480,t.bar=200,t.braceright=480,t.asciitilde=541,t.exclamdown=333,t.cent=500,t.sterling=500,t.fraction=167,t.yen=500,t.florin=500,t.section=500,t.currency=500,t.quotesingle=180,t.quotedblleft=444,t.guillemotleft=500,t.guilsinglleft=333,t.guilsinglright=333,t.fi=556,t.fl=556,t.endash=500,t.dagger=500,t.daggerdbl=500,t.periodcentered=250,t.paragraph=453,t.bullet=350,t.quotesinglbase=333,t.quotedblbase=444,t.quotedblright=444,t.guillemotright=500,t.ellipsis=1e3,t.perthousand=1e3,t.questiondown=444,t.grave=333,t.acute=333,t.circumflex=333,t.tilde=333,t.macron=333,t.breve=333,t.dotaccent=333,t.dieresis=333,t.ring=333,t.cedilla=333,t.hungarumlaut=333,t.ogonek=333,t.caron=333,t.emdash=1e3,t.AE=889,t.ordfeminine=276,t.Lslash=611,t.Oslash=722,t.OE=889,t.ordmasculine=310,t.ae=667,t.dotlessi=278,t.lslash=278,t.oslash=500,t.oe=722,t.germandbls=500,t.Idieresis=333,t.eacute=444,t.abreve=444,t.uhungarumlaut=500,t.ecaron=444,t.Ydieresis=722,t.divide=564,t.Yacute=722,t.Acircumflex=722,t.aacute=444,t.Ucircumflex=722,t.yacute=500,t.scommaaccent=389,t.ecircumflex=444,t.Uring=722,t.Udieresis=722,t.aogonek=444,t.Uacute=722,t.uogonek=500,t.Edieresis=611,t.Dcroat=722,t.commaaccent=250,t.copyright=760,t.Emacron=611,t.ccaron=444,t.aring=444,t.Ncommaaccent=722,t.lacute=278,t.agrave=444,t.Tcommaaccent=611,t.Cacute=667,t.atilde=444,t.Edotaccent=611,t.scaron=389,t.scedilla=389,t.iacute=278,t.lozenge=471,t.Rcaron=667,t.Gcommaaccent=722,t.ucircumflex=500,t.acircumflex=444,t.Amacron=722,t.rcaron=333,t.ccedilla=444,t.Zdotaccent=611,t.Thorn=556,t.Omacron=722,t.Racute=667,t.Sacute=556,t.dcaron=588,t.Umacron=722,t.uring=500,t.threesuperior=300,t.Ograve=722,t.Agrave=722,t.Abreve=722,t.multiply=564,t.uacute=500,t.Tcaron=611,t.partialdiff=476,t.ydieresis=500,t.Nacute=722,t.icircumflex=278,t.Ecircumflex=611,t.adieresis=444,t.edieresis=444,t.cacute=444,t.nacute=500,t.umacron=500,t.Ncaron=722,t.Iacute=333,t.plusminus=564,t.brokenbar=200,t.registered=760,t.Gbreve=722,t.Idotaccent=333,t.summation=600,t.Egrave=611,t.racute=333,t.omacron=500,t.Zacute=611,t.Zcaron=611,t.greaterequal=549,t.Eth=722,t.Ccedilla=667,t.lcommaaccent=278,t.tcaron=326,t.eogonek=444,t.Uogonek=722,t.Aacute=722,t.Adieresis=722,t.egrave=444,t.zacute=444,t.iogonek=278,t.Oacute=722,t.oacute=500,t.amacron=444,t.sacute=389,t.idieresis=278,t.Ocircumflex=722,t.Ugrave=722,t.Delta=612,t.thorn=500,t.twosuperior=300,t.Odieresis=722,t.mu=500,t.igrave=278,t.ohungarumlaut=500,t.Eogonek=611,t.dcroat=500,t.threequarters=750,t.Scedilla=556,t.lcaron=344,t.Kcommaaccent=722,t.Lacute=611,t.trademark=980,t.edotaccent=444,t.Igrave=333,t.Imacron=333,t.Lcaron=611,t.onehalf=750,t.lessequal=549,t.ocircumflex=500,t.ntilde=500,t.Uhungarumlaut=722,t.Eacute=611,t.emacron=444,t.gbreve=500,t.onequarter=750,t.Scaron=556,t.Scommaaccent=556,t.Ohungarumlaut=722,t.degree=400,t.ograve=500,t.Ccaron=667,t.ugrave=500,t.radical=453,t.Dcaron=722,t.rcommaaccent=333,t.Ntilde=722,t.otilde=500,t.Rcommaaccent=667,t.Lcommaaccent=611,t.Atilde=722,t.Aogonek=722,t.Aring=722,t.Otilde=722,t.zdotaccent=444,t.Ecaron=611,t.Iogonek=333,t.kcommaaccent=500,t.minus=564,t.Icircumflex=333,t.ncaron=500,t.tcommaaccent=278,t.logicalnot=564,t.odieresis=500,t.udieresis=500,t.notequal=549,t.gcommaaccent=500,t.eth=500,t.zcaron=444,t.ncommaaccent=500,t.onesuperior=300,t.imacron=278,t.Euro=500})),t["Times-Bold"]=(0,i.getLookupTableFactory)((function(t){t.space=250,t.exclam=333,t.quotedbl=555,t.numbersign=500,t.dollar=500,t.percent=1e3,t.ampersand=833,t.quoteright=333,t.parenleft=333,t.parenright=333,t.asterisk=500,t.plus=570,t.comma=250,t.hyphen=333,t.period=250,t.slash=278,t.zero=500,t.one=500,t.two=500,t.three=500,t.four=500,t.five=500,t.six=500,t.seven=500,t.eight=500,t.nine=500,t.colon=333,t.semicolon=333,t.less=570,t.equal=570,t.greater=570,t.question=500,t.at=930,t.A=722,t.B=667,t.C=722,t.D=722,t.E=667,t.F=611,t.G=778,t.H=778,t.I=389,t.J=500,t.K=778,t.L=667,t.M=944,t.N=722,t.O=778,t.P=611,t.Q=778,t.R=722,t.S=556,t.T=667,t.U=722,t.V=722,t.W=1e3,t.X=722,t.Y=722,t.Z=667,t.bracketleft=333,t.backslash=278,t.bracketright=333,t.asciicircum=581,t.underscore=500,t.quoteleft=333,t.a=500,t.b=556,t.c=444,t.d=556,t.e=444,t.f=333,t.g=500,t.h=556,t.i=278,t.j=333,t.k=556,t.l=278,t.m=833,t.n=556,t.o=500,t.p=556,t.q=556,t.r=444,t.s=389,t.t=333,t.u=556,t.v=500,t.w=722,t.x=500,t.y=500,t.z=444,t.braceleft=394,t.bar=220,t.braceright=394,t.asciitilde=520,t.exclamdown=333,t.cent=500,t.sterling=500,t.fraction=167,t.yen=500,t.florin=500,t.section=500,t.currency=500,t.quotesingle=278,t.quotedblleft=500,t.guillemotleft=500,t.guilsinglleft=333,t.guilsinglright=333,t.fi=556,t.fl=556,t.endash=500,t.dagger=500,t.daggerdbl=500,t.periodcentered=250,t.paragraph=540,t.bullet=350,t.quotesinglbase=333,t.quotedblbase=500,t.quotedblright=500,t.guillemotright=500,t.ellipsis=1e3,t.perthousand=1e3,t.questiondown=500,t.grave=333,t.acute=333,t.circumflex=333,t.tilde=333,t.macron=333,t.breve=333,t.dotaccent=333,t.dieresis=333,t.ring=333,t.cedilla=333,t.hungarumlaut=333,t.ogonek=333,t.caron=333,t.emdash=1e3,t.AE=1e3,t.ordfeminine=300,t.Lslash=667,t.Oslash=778,t.OE=1e3,t.ordmasculine=330,t.ae=722,t.dotlessi=278,t.lslash=278,t.oslash=500,t.oe=722,t.germandbls=556,t.Idieresis=389,t.eacute=444,t.abreve=500,t.uhungarumlaut=556,t.ecaron=444,t.Ydieresis=722,t.divide=570,t.Yacute=722,t.Acircumflex=722,t.aacute=500,t.Ucircumflex=722,t.yacute=500,t.scommaaccent=389,t.ecircumflex=444,t.Uring=722,t.Udieresis=722,t.aogonek=500,t.Uacute=722,t.uogonek=556,t.Edieresis=667,t.Dcroat=722,t.commaaccent=250,t.copyright=747,t.Emacron=667,t.ccaron=444,t.aring=500,t.Ncommaaccent=722,t.lacute=278,t.agrave=500,t.Tcommaaccent=667,t.Cacute=722,t.atilde=500,t.Edotaccent=667,t.scaron=389,t.scedilla=389,t.iacute=278,t.lozenge=494,t.Rcaron=722,t.Gcommaaccent=778,t.ucircumflex=556,t.acircumflex=500,t.Amacron=722,t.rcaron=444,t.ccedilla=444,t.Zdotaccent=667,t.Thorn=611,t.Omacron=778,t.Racute=722,t.Sacute=556,t.dcaron=672,t.Umacron=722,t.uring=556,t.threesuperior=300,t.Ograve=778,t.Agrave=722,t.Abreve=722,t.multiply=570,t.uacute=556,t.Tcaron=667,t.partialdiff=494,t.ydieresis=500,t.Nacute=722,t.icircumflex=278,t.Ecircumflex=667,t.adieresis=500,t.edieresis=444,t.cacute=444,t.nacute=556,t.umacron=556,t.Ncaron=722,t.Iacute=389,t.plusminus=570,t.brokenbar=220,t.registered=747,t.Gbreve=778,t.Idotaccent=389,t.summation=600,t.Egrave=667,t.racute=444,t.omacron=500,t.Zacute=667,t.Zcaron=667,t.greaterequal=549,t.Eth=722,t.Ccedilla=722,t.lcommaaccent=278,t.tcaron=416,t.eogonek=444,t.Uogonek=722,t.Aacute=722,t.Adieresis=722,t.egrave=444,t.zacute=444,t.iogonek=278,t.Oacute=778,t.oacute=500,t.amacron=500,t.sacute=389,t.idieresis=278,t.Ocircumflex=778,t.Ugrave=722,t.Delta=612,t.thorn=556,t.twosuperior=300,t.Odieresis=778,t.mu=556,t.igrave=278,t.ohungarumlaut=500,t.Eogonek=667,t.dcroat=556,t.threequarters=750,t.Scedilla=556,t.lcaron=394,t.Kcommaaccent=778,t.Lacute=667,t.trademark=1e3,t.edotaccent=444,t.Igrave=389,t.Imacron=389,t.Lcaron=667,t.onehalf=750,t.lessequal=549,t.ocircumflex=500,t.ntilde=556,t.Uhungarumlaut=722,t.Eacute=667,t.emacron=444,t.gbreve=500,t.onequarter=750,t.Scaron=556,t.Scommaaccent=556,t.Ohungarumlaut=778,t.degree=400,t.ograve=500,t.Ccaron=722,t.ugrave=556,t.radical=549,t.Dcaron=722,t.rcommaaccent=444,t.Ntilde=722,t.otilde=500,t.Rcommaaccent=722,t.Lcommaaccent=667,t.Atilde=722,t.Aogonek=722,t.Aring=722,t.Otilde=778,t.zdotaccent=444,t.Ecaron=667,t.Iogonek=389,t.kcommaaccent=556,t.minus=570,t.Icircumflex=389,t.ncaron=556,t.tcommaaccent=333,t.logicalnot=570,t.odieresis=500,t.udieresis=556,t.notequal=549,t.gcommaaccent=500,t.eth=500,t.zcaron=444,t.ncommaaccent=556,t.onesuperior=300,t.imacron=278,t.Euro=500})),t["Times-BoldItalic"]=(0,i.getLookupTableFactory)((function(t){t.space=250,t.exclam=389,t.quotedbl=555,t.numbersign=500,t.dollar=500,t.percent=833,t.ampersand=778,t.quoteright=333,t.parenleft=333,t.parenright=333,t.asterisk=500,t.plus=570,t.comma=250,t.hyphen=333,t.period=250,t.slash=278,t.zero=500,t.one=500,t.two=500,t.three=500,t.four=500,t.five=500,t.six=500,t.seven=500,t.eight=500,t.nine=500,t.colon=333,t.semicolon=333,t.less=570,t.equal=570,t.greater=570,t.question=500,t.at=832,t.A=667,t.B=667,t.C=667,t.D=722,t.E=667,t.F=667,t.G=722,t.H=778,t.I=389,t.J=500,t.K=667,t.L=611,t.M=889,t.N=722,t.O=722,t.P=611,t.Q=722,t.R=667,t.S=556,t.T=611,t.U=722,t.V=667,t.W=889,t.X=667,t.Y=611,t.Z=611,t.bracketleft=333,t.backslash=278,t.bracketright=333,t.asciicircum=570,t.underscore=500,t.quoteleft=333,t.a=500,t.b=500,t.c=444,t.d=500,t.e=444,t.f=333,t.g=500,t.h=556,t.i=278,t.j=278,t.k=500,t.l=278,t.m=778,t.n=556,t.o=500,t.p=500,t.q=500,t.r=389,t.s=389,t.t=278,t.u=556,t.v=444,t.w=667,t.x=500,t.y=444,t.z=389,t.braceleft=348,t.bar=220,t.braceright=348,t.asciitilde=570,t.exclamdown=389,t.cent=500,t.sterling=500,t.fraction=167,t.yen=500,t.florin=500,t.section=500,t.currency=500,t.quotesingle=278,t.quotedblleft=500,t.guillemotleft=500,t.guilsinglleft=333,t.guilsinglright=333,t.fi=556,t.fl=556,t.endash=500,t.dagger=500,t.daggerdbl=500,t.periodcentered=250,t.paragraph=500,t.bullet=350,t.quotesinglbase=333,t.quotedblbase=500,t.quotedblright=500,t.guillemotright=500,t.ellipsis=1e3,t.perthousand=1e3,t.questiondown=500,t.grave=333,t.acute=333,t.circumflex=333,t.tilde=333,t.macron=333,t.breve=333,t.dotaccent=333,t.dieresis=333,t.ring=333,t.cedilla=333,t.hungarumlaut=333,t.ogonek=333,t.caron=333,t.emdash=1e3,t.AE=944,t.ordfeminine=266,t.Lslash=611,t.Oslash=722,t.OE=944,t.ordmasculine=300,t.ae=722,t.dotlessi=278,t.lslash=278,t.oslash=500,t.oe=722,t.germandbls=500,t.Idieresis=389,t.eacute=444,t.abreve=500,t.uhungarumlaut=556,t.ecaron=444,t.Ydieresis=611,t.divide=570,t.Yacute=611,t.Acircumflex=667,t.aacute=500,t.Ucircumflex=722,t.yacute=444,t.scommaaccent=389,t.ecircumflex=444,t.Uring=722,t.Udieresis=722,t.aogonek=500,t.Uacute=722,t.uogonek=556,t.Edieresis=667,t.Dcroat=722,t.commaaccent=250,t.copyright=747,t.Emacron=667,t.ccaron=444,t.aring=500,t.Ncommaaccent=722,t.lacute=278,t.agrave=500,t.Tcommaaccent=611,t.Cacute=667,t.atilde=500,t.Edotaccent=667,t.scaron=389,t.scedilla=389,t.iacute=278,t.lozenge=494,t.Rcaron=667,t.Gcommaaccent=722,t.ucircumflex=556,t.acircumflex=500,t.Amacron=667,t.rcaron=389,t.ccedilla=444,t.Zdotaccent=611,t.Thorn=611,t.Omacron=722,t.Racute=667,t.Sacute=556,t.dcaron=608,t.Umacron=722,t.uring=556,t.threesuperior=300,t.Ograve=722,t.Agrave=667,t.Abreve=667,t.multiply=570,t.uacute=556,t.Tcaron=611,t.partialdiff=494,t.ydieresis=444,t.Nacute=722,t.icircumflex=278,t.Ecircumflex=667,t.adieresis=500,t.edieresis=444,t.cacute=444,t.nacute=556,t.umacron=556,t.Ncaron=722,t.Iacute=389,t.plusminus=570,t.brokenbar=220,t.registered=747,t.Gbreve=722,t.Idotaccent=389,t.summation=600,t.Egrave=667,t.racute=389,t.omacron=500,t.Zacute=611,t.Zcaron=611,t.greaterequal=549,t.Eth=722,t.Ccedilla=667,t.lcommaaccent=278,t.tcaron=366,t.eogonek=444,t.Uogonek=722,t.Aacute=667,t.Adieresis=667,t.egrave=444,t.zacute=389,t.iogonek=278,t.Oacute=722,t.oacute=500,t.amacron=500,t.sacute=389,t.idieresis=278,t.Ocircumflex=722,t.Ugrave=722,t.Delta=612,t.thorn=500,t.twosuperior=300,t.Odieresis=722,t.mu=576,t.igrave=278,t.ohungarumlaut=500,t.Eogonek=667,t.dcroat=500,t.threequarters=750,t.Scedilla=556,t.lcaron=382,t.Kcommaaccent=667,t.Lacute=611,t.trademark=1e3,t.edotaccent=444,t.Igrave=389,t.Imacron=389,t.Lcaron=611,t.onehalf=750,t.lessequal=549,t.ocircumflex=500,t.ntilde=556,t.Uhungarumlaut=722,t.Eacute=667,t.emacron=444,t.gbreve=500,t.onequarter=750,t.Scaron=556,t.Scommaaccent=556,t.Ohungarumlaut=722,t.degree=400,t.ograve=500,t.Ccaron=667,t.ugrave=556,t.radical=549,t.Dcaron=722,t.rcommaaccent=389,t.Ntilde=722,t.otilde=500,t.Rcommaaccent=667,t.Lcommaaccent=611,t.Atilde=667,t.Aogonek=667,t.Aring=667,t.Otilde=722,t.zdotaccent=389,t.Ecaron=667,t.Iogonek=389,t.kcommaaccent=500,t.minus=606,t.Icircumflex=389,t.ncaron=556,t.tcommaaccent=278,t.logicalnot=606,t.odieresis=500,t.udieresis=556,t.notequal=549,t.gcommaaccent=500,t.eth=500,t.zcaron=389,t.ncommaaccent=556,t.onesuperior=300,t.imacron=278,t.Euro=500})),t["Times-Italic"]=(0,i.getLookupTableFactory)((function(t){t.space=250,t.exclam=333,t.quotedbl=420,t.numbersign=500,t.dollar=500,t.percent=833,t.ampersand=778,t.quoteright=333,t.parenleft=333,t.parenright=333,t.asterisk=500,t.plus=675,t.comma=250,t.hyphen=333,t.period=250,t.slash=278,t.zero=500,t.one=500,t.two=500,t.three=500,t.four=500,t.five=500,t.six=500,t.seven=500,t.eight=500,t.nine=500,t.colon=333,t.semicolon=333,t.less=675,t.equal=675,t.greater=675,t.question=500,t.at=920,t.A=611,t.B=611,t.C=667,t.D=722,t.E=611,t.F=611,t.G=722,t.H=722,t.I=333,t.J=444,t.K=667,t.L=556,t.M=833,t.N=667,t.O=722,t.P=611,t.Q=722,t.R=611,t.S=500,t.T=556,t.U=722,t.V=611,t.W=833,t.X=611,t.Y=556,t.Z=556,t.bracketleft=389,t.backslash=278,t.bracketright=389,t.asciicircum=422,t.underscore=500,t.quoteleft=333,t.a=500,t.b=500,t.c=444,t.d=500,t.e=444,t.f=278,t.g=500,t.h=500,t.i=278,t.j=278,t.k=444,t.l=278,t.m=722,t.n=500,t.o=500,t.p=500,t.q=500,t.r=389,t.s=389,t.t=278,t.u=500,t.v=444,t.w=667,t.x=444,t.y=444,t.z=389,t.braceleft=400,t.bar=275,t.braceright=400,t.asciitilde=541,t.exclamdown=389,t.cent=500,t.sterling=500,t.fraction=167,t.yen=500,t.florin=500,t.section=500,t.currency=500,t.quotesingle=214,t.quotedblleft=556,t.guillemotleft=500,t.guilsinglleft=333,t.guilsinglright=333,t.fi=500,t.fl=500,t.endash=500,t.dagger=500,t.daggerdbl=500,t.periodcentered=250,t.paragraph=523,t.bullet=350,t.quotesinglbase=333,t.quotedblbase=556,t.quotedblright=556,t.guillemotright=500,t.ellipsis=889,t.perthousand=1e3,t.questiondown=500,t.grave=333,t.acute=333,t.circumflex=333,t.tilde=333,t.macron=333,t.breve=333,t.dotaccent=333,t.dieresis=333,t.ring=333,t.cedilla=333,t.hungarumlaut=333,t.ogonek=333,t.caron=333,t.emdash=889,t.AE=889,t.ordfeminine=276,t.Lslash=556,t.Oslash=722,t.OE=944,t.ordmasculine=310,t.ae=667,t.dotlessi=278,t.lslash=278,t.oslash=500,t.oe=667,t.germandbls=500,t.Idieresis=333,t.eacute=444,t.abreve=500,t.uhungarumlaut=500,t.ecaron=444,t.Ydieresis=556,t.divide=675,t.Yacute=556,t.Acircumflex=611,t.aacute=500,t.Ucircumflex=722,t.yacute=444,t.scommaaccent=389,t.ecircumflex=444,t.Uring=722,t.Udieresis=722,t.aogonek=500,t.Uacute=722,t.uogonek=500,t.Edieresis=611,t.Dcroat=722,t.commaaccent=250,t.copyright=760,t.Emacron=611,t.ccaron=444,t.aring=500,t.Ncommaaccent=667,t.lacute=278,t.agrave=500,t.Tcommaaccent=556,t.Cacute=667,t.atilde=500,t.Edotaccent=611,t.scaron=389,t.scedilla=389,t.iacute=278,t.lozenge=471,t.Rcaron=611,t.Gcommaaccent=722,t.ucircumflex=500,t.acircumflex=500,t.Amacron=611,t.rcaron=389,t.ccedilla=444,t.Zdotaccent=556,t.Thorn=611,t.Omacron=722,t.Racute=611,t.Sacute=500,t.dcaron=544,t.Umacron=722,t.uring=500,t.threesuperior=300,t.Ograve=722,t.Agrave=611,t.Abreve=611,t.multiply=675,t.uacute=500,t.Tcaron=556,t.partialdiff=476,t.ydieresis=444,t.Nacute=667,t.icircumflex=278,t.Ecircumflex=611,t.adieresis=500,t.edieresis=444,t.cacute=444,t.nacute=500,t.umacron=500,t.Ncaron=667,t.Iacute=333,t.plusminus=675,t.brokenbar=275,t.registered=760,t.Gbreve=722,t.Idotaccent=333,t.summation=600,t.Egrave=611,t.racute=389,t.omacron=500,t.Zacute=556,t.Zcaron=556,t.greaterequal=549,t.Eth=722,t.Ccedilla=667,t.lcommaaccent=278,t.tcaron=300,t.eogonek=444,t.Uogonek=722,t.Aacute=611,t.Adieresis=611,t.egrave=444,t.zacute=389,t.iogonek=278,t.Oacute=722,t.oacute=500,t.amacron=500,t.sacute=389,t.idieresis=278,t.Ocircumflex=722,t.Ugrave=722,t.Delta=612,t.thorn=500,t.twosuperior=300,t.Odieresis=722,t.mu=500,t.igrave=278,t.ohungarumlaut=500,t.Eogonek=611,t.dcroat=500,t.threequarters=750,t.Scedilla=500,t.lcaron=300,t.Kcommaaccent=667,t.Lacute=556,t.trademark=980,t.edotaccent=444,t.Igrave=333,t.Imacron=333,t.Lcaron=611,t.onehalf=750,t.lessequal=549,t.ocircumflex=500,t.ntilde=500,t.Uhungarumlaut=722,t.Eacute=611,t.emacron=444,t.gbreve=500,t.onequarter=750,t.Scaron=500,t.Scommaaccent=500,t.Ohungarumlaut=722,t.degree=400,t.ograve=500,t.Ccaron=667,t.ugrave=500,t.radical=453,t.Dcaron=722,t.rcommaaccent=389,t.Ntilde=667,t.otilde=500,t.Rcommaaccent=611,t.Lcommaaccent=556,t.Atilde=611,t.Aogonek=611,t.Aring=611,t.Otilde=722,t.zdotaccent=389,t.Ecaron=611,t.Iogonek=333,t.kcommaaccent=444,t.minus=675,t.Icircumflex=333,t.ncaron=500,t.tcommaaccent=278,t.logicalnot=675,t.odieresis=500,t.udieresis=500,t.notequal=549,t.gcommaaccent=500,t.eth=500,t.zcaron=389,t.ncommaaccent=500,t.onesuperior=300,t.imacron=278,t.Euro=500})),t.ZapfDingbats=(0,i.getLookupTableFactory)((function(t){t.space=278,t.a1=974,t.a2=961,t.a202=974,t.a3=980,t.a4=719,t.a5=789,t.a119=790,t.a118=791,t.a117=690,t.a11=960,t.a12=939,t.a13=549,t.a14=855,t.a15=911,t.a16=933,t.a105=911,t.a17=945,t.a18=974,t.a19=755,t.a20=846,t.a21=762,t.a22=761,t.a23=571,t.a24=677,t.a25=763,t.a26=760,t.a27=759,t.a28=754,t.a6=494,t.a7=552,t.a8=537,t.a9=577,t.a10=692,t.a29=786,t.a30=788,t.a31=788,t.a32=790,t.a33=793,t.a34=794,t.a35=816,t.a36=823,t.a37=789,t.a38=841,t.a39=823,t.a40=833,t.a41=816,t.a42=831,t.a43=923,t.a44=744,t.a45=723,t.a46=749,t.a47=790,t.a48=792,t.a49=695,t.a50=776,t.a51=768,t.a52=792,t.a53=759,t.a54=707,t.a55=708,t.a56=682,t.a57=701,t.a58=826,t.a59=815,t.a60=789,t.a61=789,t.a62=707,t.a63=687,t.a64=696,t.a65=689,t.a66=786,t.a67=787,t.a68=713,t.a69=791,t.a70=785,t.a71=791,t.a72=873,t.a73=761,t.a74=762,t.a203=762,t.a75=759,t.a204=759,t.a76=892,t.a77=892,t.a78=788,t.a79=784,t.a81=438,t.a82=138,t.a83=277,t.a84=415,t.a97=392,t.a98=392,t.a99=668,t.a100=668,t.a89=390,t.a90=390,t.a93=317,t.a94=317,t.a91=276,t.a92=276,t.a205=509,t.a85=509,t.a206=410,t.a86=410,t.a87=234,t.a88=234,t.a95=334,t.a96=334,t.a101=732,t.a102=544,t.a103=544,t.a104=910,t.a106=667,t.a107=760,t.a108=760,t.a112=776,t.a111=595,t.a110=694,t.a109=626,t.a120=788,t.a121=788,t.a122=788,t.a123=788,t.a124=788,t.a125=788,t.a126=788,t.a127=788,t.a128=788,t.a129=788,t.a130=788,t.a131=788,t.a132=788,t.a133=788,t.a134=788,t.a135=788,t.a136=788,t.a137=788,t.a138=788,t.a139=788,t.a140=788,t.a141=788,t.a142=788,t.a143=788,t.a144=788,t.a145=788,t.a146=788,t.a147=788,t.a148=788,t.a149=788,t.a150=788,t.a151=788,t.a152=788,t.a153=788,t.a154=788,t.a155=788,t.a156=788,t.a157=788,t.a158=788,t.a159=788,t.a160=894,t.a161=838,t.a163=1016,t.a164=458,t.a196=748,t.a165=924,t.a192=748,t.a166=918,t.a167=927,t.a168=928,t.a169=928,t.a170=834,t.a171=873,t.a172=828,t.a173=924,t.a162=924,t.a174=917,t.a175=930,t.a176=931,t.a177=463,t.a178=883,t.a179=836,t.a193=836,t.a180=867,t.a199=867,t.a181=696,t.a200=696,t.a182=874,t.a201=874,t.a183=760,t.a184=946,t.a197=771,t.a185=865,t.a194=771,t.a198=888,t.a186=967,t.a195=888,t.a187=831,t.a188=873,t.a189=927,t.a190=970,t.a191=918}))}));e.getMetrics=n;const r=(0,i.getLookupTableFactory)((function(t){t.Courier={ascent:629,descent:-157,capHeight:562,xHeight:-426},t["Courier-Bold"]={ascent:629,descent:-157,capHeight:562,xHeight:439},t["Courier-Oblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426},t["Courier-BoldOblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426},t.Helvetica={ascent:718,descent:-207,capHeight:718,xHeight:523},t["Helvetica-Bold"]={ascent:718,descent:-207,capHeight:718,xHeight:532},t["Helvetica-Oblique"]={ascent:718,descent:-207,capHeight:718,xHeight:523},t["Helvetica-BoldOblique"]={ascent:718,descent:-207,capHeight:718,xHeight:532},t["Times-Roman"]={ascent:683,descent:-217,capHeight:662,xHeight:450},t["Times-Bold"]={ascent:683,descent:-217,capHeight:676,xHeight:461},t["Times-Italic"]={ascent:683,descent:-217,capHeight:653,xHeight:441},t["Times-BoldItalic"]={ascent:683,descent:-217,capHeight:669,xHeight:462},t.Symbol={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN},t.ZapfDingbats={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN}}));e.getFontBasicMetrics=r},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GlyfTable=void 0,e.GlyfTable=class{constructor({glyfTable:t,isGlyphLocationsLong:e,locaTable:i,numGlyphs:n}){this.glyphs=[];const r=new DataView(i.buffer,i.byteOffset,i.byteLength),o=new DataView(t.buffer,t.byteOffset,t.byteLength),a=e?4:2;let c=e?r.getUint32(0):2*r.getUint16(0),h=0;for(let t=0;t<n;t++){h+=a;const t=e?r.getUint32(h):2*r.getUint16(h);if(t===c){this.glyphs.push(new s({}));continue}const i=s.parse(c,o);this.glyphs.push(i),c=t}}getSize(){return this.glyphs.reduce(((t,e)=>t+(e.getSize()+3&-4)),0)}write(){const t=this.getSize(),e=new DataView(new ArrayBuffer(t)),s=t>131070,i=s?4:2,n=new DataView(new ArrayBuffer((this.glyphs.length+1)*i));s?n.setUint32(0,0):n.setUint16(0,0);let r=0,o=0;for(const t of this.glyphs)r+=t.write(r,e),r=r+3&-4,o+=i,s?n.setUint32(o,r):n.setUint16(o,r>>1);return{isLocationLong:s,loca:new Uint8Array(n.buffer),glyf:new Uint8Array(e.buffer)}}scale(t){for(let e=0,s=this.glyphs.length;e<s;e++)this.glyphs[e].scale(t[e])}};class s{constructor({header:t=null,simple:e=null,composites:s=null}){this.header=t,this.simple=e,this.composites=s}static parse(t,e){const[n,a]=i.parse(t,e);if(t+=n,a.numberOfContours<0){const i=[];for(;;){const[s,n]=o.parse(t,e);if(t+=s,i.push(n),!(32&n.flags))break}return new s({header:a,composites:i})}const c=r.parse(t,e,a.numberOfContours);return new s({header:a,simple:c})}getSize(){if(!this.header)return 0;const t=this.simple?this.simple.getSize():this.composites.reduce(((t,e)=>t+e.getSize()),0);return this.header.getSize()+t}write(t,e){if(!this.header)return 0;const s=t;if(t+=this.header.write(t,e),this.simple)t+=this.simple.write(t,e);else for(const s of this.composites)t+=s.write(t,e);return t-s}scale(t){if(!this.header)return;const e=(this.header.xMin+this.header.xMax)/2;if(this.header.scale(e,t),this.simple)this.simple.scale(e,t);else for(const s of this.composites)s.scale(e,t)}}class i{constructor({numberOfContours:t,xMin:e,yMin:s,xMax:i,yMax:n}){this.numberOfContours=t,this.xMin=e,this.yMin=s,this.xMax=i,this.yMax=n}static parse(t,e){return[10,new i({numberOfContours:e.getInt16(t),xMin:e.getInt16(t+2),yMin:e.getInt16(t+4),xMax:e.getInt16(t+6),yMax:e.getInt16(t+8)})]}getSize(){return 10}write(t,e){return e.setInt16(t,this.numberOfContours),e.setInt16(t+2,this.xMin),e.setInt16(t+4,this.yMin),e.setInt16(t+6,this.xMax),e.setInt16(t+8,this.yMax),10}scale(t,e){this.xMin=Math.round(t+(this.xMin-t)*e),this.xMax=Math.round(t+(this.xMax-t)*e)}}class n{constructor({flags:t,xCoordinates:e,yCoordinates:s}){this.xCoordinates=e,this.yCoordinates=s,this.flags=t}}class r{constructor({contours:t,instructions:e}){this.contours=t,this.instructions=e}static parse(t,e,s){const i=[];for(let n=0;n<s;n++){const s=e.getUint16(t);t+=2,i.push(s)}const o=i[s-1]+1,a=e.getUint16(t);t+=2;const c=new Uint8Array(e).slice(t,t+a);t+=a;const h=[];for(let s=0;s<o;t++,s++){let i=e.getUint8(t);if(h.push(i),8&i){const n=e.getUint8(++t);i^=8;for(let t=0;t<n;t++)h.push(i);s+=n}}const l=[];let u=[],f=[],d=[];const p=[];let g=0,m=0;for(let s=0;s<o;s++){const n=h[s];if(2&n){const s=e.getUint8(t++);m+=16&n?s:-s,u.push(m)}else 16&n||(m+=e.getInt16(t),t+=2),u.push(m);i[g]===s&&(g++,l.push(u),u=[])}m=0,g=0;for(let s=0;s<o;s++){const r=h[s];if(4&r){const s=e.getUint8(t++);m+=32&r?s:-s,f.push(m)}else 32&r||(m+=e.getInt16(t),t+=2),f.push(m);d.push(1&r|64&r),i[g]===s&&(u=l[g],g++,p.push(new n({flags:d,xCoordinates:u,yCoordinates:f})),f=[],d=[])}return new r({contours:p,instructions:c})}getSize(){let t=2*this.contours.length+2+this.instructions.length,e=0,s=0;for(const i of this.contours){t+=i.flags.length;for(let n=0,r=i.xCoordinates.length;n<r;n++){const r=i.xCoordinates[n],o=i.yCoordinates[n];let a=Math.abs(r-e);a>255?t+=2:a>0&&(t+=1),e=r,a=Math.abs(o-s),a>255?t+=2:a>0&&(t+=1),s=o}}return t}write(t,e){const s=t,i=[],n=[],r=[];let o=0,a=0;for(const s of this.contours){for(let t=0,e=s.xCoordinates.length;t<e;t++){let e=s.flags[t];const c=s.xCoordinates[t];let h=c-o;if(0===h)e|=16,i.push(0);else{const t=Math.abs(h);t<=255?(e|=h>=0?18:2,i.push(t)):i.push(h)}o=c;const l=s.yCoordinates[t];if(h=l-a,0===h)e|=32,n.push(0);else{const t=Math.abs(h);t<=255?(e|=h>=0?36:4,n.push(t)):n.push(h)}a=l,r.push(e)}e.setUint16(t,i.length-1),t+=2}e.setUint16(t,this.instructions.length),t+=2,this.instructions.length&&(new Uint8Array(e.buffer,0,e.buffer.byteLength).set(this.instructions,t),t+=this.instructions.length);for(const s of r)e.setUint8(t++,s);for(let s=0,n=i.length;s<n;s++){const n=i[s],o=r[s];2&o?e.setUint8(t++,n):16&o||(e.setInt16(t,n),t+=2)}for(let s=0,i=n.length;s<i;s++){const i=n[s],o=r[s];4&o?e.setUint8(t++,i):32&o||(e.setInt16(t,i),t+=2)}return t-s}scale(t,e){for(const s of this.contours)if(0!==s.xCoordinates.length)for(let i=0,n=s.xCoordinates.length;i<n;i++)s.xCoordinates[i]=Math.round(t+(s.xCoordinates[i]-t)*e)}}class o{constructor({flags:t,glyphIndex:e,argument1:s,argument2:i,transf:n,instructions:r}){this.flags=t,this.glyphIndex=e,this.argument1=s,this.argument2=i,this.transf=n,this.instructions=r}static parse(t,e){const s=t,i=[];let n=e.getUint16(t);const r=e.getUint16(t+2);let a,c;t+=4,1&n?(2&n?(a=e.getInt16(t),c=e.getInt16(t+2)):(a=e.getUint16(t),c=e.getUint16(t+2)),t+=4,n^=1):(2&n?(a=e.getInt8(t),c=e.getInt8(t+1)):(a=e.getUint8(t),c=e.getUint8(t+1)),t+=2),8&n?(i.push(e.getUint16(t)),t+=2):64&n?(i.push(e.getUint16(t),e.getUint16(t+2)),t+=4):128&n&&(i.push(e.getUint16(t),e.getUint16(t+2),e.getUint16(t+4),e.getUint16(t+6)),t+=8);let h=null;if(256&n){const s=e.getUint16(t);t+=2,h=new Uint8Array(e).slice(t,t+s),t+=s}return[t-s,new o({flags:n,glyphIndex:r,argument1:a,argument2:c,transf:i,instructions:h})]}getSize(){let t=4+2*this.transf.length;return 256&this.flags&&(t+=2+this.instructions.length),t+=2,2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(t+=2):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(t+=2),t}write(t,e){const s=t;return 2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(this.flags|=1):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(this.flags|=1),e.setUint16(t,this.flags),e.setUint16(t+2,this.glyphIndex),t+=4,1&this.flags?(2&this.flags?(e.setInt16(t,this.argument1),e.setInt16(t+2,this.argument2)):(e.setUint16(t,this.argument1),e.setUint16(t+2,this.argument2)),t+=4):(e.setUint8(t,this.argument1),e.setUint8(t+1,this.argument2),t+=2),256&this.flags&&(e.setUint16(t,this.instructions.length),t+=2,this.instructions.length&&(new Uint8Array(e.buffer,0,e.buffer.byteLength).set(this.instructions,t),t+=this.instructions.length)),t-s}scale(t,e){}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.OpenTypeFileBuilder=void 0;var i=s(3),n=s(2);function r(t,e,s){t[e]=s>>8&255,t[e+1]=255&s}function o(t,e,s){t[e]=s>>24&255,t[e+1]=s>>16&255,t[e+2]=s>>8&255,t[e+3]=255&s}function a(t,e,s){if(s instanceof Uint8Array)t.set(s,e);else if("string"==typeof s)for(let i=0,n=s.length;i<n;i++)t[e++]=255&s.charCodeAt(i);else for(const i of s)t[e++]=255&i}class c{constructor(t){this.sfnt=t,this.tables=Object.create(null)}static getSearchParams(t,e){let s=1,i=0;for(;(s^t)>s;)s<<=1,i++;const n=s*e;return{range:n,entry:i,rangeShift:e*t-n}}toArray(){let t=this.sfnt;const e=this.tables,s=Object.keys(e);s.sort();const h=s.length;let l,u,f,d,p,g=12+16*h;const m=[g];for(l=0;l<h;l++)d=e[s[l]],g+=(d.length+3&-4)>>>0,m.push(g);const w=new Uint8Array(g);for(l=0;l<h;l++)d=e[s[l]],a(w,m[l],d);"true"===t&&(t=(0,n.string32)(65536)),w[0]=255&t.charCodeAt(0),w[1]=255&t.charCodeAt(1),w[2]=255&t.charCodeAt(2),w[3]=255&t.charCodeAt(3),r(w,4,h);const b=c.getSearchParams(h,16);for(r(w,6,b.range),r(w,8,b.entry),r(w,10,b.rangeShift),g=12,l=0;l<h;l++){p=s[l],w[g]=255&p.charCodeAt(0),w[g+1]=255&p.charCodeAt(1),w[g+2]=255&p.charCodeAt(2),w[g+3]=255&p.charCodeAt(3);let t=0;for(u=m[l],f=m[l+1];u<f;u+=4)t=t+(0,i.readUint32)(w,u)>>>0;o(w,g+4,t),o(w,g+8,m[l]),o(w,g+12,e[p].length),g+=16}return w}addTable(t,e){if(t in this.tables)throw new Error("Table "+t+" already exists");this.tables[t]=e}}e.OpenTypeFileBuilder=c},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Type1Font=void 0;var i=s(35),n=s(2),r=s(38),o=s(3),a=s(8),c=s(49);function h(t,e,s){const i=t.length,n=e.length,r=i-n;let a=s,c=!1;for(;a<r;){let s=0;for(;s<n&&t[a+s]===e[s];)s++;if(s>=n){for(a+=s;a<i&&(0,o.isWhiteSpace)(t[a]);)a++;c=!0;break}a++}return{found:c,length:a}}e.Type1Font=class{constructor(t,e,s){let i=s.length1,o=e.peekBytes(6);const l=128===o[0]&&1===o[1];l&&(e.skip(6),i=o[5]<<24|o[4]<<16|o[3]<<8|o[2]);const u=function(t,e){const s=[101,101,120,101,99],i=t.pos;let r,o,c,l;try{r=t.getBytes(e),o=r.length}catch{}if(o===e&&(c=h(r,s,e-2*s.length),c.found&&c.length===e))return{stream:new a.Stream(r),length:e};for((0,n.warn)('Invalid "Length1" property in Type1 font -- trying to recover.'),t.pos=i;c=h(t.peekBytes(2048),s,0),0!==c.length;)if(t.pos+=c.length,c.found){l=t.pos-i;break}return t.pos=i,l?{stream:new a.Stream(t.getBytes(l)),length:l}:((0,n.warn)('Unable to recover "Length1" property in Type1 font -- using as is.'),{stream:new a.Stream(t.getBytes(e)),length:e})}(e,i);new c.Type1Parser(u.stream,!1,r.SEAC_ANALYSIS_ENABLED).extractFontHeader(s),l&&(o=e.getBytes(6));const f=function(t){const e=t.getBytes();if(0===e.length)throw new n.FormatError("getEexecBlock - no font program found.");return{stream:new a.Stream(e),length:e.length}}(e),d=new c.Type1Parser(f.stream,!0,r.SEAC_ANALYSIS_ENABLED).extractFontProgram(s);for(const t in d.properties)s[t]=d.properties[t];const p=d.charstrings,g=this.getType2Charstrings(p),m=this.getType2Subrs(d.subrs);this.charstrings=p,this.data=this.wrap(t,g,this.charstrings,m,s),this.seacs=this.getSeacs(d.charstrings)}get numGlyphs(){return this.charstrings.length+1}getCharset(){const t=[".notdef"];for(const{glyphName:e}of this.charstrings)t.push(e);return t}getGlyphMapping(t){const e=this.charstrings;if(t.composite){const s=Object.create(null);for(let i=0,n=e.length;i<n;i++)s[t.cMap.charCodeOf(i)]=i+1;return s}const s=[".notdef"];let i,n;for(n=0;n<e.length;n++)s.push(e[n].glyphName);const o=t.builtInEncoding;if(o){i=Object.create(null);for(const t in o)n=s.indexOf(o[t]),n>=0&&(i[t]=n)}return(0,r.type1FontGlyphMapping)(t,i,s)}hasGlyphId(t){return!(t<0||t>=this.numGlyphs)&&(0===t||this.charstrings[t-1].charstring.length>0)}getSeacs(t){const e=[];for(let s=0,i=t.length;s<i;s++){const i=t[s];i.seac&&(e[s+1]=i.seac)}return e}getType2Charstrings(t){const e=[];for(const s of t)e.push(s.charstring);return e}getType2Subrs(t){let e=0;const s=t.length;e=s<1133?107:s<33769?1131:32768;const i=[];let n;for(n=0;n<e;n++)i.push([11]);for(n=0;n<s;n++)i.push(t[n]);return i}wrap(t,e,s,n,r){const o=new i.CFF;o.header=new i.CFFHeader(1,0,4,4),o.names=[t];const a=new i.CFFTopDict;a.setByName("version",391),a.setByName("Notice",392),a.setByName("FullName",393),a.setByName("FamilyName",394),a.setByName("Weight",395),a.setByName("Encoding",null),a.setByName("FontMatrix",r.fontMatrix),a.setByName("FontBBox",r.bbox),a.setByName("charset",null),a.setByName("CharStrings",null),a.setByName("Private",null),o.topDict=a;const c=new i.CFFStrings;c.add("Version 0.11"),c.add("See original notice"),c.add(t),c.add(t),c.add("Medium"),o.strings=c,o.globalSubrIndex=new i.CFFIndex;const h=e.length,l=[".notdef"];let u,f;for(u=0;u<h;u++){const t=s[u].glyphName;-1===i.CFFStandardStrings.indexOf(t)&&c.add(t),l.push(t)}o.charset=new i.CFFCharset(!1,0,l);const d=new i.CFFIndex;for(d.add([139,14]),u=0;u<h;u++)d.add(e[u]);o.charStrings=d;const p=new i.CFFPrivateDict;p.setByName("Subrs",null);const g=["BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StemSnapH","StemSnapV","BlueShift","BlueFuzz","BlueScale","LanguageGroup","ExpansionFactor","ForceBold","StdHW","StdVW"];for(u=0,f=g.length;u<f;u++){const t=g[u];if(!(t in r.privateData))continue;const e=r.privateData[t];if(Array.isArray(e))for(let t=e.length-1;t>0;t--)e[t]-=e[t-1];p.setByName(t,e)}o.topDict.privateDict=p;const m=new i.CFFIndex;for(u=0,f=n.length;u<f;u++)m.add(n[u]);return p.subrsIndex=m,new i.CFFCompiler(o).compile()}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Type1Parser=void 0;var i=s(37),n=s(3),r=s(8),o=s(2);const a=[4],c=[5],h=[6],l=[7],u=[8],f=[12,35],d=[14],p=[21],g=[22],m=[30],w=[31];class b{constructor(){this.width=0,this.lsb=0,this.flexing=!1,this.output=[],this.stack=[]}convert(t,e,s){const i=t.length;let n,r,b,y=!1;for(let A=0;A<i;A++){let i=t[A];if(i<32){switch(12===i&&(i=(i<<8)+t[++A]),i){case 1:case 3:case 9:case 3072:case 3073:case 3074:case 3105:this.stack=[];break;case 4:if(this.flexing){if(this.stack.length<1){y=!0;break}const t=this.stack.pop();this.stack.push(0,t);break}y=this.executeCommand(1,a);break;case 5:y=this.executeCommand(2,c);break;case 6:y=this.executeCommand(1,h);break;case 7:y=this.executeCommand(1,l);break;case 8:y=this.executeCommand(6,u);break;case 10:if(this.stack.length<1){y=!0;break}if(b=this.stack.pop(),!e[b]){y=!0;break}y=this.convert(e[b],e,s);break;case 11:return y;case 13:if(this.stack.length<2){y=!0;break}n=this.stack.pop(),r=this.stack.pop(),this.lsb=r,this.width=n,this.stack.push(n,r),y=this.executeCommand(2,g);break;case 14:this.output.push(d[0]);break;case 21:if(this.flexing)break;y=this.executeCommand(2,p);break;case 22:if(this.flexing){this.stack.push(0);break}y=this.executeCommand(1,g);break;case 30:y=this.executeCommand(4,m);break;case 31:y=this.executeCommand(4,w);break;case 3078:if(s){const t=this.stack.at(-5);this.seac=this.stack.splice(-4,4),this.seac[0]+=this.lsb-t,y=this.executeCommand(0,d)}else y=this.executeCommand(4,d);break;case 3079:if(this.stack.length<4){y=!0;break}this.stack.pop(),n=this.stack.pop();const t=this.stack.pop();r=this.stack.pop(),this.lsb=r,this.width=n,this.stack.push(n,r,t),y=this.executeCommand(3,p);break;case 3084:if(this.stack.length<2){y=!0;break}const A=this.stack.pop(),v=this.stack.pop();this.stack.push(v/A);break;case 3088:if(this.stack.length<2){y=!0;break}b=this.stack.pop();const x=this.stack.pop();if(0===b&&3===x){const t=this.stack.splice(-17,17);this.stack.push(t[2]+t[0],t[3]+t[1],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14]),y=this.executeCommand(13,f,!0),this.flexing=!1,this.stack.push(t[15],t[16])}else 1===b&&0===x&&(this.flexing=!0);break;case 3089:break;default:(0,o.warn)('Unknown type 1 charstring command of "'+i+'"')}if(y)break}else i<=246?i-=139:i=i<=250?256*(i-247)+t[++A]+108:i<=254?-256*(i-251)-t[++A]-108:(255&t[++A])<<24|(255&t[++A])<<16|(255&t[++A])<<8|255&t[++A],this.stack.push(i)}return y}executeCommand(t,e,s){const i=this.stack.length;if(t>i)return!0;const n=i-t;for(let t=n;t<i;t++){let e=this.stack[t];Number.isInteger(e)?this.output.push(28,e>>8&255,255&e):(e=65536*e|0,this.output.push(255,e>>24&255,e>>16&255,e>>8&255,255&e))}return this.output.push(...e),s?this.stack.splice(n,t):this.stack.length=0,!1}}function y(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function A(t,e,s){if(s>=t.length)return new Uint8Array(0);let i,n,r=0|e;for(i=0;i<s;i++)r=52845*(t[i]+r)+22719&65535;const o=t.length-s,a=new Uint8Array(o);for(i=s,n=0;n<o;i++,n++){const e=t[i];a[n]=e^r>>8,r=52845*(e+r)+22719&65535}return a}function v(t){return 47===t||91===t||93===t||123===t||125===t||40===t||41===t}e.Type1Parser=class{constructor(t,e,s){if(e){const e=t.getBytes(),s=!((y(e[0])||(0,n.isWhiteSpace)(e[0]))&&y(e[1])&&y(e[2])&&y(e[3])&&y(e[4])&&y(e[5])&&y(e[6])&&y(e[7]));t=new r.Stream(s?A(e,55665,4):function(t){let e=55665;const s=t.length,i=new Uint8Array(s>>>1);let n,r;for(n=0,r=0;n<s;n++){const o=t[n];if(!y(o))continue;let a;for(n++;n<s&&!y(a=t[n]);)n++;if(n<s){const t=parseInt(String.fromCharCode(o,a),16);i[r++]=t^e>>8,e=52845*(t+e)+22719&65535}}return i.slice(4,r)}(e))}this.seacAnalysisEnabled=!!s,this.stream=t,this.nextChar()}readNumberArray(){this.getToken();const t=[];for(;;){const e=this.getToken();if(null===e||"]"===e||"}"===e)break;t.push(parseFloat(e||0))}return t}readNumber(){const t=this.getToken();return parseFloat(t||0)}readInt(){const t=this.getToken();return 0|parseInt(t||0,10)}readBoolean(){return"true"===this.getToken()?1:0}nextChar(){return this.currentChar=this.stream.getByte()}prevChar(){return this.stream.skip(-2),this.currentChar=this.stream.getByte()}getToken(){let t=!1,e=this.currentChar;for(;;){if(-1===e)return null;if(t)10!==e&&13!==e||(t=!1);else if(37===e)t=!0;else if(!(0,n.isWhiteSpace)(e))break;e=this.nextChar()}if(v(e))return this.nextChar(),String.fromCharCode(e);let s="";do{s+=String.fromCharCode(e),e=this.nextChar()}while(e>=0&&!(0,n.isWhiteSpace)(e)&&!v(e));return s}readCharStrings(t,e){return-1===e?t:A(t,4330,e)}extractFontProgram(t){const e=this.stream,s=[],i=[],n=Object.create(null);n.lenIV=4;const r={subrs:[],charstrings:[],properties:{privateData:n}};let o,a,c,h;for(;null!==(o=this.getToken());)if("/"===o)switch(o=this.getToken(),o){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();o=this.getToken(),null!==o&&"end"!==o;){if("/"!==o)continue;const t=this.getToken();a=this.readInt(),this.getToken(),c=a>0?e.getBytes(a):new Uint8Array(0),h=r.properties.privateData.lenIV;const s=this.readCharStrings(c,h);this.nextChar(),o=this.getToken(),"noaccess"===o?this.getToken():"/"===o&&this.prevChar(),i.push({glyph:t,encoded:s})}break;case"Subrs":for(this.readInt(),this.getToken();"dup"===this.getToken();){const t=this.readInt();a=this.readInt(),this.getToken(),c=a>0?e.getBytes(a):new Uint8Array(0),h=r.properties.privateData.lenIV;const i=this.readCharStrings(c,h);this.nextChar(),o=this.getToken(),"noaccess"===o&&this.getToken(),s[t]=i}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":this.readNumberArray();break;case"StemSnapH":case"StemSnapV":r.properties.privateData[o]=this.readNumberArray();break;case"StdHW":case"StdVW":r.properties.privateData[o]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":r.properties.privateData[o]=this.readNumber();break;case"ExpansionFactor":r.properties.privateData[o]=this.readNumber()||.06;break;case"ForceBold":r.properties.privateData[o]=this.readBoolean()}for(const{encoded:e,glyph:n}of i){const i=new b,o=i.convert(e,s,this.seacAnalysisEnabled);let a=i.output;o&&(a=[14]);const c={glyphName:n,charstring:a,width:i.width,lsb:i.lsb,seac:i.seac};if(".notdef"===n?r.charstrings.unshift(c):r.charstrings.push(c),t.builtInEncoding){const e=t.builtInEncoding.indexOf(n);e>-1&&void 0===t.widths[e]&&e>=t.firstChar&&e<=t.lastChar&&(t.widths[e]=i.width)}}return r}extractFontHeader(t){let e;for(;null!==(e=this.getToken());)if("/"===e)switch(e=this.getToken(),e){case"FontMatrix":const s=this.readNumberArray();t.fontMatrix=s;break;case"Encoding":const n=this.getToken();let r;if(/^\d+$/.test(n)){r=[];const t=0|parseInt(n,10);this.getToken();for(let s=0;s<t;s++){for(e=this.getToken();"dup"!==e&&"def"!==e;)if(e=this.getToken(),null===e)return;if("def"===e)break;const t=this.readInt();this.getToken();const s=this.getToken();r[t]=s,this.getToken()}}else r=(0,i.getEncoding)(n);t.builtInEncoding=r;break;case"FontBBox":const o=this.readNumberArray();t.ascent=Math.max(o[3],o[1]),t.descent=Math.min(o[1],o[3]),t.ascentScaled=!0}}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Pattern=void 0,e.clearPatternCaches=function(){l=Object.create(null)},e.getTilingPatternIR=function(t,e,s){const n=e.getArray("Matrix"),r=i.Util.normalizeRect(e.getArray("BBox")),o=e.get("XStep"),a=e.get("YStep"),c=e.get("PaintType"),h=e.get("TilingType");if(r[2]-r[0]==0||r[3]-r[1]==0)throw new i.FormatError(`Invalid getTilingPatternIR /BBox array: [${r}].`);return["TilingPattern",s,t,n,r,o,a,c,h]};var i=s(2),n=s(5),r=s(12),o=s(3);e.Pattern=class{constructor(){(0,i.unreachable)("Cannot initialize Pattern.")}static parseShading(t,e,s,r,a){const h=t instanceof n.BaseStream?t.dict:t,l=h.get("ShadingType");try{switch(l){case 2:case 3:return new c(h,e,s,r,a);case 4:case 5:case 6:case 7:return new f(t,e,s,r,a);default:throw new i.FormatError("Unsupported ShadingType: "+l)}}catch(t){if(t instanceof o.MissingDataException)throw t;return(0,i.warn)(t),new d}}};class a{static SMALL_NUMBER=1e-6;constructor(){this.constructor===a&&(0,i.unreachable)("Cannot initialize BaseShading.")}getIR(){(0,i.unreachable)("Abstract method `getIR` called.")}}class c extends a{constructor(t,e,s,n,o){super(),this.coordsArr=t.getArray("Coords"),this.shadingType=t.get("ShadingType");const c=r.ColorSpace.parse({cs:t.getRaw("CS")||t.getRaw("ColorSpace"),xref:e,resources:s,pdfFunctionFactory:n,localColorSpaceCache:o}),h=t.getArray("BBox");this.bbox=Array.isArray(h)&&4===h.length?i.Util.normalizeRect(h):null;let l=0,u=1;if(t.has("Domain")){const e=t.getArray("Domain");l=e[0],u=e[1]}let f=!1,d=!1;if(t.has("Extend")){const e=t.getArray("Extend");f=e[0],d=e[1]}if(!(3!==this.shadingType||f&&d)){const[t,e,s,n,r,o]=this.coordsArr,a=Math.hypot(t-n,e-r);s<=o+a&&o<=s+a&&(0,i.warn)("Unsupported radial gradient.")}this.extendStart=f,this.extendEnd=d;const p=t.getRaw("Function"),g=n.createFromArray(p),m=(u-l)/840,w=this.colorStops=[];if(l>=u||m<=0)return void(0,i.info)("Bad shading domain.");const b=new Float32Array(c.numComps),y=new Float32Array(1);let A,v=0;y[0]=l,g(y,0,b,0);let x=c.getRgb(b,0);const k=i.Util.makeHexColor(x[0],x[1],x[2]);w.push([0,k]);let S=1;y[0]=l+m,g(y,0,b,0);let M=c.getRgb(b,0),C=M[0]-x[0]+1,_=M[1]-x[1]+1,I=M[2]-x[2]+1,F=M[0]-x[0]-1,O=M[1]-x[1]-1,E=M[2]-x[2]-1;for(let t=2;t<840;t++){y[0]=l+t*m,g(y,0,b,0),A=c.getRgb(b,0);const e=t-v;if(C=Math.min(C,(A[0]-x[0]+1)/e),_=Math.min(_,(A[1]-x[1]+1)/e),I=Math.min(I,(A[2]-x[2]+1)/e),F=Math.max(F,(A[0]-x[0]-1)/e),O=Math.max(O,(A[1]-x[1]-1)/e),E=Math.max(E,(A[2]-x[2]-1)/e),!(F<=C&&O<=_&&E<=I)){const t=i.Util.makeHexColor(M[0],M[1],M[2]);w.push([S/840,t]),C=A[0]-M[0]+1,_=A[1]-M[1]+1,I=A[2]-M[2]+1,F=A[0]-M[0]-1,O=A[1]-M[1]-1,E=A[2]-M[2]-1,v=S,x=M}S=t,M=A}const T=i.Util.makeHexColor(M[0],M[1],M[2]);w.push([1,T]);let D="transparent";t.has("Background")&&(A=c.getRgb(t.get("Background"),0),D=i.Util.makeHexColor(A[0],A[1],A[2])),f||(w.unshift([0,D]),w[1][0]+=a.SMALL_NUMBER),d||(w.at(-1)[0]-=a.SMALL_NUMBER,w.push([1,D])),this.colorStops=w}getIR(){const t=this.coordsArr,e=this.shadingType;let s,n,r,o,a;return 2===e?(n=[t[0],t[1]],r=[t[2],t[3]],o=null,a=null,s="axial"):3===e?(n=[t[0],t[1]],r=[t[3],t[4]],o=t[2],a=t[5],s="radial"):(0,i.unreachable)(`getPattern type unknown: ${e}`),["RadialAxial",s,this.bbox,this.colorStops,n,r,o,a]}}class h{constructor(t,e){this.stream=t,this.context=e,this.buffer=0,this.bufferLength=0,this.tmpCompsBuf=new Float32Array(e.numComps),this.tmpCsCompsBuf=e.colorFn?new Float32Array(e.colorSpace.numComps):this.tmpCompsBuf}get hasData(){if(this.stream.end)return this.stream.pos<this.stream.end;if(this.bufferLength>0)return!0;const t=this.stream.getByte();return!(t<0||(this.buffer=t,this.bufferLength=8,0))}readBits(t){let e=this.buffer,s=this.bufferLength;if(32===t){if(0===s)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;e=e<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();const t=this.stream.getByte();return this.buffer=t&(1<<s)-1,(e<<8-s|(255&t)>>s)>>>0}if(8===t&&0===s)return this.stream.getByte();for(;s<t;)e=e<<8|this.stream.getByte(),s+=8;return s-=t,this.bufferLength=s,this.buffer=e&(1<<s)-1,e>>s}align(){this.buffer=0,this.bufferLength=0}readFlag(){return this.readBits(this.context.bitsPerFlag)}readCoordinate(){const t=this.context.bitsPerCoordinate,e=this.readBits(t),s=this.readBits(t),i=this.context.decode,n=t<32?1/((1<<t)-1):2.3283064365386963e-10;return[e*n*(i[1]-i[0])+i[0],s*n*(i[3]-i[2])+i[2]]}readComponents(){const t=this.context.numComps,e=this.context.bitsPerComponent,s=e<32?1/((1<<e)-1):2.3283064365386963e-10,i=this.context.decode,n=this.tmpCompsBuf;for(let r=0,o=4;r<t;r++,o+=2){const t=this.readBits(e);n[r]=t*s*(i[o+1]-i[o])+i[o]}const r=this.tmpCsCompsBuf;return this.context.colorFn&&this.context.colorFn(n,0,r,0),this.context.colorSpace.getRgb(r,0)}}let l=Object.create(null);function u(t){return l[t]||=function(t){const e=[];for(let s=0;s<=t;s++){const i=s/t,n=1-i;e.push(new Float32Array([n**3,3*i*n**2,3*i**2*n,i**3]))}return e}(t)}class f extends a{static MIN_SPLIT_PATCH_CHUNKS_AMOUNT=3;static MAX_SPLIT_PATCH_CHUNKS_AMOUNT=20;static TRIANGLE_DENSITY=20;constructor(t,e,s,o,a){if(super(),!(t instanceof n.BaseStream))throw new i.FormatError("Mesh data is not a stream");const c=t.dict;this.shadingType=c.get("ShadingType");const l=c.getArray("BBox");this.bbox=Array.isArray(l)&&4===l.length?i.Util.normalizeRect(l):null;const u=r.ColorSpace.parse({cs:c.getRaw("CS")||c.getRaw("ColorSpace"),xref:e,resources:s,pdfFunctionFactory:o,localColorSpaceCache:a});this.background=c.has("Background")?u.getRgb(c.get("Background"),0):null;const f=c.getRaw("Function"),d=f?o.createFromArray(f):null;this.coords=[],this.colors=[],this.figures=[];const p={bitsPerCoordinate:c.get("BitsPerCoordinate"),bitsPerComponent:c.get("BitsPerComponent"),bitsPerFlag:c.get("BitsPerFlag"),decode:c.getArray("Decode"),colorFn:d,colorSpace:u,numComps:d?1:u.numComps},g=new h(t,p);let m=!1;switch(this.shadingType){case 4:this._decodeType4Shading(g);break;case 5:const t=0|c.get("VerticesPerRow");if(t<2)throw new i.FormatError("Invalid VerticesPerRow");this._decodeType5Shading(g,t);break;case 6:this._decodeType6Shading(g),m=!0;break;case 7:this._decodeType7Shading(g),m=!0;break;default:(0,i.unreachable)("Unsupported mesh type.")}if(m){this._updateBounds();for(let t=0,e=this.figures.length;t<e;t++)this._buildFigureFromPatch(t)}this._updateBounds(),this._packData()}_decodeType4Shading(t){const e=this.coords,s=this.colors,n=[];let r=0;for(;t.hasData;){const o=t.readFlag(),a=t.readCoordinate(),c=t.readComponents();if(0===r){if(!(0<=o&&o<=2))throw new i.FormatError("Unknown type4 flag");switch(o){case 0:r=3;break;case 1:n.push(n.at(-2),n.at(-1)),r=1;break;case 2:n.push(n.at(-3),n.at(-1)),r=1}}n.push(e.length),e.push(a),s.push(c),r--,t.align()}this.figures.push({type:"triangles",coords:new Int32Array(n),colors:new Int32Array(n)})}_decodeType5Shading(t,e){const s=this.coords,i=this.colors,n=[];for(;t.hasData;){const e=t.readCoordinate(),r=t.readComponents();n.push(s.length),s.push(e),i.push(r)}this.figures.push({type:"lattice",coords:new Int32Array(n),colors:new Int32Array(n),verticesPerRow:e})}_decodeType6Shading(t){const e=this.coords,s=this.colors,n=new Int32Array(16),r=new Int32Array(4);for(;t.hasData;){const o=t.readFlag();if(!(0<=o&&o<=3))throw new i.FormatError("Unknown type6 flag");const a=e.length;for(let s=0,i=0!==o?8:12;s<i;s++)e.push(t.readCoordinate());const c=s.length;for(let e=0,i=0!==o?2:4;e<i;e++)s.push(t.readComponents());let h,l,u,f;switch(o){case 0:n[12]=a+3,n[13]=a+4,n[14]=a+5,n[15]=a+6,n[8]=a+2,n[11]=a+7,n[4]=a+1,n[7]=a+8,n[0]=a,n[1]=a+11,n[2]=a+10,n[3]=a+9,r[2]=c+1,r[3]=c+2,r[0]=c,r[1]=c+3;break;case 1:h=n[12],l=n[13],u=n[14],f=n[15],n[12]=f,n[13]=a+0,n[14]=a+1,n[15]=a+2,n[8]=u,n[11]=a+3,n[4]=l,n[7]=a+4,n[0]=h,n[1]=a+7,n[2]=a+6,n[3]=a+5,h=r[2],l=r[3],r[2]=l,r[3]=c,r[0]=h,r[1]=c+1;break;case 2:h=n[15],l=n[11],n[12]=n[3],n[13]=a+0,n[14]=a+1,n[15]=a+2,n[8]=n[7],n[11]=a+3,n[4]=l,n[7]=a+4,n[0]=h,n[1]=a+7,n[2]=a+6,n[3]=a+5,h=r[3],r[2]=r[1],r[3]=c,r[0]=h,r[1]=c+1;break;case 3:n[12]=n[0],n[13]=a+0,n[14]=a+1,n[15]=a+2,n[8]=n[1],n[11]=a+3,n[4]=n[2],n[7]=a+4,n[0]=n[3],n[1]=a+7,n[2]=a+6,n[3]=a+5,r[2]=r[0],r[3]=c,r[0]=r[1],r[1]=c+1}n[5]=e.length,e.push([(-4*e[n[0]][0]-e[n[15]][0]+6*(e[n[4]][0]+e[n[1]][0])-2*(e[n[12]][0]+e[n[3]][0])+3*(e[n[13]][0]+e[n[7]][0]))/9,(-4*e[n[0]][1]-e[n[15]][1]+6*(e[n[4]][1]+e[n[1]][1])-2*(e[n[12]][1]+e[n[3]][1])+3*(e[n[13]][1]+e[n[7]][1]))/9]),n[6]=e.length,e.push([(-4*e[n[3]][0]-e[n[12]][0]+6*(e[n[2]][0]+e[n[7]][0])-2*(e[n[0]][0]+e[n[15]][0])+3*(e[n[4]][0]+e[n[14]][0]))/9,(-4*e[n[3]][1]-e[n[12]][1]+6*(e[n[2]][1]+e[n[7]][1])-2*(e[n[0]][1]+e[n[15]][1])+3*(e[n[4]][1]+e[n[14]][1]))/9]),n[9]=e.length,e.push([(-4*e[n[12]][0]-e[n[3]][0]+6*(e[n[8]][0]+e[n[13]][0])-2*(e[n[0]][0]+e[n[15]][0])+3*(e[n[11]][0]+e[n[1]][0]))/9,(-4*e[n[12]][1]-e[n[3]][1]+6*(e[n[8]][1]+e[n[13]][1])-2*(e[n[0]][1]+e[n[15]][1])+3*(e[n[11]][1]+e[n[1]][1]))/9]),n[10]=e.length,e.push([(-4*e[n[15]][0]-e[n[0]][0]+6*(e[n[11]][0]+e[n[14]][0])-2*(e[n[12]][0]+e[n[3]][0])+3*(e[n[2]][0]+e[n[8]][0]))/9,(-4*e[n[15]][1]-e[n[0]][1]+6*(e[n[11]][1]+e[n[14]][1])-2*(e[n[12]][1]+e[n[3]][1])+3*(e[n[2]][1]+e[n[8]][1]))/9]),this.figures.push({type:"patch",coords:new Int32Array(n),colors:new Int32Array(r)})}}_decodeType7Shading(t){const e=this.coords,s=this.colors,n=new Int32Array(16),r=new Int32Array(4);for(;t.hasData;){const o=t.readFlag();if(!(0<=o&&o<=3))throw new i.FormatError("Unknown type7 flag");const a=e.length;for(let s=0,i=0!==o?12:16;s<i;s++)e.push(t.readCoordinate());const c=s.length;for(let e=0,i=0!==o?2:4;e<i;e++)s.push(t.readComponents());let h,l,u,f;switch(o){case 0:n[12]=a+3,n[13]=a+4,n[14]=a+5,n[15]=a+6,n[8]=a+2,n[9]=a+13,n[10]=a+14,n[11]=a+7,n[4]=a+1,n[5]=a+12,n[6]=a+15,n[7]=a+8,n[0]=a,n[1]=a+11,n[2]=a+10,n[3]=a+9,r[2]=c+1,r[3]=c+2,r[0]=c,r[1]=c+3;break;case 1:h=n[12],l=n[13],u=n[14],f=n[15],n[12]=f,n[13]=a+0,n[14]=a+1,n[15]=a+2,n[8]=u,n[9]=a+9,n[10]=a+10,n[11]=a+3,n[4]=l,n[5]=a+8,n[6]=a+11,n[7]=a+4,n[0]=h,n[1]=a+7,n[2]=a+6,n[3]=a+5,h=r[2],l=r[3],r[2]=l,r[3]=c,r[0]=h,r[1]=c+1;break;case 2:h=n[15],l=n[11],n[12]=n[3],n[13]=a+0,n[14]=a+1,n[15]=a+2,n[8]=n[7],n[9]=a+9,n[10]=a+10,n[11]=a+3,n[4]=l,n[5]=a+8,n[6]=a+11,n[7]=a+4,n[0]=h,n[1]=a+7,n[2]=a+6,n[3]=a+5,h=r[3],r[2]=r[1],r[3]=c,r[0]=h,r[1]=c+1;break;case 3:n[12]=n[0],n[13]=a+0,n[14]=a+1,n[15]=a+2,n[8]=n[1],n[9]=a+9,n[10]=a+10,n[11]=a+3,n[4]=n[2],n[5]=a+8,n[6]=a+11,n[7]=a+4,n[0]=n[3],n[1]=a+7,n[2]=a+6,n[3]=a+5,r[2]=r[0],r[3]=c,r[0]=r[1],r[1]=c+1}this.figures.push({type:"patch",coords:new Int32Array(n),colors:new Int32Array(r)})}}_buildFigureFromPatch(t){const e=this.figures[t];(0,i.assert)("patch"===e.type,"Unexpected patch mesh figure");const s=this.coords,n=this.colors,r=e.coords,o=e.colors,a=Math.min(s[r[0]][0],s[r[3]][0],s[r[12]][0],s[r[15]][0]),c=Math.min(s[r[0]][1],s[r[3]][1],s[r[12]][1],s[r[15]][1]),h=Math.max(s[r[0]][0],s[r[3]][0],s[r[12]][0],s[r[15]][0]),l=Math.max(s[r[0]][1],s[r[3]][1],s[r[12]][1],s[r[15]][1]);let d=Math.ceil((h-a)*f.TRIANGLE_DENSITY/(this.bounds[2]-this.bounds[0]));d=Math.max(f.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,Math.min(f.MAX_SPLIT_PATCH_CHUNKS_AMOUNT,d));let p=Math.ceil((l-c)*f.TRIANGLE_DENSITY/(this.bounds[3]-this.bounds[1]));p=Math.max(f.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,Math.min(f.MAX_SPLIT_PATCH_CHUNKS_AMOUNT,p));const g=d+1,m=new Int32Array((p+1)*g),w=new Int32Array((p+1)*g);let b=0;const y=new Uint8Array(3),A=new Uint8Array(3),v=n[o[0]],x=n[o[1]],k=n[o[2]],S=n[o[3]],M=u(p),C=u(d);for(let t=0;t<=p;t++){y[0]=(v[0]*(p-t)+k[0]*t)/p|0,y[1]=(v[1]*(p-t)+k[1]*t)/p|0,y[2]=(v[2]*(p-t)+k[2]*t)/p|0,A[0]=(x[0]*(p-t)+S[0]*t)/p|0,A[1]=(x[1]*(p-t)+S[1]*t)/p|0,A[2]=(x[2]*(p-t)+S[2]*t)/p|0;for(let e=0;e<=d;e++,b++){if(!(0!==t&&t!==p||0!==e&&e!==d))continue;let i=0,o=0,a=0;for(let n=0;n<=3;n++)for(let c=0;c<=3;c++,a++){const h=M[t][n]*C[e][c];i+=s[r[a]][0]*h,o+=s[r[a]][1]*h}m[b]=s.length,s.push([i,o]),w[b]=n.length;const c=new Uint8Array(3);c[0]=(y[0]*(d-e)+A[0]*e)/d|0,c[1]=(y[1]*(d-e)+A[1]*e)/d|0,c[2]=(y[2]*(d-e)+A[2]*e)/d|0,n.push(c)}}m[0]=r[0],w[0]=o[0],m[d]=r[3],w[d]=o[1],m[g*p]=r[12],w[g*p]=o[2],m[g*p+d]=r[15],w[g*p+d]=o[3],this.figures[t]={type:"lattice",coords:m,colors:w,verticesPerRow:g}}_updateBounds(){let t=this.coords[0][0],e=this.coords[0][1],s=t,i=e;for(let n=1,r=this.coords.length;n<r;n++){const r=this.coords[n][0],o=this.coords[n][1];t=t>r?r:t,e=e>o?o:e,s=s<r?r:s,i=i<o?o:i}this.bounds=[t,e,s,i]}_packData(){let t,e,s,i;const n=this.coords,r=new Float32Array(2*n.length);for(t=0,s=0,e=n.length;t<e;t++){const e=n[t];r[s++]=e[0],r[s++]=e[1]}this.coords=r;const o=this.colors,a=new Uint8Array(3*o.length);for(t=0,s=0,e=o.length;t<e;t++){const e=o[t];a[s++]=e[0],a[s++]=e[1],a[s++]=e[2]}this.colors=a;const c=this.figures;for(t=0,e=c.length;t<e;t++){const e=c[t],n=e.coords,r=e.colors;for(s=0,i=n.length;s<i;s++)n[s]*=2,r[s]*=3}}getIR(){return["Mesh",this.shadingType,this.coords,this.colors,this.figures,this.bounds,this.bbox,this.background]}}class d extends a{getIR(){return["Dummy"]}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getXfaFontDict=function(t){const e=function(t){const e=f(t);if(!e)return null;const{baseWidths:s,baseMapping:i,factors:n}=e,r=n?s.map(((t,e)=>t*n[e])):s;let o,a=-2;const c=[];for(const[t,e]of i.map(((t,e)=>[t,e])).sort((([t],[e])=>t-e)))-1!==t&&(t===a+1?(o.push(r[e]),a+=1):(a=t,o=[r[e]],c.push(t,o)));return c}(t),s=new n.Dict(null);s.set("BaseFont",n.Name.get(t)),s.set("Type",n.Name.get("Font")),s.set("Subtype",n.Name.get("CIDFontType2")),s.set("Encoding",n.Name.get("Identity-H")),s.set("CIDToGIDMap",n.Name.get("Identity")),s.set("W",e),s.set("FirstChar",e[0]),s.set("LastChar",e.at(-2)+e.at(-1).length-1);const i=new n.Dict(null);s.set("FontDescriptor",i);const r=new n.Dict(null);return r.set("Ordering","Identity"),r.set("Registry","Adobe"),r.set("Supplement",0),s.set("CIDSystemInfo",r),s},e.getXfaFontName=f;var i=s(52),n=s(4),r=s(53),o=s(54),a=s(55),c=s(56),h=s(3),l=s(38);const u=(0,h.getLookupTableFactory)((function(t){t["MyriadPro-Regular"]=t["PdfJS-Fallback-Regular"]={name:"LiberationSans-Regular",factors:a.MyriadProRegularFactors,baseWidths:o.LiberationSansRegularWidths,baseMapping:o.LiberationSansRegularMapping,metrics:a.MyriadProRegularMetrics},t["MyriadPro-Bold"]=t["PdfJS-Fallback-Bold"]={name:"LiberationSans-Bold",factors:a.MyriadProBoldFactors,baseWidths:o.LiberationSansBoldWidths,baseMapping:o.LiberationSansBoldMapping,metrics:a.MyriadProBoldMetrics},t["MyriadPro-It"]=t["MyriadPro-Italic"]=t["PdfJS-Fallback-Italic"]={name:"LiberationSans-Italic",factors:a.MyriadProItalicFactors,baseWidths:o.LiberationSansItalicWidths,baseMapping:o.LiberationSansItalicMapping,metrics:a.MyriadProItalicMetrics},t["MyriadPro-BoldIt"]=t["MyriadPro-BoldItalic"]=t["PdfJS-Fallback-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:a.MyriadProBoldItalicFactors,baseWidths:o.LiberationSansBoldItalicWidths,baseMapping:o.LiberationSansBoldItalicMapping,metrics:a.MyriadProBoldItalicMetrics},t.ArialMT=t.Arial=t["Arial-Regular"]={name:"LiberationSans-Regular",baseWidths:o.LiberationSansRegularWidths,baseMapping:o.LiberationSansRegularMapping},t["Arial-BoldMT"]=t["Arial-Bold"]={name:"LiberationSans-Bold",baseWidths:o.LiberationSansBoldWidths,baseMapping:o.LiberationSansBoldMapping},t["Arial-ItalicMT"]=t["Arial-Italic"]={name:"LiberationSans-Italic",baseWidths:o.LiberationSansItalicWidths,baseMapping:o.LiberationSansItalicMapping},t["Arial-BoldItalicMT"]=t["Arial-BoldItalic"]={name:"LiberationSans-BoldItalic",baseWidths:o.LiberationSansBoldItalicWidths,baseMapping:o.LiberationSansBoldItalicMapping},t["Calibri-Regular"]={name:"LiberationSans-Regular",factors:i.CalibriRegularFactors,baseWidths:o.LiberationSansRegularWidths,baseMapping:o.LiberationSansRegularMapping,metrics:i.CalibriRegularMetrics},t["Calibri-Bold"]={name:"LiberationSans-Bold",factors:i.CalibriBoldFactors,baseWidths:o.LiberationSansBoldWidths,baseMapping:o.LiberationSansBoldMapping,metrics:i.CalibriBoldMetrics},t["Calibri-Italic"]={name:"LiberationSans-Italic",factors:i.CalibriItalicFactors,baseWidths:o.LiberationSansItalicWidths,baseMapping:o.LiberationSansItalicMapping,metrics:i.CalibriItalicMetrics},t["Calibri-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:i.CalibriBoldItalicFactors,baseWidths:o.LiberationSansBoldItalicWidths,baseMapping:o.LiberationSansBoldItalicMapping,metrics:i.CalibriBoldItalicMetrics},t["Segoeui-Regular"]={name:"LiberationSans-Regular",factors:c.SegoeuiRegularFactors,baseWidths:o.LiberationSansRegularWidths,baseMapping:o.LiberationSansRegularMapping,metrics:c.SegoeuiRegularMetrics},t["Segoeui-Bold"]={name:"LiberationSans-Bold",factors:c.SegoeuiBoldFactors,baseWidths:o.LiberationSansBoldWidths,baseMapping:o.LiberationSansBoldMapping,metrics:c.SegoeuiBoldMetrics},t["Segoeui-Italic"]={name:"LiberationSans-Italic",factors:c.SegoeuiItalicFactors,baseWidths:o.LiberationSansItalicWidths,baseMapping:o.LiberationSansItalicMapping,metrics:c.SegoeuiItalicMetrics},t["Segoeui-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:c.SegoeuiBoldItalicFactors,baseWidths:o.LiberationSansBoldItalicWidths,baseMapping:o.LiberationSansBoldItalicMapping,metrics:c.SegoeuiBoldItalicMetrics},t["Helvetica-Regular"]=t.Helvetica={name:"LiberationSans-Regular",factors:r.HelveticaRegularFactors,baseWidths:o.LiberationSansRegularWidths,baseMapping:o.LiberationSansRegularMapping,metrics:r.HelveticaRegularMetrics},t["Helvetica-Bold"]={name:"LiberationSans-Bold",factors:r.HelveticaBoldFactors,baseWidths:o.LiberationSansBoldWidths,baseMapping:o.LiberationSansBoldMapping,metrics:r.HelveticaBoldMetrics},t["Helvetica-Italic"]={name:"LiberationSans-Italic",factors:r.HelveticaItalicFactors,baseWidths:o.LiberationSansItalicWidths,baseMapping:o.LiberationSansItalicMapping,metrics:r.HelveticaItalicMetrics},t["Helvetica-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:r.HelveticaBoldItalicFactors,baseWidths:o.LiberationSansBoldItalicWidths,baseMapping:o.LiberationSansBoldItalicMapping,metrics:r.HelveticaBoldItalicMetrics}}));function f(t){const e=(0,l.normalizeFontName)(t);return u()[e]}},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CalibriRegularMetrics=e.CalibriRegularFactors=e.CalibriItalicMetrics=e.CalibriItalicFactors=e.CalibriBoldMetrics=e.CalibriBoldItalicMetrics=e.CalibriBoldItalicFactors=e.CalibriBoldFactors=void 0,e.CalibriBoldFactors=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.54657,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.73293,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.9121,.86943,.79795,.88198,.77958,.70864,.81055,.90399,.88653,.96017,.82577,.77892,.78257,.97507,1.54657,.97507,.85284,.89552,.90176,.88762,.8785,.75241,.8785,.90518,.95015,.77618,.8785,.88401,.91916,.86304,.88401,.91488,.8785,.8801,.8785,.8785,.91343,.7173,1.04106,.8785,.85075,.95794,.82616,.85162,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.12401,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.73293,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.9121,.86943,.86943,.86943,.86943,.86943,.85284,.87508,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.88762,.88762,.88762,.88762,.88762,.88762,.8715,.75241,.90518,.90518,.90518,.90518,.88401,.88401,.88401,.88401,.8785,.8785,.8801,.8801,.8801,.8801,.8801,.90747,.89049,.8785,.8785,.8785,.8785,.85162,.8785,.85162,.83908,.88762,.83908,.88762,.83908,.88762,.73293,.75241,.73293,.75241,.73293,.75241,.73293,.75241,.87289,.83016,.88506,.93125,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.81921,.77618,.81921,.77618,.81921,.77618,1,1,.87356,.8785,.91075,.89608,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76229,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.79468,.91926,.88175,.70823,.94903,.9121,.8785,1,1,.9121,.8785,.87802,.88656,.8785,.86943,.8801,.86943,.8801,.86943,.8801,.87402,.89291,.77958,.91343,1,1,.77958,.91343,.70864,.7173,.70864,.7173,.70864,.7173,.70864,.7173,1,1,.81055,.75841,.81055,1.06452,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.96017,.95794,.77892,.85162,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.88762,.77539,.8715,.87508,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70674,.98387,.94721,1.33431,1.45894,.95161,1.06303,.83908,.80352,.57184,.6965,.56289,.82001,.56029,.81235,1.02988,.83908,.7762,.68156,.80367,.73133,.78257,.87356,.86943,.95958,.75727,.89019,1.04924,.9121,.7648,.86943,.87356,.79795,.78275,.81055,.77892,.9762,.82577,.99819,.84896,.95958,.77892,.96108,1.01407,.89049,1.02988,.94211,.96108,.8936,.84021,.87842,.96399,.79109,.89049,1.00813,1.02988,.86077,.87445,.92099,.84723,.86513,.8801,.75638,.85714,.78216,.79586,.87965,.94211,.97747,.78287,.97926,.84971,1.02988,.94211,.8801,.94211,.84971,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.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,.90518,1,1,1,1,1,1,1,1,1,1,1,1,.90548,1,1,1,1,1,1,.96017,.95794,.96017,.95794,.96017,.95794,.77892,.85162,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.92794,.87012,.87012,.87012,.89552,.89552,1.42259,.71143,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.93835,.83406,.91133,.84107,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90527,1.81055,.90527,1.81055,1.31006,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.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,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],e.CalibriBoldMetrics={lineHeight:1.2207,lineGap:.2207},e.CalibriBoldItalicFactors=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.56239,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.71805,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.90872,.85938,.79795,.87068,.77958,.69766,.81055,.90399,.88653,.96068,.82577,.77892,.78257,.97507,1.529,.97507,.85284,.89552,.90176,.94908,.86411,.74012,.86411,.88323,.95015,.86411,.86331,.88401,.91916,.86304,.88401,.9039,.86331,.86331,.86411,.86411,.90464,.70852,1.04106,.86331,.84372,.95794,.82616,.84548,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.19129,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.71805,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.90872,.85938,.85938,.85938,.85938,.85938,.85284,.87068,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.94908,.94908,.94908,.94908,.94908,.94908,.85887,.74012,.88323,.88323,.88323,.88323,.88401,.88401,.88401,.88401,.8785,.86331,.86331,.86331,.86331,.86331,.86331,.90747,.89049,.86331,.86331,.86331,.86331,.84548,.86411,.84548,.83908,.94908,.83908,.94908,.83908,.94908,.71805,.74012,.71805,.74012,.71805,.74012,.71805,.74012,.87289,.79538,.88506,.92726,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.81921,.86411,.81921,.86411,.81921,.86411,1,1,.87356,.86331,.91075,.8777,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76467,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.77312,.91926,.88175,.70823,.94903,.90872,.86331,1,1,.90872,.86331,.86906,.88116,.86331,.85938,.86331,.85938,.86331,.85938,.86331,.87402,.86549,.77958,.90464,1,1,.77958,.90464,.69766,.70852,.69766,.70852,.69766,.70852,.69766,.70852,1,1,.81055,.75841,.81055,1.06452,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.96068,.95794,.77892,.84548,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.94908,.77539,.85887,.87068,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70088,.98387,.94721,1.33431,1.45894,.95161,1.48387,.83908,.80352,.57118,.6965,.56347,.79179,.55853,.80346,1.02988,.83908,.7762,.67174,.86036,.73133,.78257,.87356,.86441,.95958,.75727,.89019,1.04924,.90872,.74889,.85938,.87891,.79795,.7957,.81055,.77892,.97447,.82577,.97466,.87179,.95958,.77892,.94252,.95612,.8753,1.02988,.92733,.94252,.87411,.84021,.8728,.95612,.74081,.8753,1.02189,1.02988,.84814,.87445,.91822,.84723,.85668,.86331,.81344,.87581,.76422,.82046,.96057,.92733,.99375,.78022,.95452,.86015,1.02988,.92733,.86331,.92733,.86015,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.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,.88323,1,1,1,1,1,1,1,1,1,1,1,1,.85174,1,1,1,1,1,1,.96068,.95794,.96068,.95794,.96068,.95794,.77892,.84548,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.89807,.87012,.87012,.87012,.89552,.89552,1.42259,.71094,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.92972,.83406,.91133,.83326,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90616,1.81055,.90527,1.81055,1.3107,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.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,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],e.CalibriBoldItalicMetrics={lineHeight:1.2207,lineGap:.2207},e.CalibriItalicFactors=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39543,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.72346,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89249,.84118,.77452,.85374,.75186,.67789,.79776,.88844,.85066,.94309,.77818,.7306,.76659,1.10369,1.38313,1.10369,1.06139,.89552,.8739,.9245,.9245,.83203,.9245,.85865,1.09842,.9245,.9245,1.03297,1.07692,.90918,1.03297,.94959,.9245,.92274,.9245,.9245,1.02933,.77832,1.20562,.9245,.8916,.98986,.86621,.89453,.79004,.94152,1.77256,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.16359,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.8675,.8675,.76318,.72346,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89249,.84118,.84118,.84118,.84118,.84118,.85284,.84557,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.9245,.9245,.9245,.9245,.9245,.9245,.84843,.83203,.85865,.85865,.85865,.85865,.82601,.82601,.82601,.82601,.94469,.9245,.92274,.92274,.92274,.92274,.92274,.90747,.86651,.9245,.9245,.9245,.9245,.89453,.9245,.89453,.8675,.9245,.8675,.9245,.8675,.9245,.72346,.83203,.72346,.83203,.72346,.83203,.72346,.83203,.85193,.8875,.86477,.99034,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.81105,.9245,.81105,.9245,.81105,.9245,1,1,.86275,.9245,.90872,.93591,.90685,.82601,.90685,.82601,.90685,.82601,.90685,1.03297,.90685,.82601,.77896,1.05611,.6377,1.07692,1,1,.90918,.75593,1.03297,1,1,.76032,.9375,.98156,.93407,.77261,1.11429,.89249,.9245,1,1,.89249,.9245,.92534,.86698,.9245,.84118,.92274,.84118,.92274,.84118,.92274,.8667,.86291,.75186,1.02933,1,1,.75186,1.02933,.67789,.77832,.67789,.77832,.67789,.77832,.67789,.77832,1,1,.79776,.97655,.79776,1.23023,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.94309,.98986,.7306,.89453,.7306,.76659,.79004,.76659,.79004,.76659,.79004,1.09231,.54873,.8675,.9245,.76318,.84843,.84557,.86651,1,1,.79776,1.20562,1.18622,1.18622,1,1.1437,.67009,.96334,.93695,1.35191,1.40909,.95161,1.48387,.8675,.90861,.6192,.7363,.64824,.82411,.56321,.85696,1.23516,.8675,.81552,.7286,.84134,.73206,.76659,.86275,.84369,.90685,.77892,.85871,1.02638,.89249,.75828,.84118,.85984,.77452,.76466,.79776,.7306,.90782,.77818,.903,.87291,.90685,.7306,.99058,1.03667,.94635,1.23516,.9849,.99058,.92393,.8916,.942,1.03667,.75026,.94635,1.0297,1.23516,.90918,.94048,.98217,.89746,.84153,.92274,.82507,.88832,.84438,.88178,1.03525,.9849,1.00225,.78086,.97248,.89404,1.23516,.9849,.92274,.9849,.89404,.73206,1,1,1,1,1,1,1,1,1,1,1,1,.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,.85865,1,1,1,1,1,1,1,1,1,1,1,1,.90933,1,1,1,1,1,1,.94309,.98986,.94309,.98986,.94309,.98986,.7306,.89453,1,1,.89552,.90527,1,.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,.89552,.89552,1.42259,.68994,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,.97858,.82616,.91133,.83437,.91133,1,1,1,.70508,1,1.23108,.79801,.84426,.84426,.774,.90572,1.81055,.90749,1.81055,1.28809,1.55469,.94434,1.07806,1,.97094,.7589,.85284,.90747,1.19658,.69825,.97622,1.33512,.90747,.90747,.85284,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.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,.99862,.99862,1,1,1,1,1,1.0336,.91027,1,1,1,.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],e.CalibriItalicMetrics={lineHeight:1.2207,lineGap:.2207},e.CalibriRegularFactors=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39016,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.73834,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89385,.85122,.77452,.86503,.75186,.68887,.79776,.88844,.85066,.94258,.77818,.7306,.76659,1.10369,1.39016,1.10369,1.06139,.89552,.8739,.86128,.94469,.8457,.94469,.89464,1.09842,.84636,.94469,1.03297,1.07692,.90918,1.03297,.95897,.94469,.9482,.94469,.94469,1.04692,.78223,1.20562,.94469,.90332,.98986,.86621,.90527,.79004,.94152,1.77256,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.08707,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.8675,.8675,.76318,.73834,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89385,.85122,.85122,.85122,.85122,.85122,.85284,.85311,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.86128,.86128,.86128,.86128,.86128,.86128,.8693,.8457,.89464,.89464,.89464,.89464,.82601,.82601,.82601,.82601,.94469,.94469,.9482,.9482,.9482,.9482,.9482,.90747,.86651,.94469,.94469,.94469,.94469,.90527,.94469,.90527,.8675,.86128,.8675,.86128,.8675,.86128,.73834,.8457,.73834,.8457,.73834,.8457,.73834,.8457,.85193,.92454,.86477,.9921,.73206,.89464,.73206,.89464,.73206,.89464,.73206,.89464,.73206,.89464,.81105,.84636,.81105,.84636,.81105,.84636,1,1,.86275,.94469,.90872,.95786,.90685,.82601,.90685,.82601,.90685,.82601,.90685,1.03297,.90685,.82601,.77741,1.05611,.6377,1.07692,1,1,.90918,.75593,1.03297,1,1,.76032,.90452,.98156,1.11842,.77261,1.11429,.89385,.94469,1,1,.89385,.94469,.95877,.86901,.94469,.85122,.9482,.85122,.9482,.85122,.9482,.8667,.90016,.75186,1.04692,1,1,.75186,1.04692,.68887,.78223,.68887,.78223,.68887,.78223,.68887,.78223,1,1,.79776,.92188,.79776,1.23023,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.94258,.98986,.7306,.90527,.7306,.76659,.79004,.76659,.79004,.76659,.79004,1.09231,.54873,.8675,.86128,.76318,.8693,.85311,.86651,1,1,.79776,1.20562,1.18622,1.18622,1,1.1437,.67742,.96334,.93695,1.35191,1.40909,.95161,1.48387,.86686,.90861,.62267,.74359,.65649,.85498,.56963,.88254,1.23516,.8675,.81552,.75443,.84503,.73206,.76659,.86275,.85122,.90685,.77892,.85746,1.02638,.89385,.75657,.85122,.86275,.77452,.74171,.79776,.7306,.95165,.77818,.89772,.88831,.90685,.7306,.98142,1.02191,.96576,1.23516,.99018,.98142,.9236,.89258,.94035,1.02191,.78848,.96576,.9561,1.23516,.90918,.92578,.95424,.89746,.83969,.9482,.80113,.89442,.85208,.86155,.98022,.99018,1.00452,.81209,.99247,.89181,1.23516,.99018,.9482,.99018,.89181,.73206,1,1,1,1,1,1,1,1,1,1,1,1,.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,.89464,1,1,1,1,1,1,1,1,1,1,1,1,.96766,1,1,1,1,1,1,.94258,.98986,.94258,.98986,.94258,.98986,.7306,.90527,1,1,.89552,.90527,1,.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,.89552,.89552,1.42259,.69043,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,.99331,.82616,.91133,.84286,.91133,1,1,1,.70508,1,1.23108,.79801,.84426,.84426,.774,.90527,1.81055,.90527,1.81055,1.28809,1.55469,.94434,1.07806,1,.97094,.7589,.85284,.90747,1.19658,.69825,.97622,1.33512,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.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,.99862,.99862,1,1,1,1,1,1.0336,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1.07185,.99413,.96334,1.08065,1,1,1,1,1,1,1,1,1,1,1],e.CalibriRegularMetrics={lineHeight:1.2207,lineGap:.2207}},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.HelveticaRegularMetrics=e.HelveticaRegularFactors=e.HelveticaItalicMetrics=e.HelveticaItalicFactors=e.HelveticaBoldMetrics=e.HelveticaBoldItalicMetrics=e.HelveticaBoldItalicFactors=e.HelveticaBoldFactors=void 0,e.HelveticaBoldFactors=[.76116,1,1,1.0006,.99998,.99974,.99973,.99973,.99982,.99977,1.00087,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99998,1,1.00003,1.00003,1.00003,1.00026,.9999,.99977,.99977,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,.99973,.99977,1.00026,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,.99998,1.0006,.99998,1.00003,.99973,.99998,.99973,1.00026,.99973,1.00026,.99973,.99998,1.00026,1.00026,1.0006,1.0006,.99973,1.0006,.99982,1.00026,1.00026,1.00026,1.00026,.99959,.99973,.99998,1.00026,.99973,1.00022,.99973,.99973,1,.99959,1.00077,.99959,1.00003,.99998,.99973,.99973,.99973,.99973,1.00077,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.99973,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,.99977,.99977,.99977,.99977,.99977,.99977,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,.99973,.99973,.99973,.99973,.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,.99973,1.00026,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,1.03374,.99977,1.00026,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,.99977,1.00026,.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,.99973,.99973,1.0006,.99977,.99973,.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.03828,1.00026,.99999,1.00026,1.0006,.99977,1.00026,.99977,1.00026,.99977,1.00026,.9993,.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,.99977,.99959,.99977,.99959,.99977,.99959,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00026,.99998,1.00026,.8121,1.00026,.99998,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,1.00016,1.00022,1.00001,.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,.99973,.99977,.99973,1,.99982,1.00022,1.00026,1.00001,.99973,1.00026,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,1.00034,.99977,1,.99997,1.00026,1.00078,1.00036,.99973,1.00013,1.0006,.99977,.99977,.99988,.85148,1.00001,1.00026,.99977,1.00022,1.0006,.99977,1.00001,.99999,.99977,1.00069,1.00022,.99977,1.00001,.99984,1.00026,1.00001,1.00024,1.00001,.9999,1,1.0006,1.00001,1.00041,.99962,1.00026,1.0006,.99995,1.00041,.99942,.99973,.99927,1.00082,.99902,1.00026,1.00087,1.0006,1.00069,.99973,.99867,.99973,.9993,1.00026,1.00049,1.00056,1,.99988,.99935,.99995,.99954,1.00055,.99945,1.00032,1.0006,.99995,1.00026,.99995,1.00032,1.00001,1.00008,.99971,1.00019,.9994,1.00001,1.0006,1.00044,.99973,1.00023,1.00047,1,.99942,.99561,.99989,1.00035,.99977,1.00035,.99977,1.00019,.99944,1.00001,1.00021,.99926,1.00035,1.00035,.99942,1.00048,.99999,.99977,1.00022,1.00035,1.00001,.99977,1.00026,.99989,1.00057,1.00001,.99936,1.00052,1.00012,.99996,1.00043,1,1.00035,.9994,.99976,1.00035,.99973,1.00052,1.00041,1.00119,1.00037,.99973,1.00002,.99986,1.00041,1.00041,.99902,.9996,1.00034,.99999,1.00026,.99999,1.00026,.99973,1.00052,.99973,1,.99973,1.00041,1.00075,.9994,1.0003,.99999,1,1.00041,.99955,1,.99915,.99973,.99973,1.00026,1.00119,.99955,.99973,1.0006,.99911,1.0006,1.00026,.99972,1.00026,.99902,1.00041,.99973,.99999,1,1,1.00038,1.0005,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,.99973,1,1,.99973,1,1,.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,.99973,.99973,.99972,1,1,1.00106,.99999,.99998,.99998,.99999,.99998,1.66475,1,.99973,.99973,1.00023,.99973,.99971,1.00047,1.00023,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,.99561,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.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,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.99972,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],e.HelveticaBoldMetrics={lineHeight:1.2,lineGap:.2},e.HelveticaBoldItalicFactors=[.76116,1,1,1.0006,.99998,.99974,.99973,.99973,.99982,.99977,1.00087,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99998,1,1.00003,1.00003,1.00003,1.00026,.9999,.99977,.99977,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,.99973,.99977,1.00026,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,.99998,1.0006,.99998,1.00003,.99973,.99998,.99973,1.00026,.99973,1.00026,.99973,.99998,1.00026,1.00026,1.0006,1.0006,.99973,1.0006,.99982,1.00026,1.00026,1.00026,1.00026,.99959,.99973,.99998,1.00026,.99973,1.00022,.99973,.99973,1,.99959,1.00077,.99959,1.00003,.99998,.99973,.99973,.99973,.99973,1.00077,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.99973,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,.99977,.99977,.99977,.99977,.99977,.99977,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,.99973,.99973,.99973,.99973,.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,.99973,1.00026,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,1.0044,.99977,1.00026,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,.99977,1.00026,.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99971,.99973,.99973,1.0006,.99977,.99973,.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.01011,1.00026,.99999,1.00026,1.0006,.99977,1.00026,.99977,1.00026,.99977,1.00026,.9993,.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,.99977,.99959,.99977,.99959,.99977,.99959,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00026,.99998,1.00026,.8121,1.00026,.99998,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,1.00016,1.00022,1.00001,.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,.99973,.99977,.99973,1,.99982,1.00022,1.00026,1.00001,.99973,1.00026,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99977,1,1,1.00026,.99969,.99972,.99981,.9998,1.0006,.99977,.99977,1.00022,.91155,1.00001,1.00026,.99977,1.00022,1.0006,.99977,1.00001,.99999,.99977,.99966,1.00022,1.00032,1.00001,.99944,1.00026,1.00001,.99968,1.00001,1.00047,1,1.0006,1.00001,.99981,1.00101,1.00026,1.0006,.99948,.99981,1.00064,.99973,.99942,1.00101,1.00061,1.00026,1.00069,1.0006,1.00014,.99973,1.01322,.99973,1.00065,1.00026,1.00012,.99923,1,1.00064,1.00076,.99948,1.00055,1.00063,1.00007,.99943,1.0006,.99948,1.00026,.99948,.99943,1.00001,1.00001,1.00029,1.00038,1.00035,1.00001,1.0006,1.0006,.99973,.99978,1.00001,1.00057,.99989,.99967,.99964,.99967,.99977,.99999,.99977,1.00038,.99977,1.00001,.99973,1.00066,.99967,.99967,1.00041,.99998,.99999,.99977,1.00022,.99967,1.00001,.99977,1.00026,.99964,1.00031,1.00001,.99999,.99999,1,1.00023,1,1,.99999,1.00035,1.00001,.99999,.99973,.99977,.99999,1.00058,.99973,.99973,.99955,.9995,1.00026,1.00026,1.00032,.99989,1.00034,.99999,1.00026,1.00026,1.00026,.99973,.45998,.99973,1.00026,.99973,1.00001,.99999,.99982,.99994,.99996,1,1.00042,1.00044,1.00029,1.00023,.99973,.99973,1.00026,.99949,1.00002,.99973,1.0006,1.0006,1.0006,.99975,1.00026,1.00026,1.00032,.98685,.99973,1.00026,1,1,.99966,1.00044,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,.99973,1,1,.99973,1,1,.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,.99973,.99973,.99972,1,1,1.00106,.99999,.99998,.99998,.99999,.99998,1.66475,1,.99973,.99973,1,.99973,.99971,.99978,1,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1.00098,1,1,1,1.00049,1,1,.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,.99561,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.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,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.99972,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],e.HelveticaBoldItalicMetrics={lineHeight:1.35,lineGap:.2},e.HelveticaItalicFactors=[.76116,1,1,1.0006,1.0006,1.00006,.99973,.99973,.99982,1.00001,1.00043,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.0006,1,1.00003,1.00003,1.00003,.99973,.99987,1.00001,1.00001,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,1,1.00001,.99973,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,.99949,.99973,.99998,.99973,.99973,1,.99973,.99973,1.0006,.99973,.99973,.99924,.99924,1,.99924,.99999,.99973,.99973,.99973,.99973,.99998,1,1.0006,.99973,1,.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,.99998,.99973,.99973,.99973,.99973,1.0009,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.9998,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,1,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.06409,1.00026,.99973,.99973,.99973,.99973,1,.99973,1,1.00001,.99973,1.00001,.99973,1.00001,.99973,.99977,1,.99977,1,.99977,1,.99977,1,.99977,1.0288,.99977,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,.99977,.99973,.99977,.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99924,1.0006,1.0006,.99946,1.00034,1,.99924,1.00001,1,1,.99973,.99924,.99973,.99924,.99973,1.06311,.99973,1.00024,.99973,.99924,.99977,.99973,.99977,.99973,.99977,.99973,1.00041,.9998,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1,1.00016,.99977,.99998,.99977,.99998,.99977,.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,.89547,1.00026,1.0006,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,1.00016,.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,.99924,.99973,1.00001,.99973,1,.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,1.00001,1,1.00054,.99977,1.00084,1.00007,.99973,1.00013,.99924,1.00001,1.00001,.99945,.91221,1.00001,1.00026,.99977,1.00022,1.0006,1.00001,1.00001,.99999,.99977,.99933,1.00022,1.00054,1.00001,1.00065,1.00026,1.00001,1.0001,1.00001,1.00052,1,1.0006,1.00001,.99945,.99897,.99968,.99924,1.00036,.99945,.99949,1,1.0006,.99897,.99918,.99968,.99911,.99924,1,.99962,1.01487,1,1.0005,.99973,1.00012,1.00043,1,.99995,.99994,1.00036,.99947,1.00019,1.00063,1.00025,.99924,1.00036,.99973,1.00036,1.00025,1.00001,1.00001,1.00027,1.0001,1.00068,1.00001,1.0006,1.0006,1,1.00008,.99957,.99972,.9994,.99954,.99975,1.00051,1.00001,1.00019,1.00001,1.0001,.99986,1.00001,1.00001,1.00038,.99954,.99954,.9994,1.00066,.99999,.99977,1.00022,1.00054,1.00001,.99977,1.00026,.99975,1.0001,1.00001,.99993,.9995,.99955,1.00016,.99978,.99974,1.00019,1.00022,.99955,1.00053,.99973,1.00089,1.00005,.99967,1.00048,.99973,1.00002,1.00034,.99973,.99973,.99964,1.00006,1.00066,.99947,.99973,.98894,.99973,1,.44898,1,.99946,1,1.00039,1.00082,.99991,.99991,.99985,1.00022,1.00023,1.00061,1.00006,.99966,.99973,.99973,.99973,1.00019,1.0008,1,.99924,.99924,.99924,.99983,1.00044,.99973,.99964,.98332,1,.99973,1,1,.99962,.99895,1.00016,.99977,1.00016,.99977,1.00016,.99977,1.00001,1,1,1,.99973,1,1,.99955,.99924,.99924,.99924,.99924,.99998,.99998,.99998,.99973,.99973,.99972,1,1,1.00267,.99999,.99998,.99998,1,.99998,1.66475,1,.99973,.99973,1.00023,.99973,1.00423,.99925,.99999,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1.00049,1,1.00245,1,1,1,1,.96329,1,1.20985,1.39713,1.00003,.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,1.00003,1.00031,1.00031,.99999,1.00003,.99999,.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,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.95317,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],e.HelveticaItalicMetrics={lineHeight:1.35,lineGap:.2},e.HelveticaRegularFactors=[.76116,1,1,1.0006,1.0006,1.00006,.99973,.99973,.99982,1.00001,1.00043,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.0006,1,1.00003,1.00003,1.00003,.99973,.99987,1.00001,1.00001,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,1,1.00001,.99973,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,.99949,.99973,.99998,.99973,.99973,1,.99973,.99973,1.0006,.99973,.99973,.99924,.99924,1,.99924,.99999,.99973,.99973,.99973,.99973,.99998,1,1.0006,.99973,1,.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,.99998,.99973,.99973,.99973,.99973,1.0009,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.9998,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,1,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.06409,1.00026,.99973,.99973,.99973,.99973,1,.99973,1,1.00001,.99973,1.00001,.99973,1.00001,.99973,.99977,1,.99977,1,.99977,1,.99977,1,.99977,1.04596,.99977,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,.99977,.99973,.99977,.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99924,1.0006,1.0006,1.00019,1.00034,1,.99924,1.00001,1,1,.99973,.99924,.99973,.99924,.99973,1.02572,.99973,1.00005,.99973,.99924,.99977,.99973,.99977,.99973,.99977,.99973,.99999,.9998,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1,1.00016,.99977,.99998,.99977,.99998,.99977,.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,.84533,1.00026,1.0006,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,1.00016,.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,.99924,.99973,1.00001,.99973,1,.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99928,1,.99977,1.00013,1.00055,.99947,.99945,.99941,.99924,1.00001,1.00001,1.0004,.91621,1.00001,1.00026,.99977,1.00022,1.0006,1.00001,1.00005,.99999,.99977,1.00015,1.00022,.99977,1.00001,.99973,1.00026,1.00001,1.00019,1.00001,.99946,1,1.0006,1.00001,.99978,1.00045,.99973,.99924,1.00023,.99978,.99966,1,1.00065,1.00045,1.00019,.99973,.99973,.99924,1,1,.96499,1,1.00055,.99973,1.00008,1.00027,1,.9997,.99995,1.00023,.99933,1.00019,1.00015,1.00031,.99924,1.00023,.99973,1.00023,1.00031,1.00001,.99928,1.00029,1.00092,1.00035,1.00001,1.0006,1.0006,1,.99988,.99975,1,1.00082,.99561,.9996,1.00035,1.00001,.99962,1.00001,1.00092,.99964,1.00001,.99963,.99999,1.00035,1.00035,1.00082,.99962,.99999,.99977,1.00022,1.00035,1.00001,.99977,1.00026,.9996,.99967,1.00001,1.00034,1.00074,1.00054,1.00053,1.00063,.99971,.99962,1.00035,.99975,.99977,.99973,1.00043,.99953,1.0007,.99915,.99973,1.00008,.99892,1.00073,1.00073,1.00114,.99915,1.00073,.99955,.99973,1.00092,.99973,1,.99998,1,1.0003,1,1.00043,1.00001,.99969,1.0003,1,1.00035,1.00001,.9995,1,1.00092,.99973,.99973,.99973,1.0007,.9995,1,.99924,1.0006,.99924,.99972,1.00062,.99973,1.00114,1.00073,1,.99955,1,1,1.00047,.99968,1.00016,.99977,1.00016,.99977,1.00016,.99977,1.00001,1,1,1,.99973,1,1,.99955,.99924,.99924,.99924,.99924,.99998,.99998,.99998,.99973,.99973,.99972,1,1,1.00267,.99999,.99998,.99998,1,.99998,1.66475,1,.99973,.99973,1.00023,.99973,.99971,.99925,1.00023,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,.96329,1,1.20985,1.39713,1.00003,.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.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,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.95317,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],e.HelveticaRegularMetrics={lineHeight:1.2,lineGap:.2}},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LiberationSansRegularWidths=e.LiberationSansRegularMapping=e.LiberationSansItalicWidths=e.LiberationSansItalicMapping=e.LiberationSansBoldWidths=e.LiberationSansBoldMapping=e.LiberationSansBoldItalicWidths=e.LiberationSansBoldItalicMapping=void 0,e.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,1e3,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,1e3,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,1e3,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,1e3,1e3,552,278,278,278,278,500,500,500,556,556,350,1e3,1e3,240,479,333,333,604,333,167,396,556,556,1094,556,885,489,1115,1e3,768,600,834,834,834,834,1e3,500,1e3,500,1e3,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,1e3,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],e.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],e.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,1e3,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,1e3,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,1e3,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,1e3,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,1e3,1e3,552,278,278,278,278,500,500,500,556,556,350,1e3,1e3,240,479,333,333,604,333,167,396,556,556,1104,556,885,516,1146,1e3,768,600,834,834,834,834,999,500,1e3,500,1e3,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,1e3,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],e.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],e.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,1e3,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,1e3,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,1e3,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,1e3,1e3,552,222,222,222,222,333,333,333,556,556,350,1e3,1e3,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1083,1e3,768,600,834,834,834,834,1e3,500,998,500,1e3,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,1e3,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],e.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],e.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,1e3,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,1e3,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,1e3,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,1e3,1e3,552,222,222,222,222,333,333,333,556,556,350,1e3,1e3,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1073,1e3,768,600,834,834,834,834,1e3,500,1e3,500,1e3,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,1e3,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],e.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]},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MyriadProRegularMetrics=e.MyriadProRegularFactors=e.MyriadProItalicMetrics=e.MyriadProItalicFactors=e.MyriadProBoldMetrics=e.MyriadProBoldItalicMetrics=e.MyriadProBoldItalicFactors=e.MyriadProBoldFactors=void 0,e.MyriadProBoldFactors=[1.36898,1,1,.72706,.80479,.83734,.98894,.99793,.9897,.93884,.86209,.94292,.94292,1.16661,1.02058,.93582,.96694,.93582,1.19137,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.78076,.78076,1.02058,1.02058,1.02058,.72851,.78966,.90838,.83637,.82391,.96376,.80061,.86275,.8768,.95407,1.0258,.73901,.85022,.83655,1.0156,.95546,.92179,.87107,.92179,.82114,.8096,.89713,.94438,.95353,.94083,.91905,.90406,.9446,.94292,1.18777,.94292,1.02058,.89903,.90088,.94938,.97898,.81093,.97571,.94938,1.024,.9577,.95933,.98621,1.0474,.97455,.98981,.9672,.95933,.9446,.97898,.97407,.97646,.78036,1.10208,.95442,.95298,.97579,.9332,.94039,.938,.80687,1.01149,.80687,1.02058,.80479,.99793,.99793,.99793,.99793,1.01149,1.00872,.90088,.91882,1.0213,.8361,1.02058,.62295,.54324,.89022,1.08595,1,1,.90088,1,.97455,.93582,.90088,1,1.05686,.8361,.99642,.99642,.99642,.72851,.90838,.90838,.90838,.90838,.90838,.90838,.868,.82391,.80061,.80061,.80061,.80061,1.0258,1.0258,1.0258,1.0258,.97484,.95546,.92179,.92179,.92179,.92179,.92179,1.02058,.92179,.94438,.94438,.94438,.94438,.90406,.86958,.98225,.94938,.94938,.94938,.94938,.94938,.94938,.9031,.81093,.94938,.94938,.94938,.94938,.98621,.98621,.98621,.98621,.93969,.95933,.9446,.9446,.9446,.9446,.9446,1.08595,.9446,.95442,.95442,.95442,.95442,.94039,.97898,.94039,.90838,.94938,.90838,.94938,.90838,.94938,.82391,.81093,.82391,.81093,.82391,.81093,.82391,.81093,.96376,.84313,.97484,.97571,.80061,.94938,.80061,.94938,.80061,.94938,.80061,.94938,.80061,.94938,.8768,.9577,.8768,.9577,.8768,.9577,1,1,.95407,.95933,.97069,.95933,1.0258,.98621,1.0258,.98621,1.0258,.98621,1.0258,.98621,1.0258,.98621,.887,1.01591,.73901,1.0474,1,1,.97455,.83655,.98981,1,1,.83655,.73977,.83655,.73903,.84638,1.033,.95546,.95933,1,1,.95546,.95933,.8271,.95417,.95933,.92179,.9446,.92179,.9446,.92179,.9446,.936,.91964,.82114,.97646,1,1,.82114,.97646,.8096,.78036,.8096,.78036,1,1,.8096,.78036,1,1,.89713,.77452,.89713,1.10208,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94083,.97579,.90406,.94039,.90406,.9446,.938,.9446,.938,.9446,.938,1,.99793,.90838,.94938,.868,.9031,.92179,.9446,1,1,.89713,1.10208,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90989,.9358,.91945,.83181,.75261,.87992,.82976,.96034,.83689,.97268,1.0078,.90838,.83637,.8019,.90157,.80061,.9446,.95407,.92436,1.0258,.85022,.97153,1.0156,.95546,.89192,.92179,.92361,.87107,.96318,.89713,.93704,.95638,.91905,.91709,.92796,1.0258,.93704,.94836,1.0373,.95933,1.0078,.95871,.94836,.96174,.92601,.9498,.98607,.95776,.95933,1.05453,1.0078,.98275,.9314,.95617,.91701,1.05993,.9446,.78367,.9553,1,.86832,1.0128,.95871,.99394,.87548,.96361,.86774,1.0078,.95871,.9446,.95871,.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,.94083,.97579,.94083,.97579,.94083,.97579,.90406,.94039,.96694,1,.89903,1,1,1,.93582,.93582,.93582,1,.908,.908,.918,.94219,.94219,.96544,1,1.285,1,1,.81079,.81079,1,1,.74854,1,1,1,1,.99793,1,1,1,.65,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.17173,1,.80535,.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],e.MyriadProBoldMetrics={lineHeight:1.2,lineGap:.2},e.MyriadProBoldItalicFactors=[1.36898,1,1,.66227,.80779,.81625,.97276,.97276,.97733,.92222,.83266,.94292,.94292,1.16148,1.02058,.93582,.96694,.93582,1.17337,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.78076,.78076,1.02058,1.02058,1.02058,.71541,.76813,.85576,.80591,.80729,.94299,.77512,.83655,.86523,.92222,.98621,.71743,.81698,.79726,.98558,.92222,.90637,.83809,.90637,.80729,.76463,.86275,.90699,.91605,.9154,.85308,.85458,.90531,.94292,1.21296,.94292,1.02058,.89903,1.18616,.99613,.91677,.78216,.91677,.90083,.98796,.9135,.92168,.95381,.98981,.95298,.95381,.93459,.92168,.91513,.92004,.91677,.95077,.748,1.04502,.91677,.92061,.94236,.89544,.89364,.9,.80687,.8578,.80687,1.02058,.80779,.97276,.97276,.97276,.97276,.8578,.99973,1.18616,.91339,1.08074,.82891,1.02058,.55509,.71526,.89022,1.08595,1,1,1.18616,1,.96736,.93582,1.18616,1,1.04864,.82711,.99043,.99043,.99043,.71541,.85576,.85576,.85576,.85576,.85576,.85576,.845,.80729,.77512,.77512,.77512,.77512,.98621,.98621,.98621,.98621,.95961,.92222,.90637,.90637,.90637,.90637,.90637,1.02058,.90251,.90699,.90699,.90699,.90699,.85458,.83659,.94951,.99613,.99613,.99613,.99613,.99613,.99613,.85811,.78216,.90083,.90083,.90083,.90083,.95381,.95381,.95381,.95381,.9135,.92168,.91513,.91513,.91513,.91513,.91513,1.08595,.91677,.91677,.91677,.91677,.91677,.89364,.92332,.89364,.85576,.99613,.85576,.99613,.85576,.99613,.80729,.78216,.80729,.78216,.80729,.78216,.80729,.78216,.94299,.76783,.95961,.91677,.77512,.90083,.77512,.90083,.77512,.90083,.77512,.90083,.77512,.90083,.86523,.9135,.86523,.9135,.86523,.9135,1,1,.92222,.92168,.92222,.92168,.98621,.95381,.98621,.95381,.98621,.95381,.98621,.95381,.98621,.95381,.86036,.97096,.71743,.98981,1,1,.95298,.79726,.95381,1,1,.79726,.6894,.79726,.74321,.81691,1.0006,.92222,.92168,1,1,.92222,.92168,.79464,.92098,.92168,.90637,.91513,.90637,.91513,.90637,.91513,.909,.87514,.80729,.95077,1,1,.80729,.95077,.76463,.748,.76463,.748,1,1,.76463,.748,1,1,.86275,.72651,.86275,1.04502,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.9154,.94236,.85458,.89364,.85458,.90531,.9,.90531,.9,.90531,.9,1,.97276,.85576,.99613,.845,.85811,.90251,.91677,1,1,.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,.85576,.80178,.66862,.7927,.69323,.88127,.72459,.89711,.95381,.85576,.80591,.7805,.94729,.77512,.90531,.92222,.90637,.98621,.81698,.92655,.98558,.92222,.85359,.90637,.90976,.83809,.94523,.86275,.83509,.93157,.85308,.83392,.92346,.98621,.83509,.92886,.91324,.92168,.95381,.90646,.92886,.90557,.86847,.90276,.91324,.86842,.92168,.99531,.95381,.9224,.85408,.92699,.86847,1.0051,.91513,.80487,.93481,1,.88159,1.05214,.90646,.97355,.81539,.89398,.85923,.95381,.90646,.91513,.90646,.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,.9154,.94236,.9154,.94236,.9154,.94236,.85458,.89364,.96694,1,.89903,1,1,1,.91782,.91782,.91782,1,.896,.896,.896,.9332,.9332,.95973,1,1.26,1,1,.80479,.80178,1,1,.85633,1,1,1,1,.97276,1,1,1,.698,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.14542,1,.79199,.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],e.MyriadProBoldItalicMetrics={lineHeight:1.2,lineGap:.2},e.MyriadProItalicFactors=[1.36898,1,1,.65507,.84943,.85639,.88465,.88465,.86936,.88307,.86948,.85283,.85283,1.06383,1.02058,.75945,.9219,.75945,1.17337,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.75945,.75945,1.02058,1.02058,1.02058,.69046,.70926,.85158,.77812,.76852,.89591,.70466,.76125,.80094,.86822,.83864,.728,.77212,.79475,.93637,.87514,.8588,.76013,.8588,.72421,.69866,.77598,.85991,.80811,.87832,.78112,.77512,.8562,1.0222,1.18417,1.0222,1.27014,.89903,1.15012,.93859,.94399,.846,.94399,.81453,1.0186,.94219,.96017,1.03075,1.02175,.912,1.03075,.96998,.96017,.93859,.94399,.94399,.95493,.746,1.12658,.94578,.91,.979,.882,.882,.83,.85034,.83537,.85034,1.02058,.70869,.88465,.88465,.88465,.88465,.83537,.90083,1.15012,.9161,.94565,.73541,1.02058,.53609,.69353,.79519,1.08595,1,1,1.15012,1,.91974,.75945,1.15012,1,.9446,.73361,.9005,.9005,.9005,.62864,.85158,.85158,.85158,.85158,.85158,.85158,.773,.76852,.70466,.70466,.70466,.70466,.83864,.83864,.83864,.83864,.90561,.87514,.8588,.8588,.8588,.8588,.8588,1.02058,.85751,.85991,.85991,.85991,.85991,.77512,.76013,.88075,.93859,.93859,.93859,.93859,.93859,.93859,.8075,.846,.81453,.81453,.81453,.81453,.82424,.82424,.82424,.82424,.9278,.96017,.93859,.93859,.93859,.93859,.93859,1.08595,.8562,.94578,.94578,.94578,.94578,.882,.94578,.882,.85158,.93859,.85158,.93859,.85158,.93859,.76852,.846,.76852,.846,.76852,.846,.76852,.846,.89591,.8544,.90561,.94399,.70466,.81453,.70466,.81453,.70466,.81453,.70466,.81453,.70466,.81453,.80094,.94219,.80094,.94219,.80094,.94219,1,1,.86822,.96017,.86822,.96017,.83864,.82424,.83864,.82424,.83864,.82424,.83864,1.03075,.83864,.82424,.81402,1.02738,.728,1.02175,1,1,.912,.79475,1.03075,1,1,.79475,.83911,.79475,.66266,.80553,1.06676,.87514,.96017,1,1,.87514,.96017,.86865,.87396,.96017,.8588,.93859,.8588,.93859,.8588,.93859,.867,.84759,.72421,.95493,1,1,.72421,.95493,.69866,.746,.69866,.746,1,1,.69866,.746,1,1,.77598,.88417,.77598,1.12658,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.87832,.979,.77512,.882,.77512,.8562,.83,.8562,.83,.8562,.83,1,.88465,.85158,.93859,.773,.8075,.85751,.8562,1,1,.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,.85158,.77025,.62264,.7646,.65351,.86026,.69461,.89947,1.03075,.85158,.77812,.76449,.88836,.70466,.8562,.86822,.8588,.83864,.77212,.85308,.93637,.87514,.82352,.8588,.85701,.76013,.89058,.77598,.8156,.82565,.78112,.77899,.89386,.83864,.8156,.9486,.92388,.96186,1.03075,.91123,.9486,.93298,.878,.93942,.92388,.84596,.96186,.95119,1.03075,.922,.88787,.95829,.88,.93559,.93859,.78815,.93758,1,.89217,1.03737,.91123,.93969,.77487,.85769,.86799,1.03075,.91123,.93859,.91123,.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,.87832,.979,.87832,.979,.87832,.979,.77512,.882,.9219,1,.89903,1,1,1,.87321,.87321,.87321,1,1.027,1.027,1.027,.86847,.86847,.79121,1,1.124,1,1,.73572,.73572,1,1,.85034,1,1,1,1,.88465,1,1,1,.669,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.04828,1,.74948,.75187,1.02058,.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],e.MyriadProItalicMetrics={lineHeight:1.2,lineGap:.2},e.MyriadProRegularFactors=[1.36898,1,1,.76305,.82784,.94935,.89364,.92241,.89073,.90706,.98472,.85283,.85283,1.0664,1.02058,.74505,.9219,.74505,1.23456,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.74505,.74505,1.02058,1.02058,1.02058,.73002,.72601,.91755,.8126,.80314,.92222,.73764,.79726,.83051,.90284,.86023,.74,.8126,.84869,.96518,.91115,.8858,.79761,.8858,.74498,.73914,.81363,.89591,.83659,.89633,.85608,.8111,.90531,1.0222,1.22736,1.0222,1.27014,.89903,.90088,.86667,1.0231,.896,1.01411,.90083,1.05099,1.00512,.99793,1.05326,1.09377,.938,1.06226,1.00119,.99793,.98714,1.0231,1.01231,.98196,.792,1.19137,.99074,.962,1.01915,.926,.942,.856,.85034,.92006,.85034,1.02058,.69067,.92241,.92241,.92241,.92241,.92006,.9332,.90088,.91882,.93484,.75339,1.02058,.56866,.54324,.79519,1.08595,1,1,.90088,1,.95325,.74505,.90088,1,.97198,.75339,.91009,.91009,.91009,.66466,.91755,.91755,.91755,.91755,.91755,.91755,.788,.80314,.73764,.73764,.73764,.73764,.86023,.86023,.86023,.86023,.92915,.91115,.8858,.8858,.8858,.8858,.8858,1.02058,.8858,.89591,.89591,.89591,.89591,.8111,.79611,.89713,.86667,.86667,.86667,.86667,.86667,.86667,.86936,.896,.90083,.90083,.90083,.90083,.84224,.84224,.84224,.84224,.97276,.99793,.98714,.98714,.98714,.98714,.98714,1.08595,.89876,.99074,.99074,.99074,.99074,.942,1.0231,.942,.91755,.86667,.91755,.86667,.91755,.86667,.80314,.896,.80314,.896,.80314,.896,.80314,.896,.92222,.93372,.92915,1.01411,.73764,.90083,.73764,.90083,.73764,.90083,.73764,.90083,.73764,.90083,.83051,1.00512,.83051,1.00512,.83051,1.00512,1,1,.90284,.99793,.90976,.99793,.86023,.84224,.86023,.84224,.86023,.84224,.86023,1.05326,.86023,.84224,.82873,1.07469,.74,1.09377,1,1,.938,.84869,1.06226,1,1,.84869,.83704,.84869,.81441,.85588,1.08927,.91115,.99793,1,1,.91115,.99793,.91887,.90991,.99793,.8858,.98714,.8858,.98714,.8858,.98714,.894,.91434,.74498,.98196,1,1,.74498,.98196,.73914,.792,.73914,.792,1,1,.73914,.792,1,1,.81363,.904,.81363,1.19137,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89633,1.01915,.8111,.942,.8111,.90531,.856,.90531,.856,.90531,.856,1,.92241,.91755,.86667,.788,.86936,.8858,.89876,1,1,.81363,1.19137,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90388,1.03901,.92138,.78105,.7154,.86169,.80513,.94007,.82528,.98612,1.06226,.91755,.8126,.81884,.92819,.73764,.90531,.90284,.8858,.86023,.8126,.91172,.96518,.91115,.83089,.8858,.87791,.79761,.89297,.81363,.88157,.89992,.85608,.81992,.94307,.86023,.88157,.95308,.98699,.99793,1.06226,.95817,.95308,.97358,.928,.98088,.98699,.92761,.99793,.96017,1.06226,.986,.944,.95978,.938,.96705,.98714,.80442,.98972,1,.89762,1.04552,.95817,.99007,.87064,.91879,.88888,1.06226,.95817,.98714,.95817,.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,.89633,1.01915,.89633,1.01915,.89633,1.01915,.8111,.942,.9219,1,.89903,1,1,1,.93173,.93173,.93173,1,1.06304,1.06304,1.06904,.89903,.89903,.80549,1,1.156,1,1,.76575,.76575,1,1,.72458,1,1,1,1,.92241,1,1,1,.619,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.07257,1,.74705,.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],e.MyriadProRegularMetrics={lineHeight:1.2,lineGap:.2}},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SegoeuiRegularMetrics=e.SegoeuiRegularFactors=e.SegoeuiItalicMetrics=e.SegoeuiItalicFactors=e.SegoeuiBoldMetrics=e.SegoeuiBoldItalicMetrics=e.SegoeuiBoldItalicFactors=e.SegoeuiBoldFactors=void 0,e.SegoeuiBoldFactors=[1.76738,1,1,.99297,.9824,1.04016,1.06497,1.03424,.97529,1.17647,1.23203,1.1085,1.1085,1.16939,1.2107,.9754,1.21408,.9754,1.59578,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,.81378,.81378,1.2107,1.2107,1.2107,.71703,.97847,.97363,.88776,.8641,1.02096,.79795,.85132,.914,1.06085,1.1406,.8007,.89858,.83693,1.14889,1.09398,.97489,.92094,.97489,.90399,.84041,.95923,1.00135,1,1.06467,.98243,.90996,.99361,1.1085,1.56942,1.1085,1.2107,.74627,.94282,.96752,1.01519,.86304,1.01359,.97278,1.15103,1.01359,.98561,1.02285,1.02285,1.00527,1.02285,1.0302,.99041,1.0008,1.01519,1.01359,1.02258,.79104,1.16862,.99041,.97454,1.02511,.99298,.96752,.95801,.94856,1.16579,.94856,1.2107,.9824,1.03424,1.03424,1,1.03424,1.16579,.8727,1.3871,1.18622,1.10818,1.04478,1.2107,1.18622,.75155,.94994,1.28826,1.21408,1.21408,.91056,1,.91572,.9754,.64663,1.18328,1.24866,1.04478,1.14169,1.15749,1.17389,.71703,.97363,.97363,.97363,.97363,.97363,.97363,.93506,.8641,.79795,.79795,.79795,.79795,1.1406,1.1406,1.1406,1.1406,1.02096,1.09398,.97426,.97426,.97426,.97426,.97426,1.2107,.97489,1.00135,1.00135,1.00135,1.00135,.90996,.92094,1.02798,.96752,.96752,.96752,.96752,.96752,.96752,.93136,.86304,.97278,.97278,.97278,.97278,1.02285,1.02285,1.02285,1.02285,.97122,.99041,1,1,1,1,1,1.28826,1.0008,.99041,.99041,.99041,.99041,.96752,1.01519,.96752,.97363,.96752,.97363,.96752,.97363,.96752,.8641,.86304,.8641,.86304,.8641,.86304,.8641,.86304,1.02096,1.03057,1.02096,1.03517,.79795,.97278,.79795,.97278,.79795,.97278,.79795,.97278,.79795,.97278,.914,1.01359,.914,1.01359,.914,1.01359,1,1,1.06085,.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,.97138,1.08692,.8007,1.02285,1,1,1.00527,.83693,1.02285,1,1,.83693,.9455,.83693,.90418,.83693,1.13005,1.09398,.99041,1,1,1.09398,.99041,.96692,1.09251,.99041,.97489,1.0008,.97489,1.0008,.97489,1.0008,.93994,.97931,.90399,1.02258,1,1,.90399,1.02258,.84041,.79104,.84041,.79104,.84041,.79104,.84041,.79104,1,1,.95923,1.07034,.95923,1.16862,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.06467,1.02511,.90996,.96752,.90996,.99361,.95801,.99361,.95801,.99361,.95801,1.07733,1.03424,.97363,.96752,.93506,.93136,.97489,1.0008,1,1,.95923,1.16862,1.15103,1.15103,1.01173,1.03959,.75953,.81378,.79912,1.15103,1.21994,.95161,.87815,1.01149,.81525,.7676,.98167,1.01134,1.02546,.84097,1.03089,1.18102,.97363,.88776,.85134,.97826,.79795,.99361,1.06085,.97489,1.1406,.89858,1.0388,1.14889,1.09398,.86039,.97489,1.0595,.92094,.94793,.95923,.90996,.99346,.98243,1.02112,.95493,1.1406,.90996,1.03574,1.02597,1.0008,1.18102,1.06628,1.03574,1.0192,1.01932,1.00886,.97531,1.0106,1.0008,1.13189,1.18102,1.02277,.98683,1.0016,.99561,1.07237,1.0008,.90434,.99921,.93803,.8965,1.23085,1.06628,1.04983,.96268,1.0499,.98439,1.18102,1.06628,1.0008,1.06628,.98439,.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,.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,.90996,.96752,1,1.21408,.89903,1,1,.75155,1.04394,1.04394,1.04394,1.04394,.98633,.98633,.98633,.73047,.73047,1.20642,.91211,1.25635,1.222,1.02956,1.03372,1.03372,.96039,1.24633,1,1.12454,.93503,1.03424,1.19687,1.03424,1,1,1,.771,1,1,1.15749,1.15749,1.15749,1.10948,.86279,.94434,.86279,.94434,.86182,1,1,1.16897,1,.96085,.90137,1.2107,1.18416,1.13973,.69825,.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,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18874,1.42603,1,1.42603,1.42603,.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],e.SegoeuiBoldMetrics={lineHeight:1.33008,lineGap:0},e.SegoeuiBoldItalicFactors=[1.76738,1,1,.98946,1.03959,1.04016,1.02809,1.036,.97639,1.10953,1.23203,1.11144,1.11144,1.16939,1.21237,.9754,1.21261,.9754,1.59754,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,.81378,.81378,1.21237,1.21237,1.21237,.73541,.97847,.97363,.89723,.87897,1.0426,.79429,.85292,.91149,1.05815,1.1406,.79631,.90128,.83853,1.04396,1.10615,.97552,.94436,.97552,.88641,.80527,.96083,1.00135,1,1.06777,.9817,.91142,.99361,1.11144,1.57293,1.11144,1.21237,.74627,1.31818,1.06585,.97042,.83055,.97042,.93503,1.1261,.97042,.97922,1.14236,.94552,1.01054,1.14236,1.02471,.97922,.94165,.97042,.97042,1.0276,.78929,1.1261,.97922,.95874,1.02197,.98507,.96752,.97168,.95107,1.16579,.95107,1.21237,1.03959,1.036,1.036,1,1.036,1.16579,.87357,1.31818,1.18754,1.26781,1.05356,1.21237,1.18622,.79487,.94994,1.29004,1.24047,1.24047,1.31818,1,.91484,.9754,1.31818,1.1349,1.24866,1.05356,1.13934,1.15574,1.17389,.73541,.97363,.97363,.97363,.97363,.97363,.97363,.94385,.87897,.79429,.79429,.79429,.79429,1.1406,1.1406,1.1406,1.1406,1.0426,1.10615,.97552,.97552,.97552,.97552,.97552,1.21237,.97552,1.00135,1.00135,1.00135,1.00135,.91142,.94436,.98721,1.06585,1.06585,1.06585,1.06585,1.06585,1.06585,.96705,.83055,.93503,.93503,.93503,.93503,1.14236,1.14236,1.14236,1.14236,.93125,.97922,.94165,.94165,.94165,.94165,.94165,1.29004,.94165,.97922,.97922,.97922,.97922,.96752,.97042,.96752,.97363,1.06585,.97363,1.06585,.97363,1.06585,.87897,.83055,.87897,.83055,.87897,.83055,.87897,.83055,1.0426,1.0033,1.0426,.97042,.79429,.93503,.79429,.93503,.79429,.93503,.79429,.93503,.79429,.93503,.91149,.97042,.91149,.97042,.91149,.97042,1,1,1.05815,.97922,1.05815,.97922,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,.97441,1.04302,.79631,1.01582,1,1,1.01054,.83853,1.14236,1,1,.83853,1.09125,.83853,.90418,.83853,1.19508,1.10615,.97922,1,1,1.10615,.97922,1.01034,1.10466,.97922,.97552,.94165,.97552,.94165,.97552,.94165,.91602,.91981,.88641,1.0276,1,1,.88641,1.0276,.80527,.78929,.80527,.78929,.80527,.78929,.80527,.78929,1,1,.96083,1.05403,.95923,1.16862,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.06777,1.02197,.91142,.96752,.91142,.99361,.97168,.99361,.97168,.99361,.97168,1.23199,1.036,.97363,1.06585,.94385,.96705,.97552,.94165,1,1,.96083,1.1261,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,.95161,1.27126,1.00811,.83284,.77702,.99137,.95253,1.0347,.86142,1.07205,1.14236,.97363,.89723,.86869,1.09818,.79429,.99361,1.05815,.97552,1.1406,.90128,1.06662,1.04396,1.10615,.84918,.97552,1.04694,.94436,.98015,.96083,.91142,1.00356,.9817,1.01945,.98999,1.1406,.91142,1.04961,.9898,1.00639,1.14236,1.07514,1.04961,.99607,1.02897,1.008,.9898,.95134,1.00639,1.11121,1.14236,1.00518,.97981,1.02186,1,1.08578,.94165,.99314,.98387,.93028,.93377,1.35125,1.07514,1.10687,.93491,1.04232,1.00351,1.14236,1.07514,.94165,1.07514,1.00351,.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,.93503,1,1,1,1,1,1,1,1,1,1,1,1,.96609,1,1,1,1,1,1,1.06777,1.02197,1.06777,1.02197,1.06777,1.02197,.91142,.96752,1,1.21261,.89903,1,1,.75155,1.04745,1.04745,1.04745,1.04394,.98633,.98633,.98633,.72959,.72959,1.20502,.91406,1.26514,1.222,1.02956,1.03372,1.03372,.96039,1.24633,1,1.09125,.93327,1.03336,1.16541,1.036,1,1,1,.771,1,1,1.15574,1.15574,1.15574,1.15574,.86364,.94434,.86279,.94434,.86224,1,1,1.16798,1,.96085,.90068,1.21237,1.18416,1.13904,.69825,.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,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18775,1.42603,1,1.42603,1.42603,.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],e.SegoeuiBoldItalicMetrics={lineHeight:1.33008,lineGap:0},e.SegoeuiItalicFactors=[1.76738,1,1,.98946,1.14763,1.05365,1.06234,.96927,.92586,1.15373,1.18414,.91349,.91349,1.07403,1.17308,.78383,1.20088,.78383,1.42531,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.78383,.78383,1.17308,1.17308,1.17308,.77349,.94565,.94729,.85944,.88506,.9858,.74817,.80016,.88449,.98039,.95782,.69238,.89898,.83231,.98183,1.03989,.96924,.86237,.96924,.80595,.74524,.86091,.95402,.94143,.98448,.8858,.83089,.93285,1.0949,1.39016,1.0949,1.45994,.74627,1.04839,.97454,.97454,.87207,.97454,.87533,1.06151,.97454,1.00176,1.16484,1.08132,.98047,1.16484,1.02989,1.01054,.96225,.97454,.97454,1.06598,.79004,1.16344,1.00351,.94629,.9973,.91016,.96777,.9043,.91082,.92481,.91082,1.17308,.95748,.96927,.96927,1,.96927,.92481,.80597,1.04839,1.23393,1.1781,.9245,1.17308,1.20808,.63218,.94261,1.24822,1.09971,1.09971,1.04839,1,.85273,.78032,1.04839,1.09971,1.22326,.9245,1.09836,1.13525,1.15222,.70424,.94729,.94729,.94729,.94729,.94729,.94729,.85498,.88506,.74817,.74817,.74817,.74817,.95782,.95782,.95782,.95782,.9858,1.03989,.96924,.96924,.96924,.96924,.96924,1.17308,.96924,.95402,.95402,.95402,.95402,.83089,.86237,.88409,.97454,.97454,.97454,.97454,.97454,.97454,.92916,.87207,.87533,.87533,.87533,.87533,.93146,.93146,.93146,.93146,.93854,1.01054,.96225,.96225,.96225,.96225,.96225,1.24822,.8761,1.00351,1.00351,1.00351,1.00351,.96777,.97454,.96777,.94729,.97454,.94729,.97454,.94729,.97454,.88506,.87207,.88506,.87207,.88506,.87207,.88506,.87207,.9858,.95391,.9858,.97454,.74817,.87533,.74817,.87533,.74817,.87533,.74817,.87533,.74817,.87533,.88449,.97454,.88449,.97454,.88449,.97454,1,1,.98039,1.00176,.98039,1.00176,.95782,.93146,.95782,.93146,.95782,.93146,.95782,1.16484,.95782,.93146,.84421,1.12761,.69238,1.08132,1,1,.98047,.83231,1.16484,1,1,.84723,1.04861,.84723,.78755,.83231,1.23736,1.03989,1.01054,1,1,1.03989,1.01054,.9857,1.03849,1.01054,.96924,.96225,.96924,.96225,.96924,.96225,.92383,.90171,.80595,1.06598,1,1,.80595,1.06598,.74524,.79004,.74524,.79004,.74524,.79004,.74524,.79004,1,1,.86091,1.02759,.85771,1.16344,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.98448,.9973,.83089,.96777,.83089,.93285,.9043,.93285,.9043,.93285,.9043,1.31868,.96927,.94729,.97454,.85498,.92916,.96924,.8761,1,1,.86091,1.16344,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,.81965,.81965,.94729,.78032,.71022,.90883,.84171,.99877,.77596,1.05734,1.2,.94729,.85944,.82791,.9607,.74817,.93285,.98039,.96924,.95782,.89898,.98316,.98183,1.03989,.78614,.96924,.97642,.86237,.86075,.86091,.83089,.90082,.8858,.97296,1.01284,.95782,.83089,1.0976,1.04,1.03342,1.2,1.0675,1.0976,.98205,1.03809,1.05097,1.04,.95364,1.03342,1.05401,1.2,1.02148,1.0119,1.04724,1.0127,1.02732,.96225,.8965,.97783,.93574,.94818,1.30679,1.0675,1.11826,.99821,1.0557,1.0326,1.2,1.0675,.96225,1.0675,1.0326,.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,.87533,1,1,1,1,1,1,1,1,1,1,1,1,.98705,1,1,1,1,1,1,.98448,.9973,.98448,.9973,.98448,.9973,.83089,.96777,1,1.20088,.89903,1,1,.75155,.94945,.94945,.94945,.94945,1.12317,1.12317,1.12317,.67603,.67603,1.15621,.73584,1.21191,1.22135,1.06483,.94868,.94868,.95996,1.24633,1,1.07497,.87709,.96927,1.01473,.96927,1,1,1,.77295,1,1,1.09836,1.09836,1.09836,1.01522,.86321,.94434,.8649,.94434,.86182,1,1,1.083,1,.91578,.86438,1.17308,1.18416,1.14589,.69825,.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,.99862,.99862,1,.87025,.87025,.87025,.87025,1.17984,1.42603,1,1.42603,1.42603,.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],e.SegoeuiItalicMetrics={lineHeight:1.33008,lineGap:0},e.SegoeuiRegularFactors=[1.76738,1,1,.98594,1.02285,1.10454,1.06234,.96927,.92037,1.19985,1.2046,.90616,.90616,1.07152,1.1714,.78032,1.20088,.78032,1.40246,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.78032,.78032,1.1714,1.1714,1.1714,.80597,.94084,.96706,.85944,.85734,.97093,.75842,.79936,.88198,.9831,.95782,.71387,.86969,.84636,1.07796,1.03584,.96924,.83968,.96924,.82826,.79649,.85771,.95132,.93119,.98965,.88433,.8287,.93365,1.08612,1.3638,1.08612,1.45786,.74627,.80499,.91484,1.05707,.92383,1.05882,.9403,1.12654,1.05882,1.01756,1.09011,1.09011,.99414,1.09011,1.034,1.01756,1.05356,1.05707,1.05882,1.04399,.84863,1.21968,1.01756,.95801,1.00068,.91797,.96777,.9043,.90351,.92105,.90351,1.1714,.85337,.96927,.96927,.99912,.96927,.92105,.80597,1.2434,1.20808,1.05937,.90957,1.1714,1.20808,.75155,.94261,1.24644,1.09971,1.09971,.84751,1,.85273,.78032,.61584,1.05425,1.17914,.90957,1.08665,1.11593,1.14169,.73381,.96706,.96706,.96706,.96706,.96706,.96706,.86035,.85734,.75842,.75842,.75842,.75842,.95782,.95782,.95782,.95782,.97093,1.03584,.96924,.96924,.96924,.96924,.96924,1.1714,.96924,.95132,.95132,.95132,.95132,.8287,.83968,.89049,.91484,.91484,.91484,.91484,.91484,.91484,.93575,.92383,.9403,.9403,.9403,.9403,.8717,.8717,.8717,.8717,1.00527,1.01756,1.05356,1.05356,1.05356,1.05356,1.05356,1.24644,.95923,1.01756,1.01756,1.01756,1.01756,.96777,1.05707,.96777,.96706,.91484,.96706,.91484,.96706,.91484,.85734,.92383,.85734,.92383,.85734,.92383,.85734,.92383,.97093,1.0969,.97093,1.05882,.75842,.9403,.75842,.9403,.75842,.9403,.75842,.9403,.75842,.9403,.88198,1.05882,.88198,1.05882,.88198,1.05882,1,1,.9831,1.01756,.9831,1.01756,.95782,.8717,.95782,.8717,.95782,.8717,.95782,1.09011,.95782,.8717,.84784,1.11551,.71387,1.09011,1,1,.99414,.84636,1.09011,1,1,.84636,1.0536,.84636,.94298,.84636,1.23297,1.03584,1.01756,1,1,1.03584,1.01756,1.00323,1.03444,1.01756,.96924,1.05356,.96924,1.05356,.96924,1.05356,.93066,.98293,.82826,1.04399,1,1,.82826,1.04399,.79649,.84863,.79649,.84863,.79649,.84863,.79649,.84863,1,1,.85771,1.17318,.85771,1.21968,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.98965,1.00068,.8287,.96777,.8287,.93365,.9043,.93365,.9043,.93365,.9043,1.08571,.96927,.96706,.91484,.86035,.93575,.96924,.95923,1,1,.85771,1.21968,1.11437,1.11437,.93109,.91202,.60411,.84164,.55572,1.01173,.97361,.81818,.81818,.96635,.78032,.72727,.92366,.98601,1.03405,.77968,1.09799,1.2,.96706,.85944,.85638,.96491,.75842,.93365,.9831,.96924,.95782,.86969,.94152,1.07796,1.03584,.78437,.96924,.98715,.83968,.83491,.85771,.8287,.94492,.88433,.9287,1.0098,.95782,.8287,1.0625,.98248,1.03424,1.2,1.01071,1.0625,.95246,1.03809,1.04912,.98248,1.00221,1.03424,1.05443,1.2,1.04785,.99609,1.00169,1.05176,.99346,1.05356,.9087,1.03004,.95542,.93117,1.23362,1.01071,1.07831,1.02512,1.05205,1.03502,1.2,1.01071,1.05356,1.01071,1.03502,.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,.9403,1,1,1,1,1,1,1,1,1,1,1,1,1.04021,1,1,1,1,1,1,.98965,1.00068,.98965,1.00068,.98965,1.00068,.8287,.96777,1,1.20088,.89903,1,1,.75155,1.03077,1.03077,1.03077,1.03077,1.13196,1.13196,1.13196,.67428,.67428,1.16039,.73291,1.20996,1.22135,1.06483,.94868,.94868,.95996,1.24633,1,1.07497,.87796,.96927,1.01518,.96927,1,1,1,.77295,1,1,1.10539,1.10539,1.11358,1.06967,.86279,.94434,.86279,.94434,.86182,1,1,1.083,1,.91578,.86507,1.1714,1.18416,1.14589,.69825,.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,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18083,1.42603,1,1.42603,1.42603,.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],e.SegoeuiRegularMetrics={lineHeight:1.33008,lineGap:0}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PostScriptEvaluator=e.PostScriptCompiler=e.PDFFunctionFactory=void 0,e.isPDFFunction=function(t){let e;if(t instanceof i.Dict)e=t;else{if(!(t instanceof o.BaseStream))return!1;e=t.dict}return e.has("FunctionType")};var i=s(4),n=s(2),r=s(58),o=s(5),a=s(59);function c(t){if(!Array.isArray(t))return null;const e=t.length;for(let s=0;s<e;s++)if("number"!=typeof t[s]){const s=new Array(e);for(let i=0;i<e;i++)s[i]=+t[i];return s}return t}e.PDFFunctionFactory=class{constructor({xref:t,isEvalSupported:e=!0}){this.xref=t,this.isEvalSupported=!1!==e}create(t){const e=this.getCached(t);if(e)return e;const s=h.parse({xref:this.xref,isEvalSupported:this.isEvalSupported,fn:t instanceof i.Ref?this.xref.fetch(t):t});return this._cache(t,s),s}createFromArray(t){const e=this.getCached(t);if(e)return e;const s=h.parseArray({xref:this.xref,isEvalSupported:this.isEvalSupported,fnObj:t instanceof i.Ref?this.xref.fetch(t):t});return this._cache(t,s),s}getCached(t){let e;if(t instanceof i.Ref?e=t:t instanceof i.Dict?e=t.objId:t instanceof o.BaseStream&&(e=t.dict?.objId),e){const t=this._localFunctionCache.getByRef(e);if(t)return t}return null}_cache(t,e){if(!e)throw new Error('PDFFunctionFactory._cache - expected "parsedFunction" argument.');let s;t instanceof i.Ref?s=t:t instanceof i.Dict?s=t.objId:t instanceof o.BaseStream&&(s=t.dict?.objId),s&&this._localFunctionCache.set(null,s,e)}get _localFunctionCache(){return(0,n.shadow)(this,"_localFunctionCache",new a.LocalFunctionCache)}};class h{static getSampleArray(t,e,s,i){let n,r,o=1;for(n=0,r=t.length;n<r;n++)o*=t[n];o*=e;const a=new Array(o);let c=0,h=0;const l=1/(2**s-1),u=i.getBytes((o*s+7)/8);let f=0;for(n=0;n<o;n++){for(;c<s;)h<<=8,h|=u[f++],c+=8;c-=s,a[n]=(h>>c)*l,h&=(1<<c)-1}return a}static parse({xref:t,isEvalSupported:e,fn:s}){const i=s.dict||s;switch(i.get("FunctionType")){case 0:return this.constructSampled({xref:t,isEvalSupported:e,fn:s,dict:i});case 1:break;case 2:return this.constructInterpolated({xref:t,isEvalSupported:e,dict:i});case 3:return this.constructStiched({xref:t,isEvalSupported:e,dict:i});case 4:return this.constructPostScript({xref:t,isEvalSupported:e,fn:s,dict:i})}throw new n.FormatError("Unknown type of function")}static parseArray({xref:t,isEvalSupported:e,fnObj:s}){if(!Array.isArray(s))return this.parse({xref:t,isEvalSupported:e,fn:s});const i=[];for(const n of s)i.push(this.parse({xref:t,isEvalSupported:e,fn:t.fetchIfRef(n)}));return function(t,e,s,n){for(let r=0,o=i.length;r<o;r++)i[r](t,e,s,n+r)}}static constructSampled({fn:t,dict:e}){function s(t){const e=t.length,s=[];let i=0;for(let n=0;n<e;n+=2)s[i++]=[t[n],t[n+1]];return s}function i(t,e,s,i,n){return i+(n-i)/(s-e)*(t-e)}let r=c(e.getArray("Domain")),o=c(e.getArray("Range"));if(!r||!o)throw new n.FormatError("No domain or range");const a=r.length/2,h=o.length/2;r=s(r),o=s(o);const l=c(e.getArray("Size")),u=e.get("BitsPerSample"),f=e.get("Order")||1;1!==f&&(0,n.info)("No support for cubic spline interpolation: "+f);let d=c(e.getArray("Encode"));if(d)d=s(d);else{d=[];for(let t=0;t<a;++t)d.push([0,l[t]-1])}let p=c(e.getArray("Decode"));p=p?s(p):o;const g=this.getSampleArray(l,h,u,t);return function(t,e,s,n){const c=1<<a,u=new Float64Array(c),f=new Uint32Array(c);let m,w;for(w=0;w<c;w++)u[w]=1;let b=h,y=1;for(m=0;m<a;++m){const s=r[m][0],n=r[m][1];let o=i(Math.min(Math.max(t[e+m],s),n),s,n,d[m][0],d[m][1]);const a=l[m];o=Math.min(Math.max(o,0),a-1);const h=o<a-1?Math.floor(o):o-1,p=h+1-o,g=o-h,A=h*b,v=A+b;for(w=0;w<c;w++)w&y?(u[w]*=g,f[w]+=v):(u[w]*=p,f[w]+=A);b*=a,y<<=1}for(w=0;w<h;++w){let t=0;for(m=0;m<c;m++)t+=g[f[m]+w]*u[m];t=i(t,0,1,p[w][0],p[w][1]),s[n+w]=Math.min(Math.max(t,o[w][0]),o[w][1])}}}static constructInterpolated({dict:t}){const e=c(t.getArray("C0"))||[0],s=c(t.getArray("C1"))||[1],i=t.get("N"),n=[];for(let t=0,i=e.length;t<i;++t)n.push(s[t]-e[t]);const r=n.length;return function(t,s,o,a){const c=1===i?t[s]:t[s]**i;for(let t=0;t<r;++t)o[a+t]=e[t]+c*n[t]}}static constructStiched({xref:t,isEvalSupported:e,dict:s}){const i=c(s.getArray("Domain"));if(!i)throw new n.FormatError("No domain");if(1!=i.length/2)throw new n.FormatError("Bad domain for stiched function");const r=[];for(const i of s.get("Functions"))r.push(this.parse({xref:t,isEvalSupported:e,fn:t.fetchIfRef(i)}));const o=c(s.getArray("Bounds")),a=c(s.getArray("Encode")),h=new Float32Array(1);return function(t,e,s,n){const c=function(t,e,s){return t>s?t=s:t<e&&(t=e),t}(t[e],i[0],i[1]),l=o.length;let u;for(u=0;u<l&&!(c<o[u]);++u);let f=i[0];u>0&&(f=o[u-1]);let d=i[1];u<o.length&&(d=o[u]);const p=a[2*u];h[0]=f===d?p:p+(c-f)*(a[2*u+1]-p)/(d-f),r[u](h,0,s,n)}}static constructPostScript({isEvalSupported:t,fn:e,dict:s}){const i=c(s.getArray("Domain")),o=c(s.getArray("Range"));if(!i)throw new n.FormatError("No domain.");if(!o)throw new n.FormatError("No range.");const a=new r.PostScriptLexer(e),h=new r.PostScriptParser(a).parse();if(t&&n.FeatureTest.isEvalSupported){const t=(new S).compile(h,i,o);if(t)return new Function("src","srcOffset","dest","destOffset",t)}(0,n.info)("Unable to compile PS function");const l=o.length>>1,f=i.length>>1,d=new u(h),p=Object.create(null);let g=8192;const m=new Float32Array(f);return function(t,e,s,i){let n,r,a="";const c=m;for(n=0;n<f;n++)r=t[e+n],c[n]=r,a+=r+"_";const h=p[a];if(void 0!==h)return void s.set(h,i);const u=new Float32Array(l),w=d.execute(c),b=w.length-l;for(n=0;n<l;n++){r=w[b+n];let t=o[2*n];r<t?r=t:(t=o[2*n+1],r>t&&(r=t)),u[n]=r}g>0&&(g--,p[a]=u),s.set(u,i)}}}class l{static MAX_STACK_SIZE=100;constructor(t){this.stack=t?Array.from(t):[]}push(t){if(this.stack.length>=l.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");this.stack.push(t)}pop(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()}copy(t){if(this.stack.length+t>=l.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");const e=this.stack;for(let s=e.length-t,i=t-1;i>=0;i--,s++)e.push(e[s])}index(t){this.push(this.stack[this.stack.length-t-1])}roll(t,e){const s=this.stack,i=s.length-t,n=s.length-1,r=i+(e-Math.floor(e/t)*t);for(let t=i,e=n;t<e;t++,e--){const i=s[t];s[t]=s[e],s[e]=i}for(let t=i,e=r-1;t<e;t++,e--){const i=s[t];s[t]=s[e],s[e]=i}for(let t=r,e=n;t<e;t++,e--){const i=s[t];s[t]=s[e],s[e]=i}}}class u{constructor(t){this.operators=t}execute(t){const e=new l(t);let s=0;const i=this.operators,r=i.length;let o,a,c;for(;s<r;)if(o=i[s++],"number"!=typeof o)switch(o){case"jz":c=e.pop(),a=e.pop(),a||(s=c);break;case"j":a=e.pop(),s=a;break;case"abs":a=e.pop(),e.push(Math.abs(a));break;case"add":c=e.pop(),a=e.pop(),e.push(a+c);break;case"and":c=e.pop(),a=e.pop(),e.push("boolean"==typeof a&&"boolean"==typeof c?a&&c:a&c);break;case"atan":c=e.pop(),a=e.pop(),a=Math.atan2(a,c)/Math.PI*180,a<0&&(a+=360),e.push(a);break;case"bitshift":c=e.pop(),a=e.pop(),e.push(a>0?a<<c:a>>c);break;case"ceiling":a=e.pop(),e.push(Math.ceil(a));break;case"copy":a=e.pop(),e.copy(a);break;case"cos":a=e.pop(),e.push(Math.cos(a%360/180*Math.PI));break;case"cvi":a=0|e.pop(),e.push(a);break;case"cvr":break;case"div":c=e.pop(),a=e.pop(),e.push(a/c);break;case"dup":e.copy(1);break;case"eq":c=e.pop(),a=e.pop(),e.push(a===c);break;case"exch":e.roll(2,1);break;case"exp":c=e.pop(),a=e.pop(),e.push(a**c);break;case"false":e.push(!1);break;case"floor":a=e.pop(),e.push(Math.floor(a));break;case"ge":c=e.pop(),a=e.pop(),e.push(a>=c);break;case"gt":c=e.pop(),a=e.pop(),e.push(a>c);break;case"idiv":c=e.pop(),a=e.pop(),e.push(a/c|0);break;case"index":a=e.pop(),e.index(a);break;case"le":c=e.pop(),a=e.pop(),e.push(a<=c);break;case"ln":a=e.pop(),e.push(Math.log(a));break;case"log":a=e.pop(),e.push(Math.log10(a));break;case"lt":c=e.pop(),a=e.pop(),e.push(a<c);break;case"mod":c=e.pop(),a=e.pop(),e.push(a%c);break;case"mul":c=e.pop(),a=e.pop(),e.push(a*c);break;case"ne":c=e.pop(),a=e.pop(),e.push(a!==c);break;case"neg":a=e.pop(),e.push(-a);break;case"not":a=e.pop(),e.push("boolean"==typeof a?!a:~a);break;case"or":c=e.pop(),a=e.pop(),e.push("boolean"==typeof a&&"boolean"==typeof c?a||c:a|c);break;case"pop":e.pop();break;case"roll":c=e.pop(),a=e.pop(),e.roll(a,c);break;case"round":a=e.pop(),e.push(Math.round(a));break;case"sin":a=e.pop(),e.push(Math.sin(a%360/180*Math.PI));break;case"sqrt":a=e.pop(),e.push(Math.sqrt(a));break;case"sub":c=e.pop(),a=e.pop(),e.push(a-c);break;case"true":e.push(!0);break;case"truncate":a=e.pop(),a=a<0?Math.ceil(a):Math.floor(a),e.push(a);break;case"xor":c=e.pop(),a=e.pop(),e.push("boolean"==typeof a&&"boolean"==typeof c?a!==c:a^c);break;default:throw new n.FormatError(`Unknown operator ${o}`)}else e.push(o);return e.stack}}e.PostScriptEvaluator=u;class f{constructor(t){this.type=t}visit(t){(0,n.unreachable)("abstract method")}}class d extends f{constructor(t,e,s){super("args"),this.index=t,this.min=e,this.max=s}visit(t){t.visitArgument(this)}}class p extends f{constructor(t){super("literal"),this.number=t,this.min=t,this.max=t}visit(t){t.visitLiteral(this)}}class g extends f{constructor(t,e,s,i,n){super("binary"),this.op=t,this.arg1=e,this.arg2=s,this.min=i,this.max=n}visit(t){t.visitBinaryOperation(this)}}class m extends f{constructor(t,e){super("max"),this.arg=t,this.min=t.min,this.max=e}visit(t){t.visitMin(this)}}class w extends f{constructor(t,e,s){super("var"),this.index=t,this.min=e,this.max=s}visit(t){t.visitVariable(this)}}class b extends f{constructor(t,e){super("definition"),this.variable=t,this.arg=e}visit(t){t.visitVariableDefinition(this)}}class y{constructor(){this.parts=[]}visitArgument(t){this.parts.push("Math.max(",t.min,", Math.min(",t.max,", src[srcOffset + ",t.index,"]))")}visitVariable(t){this.parts.push("v",t.index)}visitLiteral(t){this.parts.push(t.number)}visitBinaryOperation(t){this.parts.push("("),t.arg1.visit(this),this.parts.push(" ",t.op," "),t.arg2.visit(this),this.parts.push(")")}visitVariableDefinition(t){this.parts.push("var "),t.variable.visit(this),this.parts.push(" = "),t.arg.visit(this),this.parts.push(";")}visitMin(t){this.parts.push("Math.min("),t.arg.visit(this),this.parts.push(", ",t.max,")")}toString(){return this.parts.join("")}}function A(t,e){return"literal"===e.type&&0===e.number?t:"literal"===t.type&&0===t.number?e:"literal"===e.type&&"literal"===t.type?new p(t.number+e.number):new g("+",t,e,t.min+e.min,t.max+e.max)}function v(t,e){if("literal"===e.type){if(0===e.number)return new p(0);if(1===e.number)return t;if("literal"===t.type)return new p(t.number*e.number)}if("literal"===t.type){if(0===t.number)return new p(0);if(1===t.number)return e}const s=Math.min(t.min*e.min,t.min*e.max,t.max*e.min,t.max*e.max),i=Math.max(t.min*e.min,t.min*e.max,t.max*e.min,t.max*e.max);return new g("*",t,e,s,i)}function x(t,e){if("literal"===e.type){if(0===e.number)return t;if("literal"===t.type)return new p(t.number-e.number)}return"binary"===e.type&&"-"===e.op&&"literal"===t.type&&1===t.number&&"literal"===e.arg1.type&&1===e.arg1.number?e.arg2:new g("-",t,e,t.min-e.max,t.max-e.min)}function k(t,e){return t.min>=e?new p(e):t.max<=e?t:new m(t,e)}class S{compile(t,e,s){const i=[],n=[],r=e.length>>1,o=s.length>>1;let a,c,h,l,u,f,g,m,S=0;for(let t=0;t<r;t++)i.push(new d(t,e[2*t],e[2*t+1]));for(let e=0,s=t.length;e<s;e++)if(m=t[e],"number"!=typeof m)switch(m){case"add":if(i.length<2)return null;l=i.pop(),h=i.pop(),i.push(A(h,l));break;case"cvr":if(i.length<1)return null;break;case"mul":if(i.length<2)return null;l=i.pop(),h=i.pop(),i.push(v(h,l));break;case"sub":if(i.length<2)return null;l=i.pop(),h=i.pop(),i.push(x(h,l));break;case"exch":if(i.length<2)return null;u=i.pop(),f=i.pop(),i.push(u,f);break;case"pop":if(i.length<1)return null;i.pop();break;case"index":if(i.length<1)return null;if(h=i.pop(),"literal"!==h.type)return null;if(a=h.number,a<0||!Number.isInteger(a)||i.length<a)return null;if(u=i[i.length-a-1],"literal"===u.type||"var"===u.type){i.push(u);break}g=new w(S++,u.min,u.max),i[i.length-a-1]=g,i.push(g),n.push(new b(g,u));break;case"dup":if(i.length<1)return null;if("number"==typeof t[e+1]&&"gt"===t[e+2]&&t[e+3]===e+7&&"jz"===t[e+4]&&"pop"===t[e+5]&&t[e+6]===t[e+1]){h=i.pop(),i.push(k(h,t[e+1])),e+=6;break}if(u=i.at(-1),"literal"===u.type||"var"===u.type){i.push(u);break}g=new w(S++,u.min,u.max),i[i.length-1]=g,i.push(g),n.push(new b(g,u));break;case"roll":if(i.length<2)return null;if(l=i.pop(),h=i.pop(),"literal"!==l.type||"literal"!==h.type)return null;if(c=l.number,a=h.number,a<=0||!Number.isInteger(a)||!Number.isInteger(c)||i.length<a)return null;if(c=(c%a+a)%a,0===c)break;i.push(...i.splice(i.length-a,a-c));break;default:return null}else i.push(new p(m));if(i.length!==o)return null;const M=[];for(const t of n){const e=new y;t.visit(e),M.push(e.toString())}for(let t=0,e=i.length;t<e;t++){const e=i[t],n=new y;e.visit(n);const r=s[2*t],o=s[2*t+1],a=[n.toString()];r>e.min&&(a.unshift("Math.max(",r,", "),a.push(")")),o<e.max&&(a.unshift("Math.min(",o,", "),a.push(")")),a.unshift("dest[destOffset + ",t,"] = "),a.push(";"),M.push(a.join(""))}return M.join("\n")}}e.PostScriptCompiler=S},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PostScriptParser=e.PostScriptLexer=void 0;var i=s(2),n=s(4),r=s(3);e.PostScriptParser=class{constructor(t){this.lexer=t,this.operators=[],this.token=null,this.prev=null}nextToken(){this.prev=this.token,this.token=this.lexer.getToken()}accept(t){return this.token.type===t&&(this.nextToken(),!0)}expect(t){if(this.accept(t))return!0;throw new i.FormatError(`Unexpected symbol: found ${this.token.type} expected ${t}.`)}parse(){return this.nextToken(),this.expect(o.LBRACE),this.parseBlock(),this.expect(o.RBRACE),this.operators}parseBlock(){for(;;)if(this.accept(o.NUMBER))this.operators.push(this.prev.value);else if(this.accept(o.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(o.LBRACE))return;this.parseCondition()}}parseCondition(){const t=this.operators.length;if(this.operators.push(null,null),this.parseBlock(),this.expect(o.RBRACE),this.accept(o.IF))this.operators[t]=this.operators.length,this.operators[t+1]="jz";else{if(!this.accept(o.LBRACE))throw new i.FormatError("PS Function: error parsing conditional.");{const e=this.operators.length;this.operators.push(null,null);const s=this.operators.length;this.parseBlock(),this.expect(o.RBRACE),this.expect(o.IFELSE),this.operators[e]=this.operators.length,this.operators[e+1]="j",this.operators[t]=s,this.operators[t+1]="jz"}}}};const o={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5};class a{static get opCache(){return(0,i.shadow)(this,"opCache",Object.create(null))}constructor(t,e){this.type=t,this.value=e}static getOperator(t){return a.opCache[t]||=new a(o.OPERATOR,t)}static get LBRACE(){return(0,i.shadow)(this,"LBRACE",new a(o.LBRACE,"{"))}static get RBRACE(){return(0,i.shadow)(this,"RBRACE",new a(o.RBRACE,"}"))}static get IF(){return(0,i.shadow)(this,"IF",new a(o.IF,"IF"))}static get IFELSE(){return(0,i.shadow)(this,"IFELSE",new a(o.IFELSE,"IFELSE"))}}e.PostScriptLexer=class{constructor(t){this.stream=t,this.nextChar(),this.strBuf=[]}nextChar(){return this.currentChar=this.stream.getByte()}getToken(){let t=!1,e=this.currentChar;for(;;){if(e<0)return n.EOF;if(t)10!==e&&13!==e||(t=!1);else if(37===e)t=!0;else if(!(0,r.isWhiteSpace)(e))break;e=this.nextChar()}switch(0|e){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return new a(o.NUMBER,this.getNumber());case 123:return this.nextChar(),a.LBRACE;case 125:return this.nextChar(),a.RBRACE}const s=this.strBuf;for(s.length=0,s[0]=String.fromCharCode(e);(e=this.nextChar())>=0&&(e>=65&&e<=90||e>=97&&e<=122);)s.push(String.fromCharCode(e));const i=s.join("");switch(i.toLowerCase()){case"if":return a.IF;case"ifelse":return a.IFELSE;default:return a.getOperator(i)}}getNumber(){let t=this.currentChar;const e=this.strBuf;for(e.length=0,e[0]=String.fromCharCode(t);(t=this.nextChar())>=0&&(t>=48&&t<=57||45===t||46===t);)e.push(String.fromCharCode(t));const s=parseFloat(e.join(""));if(isNaN(s))throw new i.FormatError(`Invalid floating point number: ${s}`);return s}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RegionalImageCache=e.LocalTilingPatternCache=e.LocalImageCache=e.LocalGStateCache=e.LocalFunctionCache=e.LocalColorSpaceCache=e.GlobalImageCache=void 0;var i=s(2),n=s(4);class r{constructor(t){this.constructor===r&&(0,i.unreachable)("Cannot initialize BaseLocalCache."),this._onlyRefs=!0===t?.onlyRefs,this._onlyRefs||(this._nameRefMap=new Map,this._imageMap=new Map),this._imageCache=new n.RefSetCache}getByName(t){this._onlyRefs&&(0,i.unreachable)("Should not call `getByName` method.");const e=this._nameRefMap.get(t);return e?this.getByRef(e):this._imageMap.get(t)||null}getByRef(t){return this._imageCache.get(t)||null}set(t,e,s){(0,i.unreachable)("Abstract method `set` called.")}}e.LocalImageCache=class extends r{set(t,e=null,s){if("string"!=typeof t)throw new Error('LocalImageCache.set - expected "name" argument.');if(e){if(this._imageCache.has(e))return;return this._nameRefMap.set(t,e),void this._imageCache.put(e,s)}this._imageMap.has(t)||this._imageMap.set(t,s)}},e.LocalColorSpaceCache=class extends r{set(t=null,e=null,s){if("string"!=typeof t&&!e)throw new Error('LocalColorSpaceCache.set - expected "name" and/or "ref" argument.');if(e){if(this._imageCache.has(e))return;return null!==t&&this._nameRefMap.set(t,e),void this._imageCache.put(e,s)}this._imageMap.has(t)||this._imageMap.set(t,s)}},e.LocalFunctionCache=class extends r{constructor(t){super({onlyRefs:!0})}set(t=null,e,s){if(!e)throw new Error('LocalFunctionCache.set - expected "ref" argument.');this._imageCache.has(e)||this._imageCache.put(e,s)}},e.LocalGStateCache=class extends r{set(t,e=null,s){if("string"!=typeof t)throw new Error('LocalGStateCache.set - expected "name" argument.');if(e){if(this._imageCache.has(e))return;return this._nameRefMap.set(t,e),void this._imageCache.put(e,s)}this._imageMap.has(t)||this._imageMap.set(t,s)}},e.LocalTilingPatternCache=class extends r{constructor(t){super({onlyRefs:!0})}set(t=null,e,s){if(!e)throw new Error('LocalTilingPatternCache.set - expected "ref" argument.');this._imageCache.has(e)||this._imageCache.put(e,s)}},e.RegionalImageCache=class extends r{constructor(t){super({onlyRefs:!0})}set(t=null,e,s){if(!e)throw new Error('RegionalImageCache.set - expected "ref" argument.');this._imageCache.has(e)||this._imageCache.put(e,s)}};class o{static NUM_PAGES_THRESHOLD=2;static MIN_IMAGES_TO_CACHE=10;static MAX_BYTE_SIZE=5*i.MAX_IMAGE_SIZE_TO_CACHE;constructor(){this._refCache=new n.RefSetCache,this._imageCache=new n.RefSetCache}get _byteSize(){let t=0;for(const e of this._imageCache)t+=e.byteSize;return t}get _cacheLimitReached(){return!(this._imageCache.size<o.MIN_IMAGES_TO_CACHE||this._byteSize<o.MAX_BYTE_SIZE)}shouldCache(t,e){let s=this._refCache.get(t);return s||(s=new Set,this._refCache.put(t,s)),s.add(e),!(s.size<o.NUM_PAGES_THRESHOLD||!this._imageCache.has(t)&&this._cacheLimitReached)}addByteSize(t,e){const s=this._imageCache.get(t);s&&(s.byteSize||(s.byteSize=e))}getData(t,e){const s=this._refCache.get(t);if(!s)return null;if(s.size<o.NUM_PAGES_THRESHOLD)return null;const i=this._imageCache.get(t);return i?(s.add(e),i):null}setData(t,e){if(!this._refCache.has(t))throw new Error('GlobalImageCache.setData - expected "shouldCache" to have been called.');this._imageCache.has(t)||(this._cacheLimitReached?(0,i.warn)("GlobalImageCache.setData - cache limit reached."):this._imageCache.put(t,e))}clear(t=!1){t||this._refCache.clear(),this._imageCache.clear()}}e.GlobalImageCache=o},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.bidi=function(t,e=-1,s=!1){let p=!0;const g=t.length;if(0===g||s)return u(t,p,s);f.length=g,d.length=g;let m,w,b=0;for(m=0;m<g;++m){f[m]=t.charAt(m);const e=t.charCodeAt(m);let s="L";e<=255?s=n[e]:1424<=e&&e<=1524?s="R":1536<=e&&e<=1791?(s=r[255&e],s||(0,i.warn)("Bidi: invalid Unicode character "+e.toString(16))):(1792<=e&&e<=2220||64336<=e&&e<=65023||65136<=e&&e<=65279)&&(s="AL"),"R"!==s&&"AL"!==s&&"AN"!==s||b++,d[m]=s}if(0===b)return p=!0,u(t,p);-1===e&&(b/g<.3&&g>4?(p=!0,e=0):(p=!1,e=1));const y=[];for(m=0;m<g;++m)y[m]=e;const A=o(e)?"R":"L",v=A,x=v;let k,S=v;for(m=0;m<g;++m)"NSM"===d[m]?d[m]=S:S=d[m];for(S=v,m=0;m<g;++m)k=d[m],"EN"===k?d[m]="AL"===S?"AN":"EN":"R"!==k&&"L"!==k&&"AL"!==k||(S=k);for(m=0;m<g;++m)k=d[m],"AL"===k&&(d[m]="R");for(m=1;m<g-1;++m)"ES"===d[m]&&"EN"===d[m-1]&&"EN"===d[m+1]&&(d[m]="EN"),"CS"!==d[m]||"EN"!==d[m-1]&&"AN"!==d[m-1]||d[m+1]!==d[m-1]||(d[m]=d[m-1]);for(m=0;m<g;++m)if("EN"===d[m]){for(let t=m-1;t>=0&&"ET"===d[t];--t)d[t]="EN";for(let t=m+1;t<g&&"ET"===d[t];++t)d[t]="EN"}for(m=0;m<g;++m)k=d[m],"WS"!==k&&"ES"!==k&&"ET"!==k&&"CS"!==k||(d[m]="ON");for(S=v,m=0;m<g;++m)k=d[m],"EN"===k?d[m]="L"===S?"L":"EN":"R"!==k&&"L"!==k||(S=k);for(m=0;m<g;++m)if("ON"===d[m]){const t=c(d,m+1,"ON");let e=v;m>0&&(e=d[m-1]);let s=x;t+1<g&&(s=d[t+1]),"L"!==e&&(e="R"),"L"!==s&&(s="R"),e===s&&h(d,m,t,e),m=t-1}for(m=0;m<g;++m)"ON"===d[m]&&(d[m]=A);for(m=0;m<g;++m)k=d[m],a(y[m])?"R"===k?y[m]+=1:"AN"!==k&&"EN"!==k||(y[m]+=2):"L"!==k&&"AN"!==k&&"EN"!==k||(y[m]+=1);let M,C=-1,_=99;for(m=0,w=y.length;m<w;++m)M=y[m],C<M&&(C=M),_>M&&o(M)&&(_=M);for(M=C;M>=_;--M){let t=-1;for(m=0,w=y.length;m<w;++m)y[m]<M?t>=0&&(l(f,t,m),t=-1):t<0&&(t=m);t>=0&&l(f,t,y.length)}for(m=0,w=f.length;m<w;++m){const t=f[m];"<"!==t&&">"!==t||(f[m]="")}return u(f.join(""),p)};var i=s(2);const n=["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"],r=["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"];function o(t){return!!(1&t)}function a(t){return!(1&t)}function c(t,e,s){let i,n;for(i=e,n=t.length;i<n;++i)if(t[i]!==s)return i;return i}function h(t,e,s,i){for(let n=e;n<s;++n)t[n]=i}function l(t,e,s){for(let i=e,n=s-1;i<n;++i,--n){const e=t[i];t[i]=t[n],t[n]=e}}function u(t,e,s=!1){let i="ltr";return s?i="ttb":e||(i="rtl"),{str:t,dir:i}}const f=[],d=[]},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getFontSubstitution=function(t,e,s,f,d){const p=f=(0,i.normalizeFontName)(f);let g=t.get(p);if(g)return g;let m=h.get(f);if(!m)for(const[t,e]of l)if(f.startsWith(t)){f=`${e}${f.substring(t.length)}`,m=h.get(f);break}let w=!1;m||(m=h.get(d),w=!0);const b=`${e.getDocId()}_s${e.createFontId()}`;if(!m){if(!(0,n.validateFontName)(f))return t.set(p,null),null;const e=/bold/gi.test(f),s=/oblique|italic/gi.test(f);return g={css:b,guessFallback:!0,loadedName:b,baseFontName:f,src:`local(${f})`,style:e&&s&&c||e&&o||s&&a||r},t.set(p,g),g}const y=[];w&&(0,n.validateFontName)(f)&&y.push(`local(${f})`);const{style:A,ultimate:v}=u(m,y,s),x=null===v;return g={css:`${b}${x?"":`,${v}`}`,guessFallback:x,loadedName:b,baseFontName:f,src:y.join(","),style:A},t.set(p,g),g};var i=s(38),n=s(3);const r={style:"normal",weight:"normal"},o={style:"normal",weight:"bold"},a={style:"italic",weight:"normal"},c={style:"italic",weight:"bold"},h=new Map([["Times-Roman",{local:["Times New Roman","Times-Roman","Times","Liberation Serif","Nimbus Roman","Nimbus Roman L","Tinos","Thorndale","TeX Gyre Termes","FreeSerif","DejaVu Serif","Bitstream Vera Serif","Ubuntu"],style:r,ultimate:"serif"}],["Times-Bold",{alias:"Times-Roman",style:o,ultimate:"serif"}],["Times-Italic",{alias:"Times-Roman",style:a,ultimate:"serif"}],["Times-BoldItalic",{alias:"Times-Roman",style:c,ultimate:"serif"}],["Helvetica",{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"],path:"LiberationSans-Regular.ttf",style:r,ultimate:"sans-serif"}],["Helvetica-Bold",{alias:"Helvetica",path:"LiberationSans-Bold.ttf",style:o,ultimate:"sans-serif"}],["Helvetica-Oblique",{alias:"Helvetica",path:"LiberationSans-Italic.ttf",style:a,ultimate:"sans-serif"}],["Helvetica-BoldOblique",{alias:"Helvetica",path:"LiberationSans-BoldItalic.ttf",style:c,ultimate:"sans-serif"}],["Courier",{local:["Courier","Courier New","Liberation Mono","Nimbus Mono","Nimbus Mono L","Cousine","Cumberland","TeX Gyre Cursor","FreeMono"],style:r,ultimate:"monospace"}],["Courier-Bold",{alias:"Courier",style:o,ultimate:"monospace"}],["Courier-Oblique",{alias:"Courier",style:a,ultimate:"monospace"}],["Courier-BoldOblique",{alias:"Courier",style:c,ultimate:"monospace"}],["ArialBlack",{local:["Arial Black"],style:{style:"normal",weight:"900"},fallback:"Helvetica-Bold"}],["ArialBlack-Bold",{alias:"ArialBlack"}],["ArialBlack-Italic",{alias:"ArialBlack",style:{style:"italic",weight:"900"},fallback:"Helvetica-BoldOblique"}],["ArialBlack-BoldItalic",{alias:"ArialBlack-Italic"}],["ArialNarrow",{local:["Arial Narrow","Liberation Sans Narrow","Helvetica Condensed","Nimbus Sans Narrow","TeX Gyre Heros Cn"],style:r,fallback:"Helvetica"}],["ArialNarrow-Bold",{alias:"ArialNarrow",style:o,fallback:"Helvetica-Bold"}],["ArialNarrow-Italic",{alias:"ArialNarrow",style:a,fallback:"Helvetica-Oblique"}],["ArialNarrow-BoldItalic",{alias:"ArialNarrow",style:c,fallback:"Helvetica-BoldOblique"}],["Calibri",{local:["Calibri","Carlito"],style:r,fallback:"Helvetica"}],["Calibri-Bold",{alias:"Calibri",style:o,fallback:"Helvetica-Bold"}],["Calibri-Italic",{alias:"Calibri",style:a,fallback:"Helvetica-Oblique"}],["Calibri-BoldItalic",{alias:"Calibri",style:c,fallback:"Helvetica-BoldOblique"}],["Wingdings",{local:["Wingdings","URW Dingbats"],style:r}],["Wingdings-Regular",{alias:"Wingdings"}],["Wingdings-Bold",{alias:"Wingdings"}]]),l=new Map([["Arial-Black","ArialBlack"]]);function u({alias:t,local:e,path:s,fallback:i,style:n,ultimate:r},l,f,d=!0,p=!0,g=""){const m={style:null,ultimate:null};if(e){const t=g?` ${g}`:"";for(const s of e)l.push(`local(${s}${t})`)}if(t){const e=h.get(t),r=g||function(t){switch(t){case o:return"Bold";case a:return"Italic";case c:return"Bold Italic";default:if("bold"===t?.weight)return"Bold";if("italic"===t?.style)return"Italic"}return""}(n);Object.assign(m,u(e,l,f,d&&!i,p&&!s,r))}if(n&&(m.style=n),r&&(m.ultimate=r),d&&i){const t=h.get(i),{ultimate:e}=u(t,l,f,d,p&&!s,g);m.ultimate||=e}return p&&s&&f&&l.push(`url(${f}${s})`),m}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ImageResizer=void 0;var i=s(2);class n{constructor(t,e){this._imgData=t,this._isMask=e}static needsToBeResized(t,e){if(t<=this._goodSquareLength&&e<=this._goodSquareLength)return!1;const{MAX_DIM:s}=this;if(t>s||e>s)return!0;const i=t*e;return this._hasMaxArea?i>this.MAX_AREA:!(i<this._goodSquareLength**2)&&(this._areGoodDims(t,e)?(this._goodSquareLength=Math.max(this._goodSquareLength,Math.floor(Math.sqrt(t*e))),!1):(this._goodSquareLength=this._guessMax(this._goodSquareLength,s,128,0),i>(this.MAX_AREA=this._goodSquareLength**2)))}static get MAX_DIM(){return(0,i.shadow)(this,"MAX_DIM",this._guessMax(2048,65537,0,1))}static get MAX_AREA(){return this._hasMaxArea=!0,(0,i.shadow)(this,"MAX_AREA",this._guessMax(n._goodSquareLength,this.MAX_DIM,128,0)**2)}static set MAX_AREA(t){t>=0&&(this._hasMaxArea=!0,(0,i.shadow)(this,"MAX_AREA",t))}static setMaxArea(t){this._hasMaxArea||(this.MAX_AREA=t>>2)}static _areGoodDims(t,e){try{const s=new OffscreenCanvas(t,e),i=s.getContext("2d");i.fillRect(0,0,1,1);const n=i.getImageData(0,0,1,1).data[3];return s.width=s.height=1,0!==n}catch{return!1}}static _guessMax(t,e,s,i){for(;t+s+1<e;){const s=Math.floor((t+e)/2);this._areGoodDims(s,i||s)?t=s:e=s}return t}static async createImage(t,e=!1){return new n(t,e)._createImage()}async _createImage(){const t=this._encodeBMP(),e=new Blob([t.buffer],{type:"image/bmp"}),s=createImageBitmap(e),{MAX_AREA:i,MAX_DIM:r}=n,{_imgData:o}=this,{width:a,height:c}=o,h=Math.max(a/r,c/r,Math.sqrt(a*c/i)),l=Math.max(h,2),u=Math.round(10*(h+1.25))/10/l,f=Math.floor(Math.log2(u)),d=new Array(f+2).fill(2);d[0]=l,d.splice(-1,1,u/(1<<f));let p=a,g=c,m=await s;for(const t of d){const e=p,s=g;p=Math.floor(p/t)-1,g=Math.floor(g/t)-1;const i=new OffscreenCanvas(p,g);i.getContext("2d").drawImage(m,0,0,e,s,0,0,p,g),m=i.transferToImageBitmap()}return o.data=null,o.bitmap=m,o.width=p,o.height=g,o}_encodeBMP(){const{width:t,height:e,kind:s}=this._imgData;let n,r=this._imgData.data,o=new Uint8Array(0),a=o,c=0;switch(s){case i.ImageKind.GRAYSCALE_1BPP:{n=1,o=new Uint8Array(this._isMask?[255,255,255,255,0,0,0,0]:[0,0,0,0,255,255,255,255]);const s=t+7>>3,i=s+3&-4;if(s!==i){const t=new Uint8Array(i*e);let n=0;for(let o=0,a=e*s;o<a;o+=s,n+=i)t.set(r.subarray(o,o+s),n);r=t}break}case i.ImageKind.RGB_24BPP:if(n=24,3&t){const s=3*t,i=s+3&-4,n=i-s,o=new Uint8Array(i*e);let a=0;for(let t=0,i=e*s;t<i;t+=s){const e=r.subarray(t,t+s);for(let t=0;t<s;t+=3)o[a++]=e[t+2],o[a++]=e[t+1],o[a++]=e[t];a+=n}r=o}else for(let t=0,e=r.length;t<e;t+=3){const e=r[t];r[t]=r[t+2],r[t+2]=e}break;case i.ImageKind.RGBA_32BPP:n=32,c=3,a=new Uint8Array(68);const s=new DataView(a.buffer);i.FeatureTest.isLittleEndian?(s.setUint32(0,255,!0),s.setUint32(4,65280,!0),s.setUint32(8,16711680,!0),s.setUint32(12,4278190080,!0)):(s.setUint32(0,4278190080,!0),s.setUint32(4,16711680,!0),s.setUint32(8,65280,!0),s.setUint32(12,255,!0));break;default:throw new Error("invalid format")}let h=0;const l=40+a.length,u=14+l+o.length+r.length,f=new Uint8Array(u),d=new DataView(f.buffer);return d.setUint16(h,19778,!0),h+=2,d.setUint32(h,u,!0),h+=4,d.setUint32(h,0,!0),h+=4,d.setUint32(h,14+l+o.length,!0),h+=4,d.setUint32(h,l,!0),h+=4,d.setInt32(h,t,!0),h+=4,d.setInt32(h,-e,!0),h+=4,d.setUint16(h,1,!0),h+=2,d.setUint16(h,n,!0),h+=2,d.setUint32(h,c,!0),h+=4,d.setUint32(h,0,!0),h+=4,d.setInt32(h,0,!0),h+=4,d.setInt32(h,0,!0),h+=4,d.setUint32(h,o.length/4,!0),h+=4,d.setUint32(h,0,!0),h+=4,f.set(a,h),h+=a.length,f.set(o,h),h+=o.length,f.set(r,h),f}}e.ImageResizer=n,n._goodSquareLength=2048},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MurmurHash3_64=void 0;var i=s(2);const n=3285377520,r=4294901760,o=65535;e.MurmurHash3_64=class{constructor(t){this.h1=t?4294967295&t:n,this.h2=t?4294967295&t:n}update(t){let e,s;if("string"==typeof t){e=new Uint8Array(2*t.length),s=0;for(let i=0,n=t.length;i<n;i++){const n=t.charCodeAt(i);n<=255?e[s++]=n:(e[s++]=n>>>8,e[s++]=255&n)}}else{if(!(0,i.isArrayBuffer)(t))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");e=t.slice(),s=e.byteLength}const n=s>>2,a=s-4*n,c=new Uint32Array(e.buffer,0,n);let h=0,l=0,u=this.h1,f=this.h2;const d=3432918353,p=461845907,g=11601,m=13715;for(let t=0;t<n;t++)1&t?(h=c[t],h=h*d&r|h*g&o,h=h<<15|h>>>17,h=h*p&r|h*m&o,u^=h,u=u<<13|u>>>19,u=5*u+3864292196):(l=c[t],l=l*d&r|l*g&o,l=l<<15|l>>>17,l=l*p&r|l*m&o,f^=l,f=f<<13|f>>>19,f=5*f+3864292196);switch(h=0,a){case 3:h^=e[4*n+2]<<16;case 2:h^=e[4*n+1]<<8;case 1:h^=e[4*n],h=h*d&r|h*g&o,h=h<<15|h>>>17,h=h*p&r|h*m&o,1&n?u^=h:f^=h}this.h1=u,this.h2=f}hexdigest(){let t=this.h1,e=this.h2;return t^=e>>>1,t=3981806797*t&r|36045*t&o,e=4283543511*e&r|(2950163797*(e<<16|t>>>16)&r)>>>16,t^=e>>>1,t=444984403*t&r|60499*t&o,e=3301882366*e&r|(3120437893*(e<<16|t>>>16)&r)>>>16,t^=e>>>1,(t>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.OperatorList=void 0;var i=s(2);function n(t,e,s,i,n){let r=t;for(let t=0,s=e.length-1;t<s;t++){const s=e[t];r=r[s]||=[]}r[e.at(-1)]={checkFn:s,iterateFn:i,processFn:n}}const r=[];n(r,[i.OPS.save,i.OPS.transform,i.OPS.paintInlineImageXObject,i.OPS.restore],null,(function(t,e){const s=t.fnArray,n=(e-(t.iCurr-3))%4;switch(n){case 0:return s[e]===i.OPS.save;case 1:return s[e]===i.OPS.transform;case 2:return s[e]===i.OPS.paintInlineImageXObject;case 3:return s[e]===i.OPS.restore}throw new Error(`iterateInlineImageGroup - invalid pos: ${n}`)}),(function(t,e){const s=t.fnArray,n=t.argsArray,r=t.iCurr,o=r-3,a=r-2,c=r-1,h=Math.min(Math.floor((e-o)/4),200);if(h<10)return e-(e-o)%4;let l=0;const u=[];let f=0,d=1,p=1;for(let t=0;t<h;t++){const e=n[a+(t<<2)],s=n[c+(t<<2)][0];d+s.width>1e3&&(l=Math.max(l,d),p+=f+2,d=0,f=0),u.push({transform:e,x:d,y:p,w:s.width,h:s.height}),d+=s.width+2,f=Math.max(f,s.height)}const g=Math.max(l,d)+1,m=p+f+1,w=new Uint8Array(g*m*4),b=g<<2;for(let t=0;t<h;t++){const e=n[c+(t<<2)][0].data,s=u[t].w<<2;let i=0,r=u[t].x+u[t].y*g<<2;w.set(e.subarray(0,s),r-b);for(let n=0,o=u[t].h;n<o;n++)w.set(e.subarray(i,i+s),r),i+=s,r+=b;for(w.set(e.subarray(i-s,i),r);r>=0;)e[r-4]=e[r],e[r-3]=e[r+1],e[r-2]=e[r+2],e[r-1]=e[r+3],e[r+s]=e[r+s-4],e[r+s+1]=e[r+s-3],e[r+s+2]=e[r+s-2],e[r+s+3]=e[r+s-1],r-=b}const y={width:g,height:m};if(t.isOffscreenCanvasSupported){const t=new OffscreenCanvas(g,m);t.getContext("2d").putImageData(new ImageData(new Uint8ClampedArray(w.buffer),g,m),0,0),y.bitmap=t.transferToImageBitmap(),y.data=null}else y.kind=i.ImageKind.RGBA_32BPP,y.data=w;return s.splice(o,4*h,i.OPS.paintInlineImageXObjectGroup),n.splice(o,4*h,[y,u]),o+1})),n(r,[i.OPS.save,i.OPS.transform,i.OPS.paintImageMaskXObject,i.OPS.restore],null,(function(t,e){const s=t.fnArray,n=(e-(t.iCurr-3))%4;switch(n){case 0:return s[e]===i.OPS.save;case 1:return s[e]===i.OPS.transform;case 2:return s[e]===i.OPS.paintImageMaskXObject;case 3:return s[e]===i.OPS.restore}throw new Error(`iterateImageMaskGroup - invalid pos: ${n}`)}),(function(t,e){const s=t.fnArray,n=t.argsArray,r=t.iCurr,o=r-3,a=r-2,c=r-1;let h=Math.floor((e-o)/4);if(h<10)return e-(e-o)%4;let l,u,f=!1;const d=n[c][0],p=n[a][0],g=n[a][1],m=n[a][2],w=n[a][3];if(g===m){f=!0,l=a+4;let t=c+4;for(let e=1;e<h;e++,l+=4,t+=4)if(u=n[l],n[t][0]!==d||u[0]!==p||u[1]!==g||u[2]!==m||u[3]!==w){e<10?f=!1:h=e;break}}if(f){h=Math.min(h,1e3);const t=new Float32Array(2*h);l=a;for(let e=0;e<h;e++,l+=4)u=n[l],t[e<<1]=u[4],t[1+(e<<1)]=u[5];s.splice(o,4*h,i.OPS.paintImageMaskXObjectRepeat),n.splice(o,4*h,[d,p,g,m,w,t])}else{h=Math.min(h,100);const t=[];for(let e=0;e<h;e++){u=n[a+(e<<2)];const s=n[c+(e<<2)][0];t.push({data:s.data,width:s.width,height:s.height,interpolate:s.interpolate,count:s.count,transform:u})}s.splice(o,4*h,i.OPS.paintImageMaskXObjectGroup),n.splice(o,4*h,[t])}return o+1})),n(r,[i.OPS.save,i.OPS.transform,i.OPS.paintImageXObject,i.OPS.restore],(function(t){const e=t.argsArray,s=t.iCurr-2;return 0===e[s][1]&&0===e[s][2]}),(function(t,e){const s=t.fnArray,n=t.argsArray,r=(e-(t.iCurr-3))%4;switch(r){case 0:return s[e]===i.OPS.save;case 1:if(s[e]!==i.OPS.transform)return!1;const r=t.iCurr-2;return n[e][0]===n[r][0]&&0===n[e][1]&&0===n[e][2]&&n[e][3]===n[r][3];case 2:return s[e]===i.OPS.paintImageXObject&&n[e][0]===n[t.iCurr-1][0];case 3:return s[e]===i.OPS.restore}throw new Error(`iterateImageGroup - invalid pos: ${r}`)}),(function(t,e){const s=t.fnArray,n=t.argsArray,r=t.iCurr,o=r-3,a=r-2,c=n[r-1][0],h=n[a][0],l=n[a][3],u=Math.min(Math.floor((e-o)/4),1e3);if(u<3)return e-(e-o)%4;const f=new Float32Array(2*u);let d=a;for(let t=0;t<u;t++,d+=4){const e=n[d];f[t<<1]=e[4],f[1+(t<<1)]=e[5]}const p=[c,h,l,f];return s.splice(o,4*u,i.OPS.paintImageXObjectRepeat),n.splice(o,4*u,p),o+1})),n(r,[i.OPS.beginText,i.OPS.setFont,i.OPS.setTextMatrix,i.OPS.showText,i.OPS.endText],null,(function(t,e){const s=t.fnArray,n=t.argsArray,r=(e-(t.iCurr-4))%5;switch(r){case 0:return s[e]===i.OPS.beginText;case 1:return s[e]===i.OPS.setFont;case 2:return s[e]===i.OPS.setTextMatrix;case 3:if(s[e]!==i.OPS.showText)return!1;const r=t.iCurr-3;return n[e][0]===n[r][0]&&n[e][1]===n[r][1];case 4:return s[e]===i.OPS.endText}throw new Error(`iterateShowTextGroup - invalid pos: ${r}`)}),(function(t,e){const s=t.fnArray,i=t.argsArray,n=t.iCurr,r=n-4,o=n-3,a=n-2,c=n-1,h=n,l=i[o][0],u=i[o][1];let f=Math.min(Math.floor((e-r)/5),1e3);if(f<3)return e-(e-r)%5;let d=r;r>=4&&s[r-4]===s[o]&&s[r-3]===s[a]&&s[r-2]===s[c]&&s[r-1]===s[h]&&i[r-4][0]===l&&i[r-4][1]===u&&(f++,d-=5);let p=d+4;for(let t=1;t<f;t++)s.splice(p,3),i.splice(p,3),p+=2;return p+1}));class o{constructor(t){this.queue=t}_optimize(){}push(t,e){this.queue.fnArray.push(t),this.queue.argsArray.push(e),this._optimize()}flush(){}reset(){}}class a extends o{constructor(t){super(t),this.state=null,this.context={iCurr:0,fnArray:t.fnArray,argsArray:t.argsArray,isOffscreenCanvasSupported:!1},this.match=null,this.lastProcessed=0}set isOffscreenCanvasSupported(t){this.context.isOffscreenCanvasSupported=t}_optimize(){const t=this.queue.fnArray;let e=this.lastProcessed,s=t.length,i=this.state,n=this.match;if(!i&&!n&&e+1===s&&!r[t[e]])return void(this.lastProcessed=s);const o=this.context;for(;e<s;){if(n){if((0,n.iterateFn)(o,e)){e++;continue}if(e=(0,n.processFn)(o,e+1),s=t.length,n=null,i=null,e>=s)break}i=(i||r)[t[e]],i&&!Array.isArray(i)?(o.iCurr=e,e++,!i.checkFn||(0,i.checkFn)(o)?(n=i,i=null):i=null):e++}this.state=i,this.match=n,this.lastProcessed=e}flush(){for(;this.match;)this.lastProcessed=(0,this.match.processFn)(this.context,this.queue.fnArray.length),this.match=null,this.state=null,this._optimize()}reset(){this.state=null,this.match=null,this.lastProcessed=0}}class c{static CHUNK_SIZE=1e3;static CHUNK_SIZE_ABOUT=this.CHUNK_SIZE-5;constructor(t=0,e){this._streamSink=e,this.fnArray=[],this.argsArray=[],this.optimizer=!e||t&i.RenderingIntentFlag.OPLIST?new o(this):new a(this),this.dependencies=new Set,this._totalLength=0,this.weight=0,this._resolved=e?null:Promise.resolve()}set isOffscreenCanvasSupported(t){this.optimizer.isOffscreenCanvasSupported=t}get length(){return this.argsArray.length}get ready(){return this._resolved||this._streamSink.ready}get totalLength(){return this._totalLength+this.length}addOp(t,e){this.optimizer.push(t,e),this.weight++,this._streamSink&&(this.weight>=c.CHUNK_SIZE||this.weight>=c.CHUNK_SIZE_ABOUT&&(t===i.OPS.restore||t===i.OPS.endText))&&this.flush()}addImageOps(t,e,s){void 0!==s&&this.addOp(i.OPS.beginMarkedContentProps,["OC",s]),this.addOp(t,e),void 0!==s&&this.addOp(i.OPS.endMarkedContent,[])}addDependency(t){this.dependencies.has(t)||(this.dependencies.add(t),this.addOp(i.OPS.dependency,[t]))}addDependencies(t){for(const e of t)this.addDependency(e)}addOpList(t){if(t instanceof c){for(const e of t.dependencies)this.dependencies.add(e);for(let e=0,s=t.length;e<s;e++)this.addOp(t.fnArray[e],t.argsArray[e])}else(0,i.warn)('addOpList - ignoring invalid "opList" parameter.')}getIR(){return{fnArray:this.fnArray,argsArray:this.argsArray,length:this.length}}get _transfers(){const t=[],{fnArray:e,argsArray:s,length:n}=this;for(let r=0;r<n;r++)switch(e[r]){case i.OPS.paintInlineImageXObject:case i.OPS.paintInlineImageXObjectGroup:case i.OPS.paintImageMaskXObject:const e=s[r][0];!e.cached&&e.data?.buffer instanceof ArrayBuffer&&t.push(e.data.buffer)}return t}flush(t=!1,e=null){this.optimizer.flush();const s=this.length;this._totalLength+=s,this._streamSink.enqueue({fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:t,separateAnnots:e,length:s},1,this._transfers),this.dependencies.clear(),this.fnArray.length=0,this.argsArray.length=0,this.weight=0,this.optimizer.reset()}}e.OperatorList=c},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFImage=void 0;var i=s(2),n=s(28),r=s(5),o=s(12),a=s(18),c=s(62),h=s(26),l=s(30),u=s(4);function f(t,e,s,i){return(t=e+t*s)<0?t=0:t>i&&(t=i),t}function d(t,e,s,i,n,r){const o=n*r;let a;a=e<=8?new Uint8Array(o):e<=16?new Uint16Array(o):new Uint32Array(o);const c=s/n,h=i/r;let l,u,f,d,p=0;const g=new Uint16Array(n),m=s;for(l=0;l<n;l++)g[l]=Math.floor(l*c);for(l=0;l<r;l++)for(f=Math.floor(l*h)*m,u=0;u<n;u++)d=f+g[u],a[p++]=t[d];return a}class p{constructor({xref:t,res:e,image:s,isInline:n=!1,smask:a=null,mask:c=null,isMask:h=!1,pdfFunctionFactory:f,localColorSpaceCache:d}){this.image=s;const g=s.dict,m=g.get("F","Filter");let w;if(m instanceof u.Name)w=m.name;else if(Array.isArray(m)){const e=t.fetchIfRef(m[0]);e instanceof u.Name&&(w=e.name)}switch(w){case"JPXDecode":const t=new l.JpxImage;t.parseImageProperties(s.stream),s.stream.reset(),s.width=t.width,s.height=t.height,s.bitsPerComponent=t.bitsPerComponent,s.numComps=t.componentsCount;break;case"JBIG2Decode":s.bitsPerComponent=1,s.numComps=1}let b=g.get("W","Width"),y=g.get("H","Height");if(Number.isInteger(s.width)&&s.width>0&&Number.isInteger(s.height)&&s.height>0&&(s.width!==b||s.height!==y)&&((0,i.warn)("PDFImage - using the Width/Height of the image data, rather than the image dictionary."),b=s.width,y=s.height),b<1||y<1)throw new i.FormatError(`Invalid image width: ${b} or height: ${y}`);this.width=b,this.height=y,this.interpolate=g.get("I","Interpolate"),this.imageMask=g.get("IM","ImageMask")||!1,this.matte=g.get("Matte")||!1;let A=s.bitsPerComponent;if(!A&&(A=g.get("BPC","BitsPerComponent"),!A)){if(!this.imageMask)throw new i.FormatError(`Bits per component missing in image: ${this.imageMask}`);A=1}if(this.bpc=A,!this.imageMask){let r=g.getRaw("CS")||g.getRaw("ColorSpace");if(!r)switch((0,i.info)("JPX images (which do not require color spaces)"),s.numComps){case 1:r=u.Name.get("DeviceGray");break;case 3:r=u.Name.get("DeviceRGB");break;case 4:r=u.Name.get("DeviceCMYK");break;default:throw new Error(`JPX images with ${s.numComps} color components not supported.`)}this.colorSpace=o.ColorSpace.parse({cs:r,xref:t,resources:n?e:null,pdfFunctionFactory:f,localColorSpaceCache:d}),this.numComps=this.colorSpace.numComps}if(this.decode=g.getArray("D","Decode"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,A)||h&&!o.ColorSpace.isDefaultDecode(this.decode,1))){this.needsDecode=!0;const t=(1<<A)-1;this.decodeCoefficients=[],this.decodeAddends=[];const e="Indexed"===this.colorSpace?.name;for(let s=0,i=0;s<this.decode.length;s+=2,++i){const n=this.decode[s],r=this.decode[s+1];this.decodeCoefficients[i]=e?(r-n)/t:r-n,this.decodeAddends[i]=e?n:t*n}}a?this.smask=new p({xref:t,res:e,image:a,isInline:n,pdfFunctionFactory:f,localColorSpaceCache:d}):c&&(c instanceof r.BaseStream?c.dict.get("IM","ImageMask")?this.mask=new p({xref:t,res:e,image:c,isInline:n,isMask:!0,pdfFunctionFactory:f,localColorSpaceCache:d}):(0,i.warn)("Ignoring /Mask in image without /ImageMask."):this.mask=c)}static async buildImage({xref:t,res:e,image:s,isInline:n=!1,pdfFunctionFactory:o,localColorSpaceCache:a}){const c=s;let h=null,l=null;const u=s.dict.get("SMask"),f=s.dict.get("Mask");return u?u instanceof r.BaseStream?h=u:(0,i.warn)("Unsupported /SMask format."):f&&(f instanceof r.BaseStream||Array.isArray(f)?l=f:(0,i.warn)("Unsupported /Mask format.")),new p({xref:t,res:e,image:c,isInline:n,smask:h,mask:l,pdfFunctionFactory:o,localColorSpaceCache:a})}static createRawMask({imgArray:t,width:e,height:s,imageIsFromDecodeStream:i,inverseDecode:n,interpolate:r}){const o=(e+7>>3)*s,a=t.byteLength;let c,h;if(!i||n&&o!==a?n?(c=new Uint8Array(o),c.set(t),c.fill(255,a)):c=new Uint8Array(t):c=t,n)for(h=0;h<a;h++)c[h]^=255;return{data:c,width:e,height:s,interpolate:r}}static async createMask({imgArray:t,width:e,height:s,imageIsFromDecodeStream:r,inverseDecode:o,interpolate:a,isOffscreenCanvasSupported:h=!1}){const l=1===e&&1===s&&o===(0===t.length||!!(128&t[0]));if(l)return{isSingleOpaquePixel:l};if(h){if(c.ImageResizer.needsToBeResized(e,s)){const r=new Uint8ClampedArray(e*s*4);return(0,n.convertBlackAndWhiteToRGBA)({src:t,dest:r,width:e,height:s,nonBlackColor:0,inverseDecode:o}),c.ImageResizer.createImage({kind:i.ImageKind.RGBA_32BPP,data:r,width:e,height:s,interpolate:a})}const r=new OffscreenCanvas(e,s),h=r.getContext("2d"),l=h.createImageData(e,s);return(0,n.convertBlackAndWhiteToRGBA)({src:t,dest:l.data,width:e,height:s,nonBlackColor:0,inverseDecode:o}),h.putImageData(l,0,0),{data:null,width:e,height:s,interpolate:a,bitmap:r.transferToImageBitmap()}}return this.createRawMask({imgArray:t,width:e,height:s,inverseDecode:o,imageIsFromDecodeStream:r,interpolate:a})}get drawWidth(){return Math.max(this.width,this.smask?.width||0,this.mask?.width||0)}get drawHeight(){return Math.max(this.height,this.smask?.height||0,this.mask?.height||0)}decodeBuffer(t){const e=this.bpc,s=this.numComps,i=this.decodeAddends,n=this.decodeCoefficients,r=(1<<e)-1;let o,a;if(1===e){for(o=0,a=t.length;o<a;o++)t[o]=+!t[o];return}let c=0;for(o=0,a=this.width*this.height;o<a;o++)for(let e=0;e<s;e++)t[c]=f(t[c],i[e],n[e],r),c++}getComponents(t){const e=this.bpc;if(8===e)return t;const s=this.width,i=this.height,n=this.numComps,r=s*i*n;let o,a=0;o=e<=8?new Uint8Array(r):e<=16?new Uint16Array(r):new Uint32Array(r);const c=s*n,h=(1<<e)-1;let l,u,f=0;if(1===e){let e,s,n;for(let r=0;r<i;r++){for(s=f+(-8&c),n=f+c;f<s;)u=t[a++],o[f]=u>>7&1,o[f+1]=u>>6&1,o[f+2]=u>>5&1,o[f+3]=u>>4&1,o[f+4]=u>>3&1,o[f+5]=u>>2&1,o[f+6]=u>>1&1,o[f+7]=1&u,f+=8;if(f<n)for(u=t[a++],e=128;f<n;)o[f++]=+!!(u&e),e>>=1}}else{let s=0;for(u=0,f=0,l=r;f<l;++f){for(f%c==0&&(u=0,s=0);s<e;)u=u<<8|t[a++],s+=8;const i=s-e;let n=u>>i;n<0?n=0:n>h&&(n=h),o[f]=n,u&=(1<<i)-1,s=i}}return o}fillOpacity(t,e,s,n,r){const o=this.smask,a=this.mask;let c,h,l,u,f,g;if(o)h=o.width,l=o.height,c=new Uint8ClampedArray(h*l),o.fillGrayBuffer(c),h===e&&l===s||(c=d(c,o.bpc,h,l,e,s));else if(a)if(a instanceof p){for(h=a.width,l=a.height,c=new Uint8ClampedArray(h*l),a.numComps=1,a.fillGrayBuffer(c),u=0,f=h*l;u<f;++u)c[u]=255-c[u];h===e&&l===s||(c=d(c,a.bpc,h,l,e,s))}else{if(!Array.isArray(a))throw new i.FormatError("Unknown mask format.");{c=new Uint8ClampedArray(e*s);const t=this.numComps;for(u=0,f=e*s;u<f;++u){let e=0;const s=u*t;for(g=0;g<t;++g){const t=r[s+g],i=2*g;if(t<a[i]||t>a[i+1]){e=255;break}}c[u]=e}}}if(c)for(u=0,g=3,f=e*n;u<f;++u,g+=4)t[g]=c[u];else for(u=0,g=3,f=e*n;u<f;++u,g+=4)t[g]=255}undoPreblend(t,e,s){const i=this.smask?.matte;if(!i)return;const n=this.colorSpace.getRgb(i,0),r=n[0],o=n[1],a=n[2],c=e*s*4;for(let e=0;e<c;e+=4){const s=t[e+3];if(0===s){t[e]=255,t[e+1]=255,t[e+2]=255;continue}const i=255/s;t[e]=(t[e]-r)*i+r,t[e+1]=(t[e+1]-o)*i+o,t[e+2]=(t[e+2]-a)*i+a}}async createImageData(t=!1,e=!1){const s=this.drawWidth,n=this.drawHeight,r={width:s,height:n,interpolate:this.interpolate,kind:0,data:null},o=this.width,a=this.height,l=this.bpc,u=o*this.numComps*l+7>>3,f=e&&c.ImageResizer.needsToBeResized(s,n);if(!t){let t;if("DeviceGray"===this.colorSpace.name&&1===l?t=i.ImageKind.GRAYSCALE_1BPP:"DeviceRGB"!==this.colorSpace.name||8!==l||this.needsDecode||(t=i.ImageKind.RGB_24BPP),t&&!this.smask&&!this.mask&&s===o&&n===a){const h=this.getImageBytes(a*u,{});if(e)return f?c.ImageResizer.createImage({data:h,kind:t,width:s,height:n,interpolate:this.interpolate},this.needsDecode):this.createBitmap(t,o,a,h);if(r.kind=t,r.data=h,this.needsDecode){(0,i.assert)(t===i.ImageKind.GRAYSCALE_1BPP,"PDFImage.createImageData: The image must be grayscale.");const e=r.data;for(let t=0,s=e.length;t<s;t++)e[t]^=255}return r}if(this.image instanceof h.JpegStream&&!this.smask&&!this.mask&&!this.needsDecode){let t=a*u;if(e&&!f){let e=!1;switch(this.colorSpace.name){case"DeviceGray":t*=4,e=!0;break;case"DeviceRGB":t=t/3*4,e=!0;break;case"DeviceCMYK":e=!0}if(e){const e=this.getImageBytes(t,{drawWidth:s,drawHeight:n,forceRGBA:!0});return this.createBitmap(i.ImageKind.RGBA_32BPP,s,n,e)}}else switch(this.colorSpace.name){case"DeviceGray":t*=3;case"DeviceRGB":case"DeviceCMYK":return r.kind=i.ImageKind.RGB_24BPP,r.data=this.getImageBytes(t,{drawWidth:s,drawHeight:n,forceRGB:!0}),f?c.ImageResizer.createImage(r):r}}}const d=this.getImageBytes(a*u,{internal:!0}),p=0|d.length/u*n/a,g=this.getComponents(d);let m,w,b,y,A,v;return e&&!f&&(b=new OffscreenCanvas(s,n),y=b.getContext("2d"),A=y.createImageData(s,n),v=A.data),r.kind=i.ImageKind.RGBA_32BPP,t||this.smask||this.mask?(e&&!f||(v=new Uint8ClampedArray(s*n*4)),m=1,w=!0,this.fillOpacity(v,s,n,p,g)):(!e||f?(r.kind=i.ImageKind.RGB_24BPP,v=new Uint8ClampedArray(s*n*3),m=0):(new Uint32Array(v.buffer).fill(i.FeatureTest.isLittleEndian?4278190080:255),m=1),w=!1),this.needsDecode&&this.decodeBuffer(g),this.colorSpace.fillRgb(v,o,a,s,n,p,l,g,m),w&&this.undoPreblend(v,s,p),e&&!f?(y.putImageData(A,0,0),{data:null,width:s,height:n,bitmap:b.transferToImageBitmap(),interpolate:this.interpolate}):(r.data=v,f?c.ImageResizer.createImage(r):r)}fillGrayBuffer(t){const e=this.numComps;if(1!==e)throw new i.FormatError(`Reading gray scale from a color image: ${e}`);const s=this.width,n=this.height,r=this.bpc,o=this.getImageBytes(n*(s*e*r+7>>3),{internal:!0}),a=this.getComponents(o);let c,h;if(1===r){if(h=s*n,this.needsDecode)for(c=0;c<h;++c)t[c]=a[c]-1&255;else for(c=0;c<h;++c)t[c]=255&-a[c];return}this.needsDecode&&this.decodeBuffer(a),h=s*n;const l=255/((1<<r)-1);for(c=0;c<h;++c)t[c]=l*a[c]}createBitmap(t,e,s,r){const o=new OffscreenCanvas(e,s),a=o.getContext("2d");let c;return t===i.ImageKind.RGBA_32BPP?c=new ImageData(r,e,s):(c=a.createImageData(e,s),(0,n.convertToRGBA)({kind:t,src:r,dest:new Uint32Array(c.data.buffer),width:e,height:s,inverseDecode:this.needsDecode})),a.putImageData(c,0,0),{data:null,width:e,height:s,bitmap:o.transferToImageBitmap(),interpolate:this.interpolate}}getImageBytes(t,{drawWidth:e,drawHeight:s,forceRGBA:n=!1,forceRGB:r=!1,internal:o=!1}){this.image.reset(),this.image.drawWidth=e||this.width,this.image.drawHeight=s||this.height,this.image.forceRGBA=!!n,this.image.forceRGB=!!r;const c=this.image.getBytes(t);return o||this.image instanceof a.DecodeStream?c:((0,i.assert)(c instanceof Uint8Array,'PDFImage.getImageBytes: Unsupported "imageBytes" type.'),new Uint8Array(c))}}e.PDFImage=p},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Catalog=void 0;var i=s(3),n=s(2),r=s(4),o=s(67),a=s(5),c=s(68),h=s(12),l=s(69),u=s(59),f=s(70),d=s(72);function p(t){return t instanceof r.Dict&&(t=t.get("D")),Array.isArray(t)?t:null}class g{constructor(t,e){if(this.pdfManager=t,this.xref=e,this._catDict=e.getCatalogObj(),!(this._catDict instanceof r.Dict))throw new n.FormatError("Catalog object is not a dictionary.");this._actualNumPages=null,this.fontCache=new r.RefSetCache,this.builtInCMapCache=new Map,this.standardFontDataCache=new Map,this.globalImageCache=new u.GlobalImageCache,this.pageKidsCountCache=new r.RefSetCache,this.pageIndexCache=new r.RefSetCache,this.nonBlendModesSet=new r.RefSet,this.systemFontCache=new Map}cloneDict(){return this._catDict.clone()}get version(){const t=this._catDict.get("Version");if(t instanceof r.Name){if(i.PDF_VERSION_REGEXP.test(t.name))return(0,n.shadow)(this,"version",t.name);(0,n.warn)(`Invalid PDF catalog version: ${t.name}`)}return(0,n.shadow)(this,"version",null)}get lang(){const t=this._catDict.get("Lang");return(0,n.shadow)(this,"lang","string"==typeof t?(0,n.stringToPDFString)(t):null)}get needsRendering(){const t=this._catDict.get("NeedsRendering");return(0,n.shadow)(this,"needsRendering","boolean"==typeof t&&t)}get collection(){let t=null;try{const e=this._catDict.get("Collection");e instanceof r.Dict&&e.size>0&&(t=e)}catch(t){if(t instanceof i.MissingDataException)throw t;(0,n.info)("Cannot fetch Collection entry; assuming no collection is present.")}return(0,n.shadow)(this,"collection",t)}get acroForm(){let t=null;try{const e=this._catDict.get("AcroForm");e instanceof r.Dict&&e.size>0&&(t=e)}catch(t){if(t instanceof i.MissingDataException)throw t;(0,n.info)("Cannot fetch AcroForm entry; assuming no forms are present.")}return(0,n.shadow)(this,"acroForm",t)}get acroFormRef(){const t=this._catDict.getRaw("AcroForm");return(0,n.shadow)(this,"acroFormRef",t instanceof r.Ref?t:null)}get metadata(){const t=this._catDict.getRaw("Metadata");if(!(t instanceof r.Ref))return(0,n.shadow)(this,"metadata",null);let e=null;try{const s=this.xref.fetch(t,!this.xref.encrypt?.encryptMetadata);if(s instanceof a.BaseStream&&s.dict instanceof r.Dict){const t=s.dict.get("Type"),i=s.dict.get("Subtype");if((0,r.isName)(t,"Metadata")&&(0,r.isName)(i,"XML")){const t=(0,n.stringToUTF8String)(s.getString());t&&(e=new f.MetadataParser(t).serializable)}}}catch(t){if(t instanceof i.MissingDataException)throw t;(0,n.info)(`Skipping invalid Metadata: "${t}".`)}return(0,n.shadow)(this,"metadata",e)}get markInfo(){let t=null;try{t=this._readMarkInfo()}catch(t){if(t instanceof i.MissingDataException)throw t;(0,n.warn)("Unable to read mark info.")}return(0,n.shadow)(this,"markInfo",t)}_readMarkInfo(){const t=this._catDict.get("MarkInfo");if(!(t instanceof r.Dict))return null;const e={Marked:!1,UserProperties:!1,Suspects:!1};for(const s in e){const i=t.get(s);"boolean"==typeof i&&(e[s]=i)}return e}get structTreeRoot(){let t=null;try{t=this._readStructTreeRoot()}catch(t){if(t instanceof i.MissingDataException)throw t;(0,n.warn)("Unable read to structTreeRoot info.")}return(0,n.shadow)(this,"structTreeRoot",t)}_readStructTreeRoot(){const t=this._catDict.getRaw("StructTreeRoot"),e=this.xref.fetchIfRef(t);if(!(e instanceof r.Dict))return null;const s=new d.StructTreeRoot(e,t);return s.init(),s}get toplevelPagesDict(){const t=this._catDict.get("Pages");if(!(t instanceof r.Dict))throw new n.FormatError("Invalid top-level pages dictionary.");return(0,n.shadow)(this,"toplevelPagesDict",t)}get documentOutline(){let t=null;try{t=this._readDocumentOutline()}catch(t){if(t instanceof i.MissingDataException)throw t;(0,n.warn)("Unable to read document outline.")}return(0,n.shadow)(this,"documentOutline",t)}_readDocumentOutline(){let t=this._catDict.get("Outlines");if(!(t instanceof r.Dict))return null;if(t=t.getRaw("First"),!(t instanceof r.Ref))return null;const e={items:[]},s=[{obj:t,parent:e}],i=new r.RefSet;i.put(t);const o=this.xref,a=new Uint8ClampedArray(3);for(;s.length>0;){const e=s.shift(),c=o.fetchIfRef(e.obj);if(null===c)continue;if(!c.has("Title"))throw new n.FormatError("Invalid outline item encountered.");const l={url:null,dest:null,action:null};g.parseDestDictionary({destDict:c,resultObj:l,docBaseUrl:this.baseUrl,docAttachments:this.attachments});const u=c.get("Title"),f=c.get("F")||0,d=c.getArray("C"),p=c.get("Count");let m=a;!Array.isArray(d)||3!==d.length||0===d[0]&&0===d[1]&&0===d[2]||(m=h.ColorSpace.singletons.rgb.getRgb(d,0));const w={action:l.action,attachment:l.attachment,dest:l.dest,url:l.url,unsafeUrl:l.unsafeUrl,newWindow:l.newWindow,setOCGState:l.setOCGState,title:(0,n.stringToPDFString)(u),color:m,count:Number.isInteger(p)?p:void 0,bold:!!(2&f),italic:!!(1&f),items:[]};e.parent.items.push(w),t=c.getRaw("First"),t instanceof r.Ref&&!i.has(t)&&(s.push({obj:t,parent:w}),i.put(t)),t=c.getRaw("Next"),t instanceof r.Ref&&!i.has(t)&&(s.push({obj:t,parent:e.parent}),i.put(t))}return e.items.length>0?e.items:null}get permissions(){let t=null;try{t=this._readPermissions()}catch(t){if(t instanceof i.MissingDataException)throw t;(0,n.warn)("Unable to read permissions.")}return(0,n.shadow)(this,"permissions",t)}_readPermissions(){const t=this.xref.trailer.get("Encrypt");if(!(t instanceof r.Dict))return null;let e=t.get("P");if("number"!=typeof e)return null;e+=2**32;const s=[];for(const t in n.PermissionFlag){const i=n.PermissionFlag[t];e&i&&s.push(i)}return s}get optionalContentConfig(){let t=null;try{const e=this._catDict.get("OCProperties");if(!e)return(0,n.shadow)(this,"optionalContentConfig",null);const s=e.get("D");if(!s)return(0,n.shadow)(this,"optionalContentConfig",null);const i=e.get("OCGs");if(!Array.isArray(i))return(0,n.shadow)(this,"optionalContentConfig",null);const o=[],a=[];for(const t of i){if(!(t instanceof r.Ref))continue;a.push(t);const e=this.xref.fetchIfRef(t);o.push({id:t.toString(),name:"string"==typeof e.get("Name")?(0,n.stringToPDFString)(e.get("Name")):null,intent:"string"==typeof e.get("Intent")?(0,n.stringToPDFString)(e.get("Intent")):null})}t=this._readOptionalContentConfig(s,a),t.groups=o}catch(t){if(t instanceof i.MissingDataException)throw t;(0,n.warn)(`Unable to read optional content config: ${t}`)}return(0,n.shadow)(this,"optionalContentConfig",t)}_readOptionalContentConfig(t,e){function s(t){const s=[];if(Array.isArray(t))for(const i of t)i instanceof r.Ref&&e.includes(i)&&s.push(i.toString());return s}function i(t,s=0){if(!Array.isArray(t))return null;const i=[];for(const n of t){if(n instanceof r.Ref&&e.includes(n)){c.put(n),i.push(n.toString());continue}const t=o(n,s);t&&i.push(t)}if(s>0)return i;const n=[];for(const t of e)c.has(t)||n.push(t.toString());return n.length&&i.push({name:null,order:n}),i}function o(t,e){if(++e>h)return(0,n.warn)("parseNestedOrder - reached MAX_NESTED_LEVELS."),null;const s=a.fetchIfRef(t);if(!Array.isArray(s))return null;const r=a.fetchIfRef(s[0]);if("string"!=typeof r)return null;const o=i(s.slice(1),e);return o&&o.length?{name:(0,n.stringToPDFString)(r),order:o}:null}const a=this.xref,c=new r.RefSet,h=10;return{name:"string"==typeof t.get("Name")?(0,n.stringToPDFString)(t.get("Name")):null,creator:"string"==typeof t.get("Creator")?(0,n.stringToPDFString)(t.get("Creator")):null,baseState:t.get("BaseState")instanceof r.Name?t.get("BaseState").name:null,on:s(t.get("ON")),off:s(t.get("OFF")),order:i(t.get("Order")),groups:null}}setActualNumPages(t=null){this._actualNumPages=t}get hasActualNumPages(){return null!==this._actualNumPages}get _pagesCount(){const t=this.toplevelPagesDict.get("Count");if(!Number.isInteger(t))throw new n.FormatError("Page count in top-level pages dictionary is not an integer.");return(0,n.shadow)(this,"_pagesCount",t)}get numPages(){return this.hasActualNumPages?this._actualNumPages:this._pagesCount}get destinations(){const t=this._readDests(),e=Object.create(null);if(t instanceof o.NameTree)for(const[s,i]of t.getAll()){const t=p(i);t&&(e[(0,n.stringToPDFString)(s)]=t)}else t instanceof r.Dict&&t.forEach((function(t,s){const i=p(s);i&&(e[t]=i)}));return(0,n.shadow)(this,"destinations",e)}getDestination(t){const e=this._readDests();if(e instanceof o.NameTree){const s=p(e.get(t));if(s)return s;const i=this.destinations[t];if(i)return(0,n.warn)(`Found "${t}" at an incorrect position in the NameTree.`),i}else if(e instanceof r.Dict){const s=p(e.get(t));if(s)return s}return null}_readDests(){const t=this._catDict.get("Names");return t?.has("Dests")?new o.NameTree(t.getRaw("Dests"),this.xref):this._catDict.has("Dests")?this._catDict.get("Dests"):void 0}get pageLabels(){let t=null;try{t=this._readPageLabels()}catch(t){if(t instanceof i.MissingDataException)throw t;(0,n.warn)("Unable to read page labels.")}return(0,n.shadow)(this,"pageLabels",t)}_readPageLabels(){const t=this._catDict.getRaw("PageLabels");if(!t)return null;const e=new Array(this.numPages);let s=null,a="";const c=new o.NumberTree(t,this.xref).getAll();let h="",l=1;for(let t=0,o=this.numPages;t<o;t++){const o=c.get(t);if(void 0!==o){if(!(o instanceof r.Dict))throw new n.FormatError("PageLabel is not a dictionary.");if(o.has("Type")&&!(0,r.isName)(o.get("Type"),"PageLabel"))throw new n.FormatError("Invalid type in PageLabel dictionary.");if(o.has("S")){const t=o.get("S");if(!(t instanceof r.Name))throw new n.FormatError("Invalid style in PageLabel dictionary.");s=t.name}else s=null;if(o.has("P")){const t=o.get("P");if("string"!=typeof t)throw new n.FormatError("Invalid prefix in PageLabel dictionary.");a=(0,n.stringToPDFString)(t)}else a="";if(o.has("St")){const t=o.get("St");if(!(Number.isInteger(t)&&t>=1))throw new n.FormatError("Invalid start in PageLabel dictionary.");l=t}else l=1}switch(s){case"D":h=l;break;case"R":case"r":h=(0,i.toRomanNumerals)(l,"r"===s);break;case"A":case"a":const t=26,e=l-1;h=String.fromCharCode(("a"===s?97:65)+e%t).repeat(Math.floor(e/t)+1);break;default:if(s)throw new n.FormatError(`Invalid style "${s}" in PageLabel dictionary.`);h=""}e[t]=a+h,l++}return e}get pageLayout(){const t=this._catDict.get("PageLayout");let e="";if(t instanceof r.Name)switch(t.name){case"SinglePage":case"OneColumn":case"TwoColumnLeft":case"TwoColumnRight":case"TwoPageLeft":case"TwoPageRight":e=t.name}return(0,n.shadow)(this,"pageLayout",e)}get pageMode(){const t=this._catDict.get("PageMode");let e="UseNone";if(t instanceof r.Name)switch(t.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"FullScreen":case"UseOC":case"UseAttachments":e=t.name}return(0,n.shadow)(this,"pageMode",e)}get viewerPreferences(){const t=this._catDict.get("ViewerPreferences");if(!(t instanceof r.Dict))return(0,n.shadow)(this,"viewerPreferences",null);let e=null;for(const s of t.getKeys()){const i=t.get(s);let o;switch(s){case"HideToolbar":case"HideMenubar":case"HideWindowUI":case"FitWindow":case"CenterWindow":case"DisplayDocTitle":case"PickTrayByPDFSize":"boolean"==typeof i&&(o=i);break;case"NonFullScreenPageMode":if(i instanceof r.Name)switch(i.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"UseOC":o=i.name;break;default:o="UseNone"}break;case"Direction":if(i instanceof r.Name)switch(i.name){case"L2R":case"R2L":o=i.name;break;default:o="L2R"}break;case"ViewArea":case"ViewClip":case"PrintArea":case"PrintClip":if(i instanceof r.Name)switch(i.name){case"MediaBox":case"CropBox":case"BleedBox":case"TrimBox":case"ArtBox":o=i.name;break;default:o="CropBox"}break;case"PrintScaling":if(i instanceof r.Name)switch(i.name){case"None":case"AppDefault":o=i.name;break;default:o="AppDefault"}break;case"Duplex":if(i instanceof r.Name)switch(i.name){case"Simplex":case"DuplexFlipShortEdge":case"DuplexFlipLongEdge":o=i.name;break;default:o="None"}break;case"PrintPageRange":Array.isArray(i)&&i.length%2==0&&i.every(((t,e,s)=>Number.isInteger(t)&&t>0&&(0===e||t>=s[e-1])&&t<=this.numPages))&&(o=i);break;case"NumCopies":Number.isInteger(i)&&i>0&&(o=i);break;default:(0,n.warn)(`Ignoring non-standard key in ViewerPreferences: ${s}.`);continue}void 0!==o?(e||(e=Object.create(null)),e[s]=o):(0,n.warn)(`Bad value, for key "${s}", in ViewerPreferences: ${i}.`)}return(0,n.shadow)(this,"viewerPreferences",e)}get openAction(){const t=this._catDict.get("OpenAction"),e=Object.create(null);if(t instanceof r.Dict){const s=new r.Dict(this.xref);s.set("A",t);const i={url:null,dest:null,action:null};g.parseDestDictionary({destDict:s,resultObj:i}),Array.isArray(i.dest)?e.dest=i.dest:i.action&&(e.action=i.action)}else Array.isArray(t)&&(e.dest=t);return(0,n.shadow)(this,"openAction",(0,n.objectSize)(e)>0?e:null)}get attachments(){const t=this._catDict.get("Names");let e=null;if(t instanceof r.Dict&&t.has("EmbeddedFiles")){const s=new o.NameTree(t.getRaw("EmbeddedFiles"),this.xref);for(const[t,i]of s.getAll()){const s=new l.FileSpec(i,this.xref);e||(e=Object.create(null)),e[(0,n.stringToPDFString)(t)]=s.serializable}}return(0,n.shadow)(this,"attachments",e)}get xfaImages(){const t=this._catDict.get("Names");let e=null;if(t instanceof r.Dict&&t.has("XFAImages")){const s=new o.NameTree(t.getRaw("XFAImages"),this.xref);for(const[t,i]of s.getAll())e||(e=new r.Dict(this.xref)),e.set((0,n.stringToPDFString)(t),i)}return(0,n.shadow)(this,"xfaImages",e)}_collectJavaScript(){const t=this._catDict.get("Names");let e=null;function s(t,s){if(!(s instanceof r.Dict))return;if(!(0,r.isName)(s.get("S"),"JavaScript"))return;let i=s.get("JS");if(i instanceof a.BaseStream)i=i.getString();else if("string"!=typeof i)return;i=(0,n.stringToPDFString)(i).replaceAll("\0",""),i&&(e||=new Map).set(t,i)}if(t instanceof r.Dict&&t.has("JavaScript")){const e=new o.NameTree(t.getRaw("JavaScript"),this.xref);for(const[t,i]of e.getAll())s((0,n.stringToPDFString)(t),i)}const i=this._catDict.get("OpenAction");return i&&s("OpenAction",i),e}get jsActions(){const t=this._collectJavaScript();let e=(0,i.collectActions)(this.xref,this._catDict,n.DocumentActionEventType);if(t){e||=Object.create(null);for(const[s,i]of t)s in e?e[s].push(i):e[s]=[i]}return(0,n.shadow)(this,"jsActions",e)}async fontFallback(t,e){const s=await Promise.all(this.fontCache);for(const i of s)if(i.loadedName===t)return void i.fallback(e)}async cleanup(t=!1){(0,c.clearGlobalCaches)(),this.globalImageCache.clear(t),this.pageKidsCountCache.clear(),this.pageIndexCache.clear(),this.nonBlendModesSet.clear();const e=await Promise.all(this.fontCache);for(const{dict:t}of e)delete t.cacheKey;this.fontCache.clear(),this.builtInCMapCache.clear(),this.standardFontDataCache.clear(),this.systemFontCache.clear()}async getPageDict(t){const e=[this.toplevelPagesDict],s=new r.RefSet,i=this._catDict.getRaw("Pages");i instanceof r.Ref&&s.put(i);const o=this.xref,a=this.pageKidsCountCache,c=this.pageIndexCache;let h=0;for(;e.length;){const i=e.pop();if(i instanceof r.Ref){const l=a.get(i);if(l>=0&&h+l<=t){h+=l;continue}if(s.has(i))throw new n.FormatError("Pages tree contains circular reference.");s.put(i);const u=await o.fetchAsync(i);if(u instanceof r.Dict){let e=u.getRaw("Type");if(e instanceof r.Ref&&(e=await o.fetchAsync(e)),(0,r.isName)(e,"Page")||!u.has("Kids")){if(a.has(i)||a.put(i,1),c.has(i)||c.put(i,h),h===t)return[u,i];h++;continue}}e.push(u);continue}if(!(i instanceof r.Dict))throw new n.FormatError("Page dictionary kid reference points to wrong type of object.");const{objId:l}=i;let u=i.getRaw("Count");if(u instanceof r.Ref&&(u=await o.fetchAsync(u)),Number.isInteger(u)&&u>=0&&(l&&!a.has(l)&&a.put(l,u),h+u<=t)){h+=u;continue}let f=i.getRaw("Kids");if(f instanceof r.Ref&&(f=await o.fetchAsync(f)),!Array.isArray(f)){let e=i.getRaw("Type");if(e instanceof r.Ref&&(e=await o.fetchAsync(e)),(0,r.isName)(e,"Page")||!i.has("Kids")){if(h===t)return[i,null];h++;continue}throw new n.FormatError("Page dictionary kids object is not an array.")}for(let t=f.length-1;t>=0;t--)e.push(f[t])}throw new Error(`Page index ${t} not found.`)}async getAllPageDicts(t=!1){const{ignoreErrors:e}=this.pdfManager.evaluatorOptions,s=[{currentNode:this.toplevelPagesDict,posInKids:0}],o=new r.RefSet,a=this._catDict.getRaw("Pages");a instanceof r.Ref&&o.put(a);const c=new Map,h=this.xref,l=this.pageIndexCache;let u=0;function f(s){if(s instanceof i.XRefEntryException&&!t)throw s;t&&e&&0===u&&((0,n.warn)(`getAllPageDicts - Skipping invalid first page: "${s}".`),s=r.Dict.empty),c.set(u++,[s,null])}for(;s.length>0;){const t=s.at(-1),{currentNode:e,posInKids:i}=t;let a=e.getRaw("Kids");if(a instanceof r.Ref)try{a=await h.fetchAsync(a)}catch(t){f(t);break}if(!Array.isArray(a)){f(new n.FormatError("Page dictionary kids object is not an array."));break}if(i>=a.length){s.pop();continue}const g=a[i];let m;if(g instanceof r.Ref){if(o.has(g)){f(new n.FormatError("Pages tree contains circular reference."));break}o.put(g);try{m=await h.fetchAsync(g)}catch(t){f(t);break}}else m=g;if(!(m instanceof r.Dict)){f(new n.FormatError("Page dictionary kid reference points to wrong type of object."));break}let w=m.getRaw("Type");if(w instanceof r.Ref)try{w=await h.fetchAsync(w)}catch(t){f(t);break}(0,r.isName)(w,"Page")||!m.has("Kids")?(d=m,(p=g instanceof r.Ref?g:null)&&!l.has(p)&&l.put(p,u),c.set(u++,[d,p])):s.push({currentNode:m,posInKids:0}),t.posInKids++}var d,p;return c}getPageIndex(t){const e=this.pageIndexCache.get(t);if(void 0!==e)return Promise.resolve(e);const s=this.xref;let i=0;const o=e=>function(e){let i,o=0;return s.fetchAsync(e).then((function(s){if((0,r.isRefsEqual)(e,t)&&!(0,r.isDict)(s,"Page")&&!(s instanceof r.Dict&&!s.has("Type")&&s.has("Contents")))throw new n.FormatError("The reference does not point to a /Page dictionary.");if(!s)return null;if(!(s instanceof r.Dict))throw new n.FormatError("Node must be a dictionary.");return i=s.getRaw("Parent"),s.getAsync("Parent")})).then((function(t){if(!t)return null;if(!(t instanceof r.Dict))throw new n.FormatError("Parent must be a dictionary.");return t.getAsync("Kids")})).then((function(t){if(!t)return null;const a=[];let c=!1;for(const i of t){if(!(i instanceof r.Ref))throw new n.FormatError("Kid must be a reference.");if((0,r.isRefsEqual)(i,e)){c=!0;break}a.push(s.fetchAsync(i).then((function(t){if(!(t instanceof r.Dict))throw new n.FormatError("Kid node must be a dictionary.");t.has("Count")?o+=t.get("Count"):o++})))}if(!c)throw new n.FormatError("Kid reference not found in parent's kids.");return Promise.all(a).then((function(){return[o,i]}))}))}(e).then((e=>{if(!e)return this.pageIndexCache.put(t,i),i;const[s,n]=e;return i+=s,o(n)}));return o(t)}get baseUrl(){const t=this._catDict.get("URI");if(t instanceof r.Dict){const e=t.get("Base");if("string"==typeof e){const t=(0,n.createValidAbsoluteUrl)(e,null,{tryConvertEncoding:!0});if(t)return(0,n.shadow)(this,"baseUrl",t.href)}}return(0,n.shadow)(this,"baseUrl",this.pdfManager.docBaseUrl)}static parseDestDictionary({destDict:t,resultObj:e,docBaseUrl:s=null,docAttachments:o=null}){if(!(t instanceof r.Dict))return void(0,n.warn)("parseDestDictionary: `destDict` must be a dictionary.");let c,h,l=t.get("A");if(l instanceof r.Dict||(t.has("Dest")?l=t.get("Dest"):(l=t.get("AA"),l instanceof r.Dict&&(l.has("D")?l=l.get("D"):l.has("U")&&(l=l.get("U"))))),l instanceof r.Dict){const t=l.get("S");if(!(t instanceof r.Name))return void(0,n.warn)("parseDestDictionary: Invalid type in Action dictionary.");const s=t.name;switch(s){case"ResetForm":const t=l.get("Flags"),u=!(1&("number"==typeof t?t:0)),f=[],d=[];for(const t of l.get("Fields")||[])t instanceof r.Ref?d.push(t.toString()):"string"==typeof t&&f.push((0,n.stringToPDFString)(t));e.resetForm={fields:f,refs:d,include:u};break;case"URI":c=l.get("URI"),c instanceof r.Name&&(c="/"+c.name);break;case"GoTo":h=l.get("D");break;case"Launch":case"GoToR":const p=l.get("F");p instanceof r.Dict?c=p.get("F")||null:"string"==typeof p&&(c=p);let g=l.get("D");if(g&&(g instanceof r.Name&&(g=g.name),"string"==typeof c)){const t=c.split("#")[0];"string"==typeof g?c=t+"#"+g:Array.isArray(g)&&(c=t+"#"+JSON.stringify(g))}const m=l.get("NewWindow");"boolean"==typeof m&&(e.newWindow=m);break;case"GoToE":const w=l.get("T");let b;if(o&&w instanceof r.Dict){const t=w.get("R"),e=w.get("N");(0,r.isName)(t,"C")&&"string"==typeof e&&(b=o[(0,n.stringToPDFString)(e)])}b?e.attachment=b:(0,n.warn)('parseDestDictionary - unimplemented "GoToE" action.');break;case"Named":const y=l.get("N");y instanceof r.Name&&(e.action=y.name);break;case"SetOCGState":const A=l.get("State"),v=l.get("PreserveRB");if(!Array.isArray(A)||0===A.length)break;const x=[];for(const t of A)if(t instanceof r.Name)switch(t.name){case"ON":case"OFF":case"Toggle":x.push(t.name)}else t instanceof r.Ref&&x.push(t.toString());if(x.length!==A.length)break;e.setOCGState={state:x,preserveRB:"boolean"!=typeof v||v};break;case"JavaScript":const k=l.get("JS");let S;k instanceof a.BaseStream?S=k.getString():"string"==typeof k&&(S=k);const M=S&&(0,i.recoverJsURL)((0,n.stringToPDFString)(S));if(M){c=M.url,e.newWindow=M.newWindow;break}default:if("JavaScript"===s||"SubmitForm"===s)break;(0,n.warn)(`parseDestDictionary - unsupported action: "${s}".`)}}else t.has("Dest")&&(h=t.get("Dest"));if("string"==typeof c){const t=(0,n.createValidAbsoluteUrl)(c,s,{addDefaultProtocol:!0,tryConvertEncoding:!0});t&&(e.url=t.href),e.unsafeUrl=c}h&&(h instanceof r.Name&&(h=h.name),"string"==typeof h?e.dest=(0,n.stringToPDFString)(h):Array.isArray(h)&&(e.dest=h))}}e.Catalog=g},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NumberTree=e.NameTree=void 0;var i=s(4),n=s(2);class r{constructor(t,e,s){this.constructor===r&&(0,n.unreachable)("Cannot initialize NameOrNumberTree."),this.root=t,this.xref=e,this._type=s}getAll(){const t=new Map;if(!this.root)return t;const e=this.xref,s=new i.RefSet;s.put(this.root);const r=[this.root];for(;r.length>0;){const o=e.fetchIfRef(r.shift());if(!(o instanceof i.Dict))continue;if(o.has("Kids")){const t=o.get("Kids");if(!Array.isArray(t))continue;for(const e of t){if(s.has(e))throw new n.FormatError(`Duplicate entry in "${this._type}" tree.`);r.push(e),s.put(e)}continue}const a=o.get(this._type);if(Array.isArray(a))for(let s=0,i=a.length;s<i;s+=2)t.set(e.fetchIfRef(a[s]),e.fetchIfRef(a[s+1]))}return t}get(t){if(!this.root)return null;const e=this.xref;let s=e.fetchIfRef(this.root),i=0;for(;s.has("Kids");){if(++i>10)return(0,n.warn)(`Search depth limit reached for "${this._type}" tree.`),null;const r=s.get("Kids");if(!Array.isArray(r))return null;let o=0,a=r.length-1;for(;o<=a;){const i=o+a>>1,n=e.fetchIfRef(r[i]),c=n.get("Limits");if(t<e.fetchIfRef(c[0]))a=i-1;else{if(!(t>e.fetchIfRef(c[1]))){s=n;break}o=i+1}}if(o>a)return null}const r=s.get(this._type);if(Array.isArray(r)){let s=0,i=r.length-2;for(;s<=i;){const n=s+i>>1,o=n+(1&n),a=e.fetchIfRef(r[o]);if(t<a)i=o-2;else{if(!(t>a))return e.fetchIfRef(r[o+1]);s=o+2}}}return null}}e.NameTree=class extends r{constructor(t,e){super(t,e,"Names")}},e.NumberTree=class extends r{constructor(t,e){super(t,e,"Nums")}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.clearGlobalCaches=function(){(0,i.clearPatternCaches)(),(0,n.clearPrimitiveCaches)(),(0,r.clearUnicodeCaches)()};var i=s(50),n=s(4),r=s(40)},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FileSpec=void 0;var i=s(2),n=s(5),r=s(4);function o(t){return t.has("UF")?t.get("UF"):t.has("F")?t.get("F"):t.has("Unix")?t.get("Unix"):t.has("Mac")?t.get("Mac"):t.has("DOS")?t.get("DOS"):null}e.FileSpec=class{constructor(t,e){t instanceof r.Dict&&(this.xref=e,this.root=t,t.has("FS")&&(this.fs=t.get("FS")),this.description=t.has("Desc")?(0,i.stringToPDFString)(t.get("Desc")):"",t.has("RF")&&(0,i.warn)("Related file specifications are not supported"),this.contentAvailable=!0,t.has("EF")||(this.contentAvailable=!1,(0,i.warn)("Non-embedded file specifications are not supported")))}get filename(){if(!this._filename&&this.root){const t=o(this.root)||"unnamed";this._filename=(0,i.stringToPDFString)(t).replaceAll("\\\\","\\").replaceAll("\\/","/").replaceAll("\\","/")}return this._filename}get content(){if(!this.contentAvailable)return null;!this.contentRef&&this.root&&(this.contentRef=o(this.root.get("EF")));let t=null;if(this.contentRef){const e=this.xref.fetchIfRef(this.contentRef);e instanceof n.BaseStream?t=e.getBytes():(0,i.warn)("Embedded file specification points to non-existing/invalid content")}else(0,i.warn)("Embedded file specification does not have a content");return t}get serializable(){return{filename:this.filename,content:this.content}}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataParser=void 0;var i=s(71);e.MetadataParser=class{constructor(t){t=this._repair(t);const e=new i.SimpleXMLParser({lowerCaseName:!0}).parseFromString(t);this._metadataMap=new Map,this._data=t,e&&this._parse(e)}_repair(t){return t.replace(/^[^<]+/,"").replaceAll(/>\\376\\377([^<]+)/g,(function(t,e){const s=e.replaceAll(/\\([0-3])([0-7])([0-7])/g,(function(t,e,s,i){return String.fromCharCode(64*e+8*s+1*i)})).replaceAll(/&(amp|apos|gt|lt|quot);/g,(function(t,e){switch(e){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error(`_repair: ${e} isn't defined.`)})),i=[">"];for(let t=0,e=s.length;t<e;t+=2){const e=256*s.charCodeAt(t)+s.charCodeAt(t+1);i.push(e>=32&&e<127&&60!==e&&62!==e&&38!==e?String.fromCharCode(e):"&#x"+(65536+e).toString(16).substring(1)+";")}return i.join("")}))}_getSequence(t){const e=t.nodeName;return"rdf:bag"!==e&&"rdf:seq"!==e&&"rdf:alt"!==e?null:t.childNodes.filter((t=>"rdf:li"===t.nodeName))}_parseArray(t){if(!t.hasChildNodes())return;const[e]=t.childNodes,s=this._getSequence(e)||[];this._metadataMap.set(t.nodeName,s.map((t=>t.textContent.trim())))}_parse(t){let e=t.documentElement;if("rdf:rdf"!==e.nodeName)for(e=e.firstChild;e&&"rdf:rdf"!==e.nodeName;)e=e.nextSibling;if(e&&"rdf:rdf"===e.nodeName&&e.hasChildNodes())for(const t of e.childNodes)if("rdf:description"===t.nodeName)for(const e of t.childNodes){const t=e.nodeName;switch(t){case"#text":continue;case"dc:creator":case"dc:subject":this._parseArray(e);continue}this._metadataMap.set(t,e.textContent.trim())}}get serializable(){return{parsedData:this._metadataMap,rawData:this._data}}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.XMLParserErrorCode=e.XMLParserBase=e.SimpleXMLParser=e.SimpleDOMNode=void 0;var i=s(3);const n={NoError:0,EndOfDocument:-1,UnterminatedCdat:-2,UnterminatedXmlDeclaration:-3,UnterminatedDoctypeDeclaration:-4,UnterminatedComment:-5,MalformedElement:-6,OutOfMemory:-7,UnterminatedAttributeValue:-8,UnterminatedElement:-9,ElementNeverBegun:-10};function r(t,e){const s=t[e];return" "===s||"\n"===s||"\r"===s||"\t"===s}e.XMLParserErrorCode=n;class o{_resolveEntities(t){return t.replaceAll(/&([^;]+);/g,((t,e)=>{if("#x"===e.substring(0,2))return String.fromCodePoint(parseInt(e.substring(2),16));if("#"===e.substring(0,1))return String.fromCodePoint(parseInt(e.substring(1),10));switch(e){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"';case"apos":return"'"}return this.onResolveEntity(e)}))}_parseContent(t,e){const s=[];let i=e;function n(){for(;i<t.length&&r(t,i);)++i}for(;i<t.length&&!r(t,i)&&">"!==t[i]&&"/"!==t[i];)++i;const o=t.substring(e,i);for(n();i<t.length&&">"!==t[i]&&"/"!==t[i]&&"?"!==t[i];){n();let e="",o="";for(;i<t.length&&!r(t,i)&&"="!==t[i];)e+=t[i],++i;if(n(),"="!==t[i])return null;++i,n();const a=t[i];if('"'!==a&&"'"!==a)return null;const c=t.indexOf(a,++i);if(c<0)return null;o=t.substring(i,c),s.push({name:e,value:this._resolveEntities(o)}),i=c+1,n()}return{name:o,attributes:s,parsed:i-e}}_parseProcessingInstruction(t,e){let s=e;for(;s<t.length&&!r(t,s)&&">"!==t[s]&&"?"!==t[s]&&"/"!==t[s];)++s;const i=t.substring(e,s);!function(){for(;s<t.length&&r(t,s);)++s}();const n=s;for(;s<t.length&&("?"!==t[s]||">"!==t[s+1]);)++s;return{name:i,value:t.substring(n,s),parsed:s-e}}parseXml(t){let e=0;for(;e<t.length;){let s=e;if("<"===t[e]){let e;switch(++s,t[s]){case"/":if(++s,e=t.indexOf(">",s),e<0)return void this.onError(n.UnterminatedElement);this.onEndElement(t.substring(s,e)),s=e+1;break;case"?":++s;const i=this._parseProcessingInstruction(t,s);if("?>"!==t.substring(s+i.parsed,s+i.parsed+2))return void this.onError(n.UnterminatedXmlDeclaration);this.onPi(i.name,i.value),s+=i.parsed+2;break;case"!":if("--"===t.substring(s+1,s+3)){if(e=t.indexOf("--\x3e",s+3),e<0)return void this.onError(n.UnterminatedComment);this.onComment(t.substring(s+3,e)),s=e+3}else if("[CDATA["===t.substring(s+1,s+8)){if(e=t.indexOf("]]>",s+8),e<0)return void this.onError(n.UnterminatedCdat);this.onCdata(t.substring(s+8,e)),s=e+3}else{if("DOCTYPE"!==t.substring(s+1,s+8))return void this.onError(n.MalformedElement);{const i=t.indexOf("[",s+8);let r=!1;if(e=t.indexOf(">",s+8),e<0)return void this.onError(n.UnterminatedDoctypeDeclaration);if(i>0&&e>i){if(e=t.indexOf("]>",s+8),e<0)return void this.onError(n.UnterminatedDoctypeDeclaration);r=!0}const o=t.substring(s+8,e+(r?1:0));this.onDoctype(o),s=e+(r?2:1)}}break;default:const r=this._parseContent(t,s);if(null===r)return void this.onError(n.MalformedElement);let o=!1;if("/>"===t.substring(s+r.parsed,s+r.parsed+2))o=!0;else if(">"!==t.substring(s+r.parsed,s+r.parsed+1))return void this.onError(n.UnterminatedElement);this.onBeginElement(r.name,r.attributes,o),s+=r.parsed+(o?2:1)}}else{for(;s<t.length&&"<"!==t[s];)s++;const i=t.substring(e,s);this.onText(this._resolveEntities(i))}e=s}}onResolveEntity(t){return`&${t};`}onPi(t,e){}onComment(t){}onCdata(t){}onDoctype(t){}onText(t){}onBeginElement(t,e,s){}onEndElement(t){}onError(t){}}e.XMLParserBase=o;class a{constructor(t,e){this.nodeName=t,this.nodeValue=e,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}get firstChild(){return this.childNodes?.[0]}get nextSibling(){const t=this.parentNode.childNodes;if(!t)return;const e=t.indexOf(this);return-1!==e?t[e+1]:void 0}get textContent(){return this.childNodes?this.childNodes.map((function(t){return t.textContent})).join(""):this.nodeValue||""}get children(){return this.childNodes||[]}hasChildNodes(){return this.childNodes?.length>0}searchNode(t,e){if(e>=t.length)return this;const s=t[e];if(s.name.startsWith("#")&&e<t.length-1)return this.searchNode(t,e+1);const i=[];let n=this;for(;;){if(s.name===n.nodeName){if(0!==s.pos){if(0===i.length)return null;{const[r]=i.pop();let o=0;for(const i of r.childNodes)if(s.name===i.nodeName){if(o===s.pos)return i.searchNode(t,e+1);o++}return n.searchNode(t,e+1)}}{const s=n.searchNode(t,e+1);if(null!==s)return s}}if(n.childNodes?.length>0)i.push([n,0]),n=n.childNodes[0];else{if(0===i.length)return null;for(;0!==i.length;){const[t,e]=i.pop(),s=e+1;if(s<t.childNodes.length){i.push([t,s]),n=t.childNodes[s];break}}if(0===i.length)return null}}}dump(t){if("#text"!==this.nodeName){if(t.push(`<${this.nodeName}`),this.attributes)for(const e of this.attributes)t.push(` ${e.name}="${(0,i.encodeToXmlString)(e.value)}"`);if(this.hasChildNodes()){t.push(">");for(const e of this.childNodes)e.dump(t);t.push(`</${this.nodeName}>`)}else t.push(this.nodeValue?`>${(0,i.encodeToXmlString)(this.nodeValue)}</${this.nodeName}>`:"/>")}else t.push((0,i.encodeToXmlString)(this.nodeValue))}}e.SimpleDOMNode=a,e.SimpleXMLParser=class extends o{constructor({hasAttributes:t=!1,lowerCaseName:e=!1}){super(),this._currentFragment=null,this._stack=null,this._errorCode=n.NoError,this._hasAttributes=t,this._lowerCaseName=e}parseFromString(t){if(this._currentFragment=[],this._stack=[],this._errorCode=n.NoError,this.parseXml(t),this._errorCode!==n.NoError)return;const[e]=this._currentFragment;return e?{documentElement:e}:void 0}onText(t){if(function(t){for(let e=0,s=t.length;e<s;e++)if(!r(t,e))return!1;return!0}(t))return;const e=new a("#text",t);this._currentFragment.push(e)}onCdata(t){const e=new a("#text",t);this._currentFragment.push(e)}onBeginElement(t,e,s){this._lowerCaseName&&(t=t.toLowerCase());const i=new a(t);i.childNodes=[],this._hasAttributes&&(i.attributes=e),this._currentFragment.push(i),s||(this._stack.push(this._currentFragment),this._currentFragment=i.childNodes)}onEndElement(t){this._currentFragment=this._stack.pop()||[];const e=this._currentFragment.at(-1);if(!e)return null;for(const t of e.childNodes)t.parentNode=e;return e}onError(t){this._errorCode=t}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.StructTreeRoot=e.StructTreePage=void 0;var i=s(2),n=s(4),r=s(67),o=s(73);class a{constructor(t,e){this.dict=t,this.ref=e instanceof n.Ref?e:null,this.roleMap=new Map,this.structParentIds=null}init(){this.readRoleMap()}#tn(t,e,s){if(!(t instanceof n.Ref)||e<0)return;this.structParentIds||=new n.RefSetCache;let i=this.structParentIds.get(t);i||(i=[],this.structParentIds.put(t,i)),i.push([e,s])}addAnnotationIdToPage(t,e){this.#tn(t,e,4)}readRoleMap(){const t=this.dict.get("RoleMap");t instanceof n.Dict&&t.forEach(((t,e)=>{e instanceof n.Name&&this.roleMap.set(t,e.name)}))}static async canCreateStructureTree({catalogRef:t,pdfManager:e,newAnnotationsByPage:s}){if(!(t instanceof n.Ref))return(0,i.warn)("Cannot save the struct tree: no catalog reference."),!1;let r=0,o=!0;for(const[t,a]of s){const{ref:s}=await e.getPage(t);if(!(s instanceof n.Ref)){(0,i.warn)(`Cannot save the struct tree: page ${t} has no ref.`),o=!0;break}for(const t of a)t.accessibilityData?.type&&(t.parentTreeId=r++,o=!1)}if(o){for(const t of s.values())for(const e of t)delete e.parentTreeId;return!1}return!0}static async createStructureTree({newAnnotationsByPage:t,xref:e,catalogRef:s,pdfManager:i,newRefs:r}){const a=i.catalog.cloneDict(),c=e.getNewTemporaryRef();a.set("StructTreeRoot",c);const h=[];await(0,o.writeObject)(s,a,h,e),r.push({ref:s,data:h.join("")});const l=new n.Dict(e);l.set("Type",n.Name.get("StructTreeRoot"));const u=e.getNewTemporaryRef();l.set("ParentTree",u);const f=[];l.set("K",f);const d=new n.Dict(e),p=[];d.set("Nums",p);const g=await this.#en({newAnnotationsByPage:t,structTreeRootRef:c,kids:f,nums:p,xref:e,pdfManager:i,newRefs:r,buffer:h});l.set("ParentTreeNextKey",g),h.length=0,await(0,o.writeObject)(u,d,h,e),r.push({ref:u,data:h.join("")}),h.length=0,await(0,o.writeObject)(c,l,h,e),r.push({ref:c,data:h.join("")})}async canUpdateStructTree({pdfManager:t,newAnnotationsByPage:e}){if(!this.ref)return(0,i.warn)("Cannot update the struct tree: no root reference."),!1;let s=this.dict.get("ParentTreeNextKey");if(!Number.isInteger(s)||s<0)return(0,i.warn)("Cannot update the struct tree: invalid next key."),!1;const r=this.dict.get("ParentTree");if(!(r instanceof n.Dict))return(0,i.warn)("Cannot update the struct tree: ParentTree isn't a dict."),!1;const o=r.get("Nums");if(!Array.isArray(o))return(0,i.warn)("Cannot update the struct tree: nums isn't an array."),!1;const{numPages:c}=t.catalog;for(const s of e.keys()){const{pageDict:e,ref:r}=await t.getPage(s);if(!(r instanceof n.Ref))return(0,i.warn)(`Cannot save the struct tree: page ${s} has no ref.`),!1;const o=e.get("StructParents");if(!Number.isInteger(o)||o<0||o>=c)return(0,i.warn)(`Cannot save the struct tree: page ${s} has no id.`),!1}let h=!0;for(const[i,n]of e){const{pageDict:e}=await t.getPage(i);a.#sn({elements:n,xref:this.dict.xref,pageDict:e,parentTree:r});for(const t of n)t.accessibilityData?.type&&(t.parentTreeId=s++,h=!1)}if(h){for(const t of e.values())for(const e of t)delete e.parentTreeId,delete e.structTreeParent;return!1}return!0}async updateStructureTree({newAnnotationsByPage:t,pdfManager:e,newRefs:s}){const i=this.dict.xref,r=this.dict.clone(),c=this.ref;let h,l=r.getRaw("ParentTree");l instanceof n.Ref?h=i.fetch(l):(h=l,l=i.getNewTemporaryRef(),r.set("ParentTree",l)),h=h.clone();let u=h.getRaw("Nums"),f=null;u instanceof n.Ref&&(f=u,u=i.fetch(f)),u=u.slice(),f||h.set("Nums",u);let d=r.getRaw("K"),p=null;d instanceof n.Ref?(p=d,d=i.fetch(p)):(p=i.getNewTemporaryRef(),r.set("K",p)),d=Array.isArray(d)?d.slice():[d];const g=[],m=await a.#en({newAnnotationsByPage:t,structTreeRootRef:c,kids:d,nums:u,xref:i,pdfManager:e,newRefs:s,buffer:g});r.set("ParentTreeNextKey",m),g.length=0,await(0,o.writeObject)(p,d,g,i),s.push({ref:p,data:g.join("")}),f&&(g.length=0,await(0,o.writeObject)(f,u,g,i),s.push({ref:f,data:g.join("")})),g.length=0,await(0,o.writeObject)(l,h,g,i),s.push({ref:l,data:g.join("")}),g.length=0,await(0,o.writeObject)(c,r,g,i),s.push({ref:c,data:g.join("")})}static async#en({newAnnotationsByPage:t,structTreeRootRef:e,kids:s,nums:i,xref:r,pdfManager:a,newRefs:c,buffer:h}){const l=n.Name.get("OBJR");let u=-1/0;for(const[f,d]of t){const{ref:t}=await a.getPage(f);for(const{accessibilityData:{type:a,title:f,lang:p,alt:g,expanded:m,actualText:w},ref:b,parentTreeId:y,structTreeParent:A}of d){u=Math.max(u,y);const d=r.getNewTemporaryRef(),v=new n.Dict(r);v.set("S",n.Name.get(a)),f&&v.set("T",f),p&&v.set("Lang",p),g&&v.set("Alt",g),m&&v.set("E",m),w&&v.set("ActualText",w),A?await this.#in({structTreeParent:A,tagDict:v,newTagRef:d,fallbackRef:e,xref:r,newRefs:c,buffer:h}):v.set("P",e);const x=new n.Dict(r);v.set("K",x),x.set("Type",l),x.set("Pg",t),x.set("Obj",b),h.length=0,await(0,o.writeObject)(d,v,h,r),c.push({ref:d,data:h.join("")}),i.push(y,d),s.push(d)}}return u+1}static#sn({elements:t,xref:e,pageDict:s,parentTree:i}){const o=new Map;for(const e of t)if(e.structTreeParentId){const t=parseInt(e.structTreeParentId.split("_mc")[1],10);o.set(t,e)}const a=s.get("StructParents"),c=new r.NumberTree(i,e).get(a);if(!Array.isArray(c))return;const h=(t,s,i)=>{const r=o.get(t);if(r){const t=s.getRaw("P"),o=e.fetchIfRef(t);return t instanceof n.Ref&&o instanceof n.Dict&&(r.structTreeParent={ref:i,dict:s}),!0}return!1};for(const t of c){if(!(t instanceof n.Ref))continue;const s=e.fetch(t),i=s.get("K");if(Number.isInteger(i))h(i,s,t);else if(Array.isArray(i))for(let n of i)if(n=e.fetchIfRef(n),Number.isInteger(n)&&h(n,s,t))break}}static async#in({structTreeParent:{ref:t,dict:e},tagDict:s,newTagRef:r,fallbackRef:a,xref:c,newRefs:h,buffer:l}){const u=e.getRaw("P");let f=c.fetchIfRef(u);s.set("P",u);let d,p=!1,g=f.getRaw("K");if(g instanceof n.Ref?d=c.fetch(g):(d=g,g=c.getNewTemporaryRef(),f=f.clone(),f.set("K",g),p=!0),Array.isArray(d)){const e=d.indexOf(t);if(!(e>=0))return(0,i.warn)("Cannot update the struct tree: parent kid not found."),void s.set("P",a);d=d.slice(),d.splice(e+1,0,r)}else d instanceof n.Dict&&(d=[g,r],g=c.getNewTemporaryRef(),f.set("K",g),p=!0);l.length=0,await(0,o.writeObject)(g,d,l,c),h.push({ref:g,data:l.join("")}),p&&(l.length=0,await(0,o.writeObject)(u,f,l,c),h.push({ref:u,data:l.join("")}))}}e.StructTreeRoot=a;class c{constructor(t,e){this.tree=t,this.dict=e,this.kids=[],this.parseKids()}get role(){const t=this.dict.get("S"),e=t instanceof n.Name?t.name:"",{root:s}=this.tree;return s.roleMap.has(e)?s.roleMap.get(e):e}parseKids(){let t=null;const e=this.dict.getRaw("Pg");e instanceof n.Ref&&(t=e.toString());const s=this.dict.get("K");if(Array.isArray(s))for(const e of s){const s=this.parseKid(t,e);s&&this.kids.push(s)}else{const e=this.parseKid(t,s);e&&this.kids.push(e)}}parseKid(t,e){if(Number.isInteger(e))return this.tree.pageDict.objId!==t?null:new h({type:1,mcid:e,pageObjId:t});let s=null;if(e instanceof n.Ref?s=this.dict.xref.fetch(e):e instanceof n.Dict&&(s=e),!s)return null;const i=s.getRaw("Pg");i instanceof n.Ref&&(t=i.toString());const r=s.get("Type")instanceof n.Name?s.get("Type").name:null;if("MCR"===r){if(this.tree.pageDict.objId!==t)return null;const e=s.getRaw("Stm");return new h({type:2,refObjId:e instanceof n.Ref?e.toString():null,pageObjId:t,mcid:s.get("MCID")})}if("OBJR"===r){if(this.tree.pageDict.objId!==t)return null;const e=s.getRaw("Obj");return new h({type:3,refObjId:e instanceof n.Ref?e.toString():null,pageObjId:t})}return new h({type:5,dict:s})}}class h{constructor({type:t,dict:e=null,mcid:s=null,pageObjId:i=null,refObjId:n=null}){this.type=t,this.dict=e,this.mcid=s,this.pageObjId=i,this.refObjId=n,this.parentNode=null}}e.StructTreePage=class{constructor(t,e){this.root=t,this.rootDict=t?t.dict:null,this.pageDict=e,this.nodes=[]}parse(t){if(!this.root||!this.rootDict)return;const e=this.rootDict.get("ParentTree");if(!e)return;const s=this.pageDict.get("StructParents"),i=t instanceof n.Ref&&this.root.structParentIds?.get(t);if(!Number.isInteger(s)&&!i)return;const o=new Map,a=new r.NumberTree(e,this.rootDict.xref);if(Number.isInteger(s)){const t=a.get(s);if(Array.isArray(t))for(const e of t)e instanceof n.Ref&&this.addNode(this.rootDict.xref.fetch(e),o)}if(i)for(const[t,e]of i){const s=a.get(t);if(s){const t=this.addNode(this.rootDict.xref.fetchIfRef(s),o);1===t?.kids?.length&&3===t.kids[0].type&&(t.kids[0].type=e)}}}addNode(t,e,s=0){if(s>40)return(0,i.warn)("StructTree MAX_DEPTH reached."),null;if(e.has(t))return e.get(t);const r=new c(this,t);e.set(t,r);const o=t.get("P");if(!o||(0,n.isName)(o.get("Type"),"StructTreeRoot"))return this.addTopLevelNode(t,r)||e.delete(t),r;const a=this.addNode(o,e,s+1);if(!a)return r;let h=!1;for(const e of a.kids)5===e.type&&e.dict===t&&(e.parentNode=r,h=!0);return h||e.delete(t),r}addTopLevelNode(t,e){const s=this.rootDict.get("K");if(!s)return!1;if(s instanceof n.Dict)return s.objId===t.objId&&(this.nodes[0]=e,!0);if(!Array.isArray(s))return!0;let i=!1;for(let n=0;n<s.length;n++){const r=s[n];r?.toString()===t.objId&&(this.nodes[n]=e,i=!0)}return i}get serializable(){function t(e,s,n=0){if(n>40)return void(0,i.warn)("StructTree too deep to be fully serialized.");const r=Object.create(null);r.role=e.role,r.children=[],s.children.push(r);const o=e.dict.get("Alt");"string"==typeof o&&(r.alt=(0,i.stringToPDFString)(o));const a=e.dict.get("Lang");"string"==typeof a&&(r.lang=(0,i.stringToPDFString)(a));for(const s of e.kids){const e=5===s.type?s.parentNode:null;e?t(e,r,n+1):1===s.type||2===s.type?r.children.push({type:"content",id:`p${s.pageObjId}_mc${s.mcid}`}):3===s.type?r.children.push({type:"object",id:s.refObjId}):4===s.type&&r.children.push({type:"annotation",id:`${i.AnnotationPrefix}${s.refObjId}`})}}const e=Object.create(null);e.children=[],e.role="Root";for(const s of this.nodes)s&&t(s,e);return e}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.incrementalUpdate=async function({originalData:t,xrefInfo:e,newRefs:s,xref:a=null,hasXfa:u=!1,xfaDatasetsRef:f=null,hasXfaDatasetsEntry:d=!1,needAppearances:m,acroFormRef:w=null,acroForm:b=null,xfaData:y=null}){await async function({xref:t,acroForm:e,acroFormRef:s,hasXfa:n,hasXfaDatasetsEntry:r,xfaDatasetsRef:o,needAppearances:a,newRefs:c}){if(!n||r||o||(0,i.warn)("XFA - Cannot save it"),!a&&(!n||!o||r))return;const l=e.clone();if(n&&!r){const t=e.get("XFA").slice();t.splice(2,0,"datasets"),t.splice(3,0,o),l.set("XFA",t)}a&&l.set("NeedAppearances",!0);const u=[];await h(s,l,u,t),c.push({ref:s,data:u.join("")})}({xref:a,acroForm:b,acroFormRef:w,hasXfa:u,hasXfaDatasetsEntry:d,xfaDatasetsRef:f,needAppearances:m,newRefs:s}),u&&function({xfaData:t,xfaDatasetsRef:e,newRefs:s,xref:n}){null===t&&(t=function(t,e){const s=new o.SimpleXMLParser({hasAttributes:!0}).parseFromString(t);for(const{xfa:t}of e){if(!t)continue;const{path:e,value:n}=t;if(!e)continue;const a=(0,r.parseXFAPath)(e);let c=s.documentElement.searchNode(a,0);!c&&a.length>1&&(c=s.documentElement.searchNode([a.at(-1)],0)),c?c.childNodes=Array.isArray(n)?n.map((t=>new o.SimpleDOMNode("value",t))):[new o.SimpleDOMNode("#text",n)]:(0,i.warn)(`Node not found for path: ${e}`)}const n=[];return s.documentElement.dump(n),n.join("")}(n.fetchIfRef(e).getString(),s));const a=n.encrypt;a&&(t=a.createCipherTransform(e.num,e.gen).encryptString(t));s.push({ref:e,data:`${e.num} ${e.gen} obj\n<< /Type /EmbeddedFile /Length ${t.length}>>\nstream\n`+t+"\nendstream\nendobj\n"})}({xfaData:y,xfaDatasetsRef:f,newRefs:s,xref:a});const A=new n.Dict(null),v=e.newRef;let x,k;const S=t.at(-1);10===S||13===S?(x=[],k=t.length):(x=["\n"],k=t.length+1),A.set("Size",v.num+1),A.set("Prev",e.startXRef),A.set("Type",n.Name.get("XRef")),null!==e.rootRef&&A.set("Root",e.rootRef),null!==e.infoRef&&A.set("Info",e.infoRef),null!==e.encryptRef&&A.set("Encrypt",e.encryptRef),s.push({ref:v,data:""}),s=s.sort(((t,e)=>t.ref.num-e.ref.num));const M=[[0,1,65535]],C=[0,1];let _=0;for(const{ref:t,data:e}of s)_=Math.max(_,k),M.push([1,k,Math.min(t.gen,65535)]),k+=e.length,C.push(t.num,1),x.push(e);if(A.set("Index",C),Array.isArray(e.fileIds)&&e.fileIds.length>0){const t=function(t,e){const s=Math.floor(Date.now()/1e3),n=e.filename||"",r=[s.toString(),n,t.toString()];let o=r.reduce(((t,e)=>t+e.length),0);for(const t of Object.values(e.info))r.push(t),o+=t.length;const a=new Uint8Array(o);let h=0;for(const t of r)g(t,h,a),h+=t.length;return(0,i.bytesToString)((0,c.calculateMD5)(a))}(k,e);A.set("ID",[e.fileIds[0],t])}const I=[1,Math.ceil(Math.log2(_)/8),2],F=(I[0]+I[1]+I[2])*M.length;A.set("W",I),A.set("Length",F),x.push(`${v.num} ${v.gen} obj\n`),await l(A,x,null),x.push(" stream\n");const O=x.reduce(((t,e)=>t+e.length),0),E=`\nendstream\nendobj\nstartxref\n${k}\n%%EOF\n`,T=new Uint8Array(t.length+O+F+E.length);T.set(t);let D=t.length;for(const t of x)g(t,D,T),D+=t.length;for(const[t,e,s]of M)D=p(t,I[0],D,T),D=p(e,I[1],D,T),D=p(s,I[2],D,T);return g(E,D,T),T},e.writeDict=l,e.writeObject=h;var i=s(2),n=s(4),r=s(3),o=s(71),a=s(5),c=s(74);async function h(t,e,s,{encrypt:i=null}){const r=i?.createCipherTransform(t.num,t.gen);s.push(`${t.num} ${t.gen} obj\n`),e instanceof n.Dict?await l(e,s,r):e instanceof a.BaseStream?await u(e,s,r):Array.isArray(e)&&await f(e,s,r),s.push("\nendobj\n")}async function l(t,e,s){e.push("<<");for(const i of t.getKeys())e.push(` /${(0,r.escapePDFName)(i)} `),await d(t.getRaw(i),e,s);e.push(">>")}async function u(t,e,s){let r=t.getString();const{dict:o}=t,[a,c]=await Promise.all([o.getAsync("Filter"),o.getAsync("DecodeParms")]),h=Array.isArray(a)?await o.xref.fetchIfRefAsync(a[0]):a,u=(0,n.isName)(h,"FlateDecode");if("undefined"!=typeof CompressionStream&&(r.length>=256||u))try{const t=(0,i.stringToBytes)(r),e=new CompressionStream("deflate"),s=e.writable.getWriter();s.write(t),s.close();const h=await new Response(e.readable).arrayBuffer();let l,f;r=(0,i.bytesToString)(new Uint8Array(h)),a?u||(l=Array.isArray(a)?[n.Name.get("FlateDecode"),...a]:[n.Name.get("FlateDecode"),a],c&&(f=Array.isArray(c)?[null,...c]:[null,c])):l=n.Name.get("FlateDecode"),l&&o.set("Filter",l),f&&o.set("DecodeParms",f)}catch(t){(0,i.info)(`writeStream - cannot compress data: "${t}".`)}s&&(r=s.encryptString(r)),o.set("Length",r.length),await l(o,e,s),e.push(" stream\n",r,"\nendstream")}async function f(t,e,s){e.push("[");let i=!0;for(const n of t)i?i=!1:e.push(" "),await d(n,e,s);e.push("]")}async function d(t,e,s){t instanceof n.Name?e.push(`/${(0,r.escapePDFName)(t.name)}`):t instanceof n.Ref?e.push(`${t.num} ${t.gen} R`):Array.isArray(t)?await f(t,e,s):"string"==typeof t?(s&&(t=s.encryptString(t)),e.push(`(${(0,r.escapeString)(t)})`)):"number"==typeof t?e.push((0,r.numberToString)(t)):"boolean"==typeof t?e.push(t.toString()):t instanceof n.Dict?await l(t,e,s):t instanceof a.BaseStream?await u(t,e,s):null===t?e.push("null"):(0,i.warn)(`Unhandled value in writer: ${typeof t}, please file a bug.`)}function p(t,e,s,i){for(let n=e+s-1;n>s-1;n--)i[n]=255&t,t>>=8;return s+e}function g(t,e,s){for(let i=0,n=t.length;i<n;i++)s[e+i]=255&t.charCodeAt(i)}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.calculateSHA256=e.calculateMD5=e.PDF20=e.PDF17=e.CipherTransformFactory=e.ARCFourCipher=e.AES256Cipher=e.AES128Cipher=void 0,e.calculateSHA384=u,e.calculateSHA512=void 0;var i=s(2),n=s(4),r=s(75);class o{constructor(t){this.a=0,this.b=0;const e=new Uint8Array(256),s=t.length;for(let t=0;t<256;++t)e[t]=t;for(let i=0,n=0;i<256;++i){const r=e[i];n=n+r+t[i%s]&255,e[i]=e[n],e[n]=r}this.s=e}encryptBlock(t){let e=this.a,s=this.b;const i=this.s,n=t.length,r=new Uint8Array(n);for(let o=0;o<n;++o){e=e+1&255;const n=i[e];s=s+n&255;const a=i[s];i[e]=a,i[s]=n,r[o]=t[o]^i[n+a&255]}return this.a=e,this.b=s,r}decryptBlock(t){return this.encryptBlock(t)}encrypt(t){return this.encryptBlock(t)}}e.ARCFourCipher=o;const a=function(){const t=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]),e=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]);return function(s,i,n){let r=1732584193,o=-271733879,a=-1732584194,c=271733878;const h=n+72&-64,l=new Uint8Array(h);let u,f;for(u=0;u<n;++u)l[u]=s[i++];l[u++]=128;const d=h-8;for(;u<d;)l[u++]=0;l[u++]=n<<3&255,l[u++]=n>>5&255,l[u++]=n>>13&255,l[u++]=n>>21&255,l[u++]=n>>>29&255,l[u++]=0,l[u++]=0,l[u++]=0;const p=new Int32Array(16);for(u=0;u<h;){for(f=0;f<16;++f,u+=4)p[f]=l[u]|l[u+1]<<8|l[u+2]<<16|l[u+3]<<24;let s,i,n=r,h=o,d=a,g=c;for(f=0;f<64;++f){f<16?(s=h&d|~h&g,i=f):f<32?(s=g&h|~g&d,i=5*f+1&15):f<48?(s=h^d^g,i=3*f+5&15):(s=d^(h|~g),i=7*f&15);const r=g,o=n+s+e[f]+p[i]|0,a=t[f];g=d,d=h,h=h+(o<<a|o>>>32-a)|0,n=r}r=r+n|0,o=o+h|0,a=a+d|0,c=c+g|0}return new Uint8Array([255&r,r>>8&255,r>>16&255,r>>>24&255,255&o,o>>8&255,o>>16&255,o>>>24&255,255&a,a>>8&255,a>>16&255,a>>>24&255,255&c,c>>8&255,c>>16&255,c>>>24&255])}}();e.calculateMD5=a;class c{constructor(t,e){this.high=0|t,this.low=0|e}and(t){this.high&=t.high,this.low&=t.low}xor(t){this.high^=t.high,this.low^=t.low}or(t){this.high|=t.high,this.low|=t.low}shiftRight(t){t>=32?(this.low=this.high>>>t-32|0,this.high=0):(this.low=this.low>>>t|this.high<<32-t,this.high=this.high>>>t|0)}shiftLeft(t){t>=32?(this.high=this.low<<t-32,this.low=0):(this.high=this.high<<t|this.low>>>32-t,this.low<<=t)}rotateRight(t){let e,s;32&t?(s=this.low,e=this.high):(e=this.low,s=this.high),this.low=e>>>(t&=31)|s<<32-t,this.high=s>>>t|e<<32-t}not(){this.high=~this.high,this.low=~this.low}add(t){const e=(this.low>>>0)+(t.low>>>0);let s=(this.high>>>0)+(t.high>>>0);e>4294967295&&(s+=1),this.low=0|e,this.high=0|s}copyTo(t,e){t[e]=this.high>>>24&255,t[e+1]=this.high>>16&255,t[e+2]=this.high>>8&255,t[e+3]=255&this.high,t[e+4]=this.low>>>24&255,t[e+5]=this.low>>16&255,t[e+6]=this.low>>8&255,t[e+7]=255&this.low}assign(t){this.high=t.high,this.low=t.low}}const h=function(){function t(t,e){return t>>>e|t<<32-e}function e(t,e,s){return t&e^~t&s}function s(t,e,s){return t&e^t&s^e&s}function i(e){return t(e,2)^t(e,13)^t(e,22)}function n(e){return t(e,6)^t(e,11)^t(e,25)}function r(e){return t(e,7)^t(e,18)^e>>>3}const o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];return function(a,c,h){let l=1779033703,u=3144134277,f=1013904242,d=2773480762,p=1359893119,g=2600822924,m=528734635,w=1541459225;const b=64*Math.ceil((h+9)/64),y=new Uint8Array(b);let A,v;for(A=0;A<h;++A)y[A]=a[c++];y[A++]=128;const x=b-8;for(;A<x;)y[A++]=0;y[A++]=0,y[A++]=0,y[A++]=0,y[A++]=h>>>29&255,y[A++]=h>>21&255,y[A++]=h>>13&255,y[A++]=h>>5&255,y[A++]=h<<3&255;const k=new Uint32Array(64);for(A=0;A<b;){for(v=0;v<16;++v)k[v]=y[A]<<24|y[A+1]<<16|y[A+2]<<8|y[A+3],A+=4;for(v=16;v<64;++v)k[v]=0|(t(S=k[v-2],17)^t(S,19)^S>>>10)+k[v-7]+r(k[v-15])+k[v-16];let a,c,h=l,b=u,x=f,M=d,C=p,_=g,I=m,F=w;for(v=0;v<64;++v)a=F+n(C)+e(C,_,I)+o[v]+k[v],c=i(h)+s(h,b,x),F=I,I=_,_=C,C=M+a|0,M=x,x=b,b=h,h=a+c|0;l=l+h|0,u=u+b|0,f=f+x|0,d=d+M|0,p=p+C|0,g=g+_|0,m=m+I|0,w=w+F|0}var S;return new Uint8Array([l>>24&255,l>>16&255,l>>8&255,255&l,u>>24&255,u>>16&255,u>>8&255,255&u,f>>24&255,f>>16&255,f>>8&255,255&f,d>>24&255,d>>16&255,d>>8&255,255&d,p>>24&255,p>>16&255,p>>8&255,255&p,g>>24&255,g>>16&255,g>>8&255,255&g,m>>24&255,m>>16&255,m>>8&255,255&m,w>>24&255,w>>16&255,w>>8&255,255&w])}}();e.calculateSHA256=h;const l=function(){function t(t,e,s,i,n){t.assign(e),t.and(s),n.assign(e),n.not(),n.and(i),t.xor(n)}function e(t,e,s,i,n){t.assign(e),t.and(s),n.assign(e),n.and(i),t.xor(n),n.assign(s),n.and(i),t.xor(n)}function s(t,e,s){t.assign(e),t.rotateRight(28),s.assign(e),s.rotateRight(34),t.xor(s),s.assign(e),s.rotateRight(39),t.xor(s)}function i(t,e,s){t.assign(e),t.rotateRight(14),s.assign(e),s.rotateRight(18),t.xor(s),s.assign(e),s.rotateRight(41),t.xor(s)}function n(t,e,s){t.assign(e),t.rotateRight(1),s.assign(e),s.rotateRight(8),t.xor(s),s.assign(e),s.shiftRight(7),t.xor(s)}function r(t,e,s){t.assign(e),t.rotateRight(19),s.assign(e),s.rotateRight(61),t.xor(s),s.assign(e),s.shiftRight(6),t.xor(s)}const o=[new c(1116352408,3609767458),new c(1899447441,602891725),new c(3049323471,3964484399),new c(3921009573,2173295548),new c(961987163,4081628472),new c(1508970993,3053834265),new c(2453635748,2937671579),new c(2870763221,3664609560),new c(3624381080,2734883394),new c(310598401,1164996542),new c(607225278,1323610764),new c(1426881987,3590304994),new c(1925078388,4068182383),new c(2162078206,991336113),new c(2614888103,633803317),new c(3248222580,3479774868),new c(3835390401,2666613458),new c(4022224774,944711139),new c(264347078,2341262773),new c(604807628,2007800933),new c(770255983,1495990901),new c(1249150122,1856431235),new c(1555081692,3175218132),new c(1996064986,2198950837),new c(2554220882,3999719339),new c(2821834349,766784016),new c(2952996808,2566594879),new c(3210313671,3203337956),new c(3336571891,1034457026),new c(3584528711,2466948901),new c(113926993,3758326383),new c(338241895,168717936),new c(666307205,1188179964),new c(773529912,1546045734),new c(1294757372,1522805485),new c(1396182291,2643833823),new c(1695183700,2343527390),new c(1986661051,1014477480),new c(2177026350,1206759142),new c(2456956037,344077627),new c(2730485921,1290863460),new c(2820302411,3158454273),new c(3259730800,3505952657),new c(3345764771,106217008),new c(3516065817,3606008344),new c(3600352804,1432725776),new c(4094571909,1467031594),new c(275423344,851169720),new c(430227734,3100823752),new c(506948616,1363258195),new c(659060556,3750685593),new c(883997877,3785050280),new c(958139571,3318307427),new c(1322822218,3812723403),new c(1537002063,2003034995),new c(1747873779,3602036899),new c(1955562222,1575990012),new c(2024104815,1125592928),new c(2227730452,2716904306),new c(2361852424,442776044),new c(2428436474,593698344),new c(2756734187,3733110249),new c(3204031479,2999351573),new c(3329325298,3815920427),new c(3391569614,3928383900),new c(3515267271,566280711),new c(3940187606,3454069534),new c(4118630271,4000239992),new c(116418474,1914138554),new c(174292421,2731055270),new c(289380356,3203993006),new c(460393269,320620315),new c(685471733,587496836),new c(852142971,1086792851),new c(1017036298,365543100),new c(1126000580,2618297676),new c(1288033470,3409855158),new c(1501505948,4234509866),new c(1607167915,987167468),new c(1816402316,1246189591)];return function(a,h,l,u=!1){let f,d,p,g,m,w,b,y;u?(f=new c(3418070365,3238371032),d=new c(1654270250,914150663),p=new c(2438529370,812702999),g=new c(355462360,4144912697),m=new c(1731405415,4290775857),w=new c(2394180231,1750603025),b=new c(3675008525,1694076839),y=new c(1203062813,3204075428)):(f=new c(1779033703,4089235720),d=new c(3144134277,2227873595),p=new c(1013904242,4271175723),g=new c(2773480762,1595750129),m=new c(1359893119,2917565137),w=new c(2600822924,725511199),b=new c(528734635,4215389547),y=new c(1541459225,327033209));const A=128*Math.ceil((l+17)/128),v=new Uint8Array(A);let x,k;for(x=0;x<l;++x)v[x]=a[h++];v[x++]=128;const S=A-16;for(;x<S;)v[x++]=0;v[x++]=0,v[x++]=0,v[x++]=0,v[x++]=0,v[x++]=0,v[x++]=0,v[x++]=0,v[x++]=0,v[x++]=0,v[x++]=0,v[x++]=0,v[x++]=l>>>29&255,v[x++]=l>>21&255,v[x++]=l>>13&255,v[x++]=l>>5&255,v[x++]=l<<3&255;const M=new Array(80);for(x=0;x<80;x++)M[x]=new c(0,0);let C=new c(0,0),_=new c(0,0),I=new c(0,0),F=new c(0,0),O=new c(0,0),E=new c(0,0),T=new c(0,0),D=new c(0,0);const P=new c(0,0),R=new c(0,0),N=new c(0,0),L=new c(0,0);let B,$;for(x=0;x<A;){for(k=0;k<16;++k)M[k].high=v[x]<<24|v[x+1]<<16|v[x+2]<<8|v[x+3],M[k].low=v[x+4]<<24|v[x+5]<<16|v[x+6]<<8|v[x+7],x+=8;for(k=16;k<80;++k)B=M[k],r(B,M[k-2],L),B.add(M[k-7]),n(N,M[k-15],L),B.add(N),B.add(M[k-16]);for(C.assign(f),_.assign(d),I.assign(p),F.assign(g),O.assign(m),E.assign(w),T.assign(b),D.assign(y),k=0;k<80;++k)P.assign(D),i(N,O,L),P.add(N),t(N,O,E,T,L),P.add(N),P.add(o[k]),P.add(M[k]),s(R,C,L),e(N,C,_,I,L),R.add(N),B=D,D=T,T=E,E=O,F.add(P),O=F,F=I,I=_,_=C,B.assign(P),B.add(R),C=B;f.add(C),d.add(_),p.add(I),g.add(F),m.add(O),w.add(E),b.add(T),y.add(D)}return u?($=new Uint8Array(48),f.copyTo($,0),d.copyTo($,8),p.copyTo($,16),g.copyTo($,24),m.copyTo($,32),w.copyTo($,40)):($=new Uint8Array(64),f.copyTo($,0),d.copyTo($,8),p.copyTo($,16),g.copyTo($,24),m.copyTo($,32),w.copyTo($,40),b.copyTo($,48),y.copyTo($,56)),$}}();function u(t,e,s){return l(t,e,s,!0)}e.calculateSHA512=l;class f{decryptBlock(t){return t}encrypt(t){return t}}class d{constructor(){this.constructor===d&&(0,i.unreachable)("Cannot initialize AESBaseCipher."),this._s=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]),this._inv_s=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),this._mix=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]),this._mixCol=new Uint8Array(256);for(let t=0;t<256;t++)this._mixCol[t]=t<128?t<<1:t<<1^27;this.buffer=new Uint8Array(16),this.bufferPosition=0}_expandKey(t){(0,i.unreachable)("Cannot call `_expandKey` on the base class")}_decrypt(t,e){let s,i,n;const r=new Uint8Array(16);r.set(t);for(let t=0,s=this._keySize;t<16;++t,++s)r[t]^=e[s];for(let t=this._cyclesOfRepetition-1;t>=1;--t){s=r[13],r[13]=r[9],r[9]=r[5],r[5]=r[1],r[1]=s,s=r[14],i=r[10],r[14]=r[6],r[10]=r[2],r[6]=s,r[2]=i,s=r[15],i=r[11],n=r[7],r[15]=r[3],r[11]=s,r[7]=i,r[3]=n;for(let t=0;t<16;++t)r[t]=this._inv_s[r[t]];for(let s=0,i=16*t;s<16;++s,++i)r[s]^=e[i];for(let t=0;t<16;t+=4){const e=this._mix[r[t+1]],i=this._mix[r[t+2]],n=this._mix[r[t+3]];s=this._mix[r[t]]^e>>>8^e<<24^i>>>16^i<<16^n>>>24^n<<8,r[t]=s>>>24&255,r[t+1]=s>>16&255,r[t+2]=s>>8&255,r[t+3]=255&s}}s=r[13],r[13]=r[9],r[9]=r[5],r[5]=r[1],r[1]=s,s=r[14],i=r[10],r[14]=r[6],r[10]=r[2],r[6]=s,r[2]=i,s=r[15],i=r[11],n=r[7],r[15]=r[3],r[11]=s,r[7]=i,r[3]=n;for(let t=0;t<16;++t)r[t]=this._inv_s[r[t]],r[t]^=e[t];return r}_encrypt(t,e){const s=this._s;let i,n,r;const o=new Uint8Array(16);o.set(t);for(let t=0;t<16;++t)o[t]^=e[t];for(let t=1;t<this._cyclesOfRepetition;t++){for(let t=0;t<16;++t)o[t]=s[o[t]];r=o[1],o[1]=o[5],o[5]=o[9],o[9]=o[13],o[13]=r,r=o[2],n=o[6],o[2]=o[10],o[6]=o[14],o[10]=r,o[14]=n,r=o[3],n=o[7],i=o[11],o[3]=o[15],o[7]=r,o[11]=n,o[15]=i;for(let t=0;t<16;t+=4){const e=o[t+0],s=o[t+1],n=o[t+2],r=o[t+3];i=e^s^n^r,o[t+0]^=i^this._mixCol[e^s],o[t+1]^=i^this._mixCol[s^n],o[t+2]^=i^this._mixCol[n^r],o[t+3]^=i^this._mixCol[r^e]}for(let s=0,i=16*t;s<16;++s,++i)o[s]^=e[i]}for(let t=0;t<16;++t)o[t]=s[o[t]];r=o[1],o[1]=o[5],o[5]=o[9],o[9]=o[13],o[13]=r,r=o[2],n=o[6],o[2]=o[10],o[6]=o[14],o[10]=r,o[14]=n,r=o[3],n=o[7],i=o[11],o[3]=o[15],o[7]=r,o[11]=n,o[15]=i;for(let t=0,s=this._keySize;t<16;++t,++s)o[t]^=e[s];return o}_decryptBlock2(t,e){const s=t.length;let i=this.buffer,n=this.bufferPosition;const r=[];let o=this.iv;for(let e=0;e<s;++e){if(i[n]=t[e],++n,n<16)continue;const s=this._decrypt(i,this._key);for(let t=0;t<16;++t)s[t]^=o[t];o=i,r.push(s),i=new Uint8Array(16),n=0}if(this.buffer=i,this.bufferLength=n,this.iv=o,0===r.length)return new Uint8Array(0);let a=16*r.length;if(e){const t=r.at(-1);let e=t[15];if(e<=16){for(let s=15,i=16-e;s>=i;--s)if(t[s]!==e){e=0;break}a-=e,r[r.length-1]=t.subarray(0,16-e)}}const c=new Uint8Array(a);for(let t=0,e=0,s=r.length;t<s;++t,e+=16)c.set(r[t],e);return c}decryptBlock(t,e,s=null){const i=t.length,n=this.buffer;let r=this.bufferPosition;if(s)this.iv=s;else{for(let e=0;r<16&&e<i;++e,++r)n[r]=t[e];if(r<16)return this.bufferLength=r,new Uint8Array(0);this.iv=n,t=t.subarray(16)}return this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=this._decryptBlock2,this.decryptBlock(t,e)}encrypt(t,e){const s=t.length;let i=this.buffer,n=this.bufferPosition;const r=[];e||(e=new Uint8Array(16));for(let o=0;o<s;++o){if(i[n]=t[o],++n,n<16)continue;for(let t=0;t<16;++t)i[t]^=e[t];const s=this._encrypt(i,this._key);e=s,r.push(s),i=new Uint8Array(16),n=0}if(this.buffer=i,this.bufferLength=n,this.iv=e,0===r.length)return new Uint8Array(0);const o=new Uint8Array(16*r.length);for(let t=0,e=0,s=r.length;t<s;++t,e+=16)o.set(r[t],e);return o}}class p extends d{constructor(t){super(),this._cyclesOfRepetition=10,this._keySize=160,this._rcon=new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]),this._key=this._expandKey(t)}_expandKey(t){const e=this._s,s=this._rcon,i=new Uint8Array(176);i.set(t);for(let t=16,n=1;t<176;++n){let r=i[t-3],o=i[t-2],a=i[t-1],c=i[t-4];r=e[r],o=e[o],a=e[a],c=e[c],r^=s[n];for(let e=0;e<4;++e)i[t]=r^=i[t-16],t++,i[t]=o^=i[t-16],t++,i[t]=a^=i[t-16],t++,i[t]=c^=i[t-16],t++}return i}}e.AES128Cipher=p;class g extends d{constructor(t){super(),this._cyclesOfRepetition=14,this._keySize=224,this._key=this._expandKey(t)}_expandKey(t){const e=this._s,s=new Uint8Array(240);s.set(t);let i,n,r,o,a=1;for(let t=32,c=1;t<240;++c){t%32==16?(i=e[i],n=e[n],r=e[r],o=e[o]):t%32==0&&(i=s[t-3],n=s[t-2],r=s[t-1],o=s[t-4],i=e[i],n=e[n],r=e[r],o=e[o],i^=a,(a<<=1)>=256&&(a=255&(27^a)));for(let e=0;e<4;++e)s[t]=i^=s[t-32],t++,s[t]=n^=s[t-32],t++,s[t]=r^=s[t-32],t++,s[t]=o^=s[t-32],t++}return s}}e.AES256Cipher=g;class m{checkOwnerPassword(t,e,s,n){const r=new Uint8Array(t.length+56);r.set(t,0),r.set(e,t.length),r.set(s,t.length+e.length);const o=h(r,0,r.length);return(0,i.isArrayEqual)(o,n)}checkUserPassword(t,e,s){const n=new Uint8Array(t.length+8);n.set(t,0),n.set(e,t.length);const r=h(n,0,n.length);return(0,i.isArrayEqual)(r,s)}getOwnerKey(t,e,s,i){const n=new Uint8Array(t.length+56);n.set(t,0),n.set(e,t.length),n.set(s,t.length+e.length);const r=h(n,0,n.length);return new g(r).decryptBlock(i,!1,new Uint8Array(16))}getUserKey(t,e,s){const i=new Uint8Array(t.length+8);i.set(t,0),i.set(e,t.length);const n=h(i,0,i.length);return new g(n).decryptBlock(s,!1,new Uint8Array(16))}}e.PDF17=m;class w{_hash(t,e,s){let i=h(e,0,e.length).subarray(0,32),n=[0],r=0;for(;r<64||n.at(-1)>r-32;){const e=t.length+i.length+s.length,o=new Uint8Array(e);let a=0;o.set(t,a),a+=t.length,o.set(i,a),a+=i.length,o.set(s,a);const c=new Uint8Array(64*e);for(let t=0,s=0;t<64;t++,s+=e)c.set(o,s);n=new p(i.subarray(0,16)).encrypt(c,i.subarray(16,32));const f=n.slice(0,16).reduce(((t,e)=>t+e),0)%3;0===f?i=h(n,0,n.length):1===f?i=u(n,0,n.length):2===f&&(i=l(n,0,n.length)),r++}return i.subarray(0,32)}checkOwnerPassword(t,e,s,n){const r=new Uint8Array(t.length+56);r.set(t,0),r.set(e,t.length),r.set(s,t.length+e.length);const o=this._hash(t,r,s);return(0,i.isArrayEqual)(o,n)}checkUserPassword(t,e,s){const n=new Uint8Array(t.length+8);n.set(t,0),n.set(e,t.length);const r=this._hash(t,n,[]);return(0,i.isArrayEqual)(r,s)}getOwnerKey(t,e,s,i){const n=new Uint8Array(t.length+56);n.set(t,0),n.set(e,t.length),n.set(s,t.length+e.length);const r=this._hash(t,n,s);return new g(r).decryptBlock(i,!1,new Uint8Array(16))}getUserKey(t,e,s){const i=new Uint8Array(t.length+8);i.set(t,0),i.set(e,t.length);const n=this._hash(t,i,[]);return new g(n).decryptBlock(s,!1,new Uint8Array(16))}}e.PDF20=w;class b{constructor(t,e){this.StringCipherConstructor=t,this.StreamCipherConstructor=e}createStream(t,e){const s=new this.StreamCipherConstructor;return new r.DecryptStream(t,e,(function(t,e){return s.decryptBlock(t,e)}))}decryptString(t){const e=new this.StringCipherConstructor;let s=(0,i.stringToBytes)(t);return s=e.decryptBlock(s,!0),(0,i.bytesToString)(s)}encryptString(t){const e=new this.StringCipherConstructor;if(e instanceof d){const s=16-t.length%16;t+=String.fromCharCode(s).repeat(s);const n=new Uint8Array(16);if("undefined"!=typeof crypto)crypto.getRandomValues(n);else for(let t=0;t<16;t++)n[t]=Math.floor(256*Math.random());let r=(0,i.stringToBytes)(t);r=e.encrypt(r,n);const o=new Uint8Array(16+r.length);return o.set(n),o.set(r,16),(0,i.bytesToString)(o)}let s=(0,i.stringToBytes)(t);return s=e.encrypt(s),(0,i.bytesToString)(s)}}class y{static#nn=new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]);#rn(t,e,s,i,n,r,o,a,c,h,l,u){if(e){const t=Math.min(127,e.length);e=e.subarray(0,t)}else e=[];const f=6===t?new w:new m;return f.checkUserPassword(e,a,o)?f.getUserKey(e,c,l):e.length&&f.checkOwnerPassword(e,i,r,s)?f.getOwnerKey(e,n,r,h):null}#on(t,e,s,i,n,r,c,h){const l=new Uint8Array(40+s.length+t.length);let u,f,d=0;if(e)for(f=Math.min(32,e.length);d<f;++d)l[d]=e[d];for(u=0;d<32;)l[d++]=y.#nn[u++];for(u=0,f=s.length;u<f;++u)l[d++]=s[u];for(l[d++]=255&n,l[d++]=n>>8&255,l[d++]=n>>16&255,l[d++]=n>>>24&255,u=0,f=t.length;u<f;++u)l[d++]=t[u];r>=4&&!h&&(l[d++]=255,l[d++]=255,l[d++]=255,l[d++]=255);let p=a(l,0,d);const g=c>>3;if(r>=3)for(u=0;u<50;++u)p=a(p,0,g);const m=p.subarray(0,g);let w,b;if(r>=3){for(d=0;d<32;++d)l[d]=y.#nn[d];for(u=0,f=t.length;u<f;++u)l[d++]=t[u];w=new o(m),b=w.encryptBlock(a(l,0,d)),f=m.length;const e=new Uint8Array(f);for(u=1;u<=19;++u){for(let t=0;t<f;++t)e[t]=m[t]^u;w=new o(e),b=w.encryptBlock(b)}for(u=0,f=b.length;u<f;++u)if(i[u]!==b[u])return null}else for(w=new o(m),b=w.encryptBlock(y.#nn),u=0,f=b.length;u<f;++u)if(i[u]!==b[u])return null;return m}#an(t,e,s,i){const n=new Uint8Array(32);let r=0;const c=Math.min(32,t.length);for(;r<c;++r)n[r]=t[r];let h=0;for(;r<32;)n[r++]=y.#nn[h++];let l=a(n,0,r);const u=i>>3;if(s>=3)for(h=0;h<50;++h)l=a(l,0,l.length);let f,d;if(s>=3){d=e;const t=new Uint8Array(u);for(h=19;h>=0;h--){for(let e=0;e<u;++e)t[e]=l[e]^h;f=new o(t),d=f.encryptBlock(d)}}else f=new o(l.subarray(0,u)),d=f.encryptBlock(e);return d}#cn(t,e,s,i=!1){const n=new Uint8Array(s.length+9),r=s.length;let o;for(o=0;o<r;++o)n[o]=s[o];return n[o++]=255&t,n[o++]=t>>8&255,n[o++]=t>>16&255,n[o++]=255&e,n[o++]=e>>8&255,i&&(n[o++]=115,n[o++]=65,n[o++]=108,n[o++]=84),a(n,0,o).subarray(0,Math.min(s.length+5,16))}#hn(t,e,s,r,a){if(!(e instanceof n.Name))throw new i.FormatError("Invalid crypt filter name.");const c=this,h=t.get(e.name),l=h?.get("CFM");if(!l||"None"===l.name)return function(){return new f};if("V2"===l.name)return function(){return new o(c.#cn(s,r,a,!1))};if("AESV2"===l.name)return function(){return new p(c.#cn(s,r,a,!0))};if("AESV3"===l.name)return function(){return new g(a)};throw new i.FormatError("Unknown crypto method")}constructor(t,e,s){const r=t.get("Filter");if(!(0,n.isName)(r,"Standard"))throw new i.FormatError("unknown encryption method");this.filterName=r.name,this.dict=t;const o=t.get("V");if(!Number.isInteger(o)||1!==o&&2!==o&&4!==o&&5!==o)throw new i.FormatError("unsupported encryption algorithm");this.algorithm=o;let a=t.get("Length");if(!a)if(o<=3)a=40;else{const e=t.get("CF"),s=t.get("StmF");if(e instanceof n.Dict&&s instanceof n.Name){e.suppressEncryption=!0;const t=e.get(s.name);a=t?.get("Length")||128,a<40&&(a<<=3)}}if(!Number.isInteger(a)||a<40||a%8!=0)throw new i.FormatError("invalid key length");const c=(0,i.stringToBytes)(t.get("O")),h=(0,i.stringToBytes)(t.get("U")),l=c.subarray(0,32),u=h.subarray(0,32),f=t.get("P"),d=t.get("R"),p=(4===o||5===o)&&!1!==t.get("EncryptMetadata");this.encryptMetadata=p;const g=(0,i.stringToBytes)(e);let m,w;if(s){if(6===d)try{s=(0,i.utf8StringToString)(s)}catch{(0,i.warn)("CipherTransformFactory: Unable to convert UTF8 encoded password.")}m=(0,i.stringToBytes)(s)}if(5!==o)w=this.#on(g,m,l,u,f,d,a,p);else{const e=c.subarray(32,40),s=c.subarray(40,48),n=h.subarray(0,48),r=h.subarray(32,40),o=h.subarray(40,48),a=(0,i.stringToBytes)(t.get("OE")),f=(0,i.stringToBytes)(t.get("UE")),p=(0,i.stringToBytes)(t.get("Perms"));w=this.#rn(d,m,l,e,s,n,u,r,o,a,f,p)}if(!w&&!s)throw new i.PasswordException("No password given",i.PasswordResponses.NEED_PASSWORD);if(!w&&s){const t=this.#an(m,l,d,a);w=this.#on(g,t,l,u,f,d,a,p)}if(!w)throw new i.PasswordException("Incorrect Password",i.PasswordResponses.INCORRECT_PASSWORD);if(this.encryptionKey=w,o>=4){const e=t.get("CF");e instanceof n.Dict&&(e.suppressEncryption=!0),this.cf=e,this.stmf=t.get("StmF")||n.Name.get("Identity"),this.strf=t.get("StrF")||n.Name.get("Identity"),this.eff=t.get("EFF")||this.stmf}}createCipherTransform(t,e){if(4===this.algorithm||5===this.algorithm)return new b(this.#hn(this.cf,this.strf,t,e,this.encryptionKey),this.#hn(this.cf,this.stmf,t,e,this.encryptionKey));const s=this.#cn(t,e,this.encryptionKey,!1),i=function(){return new o(s)};return new b(i,i)}}e.CipherTransformFactory=y},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DecryptStream=void 0;var i=s(18);e.DecryptStream=class extends i.DecodeStream{constructor(t,e,s){super(e),this.str=t,this.dict=t.dict,this.decrypt=s,this.nextChunk=null,this.initialized=!1}readBlock(){let t;if(this.initialized?t=this.nextChunk:(t=this.str.getBytes(512),this.initialized=!0),!t||0===t.length)return void(this.eof=!0);this.nextChunk=this.str.getBytes(512),t=(0,this.decrypt)(t,!(this.nextChunk?.length>0));const e=this.bufferLength,s=e+t.length;this.ensureBuffer(s).set(t,e),this.bufferLength=s}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectLoader=void 0;var i=s(4),n=s(5),r=s(3),o=s(2);function a(t,e){if(t instanceof i.Dict)t=t.getRawValues();else if(t instanceof n.BaseStream)t=t.dict.getRawValues();else if(!Array.isArray(t))return;for(const r of t)((s=r)instanceof i.Ref||s instanceof i.Dict||s instanceof n.BaseStream||Array.isArray(s))&&e.push(r);var s}e.ObjectLoader=class{constructor(t,e,s){this.dict=t,this.keys=e,this.xref=s,this.refSet=null}async load(){if(this.xref.stream.isDataLoaded)return;const{keys:t,dict:e}=this;this.refSet=new i.RefSet;const s=[];for(const i of t){const t=e.getRaw(i);void 0!==t&&s.push(t)}return this._walk(s)}async _walk(t){const e=[],s=[];for(;t.length;){let c=t.pop();if(c instanceof i.Ref){if(this.refSet.has(c))continue;try{this.refSet.put(c),c=this.xref.fetch(c)}catch(t){if(!(t instanceof r.MissingDataException)){(0,o.warn)(`ObjectLoader._walk - requesting all data: "${t}".`),this.refSet=null;const{manager:e}=this.xref.stream;return e.requestAllChunks()}e.push(c),s.push({begin:t.begin,end:t.end})}}if(c instanceof n.BaseStream){const t=c.getBaseStreams();if(t){let i=!1;for(const e of t)e.isDataLoaded||(i=!0,s.push({begin:e.start,end:e.end}));i&&e.push(c)}}a(c,t)}if(s.length){await this.xref.stream.manager.requestRanges(s);for(const t of e)t instanceof i.Ref&&this.refSet.remove(t);return this._walk(e)}this.refSet=null}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.XFAFactory=void 0;var i=s(78),n=s(79),r=s(89),o=s(85),a=s(84),c=s(2),h=s(90),l=s(100);class u{constructor(t){try{this.root=(new h.XFAParser).parse(u._createDocument(t));const e=new n.Binder(this.root);this.form=e.bind(),this.dataHandler=new r.DataHandler(this.root,e.getData()),this.form[i.$globalData].template=this.form}catch(t){(0,c.warn)(`XFA - an error occurred during parsing and binding: ${t}`)}}isValid(){return this.root&&this.form}_createPagesHelper(){const t=this.form[i.$toPages]();return new Promise(((e,s)=>{const i=()=>{try{const s=t.next();s.done?e(s.value):setTimeout(i,0)}catch(t){s(t)}};setTimeout(i,0)}))}async _createPages(){try{this.pages=await this._createPagesHelper(),this.dims=this.pages.children.map((t=>{const{width:e,height:s}=t.attributes.style;return[0,0,parseInt(e),parseInt(s)]}))}catch(t){(0,c.warn)(`XFA - an error occurred during layout: ${t}`)}}getBoundingBox(t){return this.dims[t]}async getNumPages(){return this.pages||await this._createPages(),this.dims.length}setImages(t){this.form[i.$globalData].images=t}setFonts(t){this.form[i.$globalData].fontFinder=new o.FontFinder(t);const e=[];for(let t of this.form[i.$globalData].usedTypefaces)t=(0,a.stripQuotes)(t),this.form[i.$globalData].fontFinder.find(t)||e.push(t);return e.length>0?e:null}appendFonts(t,e){this.form[i.$globalData].fontFinder.add(t,e)}async getPages(){this.pages||await this._createPages();const t=this.pages;return this.pages=null,t}serializeData(t){return this.dataHandler.serialize(t)}static _createDocument(t){return t["/xdp:xdp"]?Object.values(t).join(""):t["xdp:xdp"]}static getRichTextAsHtml(t){if(!t||"string"!=typeof t)return null;try{let e=new h.XFAParser(l.XhtmlNamespace,!0).parse(t);if(!["body","xhtml"].includes(e[i.$nodeName])){const t=l.XhtmlNamespace.body({});t[i.$appendChild](e),e=t}const s=e[i.$toHTML]();if(!s.success)return null;const{html:n}=s,{attributes:r}=n;return r&&(r.class&&(r.class=r.class.filter((t=>!t.startsWith("xfa")))),r.dir="auto"),{html:n,str:e[i.$text]()}}catch(t){(0,c.warn)(`XFA - an error occurred during parsing of rich text: ${t}`)}return null}}e.XFAFactory=u},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.$uid=e.$toStyle=e.$toString=e.$toPages=e.$toHTML=e.$text=e.$tabIndex=e.$setValue=e.$setSetAttributes=e.$setId=e.$searchNode=e.$root=e.$resolvePrototypes=e.$removeChild=e.$pushPara=e.$pushGlyphs=e.$popPara=e.$onText=e.$onChildCheck=e.$onChild=e.$nsAttributes=e.$nodeName=e.$namespaceId=e.$lastAttribute=e.$isUsable=e.$isTransparent=e.$isThereMoreWidth=e.$isSplittable=e.$isNsAgnostic=e.$isDescendent=e.$isDataValue=e.$isCDATAXml=e.$isBindable=e.$insertAt=e.$indexOf=e.$ids=e.$hasSettableValue=e.$globalData=e.$getTemplateRoot=e.$getSubformParent=e.$getRealChildrenByNameIt=e.$getParent=e.$getNextPage=e.$getExtra=e.$getDataValue=e.$getContainedChildren=e.$getChildrenByNameIt=e.$getChildrenByName=e.$getChildrenByClass=e.$getChildren=e.$getAvailableSpace=e.$getAttributes=e.$getAttributeIt=e.$flushHTML=e.$finalize=e.$extra=e.$dump=e.$data=e.$content=e.$consumed=e.$clone=e.$cleanup=e.$cleanPage=e.$clean=e.$childrenToHTML=e.$appendChild=e.$addHTML=e.$acceptWhitespace=void 0;const s=Symbol();e.$acceptWhitespace=s;const i=Symbol();e.$addHTML=i;const n=Symbol();e.$appendChild=n;const r=Symbol();e.$childrenToHTML=r;const o=Symbol();e.$clean=o;const a=Symbol();e.$cleanPage=a;const c=Symbol();e.$cleanup=c;const h=Symbol();e.$clone=h;const l=Symbol();e.$consumed=l;const u=Symbol("content");e.$content=u;const f=Symbol("data");e.$data=f;const d=Symbol();e.$dump=d;const p=Symbol("extra");e.$extra=p;const g=Symbol();e.$finalize=g;const m=Symbol();e.$flushHTML=m;const w=Symbol();e.$getAttributeIt=w;const b=Symbol();e.$getAttributes=b;const y=Symbol();e.$getAvailableSpace=y;const A=Symbol();e.$getChildrenByClass=A;const v=Symbol();e.$getChildrenByName=v;const x=Symbol();e.$getChildrenByNameIt=x;const k=Symbol();e.$getDataValue=k;const S=Symbol();e.$getExtra=S;const M=Symbol();e.$getRealChildrenByNameIt=M;const C=Symbol();e.$getChildren=C;const _=Symbol();e.$getContainedChildren=_;const I=Symbol();e.$getNextPage=I;const F=Symbol();e.$getSubformParent=F;const O=Symbol();e.$getParent=O;const E=Symbol();e.$getTemplateRoot=E;const T=Symbol();e.$globalData=T;const D=Symbol();e.$hasSettableValue=D;const P=Symbol();e.$ids=P;const R=Symbol();e.$indexOf=R;const N=Symbol();e.$insertAt=N;const L=Symbol();e.$isCDATAXml=L;const B=Symbol();e.$isBindable=B;const $=Symbol();e.$isDataValue=$;const U=Symbol();e.$isDescendent=U;const j=Symbol();e.$isNsAgnostic=j;const H=Symbol();e.$isSplittable=H;const G=Symbol();e.$isThereMoreWidth=G;const q=Symbol();e.$isTransparent=q;const X=Symbol();e.$isUsable=X;const W=Symbol();e.$lastAttribute=W;const z=Symbol("namespaceId");e.$namespaceId=z;const V=Symbol("nodeName");e.$nodeName=V;const K=Symbol();e.$nsAttributes=K;const J=Symbol();e.$onChild=J;const Y=Symbol();e.$onChildCheck=Y;const Q=Symbol();e.$onText=Q;const Z=Symbol();e.$pushGlyphs=Z;const tt=Symbol();e.$popPara=tt;const et=Symbol();e.$pushPara=et;const st=Symbol();e.$removeChild=st;const it=Symbol("root");e.$root=it;const nt=Symbol();e.$resolvePrototypes=nt;const rt=Symbol();e.$searchNode=rt;const ot=Symbol();e.$setId=ot;const at=Symbol();e.$setSetAttributes=at;const ct=Symbol();e.$setValue=ct;const ht=Symbol();e.$tabIndex=ht;const lt=Symbol();e.$text=lt;const ut=Symbol();e.$toPages=ut;const ft=Symbol();e.$toHTML=ft;const dt=Symbol();e.$toString=dt;const pt=Symbol();e.$toStyle=pt;const gt=Symbol("uid");e.$uid=gt},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Binder=void 0;var i=s(78),n=s(80),r=s(88),o=s(87),a=s(81),c=s(2);const h=a.NamespaceIds.datasets.id;function l(t){const e=new n.Text({});return e[i.$content]=t,e}e.Binder=class{constructor(t){this.root=t,this.datasets=t.datasets,this.data=t.datasets?.data||new o.XmlObject(a.NamespaceIds.datasets.id,"data"),this.emptyMerge=0===this.data[i.$getChildren]().length,this.root.form=this.form=t.template[i.$clone]()}_isConsumeData(){return!this.emptyMerge&&this._mergeMode}_isMatchTemplate(){return!this._isConsumeData()}bind(){return this._bindElement(this.form,this.data),this.form}getData(){return this.data}_bindValue(t,e,s){if(t[i.$data]=e,t[i.$hasSettableValue]())if(e[i.$isDataValue]()){const s=e[i.$getDataValue]();t[i.$setValue](l(s))}else if(t instanceof n.Field&&"multiSelect"===t.ui?.choiceList?.open){const s=e[i.$getChildren]().map((t=>t[i.$content].trim())).join("\n");t[i.$setValue](l(s))}else this._isConsumeData()&&(0,c.warn)("XFA - Nodes haven't the same type.");else!e[i.$isDataValue]()||this._isMatchTemplate()?this._bindElement(t,e):(0,c.warn)("XFA - Nodes haven't the same type.")}_findDataByNameToConsume(t,e,s,n){if(!t)return null;let r,o;for(let n=0;n<3;n++){for(r=s[i.$getRealChildrenByNameIt](t,!1,!0);o=r.next().value,o;)if(e===o[i.$isDataValue]())return o;if(s[i.$namespaceId]===a.NamespaceIds.datasets.id&&"data"===s[i.$nodeName])break;s=s[i.$getParent]()}return n?(r=this.data[i.$getRealChildrenByNameIt](t,!0,!1),o=r.next().value,o||(r=this.data[i.$getAttributeIt](t,!0),o=r.next().value,o?.[i.$isDataValue]()?o:null)):null}_setProperties(t,e){if(t.hasOwnProperty("setProperty"))for(const{ref:s,target:a,connection:h}of t.setProperty.children){if(h)continue;if(!s)continue;const l=(0,r.searchNode)(this.root,e,s,!1,!1);if(!l){(0,c.warn)(`XFA - Invalid reference: ${s}.`);continue}const[u]=l;if(!u[i.$isDescendent](this.data)){(0,c.warn)("XFA - Invalid node: must be a data node.");continue}const f=(0,r.searchNode)(this.root,t,a,!1,!1);if(!f){(0,c.warn)(`XFA - Invalid target: ${a}.`);continue}const[d]=f;if(!d[i.$isDescendent](t)){(0,c.warn)("XFA - Invalid target: must be a property or subproperty.");continue}const p=d[i.$getParent]();if(d instanceof n.SetProperty||p instanceof n.SetProperty){(0,c.warn)("XFA - Invalid target: cannot be a setProperty or one of its properties.");continue}if(d instanceof n.BindItems||p instanceof n.BindItems){(0,c.warn)("XFA - Invalid target: cannot be a bindItems or one of its properties.");continue}const g=u[i.$text](),m=d[i.$nodeName];if(d instanceof o.XFAAttribute){const t=Object.create(null);t[m]=g;const e=Reflect.construct(Object.getPrototypeOf(p).constructor,[t]);p[m]=e[m]}else d.hasOwnProperty(i.$content)?(d[i.$data]=u,d[i.$content]=g,d[i.$finalize]()):(0,c.warn)("XFA - Invalid node to use in setProperty")}}_bindItems(t,e){if(!t.hasOwnProperty("items")||!t.hasOwnProperty("bindItems")||t.bindItems.isEmpty())return;for(const e of t.items.children)t[i.$removeChild](e);t.items.clear();const s=new n.Items({}),o=new n.Items({});t[i.$appendChild](s),t.items.push(s),t[i.$appendChild](o),t.items.push(o);for(const{ref:n,labelRef:a,valueRef:h,connection:u}of t.bindItems.children){if(u)continue;if(!n)continue;const t=(0,r.searchNode)(this.root,e,n,!1,!1);if(t)for(const e of t){if(!e[i.$isDescendent](this.datasets)){(0,c.warn)(`XFA - Invalid ref (${n}): must be a datasets child.`);continue}const t=(0,r.searchNode)(this.root,e,a,!0,!1);if(!t){(0,c.warn)(`XFA - Invalid label: ${a}.`);continue}const[u]=t;if(!u[i.$isDescendent](this.datasets)){(0,c.warn)("XFA - Invalid label: must be a datasets child.");continue}const f=(0,r.searchNode)(this.root,e,h,!0,!1);if(!f){(0,c.warn)(`XFA - Invalid value: ${h}.`);continue}const[d]=f;if(!d[i.$isDescendent](this.datasets)){(0,c.warn)("XFA - Invalid value: must be a datasets child.");continue}const p=l(u[i.$text]()),g=l(d[i.$text]());s[i.$appendChild](p),s.text.push(p),o[i.$appendChild](g),o.text.push(g)}else(0,c.warn)(`XFA - Invalid reference: ${n}.`)}}_bindOccurrences(t,e,s){let n;if(e.length>1&&(n=t[i.$clone](),n[i.$removeChild](n.occur),n.occur=null),this._bindValue(t,e[0],s),this._setProperties(t,e[0]),this._bindItems(t,e[0]),1===e.length)return;const r=t[i.$getParent](),o=t[i.$nodeName],a=r[i.$indexOf](t);for(let t=1,c=e.length;t<c;t++){const c=e[t],h=n[i.$clone]();r[o].push(h),r[i.$insertAt](a+t,h),this._bindValue(h,c,s),this._setProperties(h,c),this._bindItems(h,c)}}_createOccurrences(t){if(!this.emptyMerge)return;const{occur:e}=t;if(!e||e.initial<=1)return;const s=t[i.$getParent](),n=t[i.$nodeName];if(!(s[n]instanceof o.XFAObjectArray))return;let r;r=t.name?s[n].children.filter((e=>e.name===t.name)).length:s[n].children.length;const a=s[i.$indexOf](t)+1,c=e.initial-r;if(c){const e=t[i.$clone]();e[i.$removeChild](e.occur),e.occur=null,s[n].push(e),s[i.$insertAt](a,e);for(let t=1;t<c;t++){const r=e[i.$clone]();s[n].push(r),s[i.$insertAt](a+t,r)}}}_getOccurInfo(t){const{name:e,occur:s}=t;return s&&e?[s.min,-1===s.max?1/0:s.max]:[1,1]}_setAndBind(t,e){this._setProperties(t,e),this._bindItems(t,e),this._bindElement(t,e)}_bindElement(t,e){const s=[];this._createOccurrences(t);for(const n of t[i.$getChildren]()){if(n[i.$data])continue;if(void 0===this._mergeMode&&"subform"===n[i.$nodeName]){this._mergeMode="consumeData"===n.mergeMode;const t=e[i.$getChildren]();if(t.length>0)this._bindOccurrences(n,[t[0]],null);else if(this.emptyMerge){const t=n[i.$data]=new o.XmlObject(e[i.$namespaceId]===h?-1:e[i.$namespaceId],n.name||"root");e[i.$appendChild](t),this._bindElement(n,t)}continue}if(!n[i.$isBindable]())continue;let t=!1,a=null,l=null,u=null;if(n.bind){switch(n.bind.match){case"none":this._setAndBind(n,e);continue;case"global":t=!0;break;case"dataRef":if(!n.bind.ref){(0,c.warn)(`XFA - ref is empty in node ${n[i.$nodeName]}.`),this._setAndBind(n,e);continue}l=n.bind.ref}n.bind.picture&&(a=n.bind.picture[i.$content])}const[f,d]=this._getOccurInfo(n);if(l){if(u=(0,r.searchNode)(this.root,e,l,!0,!1),null===u){if(u=(0,r.createDataNode)(this.data,e,l),!u)continue;this._isConsumeData()&&(u[i.$consumed]=!0),this._setAndBind(n,u);continue}this._isConsumeData()&&(u=u.filter((t=>!t[i.$consumed]))),u.length>d?u=u.slice(0,d):0===u.length&&(u=null),u&&this._isConsumeData()&&u.forEach((t=>{t[i.$consumed]=!0}))}else{if(!n.name){this._setAndBind(n,e);continue}if(this._isConsumeData()){const s=[];for(;s.length<d;){const r=this._findDataByNameToConsume(n.name,n[i.$hasSettableValue](),e,t);if(!r)break;r[i.$consumed]=!0,s.push(r)}u=s.length>0?s:null}else{if(u=e[i.$getRealChildrenByNameIt](n.name,!1,this.emptyMerge).next().value,!u){if(0===f){s.push(n);continue}u=n[i.$data]=new o.XmlObject(e[i.$namespaceId]===h?-1:e[i.$namespaceId],n.name),this.emptyMerge&&(u[i.$consumed]=!0),e[i.$appendChild](u),this._setAndBind(n,u);continue}this.emptyMerge&&(u[i.$consumed]=!0),u=[u]}}u?this._bindOccurrences(n,u,a):f>0?this._setAndBind(n,e):s.push(n)}s.forEach((t=>t[i.$getParent]()[i.$removeChild](t)))}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Value=e.Text=e.TemplateNamespace=e.Template=e.SetProperty=e.Items=e.Field=e.BindItems=void 0;var i=s(78),n=s(81),r=s(82),o=s(83),a=s(87),c=s(84),h=s(2),l=s(85),u=s(3),f=s(88);const d=n.NamespaceIds.template.id,p="http://www.w3.org/2000/svg",g=/^H(\d+)$/,m=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"]),w=[[[66,77],"image/bmp"],[[255,216,255],"image/jpeg"],[[73,73,42,0],"image/tiff"],[[77,77,0,42],"image/tiff"],[[71,73,70,56,57,97],"image/gif"],[[137,80,78,71,13,10,26,10],"image/png"]];function b(t){if(!t||!t.border)return{w:0,h:0};const e=t.border[i.$getExtra]();return e?{w:e.widths[0]+e.widths[2]+e.insets[0]+e.insets[2],h:e.widths[1]+e.widths[3]+e.insets[1]+e.insets[3]}:{w:0,h:0}}function y(t){return t.margin&&(t.margin.topInset||t.margin.rightInset||t.margin.bottomInset||t.margin.leftInset)}function A(t,e){if(!t.value){const e=new Pe({});t[i.$appendChild](e),t.value=e}t.value[i.$setValue](e)}function*v(t){for(const e of t[i.$getChildren]())e instanceof Ae?yield*e[i.$getContainedChildren]():yield e}function x(t){return"error"===t.validate?.nullTest}function k(t){for(;t;){if(!t.traversal)return void(t[i.$tabIndex]=t[i.$getParent]()[i.$tabIndex]);if(t[i.$tabIndex])return;let e=null;for(const s of t.traversal[i.$getChildren]())if("next"===s.operation){e=s;break}if(!e||!e.ref)return void(t[i.$tabIndex]=t[i.$getParent]()[i.$tabIndex]);const s=t[i.$getTemplateRoot]();t[i.$tabIndex]=++s[i.$tabIndex];const n=s[i.$searchNode](e.ref,t);if(!n)return;t=n[0]}}function S(t,e){const s=t.assist;if(s){const t=s[i.$toHTML]();t&&(e.title=t);const n=s.role.match(g);if(n){const t=n[1];e.role="heading",e["aria-level"]=t}}if("table"===t.layout)e.role="table";else if("row"===t.layout)e.role="row";else{const s=t[i.$getParent]();"row"===s.layout&&(e.role="TH"===s.assist?.role?"columnheader":"cell")}}function M(t){if(!t.assist)return null;const e=t.assist;return e.speak&&""!==e.speak[i.$content]?e.speak[i.$content]:e.toolTip?e.toolTip[i.$content]:null}function C(t){return c.HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:Object.create(null)},children:[{name:"span",attributes:{style:Object.create(null)},value:t}]})}function _(t){const e=t[i.$getTemplateRoot]();null===e[i.$extra].firstUnsplittable&&(e[i.$extra].firstUnsplittable=t,e[i.$extra].noLayoutFailure=!0)}function I(t){const e=t[i.$getTemplateRoot]();e[i.$extra].firstUnsplittable===t&&(e[i.$extra].noLayoutFailure=!1)}function F(t){if(t[i.$extra])return!1;if(t[i.$extra]=Object.create(null),"auto"===t.targetType)return!1;const e=t[i.$getTemplateRoot]();let s=null;if(t.target){if(s=e[i.$searchNode](t.target,t[i.$getParent]()),!s)return!1;s=s[0]}const{currentPageArea:n,currentContentArea:r}=e[i.$extra];if("pageArea"===t.targetType)return s instanceof Zt||(s=null),t.startNew?(t[i.$extra].target=s||n,!0):!(!s||s===n||(t[i.$extra].target=s,0));s instanceof tt||(s=null);const o=s&&s[i.$getParent]();let a,c=o;if(t.startNew)if(s){const t=o.contentArea.children,e=t.indexOf(r),i=t.indexOf(s);-1!==e&&e<i&&(c=null),a=i-1}else a=n.contentArea.children.indexOf(r);else{if(!s||s===r)return!1;a=o.contentArea.children.indexOf(s)-1,c=o===n?null:o}return t[i.$extra].target=c,t[i.$extra].index=a,!0}function O(t,e,s){const n=t[i.$getTemplateRoot](),r=n[i.$extra].noLayoutFailure,o=e[i.$getSubformParent];e[i.$getSubformParent]=()=>t,n[i.$extra].noLayoutFailure=!0;const a=e[i.$toHTML](s);t[i.$addHTML](a.html,a.bbox),n[i.$extra].noLayoutFailure=r,e[i.$getSubformParent]=o}class E extends a.StringObject{constructor(t){super(d,"appearanceFilter"),this.id=t.id||"",this.type=(0,c.getStringOption)(t.type,["optional","required"]),this.use=t.use||"",this.usehref=t.usehref||""}}class T extends a.XFAObject{constructor(t){super(d,"arc",!0),this.circular=(0,c.getInteger)({data:t.circular,defaultValue:0,validate:t=>1===t}),this.hand=(0,c.getStringOption)(t.hand,["even","left","right"]),this.id=t.id||"",this.startAngle=(0,c.getFloat)({data:t.startAngle,defaultValue:0,validate:()=>!0}),this.sweepAngle=(0,c.getFloat)({data:t.sweepAngle,defaultValue:360,validate:()=>!0}),this.use=t.use||"",this.usehref=t.usehref||"",this.edge=null,this.fill=null}[i.$toHTML](){const t=this.edge||new ut({}),e=t[i.$toStyle](),s=Object.create(null);let n;"visible"===this.fill?.presence?Object.assign(s,this.fill[i.$toStyle]()):s.fill="transparent",s.strokeWidth=(0,o.measureToString)("visible"===t.presence?t.thickness:0),s.stroke=e.color;const r={xmlns:p,style:{width:"100%",height:"100%",overflow:"visible"}};if(360===this.sweepAngle)n={name:"ellipse",attributes:{xmlns:p,cx:"50%",cy:"50%",rx:"50%",ry:"50%",style:s}};else{const t=this.startAngle*Math.PI/180,e=this.sweepAngle*Math.PI/180,i=this.sweepAngle>180?1:0,[o,a,c,h]=[50*(1+Math.cos(t)),50*(1-Math.sin(t)),50*(1+Math.cos(t+e)),50*(1-Math.sin(t+e))];n={name:"path",attributes:{xmlns:p,d:`M ${o} ${a} A 50 50 0 ${i} 0 ${c} ${h}`,vectorEffect:"non-scaling-stroke",style:s}},Object.assign(r,{viewBox:"0 0 100 100",preserveAspectRatio:"none"})}const a={name:"svg",children:[n],attributes:r};return y(this[i.$getParent]()[i.$getParent]())?c.HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[a]}):(a.attributes.style.position="absolute",c.HTMLResult.success(a))}}class D extends a.XFAObject{constructor(t){super(d,"area",!0),this.colSpan=(0,c.getInteger)({data:t.colSpan,defaultValue:1,validate:t=>t>=1||-1===t}),this.id=t.id||"",this.name=t.name||"",this.relevant=(0,c.getRelevant)(t.relevant),this.use=t.use||"",this.usehref=t.usehref||"",this.x=(0,c.getMeasurement)(t.x,"0pt"),this.y=(0,c.getMeasurement)(t.y,"0pt"),this.desc=null,this.extras=null,this.area=new a.XFAObjectArray,this.draw=new a.XFAObjectArray,this.exObject=new a.XFAObjectArray,this.exclGroup=new a.XFAObjectArray,this.field=new a.XFAObjectArray,this.subform=new a.XFAObjectArray,this.subformSet=new a.XFAObjectArray}*[i.$getContainedChildren](){yield*v(this)}[i.$isTransparent](){return!0}[i.$isBindable](){return!0}[i.$addHTML](t,e){const[s,n,r,o]=e;this[i.$extra].width=Math.max(this[i.$extra].width,s+r),this[i.$extra].height=Math.max(this[i.$extra].height,n+o),this[i.$extra].children.push(t)}[i.$getAvailableSpace](){return this[i.$extra].availableSpace}[i.$toHTML](t){const e=(0,o.toStyle)(this,"position"),s={style:e,id:this[i.$uid],class:["xfaArea"]};(0,o.isPrintOnly)(this)&&s.class.push("xfaPrintOnly"),this.name&&(s.xfaName=this.name);const n=[];this[i.$extra]={children:n,width:0,height:0,availableSpace:t};const r=this[i.$childrenToHTML]({filter:new Set(["area","draw","field","exclGroup","subform","subformSet"]),include:!0});if(!r.success)return r.isBreak()?r:(delete this[i.$extra],c.HTMLResult.FAILURE);e.width=(0,o.measureToString)(this[i.$extra].width),e.height=(0,o.measureToString)(this[i.$extra].height);const a={name:"div",attributes:s,children:n},h=[this.x,this.y,this[i.$extra].width,this[i.$extra].height];return delete this[i.$extra],c.HTMLResult.success(a,h)}}class P extends a.XFAObject{constructor(t){super(d,"assist",!0),this.id=t.id||"",this.role=t.role||"",this.use=t.use||"",this.usehref=t.usehref||"",this.speak=null,this.toolTip=null}[i.$toHTML](){return this.toolTip?.[i.$content]||null}}class R extends a.XFAObject{constructor(t){super(d,"barcode",!0),this.charEncoding=(0,c.getKeyword)({data:t.charEncoding?t.charEncoding.toLowerCase():"",defaultValue:"",validate:t=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(t)||t.match(/iso-8859-\d{2}/)}),this.checksum=(0,c.getStringOption)(t.checksum,["none","1mod10","1mod10_1mod11","2mod10","auto"]),this.dataColumnCount=(0,c.getInteger)({data:t.dataColumnCount,defaultValue:-1,validate:t=>t>=0}),this.dataLength=(0,c.getInteger)({data:t.dataLength,defaultValue:-1,validate:t=>t>=0}),this.dataPrep=(0,c.getStringOption)(t.dataPrep,["none","flateCompress"]),this.dataRowCount=(0,c.getInteger)({data:t.dataRowCount,defaultValue:-1,validate:t=>t>=0}),this.endChar=t.endChar||"",this.errorCorrectionLevel=(0,c.getInteger)({data:t.errorCorrectionLevel,defaultValue:-1,validate:t=>t>=0&&t<=8}),this.id=t.id||"",this.moduleHeight=(0,c.getMeasurement)(t.moduleHeight,"5mm"),this.moduleWidth=(0,c.getMeasurement)(t.moduleWidth,"0.25mm"),this.printCheckDigit=(0,c.getInteger)({data:t.printCheckDigit,defaultValue:0,validate:t=>1===t}),this.rowColumnRatio=(0,c.getRatio)(t.rowColumnRatio),this.startChar=t.startChar||"",this.textLocation=(0,c.getStringOption)(t.textLocation,["below","above","aboveEmbedded","belowEmbedded","none"]),this.truncate=(0,c.getInteger)({data:t.truncate,defaultValue:0,validate:t=>1===t}),this.type=(0,c.getStringOption)(t.type?t.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"]),this.upsMode=(0,c.getStringOption)(t.upsMode,["usCarrier","internationalCarrier","secureSymbol","standardSymbol"]),this.use=t.use||"",this.usehref=t.usehref||"",this.wideNarrowRatio=(0,c.getRatio)(t.wideNarrowRatio),this.encrypt=null,this.extras=null}}class N extends a.XFAObject{constructor(t){super(d,"bind",!0),this.match=(0,c.getStringOption)(t.match,["once","dataRef","global","none"]),this.ref=t.ref||"",this.picture=null}}class L extends a.XFAObject{constructor(t){super(d,"bindItems"),this.connection=t.connection||"",this.labelRef=t.labelRef||"",this.ref=t.ref||"",this.valueRef=t.valueRef||""}}e.BindItems=L;class B extends a.XFAObject{constructor(t){super(d,"bookend"),this.id=t.id||"",this.leader=t.leader||"",this.trailer=t.trailer||"",this.use=t.use||"",this.usehref=t.usehref||""}}class $ extends a.Option01{constructor(t){super(d,"boolean"),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}[i.$toHTML](t){return C(1===this[i.$content]?"1":"0")}}class U extends a.XFAObject{constructor(t){super(d,"border",!0),this.break=(0,c.getStringOption)(t.break,["close","open"]),this.hand=(0,c.getStringOption)(t.hand,["even","left","right"]),this.id=t.id||"",this.presence=(0,c.getStringOption)(t.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,c.getRelevant)(t.relevant),this.use=t.use||"",this.usehref=t.usehref||"",this.corner=new a.XFAObjectArray(4),this.edge=new a.XFAObjectArray(4),this.extras=null,this.fill=null,this.margin=null}[i.$getExtra](){if(!this[i.$extra]){const t=this.edge.children.slice();if(t.length<4){const e=t.at(-1)||new ut({});for(let s=t.length;s<4;s++)t.push(e)}const e=t.map((t=>t.thickness)),s=[0,0,0,0];this.margin&&(s[0]=this.margin.topInset,s[1]=this.margin.rightInset,s[2]=this.margin.bottomInset,s[3]=this.margin.leftInset),this[i.$extra]={widths:e,insets:s,edges:t}}return this[i.$extra]}[i.$toStyle](){const{edges:t}=this[i.$getExtra](),e=t.map((t=>{const e=t[i.$toStyle]();return e.color||="#000000",e})),s=Object.create(null);if(this.margin&&Object.assign(s,this.margin[i.$toStyle]()),"visible"===this.fill?.presence&&Object.assign(s,this.fill[i.$toStyle]()),this.corner.children.some((t=>0!==t.radius))){const t=this.corner.children.map((t=>t[i.$toStyle]()));if(2===t.length||3===t.length){const e=t.at(-1);for(let s=t.length;s<4;s++)t.push(e)}s.borderRadius=t.map((t=>t.radius)).join(" ")}switch(this.presence){case"invisible":case"hidden":s.borderStyle="";break;case"inactive":s.borderStyle="none";break;default:s.borderStyle=e.map((t=>t.style)).join(" ")}return s.borderWidth=e.map((t=>t.width)).join(" "),s.borderColor=e.map((t=>t.color)).join(" "),s}}class j extends a.XFAObject{constructor(t){super(d,"break",!0),this.after=(0,c.getStringOption)(t.after,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.afterTarget=t.afterTarget||"",this.before=(0,c.getStringOption)(t.before,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.beforeTarget=t.beforeTarget||"",this.bookendLeader=t.bookendLeader||"",this.bookendTrailer=t.bookendTrailer||"",this.id=t.id||"",this.overflowLeader=t.overflowLeader||"",this.overflowTarget=t.overflowTarget||"",this.overflowTrailer=t.overflowTrailer||"",this.startNew=(0,c.getInteger)({data:t.startNew,defaultValue:0,validate:t=>1===t}),this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null}}class H extends a.XFAObject{constructor(t){super(d,"breakAfter",!0),this.id=t.id||"",this.leader=t.leader||"",this.startNew=(0,c.getInteger)({data:t.startNew,defaultValue:0,validate:t=>1===t}),this.target=t.target||"",this.targetType=(0,c.getStringOption)(t.targetType,["auto","contentArea","pageArea"]),this.trailer=t.trailer||"",this.use=t.use||"",this.usehref=t.usehref||"",this.script=null}}class G extends a.XFAObject{constructor(t){super(d,"breakBefore",!0),this.id=t.id||"",this.leader=t.leader||"",this.startNew=(0,c.getInteger)({data:t.startNew,defaultValue:0,validate:t=>1===t}),this.target=t.target||"",this.targetType=(0,c.getStringOption)(t.targetType,["auto","contentArea","pageArea"]),this.trailer=t.trailer||"",this.use=t.use||"",this.usehref=t.usehref||"",this.script=null}[i.$toHTML](t){return this[i.$extra]={},c.HTMLResult.FAILURE}}class q extends a.XFAObject{constructor(t){super(d,"button",!0),this.highlight=(0,c.getStringOption)(t.highlight,["inverted","none","outline","push"]),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null}[i.$toHTML](t){const e=this[i.$getParent]()[i.$getParent](),s={name:"button",attributes:{id:this[i.$uid],class:["xfaButton"],style:{}},children:[]};for(const t of e.event.children){if("click"!==t.activity||!t.script)continue;const e=(0,u.recoverJsURL)(t.script[i.$content]);if(!e)continue;const n=(0,o.fixURL)(e.url);n&&s.children.push({name:"a",attributes:{id:"link"+this[i.$uid],href:n,newWindow:e.newWindow,class:["xfaLink"],style:{}},children:[]})}return c.HTMLResult.success(s)}}class X extends a.XFAObject{constructor(t){super(d,"calculate",!0),this.id=t.id||"",this.override=(0,c.getStringOption)(t.override,["disabled","error","ignore","warning"]),this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null,this.message=null,this.script=null}}class W extends a.XFAObject{constructor(t){super(d,"caption",!0),this.id=t.id||"",this.placement=(0,c.getStringOption)(t.placement,["left","bottom","inline","right","top"]),this.presence=(0,c.getStringOption)(t.presence,["visible","hidden","inactive","invisible"]),this.reserve=Math.ceil((0,c.getMeasurement)(t.reserve)),this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null,this.font=null,this.margin=null,this.para=null,this.value=null}[i.$setValue](t){A(this,t)}[i.$getExtra](t){if(!this[i.$extra]){let{width:e,height:s}=t;switch(this.placement){case"left":case"right":case"inline":e=this.reserve<=0?e:this.reserve;break;case"top":case"bottom":s=this.reserve<=0?s:this.reserve}this[i.$extra]=(0,o.layoutNode)(this,{width:e,height:s})}return this[i.$extra]}[i.$toHTML](t){if(!this.value)return c.HTMLResult.EMPTY;this[i.$pushPara]();const e=this.value[i.$toHTML](t).html;if(!e)return this[i.$popPara](),c.HTMLResult.EMPTY;const s=this.reserve;if(this.reserve<=0){const{w:e,h:s}=this[i.$getExtra](t);switch(this.placement){case"left":case"right":case"inline":this.reserve=e;break;case"top":case"bottom":this.reserve=s}}const n=[];n.push("string"==typeof e?{name:"#text",value:e}:e);const r=(0,o.toStyle)(this,"font","margin","visibility");switch(this.placement){case"left":case"right":this.reserve>0&&(r.width=(0,o.measureToString)(this.reserve));break;case"top":case"bottom":this.reserve>0&&(r.height=(0,o.measureToString)(this.reserve))}return(0,o.setPara)(this,null,e),this[i.$popPara](),this.reserve=s,c.HTMLResult.success({name:"div",attributes:{style:r,class:["xfaCaption"]},children:n})}}class z extends a.StringObject{constructor(t){super(d,"certificate"),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}}class V extends a.XFAObject{constructor(t){super(d,"certificates",!0),this.credentialServerPolicy=(0,c.getStringOption)(t.credentialServerPolicy,["optional","required"]),this.id=t.id||"",this.url=t.url||"",this.urlPolicy=t.urlPolicy||"",this.use=t.use||"",this.usehref=t.usehref||"",this.encryption=null,this.issuers=null,this.keyUsage=null,this.oids=null,this.signing=null,this.subjectDNs=null}}class K extends a.XFAObject{constructor(t){super(d,"checkButton",!0),this.id=t.id||"",this.mark=(0,c.getStringOption)(t.mark,["default","check","circle","cross","diamond","square","star"]),this.shape=(0,c.getStringOption)(t.shape,["square","round"]),this.size=(0,c.getMeasurement)(t.size,"10pt"),this.use=t.use||"",this.usehref=t.usehref||"",this.border=null,this.extras=null,this.margin=null}[i.$toHTML](t){const e=(0,o.toStyle)("margin"),s=(0,o.measureToString)(this.size);let n,r,a;e.width=e.height=s;const h=this[i.$getParent]()[i.$getParent](),l=h.items.children.length&&h.items.children[0][i.$toHTML]().html||[],u={on:(void 0!==l[0]?l[0]:"on").toString(),off:(void 0!==l[1]?l[1]:"off").toString()},f=(h.value?.[i.$text]()||"off")===u.on||void 0,d=h[i.$getSubformParent](),p=h[i.$uid];let g;d instanceof xt?(a=d[i.$uid],n="radio",r="xfaRadio",g=d[i.$data]?.[i.$uid]||d[i.$uid]):(n="checkbox",r="xfaCheckbox",g=h[i.$data]?.[i.$uid]||h[i.$uid]);const m={name:"input",attributes:{class:[r],style:e,fieldId:p,dataId:g,type:n,checked:f,xfaOn:u.on,xfaOff:u.off,"aria-label":M(h),"aria-required":!1}};return a&&(m.attributes.name=a),x(h)&&(m.attributes["aria-required"]=!0,m.attributes.required=!0),c.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[m]})}}class J extends a.XFAObject{constructor(t){super(d,"choiceList",!0),this.commitOn=(0,c.getStringOption)(t.commitOn,["select","exit"]),this.id=t.id||"",this.open=(0,c.getStringOption)(t.open,["userControl","always","multiSelect","onEntry"]),this.textEntry=(0,c.getInteger)({data:t.textEntry,defaultValue:0,validate:t=>1===t}),this.use=t.use||"",this.usehref=t.usehref||"",this.border=null,this.extras=null,this.margin=null}[i.$toHTML](t){const e=(0,o.toStyle)(this,"border","margin"),s=this[i.$getParent]()[i.$getParent](),n={fontSize:`calc(${s.font?.size||10}px * var(--scale-factor))`},r=[];if(s.items.children.length>0){const t=s.items;let e=0,o=0;2===t.children.length&&(e=t.children[0].save,o=1-e);const a=t.children[e][i.$toHTML]().html,c=t.children[o][i.$toHTML]().html;let h=!1;const l=s.value?.[i.$text]()||"";for(let t=0,e=a.length;t<e;t++){const e={name:"option",attributes:{value:c[t]||a[t],style:n},value:a[t]};c[t]===l&&(e.attributes.selected=h=!0),r.push(e)}h||r.splice(0,0,{name:"option",attributes:{hidden:!0,selected:!0},value:" "})}const a={class:["xfaSelect"],fieldId:s[i.$uid],dataId:s[i.$data]?.[i.$uid]||s[i.$uid],style:e,"aria-label":M(s),"aria-required":!1};return x(s)&&(a["aria-required"]=!0,a.required=!0),"multiSelect"===this.open&&(a.multiple=!0),c.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[{name:"select",children:r,attributes:a}]})}}class Y extends a.XFAObject{constructor(t){super(d,"color",!0),this.cSpace=(0,c.getStringOption)(t.cSpace,["SRGB"]),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||"",this.value=t.value?(0,c.getColor)(t.value):"",this.extras=null}[i.$hasSettableValue](){return!1}[i.$toStyle](){return this.value?h.Util.makeHexColor(this.value.r,this.value.g,this.value.b):null}}class Q extends a.XFAObject{constructor(t){super(d,"comb"),this.id=t.id||"",this.numberOfCells=(0,c.getInteger)({data:t.numberOfCells,defaultValue:0,validate:t=>t>=0}),this.use=t.use||"",this.usehref=t.usehref||""}}class Z extends a.XFAObject{constructor(t){super(d,"connect",!0),this.connection=t.connection||"",this.id=t.id||"",this.ref=t.ref||"",this.usage=(0,c.getStringOption)(t.usage,["exportAndImport","exportOnly","importOnly"]),this.use=t.use||"",this.usehref=t.usehref||"",this.picture=null}}class tt extends a.XFAObject{constructor(t){super(d,"contentArea",!0),this.h=(0,c.getMeasurement)(t.h),this.id=t.id||"",this.name=t.name||"",this.relevant=(0,c.getRelevant)(t.relevant),this.use=t.use||"",this.usehref=t.usehref||"",this.w=(0,c.getMeasurement)(t.w),this.x=(0,c.getMeasurement)(t.x,"0pt"),this.y=(0,c.getMeasurement)(t.y,"0pt"),this.desc=null,this.extras=null}[i.$toHTML](t){const e={left:(0,o.measureToString)(this.x),top:(0,o.measureToString)(this.y),width:(0,o.measureToString)(this.w),height:(0,o.measureToString)(this.h)},s=["xfaContentarea"];return(0,o.isPrintOnly)(this)&&s.push("xfaPrintOnly"),c.HTMLResult.success({name:"div",children:[],attributes:{style:e,class:s,id:this[i.$uid]}})}}class et extends a.XFAObject{constructor(t){super(d,"corner",!0),this.id=t.id||"",this.inverted=(0,c.getInteger)({data:t.inverted,defaultValue:0,validate:t=>1===t}),this.join=(0,c.getStringOption)(t.join,["square","round"]),this.presence=(0,c.getStringOption)(t.presence,["visible","hidden","inactive","invisible"]),this.radius=(0,c.getMeasurement)(t.radius),this.stroke=(0,c.getStringOption)(t.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=(0,c.getMeasurement)(t.thickness,"0.5pt"),this.use=t.use||"",this.usehref=t.usehref||"",this.color=null,this.extras=null}[i.$toStyle](){const t=(0,o.toStyle)(this,"visibility");return t.radius=(0,o.measureToString)("square"===this.join?0:this.radius),t}}class st extends a.ContentObject{constructor(t){super(d,"date"),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}[i.$finalize](){const t=this[i.$content].trim();this[i.$content]=t?new Date(t):null}[i.$toHTML](t){return C(this[i.$content]?this[i.$content].toString():"")}}class it extends a.ContentObject{constructor(t){super(d,"dateTime"),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}[i.$finalize](){const t=this[i.$content].trim();this[i.$content]=t?new Date(t):null}[i.$toHTML](t){return C(this[i.$content]?this[i.$content].toString():"")}}class nt extends a.XFAObject{constructor(t){super(d,"dateTimeEdit",!0),this.hScrollPolicy=(0,c.getStringOption)(t.hScrollPolicy,["auto","off","on"]),this.id=t.id||"",this.picker=(0,c.getStringOption)(t.picker,["host","none"]),this.use=t.use||"",this.usehref=t.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[i.$toHTML](t){const e=(0,o.toStyle)(this,"border","font","margin"),s=this[i.$getParent]()[i.$getParent](),n={name:"input",attributes:{type:"text",fieldId:s[i.$uid],dataId:s[i.$data]?.[i.$uid]||s[i.$uid],class:["xfaTextfield"],style:e,"aria-label":M(s),"aria-required":!1}};return x(s)&&(n.attributes["aria-required"]=!0,n.attributes.required=!0),c.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[n]})}}class rt extends a.ContentObject{constructor(t){super(d,"decimal"),this.fracDigits=(0,c.getInteger)({data:t.fracDigits,defaultValue:2,validate:()=>!0}),this.id=t.id||"",this.leadDigits=(0,c.getInteger)({data:t.leadDigits,defaultValue:-1,validate:()=>!0}),this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}[i.$finalize](){const t=parseFloat(this[i.$content].trim());this[i.$content]=isNaN(t)?null:t}[i.$toHTML](t){return C(null!==this[i.$content]?this[i.$content].toString():"")}}class ot extends a.XFAObject{constructor(t){super(d,"defaultUi",!0),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null}}class at extends a.XFAObject{constructor(t){super(d,"desc",!0),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||"",this.boolean=new a.XFAObjectArray,this.date=new a.XFAObjectArray,this.dateTime=new a.XFAObjectArray,this.decimal=new a.XFAObjectArray,this.exData=new a.XFAObjectArray,this.float=new a.XFAObjectArray,this.image=new a.XFAObjectArray,this.integer=new a.XFAObjectArray,this.text=new a.XFAObjectArray,this.time=new a.XFAObjectArray}}class ct extends a.OptionObject{constructor(t){super(d,"digestMethod",["","SHA1","SHA256","SHA512","RIPEMD160"]),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||""}}class ht extends a.XFAObject{constructor(t){super(d,"digestMethods",!0),this.id=t.id||"",this.type=(0,c.getStringOption)(t.type,["optional","required"]),this.use=t.use||"",this.usehref=t.usehref||"",this.digestMethod=new a.XFAObjectArray}}class lt extends a.XFAObject{constructor(t){super(d,"draw",!0),this.anchorType=(0,c.getStringOption)(t.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=(0,c.getInteger)({data:t.colSpan,defaultValue:1,validate:t=>t>=1||-1===t}),this.h=t.h?(0,c.getMeasurement)(t.h):"",this.hAlign=(0,c.getStringOption)(t.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=t.id||"",this.locale=t.locale||"",this.maxH=(0,c.getMeasurement)(t.maxH,"0pt"),this.maxW=(0,c.getMeasurement)(t.maxW,"0pt"),this.minH=(0,c.getMeasurement)(t.minH,"0pt"),this.minW=(0,c.getMeasurement)(t.minW,"0pt"),this.name=t.name||"",this.presence=(0,c.getStringOption)(t.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,c.getRelevant)(t.relevant),this.rotate=(0,c.getInteger)({data:t.rotate,defaultValue:0,validate:t=>t%90==0}),this.use=t.use||"",this.usehref=t.usehref||"",this.w=t.w?(0,c.getMeasurement)(t.w):"",this.x=(0,c.getMeasurement)(t.x,"0pt"),this.y=(0,c.getMeasurement)(t.y,"0pt"),this.assist=null,this.border=null,this.caption=null,this.desc=null,this.extras=null,this.font=null,this.keep=null,this.margin=null,this.para=null,this.traversal=null,this.ui=null,this.value=null,this.setProperty=new a.XFAObjectArray}[i.$setValue](t){A(this,t)}[i.$toHTML](t){if(k(this),"hidden"===this.presence||"inactive"===this.presence)return c.HTMLResult.EMPTY;(0,o.fixDimensions)(this),this[i.$pushPara]();const e=this.w,s=this.h,{w:n,h:a,isBroken:h}=(0,o.layoutNode)(this,t);if(n&&""===this.w){if(h&&this[i.$getSubformParent]()[i.$isThereMoreWidth]())return this[i.$popPara](),c.HTMLResult.FAILURE;this.w=n}if(a&&""===this.h&&(this.h=a),_(this),!(0,r.checkDimensions)(this,t))return this.w=e,this.h=s,this[i.$popPara](),c.HTMLResult.FAILURE;I(this);const l=(0,o.toStyle)(this,"font","hAlign","dimensions","position","presence","rotate","anchorType","border","margin");(0,o.setMinMaxDimensions)(this,l),l.margin&&(l.padding=l.margin,delete l.margin);const u=["xfaDraw"];this.font&&u.push("xfaFont"),(0,o.isPrintOnly)(this)&&u.push("xfaPrintOnly");const f={style:l,id:this[i.$uid],class:u};this.name&&(f.xfaName=this.name);const d={name:"div",attributes:f,children:[]};S(this,f);const p=(0,o.computeBbox)(this,d,t),g=this.value?this.value[i.$toHTML](t).html:null;return null===g?(this.w=e,this.h=s,this[i.$popPara](),c.HTMLResult.success((0,o.createWrapper)(this,d),p)):(d.children.push(g),(0,o.setPara)(this,l,g),this.w=e,this.h=s,this[i.$popPara](),c.HTMLResult.success((0,o.createWrapper)(this,d),p))}}class ut extends a.XFAObject{constructor(t){super(d,"edge",!0),this.cap=(0,c.getStringOption)(t.cap,["square","butt","round"]),this.id=t.id||"",this.presence=(0,c.getStringOption)(t.presence,["visible","hidden","inactive","invisible"]),this.stroke=(0,c.getStringOption)(t.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=(0,c.getMeasurement)(t.thickness,"0.5pt"),this.use=t.use||"",this.usehref=t.usehref||"",this.color=null,this.extras=null}[i.$toStyle](){const t=(0,o.toStyle)(this,"visibility");if(Object.assign(t,{linecap:this.cap,width:(0,o.measureToString)(this.thickness),color:this.color?this.color[i.$toStyle]():"#000000",style:""}),"visible"!==this.presence)t.style="none";else switch(this.stroke){case"solid":t.style="solid";break;case"dashDot":case"dashDotDot":case"dashed":t.style="dashed";break;case"dotted":t.style="dotted";break;case"embossed":t.style="ridge";break;case"etched":t.style="groove";break;case"lowered":t.style="inset";break;case"raised":t.style="outset"}return t}}class ft extends a.OptionObject{constructor(t){super(d,"encoding",["adbe.x509.rsa_sha1","adbe.pkcs7.detached","adbe.pkcs7.sha1"]),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||""}}class dt extends a.XFAObject{constructor(t){super(d,"encodings",!0),this.id=t.id||"",this.type=(0,c.getStringOption)(t.type,["optional","required"]),this.use=t.use||"",this.usehref=t.usehref||"",this.encoding=new a.XFAObjectArray}}class pt extends a.XFAObject{constructor(t){super(d,"encrypt",!0),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||"",this.certificate=null}}class gt extends a.XFAObject{constructor(t){super(d,"encryptData",!0),this.id=t.id||"",this.operation=(0,c.getStringOption)(t.operation,["encrypt","decrypt"]),this.target=t.target||"",this.use=t.use||"",this.usehref=t.usehref||"",this.filter=null,this.manifest=null}}class mt extends a.XFAObject{constructor(t){super(d,"encryption",!0),this.id=t.id||"",this.type=(0,c.getStringOption)(t.type,["optional","required"]),this.use=t.use||"",this.usehref=t.usehref||"",this.certificate=new a.XFAObjectArray}}class wt extends a.OptionObject{constructor(t){super(d,"encryptionMethod",["","AES256-CBC","TRIPLEDES-CBC","AES128-CBC","AES192-CBC"]),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||""}}class bt extends a.XFAObject{constructor(t){super(d,"encryptionMethods",!0),this.id=t.id||"",this.type=(0,c.getStringOption)(t.type,["optional","required"]),this.use=t.use||"",this.usehref=t.usehref||"",this.encryptionMethod=new a.XFAObjectArray}}class yt extends a.XFAObject{constructor(t){super(d,"event",!0),this.activity=(0,c.getStringOption)(t.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"]),this.id=t.id||"",this.listen=(0,c.getStringOption)(t.listen,["refOnly","refAndDescendents"]),this.name=t.name||"",this.ref=t.ref||"",this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null,this.encryptData=null,this.execute=null,this.script=null,this.signData=null,this.submit=null}}class At extends a.ContentObject{constructor(t){super(d,"exData"),this.contentType=t.contentType||"",this.href=t.href||"",this.id=t.id||"",this.maxLength=(0,c.getInteger)({data:t.maxLength,defaultValue:-1,validate:t=>t>=-1}),this.name=t.name||"",this.rid=t.rid||"",this.transferEncoding=(0,c.getStringOption)(t.transferEncoding,["none","base64","package"]),this.use=t.use||"",this.usehref=t.usehref||""}[i.$isCDATAXml](){return"text/html"===this.contentType}[i.$onChild](t){return("text/html"===this.contentType&&t[i.$namespaceId]===n.NamespaceIds.xhtml.id||"text/xml"===this.contentType)&&(this[i.$content]=t,!0)}[i.$toHTML](t){return"text/html"===this.contentType&&this[i.$content]?this[i.$content][i.$toHTML](t):c.HTMLResult.EMPTY}}class vt extends a.XFAObject{constructor(t){super(d,"exObject",!0),this.archive=t.archive||"",this.classId=t.classId||"",this.codeBase=t.codeBase||"",this.codeType=t.codeType||"",this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null,this.boolean=new a.XFAObjectArray,this.date=new a.XFAObjectArray,this.dateTime=new a.XFAObjectArray,this.decimal=new a.XFAObjectArray,this.exData=new a.XFAObjectArray,this.exObject=new a.XFAObjectArray,this.float=new a.XFAObjectArray,this.image=new a.XFAObjectArray,this.integer=new a.XFAObjectArray,this.text=new a.XFAObjectArray,this.time=new a.XFAObjectArray}}class xt extends a.XFAObject{constructor(t){super(d,"exclGroup",!0),this.access=(0,c.getStringOption)(t.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=t.accessKey||"",this.anchorType=(0,c.getStringOption)(t.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=(0,c.getInteger)({data:t.colSpan,defaultValue:1,validate:t=>t>=1||-1===t}),this.h=t.h?(0,c.getMeasurement)(t.h):"",this.hAlign=(0,c.getStringOption)(t.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=t.id||"",this.layout=(0,c.getStringOption)(t.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.maxH=(0,c.getMeasurement)(t.maxH,"0pt"),this.maxW=(0,c.getMeasurement)(t.maxW,"0pt"),this.minH=(0,c.getMeasurement)(t.minH,"0pt"),this.minW=(0,c.getMeasurement)(t.minW,"0pt"),this.name=t.name||"",this.presence=(0,c.getStringOption)(t.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,c.getRelevant)(t.relevant),this.use=t.use||"",this.usehref=t.usehref||"",this.w=t.w?(0,c.getMeasurement)(t.w):"",this.x=(0,c.getMeasurement)(t.x,"0pt"),this.y=(0,c.getMeasurement)(t.y,"0pt"),this.assist=null,this.bind=null,this.border=null,this.calculate=null,this.caption=null,this.desc=null,this.extras=null,this.margin=null,this.para=null,this.traversal=null,this.validate=null,this.connect=new a.XFAObjectArray,this.event=new a.XFAObjectArray,this.field=new a.XFAObjectArray,this.setProperty=new a.XFAObjectArray}[i.$isBindable](){return!0}[i.$hasSettableValue](){return!0}[i.$setValue](t){for(const e of this.field.children){if(!e.value){const t=new Pe({});e[i.$appendChild](t),e.value=t}e.value[i.$setValue](t)}}[i.$isThereMoreWidth](){return this.layout.endsWith("-tb")&&0===this[i.$extra].attempt&&this[i.$extra].numberInLine>0||this[i.$getParent]()[i.$isThereMoreWidth]()}[i.$isSplittable](){const t=this[i.$getSubformParent]();return!!t[i.$isSplittable]()&&(void 0!==this[i.$extra]._isSplittable?this[i.$extra]._isSplittable:"position"===this.layout||this.layout.includes("row")?(this[i.$extra]._isSplittable=!1,!1):!(t.layout?.endsWith("-tb")&&0!==t[i.$extra].numberInLine||(this[i.$extra]._isSplittable=!0,0)))}[i.$flushHTML](){return(0,r.flushHTML)(this)}[i.$addHTML](t,e){(0,r.addHTML)(this,t,e)}[i.$getAvailableSpace](){return(0,r.getAvailableSpace)(this)}[i.$toHTML](t){if(k(this),"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return c.HTMLResult.EMPTY;(0,o.fixDimensions)(this);const e=[],s={id:this[i.$uid],class:[]};(0,o.setAccess)(this,s.class),this[i.$extra]||(this[i.$extra]=Object.create(null)),Object.assign(this[i.$extra],{children:e,attributes:s,attempt:0,line:null,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,t.width),height:Math.min(this.h||1/0,t.height)},width:0,height:0,prevHeight:0,currentWidth:0});const n=this[i.$isSplittable]();if(n||_(this),!(0,r.checkDimensions)(this,t))return c.HTMLResult.FAILURE;const a=new Set(["field"]);if(this.layout.includes("row")){const t=this[i.$getSubformParent]().columnWidths;Array.isArray(t)&&t.length>0&&(this[i.$extra].columnWidths=t,this[i.$extra].currentColumn=0)}const h=(0,o.toStyle)(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),l=["xfaExclgroup"],u=(0,o.layoutClass)(this);u&&l.push(u),(0,o.isPrintOnly)(this)&&l.push("xfaPrintOnly"),s.style=h,s.class=l,this.name&&(s.xfaName=this.name),this[i.$pushPara]();const f="lr-tb"===this.layout||"rl-tb"===this.layout,d=f?2:1;for(;this[i.$extra].attempt<d;this[i.$extra].attempt++){f&&1===this[i.$extra].attempt&&(this[i.$extra].numberInLine=0);const t=this[i.$childrenToHTML]({filter:a,include:!0});if(t.success)break;if(t.isBreak())return this[i.$popPara](),t;if(f&&0===this[i.$extra].attempt&&0===this[i.$extra].numberInLine&&!this[i.$getTemplateRoot]()[i.$extra].noLayoutFailure){this[i.$extra].attempt=d;break}}if(this[i.$popPara](),n||I(this),this[i.$extra].attempt===d)return n||delete this[i.$extra],c.HTMLResult.FAILURE;let p=0,g=0;this.margin&&(p=this.margin.leftInset+this.margin.rightInset,g=this.margin.topInset+this.margin.bottomInset);const m=Math.max(this[i.$extra].width+p,this.w||0),w=Math.max(this[i.$extra].height+g,this.h||0),b=[this.x,this.y,m,w];""===this.w&&(h.width=(0,o.measureToString)(m)),""===this.h&&(h.height=(0,o.measureToString)(w));const y={name:"div",attributes:s,children:e};return S(this,s),delete this[i.$extra],c.HTMLResult.success((0,o.createWrapper)(this,y),b)}}class kt extends a.XFAObject{constructor(t){super(d,"execute"),this.connection=t.connection||"",this.executeType=(0,c.getStringOption)(t.executeType,["import","remerge"]),this.id=t.id||"",this.runAt=(0,c.getStringOption)(t.runAt,["client","both","server"]),this.use=t.use||"",this.usehref=t.usehref||""}}class St extends a.XFAObject{constructor(t){super(d,"extras",!0),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||"",this.boolean=new a.XFAObjectArray,this.date=new a.XFAObjectArray,this.dateTime=new a.XFAObjectArray,this.decimal=new a.XFAObjectArray,this.exData=new a.XFAObjectArray,this.extras=new a.XFAObjectArray,this.float=new a.XFAObjectArray,this.image=new a.XFAObjectArray,this.integer=new a.XFAObjectArray,this.text=new a.XFAObjectArray,this.time=new a.XFAObjectArray}}class Mt extends a.XFAObject{constructor(t){super(d,"field",!0),this.access=(0,c.getStringOption)(t.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=t.accessKey||"",this.anchorType=(0,c.getStringOption)(t.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=(0,c.getInteger)({data:t.colSpan,defaultValue:1,validate:t=>t>=1||-1===t}),this.h=t.h?(0,c.getMeasurement)(t.h):"",this.hAlign=(0,c.getStringOption)(t.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=t.id||"",this.locale=t.locale||"",this.maxH=(0,c.getMeasurement)(t.maxH,"0pt"),this.maxW=(0,c.getMeasurement)(t.maxW,"0pt"),this.minH=(0,c.getMeasurement)(t.minH,"0pt"),this.minW=(0,c.getMeasurement)(t.minW,"0pt"),this.name=t.name||"",this.presence=(0,c.getStringOption)(t.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,c.getRelevant)(t.relevant),this.rotate=(0,c.getInteger)({data:t.rotate,defaultValue:0,validate:t=>t%90==0}),this.use=t.use||"",this.usehref=t.usehref||"",this.w=t.w?(0,c.getMeasurement)(t.w):"",this.x=(0,c.getMeasurement)(t.x,"0pt"),this.y=(0,c.getMeasurement)(t.y,"0pt"),this.assist=null,this.bind=null,this.border=null,this.calculate=null,this.caption=null,this.desc=null,this.extras=null,this.font=null,this.format=null,this.items=new a.XFAObjectArray(2),this.keep=null,this.margin=null,this.para=null,this.traversal=null,this.ui=null,this.validate=null,this.value=null,this.bindItems=new a.XFAObjectArray,this.connect=new a.XFAObjectArray,this.event=new a.XFAObjectArray,this.setProperty=new a.XFAObjectArray}[i.$isBindable](){return!0}[i.$setValue](t){A(this,t)}[i.$toHTML](t){if(k(this),!this.ui){let t;switch(this.ui=new Te({}),this.ui[i.$globalData]=this[i.$globalData],this[i.$appendChild](this.ui),this.items.children.length){case 0:t=new Ce({}),this.ui.textEdit=t;break;case 1:t=new K({}),this.ui.checkButton=t;break;case 2:t=new J({}),this.ui.choiceList=t}this.ui[i.$appendChild](t)}if(!this.ui||"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return c.HTMLResult.EMPTY;this.caption&&delete this.caption[i.$extra],this[i.$pushPara]();const e=this.caption?this.caption[i.$toHTML](t).html:null,s=this.w,n=this.h;let a=0,h=0;this.margin&&(a=this.margin.leftInset+this.margin.rightInset,h=this.margin.topInset+this.margin.bottomInset);let u=null;if(""===this.w||""===this.h){let e=null,s=null,n=0,r=0;if(this.ui.checkButton)n=r=this.ui.checkButton.size;else{const{w:e,h:s}=(0,o.layoutNode)(this,t);null!==e?(n=e,r=s):r=(0,l.getMetrics)(this.font,!0).lineNoGap}if(u=b(this.ui[i.$getExtra]()),n+=u.w,r+=u.h,this.caption){const{w:o,h:a,isBroken:h}=this.caption[i.$getExtra](t);if(h&&this[i.$getSubformParent]()[i.$isThereMoreWidth]())return this[i.$popPara](),c.HTMLResult.FAILURE;switch(e=o,s=a,this.caption.placement){case"left":case"right":case"inline":e+=n;break;case"top":case"bottom":s+=r}}else e=n,s=r;e&&""===this.w&&(e+=a,this.w=Math.min(this.maxW<=0?1/0:this.maxW,this.minW+1<e?e:this.minW)),s&&""===this.h&&(s+=h,this.h=Math.min(this.maxH<=0?1/0:this.maxH,this.minH+1<s?s:this.minH))}if(this[i.$popPara](),(0,o.fixDimensions)(this),_(this),!(0,r.checkDimensions)(this,t))return this.w=s,this.h=n,this[i.$popPara](),c.HTMLResult.FAILURE;I(this);const f=(0,o.toStyle)(this,"font","dimensions","position","rotate","anchorType","presence","margin","hAlign");(0,o.setMinMaxDimensions)(this,f);const d=["xfaField"];this.font&&d.push("xfaFont"),(0,o.isPrintOnly)(this)&&d.push("xfaPrintOnly");const p={style:f,id:this[i.$uid],class:d};f.margin&&(f.padding=f.margin,delete f.margin),(0,o.setAccess)(this,d),this.name&&(p.xfaName=this.name);const g=[],m={name:"div",attributes:p,children:g};S(this,p);const w=this.border?this.border[i.$toStyle]():null,y=(0,o.computeBbox)(this,m,t),A=this.ui[i.$toHTML]().html;if(!A)return Object.assign(f,w),c.HTMLResult.success((0,o.createWrapper)(this,m),y);this[i.$tabIndex]&&(A.children?.[0]?A.children[0].attributes.tabindex=this[i.$tabIndex]:A.attributes.tabindex=this[i.$tabIndex]),A.attributes.style||(A.attributes.style=Object.create(null));let v=null;if(this.ui.button?(1===A.children.length&&([v]=A.children.splice(0,1)),Object.assign(A.attributes.style,w)):Object.assign(f,w),g.push(A),this.value)if(this.ui.imageEdit)A.children.push(this.value[i.$toHTML]().html);else if(!this.ui.button){let t="";if(this.value.exData)t=this.value.exData[i.$text]();else if(this.value.text)t=this.value.text[i.$getExtra]();else{const e=this.value[i.$toHTML]().html;null!==e&&(t=e.children[0].value)}this.ui.textEdit&&this.value.text?.maxChars&&(A.children[0].attributes.maxLength=this.value.text.maxChars),t&&(this.ui.numericEdit&&(t=parseFloat(t),t=isNaN(t)?"":t.toString()),"textarea"===A.children[0].name?A.children[0].attributes.textContent=t:A.children[0].attributes.value=t)}if(!this.ui.imageEdit&&A.children?.[0]&&this.h){u=u||b(this.ui[i.$getExtra]());let e=0;this.caption&&["top","bottom"].includes(this.caption.placement)?(e=this.caption.reserve,e<=0&&(e=this.caption[i.$getExtra](t).h),A.children[0].attributes.style.height=(0,o.measureToString)(this.h-e-h-u.h)):A.children[0].attributes.style.height="100%"}if(v&&A.children.push(v),!e)return A.attributes.class&&A.attributes.class.push("xfaLeft"),this.w=s,this.h=n,c.HTMLResult.success((0,o.createWrapper)(this,m),y);if(this.ui.button)return f.padding&&delete f.padding,"div"===e.name&&(e.name="span"),A.children.push(e),c.HTMLResult.success(m,y);switch(this.ui.checkButton&&(e.attributes.class[0]="xfaCaptionForCheckButton"),A.attributes.class||(A.attributes.class=[]),A.children.splice(0,0,e),this.caption.placement){case"left":case"inline":A.attributes.class.push("xfaLeft");break;case"right":A.attributes.class.push("xfaRight");break;case"top":A.attributes.class.push("xfaTop");break;case"bottom":A.attributes.class.push("xfaBottom")}return this.w=s,this.h=n,c.HTMLResult.success((0,o.createWrapper)(this,m),y)}}e.Field=Mt;class Ct extends a.XFAObject{constructor(t){super(d,"fill",!0),this.id=t.id||"",this.presence=(0,c.getStringOption)(t.presence,["visible","hidden","inactive","invisible"]),this.use=t.use||"",this.usehref=t.usehref||"",this.color=null,this.extras=null,this.linear=null,this.pattern=null,this.radial=null,this.solid=null,this.stipple=null}[i.$toStyle](){const t=this[i.$getParent](),e=t[i.$getParent]()[i.$getParent](),s=Object.create(null);let n="color",r=n;t instanceof U&&(n="background-color",r="background",e instanceof Te&&(s.backgroundColor="white")),(t instanceof he||t instanceof T)&&(n=r="fill",s.fill="white");for(const t of Object.getOwnPropertyNames(this)){if("extras"===t||"color"===t)continue;const e=this[t];if(!(e instanceof a.XFAObject))continue;const o=e[i.$toStyle](this.color);return o&&(s[o.startsWith("#")?n:r]=o),s}if(this.color?.value){const t=this.color[i.$toStyle]();s[t.startsWith("#")?n:r]=t}return s}}class _t extends a.XFAObject{constructor(t){super(d,"filter",!0),this.addRevocationInfo=(0,c.getStringOption)(t.addRevocationInfo,["","required","optional","none"]),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||"",this.version=(0,c.getInteger)({data:this.version,defaultValue:5,validate:t=>t>=1&&t<=5}),this.appearanceFilter=null,this.certificates=null,this.digestMethods=null,this.encodings=null,this.encryptionMethods=null,this.handler=null,this.lockDocument=null,this.mdp=null,this.reasons=null,this.timeStamp=null}}class It extends a.ContentObject{constructor(t){super(d,"float"),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}[i.$finalize](){const t=parseFloat(this[i.$content].trim());this[i.$content]=isNaN(t)?null:t}[i.$toHTML](t){return C(null!==this[i.$content]?this[i.$content].toString():"")}}class Ft extends a.XFAObject{constructor(t){super(d,"font",!0),this.baselineShift=(0,c.getMeasurement)(t.baselineShift),this.fontHorizontalScale=(0,c.getFloat)({data:t.fontHorizontalScale,defaultValue:100,validate:t=>t>=0}),this.fontVerticalScale=(0,c.getFloat)({data:t.fontVerticalScale,defaultValue:100,validate:t=>t>=0}),this.id=t.id||"",this.kerningMode=(0,c.getStringOption)(t.kerningMode,["none","pair"]),this.letterSpacing=(0,c.getMeasurement)(t.letterSpacing,"0"),this.lineThrough=(0,c.getInteger)({data:t.lineThrough,defaultValue:0,validate:t=>1===t||2===t}),this.lineThroughPeriod=(0,c.getStringOption)(t.lineThroughPeriod,["all","word"]),this.overline=(0,c.getInteger)({data:t.overline,defaultValue:0,validate:t=>1===t||2===t}),this.overlinePeriod=(0,c.getStringOption)(t.overlinePeriod,["all","word"]),this.posture=(0,c.getStringOption)(t.posture,["normal","italic"]),this.size=(0,c.getMeasurement)(t.size,"10pt"),this.typeface=t.typeface||"Courier",this.underline=(0,c.getInteger)({data:t.underline,defaultValue:0,validate:t=>1===t||2===t}),this.underlinePeriod=(0,c.getStringOption)(t.underlinePeriod,["all","word"]),this.use=t.use||"",this.usehref=t.usehref||"",this.weight=(0,c.getStringOption)(t.weight,["normal","bold"]),this.extras=null,this.fill=null}[i.$clean](t){super[i.$clean](t),this[i.$globalData].usedTypefaces.add(this.typeface)}[i.$toStyle](){const t=(0,o.toStyle)(this,"fill"),e=t.color;return e&&("#000000"===e?delete t.color:e.startsWith("#")||(t.background=e,t.backgroundClip="text",t.color="transparent")),this.baselineShift&&(t.verticalAlign=(0,o.measureToString)(this.baselineShift)),t.fontKerning="none"===this.kerningMode?"none":"normal",t.letterSpacing=(0,o.measureToString)(this.letterSpacing),0!==this.lineThrough&&(t.textDecoration="line-through",2===this.lineThrough&&(t.textDecorationStyle="double")),0!==this.overline&&(t.textDecoration="overline",2===this.overline&&(t.textDecorationStyle="double")),t.fontStyle=this.posture,t.fontSize=(0,o.measureToString)(.99*this.size),(0,o.setFontFamily)(this,this,this[i.$globalData].fontFinder,t),0!==this.underline&&(t.textDecoration="underline",2===this.underline&&(t.textDecorationStyle="double")),t.fontWeight=this.weight,t}}class Ot extends a.XFAObject{constructor(t){super(d,"format",!0),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null,this.picture=null}}class Et extends a.StringObject{constructor(t){super(d,"handler"),this.id=t.id||"",this.type=(0,c.getStringOption)(t.type,["optional","required"]),this.use=t.use||"",this.usehref=t.usehref||""}}class Tt extends a.XFAObject{constructor(t){super(d,"hyphenation"),this.excludeAllCaps=(0,c.getInteger)({data:t.excludeAllCaps,defaultValue:0,validate:t=>1===t}),this.excludeInitialCap=(0,c.getInteger)({data:t.excludeInitialCap,defaultValue:0,validate:t=>1===t}),this.hyphenate=(0,c.getInteger)({data:t.hyphenate,defaultValue:0,validate:t=>1===t}),this.id=t.id||"",this.pushCharacterCount=(0,c.getInteger)({data:t.pushCharacterCount,defaultValue:3,validate:t=>t>=0}),this.remainCharacterCount=(0,c.getInteger)({data:t.remainCharacterCount,defaultValue:3,validate:t=>t>=0}),this.use=t.use||"",this.usehref=t.usehref||"",this.wordCharacterCount=(0,c.getInteger)({data:t.wordCharacterCount,defaultValue:7,validate:t=>t>=0})}}class Dt extends a.StringObject{constructor(t){super(d,"image"),this.aspect=(0,c.getStringOption)(t.aspect,["fit","actual","height","none","width"]),this.contentType=t.contentType||"",this.href=t.href||"",this.id=t.id||"",this.name=t.name||"",this.transferEncoding=(0,c.getStringOption)(t.transferEncoding,["base64","none","package"]),this.use=t.use||"",this.usehref=t.usehref||""}[i.$toHTML](){if(this.contentType&&!m.has(this.contentType.toLowerCase()))return c.HTMLResult.EMPTY;let t=this[i.$globalData].images&&this[i.$globalData].images.get(this.href);if(!t&&(this.href||!this[i.$content]))return c.HTMLResult.EMPTY;if(t||"base64"!==this.transferEncoding||(t=(0,h.stringToBytes)(atob(this[i.$content]))),!t)return c.HTMLResult.EMPTY;if(!this.contentType){for(const[e,s]of w)if(t.length>e.length&&e.every(((e,s)=>e===t[s]))){this.contentType=s;break}if(!this.contentType)return c.HTMLResult.EMPTY}const e=new Blob([t],{type:this.contentType});let s;switch(this.aspect){case"fit":case"actual":break;case"height":s={height:"100%",objectFit:"fill"};break;case"none":s={width:"100%",height:"100%",objectFit:"fill"};break;case"width":s={width:"100%",objectFit:"fill"}}const n=this[i.$getParent]();return c.HTMLResult.success({name:"img",attributes:{class:["xfaImage"],style:s,src:URL.createObjectURL(e),alt:n?M(n[i.$getParent]()):null}})}}class Pt extends a.XFAObject{constructor(t){super(d,"imageEdit",!0),this.data=(0,c.getStringOption)(t.data,["link","embed"]),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||"",this.border=null,this.extras=null,this.margin=null}[i.$toHTML](t){return"embed"===this.data?c.HTMLResult.success({name:"div",children:[],attributes:{}}):c.HTMLResult.EMPTY}}class Rt extends a.ContentObject{constructor(t){super(d,"integer"),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}[i.$finalize](){const t=parseInt(this[i.$content].trim(),10);this[i.$content]=isNaN(t)?null:t}[i.$toHTML](t){return C(null!==this[i.$content]?this[i.$content].toString():"")}}class Nt extends a.XFAObject{constructor(t){super(d,"issuers",!0),this.id=t.id||"",this.type=(0,c.getStringOption)(t.type,["optional","required"]),this.use=t.use||"",this.usehref=t.usehref||"",this.certificate=new a.XFAObjectArray}}class Lt extends a.XFAObject{constructor(t){super(d,"items",!0),this.id=t.id||"",this.name=t.name||"",this.presence=(0,c.getStringOption)(t.presence,["visible","hidden","inactive","invisible"]),this.ref=t.ref||"",this.save=(0,c.getInteger)({data:t.save,defaultValue:0,validate:t=>1===t}),this.use=t.use||"",this.usehref=t.usehref||"",this.boolean=new a.XFAObjectArray,this.date=new a.XFAObjectArray,this.dateTime=new a.XFAObjectArray,this.decimal=new a.XFAObjectArray,this.exData=new a.XFAObjectArray,this.float=new a.XFAObjectArray,this.image=new a.XFAObjectArray,this.integer=new a.XFAObjectArray,this.text=new a.XFAObjectArray,this.time=new a.XFAObjectArray}[i.$toHTML](){const t=[];for(const e of this[i.$getChildren]())t.push(e[i.$text]());return c.HTMLResult.success(t)}}e.Items=Lt;class Bt extends a.XFAObject{constructor(t){super(d,"keep",!0),this.id=t.id||"";const e=["none","contentArea","pageArea"];this.intact=(0,c.getStringOption)(t.intact,e),this.next=(0,c.getStringOption)(t.next,e),this.previous=(0,c.getStringOption)(t.previous,e),this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null}}class $t extends a.XFAObject{constructor(t){super(d,"keyUsage");const e=["","yes","no"];this.crlSign=(0,c.getStringOption)(t.crlSign,e),this.dataEncipherment=(0,c.getStringOption)(t.dataEncipherment,e),this.decipherOnly=(0,c.getStringOption)(t.decipherOnly,e),this.digitalSignature=(0,c.getStringOption)(t.digitalSignature,e),this.encipherOnly=(0,c.getStringOption)(t.encipherOnly,e),this.id=t.id||"",this.keyAgreement=(0,c.getStringOption)(t.keyAgreement,e),this.keyCertSign=(0,c.getStringOption)(t.keyCertSign,e),this.keyEncipherment=(0,c.getStringOption)(t.keyEncipherment,e),this.nonRepudiation=(0,c.getStringOption)(t.nonRepudiation,e),this.type=(0,c.getStringOption)(t.type,["optional","required"]),this.use=t.use||"",this.usehref=t.usehref||""}}class Ut extends a.XFAObject{constructor(t){super(d,"line",!0),this.hand=(0,c.getStringOption)(t.hand,["even","left","right"]),this.id=t.id||"",this.slope=(0,c.getStringOption)(t.slope,["\\","/"]),this.use=t.use||"",this.usehref=t.usehref||"",this.edge=null}[i.$toHTML](){const t=this[i.$getParent]()[i.$getParent](),e=this.edge||new ut({}),s=e[i.$toStyle](),n=Object.create(null),r="visible"===e.presence?e.thickness:0;let a,h,l,u;n.strokeWidth=(0,o.measureToString)(r),n.stroke=s.color;let f="100%",d="100%";t.w<=r?([a,h,l,u]=["50%",0,"50%","100%"],f=n.strokeWidth):t.h<=r?([a,h,l,u]=[0,"50%","100%","50%"],d=n.strokeWidth):[a,h,l,u]="\\"===this.slope?[0,0,"100%","100%"]:[0,"100%","100%",0];const g={name:"svg",children:[{name:"line",attributes:{xmlns:p,x1:a,y1:h,x2:l,y2:u,style:n}}],attributes:{xmlns:p,width:f,height:d,style:{overflow:"visible"}}};return y(t)?c.HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[g]}):(g.attributes.style.position="absolute",c.HTMLResult.success(g))}}class jt extends a.XFAObject{constructor(t){super(d,"linear",!0),this.id=t.id||"",this.type=(0,c.getStringOption)(t.type,["toRight","toBottom","toLeft","toTop"]),this.use=t.use||"",this.usehref=t.usehref||"",this.color=null,this.extras=null}[i.$toStyle](t){return t=t?t[i.$toStyle]():"#FFFFFF",`linear-gradient(${this.type.replace(/([RBLT])/," $1").toLowerCase()}, ${t}, ${this.color?this.color[i.$toStyle]():"#000000"})`}}class Ht extends a.ContentObject{constructor(t){super(d,"lockDocument"),this.id=t.id||"",this.type=(0,c.getStringOption)(t.type,["optional","required"]),this.use=t.use||"",this.usehref=t.usehref||""}[i.$finalize](){this[i.$content]=(0,c.getStringOption)(this[i.$content],["auto","0","1"])}}class Gt extends a.XFAObject{constructor(t){super(d,"manifest",!0),this.action=(0,c.getStringOption)(t.action,["include","all","exclude"]),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null,this.ref=new a.XFAObjectArray}}class qt extends a.XFAObject{constructor(t){super(d,"margin",!0),this.bottomInset=(0,c.getMeasurement)(t.bottomInset,"0"),this.id=t.id||"",this.leftInset=(0,c.getMeasurement)(t.leftInset,"0"),this.rightInset=(0,c.getMeasurement)(t.rightInset,"0"),this.topInset=(0,c.getMeasurement)(t.topInset,"0"),this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null}[i.$toStyle](){return{margin:(0,o.measureToString)(this.topInset)+" "+(0,o.measureToString)(this.rightInset)+" "+(0,o.measureToString)(this.bottomInset)+" "+(0,o.measureToString)(this.leftInset)}}}class Xt extends a.XFAObject{constructor(t){super(d,"mdp"),this.id=t.id||"",this.permissions=(0,c.getInteger)({data:t.permissions,defaultValue:2,validate:t=>1===t||3===t}),this.signatureType=(0,c.getStringOption)(t.signatureType,["filler","author"]),this.use=t.use||"",this.usehref=t.usehref||""}}class Wt extends a.XFAObject{constructor(t){super(d,"medium"),this.id=t.id||"",this.imagingBBox=(0,c.getBBox)(t.imagingBBox),this.long=(0,c.getMeasurement)(t.long),this.orientation=(0,c.getStringOption)(t.orientation,["portrait","landscape"]),this.short=(0,c.getMeasurement)(t.short),this.stock=t.stock||"",this.trayIn=(0,c.getStringOption)(t.trayIn,["auto","delegate","pageFront"]),this.trayOut=(0,c.getStringOption)(t.trayOut,["auto","delegate"]),this.use=t.use||"",this.usehref=t.usehref||""}}class zt extends a.XFAObject{constructor(t){super(d,"message",!0),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||"",this.text=new a.XFAObjectArray}}class Vt extends a.XFAObject{constructor(t){super(d,"numericEdit",!0),this.hScrollPolicy=(0,c.getStringOption)(t.hScrollPolicy,["auto","off","on"]),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[i.$toHTML](t){const e=(0,o.toStyle)(this,"border","font","margin"),s=this[i.$getParent]()[i.$getParent](),n={name:"input",attributes:{type:"text",fieldId:s[i.$uid],dataId:s[i.$data]?.[i.$uid]||s[i.$uid],class:["xfaTextfield"],style:e,"aria-label":M(s),"aria-required":!1}};return x(s)&&(n.attributes["aria-required"]=!0,n.attributes.required=!0),c.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[n]})}}class Kt extends a.XFAObject{constructor(t){super(d,"occur",!0),this.id=t.id||"",this.initial=""!==t.initial?(0,c.getInteger)({data:t.initial,defaultValue:"",validate:()=>!0}):"",this.max=""!==t.max?(0,c.getInteger)({data:t.max,defaultValue:1,validate:()=>!0}):"",this.min=""!==t.min?(0,c.getInteger)({data:t.min,defaultValue:1,validate:()=>!0}):"",this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null}[i.$clean](){const t=this[i.$getParent](),e=this.min;""===this.min&&(this.min=t instanceof Zt||t instanceof te?0:1),""===this.max&&(this.max=""===e?t instanceof Zt||t instanceof te?-1:1:this.min),-1!==this.max&&this.max<this.min&&(this.max=this.min),""===this.initial&&(this.initial=t instanceof Se?1:this.min)}}class Jt extends a.StringObject{constructor(t){super(d,"oid"),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}}class Yt extends a.XFAObject{constructor(t){super(d,"oids",!0),this.id=t.id||"",this.type=(0,c.getStringOption)(t.type,["optional","required"]),this.use=t.use||"",this.usehref=t.usehref||"",this.oid=new a.XFAObjectArray}}class Qt extends a.XFAObject{constructor(t){super(d,"overflow"),this.id=t.id||"",this.leader=t.leader||"",this.target=t.target||"",this.trailer=t.trailer||"",this.use=t.use||"",this.usehref=t.usehref||""}[i.$getExtra](){if(!this[i.$extra]){const t=this[i.$getParent](),e=this[i.$getTemplateRoot](),s=e[i.$searchNode](this.target,t),n=e[i.$searchNode](this.leader,t),r=e[i.$searchNode](this.trailer,t);this[i.$extra]={target:s?.[0]||null,leader:n?.[0]||null,trailer:r?.[0]||null,addLeader:!1,addTrailer:!1}}return this[i.$extra]}}class Zt extends a.XFAObject{constructor(t){super(d,"pageArea",!0),this.blankOrNotBlank=(0,c.getStringOption)(t.blankOrNotBlank,["any","blank","notBlank"]),this.id=t.id||"",this.initialNumber=(0,c.getInteger)({data:t.initialNumber,defaultValue:1,validate:()=>!0}),this.name=t.name||"",this.numbered=(0,c.getInteger)({data:t.numbered,defaultValue:1,validate:()=>!0}),this.oddOrEven=(0,c.getStringOption)(t.oddOrEven,["any","even","odd"]),this.pagePosition=(0,c.getStringOption)(t.pagePosition,["any","first","last","only","rest"]),this.relevant=(0,c.getRelevant)(t.relevant),this.use=t.use||"",this.usehref=t.usehref||"",this.desc=null,this.extras=null,this.medium=null,this.occur=null,this.area=new a.XFAObjectArray,this.contentArea=new a.XFAObjectArray,this.draw=new a.XFAObjectArray,this.exclGroup=new a.XFAObjectArray,this.field=new a.XFAObjectArray,this.subform=new a.XFAObjectArray}[i.$isUsable](){return this[i.$extra]?!this.occur||-1===this.occur.max||this[i.$extra].numberOfUse<this.occur.max:(this[i.$extra]={numberOfUse:0},!0)}[i.$cleanPage](){delete this[i.$extra]}[i.$getNextPage](){this[i.$extra]||(this[i.$extra]={numberOfUse:0});const t=this[i.$getParent]();return"orderedOccurrence"===t.relation&&this[i.$isUsable]()?(this[i.$extra].numberOfUse+=1,this):t[i.$getNextPage]()}[i.$getAvailableSpace](){return this[i.$extra].space||{width:0,height:0}}[i.$toHTML](){this[i.$extra]||(this[i.$extra]={numberOfUse:1});const t=[];this[i.$extra].children=t;const e=Object.create(null);if(this.medium&&this.medium.short&&this.medium.long){if(e.width=(0,o.measureToString)(this.medium.short),e.height=(0,o.measureToString)(this.medium.long),this[i.$extra].space={width:this.medium.short,height:this.medium.long},"landscape"===this.medium.orientation){const t=e.width;e.width=e.height,e.height=t,this[i.$extra].space={width:this.medium.long,height:this.medium.short}}}else(0,h.warn)("XFA - No medium specified in pageArea: please file a bug.");return this[i.$childrenToHTML]({filter:new Set(["area","draw","field","subform"]),include:!0}),this[i.$childrenToHTML]({filter:new Set(["contentArea"]),include:!0}),c.HTMLResult.success({name:"div",children:t,attributes:{class:["xfaPage"],id:this[i.$uid],style:e,xfaName:this.name}})}}class te extends a.XFAObject{constructor(t){super(d,"pageSet",!0),this.duplexImposition=(0,c.getStringOption)(t.duplexImposition,["longEdge","shortEdge"]),this.id=t.id||"",this.name=t.name||"",this.relation=(0,c.getStringOption)(t.relation,["orderedOccurrence","duplexPaginated","simplexPaginated"]),this.relevant=(0,c.getRelevant)(t.relevant),this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null,this.occur=null,this.pageArea=new a.XFAObjectArray,this.pageSet=new a.XFAObjectArray}[i.$cleanPage](){for(const t of this.pageArea.children)t[i.$cleanPage]();for(const t of this.pageSet.children)t[i.$cleanPage]()}[i.$isUsable](){return!this.occur||-1===this.occur.max||this[i.$extra].numberOfUse<this.occur.max}[i.$getNextPage](){if(this[i.$extra]||(this[i.$extra]={numberOfUse:1,pageIndex:-1,pageSetIndex:-1}),"orderedOccurrence"===this.relation){if(this[i.$extra].pageIndex+1<this.pageArea.children.length)return this[i.$extra].pageIndex+=1,this.pageArea.children[this[i.$extra].pageIndex][i.$getNextPage]();if(this[i.$extra].pageSetIndex+1<this.pageSet.children.length)return this[i.$extra].pageSetIndex+=1,this.pageSet.children[this[i.$extra].pageSetIndex][i.$getNextPage]();if(this[i.$isUsable]())return this[i.$extra].numberOfUse+=1,this[i.$extra].pageIndex=-1,this[i.$extra].pageSetIndex=-1,this[i.$getNextPage]();const t=this[i.$getParent]();return t instanceof te?t[i.$getNextPage]():(this[i.$cleanPage](),this[i.$getNextPage]())}const t=this[i.$getTemplateRoot]()[i.$extra].pageNumber,e=t%2==0?"even":"odd",s=0===t?"first":"rest";let n=this.pageArea.children.find((t=>t.oddOrEven===e&&t.pagePosition===s));return n||(n=this.pageArea.children.find((t=>"any"===t.oddOrEven&&t.pagePosition===s)),n||(n=this.pageArea.children.find((t=>"any"===t.oddOrEven&&"any"===t.pagePosition)),n||this.pageArea.children[0]))}}class ee extends a.XFAObject{constructor(t){super(d,"para",!0),this.hAlign=(0,c.getStringOption)(t.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=t.id||"",this.lineHeight=t.lineHeight?(0,c.getMeasurement)(t.lineHeight,"0pt"):"",this.marginLeft=t.marginLeft?(0,c.getMeasurement)(t.marginLeft,"0pt"):"",this.marginRight=t.marginRight?(0,c.getMeasurement)(t.marginRight,"0pt"):"",this.orphans=(0,c.getInteger)({data:t.orphans,defaultValue:0,validate:t=>t>=0}),this.preserve=t.preserve||"",this.radixOffset=t.radixOffset?(0,c.getMeasurement)(t.radixOffset,"0pt"):"",this.spaceAbove=t.spaceAbove?(0,c.getMeasurement)(t.spaceAbove,"0pt"):"",this.spaceBelow=t.spaceBelow?(0,c.getMeasurement)(t.spaceBelow,"0pt"):"",this.tabDefault=t.tabDefault?(0,c.getMeasurement)(this.tabDefault):"",this.tabStops=(t.tabStops||"").trim().split(/\s+/).map(((t,e)=>e%2==1?(0,c.getMeasurement)(t):t)),this.textIndent=t.textIndent?(0,c.getMeasurement)(t.textIndent,"0pt"):"",this.use=t.use||"",this.usehref=t.usehref||"",this.vAlign=(0,c.getStringOption)(t.vAlign,["top","bottom","middle"]),this.widows=(0,c.getInteger)({data:t.widows,defaultValue:0,validate:t=>t>=0}),this.hyphenation=null}[i.$toStyle](){const t=(0,o.toStyle)(this,"hAlign");return""!==this.marginLeft&&(t.paddingLeft=(0,o.measureToString)(this.marginLeft)),""!==this.marginRight&&(t.paddingight=(0,o.measureToString)(this.marginRight)),""!==this.spaceAbove&&(t.paddingTop=(0,o.measureToString)(this.spaceAbove)),""!==this.spaceBelow&&(t.paddingBottom=(0,o.measureToString)(this.spaceBelow)),""!==this.textIndent&&(t.textIndent=(0,o.measureToString)(this.textIndent),(0,o.fixTextIndent)(t)),this.lineHeight>0&&(t.lineHeight=(0,o.measureToString)(this.lineHeight)),""!==this.tabDefault&&(t.tabSize=(0,o.measureToString)(this.tabDefault)),this.hyphenatation&&Object.assign(t,this.hyphenatation[i.$toStyle]()),t}}class se extends a.XFAObject{constructor(t){super(d,"passwordEdit",!0),this.hScrollPolicy=(0,c.getStringOption)(t.hScrollPolicy,["auto","off","on"]),this.id=t.id||"",this.passwordChar=t.passwordChar||"*",this.use=t.use||"",this.usehref=t.usehref||"",this.border=null,this.extras=null,this.margin=null}}class ie extends a.XFAObject{constructor(t){super(d,"pattern",!0),this.id=t.id||"",this.type=(0,c.getStringOption)(t.type,["crossHatch","crossDiagonal","diagonalLeft","diagonalRight","horizontal","vertical"]),this.use=t.use||"",this.usehref=t.usehref||"",this.color=null,this.extras=null}[i.$toStyle](t){t=t?t[i.$toStyle]():"#FFFFFF";const e=this.color?this.color[i.$toStyle]():"#000000",s="repeating-linear-gradient",n=`${t},${t} 5px,${e} 5px,${e} 10px`;switch(this.type){case"crossHatch":return`${s}(to top,${n}) ${s}(to right,${n})`;case"crossDiagonal":return`${s}(45deg,${n}) ${s}(-45deg,${n})`;case"diagonalLeft":return`${s}(45deg,${n})`;case"diagonalRight":return`${s}(-45deg,${n})`;case"horizontal":return`${s}(to top,${n})`;case"vertical":return`${s}(to right,${n})`}return""}}class ne extends a.StringObject{constructor(t){super(d,"picture"),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||""}}class re extends a.XFAObject{constructor(t){super(d,"proto",!0),this.appearanceFilter=new a.XFAObjectArray,this.arc=new a.XFAObjectArray,this.area=new a.XFAObjectArray,this.assist=new a.XFAObjectArray,this.barcode=new a.XFAObjectArray,this.bindItems=new a.XFAObjectArray,this.bookend=new a.XFAObjectArray,this.boolean=new a.XFAObjectArray,this.border=new a.XFAObjectArray,this.break=new a.XFAObjectArray,this.breakAfter=new a.XFAObjectArray,this.breakBefore=new a.XFAObjectArray,this.button=new a.XFAObjectArray,this.calculate=new a.XFAObjectArray,this.caption=new a.XFAObjectArray,this.certificate=new a.XFAObjectArray,this.certificates=new a.XFAObjectArray,this.checkButton=new a.XFAObjectArray,this.choiceList=new a.XFAObjectArray,this.color=new a.XFAObjectArray,this.comb=new a.XFAObjectArray,this.connect=new a.XFAObjectArray,this.contentArea=new a.XFAObjectArray,this.corner=new a.XFAObjectArray,this.date=new a.XFAObjectArray,this.dateTime=new a.XFAObjectArray,this.dateTimeEdit=new a.XFAObjectArray,this.decimal=new a.XFAObjectArray,this.defaultUi=new a.XFAObjectArray,this.desc=new a.XFAObjectArray,this.digestMethod=new a.XFAObjectArray,this.digestMethods=new a.XFAObjectArray,this.draw=new a.XFAObjectArray,this.edge=new a.XFAObjectArray,this.encoding=new a.XFAObjectArray,this.encodings=new a.XFAObjectArray,this.encrypt=new a.XFAObjectArray,this.encryptData=new a.XFAObjectArray,this.encryption=new a.XFAObjectArray,this.encryptionMethod=new a.XFAObjectArray,this.encryptionMethods=new a.XFAObjectArray,this.event=new a.XFAObjectArray,this.exData=new a.XFAObjectArray,this.exObject=new a.XFAObjectArray,this.exclGroup=new a.XFAObjectArray,this.execute=new a.XFAObjectArray,this.extras=new a.XFAObjectArray,this.field=new a.XFAObjectArray,this.fill=new a.XFAObjectArray,this.filter=new a.XFAObjectArray,this.float=new a.XFAObjectArray,this.font=new a.XFAObjectArray,this.format=new a.XFAObjectArray,this.handler=new a.XFAObjectArray,this.hyphenation=new a.XFAObjectArray,this.image=new a.XFAObjectArray,this.imageEdit=new a.XFAObjectArray,this.integer=new a.XFAObjectArray,this.issuers=new a.XFAObjectArray,this.items=new a.XFAObjectArray,this.keep=new a.XFAObjectArray,this.keyUsage=new a.XFAObjectArray,this.line=new a.XFAObjectArray,this.linear=new a.XFAObjectArray,this.lockDocument=new a.XFAObjectArray,this.manifest=new a.XFAObjectArray,this.margin=new a.XFAObjectArray,this.mdp=new a.XFAObjectArray,this.medium=new a.XFAObjectArray,this.message=new a.XFAObjectArray,this.numericEdit=new a.XFAObjectArray,this.occur=new a.XFAObjectArray,this.oid=new a.XFAObjectArray,this.oids=new a.XFAObjectArray,this.overflow=new a.XFAObjectArray,this.pageArea=new a.XFAObjectArray,this.pageSet=new a.XFAObjectArray,this.para=new a.XFAObjectArray,this.passwordEdit=new a.XFAObjectArray,this.pattern=new a.XFAObjectArray,this.picture=new a.XFAObjectArray,this.radial=new a.XFAObjectArray,this.reason=new a.XFAObjectArray,this.reasons=new a.XFAObjectArray,this.rectangle=new a.XFAObjectArray,this.ref=new a.XFAObjectArray,this.script=new a.XFAObjectArray,this.setProperty=new a.XFAObjectArray,this.signData=new a.XFAObjectArray,this.signature=new a.XFAObjectArray,this.signing=new a.XFAObjectArray,this.solid=new a.XFAObjectArray,this.speak=new a.XFAObjectArray,this.stipple=new a.XFAObjectArray,this.subform=new a.XFAObjectArray,this.subformSet=new a.XFAObjectArray,this.subjectDN=new a.XFAObjectArray,this.subjectDNs=new a.XFAObjectArray,this.submit=new a.XFAObjectArray,this.text=new a.XFAObjectArray,this.textEdit=new a.XFAObjectArray,this.time=new a.XFAObjectArray,this.timeStamp=new a.XFAObjectArray,this.toolTip=new a.XFAObjectArray,this.traversal=new a.XFAObjectArray,this.traverse=new a.XFAObjectArray,this.ui=new a.XFAObjectArray,this.validate=new a.XFAObjectArray,this.value=new a.XFAObjectArray,this.variables=new a.XFAObjectArray}}class oe extends a.XFAObject{constructor(t){super(d,"radial",!0),this.id=t.id||"",this.type=(0,c.getStringOption)(t.type,["toEdge","toCenter"]),this.use=t.use||"",this.usehref=t.usehref||"",this.color=null,this.extras=null}[i.$toStyle](t){t=t?t[i.$toStyle]():"#FFFFFF";const e=this.color?this.color[i.$toStyle]():"#000000";return`radial-gradient(circle at center, ${"toEdge"===this.type?`${t},${e}`:`${e},${t}`})`}}class ae extends a.StringObject{constructor(t){super(d,"reason"),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}}class ce extends a.XFAObject{constructor(t){super(d,"reasons",!0),this.id=t.id||"",this.type=(0,c.getStringOption)(t.type,["optional","required"]),this.use=t.use||"",this.usehref=t.usehref||"",this.reason=new a.XFAObjectArray}}class he extends a.XFAObject{constructor(t){super(d,"rectangle",!0),this.hand=(0,c.getStringOption)(t.hand,["even","left","right"]),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||"",this.corner=new a.XFAObjectArray(4),this.edge=new a.XFAObjectArray(4),this.fill=null}[i.$toHTML](){const t=this.edge.children.length?this.edge.children[0]:new ut({}),e=t[i.$toStyle](),s=Object.create(null);"visible"===this.fill?.presence?Object.assign(s,this.fill[i.$toStyle]()):s.fill="transparent",s.strokeWidth=(0,o.measureToString)("visible"===t.presence?t.thickness:0),s.stroke=e.color;const n=(this.corner.children.length?this.corner.children[0]:new et({}))[i.$toStyle](),r={name:"svg",children:[{name:"rect",attributes:{xmlns:p,width:"100%",height:"100%",x:0,y:0,rx:n.radius,ry:n.radius,style:s}}],attributes:{xmlns:p,style:{overflow:"visible"},width:"100%",height:"100%"}};return y(this[i.$getParent]()[i.$getParent]())?c.HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[r]}):(r.attributes.style.position="absolute",c.HTMLResult.success(r))}}class le extends a.StringObject{constructor(t){super(d,"ref"),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||""}}class ue extends a.StringObject{constructor(t){super(d,"script"),this.binding=t.binding||"",this.contentType=t.contentType||"",this.id=t.id||"",this.name=t.name||"",this.runAt=(0,c.getStringOption)(t.runAt,["client","both","server"]),this.use=t.use||"",this.usehref=t.usehref||""}}class fe extends a.XFAObject{constructor(t){super(d,"setProperty"),this.connection=t.connection||"",this.ref=t.ref||"",this.target=t.target||""}}e.SetProperty=fe;class de extends a.XFAObject{constructor(t){super(d,"signData",!0),this.id=t.id||"",this.operation=(0,c.getStringOption)(t.operation,["sign","clear","verify"]),this.ref=t.ref||"",this.target=t.target||"",this.use=t.use||"",this.usehref=t.usehref||"",this.filter=null,this.manifest=null}}class pe extends a.XFAObject{constructor(t){super(d,"signature",!0),this.id=t.id||"",this.type=(0,c.getStringOption)(t.type,["PDF1.3","PDF1.6"]),this.use=t.use||"",this.usehref=t.usehref||"",this.border=null,this.extras=null,this.filter=null,this.manifest=null,this.margin=null}}class ge extends a.XFAObject{constructor(t){super(d,"signing",!0),this.id=t.id||"",this.type=(0,c.getStringOption)(t.type,["optional","required"]),this.use=t.use||"",this.usehref=t.usehref||"",this.certificate=new a.XFAObjectArray}}class me extends a.XFAObject{constructor(t){super(d,"solid",!0),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null}[i.$toStyle](t){return t?t[i.$toStyle]():"#FFFFFF"}}class we extends a.StringObject{constructor(t){super(d,"speak"),this.disable=(0,c.getInteger)({data:t.disable,defaultValue:0,validate:t=>1===t}),this.id=t.id||"",this.priority=(0,c.getStringOption)(t.priority,["custom","caption","name","toolTip"]),this.rid=t.rid||"",this.use=t.use||"",this.usehref=t.usehref||""}}class be extends a.XFAObject{constructor(t){super(d,"stipple",!0),this.id=t.id||"",this.rate=(0,c.getInteger)({data:t.rate,defaultValue:50,validate:t=>t>=0&&t<=100}),this.use=t.use||"",this.usehref=t.usehref||"",this.color=null,this.extras=null}[i.$toStyle](t){const e=this.rate/100;return h.Util.makeHexColor(Math.round(t.value.r*(1-e)+this.value.r*e),Math.round(t.value.g*(1-e)+this.value.g*e),Math.round(t.value.b*(1-e)+this.value.b*e))}}class ye extends a.XFAObject{constructor(t){super(d,"subform",!0),this.access=(0,c.getStringOption)(t.access,["open","nonInteractive","protected","readOnly"]),this.allowMacro=(0,c.getInteger)({data:t.allowMacro,defaultValue:0,validate:t=>1===t}),this.anchorType=(0,c.getStringOption)(t.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=(0,c.getInteger)({data:t.colSpan,defaultValue:1,validate:t=>t>=1||-1===t}),this.columnWidths=(t.columnWidths||"").trim().split(/\s+/).map((t=>"-1"===t?-1:(0,c.getMeasurement)(t))),this.h=t.h?(0,c.getMeasurement)(t.h):"",this.hAlign=(0,c.getStringOption)(t.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=t.id||"",this.layout=(0,c.getStringOption)(t.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.locale=t.locale||"",this.maxH=(0,c.getMeasurement)(t.maxH,"0pt"),this.maxW=(0,c.getMeasurement)(t.maxW,"0pt"),this.mergeMode=(0,c.getStringOption)(t.mergeMode,["consumeData","matchTemplate"]),this.minH=(0,c.getMeasurement)(t.minH,"0pt"),this.minW=(0,c.getMeasurement)(t.minW,"0pt"),this.name=t.name||"",this.presence=(0,c.getStringOption)(t.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,c.getRelevant)(t.relevant),this.restoreState=(0,c.getStringOption)(t.restoreState,["manual","auto"]),this.scope=(0,c.getStringOption)(t.scope,["name","none"]),this.use=t.use||"",this.usehref=t.usehref||"",this.w=t.w?(0,c.getMeasurement)(t.w):"",this.x=(0,c.getMeasurement)(t.x,"0pt"),this.y=(0,c.getMeasurement)(t.y,"0pt"),this.assist=null,this.bind=null,this.bookend=null,this.border=null,this.break=null,this.calculate=null,this.desc=null,this.extras=null,this.keep=null,this.margin=null,this.occur=null,this.overflow=null,this.pageSet=null,this.para=null,this.traversal=null,this.validate=null,this.variables=null,this.area=new a.XFAObjectArray,this.breakAfter=new a.XFAObjectArray,this.breakBefore=new a.XFAObjectArray,this.connect=new a.XFAObjectArray,this.draw=new a.XFAObjectArray,this.event=new a.XFAObjectArray,this.exObject=new a.XFAObjectArray,this.exclGroup=new a.XFAObjectArray,this.field=new a.XFAObjectArray,this.proto=new a.XFAObjectArray,this.setProperty=new a.XFAObjectArray,this.subform=new a.XFAObjectArray,this.subformSet=new a.XFAObjectArray}[i.$getSubformParent](){const t=this[i.$getParent]();return t instanceof Ae?t[i.$getSubformParent]():t}[i.$isBindable](){return!0}[i.$isThereMoreWidth](){return this.layout.endsWith("-tb")&&0===this[i.$extra].attempt&&this[i.$extra].numberInLine>0||this[i.$getParent]()[i.$isThereMoreWidth]()}*[i.$getContainedChildren](){yield*v(this)}[i.$flushHTML](){return(0,r.flushHTML)(this)}[i.$addHTML](t,e){(0,r.addHTML)(this,t,e)}[i.$getAvailableSpace](){return(0,r.getAvailableSpace)(this)}[i.$isSplittable](){const t=this[i.$getSubformParent]();return!!t[i.$isSplittable]()&&(void 0!==this[i.$extra]._isSplittable?this[i.$extra]._isSplittable:"position"===this.layout||this.layout.includes("row")||this.keep&&"none"!==this.keep.intact?(this[i.$extra]._isSplittable=!1,!1):!(t.layout?.endsWith("-tb")&&0!==t[i.$extra].numberInLine||(this[i.$extra]._isSplittable=!0,0)))}[i.$toHTML](t){if(k(this),this.break){if("auto"!==this.break.after||""!==this.break.afterTarget){const t=new H({targetType:this.break.after,target:this.break.afterTarget,startNew:this.break.startNew.toString()});t[i.$globalData]=this[i.$globalData],this[i.$appendChild](t),this.breakAfter.push(t)}if("auto"!==this.break.before||""!==this.break.beforeTarget){const t=new G({targetType:this.break.before,target:this.break.beforeTarget,startNew:this.break.startNew.toString()});t[i.$globalData]=this[i.$globalData],this[i.$appendChild](t),this.breakBefore.push(t)}if(""!==this.break.overflowTarget){const t=new Qt({target:this.break.overflowTarget,leader:this.break.overflowLeader,trailer:this.break.overflowTrailer});t[i.$globalData]=this[i.$globalData],this[i.$appendChild](t),this.overflow.push(t)}this[i.$removeChild](this.break),this.break=null}if("hidden"===this.presence||"inactive"===this.presence)return c.HTMLResult.EMPTY;if((this.breakBefore.children.length>1||this.breakAfter.children.length>1)&&(0,h.warn)("XFA - Several breakBefore or breakAfter in subforms: please file a bug."),this.breakBefore.children.length>=1){const t=this.breakBefore.children[0];if(F(t))return c.HTMLResult.breakNode(t)}if(this[i.$extra]?.afterBreakAfter)return c.HTMLResult.EMPTY;(0,o.fixDimensions)(this);const e=[],s={id:this[i.$uid],class:[]};(0,o.setAccess)(this,s.class),this[i.$extra]||(this[i.$extra]=Object.create(null)),Object.assign(this[i.$extra],{children:e,line:null,attributes:s,attempt:0,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,t.width),height:Math.min(this.h||1/0,t.height)},width:0,height:0,prevHeight:0,currentWidth:0});const n=this[i.$getTemplateRoot](),a=n[i.$extra].noLayoutFailure,l=this[i.$isSplittable]();if(l||_(this),!(0,r.checkDimensions)(this,t))return c.HTMLResult.FAILURE;const u=new Set(["area","draw","exclGroup","field","subform","subformSet"]);if(this.layout.includes("row")){const t=this[i.$getSubformParent]().columnWidths;Array.isArray(t)&&t.length>0&&(this[i.$extra].columnWidths=t,this[i.$extra].currentColumn=0)}const f=(0,o.toStyle)(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),d=["xfaSubform"],p=(0,o.layoutClass)(this);if(p&&d.push(p),s.style=f,s.class=d,this.name&&(s.xfaName=this.name),this.overflow){const e=this.overflow[i.$getExtra]();e.addLeader&&(e.addLeader=!1,O(this,e.leader,t))}this[i.$pushPara]();const g="lr-tb"===this.layout||"rl-tb"===this.layout,m=g?2:1;for(;this[i.$extra].attempt<m;this[i.$extra].attempt++){g&&1===this[i.$extra].attempt&&(this[i.$extra].numberInLine=0);const t=this[i.$childrenToHTML]({filter:u,include:!0});if(t.success)break;if(t.isBreak())return this[i.$popPara](),t;if(g&&0===this[i.$extra].attempt&&0===this[i.$extra].numberInLine&&!n[i.$extra].noLayoutFailure){this[i.$extra].attempt=m;break}}if(this[i.$popPara](),l||I(this),n[i.$extra].noLayoutFailure=a,this[i.$extra].attempt===m)return this.overflow&&(this[i.$getTemplateRoot]()[i.$extra].overflowNode=this.overflow),l||delete this[i.$extra],c.HTMLResult.FAILURE;if(this.overflow){const e=this.overflow[i.$getExtra]();e.addTrailer&&(e.addTrailer=!1,O(this,e.trailer,t))}let w=0,b=0;this.margin&&(w=this.margin.leftInset+this.margin.rightInset,b=this.margin.topInset+this.margin.bottomInset);const y=Math.max(this[i.$extra].width+w,this.w||0),A=Math.max(this[i.$extra].height+b,this.h||0),v=[this.x,this.y,y,A];if(""===this.w&&(f.width=(0,o.measureToString)(y)),""===this.h&&(f.height=(0,o.measureToString)(A)),("0px"===f.width||"0px"===f.height)&&0===e.length)return c.HTMLResult.EMPTY;const x={name:"div",attributes:s,children:e};S(this,s);const M=c.HTMLResult.success((0,o.createWrapper)(this,x),v);if(this.breakAfter.children.length>=1){const t=this.breakAfter.children[0];if(F(t))return this[i.$extra].afterBreakAfter=M,c.HTMLResult.breakNode(t)}return delete this[i.$extra],M}}class Ae extends a.XFAObject{constructor(t){super(d,"subformSet",!0),this.id=t.id||"",this.name=t.name||"",this.relation=(0,c.getStringOption)(t.relation,["ordered","choice","unordered"]),this.relevant=(0,c.getRelevant)(t.relevant),this.use=t.use||"",this.usehref=t.usehref||"",this.bookend=null,this.break=null,this.desc=null,this.extras=null,this.occur=null,this.overflow=null,this.breakAfter=new a.XFAObjectArray,this.breakBefore=new a.XFAObjectArray,this.subform=new a.XFAObjectArray,this.subformSet=new a.XFAObjectArray}*[i.$getContainedChildren](){yield*v(this)}[i.$getSubformParent](){let t=this[i.$getParent]();for(;!(t instanceof ye);)t=t[i.$getParent]();return t}[i.$isBindable](){return!0}}class ve extends a.ContentObject{constructor(t){super(d,"subjectDN"),this.delimiter=t.delimiter||",",this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}[i.$finalize](){this[i.$content]=new Map(this[i.$content].split(this.delimiter).map((t=>((t=t.split("=",2))[0]=t[0].trim(),t))))}}class xe extends a.XFAObject{constructor(t){super(d,"subjectDNs",!0),this.id=t.id||"",this.type=(0,c.getStringOption)(t.type,["optional","required"]),this.use=t.use||"",this.usehref=t.usehref||"",this.subjectDN=new a.XFAObjectArray}}class ke extends a.XFAObject{constructor(t){super(d,"submit",!0),this.embedPDF=(0,c.getInteger)({data:t.embedPDF,defaultValue:0,validate:t=>1===t}),this.format=(0,c.getStringOption)(t.format,["xdp","formdata","pdf","urlencoded","xfd","xml"]),this.id=t.id||"",this.target=t.target||"",this.textEncoding=(0,c.getKeyword)({data:t.textEncoding?t.textEncoding.toLowerCase():"",defaultValue:"",validate:t=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(t)||t.match(/iso-8859-\d{2}/)}),this.use=t.use||"",this.usehref=t.usehref||"",this.xdpContent=t.xdpContent||"",this.encrypt=null,this.encryptData=new a.XFAObjectArray,this.signData=new a.XFAObjectArray}}class Se extends a.XFAObject{constructor(t){super(d,"template",!0),this.baseProfile=(0,c.getStringOption)(t.baseProfile,["full","interactiveForms"]),this.extras=null,this.subform=new a.XFAObjectArray}[i.$finalize](){0===this.subform.children.length&&(0,h.warn)("XFA - No subforms in template node."),this.subform.children.length>=2&&(0,h.warn)("XFA - Several subforms in template node: please file a bug."),this[i.$tabIndex]=5e3}[i.$isSplittable](){return!0}[i.$searchNode](t,e){return t.startsWith("#")?[this[i.$ids].get(t.slice(1))]:(0,f.searchNode)(this,e,t,!0,!0)}*[i.$toPages](){if(!this.subform.children.length)return c.HTMLResult.success({name:"div",children:[]});this[i.$extra]={overflowNode:null,firstUnsplittable:null,currentContentArea:null,currentPageArea:null,noLayoutFailure:!1,pageNumber:1,pagePosition:"first",oddOrEven:"odd",blankOrNotBlank:"nonBlank",paraStack:[]};const t=this.subform.children[0];t.pageSet[i.$cleanPage]();const e=t.pageSet.pageArea.children,s={name:"div",children:[]};let n=null,r=null,o=null;if(t.breakBefore.children.length>=1?(r=t.breakBefore.children[0],o=r.target):t.subform.children.length>=1&&t.subform.children[0].breakBefore.children.length>=1?(r=t.subform.children[0].breakBefore.children[0],o=r.target):t.break?.beforeTarget?(r=t.break,o=r.beforeTarget):t.subform.children.length>=1&&t.subform.children[0].break?.beforeTarget&&(r=t.subform.children[0].break,o=r.beforeTarget),r){const t=this[i.$searchNode](o,r[i.$getParent]());t instanceof Zt&&(n=t,r[i.$extra]={})}n||(n=e[0]),n[i.$extra]={numberOfUse:1};const a=n[i.$getParent]();let l;a[i.$extra]={numberOfUse:1,pageIndex:a.pageArea.children.indexOf(n),pageSetIndex:0};let u=null,f=null,d=!0,p=0,g=0;for(;;){if(d)p=0;else if(s.children.pop(),3==++p)return(0,h.warn)("XFA - Something goes wrong: please file a bug."),s;l=null,this[i.$extra].currentPageArea=n;const e=n[i.$toHTML]().html;s.children.push(e),u&&(this[i.$extra].noLayoutFailure=!0,e.children.push(u[i.$toHTML](n[i.$extra].space).html),u=null),f&&(this[i.$extra].noLayoutFailure=!0,e.children.push(f[i.$toHTML](n[i.$extra].space).html),f=null);const r=n.contentArea.children,o=e.children.filter((t=>t.attributes.class.includes("xfaContentarea")));d=!1,this[i.$extra].firstUnsplittable=null,this[i.$extra].noLayoutFailure=!1;const a=e=>{const s=t[i.$flushHTML]();s&&(d||=s.children?.length>0,o[e].children.push(s))};for(let e=g,n=r.length;e<n;e++){const n=this[i.$extra].currentContentArea=r[e],c={width:n.w,height:n.h};g=0,u&&(o[e].children.push(u[i.$toHTML](c).html),u=null),f&&(o[e].children.push(f[i.$toHTML](c).html),f=null);const h=t[i.$toHTML](c);if(h.success)return h.html?(d||=h.html.children?.length>0,o[e].children.push(h.html)):!d&&s.children.length>1&&s.children.pop(),s;if(h.isBreak()){const t=h.breakNode;if(a(e),"auto"===t.targetType)continue;t.leader&&(u=this[i.$searchNode](t.leader,t[i.$getParent]()),u=u?u[0]:null),t.trailer&&(f=this[i.$searchNode](t.trailer,t[i.$getParent]()),f=f?f[0]:null),"pageArea"===t.targetType?(l=t[i.$extra].target,e=1/0):t[i.$extra].target?(l=t[i.$extra].target,g=t[i.$extra].index+1,e=1/0):e=t[i.$extra].index}else if(this[i.$extra].overflowNode){const t=this[i.$extra].overflowNode;this[i.$extra].overflowNode=null;const s=t[i.$getExtra](),n=s.target;s.addLeader=null!==s.leader,s.addTrailer=null!==s.trailer,a(e);const o=e;if(e=1/0,n instanceof Zt)l=n;else if(n instanceof tt){const t=r.indexOf(n);-1!==t?t>o?e=t-1:g=t:(l=n[i.$getParent](),g=l.contentArea.children.indexOf(n))}}else a(e)}this[i.$extra].pageNumber+=1,l&&(l[i.$isUsable]()?l[i.$extra].numberOfUse+=1:l=null),n=l||n[i.$getNextPage](),yield null}}}e.Template=Se;class Me extends a.ContentObject{constructor(t){super(d,"text"),this.id=t.id||"",this.maxChars=(0,c.getInteger)({data:t.maxChars,defaultValue:0,validate:t=>t>=0}),this.name=t.name||"",this.rid=t.rid||"",this.use=t.use||"",this.usehref=t.usehref||""}[i.$acceptWhitespace](){return!0}[i.$onChild](t){return t[i.$namespaceId]===n.NamespaceIds.xhtml.id?(this[i.$content]=t,!0):((0,h.warn)(`XFA - Invalid content in Text: ${t[i.$nodeName]}.`),!1)}[i.$onText](t){this[i.$content]instanceof a.XFAObject||super[i.$onText](t)}[i.$finalize](){"string"==typeof this[i.$content]&&(this[i.$content]=this[i.$content].replaceAll("\r\n","\n"))}[i.$getExtra](){return"string"==typeof this[i.$content]?this[i.$content].split(/[\u2029\u2028\n]/).reduce(((t,e)=>(e&&t.push(e),t)),[]).join("\n"):this[i.$content][i.$text]()}[i.$toHTML](t){if("string"==typeof this[i.$content]){const t=C(this[i.$content]).html;return this[i.$content].includes("\u2029")?(t.name="div",t.children=[],this[i.$content].split("\u2029").map((t=>t.split(/[\u2028\n]/).reduce(((t,e)=>(t.push({name:"span",value:e},{name:"br"}),t)),[]))).forEach((e=>{t.children.push({name:"p",children:e})}))):/[\u2028\n]/.test(this[i.$content])&&(t.name="div",t.children=[],this[i.$content].split(/[\u2028\n]/).forEach((e=>{t.children.push({name:"span",value:e},{name:"br"})}))),c.HTMLResult.success(t)}return this[i.$content][i.$toHTML](t)}}e.Text=Me;class Ce extends a.XFAObject{constructor(t){super(d,"textEdit",!0),this.allowRichText=(0,c.getInteger)({data:t.allowRichText,defaultValue:0,validate:t=>1===t}),this.hScrollPolicy=(0,c.getStringOption)(t.hScrollPolicy,["auto","off","on"]),this.id=t.id||"",this.multiLine=(0,c.getInteger)({data:t.multiLine,defaultValue:"",validate:t=>0===t||1===t}),this.use=t.use||"",this.usehref=t.usehref||"",this.vScrollPolicy=(0,c.getStringOption)(t.vScrollPolicy,["auto","off","on"]),this.border=null,this.comb=null,this.extras=null,this.margin=null}[i.$toHTML](t){const e=(0,o.toStyle)(this,"border","font","margin");let s;const n=this[i.$getParent]()[i.$getParent]();return""===this.multiLine&&(this.multiLine=n instanceof lt?1:0),s=1===this.multiLine?{name:"textarea",attributes:{dataId:n[i.$data]?.[i.$uid]||n[i.$uid],fieldId:n[i.$uid],class:["xfaTextfield"],style:e,"aria-label":M(n),"aria-required":!1}}:{name:"input",attributes:{type:"text",dataId:n[i.$data]?.[i.$uid]||n[i.$uid],fieldId:n[i.$uid],class:["xfaTextfield"],style:e,"aria-label":M(n),"aria-required":!1}},x(n)&&(s.attributes["aria-required"]=!0,s.attributes.required=!0),c.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[s]})}}class _e extends a.StringObject{constructor(t){super(d,"time"),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}[i.$finalize](){const t=this[i.$content].trim();this[i.$content]=t?new Date(t):null}[i.$toHTML](t){return C(this[i.$content]?this[i.$content].toString():"")}}class Ie extends a.XFAObject{constructor(t){super(d,"timeStamp"),this.id=t.id||"",this.server=t.server||"",this.type=(0,c.getStringOption)(t.type,["optional","required"]),this.use=t.use||"",this.usehref=t.usehref||""}}class Fe extends a.StringObject{constructor(t){super(d,"toolTip"),this.id=t.id||"",this.rid=t.rid||"",this.use=t.use||"",this.usehref=t.usehref||""}}class Oe extends a.XFAObject{constructor(t){super(d,"traversal",!0),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null,this.traverse=new a.XFAObjectArray}}class Ee extends a.XFAObject{constructor(t){super(d,"traverse",!0),this.id=t.id||"",this.operation=(0,c.getStringOption)(t.operation,["next","back","down","first","left","right","up"]),this.ref=t.ref||"",this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null,this.script=null}get name(){return this.operation}[i.$isTransparent](){return!1}}class Te extends a.XFAObject{constructor(t){super(d,"ui",!0),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null,this.picture=null,this.barcode=null,this.button=null,this.checkButton=null,this.choiceList=null,this.dateTimeEdit=null,this.defaultUi=null,this.imageEdit=null,this.numericEdit=null,this.passwordEdit=null,this.signature=null,this.textEdit=null}[i.$getExtra](){if(void 0===this[i.$extra]){for(const t of Object.getOwnPropertyNames(this)){if("extras"===t||"picture"===t)continue;const e=this[t];if(e instanceof a.XFAObject)return this[i.$extra]=e,e}this[i.$extra]=null}return this[i.$extra]}[i.$toHTML](t){const e=this[i.$getExtra]();return e?e[i.$toHTML](t):c.HTMLResult.EMPTY}}class De extends a.XFAObject{constructor(t){super(d,"validate",!0),this.formatTest=(0,c.getStringOption)(t.formatTest,["warning","disabled","error"]),this.id=t.id||"",this.nullTest=(0,c.getStringOption)(t.nullTest,["disabled","error","warning"]),this.scriptTest=(0,c.getStringOption)(t.scriptTest,["error","disabled","warning"]),this.use=t.use||"",this.usehref=t.usehref||"",this.extras=null,this.message=null,this.picture=null,this.script=null}}class Pe extends a.XFAObject{constructor(t){super(d,"value",!0),this.id=t.id||"",this.override=(0,c.getInteger)({data:t.override,defaultValue:0,validate:t=>1===t}),this.relevant=(0,c.getRelevant)(t.relevant),this.use=t.use||"",this.usehref=t.usehref||"",this.arc=null,this.boolean=null,this.date=null,this.dateTime=null,this.decimal=null,this.exData=null,this.float=null,this.image=null,this.integer=null,this.line=null,this.rectangle=null,this.text=null,this.time=null}[i.$setValue](t){const e=this[i.$getParent]();if(e instanceof Mt&&e.ui?.imageEdit)return this.image||(this.image=new Dt({}),this[i.$appendChild](this.image)),void(this.image[i.$content]=t[i.$content]);const s=t[i.$nodeName];if(null===this[s]){for(const t of Object.getOwnPropertyNames(this)){const e=this[t];e instanceof a.XFAObject&&(this[t]=null,this[i.$removeChild](e))}this[t[i.$nodeName]]=t,this[i.$appendChild](t)}else this[s][i.$content]=t[i.$content]}[i.$text](){if(this.exData)return"string"==typeof this.exData[i.$content]?this.exData[i.$content].trim():this.exData[i.$content][i.$text]().trim();for(const t of Object.getOwnPropertyNames(this)){if("image"===t)continue;const e=this[t];if(e instanceof a.XFAObject)return(e[i.$content]||"").toString().trim()}return null}[i.$toHTML](t){for(const e of Object.getOwnPropertyNames(this)){const s=this[e];if(s instanceof a.XFAObject)return s[i.$toHTML](t)}return c.HTMLResult.EMPTY}}e.Value=Pe;class Re extends a.XFAObject{constructor(t){super(d,"variables",!0),this.id=t.id||"",this.use=t.use||"",this.usehref=t.usehref||"",this.boolean=new a.XFAObjectArray,this.date=new a.XFAObjectArray,this.dateTime=new a.XFAObjectArray,this.decimal=new a.XFAObjectArray,this.exData=new a.XFAObjectArray,this.float=new a.XFAObjectArray,this.image=new a.XFAObjectArray,this.integer=new a.XFAObjectArray,this.manifest=new a.XFAObjectArray,this.script=new a.XFAObjectArray,this.text=new a.XFAObjectArray,this.time=new a.XFAObjectArray}[i.$isTransparent](){return!0}}class Ne{static[n.$buildXFAObject](t,e){if(Ne.hasOwnProperty(t)){const s=Ne[t](e);return s[i.$setSetAttributes](e),s}}static appearanceFilter(t){return new E(t)}static arc(t){return new T(t)}static area(t){return new D(t)}static assist(t){return new P(t)}static barcode(t){return new R(t)}static bind(t){return new N(t)}static bindItems(t){return new L(t)}static bookend(t){return new B(t)}static boolean(t){return new $(t)}static border(t){return new U(t)}static break(t){return new j(t)}static breakAfter(t){return new H(t)}static breakBefore(t){return new G(t)}static button(t){return new q(t)}static calculate(t){return new X(t)}static caption(t){return new W(t)}static certificate(t){return new z(t)}static certificates(t){return new V(t)}static checkButton(t){return new K(t)}static choiceList(t){return new J(t)}static color(t){return new Y(t)}static comb(t){return new Q(t)}static connect(t){return new Z(t)}static contentArea(t){return new tt(t)}static corner(t){return new et(t)}static date(t){return new st(t)}static dateTime(t){return new it(t)}static dateTimeEdit(t){return new nt(t)}static decimal(t){return new rt(t)}static defaultUi(t){return new ot(t)}static desc(t){return new at(t)}static digestMethod(t){return new ct(t)}static digestMethods(t){return new ht(t)}static draw(t){return new lt(t)}static edge(t){return new ut(t)}static encoding(t){return new ft(t)}static encodings(t){return new dt(t)}static encrypt(t){return new pt(t)}static encryptData(t){return new gt(t)}static encryption(t){return new mt(t)}static encryptionMethod(t){return new wt(t)}static encryptionMethods(t){return new bt(t)}static event(t){return new yt(t)}static exData(t){return new At(t)}static exObject(t){return new vt(t)}static exclGroup(t){return new xt(t)}static execute(t){return new kt(t)}static extras(t){return new St(t)}static field(t){return new Mt(t)}static fill(t){return new Ct(t)}static filter(t){return new _t(t)}static float(t){return new It(t)}static font(t){return new Ft(t)}static format(t){return new Ot(t)}static handler(t){return new Et(t)}static hyphenation(t){return new Tt(t)}static image(t){return new Dt(t)}static imageEdit(t){return new Pt(t)}static integer(t){return new Rt(t)}static issuers(t){return new Nt(t)}static items(t){return new Lt(t)}static keep(t){return new Bt(t)}static keyUsage(t){return new $t(t)}static line(t){return new Ut(t)}static linear(t){return new jt(t)}static lockDocument(t){return new Ht(t)}static manifest(t){return new Gt(t)}static margin(t){return new qt(t)}static mdp(t){return new Xt(t)}static medium(t){return new Wt(t)}static message(t){return new zt(t)}static numericEdit(t){return new Vt(t)}static occur(t){return new Kt(t)}static oid(t){return new Jt(t)}static oids(t){return new Yt(t)}static overflow(t){return new Qt(t)}static pageArea(t){return new Zt(t)}static pageSet(t){return new te(t)}static para(t){return new ee(t)}static passwordEdit(t){return new se(t)}static pattern(t){return new ie(t)}static picture(t){return new ne(t)}static proto(t){return new re(t)}static radial(t){return new oe(t)}static reason(t){return new ae(t)}static reasons(t){return new ce(t)}static rectangle(t){return new he(t)}static ref(t){return new le(t)}static script(t){return new ue(t)}static setProperty(t){return new fe(t)}static signData(t){return new de(t)}static signature(t){return new pe(t)}static signing(t){return new ge(t)}static solid(t){return new me(t)}static speak(t){return new we(t)}static stipple(t){return new be(t)}static subform(t){return new ye(t)}static subformSet(t){return new Ae(t)}static subjectDN(t){return new ve(t)}static subjectDNs(t){return new xe(t)}static submit(t){return new ke(t)}static template(t){return new Se(t)}static text(t){return new Me(t)}static textEdit(t){return new Ce(t)}static time(t){return new _e(t)}static timeStamp(t){return new Ie(t)}static toolTip(t){return new Fe(t)}static traversal(t){return new Oe(t)}static traverse(t){return new Ee(t)}static ui(t){return new Te(t)}static validate(t){return new De(t)}static value(t){return new Pe(t)}static variables(t){return new Re(t)}}e.TemplateNamespace=Ne},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NamespaceIds=e.$buildXFAObject=void 0;const s=Symbol();e.$buildXFAObject=s,e.NamespaceIds={config:{id:0,check:t=>t.startsWith("http://www.xfa.org/schema/xci/")},connectionSet:{id:1,check:t=>t.startsWith("http://www.xfa.org/schema/xfa-connection-set/")},datasets:{id:2,check:t=>t.startsWith("http://www.xfa.org/schema/xfa-data/")},form:{id:3,check:t=>t.startsWith("http://www.xfa.org/schema/xfa-form/")},localeSet:{id:4,check:t=>t.startsWith("http://www.xfa.org/schema/xfa-locale-set/")},pdf:{id:5,check:t=>"http://ns.adobe.com/xdp/pdf/"===t},signature:{id:6,check:t=>"http://www.w3.org/2000/09/xmldsig#"===t},sourceSet:{id:7,check:t=>t.startsWith("http://www.xfa.org/schema/xfa-source-set/")},stylesheet:{id:8,check:t=>"http://www.w3.org/1999/XSL/Transform"===t},template:{id:9,check:t=>t.startsWith("http://www.xfa.org/schema/xfa-template/")},xdc:{id:10,check:t=>t.startsWith("http://www.xfa.org/schema/xdc/")},xdp:{id:11,check:t=>"http://ns.adobe.com/xdp/"===t},xfdf:{id:12,check:t=>"http://ns.adobe.com/xfdf/"===t},xhtml:{id:13,check:t=>"http://www.w3.org/1999/xhtml"===t},xmpmeta:{id:14,check:t=>"http://ns.adobe.com/xmpmeta/"===t}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addHTML=function(t,e,s){const o=t[i.$extra],a=o.availableSpace,[c,h,l,u]=s;switch(t.layout){case"position":o.width=Math.max(o.width,c+l),o.height=Math.max(o.height,h+u),o.children.push(e);break;case"lr-tb":case"rl-tb":o.line&&1!==o.attempt||(o.line=r(t,[]),o.children.push(o.line),o.numberInLine=0),o.numberInLine+=1,o.line.children.push(e),0===o.attempt?(o.currentWidth+=l,o.height=Math.max(o.height,o.prevHeight+u)):(o.currentWidth=l,o.prevHeight=o.height,o.height+=u,o.attempt=0),o.width=Math.max(o.width,o.currentWidth);break;case"rl-row":case"row":{o.children.push(e),o.width+=l,o.height=Math.max(o.height,u);const t=(0,n.measureToString)(o.height);for(const e of o.children)e.attributes.style.height=t;break}case"table":case"tb":o.width=Math.min(a.width,Math.max(o.width,l)),o.height+=u,o.children.push(e)}},e.checkDimensions=function(t,e){if(null===t[i.$getTemplateRoot]()[i.$extra].firstUnsplittable)return!0;if(0===t.w||0===t.h)return!0;const s=t[i.$getSubformParent](),n=s[i.$extra]?.attempt||0,[,r,o,a]=function(t){let e,s,i=""===t.w?NaN:t.w,n=""===t.h?NaN:t.h,[r,o]=[0,0];switch(t.anchorType||""){case"bottomCenter":[r,o]=[i/2,n];break;case"bottomLeft":[r,o]=[0,n];break;case"bottomRight":[r,o]=[i,n];break;case"middleCenter":[r,o]=[i/2,n/2];break;case"middleLeft":[r,o]=[0,n/2];break;case"middleRight":[r,o]=[i,n/2];break;case"topCenter":[r,o]=[i/2,0];break;case"topRight":[r,o]=[i,0]}switch(t.rotate||0){case 0:[e,s]=[-r,-o];break;case 90:[e,s]=[-o,r],[i,n]=[n,-i];break;case 180:[e,s]=[r,o],[i,n]=[-i,-n];break;case 270:[e,s]=[o,-r],[i,n]=[-n,i]}return[t.x+e+Math.min(0,i),t.y+s+Math.min(0,n),Math.abs(i),Math.abs(n)]}(t);switch(s.layout){case"lr-tb":case"rl-tb":return 0===n?t[i.$getTemplateRoot]()[i.$extra].noLayoutFailure?""!==t.w?Math.round(o-e.width)<=2:e.width>2:!(""!==t.h&&Math.round(a-e.height)>2)&&(""!==t.w?Math.round(o-e.width)<=2||0===s[i.$extra].numberInLine&&e.height>2:e.width>2):!!t[i.$getTemplateRoot]()[i.$extra].noLayoutFailure||!(""!==t.h&&Math.round(a-e.height)>2)&&(""===t.w||Math.round(o-e.width)<=2||!s[i.$isThereMoreWidth]())&&e.height>2;case"table":case"tb":return!!t[i.$getTemplateRoot]()[i.$extra].noLayoutFailure||(""===t.h||t[i.$isSplittable]()?(""===t.w||Math.round(o-e.width)<=2||!s[i.$isThereMoreWidth]())&&e.height>2:Math.round(a-e.height)<=2);case"position":return!!t[i.$getTemplateRoot]()[i.$extra].noLayoutFailure||""===t.h||Math.round(a+r-e.height)<=2||a+r>t[i.$getTemplateRoot]()[i.$extra].currentContentArea.h;case"rl-row":case"row":return!!t[i.$getTemplateRoot]()[i.$extra].noLayoutFailure||""===t.h||Math.round(a-e.height)<=2;default:return!0}},e.flushHTML=function(t){if(!t[i.$extra])return null;const e={name:"div",attributes:t[i.$extra].attributes,children:t[i.$extra].children};if(t[i.$extra].failingNode){const s=t[i.$extra].failingNode[i.$flushHTML]();s&&(t.layout.endsWith("-tb")?e.children.push(r(t,[s])):e.children.push(s))}return 0===e.children.length?null:e},e.getAvailableSpace=function(t){const e=t[i.$extra].availableSpace,s=t.margin?t.margin.topInset+t.margin.bottomInset:0,n=t.margin?t.margin.leftInset+t.margin.rightInset:0;switch(t.layout){case"lr-tb":case"rl-tb":return 0===t[i.$extra].attempt?{width:e.width-n-t[i.$extra].currentWidth,height:e.height-s-t[i.$extra].prevHeight}:{width:e.width-n,height:e.height-s-t[i.$extra].height};case"rl-row":case"row":return{width:t[i.$extra].columnWidths.slice(t[i.$extra].currentColumn).reduce(((t,e)=>t+e)),height:e.height-n};case"table":case"tb":return{width:e.width-n,height:e.height-s-t[i.$extra].height};default:return e}};var i=s(78),n=s(83);function r(t,e){return{name:"div",attributes:{class:["lr-tb"===t.layout?"xfaLr":"xfaRl"]},children:e}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.computeBbox=function(t,e,s){let n;if(""!==t.w&&""!==t.h)n=[t.x,t.y,t.w,t.h];else{if(!s)return null;let r=t.w;if(""===r){if(0===t.maxW){const e=t[i.$getSubformParent]();r="position"===e.layout&&""!==e.w?0:t.minW}else r=Math.min(t.maxW,s.width);e.attributes.style.width=h(r)}let o=t.h;if(""===o){if(0===t.maxH){const e=t[i.$getSubformParent]();o="position"===e.layout&&""!==e.h?0:t.minH}else o=Math.min(t.maxH,s.height);e.attributes.style.height=h(o)}n=[t.x,t.y,r,o]}return n},e.createWrapper=function(t,e){const{attributes:s}=e,{style:n}=s,r={name:"div",attributes:{class:["xfaWrapper"],style:Object.create(null)},children:[]};if(s.class.push("xfaWrapped"),t.border){const{widths:s,insets:o}=t.border[i.$extra];let a,c,h=o[0],l=o[3];const u=o[0]+o[2],d=o[1]+o[3];switch(t.border.hand){case"even":h-=s[0]/2,l-=s[3]/2,a=`calc(100% + ${(s[1]+s[3])/2-d}px)`,c=`calc(100% + ${(s[0]+s[2])/2-u}px)`;break;case"left":h-=s[0],l-=s[3],a=`calc(100% + ${s[1]+s[3]-d}px)`,c=`calc(100% + ${s[0]+s[2]-u}px)`;break;case"right":a=d?`calc(100% - ${d}px)`:"100%",c=u?`calc(100% - ${u}px)`:"100%"}const p=["xfaBorder"];f(t.border)&&p.push("xfaPrintOnly");const g={name:"div",attributes:{class:p,style:{top:`${h}px`,left:`${l}px`,width:a,height:c}},children:[]};for(const t of["border","borderWidth","borderColor","borderRadius","borderStyle"])void 0!==n[t]&&(g.attributes.style[t]=n[t],delete n[t]);r.children.push(g,e)}else r.children.push(e);for(const t of["background","backgroundClip","top","left","width","height","minWidth","minHeight","maxWidth","maxHeight","transform","transformOrigin","visibility"])void 0!==n[t]&&(r.attributes.style[t]=n[t],delete n[t]);return r.attributes.style.position="absolute"===n.position?"absolute":"relative",delete n.position,n.alignSelf&&(r.attributes.style.alignSelf=n.alignSelf,delete n.alignSelf),r},e.fixDimensions=function(t){const e=t[i.$getSubformParent]();if(e.layout?.includes("row")){const s=e[i.$extra],n=t.colSpan;let r;r=-1===n?s.columnWidths.slice(s.currentColumn).reduce(((t,e)=>t+e),0):s.columnWidths.slice(s.currentColumn,s.currentColumn+n).reduce(((t,e)=>t+e),0),isNaN(r)||(t.w=r)}e.layout&&"position"!==e.layout&&(t.x=t.y=0),"table"===t.layout&&""===t.w&&Array.isArray(t.columnWidths)&&(t.w=t.columnWidths.reduce(((t,e)=>t+e),0))},e.fixTextIndent=function(t){const e=(0,r.getMeasurement)(t.textIndent,"0px");if(e>=0)return;const s="padding"+("left"==("right"===t.textAlign?"right":"left")?"Left":"Right"),i=(0,r.getMeasurement)(t[s],"0px");t[s]=i-e+"px"},e.fixURL=function(t){const e=(0,n.createValidAbsoluteUrl)(t,null,{addDefaultProtocol:!0,tryConvertEncoding:!0});return e?e.href:null},e.isPrintOnly=f,e.layoutClass=function(t){switch(t.layout){case"position":default:return"xfaPosition";case"lr-tb":return"xfaLrTb";case"rl-row":return"xfaRlRow";case"rl-tb":return"xfaRlTb";case"row":return"xfaRow";case"table":return"xfaTable";case"tb":return"xfaTb"}},e.layoutNode=function(t,e){let s=null,n=null,r=!1;if((!t.w||!t.h)&&t.value){let o=0,a=0;t.margin&&(o=t.margin.leftInset+t.margin.rightInset,a=t.margin.topInset+t.margin.bottomInset);let c=null,h=null;t.para&&(h=Object.create(null),c=""===t.para.lineHeight?null:t.para.lineHeight,h.top=""===t.para.spaceAbove?0:t.para.spaceAbove,h.bottom=""===t.para.spaceBelow?0:t.para.spaceBelow,h.left=""===t.para.marginLeft?0:t.para.marginLeft,h.right=""===t.para.marginRight?0:t.para.marginRight);let l=t.font;if(!l){const e=t[i.$getTemplateRoot]();let s=t[i.$getParent]();for(;s&&s!==e;){if(s.font){l=s.font;break}s=s[i.$getParent]()}}const f=(t.w||e.width)-o,d=t[i.$globalData].fontFinder;if(t.value.exData&&t.value.exData[i.$content]&&"text/html"===t.value.exData.contentType){const e=u(t.value.exData[i.$content],l,h,c,d,f);n=e.width,s=e.height,r=e.isBroken}else{const e=t.value[i.$text]();if(e){const t=u(e,l,h,c,d,f);n=t.width,s=t.height,r=t.isBroken}}null===n||t.w||(n+=o),null===s||t.h||(s+=a)}return{w:n,h:s,isBroken:r}},e.measureToString=h,e.setAccess=function(t,e){switch(t.access){case"nonInteractive":e.push("xfaNonInteractive");break;case"readOnly":e.push("xfaReadOnly");break;case"protected":e.push("xfaDisabled")}},e.setFontFamily=function(t,e,s,i){if(!s)return void delete i.fontFamily;const n=(0,r.stripQuotes)(t.typeface);i.fontFamily=`"${n}"`;const a=s.find(n);if(a){const{fontFamily:s}=a.regular.cssFontInfo;s!==n&&(i.fontFamily=`"${s}"`);const r=d(e);if(r&&""!==r.lineHeight)return;if(i.lineHeight)return;const c=(0,o.selectFont)(t,a);c&&(i.lineHeight=Math.max(1.2,c.lineHeight))}},e.setMinMaxDimensions=function(t,e){"position"===t[i.$getSubformParent]().layout&&(t.minW>0&&(e.minWidth=h(t.minW)),t.maxW>0&&(e.maxWidth=h(t.maxW)),t.minH>0&&(e.minHeight=h(t.minH)),t.maxH>0&&(e.maxHeight=h(t.maxH)))},e.setPara=function(t,e,s){if(s.attributes.class?.includes("xfaRich")){e&&(""===t.h&&(e.height="auto"),""===t.w&&(e.width="auto"));const n=d(t);if(n){const t=s.attributes.style;switch(t.display="flex",t.flexDirection="column",n.vAlign){case"top":t.justifyContent="start";break;case"bottom":t.justifyContent="end";break;case"middle":t.justifyContent="center"}const e=n[i.$toStyle]();for(const[s,i]of Object.entries(e))s in t||(t[s]=i)}}},e.toStyle=function(t,...e){const s=Object.create(null);for(const r of e){const e=t[r];if(null!==e)if(l.hasOwnProperty(r))l[r](t,s);else if(e instanceof c.XFAObject){const t=e[i.$toStyle]();t?Object.assign(s,t):(0,n.warn)(`(DEBUG) - XFA - style for ${r} not implemented yet`)}}return s};var i=s(78),n=s(2),r=s(84),o=s(85),a=s(86),c=s(87);function h(t){return"string"==typeof t?"0px":Number.isInteger(t)?`${t}px`:`${t.toFixed(2)}px`}const l={anchorType(t,e){const s=t[i.$getSubformParent]();if(s&&(!s.layout||"position"===s.layout))switch("transform"in e||(e.transform=""),t.anchorType){case"bottomCenter":e.transform+="translate(-50%, -100%)";break;case"bottomLeft":e.transform+="translate(0,-100%)";break;case"bottomRight":e.transform+="translate(-100%,-100%)";break;case"middleCenter":e.transform+="translate(-50%,-50%)";break;case"middleLeft":e.transform+="translate(0,-50%)";break;case"middleRight":e.transform+="translate(-100%,-50%)";break;case"topCenter":e.transform+="translate(-50%,0)";break;case"topRight":e.transform+="translate(-100%,0)"}},dimensions(t,e){const s=t[i.$getSubformParent]();let n=t.w;const r=t.h;if(s.layout?.includes("row")){const e=s[i.$extra],r=t.colSpan;let o;-1===r?(o=e.columnWidths.slice(e.currentColumn).reduce(((t,e)=>t+e),0),e.currentColumn=0):(o=e.columnWidths.slice(e.currentColumn,e.currentColumn+r).reduce(((t,e)=>t+e),0),e.currentColumn=(e.currentColumn+t.colSpan)%e.columnWidths.length),isNaN(o)||(n=t.w=o)}e.width=""!==n?h(n):"auto",e.height=""!==r?h(r):"auto"},position(t,e){const s=t[i.$getSubformParent]();s?.layout&&"position"!==s.layout||(e.position="absolute",e.left=h(t.x),e.top=h(t.y))},rotate(t,e){t.rotate&&("transform"in e||(e.transform=""),e.transform+=`rotate(-${t.rotate}deg)`,e.transformOrigin="top left")},presence(t,e){switch(t.presence){case"invisible":e.visibility="hidden";break;case"hidden":case"inactive":e.display="none"}},hAlign(t,e){if("para"===t[i.$nodeName])switch(t.hAlign){case"justifyAll":e.textAlign="justify-all";break;case"radix":e.textAlign="left";break;default:e.textAlign=t.hAlign}else switch(t.hAlign){case"left":e.alignSelf="start";break;case"center":e.alignSelf="center";break;case"right":e.alignSelf="end"}},margin(t,e){t.margin&&(e.margin=t.margin[i.$toStyle]().margin)}};function u(t,e,s,n,r,o){const c=new a.TextMeasure(e,s,n,r);return"string"==typeof t?c.addString(t):t[i.$pushGlyphs](c),c.compute(o)}function f(t){return t.relevant.length>0&&!t.relevant[0].excluded&&"print"===t.relevant[0].viewname}function d(t){const e=t[i.$getTemplateRoot]()[i.$extra].paraStack;return e.length?e.at(-1):null}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLResult=void 0,e.getBBox=function(t){const e=-1;if(!t)return{x:e,y:e,width:e,height:e};const s=t.trim().split(/\s*,\s*/).map((t=>a(t,"-1")));if(s.length<4||s[2]<0||s[3]<0)return{x:e,y:e,width:e,height:e};const[i,n,r,o]=s;return{x:i,y:n,width:r,height:o}},e.getColor=function(t,e=[0,0,0]){let[s,i,n]=e;if(!t)return{r:s,g:i,b:n};const r=t.trim().split(/\s*,\s*/).map((t=>Math.min(Math.max(0,parseInt(t.trim(),10)),255))).map((t=>isNaN(t)?0:t));return r.length<3||([s,i,n]=r),{r:s,g:i,b:n}},e.getFloat=function({data:t,defaultValue:e,validate:s}){if(!t)return e;t=t.trim();const i=parseFloat(t);return!isNaN(i)&&s(i)?i:e},e.getInteger=function({data:t,defaultValue:e,validate:s}){if(!t)return e;t=t.trim();const i=parseInt(t,10);return!isNaN(i)&&s(i)?i:e},e.getKeyword=o,e.getMeasurement=a,e.getRatio=function(t){if(!t)return{num:1,den:1};const e=t.trim().split(/\s*:\s*/).map((t=>parseFloat(t))).filter((t=>!isNaN(t)));if(1===e.length&&e.push(1),0===e.length)return{num:1,den:1};const[s,i]=e;return{num:s,den:i}},e.getRelevant=function(t){return t?t.trim().split(/\s+/).map((t=>({excluded:"-"===t[0],viewname:t.substring(1)}))):[]},e.getStringOption=function(t,e){return o({data:t,defaultValue:e[0],validate:t=>e.includes(t)})},e.stripQuotes=function(t){return t.startsWith("'")||t.startsWith('"')?t.slice(1,-1):t};var i=s(2);const n={pt:t=>t,cm:t=>t/2.54*72,mm:t=>t/25.4*72,in:t=>72*t,px:t=>t},r=/([+-]?\d+\.?\d*)(.*)/;function o({data:t,defaultValue:e,validate:s}){return t&&s(t=t.trim())?t:e}function a(t,e="0"){if(e||="0",!t)return a(e);const s=t.trim().match(r);if(!s)return a(e);const[,i,o]=s,c=parseFloat(i);if(isNaN(c))return a(e);if(0===c)return 0;const h=n[o];return h?h(c):c}class c{static get FAILURE(){return(0,i.shadow)(this,"FAILURE",new c(!1,null,null,null))}static get EMPTY(){return(0,i.shadow)(this,"EMPTY",new c(!0,null,null,null))}constructor(t,e,s,i){this.success=t,this.html=e,this.bbox=s,this.breakNode=i}isBreak(){return!!this.breakNode}static breakNode(t){return new c(!1,null,null,t)}static success(t,e=null){return new c(!0,t,e,null)}}e.HTMLResult=c},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FontFinder=void 0,e.getMetrics=function(t,e=!1){let s=null;if(t){const e=(0,n.stripQuotes)(t.typeface),r=t[i.$globalData].fontFinder.find(e);s=o(t,r)}if(!s)return{lineHeight:12,lineGap:2,lineNoGap:10};const r=t.size||10,a=s.lineHeight?Math.max(e?0:1.2,s.lineHeight):1.2,c=void 0===s.lineGap?.2:s.lineGap;return{lineHeight:a*r,lineGap:c*r,lineNoGap:Math.max(1,a-c)*r}},e.selectFont=o;var i=s(78),n=s(84),r=s(2);function o(t,e){return"italic"===t.posture?"bold"===t.weight?e.bolditalic:e.italic:"bold"===t.weight?e.bold:e.regular}e.FontFinder=class{constructor(t){this.fonts=new Map,this.cache=new Map,this.warned=new Set,this.defaultFont=null,this.add(t)}add(t,e=null){for(const e of t)this.addPdfFont(e);for(const t of this.fonts.values())t.regular||(t.regular=t.italic||t.bold||t.bolditalic);if(!e||0===e.size)return;const s=this.fonts.get("PdfJS-Fallback-PdfJS-XFA");for(const t of e)this.fonts.set(t,s)}addPdfFont(t){const e=t.cssFontInfo,s=e.fontFamily;let i=this.fonts.get(s);i||(i=Object.create(null),this.fonts.set(s,i),this.defaultFont||(this.defaultFont=i));let n="";const r=parseFloat(e.fontWeight);0!==parseFloat(e.italicAngle)?n=r>=700?"bolditalic":"italic":r>=700&&(n="bold"),n||((t.name.includes("Bold")||t.psName?.includes("Bold"))&&(n="bold"),(t.name.includes("Italic")||t.name.endsWith("It")||t.psName?.includes("Italic")||t.psName?.endsWith("It"))&&(n+="italic")),n||(n="regular"),i[n]=t}getDefault(){return this.defaultFont}find(t,e=!0){let s=this.fonts.get(t)||this.cache.get(t);if(s)return s;const i=/,|-|_| |bolditalic|bold|italic|regular|it/gi;let n=t.replaceAll(i,"");if(s=this.fonts.get(n),s)return this.cache.set(t,s),s;n=n.toLowerCase();const o=[];for(const[t,e]of this.fonts.entries())t.replaceAll(i,"").toLowerCase().startsWith(n)&&o.push(e);if(0===o.length)for(const[,t]of this.fonts.entries())t.regular.name?.replaceAll(i,"").toLowerCase().startsWith(n)&&o.push(t);if(0===o.length){n=n.replaceAll(/psmt|mt/gi,"");for(const[t,e]of this.fonts.entries())t.replaceAll(i,"").toLowerCase().startsWith(n)&&o.push(e)}if(0===o.length)for(const t of this.fonts.values())t.regular.name?.replaceAll(i,"").toLowerCase().startsWith(n)&&o.push(t);return o.length>=1?(1!==o.length&&e&&(0,r.warn)(`XFA - Too many choices to guess the correct font: ${t}`),this.cache.set(t,o[0]),o[0]):(e&&!this.warned.has(t)&&(this.warned.add(t),(0,r.warn)(`XFA - Cannot find the font: ${t}`)),null)}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TextMeasure=void 0;var i=s(85);class n{constructor(t,e,s,n){if(this.lineHeight=s,this.paraMargin=e||{top:0,bottom:0,left:0,right:0},!t)return void([this.pdfFont,this.xfaFont]=this.defaultFont(n));this.xfaFont={typeface:t.typeface,posture:t.posture,weight:t.weight,size:t.size,letterSpacing:t.letterSpacing};const r=n.find(t.typeface);r?(this.pdfFont=(0,i.selectFont)(t,r),this.pdfFont||([this.pdfFont,this.xfaFont]=this.defaultFont(n))):[this.pdfFont,this.xfaFont]=this.defaultFont(n)}defaultFont(t){const e=t.find("Helvetica",!1)||t.find("Myriad Pro",!1)||t.find("Arial",!1)||t.getDefault();if(e?.regular){const t=e.regular;return[t,{typeface:t.cssFontInfo.fontFamily,posture:"normal",weight:"normal",size:10,letterSpacing:0}]}return[null,{typeface:"Courier",posture:"normal",weight:"normal",size:10,letterSpacing:0}]}}class r{constructor(t,e,s,i){this.fontFinder=i,this.stack=[new n(t,e,s,i)]}pushData(t,e,s){const i=this.stack.at(-1);for(const e of["typeface","posture","weight","size","letterSpacing"])t[e]||(t[e]=i.xfaFont[e]);for(const t of["top","bottom","left","right"])isNaN(e[t])&&(e[t]=i.paraMargin[t]);const r=new n(t,e,s||i.lineHeight,this.fontFinder);r.pdfFont||(r.pdfFont=i.pdfFont),this.stack.push(r)}popFont(){this.stack.pop()}topFont(){return this.stack.at(-1)}}e.TextMeasure=class{constructor(t,e,s,i){this.glyphs=[],this.fontSelector=new r(t,e,s,i),this.extraHeight=0}pushData(t,e,s){this.fontSelector.pushData(t,e,s)}popFont(t){return this.fontSelector.popFont()}addPara(){const t=this.fontSelector.topFont();this.extraHeight+=t.paraMargin.top+t.paraMargin.bottom}addString(t){if(!t)return;const e=this.fontSelector.topFont(),s=e.xfaFont.size;if(e.pdfFont){const i=e.xfaFont.letterSpacing,n=e.pdfFont,r=n.lineHeight||1.2,o=e.lineHeight||Math.max(1.2,r)*s,a=Math.max(1,r-(void 0===n.lineGap?.2:n.lineGap))*s,c=s/1e3,h=n.defaultWidth||n.charsToGlyphs(" ")[0].width;for(const e of t.split(/[\u2029\n]/)){const t=n.encodeString(e).join(""),s=n.charsToGlyphs(t);for(const t of s)this.glyphs.push([(t.width||h)*c+i,o,a,t.unicode,!1]);this.glyphs.push([0,0,0,"\n",!0])}this.glyphs.pop()}else{for(const e of t.split(/[\u2029\n]/)){for(const t of e.split(""))this.glyphs.push([s,1.2*s,s,t,!1]);this.glyphs.push([0,0,0,"\n",!0])}this.glyphs.pop()}}compute(t){let e=-1,s=0,i=0,n=0,r=0,o=0,a=!1,c=!0;for(let h=0,l=this.glyphs.length;h<l;h++){const[l,u,f,d,p]=this.glyphs[h],g=" "===d,m=c?f:u;p?(i=Math.max(i,r),r=0,n+=o,o=m,e=-1,s=0,c=!1):g?r+l>t?(i=Math.max(i,r),r=0,n+=o,o=m,e=-1,s=0,a=!0,c=!1):(o=Math.max(m,o),s=r,r+=l,e=h):r+l>t?(n+=o,o=m,-1!==e?(h=e,i=Math.max(i,s),r=0,e=-1,s=0):(i=Math.max(i,r),r=l),a=!0,c=!1):(r+=l,o=Math.max(m,o))}return i=Math.max(i,r),n+=o+this.extraHeight,{width:1.02*i,height:n,isBroken:a}}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.XmlObject=e.XFAObjectArray=e.XFAObject=e.XFAAttribute=e.StringObject=e.OptionObject=e.Option10=e.Option01=e.IntegerObject=e.ContentObject=void 0;var i=s(78),n=s(84),r=s(2),o=s(3),a=s(81),c=s(88);const h=Symbol(),l=Symbol(),u=Symbol(),f=Symbol("_children"),d=Symbol(),p=Symbol(),g=Symbol(),m=Symbol(),w=Symbol(),b=Symbol(),y=Symbol(),A=Symbol(),v=Symbol(),x=Symbol("parent"),k=Symbol(),S=Symbol(),M=Symbol();let C=0;const _=a.NamespaceIds.datasets.id;class I{constructor(t,e,s=!1){this[i.$namespaceId]=t,this[i.$nodeName]=e,this[y]=s,this[x]=null,this[f]=[],this[i.$uid]=`${e}${C++}`,this[i.$globalData]=null}get isXFAObject(){return!0}get isXFAObjectArray(){return!1}createNodes(t){let e=this,s=null;for(const{name:n,index:r}of t){for(let t=0,o=isFinite(r)?r:0;t<=o;t++)s=new E(e[i.$namespaceId]===_?-1:e[i.$namespaceId],n),e[i.$appendChild](s);e=s}return s}[i.$onChild](t){if(!this[y]||!this[i.$onChildCheck](t))return!1;const e=t[i.$nodeName],s=this[e];if(!(s instanceof F))return null!==s&&this[i.$removeChild](s),this[e]=t,this[i.$appendChild](t),!0;if(s.push(t))return this[i.$appendChild](t),!0;let n="";return this.id?n=` (id: ${this.id})`:this.name&&(n=` (name: ${this.name} ${this.h.value})`),(0,r.warn)(`XFA - node "${this[i.$nodeName]}"${n} has already enough "${e}"!`),!1}[i.$onChildCheck](t){return this.hasOwnProperty(t[i.$nodeName])&&t[i.$namespaceId]===this[i.$namespaceId]}[i.$isNsAgnostic](){return!1}[i.$acceptWhitespace](){return!1}[i.$isCDATAXml](){return!1}[i.$isBindable](){return!1}[i.$popPara](){this.para&&this[i.$getTemplateRoot]()[i.$extra].paraStack.pop()}[i.$pushPara](){this[i.$getTemplateRoot]()[i.$extra].paraStack.push(this.para)}[i.$setId](t){this.id&&this[i.$namespaceId]===a.NamespaceIds.template.id&&t.set(this.id,this)}[i.$getTemplateRoot](){return this[i.$globalData].template}[i.$isSplittable](){return!1}[i.$isThereMoreWidth](){return!1}[i.$appendChild](t){t[x]=this,this[f].push(t),!t[i.$globalData]&&this[i.$globalData]&&(t[i.$globalData]=this[i.$globalData])}[i.$removeChild](t){const e=this[f].indexOf(t);this[f].splice(e,1)}[i.$hasSettableValue](){return this.hasOwnProperty("value")}[i.$setValue](t){}[i.$onText](t){}[i.$finalize](){}[i.$clean](t){delete this[y],this[i.$cleanup]&&(t.clean(this[i.$cleanup]),delete this[i.$cleanup])}[i.$indexOf](t){return this[f].indexOf(t)}[i.$insertAt](t,e){e[x]=this,this[f].splice(t,0,e),!e[i.$globalData]&&this[i.$globalData]&&(e[i.$globalData]=this[i.$globalData])}[i.$isTransparent](){return!this.name}[i.$lastAttribute](){return""}[i.$text](){return 0===this[f].length?this[i.$content]:this[f].map((t=>t[i.$text]())).join("")}get[u](){const t=Object.getPrototypeOf(this);if(!t._attributes){const e=t._attributes=new Set;for(const t of Object.getOwnPropertyNames(this)){if(null===this[t]||this[t]instanceof I||this[t]instanceof F)break;e.add(t)}}return(0,r.shadow)(this,u,t._attributes)}[i.$isDescendent](t){let e=this;for(;e;){if(e===t)return!0;e=e[i.$getParent]()}return!1}[i.$getParent](){return this[x]}[i.$getSubformParent](){return this[i.$getParent]()}[i.$getChildren](t=null){return t?this[t]:this[f]}[i.$dump](){const t=Object.create(null);this[i.$content]&&(t.$content=this[i.$content]);for(const e of Object.getOwnPropertyNames(this)){const s=this[e];null!==s&&(s instanceof I?t[e]=s[i.$dump]():s instanceof F?s.isEmpty()||(t[e]=s.dump()):t[e]=s)}return t}[i.$toStyle](){return null}[i.$toHTML](){return n.HTMLResult.EMPTY}*[i.$getContainedChildren](){for(const t of this[i.$getChildren]())yield t}*[m](t,e){for(const s of this[i.$getContainedChildren]())if(!t||e===t.has(s[i.$nodeName])){const t=this[i.$getAvailableSpace](),e=s[i.$toHTML](t);e.success||(this[i.$extra].failingNode=s),yield e}}[i.$flushHTML](){return null}[i.$addHTML](t,e){this[i.$extra].children.push(t)}[i.$getAvailableSpace](){}[i.$childrenToHTML]({filter:t=null,include:e=!0}){if(this[i.$extra].generator){const t=this[i.$getAvailableSpace](),e=this[i.$extra].failingNode[i.$toHTML](t);if(!e.success)return e;e.html&&this[i.$addHTML](e.html,e.bbox),delete this[i.$extra].failingNode}else this[i.$extra].generator=this[m](t,e);for(;;){const t=this[i.$extra].generator.next();if(t.done)break;const e=t.value;if(!e.success)return e;e.html&&this[i.$addHTML](e.html,e.bbox)}return this[i.$extra].generator=null,n.HTMLResult.EMPTY}[i.$setSetAttributes](t){this[S]=new Set(Object.keys(t))}[b](t){const e=this[u],s=this[S];return[...t].filter((t=>e.has(t)&&!s.has(t)))}[i.$resolvePrototypes](t,e=new Set){for(const s of this[f])s[k](t,e)}[k](t,e){const s=this[w](t,e);s?this[h](s,t,e):this[i.$resolvePrototypes](t,e)}[w](t,e){const{use:s,usehref:n}=this;if(!s&&!n)return null;let o=null,a=null,l=null,u=s;if(n?(u=n,n.startsWith("#som(")&&n.endsWith(")")?a=n.slice(5,-1):n.startsWith(".#som(")&&n.endsWith(")")?a=n.slice(6,-1):n.startsWith("#")?l=n.slice(1):n.startsWith(".#")&&(l=n.slice(2))):s.startsWith("#")?l=s.slice(1):a=s,this.use=this.usehref="",l?o=t.get(l):(o=(0,c.searchNode)(t.get(i.$root),this,a,!0,!1),o&&(o=o[0])),!o)return(0,r.warn)(`XFA - Invalid prototype reference: ${u}.`),null;if(o[i.$nodeName]!==this[i.$nodeName])return(0,r.warn)(`XFA - Incompatible prototype: ${o[i.$nodeName]} !== ${this[i.$nodeName]}.`),null;if(e.has(o))return(0,r.warn)("XFA - Cycle detected in prototypes use."),null;e.add(o);const f=o[w](t,e);return f&&o[h](f,t,e),o[i.$resolvePrototypes](t,e),e.delete(o),o}[h](t,e,s){if(s.has(t))(0,r.warn)("XFA - Cycle detected in prototypes use.");else{!this[i.$content]&&t[i.$content]&&(this[i.$content]=t[i.$content]),new Set(s).add(t);for(const e of this[b](t[S]))this[e]=t[e],this[S]&&this[S].add(e);for(const n of Object.getOwnPropertyNames(this)){if(this[u].has(n))continue;const r=this[n],o=t[n];if(r instanceof F){for(const t of r[f])t[k](e,s);for(let n=r[f].length,a=o[f].length;n<a;n++){const o=t[f][n][i.$clone]();if(!r.push(o))break;o[x]=this,this[f].push(o),o[k](e,s)}}else if(null===r){if(null!==o){const t=o[i.$clone]();t[x]=this,this[n]=t,this[f].push(t),t[k](e,s)}}else r[i.$resolvePrototypes](e,s),o&&r[h](o,e,s)}}}static[d](t){return Array.isArray(t)?t.map((t=>I[d](t))):"object"==typeof t&&null!==t?Object.assign({},t):t}[i.$clone](){const t=Object.create(Object.getPrototypeOf(this));for(const e of Object.getOwnPropertySymbols(this))try{t[e]=this[e]}catch{(0,r.shadow)(t,e,this[e])}t[i.$uid]=`${t[i.$nodeName]}${C++}`,t[f]=[];for(const e of Object.getOwnPropertyNames(this)){if(this[u].has(e)){t[e]=I[d](this[e]);continue}const s=this[e];t[e]=s instanceof F?new F(s[A]):null}for(const e of this[f]){const s=e[i.$nodeName],n=e[i.$clone]();t[f].push(n),n[x]=t,null===t[s]?t[s]=n:t[s][f].push(n)}return t}[i.$getChildren](t=null){return t?this[f].filter((e=>e[i.$nodeName]===t)):this[f]}[i.$getChildrenByClass](t){return this[t]}[i.$getChildrenByName](t,e,s=!0){return Array.from(this[i.$getChildrenByNameIt](t,e,s))}*[i.$getChildrenByNameIt](t,e,s=!0){if("parent"!==t){for(const s of this[f])s[i.$nodeName]===t&&(yield s),s.name===t&&(yield s),(e||s[i.$isTransparent]())&&(yield*s[i.$getChildrenByNameIt](t,e,!1));s&&this[u].has(t)&&(yield new O(this,t,this[t]))}else yield this[x]}}e.XFAObject=I;class F{constructor(t=1/0){this[A]=t,this[f]=[]}get isXFAObject(){return!1}get isXFAObjectArray(){return!0}push(t){return this[f].length<=this[A]?(this[f].push(t),!0):((0,r.warn)(`XFA - node "${t[i.$nodeName]}" accepts no more than ${this[A]} children`),!1)}isEmpty(){return 0===this[f].length}dump(){return 1===this[f].length?this[f][0][i.$dump]():this[f].map((t=>t[i.$dump]()))}[i.$clone](){const t=new F(this[A]);return t[f]=this[f].map((t=>t[i.$clone]())),t}get children(){return this[f]}clear(){this[f].length=0}}e.XFAObjectArray=F;class O{constructor(t,e,s){this[x]=t,this[i.$nodeName]=e,this[i.$content]=s,this[i.$consumed]=!1,this[i.$uid]="attribute"+C++}[i.$getParent](){return this[x]}[i.$isDataValue](){return!0}[i.$getDataValue](){return this[i.$content].trim()}[i.$setValue](t){this[i.$content]=(t=t.value||"").toString()}[i.$text](){return this[i.$content]}[i.$isDescendent](t){return this[x]===t||this[x][i.$isDescendent](t)}}e.XFAAttribute=O;class E extends I{constructor(t,e,s={}){if(super(t,e),this[i.$content]="",this[p]=null,"#text"!==e){const t=new Map;this[l]=t;for(const[e,i]of Object.entries(s))t.set(e,new O(this,e,i));if(s.hasOwnProperty(i.$nsAttributes)){const t=s[i.$nsAttributes].xfa.dataNode;void 0!==t&&("dataGroup"===t?this[p]=!1:"dataValue"===t&&(this[p]=!0))}}this[i.$consumed]=!1}[i.$toString](t){const e=this[i.$nodeName];if("#text"===e)return void t.push((0,o.encodeToXmlString)(this[i.$content]));const s=(0,r.utf8StringToString)(e),n=this[i.$namespaceId]===_?"xfa:":"";t.push(`<${n}${s}`);for(const[e,s]of this[l].entries()){const n=(0,r.utf8StringToString)(e);t.push(` ${n}="${(0,o.encodeToXmlString)(s[i.$content])}"`)}if(null!==this[p]&&t.push(this[p]?' xfa:dataNode="dataValue"':' xfa:dataNode="dataGroup"'),this[i.$content]||0!==this[f].length){if(t.push(">"),this[i.$content])"string"==typeof this[i.$content]?t.push((0,o.encodeToXmlString)(this[i.$content])):this[i.$content][i.$toString](t);else for(const e of this[f])e[i.$toString](t);t.push(`</${n}${s}>`)}else t.push("/>")}[i.$onChild](t){if(this[i.$content]){const t=new E(this[i.$namespaceId],"#text");this[i.$appendChild](t),t[i.$content]=this[i.$content],this[i.$content]=""}return this[i.$appendChild](t),!0}[i.$onText](t){this[i.$content]+=t}[i.$finalize](){if(this[i.$content]&&this[f].length>0){const t=new E(this[i.$namespaceId],"#text");this[i.$appendChild](t),t[i.$content]=this[i.$content],delete this[i.$content]}}[i.$toHTML](){return"#text"===this[i.$nodeName]?n.HTMLResult.success({name:"#text",value:this[i.$content]}):n.HTMLResult.EMPTY}[i.$getChildren](t=null){return t?this[f].filter((e=>e[i.$nodeName]===t)):this[f]}[i.$getAttributes](){return this[l]}[i.$getChildrenByClass](t){const e=this[l].get(t);return void 0!==e?e:this[i.$getChildren](t)}*[i.$getChildrenByNameIt](t,e){const s=this[l].get(t);s&&(yield s);for(const s of this[f])s[i.$nodeName]===t&&(yield s),e&&(yield*s[i.$getChildrenByNameIt](t,e))}*[i.$getAttributeIt](t,e){const s=this[l].get(t);!s||e&&s[i.$consumed]||(yield s);for(const s of this[f])yield*s[i.$getAttributeIt](t,e)}*[i.$getRealChildrenByNameIt](t,e,s){for(const n of this[f])n[i.$nodeName]!==t||s&&n[i.$consumed]||(yield n),e&&(yield*n[i.$getRealChildrenByNameIt](t,e,s))}[i.$isDataValue](){return null===this[p]?0===this[f].length||this[f][0][i.$namespaceId]===a.NamespaceIds.xhtml.id:this[p]}[i.$getDataValue](){return null===this[p]?0===this[f].length?this[i.$content].trim():this[f][0][i.$namespaceId]===a.NamespaceIds.xhtml.id?this[f][0][i.$text]().trim():null:this[i.$content].trim()}[i.$setValue](t){this[i.$content]=(t=t.value||"").toString()}[i.$dump](t=!1){const e=Object.create(null);t&&(e.$ns=this[i.$namespaceId]),this[i.$content]&&(e.$content=this[i.$content]),e.$name=this[i.$nodeName],e.children=[];for(const s of this[f])e.children.push(s[i.$dump](t));e.attributes=Object.create(null);for(const[t,s]of this[l])e.attributes[t]=s[i.$content];return e}}e.XmlObject=E;class T extends I{constructor(t,e){super(t,e),this[i.$content]=""}[i.$onText](t){this[i.$content]+=t}[i.$finalize](){}}e.ContentObject=T,e.OptionObject=class extends T{constructor(t,e,s){super(t,e),this[v]=s}[i.$finalize](){this[i.$content]=(0,n.getKeyword)({data:this[i.$content],defaultValue:this[v][0],validate:t=>this[v].includes(t)})}[i.$clean](t){super[i.$clean](t),delete this[v]}},e.StringObject=class extends T{[i.$finalize](){this[i.$content]=this[i.$content].trim()}};class D extends T{constructor(t,e,s,i){super(t,e),this[g]=s,this[M]=i}[i.$finalize](){this[i.$content]=(0,n.getInteger)({data:this[i.$content],defaultValue:this[g],validate:this[M]})}[i.$clean](t){super[i.$clean](t),delete this[g],delete this[M]}}e.IntegerObject=D,e.Option01=class extends D{constructor(t,e){super(t,e,0,(t=>1===t))}},e.Option10=class extends D{constructor(t,e){super(t,e,1,(t=>0===t))}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createDataNode=function(t,e,s){const r=l(s);if(!r)return null;if(r.some((t=>t.operator===a.dotDot)))return null;const o=c.get(r[0].name);let h=0;o?(t=o(t,e),h=1):t=e||t;for(let e=r.length;h<e;h++){const{name:e,operator:s,index:o}=r[h];if(!isFinite(o))return r[h].index=0,t.createNodes(r.slice(h));let c;switch(s){case a.dot:c=t[i.$getChildrenByName](e,!1);break;case a.dotDot:c=t[i.$getChildrenByName](e,!0);break;case a.dotHash:c=t[i.$getChildrenByClass](e),c=c.isXFAObjectArray?c.children:[c]}if(0===c.length)return t.createNodes(r.slice(h));if(!(o<c.length))return r[h].index=o-c.length,t.createNodes(r.slice(h));{const e=c[o];if(!e.isXFAObject)return(0,n.warn)("XFA - Cannot create a node."),null;t=e}}return null},e.searchNode=function(t,e,s,n=!0,r=!0){const o=l(s,n);if(!o)return null;const u=c.get(o[0].name);let f,d=0;u?(f=!0,t=[u(t,e)],d=1):(f=null===e,t=[e||t]);for(let s=o.length;d<s;d++){const{name:s,cacheName:n,operator:c,index:l}=o[d],u=[];for(const e of t){if(!e.isXFAObject)continue;let t,o;if(r&&(o=h.get(e),o||(o=new Map,h.set(e,o)),t=o.get(n)),!t){switch(c){case a.dot:t=e[i.$getChildrenByName](s,!1);break;case a.dotDot:t=e[i.$getChildrenByName](s,!0);break;case a.dotHash:t=e[i.$getChildrenByClass](s),t=t.isXFAObjectArray?t.children:[t]}r&&o.set(n,t)}t.length>0&&u.push(t)}if(0!==u.length||f||0!==d)t=isFinite(l)?u.filter((t=>l<t.length)).map((t=>t[l])):u.flat();else{const s=e[i.$getParent]();if(!(e=s))return null;d=-1,t=[e]}}return 0===t.length?null:t};var i=s(78),n=s(2);const r=/^[^.[]+/,o=/^[^\]]+/,a={dot:0,dotDot:1,dotHash:2,dotBracket:3,dotParen:4},c=new Map([["$data",t=>t.datasets?t.datasets.data:t],["$record",t=>(t.datasets?t.datasets.data:t)[i.$getChildren]()[0]],["$template",t=>t.template],["$connectionSet",t=>t.connectionSet],["$form",t=>t.form],["$layout",t=>t.layout],["$host",t=>t.host],["$dataWindow",t=>t.dataWindow],["$event",t=>t.event],["!",t=>t.datasets],["$xfa",t=>t],["xfa",t=>t],["$",(t,e)=>e]]),h=new WeakMap;function l(t,e,s=!0){let i=t.match(r);if(!i)return null;let[c]=i;const h=[{name:c,cacheName:"."+c,index:0,js:null,formCalc:null,operator:a.dot}];let l=c.length;for(;l<t.length;){const f=l;if("["===t.charAt(l++)){if(i=t.slice(l).match(o),!i)return(0,n.warn)("XFA - Invalid index in SOM expression"),null;h.at(-1).index="*"===(u=(u=i[0]).trim())?1/0:parseInt(u,10)||0,l+=i[0].length+1;continue}let d;switch(t.charAt(l)){case".":if(!e)return null;l++,d=a.dotDot;break;case"#":l++,d=a.dotHash;break;case"[":if(s)return(0,n.warn)("XFA - SOM expression contains a FormCalc subexpression which is not supported for now."),null;d=a.dotBracket;break;case"(":if(s)return(0,n.warn)("XFA - SOM expression contains a JavaScript subexpression which is not supported for now."),null;d=a.dotParen;break;default:d=a.dot}if(i=t.slice(l).match(r),!i)break;[c]=i,l+=c.length,h.push({name:c,cacheName:t.slice(f,l),operator:d,index:0,js:null,formCalc:null})}var u;return h}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DataHandler=void 0;var i=s(78);e.DataHandler=class{constructor(t,e){this.data=e,this.dataset=t.datasets||null}serialize(t){const e=[[-1,this.data[i.$getChildren]()]];for(;e.length>0;){const s=e.at(-1),[n,r]=s;if(n+1===r.length){e.pop();continue}const o=r[++s[0]],a=t.get(o[i.$uid]);if(a)o[i.$setValue](a);else{const e=o[i.$getAttributes]();for(const s of e.values()){const e=t.get(s[i.$uid]);if(e){s[i.$setValue](e);break}}}const c=o[i.$getChildren]();c.length>0&&e.push([-1,c])}const s=['<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">'];if(this.dataset)for(const t of this.dataset[i.$getChildren]())"data"!==t[i.$nodeName]&&t[i.$toString](s);return this.data[i.$toString](s),s.push("</xfa:datasets>"),s.join("")}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.XFAParser=void 0;var i=s(78),n=s(71),r=s(91),o=s(2);class a extends n.XMLParserBase{constructor(t=null,e=!1){super(),this._builder=new r.Builder(t),this._stack=[],this._globalData={usedTypefaces:new Set},this._ids=new Map,this._current=this._builder.buildRoot(this._ids),this._errorCode=n.XMLParserErrorCode.NoError,this._whiteRegex=/^\s+$/,this._nbsps=/\xa0+/g,this._richText=e}parse(t){if(this.parseXml(t),this._errorCode===n.XMLParserErrorCode.NoError)return this._current[i.$finalize](),this._current.element}onText(t){t=t.replace(this._nbsps,(t=>t.slice(1)+" ")),this._richText||this._current[i.$acceptWhitespace]()?this._current[i.$onText](t,this._richText):this._whiteRegex.test(t)||this._current[i.$onText](t.trim())}onCdata(t){this._current[i.$onText](t)}_mkAttributes(t,e){let s=null,n=null;const r=Object.create({});for(const{name:a,value:c}of t)if("xmlns"===a)s?(0,o.warn)(`XFA - multiple namespace definition in <${e}>`):s=c;else if(a.startsWith("xmlns:")){const t=a.substring(6);n||(n=[]),n.push({prefix:t,value:c})}else{const t=a.indexOf(":");if(-1===t)r[a]=c;else{let e=r[i.$nsAttributes];e||(e=r[i.$nsAttributes]=Object.create(null));const[s,n]=[a.slice(0,t),a.slice(t+1)];(e[s]||=Object.create(null))[n]=c}}return[s,n,r]}_getNameAndPrefix(t,e){const s=t.indexOf(":");return-1===s?[t,null]:[t.substring(s+1),e?"":t.substring(0,s)]}onBeginElement(t,e,s){const[n,r,o]=this._mkAttributes(e,t),[a,c]=this._getNameAndPrefix(t,this._builder.isNsAgnostic()),h=this._builder.build({nsPrefix:c,name:a,attributes:o,namespace:n,prefixes:r});if(h[i.$globalData]=this._globalData,s)return h[i.$finalize](),this._current[i.$onChild](h)&&h[i.$setId](this._ids),void h[i.$clean](this._builder);this._stack.push(this._current),this._current=h}onEndElement(t){const e=this._current;if(e[i.$isCDATAXml]()&&"string"==typeof e[i.$content]){const t=new a;t._globalData=this._globalData;const s=t.parse(e[i.$content]);e[i.$content]=null,e[i.$onChild](s)}e[i.$finalize](),this._current=this._stack.pop(),this._current[i.$onChild](e)&&e[i.$setId](this._ids),e[i.$clean](this._builder)}onError(t){this._errorCode=t}}e.XFAParser=a},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Builder=void 0;var i=s(81),n=s(78),r=s(92),o=s(80),a=s(101),c=s(2),h=s(87);class l extends h.XFAObject{constructor(t){super(-1,"root",Object.create(null)),this.element=null,this[n.$ids]=t}[n.$onChild](t){return this.element=t,!0}[n.$finalize](){super[n.$finalize](),this.element.template instanceof o.Template&&(this[n.$ids].set(n.$root,this.element),this.element.template[n.$resolvePrototypes](this[n.$ids]),this.element.template[n.$ids]=this[n.$ids])}}class u extends h.XFAObject{constructor(){super(-1,"",Object.create(null))}[n.$onChild](t){return!1}}e.Builder=class{constructor(t=null){this._namespaceStack=[],this._nsAgnosticLevel=0,this._namespacePrefixes=new Map,this._namespaces=new Map,this._nextNsId=Math.max(...Object.values(i.NamespaceIds).map((({id:t})=>t))),this._currentNamespace=t||new a.UnknownNamespace(++this._nextNsId)}buildRoot(t){return new l(t)}build({nsPrefix:t,name:e,attributes:s,namespace:o,prefixes:a}){const c=null!==o;if(c&&(this._namespaceStack.push(this._currentNamespace),this._currentNamespace=this._searchNamespace(o)),a&&this._addNamespacePrefix(a),s.hasOwnProperty(n.$nsAttributes)){const t=r.NamespaceSetUp.datasets,e=s[n.$nsAttributes];let i=null;for(const[s,n]of Object.entries(e))if(this._getNamespaceToUse(s)===t){i={xfa:n};break}i?s[n.$nsAttributes]=i:delete s[n.$nsAttributes]}const h=this._getNamespaceToUse(t),l=h?.[i.$buildXFAObject](e,s)||new u;return l[n.$isNsAgnostic]()&&this._nsAgnosticLevel++,(c||a||l[n.$isNsAgnostic]())&&(l[n.$cleanup]={hasNamespace:c,prefixes:a,nsAgnostic:l[n.$isNsAgnostic]()}),l}isNsAgnostic(){return this._nsAgnosticLevel>0}_searchNamespace(t){let e=this._namespaces.get(t);if(e)return e;for(const[s,{check:n}]of Object.entries(i.NamespaceIds))if(n(t)){if(e=r.NamespaceSetUp[s],e)return this._namespaces.set(t,e),e;break}return e=new a.UnknownNamespace(++this._nextNsId),this._namespaces.set(t,e),e}_addNamespacePrefix(t){for(const{prefix:e,value:s}of t){const t=this._searchNamespace(s);let i=this._namespacePrefixes.get(e);i||(i=[],this._namespacePrefixes.set(e,i)),i.push(t)}}_getNamespaceToUse(t){if(!t)return this._currentNamespace;const e=this._namespacePrefixes.get(t);return e?.length>0?e.at(-1):((0,c.warn)(`Unknown namespace prefix: ${t}.`),null)}clean(t){const{hasNamespace:e,prefixes:s,nsAgnostic:i}=t;e&&(this._currentNamespace=this._namespaceStack.pop()),s&&s.forEach((({prefix:t})=>{this._namespacePrefixes.get(t).pop()})),i&&this._nsAgnosticLevel--}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NamespaceSetUp=void 0;var i=s(93),n=s(94),r=s(95),o=s(96),a=s(97),c=s(98),h=s(80),l=s(99),u=s(100);e.NamespaceSetUp={config:i.ConfigNamespace,connection:n.ConnectionSetNamespace,datasets:r.DatasetsNamespace,localeSet:o.LocaleSetNamespace,signature:a.SignatureNamespace,stylesheet:c.StylesheetNamespace,template:h.TemplateNamespace,xdp:l.XdpNamespace,xhtml:u.XhtmlNamespace}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigNamespace=void 0;var i=s(81),n=s(78),r=s(87),o=s(84),a=s(2);const c=i.NamespaceIds.config.id;class h extends r.XFAObject{constructor(t){super(c,"acrobat",!0),this.acrobat7=null,this.autoSave=null,this.common=null,this.validate=null,this.validateApprovalSignatures=null,this.submitUrl=new r.XFAObjectArray}}class l extends r.XFAObject{constructor(t){super(c,"acrobat7",!0),this.dynamicRender=null}}class u extends r.OptionObject{constructor(t){super(c,"ADBE_JSConsole",["delegate","Enable","Disable"])}}class f extends r.OptionObject{constructor(t){super(c,"ADBE_JSDebugger",["delegate","Enable","Disable"])}}class d extends r.Option01{constructor(t){super(c,"addSilentPrint")}}class p extends r.Option01{constructor(t){super(c,"addViewerPreferences")}}class g extends r.Option10{constructor(t){super(c,"adjustData")}}class m extends r.IntegerObject{constructor(t){super(c,"adobeExtensionLevel",0,(t=>t>=1&&t<=8))}}class w extends r.XFAObject{constructor(t){super(c,"agent",!0),this.name=t.name?t.name.trim():"",this.common=new r.XFAObjectArray}}class b extends r.ContentObject{constructor(t){super(c,"alwaysEmbed")}}class y extends r.StringObject{constructor(t){super(c,"amd")}}class A extends r.XFAObject{constructor(t){super(c,"area"),this.level=(0,o.getInteger)({data:t.level,defaultValue:0,validate:t=>t>=1&&t<=3}),this.name=(0,o.getStringOption)(t.name,["","barcode","coreinit","deviceDriver","font","general","layout","merge","script","signature","sourceSet","templateCache"])}}class v extends r.OptionObject{constructor(t){super(c,"attributes",["preserve","delegate","ignore"])}}class x extends r.OptionObject{constructor(t){super(c,"autoSave",["disabled","enabled"])}}class k extends r.StringObject{constructor(t){super(c,"base")}}class S extends r.XFAObject{constructor(t){super(c,"batchOutput"),this.format=(0,o.getStringOption)(t.format,["none","concat","zip","zipCompress"])}}class M extends r.ContentObject{constructor(t){super(c,"behaviorOverride")}[n.$finalize](){this[n.$content]=new Map(this[n.$content].trim().split(/\s+/).filter((t=>t.includes(":"))).map((t=>t.split(":",2))))}}class C extends r.XFAObject{constructor(t){super(c,"cache",!0),this.templateCache=null}}class _ extends r.Option01{constructor(t){super(c,"change")}}class I extends r.XFAObject{constructor(t){super(c,"common",!0),this.data=null,this.locale=null,this.localeSet=null,this.messaging=null,this.suppressBanner=null,this.template=null,this.validationMessaging=null,this.versionControl=null,this.log=new r.XFAObjectArray}}class F extends r.XFAObject{constructor(t){super(c,"compress"),this.scope=(0,o.getStringOption)(t.scope,["imageOnly","document"])}}class O extends r.Option01{constructor(t){super(c,"compressLogicalStructure")}}class E extends r.Option10{constructor(t){super(c,"compressObjectStream")}}class T extends r.XFAObject{constructor(t){super(c,"compression",!0),this.compressLogicalStructure=null,this.compressObjectStream=null,this.level=null,this.type=null}}class D extends r.XFAObject{constructor(t){super(c,"config",!0),this.acrobat=null,this.present=null,this.trace=null,this.agent=new r.XFAObjectArray}}class P extends r.OptionObject{constructor(t){super(c,"conformance",["A","B"])}}class R extends r.Option01{constructor(t){super(c,"contentCopy")}}class N extends r.IntegerObject{constructor(t){super(c,"copies",1,(t=>t>=1))}}class L extends r.StringObject{constructor(t){super(c,"creator")}}class B extends r.IntegerObject{constructor(t){super(c,"currentPage",0,(t=>t>=0))}}class $ extends r.XFAObject{constructor(t){super(c,"data",!0),this.adjustData=null,this.attributes=null,this.incrementalLoad=null,this.outputXSL=null,this.range=null,this.record=null,this.startNode=null,this.uri=null,this.window=null,this.xsl=null,this.excludeNS=new r.XFAObjectArray,this.transform=new r.XFAObjectArray}}class U extends r.XFAObject{constructor(t){super(c,"debug",!0),this.uri=null}}class j extends r.ContentObject{constructor(t){super(c,"defaultTypeface"),this.writingScript=(0,o.getStringOption)(t.writingScript,["*","Arabic","Cyrillic","EastEuropeanRoman","Greek","Hebrew","Japanese","Korean","Roman","SimplifiedChinese","Thai","TraditionalChinese","Vietnamese"])}}class H extends r.OptionObject{constructor(t){super(c,"destination",["pdf","pcl","ps","webClient","zpl"])}}class G extends r.Option01{constructor(t){super(c,"documentAssembly")}}class q extends r.XFAObject{constructor(t){super(c,"driver",!0),this.name=t.name?t.name.trim():"",this.fontInfo=null,this.xdc=null}}class X extends r.OptionObject{constructor(t){super(c,"duplexOption",["simplex","duplexFlipLongEdge","duplexFlipShortEdge"])}}class W extends r.OptionObject{constructor(t){super(c,"dynamicRender",["forbidden","required"])}}class z extends r.Option01{constructor(t){super(c,"embed")}}class V extends r.Option01{constructor(t){super(c,"encrypt")}}class K extends r.XFAObject{constructor(t){super(c,"encryption",!0),this.encrypt=null,this.encryptionLevel=null,this.permissions=null}}class J extends r.OptionObject{constructor(t){super(c,"encryptionLevel",["40bit","128bit"])}}class Y extends r.StringObject{constructor(t){super(c,"enforce")}}class Q extends r.XFAObject{constructor(t){super(c,"equate"),this.force=(0,o.getInteger)({data:t.force,defaultValue:1,validate:t=>0===t}),this.from=t.from||"",this.to=t.to||""}}class Z extends r.XFAObject{constructor(t){super(c,"equateRange"),this.from=t.from||"",this.to=t.to||"",this._unicodeRange=t.unicodeRange||""}get unicodeRange(){const t=[],e=/U\+([0-9a-fA-F]+)/,s=this._unicodeRange;for(let i of s.split(",").map((t=>t.trim())).filter((t=>!!t)))i=i.split("-",2).map((t=>{const s=t.match(e);return s?parseInt(s[1],16):0})),1===i.length&&i.push(i[0]),t.push(i);return(0,a.shadow)(this,"unicodeRange",t)}}class tt extends r.ContentObject{constructor(t){super(c,"exclude")}[n.$finalize](){this[n.$content]=this[n.$content].trim().split(/\s+/).filter((t=>t&&["calculate","close","enter","exit","initialize","ready","validate"].includes(t)))}}class et extends r.StringObject{constructor(t){super(c,"excludeNS")}}class st extends r.OptionObject{constructor(t){super(c,"flipLabel",["usePrinterSetting","on","off"])}}class it extends r.XFAObject{constructor(t){super(c,"fontInfo",!0),this.embed=null,this.map=null,this.subsetBelow=null,this.alwaysEmbed=new r.XFAObjectArray,this.defaultTypeface=new r.XFAObjectArray,this.neverEmbed=new r.XFAObjectArray}}class nt extends r.Option01{constructor(t){super(c,"formFieldFilling")}}class rt extends r.StringObject{constructor(t){super(c,"groupParent")}}class ot extends r.OptionObject{constructor(t){super(c,"ifEmpty",["dataValue","dataGroup","ignore","remove"])}}class at extends r.StringObject{constructor(t){super(c,"includeXDPContent")}}class ct extends r.OptionObject{constructor(t){super(c,"incrementalLoad",["none","forwardOnly"])}}class ht extends r.Option01{constructor(t){super(c,"incrementalMerge")}}class lt extends r.Option01{constructor(t){super(c,"interactive")}}class ut extends r.OptionObject{constructor(t){super(c,"jog",["usePrinterSetting","none","pageSet"])}}class ft extends r.XFAObject{constructor(t){super(c,"labelPrinter",!0),this.name=(0,o.getStringOption)(t.name,["zpl","dpl","ipl","tcpl"]),this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}}class dt extends r.OptionObject{constructor(t){super(c,"layout",["paginate","panel"])}}class pt extends r.IntegerObject{constructor(t){super(c,"level",0,(t=>t>0))}}class gt extends r.Option01{constructor(t){super(c,"linearized")}}class mt extends r.StringObject{constructor(t){super(c,"locale")}}class wt extends r.StringObject{constructor(t){super(c,"localeSet")}}class bt extends r.XFAObject{constructor(t){super(c,"log",!0),this.mode=null,this.threshold=null,this.to=null,this.uri=null}}class yt extends r.XFAObject{constructor(t){super(c,"map",!0),this.equate=new r.XFAObjectArray,this.equateRange=new r.XFAObjectArray}}class At extends r.XFAObject{constructor(t){super(c,"mediumInfo",!0),this.map=null}}class vt extends r.XFAObject{constructor(t){super(c,"message",!0),this.msgId=null,this.severity=null}}class xt extends r.XFAObject{constructor(t){super(c,"messaging",!0),this.message=new r.XFAObjectArray}}class kt extends r.OptionObject{constructor(t){super(c,"mode",["append","overwrite"])}}class St extends r.Option01{constructor(t){super(c,"modifyAnnots")}}class Mt extends r.IntegerObject{constructor(t){super(c,"msgId",1,(t=>t>=1))}}class Ct extends r.StringObject{constructor(t){super(c,"nameAttr")}}class _t extends r.ContentObject{constructor(t){super(c,"neverEmbed")}}class It extends r.IntegerObject{constructor(t){super(c,"numberOfCopies",null,(t=>t>=2&&t<=5))}}class Ft extends r.XFAObject{constructor(t){super(c,"openAction",!0),this.destination=null}}class Ot extends r.XFAObject{constructor(t){super(c,"output",!0),this.to=null,this.type=null,this.uri=null}}class Et extends r.StringObject{constructor(t){super(c,"outputBin")}}class Tt extends r.XFAObject{constructor(t){super(c,"outputXSL",!0),this.uri=null}}class Dt extends r.OptionObject{constructor(t){super(c,"overprint",["none","both","draw","field"])}}class Pt extends r.StringObject{constructor(t){super(c,"packets")}[n.$finalize](){"*"!==this[n.$content]&&(this[n.$content]=this[n.$content].trim().split(/\s+/).filter((t=>["config","datasets","template","xfdf","xslt"].includes(t))))}}class Rt extends r.XFAObject{constructor(t){super(c,"pageOffset"),this.x=(0,o.getInteger)({data:t.x,defaultValue:"useXDCSetting",validate:()=>!0}),this.y=(0,o.getInteger)({data:t.y,defaultValue:"useXDCSetting",validate:()=>!0})}}class Nt extends r.StringObject{constructor(t){super(c,"pageRange")}[n.$finalize](){const t=this[n.$content].trim().split(/\s+/).map((t=>parseInt(t,10))),e=[];for(let s=0,i=t.length;s<i;s+=2)e.push(t.slice(s,s+2));this[n.$content]=e}}class Lt extends r.OptionObject{constructor(t){super(c,"pagination",["simplex","duplexShortEdge","duplexLongEdge"])}}class Bt extends r.OptionObject{constructor(t){super(c,"paginationOverride",["none","forceDuplex","forceDuplexLongEdge","forceDuplexShortEdge","forceSimplex"])}}class $t extends r.IntegerObject{constructor(t){super(c,"part",1,(()=>!1))}}class Ut extends r.XFAObject{constructor(t){super(c,"pcl",!0),this.name=t.name||"",this.batchOutput=null,this.fontInfo=null,this.jog=null,this.mediumInfo=null,this.outputBin=null,this.pageOffset=null,this.staple=null,this.xdc=null}}class jt extends r.XFAObject{constructor(t){super(c,"pdf",!0),this.name=t.name||"",this.adobeExtensionLevel=null,this.batchOutput=null,this.compression=null,this.creator=null,this.encryption=null,this.fontInfo=null,this.interactive=null,this.linearized=null,this.openAction=null,this.pdfa=null,this.producer=null,this.renderPolicy=null,this.scriptModel=null,this.silentPrint=null,this.submitFormat=null,this.tagged=null,this.version=null,this.viewerPreferences=null,this.xdc=null}}class Ht extends r.XFAObject{constructor(t){super(c,"pdfa",!0),this.amd=null,this.conformance=null,this.includeXDPContent=null,this.part=null}}class Gt extends r.XFAObject{constructor(t){super(c,"permissions",!0),this.accessibleContent=null,this.change=null,this.contentCopy=null,this.documentAssembly=null,this.formFieldFilling=null,this.modifyAnnots=null,this.plaintextMetadata=null,this.print=null,this.printHighQuality=null}}class qt extends r.Option01{constructor(t){super(c,"pickTrayByPDFSize")}}class Xt extends r.StringObject{constructor(t){super(c,"picture")}}class Wt extends r.Option01{constructor(t){super(c,"plaintextMetadata")}}class zt extends r.OptionObject{constructor(t){super(c,"presence",["preserve","dissolve","dissolveStructure","ignore","remove"])}}class Vt extends r.XFAObject{constructor(t){super(c,"present",!0),this.behaviorOverride=null,this.cache=null,this.common=null,this.copies=null,this.destination=null,this.incrementalMerge=null,this.layout=null,this.output=null,this.overprint=null,this.pagination=null,this.paginationOverride=null,this.script=null,this.validate=null,this.xdp=null,this.driver=new r.XFAObjectArray,this.labelPrinter=new r.XFAObjectArray,this.pcl=new r.XFAObjectArray,this.pdf=new r.XFAObjectArray,this.ps=new r.XFAObjectArray,this.submitUrl=new r.XFAObjectArray,this.webClient=new r.XFAObjectArray,this.zpl=new r.XFAObjectArray}}class Kt extends r.Option01{constructor(t){super(c,"print")}}class Jt extends r.Option01{constructor(t){super(c,"printHighQuality")}}class Yt extends r.OptionObject{constructor(t){super(c,"printScaling",["appdefault","noScaling"])}}class Qt extends r.StringObject{constructor(t){super(c,"printerName")}}class Zt extends r.StringObject{constructor(t){super(c,"producer")}}class te extends r.XFAObject{constructor(t){super(c,"ps",!0),this.name=t.name||"",this.batchOutput=null,this.fontInfo=null,this.jog=null,this.mediumInfo=null,this.outputBin=null,this.staple=null,this.xdc=null}}class ee extends r.ContentObject{constructor(t){super(c,"range")}[n.$finalize](){this[n.$content]=this[n.$content].trim().split(/\s*,\s*/,2).map((t=>t.split("-").map((t=>parseInt(t.trim(),10))))).filter((t=>t.every((t=>!isNaN(t))))).map((t=>(1===t.length&&t.push(t[0]),t)))}}class se extends r.ContentObject{constructor(t){super(c,"record")}[n.$finalize](){this[n.$content]=this[n.$content].trim();const t=parseInt(this[n.$content],10);!isNaN(t)&&t>=0&&(this[n.$content]=t)}}class ie extends r.ContentObject{constructor(t){super(c,"relevant")}[n.$finalize](){this[n.$content]=this[n.$content].trim().split(/\s+/)}}class ne extends r.ContentObject{constructor(t){super(c,"rename")}[n.$finalize](){this[n.$content]=this[n.$content].trim(),(this[n.$content].toLowerCase().startsWith("xml")||new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*","u").test(this[n.$content]))&&(0,a.warn)("XFA - Rename: invalid XFA name")}}class re extends r.OptionObject{constructor(t){super(c,"renderPolicy",["server","client"])}}class oe extends r.OptionObject{constructor(t){super(c,"runScripts",["both","client","none","server"])}}class ae extends r.XFAObject{constructor(t){super(c,"script",!0),this.currentPage=null,this.exclude=null,this.runScripts=null}}class ce extends r.OptionObject{constructor(t){super(c,"scriptModel",["XFA","none"])}}class he extends r.OptionObject{constructor(t){super(c,"severity",["ignore","error","information","trace","warning"])}}class le extends r.XFAObject{constructor(t){super(c,"silentPrint",!0),this.addSilentPrint=null,this.printerName=null}}class ue extends r.XFAObject{constructor(t){super(c,"staple"),this.mode=(0,o.getStringOption)(t.mode,["usePrinterSetting","on","off"])}}class fe extends r.StringObject{constructor(t){super(c,"startNode")}}class de extends r.IntegerObject{constructor(t){super(c,"startPage",0,(()=>!0))}}class pe extends r.OptionObject{constructor(t){super(c,"submitFormat",["html","delegate","fdf","xml","pdf"])}}class ge extends r.StringObject{constructor(t){super(c,"submitUrl")}}class me extends r.IntegerObject{constructor(t){super(c,"subsetBelow",100,(t=>t>=0&&t<=100))}}class we extends r.Option01{constructor(t){super(c,"suppressBanner")}}class be extends r.Option01{constructor(t){super(c,"tagged")}}class ye extends r.XFAObject{constructor(t){super(c,"template",!0),this.base=null,this.relevant=null,this.startPage=null,this.uri=null,this.xsl=null}}class Ae extends r.OptionObject{constructor(t){super(c,"threshold",["trace","error","information","warning"])}}class ve extends r.OptionObject{constructor(t){super(c,"to",["null","memory","stderr","stdout","system","uri"])}}class xe extends r.XFAObject{constructor(t){super(c,"templateCache"),this.maxEntries=(0,o.getInteger)({data:t.maxEntries,defaultValue:5,validate:t=>t>=0})}}class ke extends r.XFAObject{constructor(t){super(c,"trace",!0),this.area=new r.XFAObjectArray}}class Se extends r.XFAObject{constructor(t){super(c,"transform",!0),this.groupParent=null,this.ifEmpty=null,this.nameAttr=null,this.picture=null,this.presence=null,this.rename=null,this.whitespace=null}}class Me extends r.OptionObject{constructor(t){super(c,"type",["none","ascii85","asciiHex","ccittfax","flate","lzw","runLength","native","xdp","mergedXDP"])}}class Ce extends r.StringObject{constructor(t){super(c,"uri")}}class _e extends r.OptionObject{constructor(t){super(c,"validate",["preSubmit","prePrint","preExecute","preSave"])}}class Ie extends r.ContentObject{constructor(t){super(c,"validateApprovalSignatures")}[n.$finalize](){this[n.$content]=this[n.$content].trim().split(/\s+/).filter((t=>["docReady","postSign"].includes(t)))}}class Fe extends r.OptionObject{constructor(t){super(c,"validationMessaging",["allMessagesIndividually","allMessagesTogether","firstMessageOnly","noMessages"])}}class Oe extends r.OptionObject{constructor(t){super(c,"version",["1.7","1.6","1.5","1.4","1.3","1.2"])}}class Ee extends r.XFAObject{constructor(t){super(c,"VersionControl"),this.outputBelow=(0,o.getStringOption)(t.outputBelow,["warn","error","update"]),this.sourceAbove=(0,o.getStringOption)(t.sourceAbove,["warn","error"]),this.sourceBelow=(0,o.getStringOption)(t.sourceBelow,["update","maintain"])}}class Te extends r.XFAObject{constructor(t){super(c,"viewerPreferences",!0),this.ADBE_JSConsole=null,this.ADBE_JSDebugger=null,this.addViewerPreferences=null,this.duplexOption=null,this.enforce=null,this.numberOfCopies=null,this.pageRange=null,this.pickTrayByPDFSize=null,this.printScaling=null}}class De extends r.XFAObject{constructor(t){super(c,"webClient",!0),this.name=t.name?t.name.trim():"",this.fontInfo=null,this.xdc=null}}class Pe extends r.OptionObject{constructor(t){super(c,"whitespace",["preserve","ltrim","normalize","rtrim","trim"])}}class Re extends r.ContentObject{constructor(t){super(c,"window")}[n.$finalize](){const t=this[n.$content].trim().split(/\s*,\s*/,2).map((t=>parseInt(t,10)));t.some((t=>isNaN(t)))?this[n.$content]=[0,0]:(1===t.length&&t.push(t[0]),this[n.$content]=t)}}class Ne extends r.XFAObject{constructor(t){super(c,"xdc",!0),this.uri=new r.XFAObjectArray,this.xsl=new r.XFAObjectArray}}class Le extends r.XFAObject{constructor(t){super(c,"xdp",!0),this.packets=null}}class Be extends r.XFAObject{constructor(t){super(c,"xsl",!0),this.debug=null,this.uri=null}}class $e extends r.XFAObject{constructor(t){super(c,"zpl",!0),this.name=t.name?t.name.trim():"",this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}}class Ue{static[i.$buildXFAObject](t,e){if(Ue.hasOwnProperty(t))return Ue[t](e)}static acrobat(t){return new h(t)}static acrobat7(t){return new l(t)}static ADBE_JSConsole(t){return new u(t)}static ADBE_JSDebugger(t){return new f(t)}static addSilentPrint(t){return new d(t)}static addViewerPreferences(t){return new p(t)}static adjustData(t){return new g(t)}static adobeExtensionLevel(t){return new m(t)}static agent(t){return new w(t)}static alwaysEmbed(t){return new b(t)}static amd(t){return new y(t)}static area(t){return new A(t)}static attributes(t){return new v(t)}static autoSave(t){return new x(t)}static base(t){return new k(t)}static batchOutput(t){return new S(t)}static behaviorOverride(t){return new M(t)}static cache(t){return new C(t)}static change(t){return new _(t)}static common(t){return new I(t)}static compress(t){return new F(t)}static compressLogicalStructure(t){return new O(t)}static compressObjectStream(t){return new E(t)}static compression(t){return new T(t)}static config(t){return new D(t)}static conformance(t){return new P(t)}static contentCopy(t){return new R(t)}static copies(t){return new N(t)}static creator(t){return new L(t)}static currentPage(t){return new B(t)}static data(t){return new $(t)}static debug(t){return new U(t)}static defaultTypeface(t){return new j(t)}static destination(t){return new H(t)}static documentAssembly(t){return new G(t)}static driver(t){return new q(t)}static duplexOption(t){return new X(t)}static dynamicRender(t){return new W(t)}static embed(t){return new z(t)}static encrypt(t){return new V(t)}static encryption(t){return new K(t)}static encryptionLevel(t){return new J(t)}static enforce(t){return new Y(t)}static equate(t){return new Q(t)}static equateRange(t){return new Z(t)}static exclude(t){return new tt(t)}static excludeNS(t){return new et(t)}static flipLabel(t){return new st(t)}static fontInfo(t){return new it(t)}static formFieldFilling(t){return new nt(t)}static groupParent(t){return new rt(t)}static ifEmpty(t){return new ot(t)}static includeXDPContent(t){return new at(t)}static incrementalLoad(t){return new ct(t)}static incrementalMerge(t){return new ht(t)}static interactive(t){return new lt(t)}static jog(t){return new ut(t)}static labelPrinter(t){return new ft(t)}static layout(t){return new dt(t)}static level(t){return new pt(t)}static linearized(t){return new gt(t)}static locale(t){return new mt(t)}static localeSet(t){return new wt(t)}static log(t){return new bt(t)}static map(t){return new yt(t)}static mediumInfo(t){return new At(t)}static message(t){return new vt(t)}static messaging(t){return new xt(t)}static mode(t){return new kt(t)}static modifyAnnots(t){return new St(t)}static msgId(t){return new Mt(t)}static nameAttr(t){return new Ct(t)}static neverEmbed(t){return new _t(t)}static numberOfCopies(t){return new It(t)}static openAction(t){return new Ft(t)}static output(t){return new Ot(t)}static outputBin(t){return new Et(t)}static outputXSL(t){return new Tt(t)}static overprint(t){return new Dt(t)}static packets(t){return new Pt(t)}static pageOffset(t){return new Rt(t)}static pageRange(t){return new Nt(t)}static pagination(t){return new Lt(t)}static paginationOverride(t){return new Bt(t)}static part(t){return new $t(t)}static pcl(t){return new Ut(t)}static pdf(t){return new jt(t)}static pdfa(t){return new Ht(t)}static permissions(t){return new Gt(t)}static pickTrayByPDFSize(t){return new qt(t)}static picture(t){return new Xt(t)}static plaintextMetadata(t){return new Wt(t)}static presence(t){return new zt(t)}static present(t){return new Vt(t)}static print(t){return new Kt(t)}static printHighQuality(t){return new Jt(t)}static printScaling(t){return new Yt(t)}static printerName(t){return new Qt(t)}static producer(t){return new Zt(t)}static ps(t){return new te(t)}static range(t){return new ee(t)}static record(t){return new se(t)}static relevant(t){return new ie(t)}static rename(t){return new ne(t)}static renderPolicy(t){return new re(t)}static runScripts(t){return new oe(t)}static script(t){return new ae(t)}static scriptModel(t){return new ce(t)}static severity(t){return new he(t)}static silentPrint(t){return new le(t)}static staple(t){return new ue(t)}static startNode(t){return new fe(t)}static startPage(t){return new de(t)}static submitFormat(t){return new pe(t)}static submitUrl(t){return new ge(t)}static subsetBelow(t){return new me(t)}static suppressBanner(t){return new we(t)}static tagged(t){return new be(t)}static template(t){return new ye(t)}static templateCache(t){return new xe(t)}static threshold(t){return new Ae(t)}static to(t){return new ve(t)}static trace(t){return new ke(t)}static transform(t){return new Se(t)}static type(t){return new Me(t)}static uri(t){return new Ce(t)}static validate(t){return new _e(t)}static validateApprovalSignatures(t){return new Ie(t)}static validationMessaging(t){return new Fe(t)}static version(t){return new Oe(t)}static versionControl(t){return new Ee(t)}static viewerPreferences(t){return new Te(t)}static webClient(t){return new De(t)}static whitespace(t){return new Pe(t)}static window(t){return new Re(t)}static xdc(t){return new Ne(t)}static xdp(t){return new Le(t)}static xsl(t){return new Be(t)}static zpl(t){return new $e(t)}}e.ConfigNamespace=Ue},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionSetNamespace=void 0;var i=s(81),n=s(87);const r=i.NamespaceIds.connectionSet.id;class o extends n.XFAObject{constructor(t){super(r,"connectionSet",!0),this.wsdlConnection=new n.XFAObjectArray,this.xmlConnection=new n.XFAObjectArray,this.xsdConnection=new n.XFAObjectArray}}class a extends n.XFAObject{constructor(t){super(r,"effectiveInputPolicy"),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}}class c extends n.XFAObject{constructor(t){super(r,"effectiveOutputPolicy"),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}}class h extends n.StringObject{constructor(t){super(r,"operation"),this.id=t.id||"",this.input=t.input||"",this.name=t.name||"",this.output=t.output||"",this.use=t.use||"",this.usehref=t.usehref||""}}class l extends n.StringObject{constructor(t){super(r,"rootElement"),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}}class u extends n.StringObject{constructor(t){super(r,"soapAction"),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}}class f extends n.StringObject{constructor(t){super(r,"soapAddress"),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}}class d extends n.StringObject{constructor(t){super(r,"uri"),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}}class p extends n.StringObject{constructor(t){super(r,"wsdlAddress"),this.id=t.id||"",this.name=t.name||"",this.use=t.use||"",this.usehref=t.usehref||""}}class g extends n.XFAObject{constructor(t){super(r,"wsdlConnection",!0),this.dataDescription=t.dataDescription||"",this.name=t.name||"",this.effectiveInputPolicy=null,this.effectiveOutputPolicy=null,this.operation=null,this.soapAction=null,this.soapAddress=null,this.wsdlAddress=null}}class m extends n.XFAObject{constructor(t){super(r,"xmlConnection",!0),this.dataDescription=t.dataDescription||"",this.name=t.name||"",this.uri=null}}class w extends n.XFAObject{constructor(t){super(r,"xsdConnection",!0),this.dataDescription=t.dataDescription||"",this.name=t.name||"",this.rootElement=null,this.uri=null}}class b{static[i.$buildXFAObject](t,e){if(b.hasOwnProperty(t))return b[t](e)}static connectionSet(t){return new o(t)}static effectiveInputPolicy(t){return new a(t)}static effectiveOutputPolicy(t){return new c(t)}static operation(t){return new h(t)}static rootElement(t){return new l(t)}static soapAction(t){return new u(t)}static soapAddress(t){return new f(t)}static uri(t){return new d(t)}static wsdlAddress(t){return new p(t)}static wsdlConnection(t){return new g(t)}static xmlConnection(t){return new m(t)}static xsdConnection(t){return new w(t)}}e.ConnectionSetNamespace=b},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DatasetsNamespace=void 0;var i=s(78),n=s(81),r=s(87);const o=n.NamespaceIds.datasets.id;class a extends r.XmlObject{constructor(t){super(o,"data",t)}[i.$isNsAgnostic](){return!0}}class c extends r.XFAObject{constructor(t){super(o,"datasets",!0),this.data=null,this.Signature=null}[i.$onChild](t){const e=t[i.$nodeName];("data"===e&&t[i.$namespaceId]===o||"Signature"===e&&t[i.$namespaceId]===n.NamespaceIds.signature.id)&&(this[e]=t),this[i.$appendChild](t)}}class h{static[n.$buildXFAObject](t,e){if(h.hasOwnProperty(t))return h[t](e)}static datasets(t){return new c(t)}static data(t){return new a(t)}}e.DatasetsNamespace=h},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LocaleSetNamespace=void 0;var i=s(81),n=s(87),r=s(84);const o=i.NamespaceIds.localeSet.id;class a extends n.XFAObject{constructor(t){super(o,"calendarSymbols",!0),this.name="gregorian",this.dayNames=new n.XFAObjectArray(2),this.eraNames=null,this.meridiemNames=null,this.monthNames=new n.XFAObjectArray(2)}}class c extends n.StringObject{constructor(t){super(o,"currencySymbol"),this.name=(0,r.getStringOption)(t.name,["symbol","isoname","decimal"])}}class h extends n.XFAObject{constructor(t){super(o,"currencySymbols",!0),this.currencySymbol=new n.XFAObjectArray(3)}}class l extends n.StringObject{constructor(t){super(o,"datePattern"),this.name=(0,r.getStringOption)(t.name,["full","long","med","short"])}}class u extends n.XFAObject{constructor(t){super(o,"datePatterns",!0),this.datePattern=new n.XFAObjectArray(4)}}class f extends n.ContentObject{constructor(t){super(o,"dateTimeSymbols")}}class d extends n.StringObject{constructor(t){super(o,"day")}}class p extends n.XFAObject{constructor(t){super(o,"dayNames",!0),this.abbr=(0,r.getInteger)({data:t.abbr,defaultValue:0,validate:t=>1===t}),this.day=new n.XFAObjectArray(7)}}class g extends n.StringObject{constructor(t){super(o,"era")}}class m extends n.XFAObject{constructor(t){super(o,"eraNames",!0),this.era=new n.XFAObjectArray(2)}}class w extends n.XFAObject{constructor(t){super(o,"locale",!0),this.desc=t.desc||"",this.name="isoname",this.calendarSymbols=null,this.currencySymbols=null,this.datePatterns=null,this.dateTimeSymbols=null,this.numberPatterns=null,this.numberSymbols=null,this.timePatterns=null,this.typeFaces=null}}class b extends n.XFAObject{constructor(t){super(o,"localeSet",!0),this.locale=new n.XFAObjectArray}}class y extends n.StringObject{constructor(t){super(o,"meridiem")}}class A extends n.XFAObject{constructor(t){super(o,"meridiemNames",!0),this.meridiem=new n.XFAObjectArray(2)}}class v extends n.StringObject{constructor(t){super(o,"month")}}class x extends n.XFAObject{constructor(t){super(o,"monthNames",!0),this.abbr=(0,r.getInteger)({data:t.abbr,defaultValue:0,validate:t=>1===t}),this.month=new n.XFAObjectArray(12)}}class k extends n.StringObject{constructor(t){super(o,"numberPattern"),this.name=(0,r.getStringOption)(t.name,["full","long","med","short"])}}class S extends n.XFAObject{constructor(t){super(o,"numberPatterns",!0),this.numberPattern=new n.XFAObjectArray(4)}}class M extends n.StringObject{constructor(t){super(o,"numberSymbol"),this.name=(0,r.getStringOption)(t.name,["decimal","grouping","percent","minus","zero"])}}class C extends n.XFAObject{constructor(t){super(o,"numberSymbols",!0),this.numberSymbol=new n.XFAObjectArray(5)}}class _ extends n.StringObject{constructor(t){super(o,"timePattern"),this.name=(0,r.getStringOption)(t.name,["full","long","med","short"])}}class I extends n.XFAObject{constructor(t){super(o,"timePatterns",!0),this.timePattern=new n.XFAObjectArray(4)}}class F extends n.XFAObject{constructor(t){super(o,"typeFace",!0),this.name=""|t.name}}class O extends n.XFAObject{constructor(t){super(o,"typeFaces",!0),this.typeFace=new n.XFAObjectArray}}class E{static[i.$buildXFAObject](t,e){if(E.hasOwnProperty(t))return E[t](e)}static calendarSymbols(t){return new a(t)}static currencySymbol(t){return new c(t)}static currencySymbols(t){return new h(t)}static datePattern(t){return new l(t)}static datePatterns(t){return new u(t)}static dateTimeSymbols(t){return new f(t)}static day(t){return new d(t)}static dayNames(t){return new p(t)}static era(t){return new g(t)}static eraNames(t){return new m(t)}static locale(t){return new w(t)}static localeSet(t){return new b(t)}static meridiem(t){return new y(t)}static meridiemNames(t){return new A(t)}static month(t){return new v(t)}static monthNames(t){return new x(t)}static numberPattern(t){return new k(t)}static numberPatterns(t){return new S(t)}static numberSymbol(t){return new M(t)}static numberSymbols(t){return new C(t)}static timePattern(t){return new _(t)}static timePatterns(t){return new I(t)}static typeFace(t){return new F(t)}static typeFaces(t){return new O(t)}}e.LocaleSetNamespace=E},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SignatureNamespace=void 0;var i=s(81),n=s(87);const r=i.NamespaceIds.signature.id;class o extends n.XFAObject{constructor(t){super(r,"signature",!0)}}class a{static[i.$buildXFAObject](t,e){if(a.hasOwnProperty(t))return a[t](e)}static signature(t){return new o(t)}}e.SignatureNamespace=a},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.StylesheetNamespace=void 0;var i=s(81),n=s(87);const r=i.NamespaceIds.stylesheet.id;class o extends n.XFAObject{constructor(t){super(r,"stylesheet",!0)}}class a{static[i.$buildXFAObject](t,e){if(a.hasOwnProperty(t))return a[t](e)}static stylesheet(t){return new o(t)}}e.StylesheetNamespace=a},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.XdpNamespace=void 0;var i=s(81),n=s(78),r=s(87);const o=i.NamespaceIds.xdp.id;class a extends r.XFAObject{constructor(t){super(o,"xdp",!0),this.uuid=t.uuid||"",this.timeStamp=t.timeStamp||"",this.config=null,this.connectionSet=null,this.datasets=null,this.localeSet=null,this.stylesheet=new r.XFAObjectArray,this.template=null}[n.$onChildCheck](t){const e=i.NamespaceIds[t[n.$nodeName]];return e&&t[n.$namespaceId]===e.id}}class c{static[i.$buildXFAObject](t,e){if(c.hasOwnProperty(t))return c[t](e)}static xdp(t){return new a(t)}}e.XdpNamespace=c},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.XhtmlNamespace=void 0;var i=s(78),n=s(81),r=s(83),o=s(84),a=s(87);const c=n.NamespaceIds.xhtml.id,h=Symbol(),l=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"]),u=new Map([["page-break-after","breakAfter"],["page-break-before","breakBefore"],["page-break-inside","breakInside"],["kerning-mode",t=>"none"===t?"none":"normal"],["xfa-font-horizontal-scale",t=>`scaleX(${Math.max(0,Math.min(parseInt(t)/100)).toFixed(2)})`],["xfa-font-vertical-scale",t=>`scaleY(${Math.max(0,Math.min(parseInt(t)/100)).toFixed(2)})`],["xfa-spacerun",""],["xfa-tab-stops",""],["font-size",(t,e)=>(t=e.fontSize=(0,o.getMeasurement)(t),(0,r.measureToString)(.99*t))],["letter-spacing",t=>(0,r.measureToString)((0,o.getMeasurement)(t))],["line-height",t=>(0,r.measureToString)((0,o.getMeasurement)(t))],["margin",t=>(0,r.measureToString)((0,o.getMeasurement)(t))],["margin-bottom",t=>(0,r.measureToString)((0,o.getMeasurement)(t))],["margin-left",t=>(0,r.measureToString)((0,o.getMeasurement)(t))],["margin-right",t=>(0,r.measureToString)((0,o.getMeasurement)(t))],["margin-top",t=>(0,r.measureToString)((0,o.getMeasurement)(t))],["text-indent",t=>(0,r.measureToString)((0,o.getMeasurement)(t))],["font-family",t=>t],["vertical-align",t=>(0,r.measureToString)((0,o.getMeasurement)(t))]]),f=/\s+/g,d=/[\r\n]+/g,p=/\r\n?/g;function g(t,e,s){const n=Object.create(null);if(!t)return n;const a=Object.create(null);for(const[e,s]of t.split(";").map((t=>t.split(":",2)))){const t=u.get(e);if(""===t)continue;let i=s;t&&(i="string"==typeof t?t:t(s,a)),e.endsWith("scale")?n.transform=n.transform?`${n[e]} ${i}`:i:n[e.replaceAll(/-([a-zA-Z])/g,((t,e)=>e.toUpperCase()))]=i}if(n.fontFamily&&(0,r.setFontFamily)({typeface:n.fontFamily,weight:n.fontWeight||"normal",posture:n.fontStyle||"normal",size:a.fontSize||0},e,e[i.$globalData].fontFinder,n),s&&n.verticalAlign&&"0px"!==n.verticalAlign&&n.fontSize){const t=.583,e=.333,s=(0,o.getMeasurement)(n.fontSize);n.fontSize=(0,r.measureToString)(s*t),n.verticalAlign=(0,r.measureToString)(Math.sign((0,o.getMeasurement)(n.verticalAlign))*s*e)}return s&&n.fontSize&&(n.fontSize=`calc(${n.fontSize} * var(--scale-factor))`),(0,r.fixTextIndent)(n),n}const m=new Set(["body","html"]);class w extends a.XmlObject{constructor(t,e){super(c,e),this[h]=!1,this.style=t.style||""}[i.$clean](t){var e;super[i.$clean](t),this.style=(e=this).style?e.style.trim().split(/\s*;\s*/).filter((t=>!!t)).map((t=>t.split(/\s*:\s*/,2))).filter((([t,s])=>("font-family"===t&&e[i.$globalData].usedTypefaces.add(s),l.has(t)))).map((t=>t.join(":"))).join(";"):""}[i.$acceptWhitespace](){return!m.has(this[i.$nodeName])}[i.$onText](t,e=!1){e?this[h]=!0:(t=t.replaceAll(d,""),this.style.includes("xfa-spacerun:yes")||(t=t.replaceAll(f," "))),t&&(this[i.$content]+=t)}[i.$pushGlyphs](t,e=!0){const s=Object.create(null),n={top:NaN,bottom:NaN,left:NaN,right:NaN};let r=null;for(const[t,e]of this.style.split(";").map((t=>t.split(":",2))))switch(t){case"font-family":s.typeface=(0,o.stripQuotes)(e);break;case"font-size":s.size=(0,o.getMeasurement)(e);break;case"font-weight":s.weight=e;break;case"font-style":s.posture=e;break;case"letter-spacing":s.letterSpacing=(0,o.getMeasurement)(e);break;case"margin":const t=e.split(/ \t/).map((t=>(0,o.getMeasurement)(t)));switch(t.length){case 1:n.top=n.bottom=n.left=n.right=t[0];break;case 2:n.top=n.bottom=t[0],n.left=n.right=t[1];break;case 3:n.top=t[0],n.bottom=t[2],n.left=n.right=t[1];break;case 4:n.top=t[0],n.left=t[1],n.bottom=t[2],n.right=t[3]}break;case"margin-top":n.top=(0,o.getMeasurement)(e);break;case"margin-bottom":n.bottom=(0,o.getMeasurement)(e);break;case"margin-left":n.left=(0,o.getMeasurement)(e);break;case"margin-right":n.right=(0,o.getMeasurement)(e);break;case"line-height":r=(0,o.getMeasurement)(e)}if(t.pushData(s,n,r),this[i.$content])t.addString(this[i.$content]);else for(const e of this[i.$getChildren]())"#text"!==e[i.$nodeName]?e[i.$pushGlyphs](t):t.addString(e[i.$content]);e&&t.popFont()}[i.$toHTML](t){const e=[];if(this[i.$extra]={children:e},this[i.$childrenToHTML]({}),0===e.length&&!this[i.$content])return o.HTMLResult.EMPTY;let s;return s=this[h]?this[i.$content]?this[i.$content].replaceAll(p,"\n"):void 0:this[i.$content]||void 0,o.HTMLResult.success({name:this[i.$nodeName],attributes:{href:this.href,style:g(this.style,this,this[h])},children:e,value:s})}}class b extends w{constructor(t){super(t,"a"),this.href=(0,r.fixURL)(t.href)||""}}class y extends w{constructor(t){super(t,"b")}[i.$pushGlyphs](t){t.pushFont({weight:"bold"}),super[i.$pushGlyphs](t),t.popFont()}}class A extends w{constructor(t){super(t,"body")}[i.$toHTML](t){const e=super[i.$toHTML](t),{html:s}=e;return s?(s.name="div",s.attributes.class=["xfaRich"],e):o.HTMLResult.EMPTY}}class v extends w{constructor(t){super(t,"br")}[i.$text](){return"\n"}[i.$pushGlyphs](t){t.addString("\n")}[i.$toHTML](t){return o.HTMLResult.success({name:"br"})}}class x extends w{constructor(t){super(t,"html")}[i.$toHTML](t){const e=[];if(this[i.$extra]={children:e},this[i.$childrenToHTML]({}),0===e.length)return o.HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:{}},value:this[i.$content]||""});if(1===e.length){const t=e[0];if(t.attributes?.class.includes("xfaRich"))return o.HTMLResult.success(t)}return o.HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:{}},children:e})}}class k extends w{constructor(t){super(t,"i")}[i.$pushGlyphs](t){t.pushFont({posture:"italic"}),super[i.$pushGlyphs](t),t.popFont()}}class S extends w{constructor(t){super(t,"li")}}class M extends w{constructor(t){super(t,"ol")}}class C extends w{constructor(t){super(t,"p")}[i.$pushGlyphs](t){super[i.$pushGlyphs](t,!1),t.addString("\n"),t.addPara(),t.popFont()}[i.$text](){return this[i.$getParent]()[i.$getChildren]().at(-1)===this?super[i.$text]():super[i.$text]()+"\n"}}class _ extends w{constructor(t){super(t,"span")}}class I extends w{constructor(t){super(t,"sub")}}class F extends w{constructor(t){super(t,"sup")}}class O extends w{constructor(t){super(t,"ul")}}class E{static[n.$buildXFAObject](t,e){if(E.hasOwnProperty(t))return E[t](e)}static a(t){return new b(t)}static b(t){return new y(t)}static body(t){return new A(t)}static br(t){return new v(t)}static html(t){return new x(t)}static i(t){return new k(t)}static li(t){return new S(t)}static ol(t){return new M(t)}static p(t){return new C(t)}static span(t){return new _(t)}static sub(t){return new I(t)}static sup(t){return new F(t)}static ul(t){return new O(t)}}e.XhtmlNamespace=E},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.UnknownNamespace=void 0;var i=s(81),n=s(87);e.UnknownNamespace=class{constructor(t){this.namespaceId=t}[i.$buildXFAObject](t,e){return new n.XmlObject(this.namespaceId,t,e)}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DatasetReader=void 0;var i=s(2),n=s(3),r=s(71);function o(t){try{return(0,i.stringToUTF8String)(t)}catch(e){return(0,i.warn)(`UTF-8 decoding failed: "${e}".`),t}}class a extends r.SimpleXMLParser{constructor(t){super(t),this.node=null}onEndElement(t){const e=super.onEndElement(t);if(e&&"xfa:datasets"===t)throw this.node=e,new Error("Aborting DatasetXMLParser.")}}e.DatasetReader=class{constructor(t){if(t.datasets)this.node=new r.SimpleXMLParser({hasAttributes:!0}).parseFromString(t.datasets).documentElement;else{const e=new a({hasAttributes:!0});try{e.parseFromString(t["xdp:xdp"])}catch{}this.node=e.node}}getValue(t){if(!this.node||!t)return"";const e=this.node.searchNode((0,n.parseXFAPath)(t),0);if(!e)return"";const s=e.firstChild;return"value"===s?.nodeName?e.children.map((t=>o(t.textContent))):o(e.textContent)}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.XRef=void 0;var i=s(2),n=s(4),r=s(16),o=s(3),a=s(5),c=s(74);e.XRef=class{#ln=null;constructor(t,e){this.stream=t,this.pdfManager=e,this.entries=[],this._xrefStms=new Set,this._cacheMap=new Map,this._pendingRefs=new n.RefSet,this._newPersistentRefNum=null,this._newTemporaryRefNum=null}getNewPersistentRef(t){null===this._newPersistentRefNum&&(this._newPersistentRefNum=this.entries.length||1);const e=this._newPersistentRefNum++;return this._cacheMap.set(e,t),n.Ref.get(e,0)}getNewTemporaryRef(){return null===this._newTemporaryRefNum&&(this._newTemporaryRefNum=this.entries.length||1),n.Ref.get(this._newTemporaryRefNum++,0)}resetNewTemporaryRef(){this._newTemporaryRefNum=null}setStartXRef(t){this.startXRefQueue=[t]}parse(t=!1){let e,s,r;t?((0,i.warn)("Indexing all PDF objects"),e=this.indexObjects()):e=this.readXRef(),e.assignXref(this),this.trailer=e;try{s=e.get("Encrypt")}catch(t){if(t instanceof o.MissingDataException)throw t;(0,i.warn)(`XRef.parse - Invalid "Encrypt" reference: "${t}".`)}if(s instanceof n.Dict){const t=e.get("ID"),i=t?.length?t[0]:"";s.suppressEncryption=!0,this.encrypt=new c.CipherTransformFactory(s,i,this.pdfManager.password)}try{r=e.get("Root")}catch(t){if(t instanceof o.MissingDataException)throw t;(0,i.warn)(`XRef.parse - Invalid "Root" reference: "${t}".`)}if(r instanceof n.Dict)try{if(r.get("Pages")instanceof n.Dict)return void(this.root=r)}catch(t){if(t instanceof o.MissingDataException)throw t;(0,i.warn)(`XRef.parse - Invalid "Pages" reference: "${t}".`)}if(!t)throw new o.XRefParseException;throw new i.InvalidPDFException("Invalid Root reference.")}processXRefTable(t){"tableState"in this||(this.tableState={entryNum:0,streamPos:t.lexer.stream.pos,parserBuf1:t.buf1,parserBuf2:t.buf2});const e=this.readXRefTable(t);if(!(0,n.isCmd)(e,"trailer"))throw new i.FormatError("Invalid XRef table: could not find trailer dictionary");let s=t.getObj();if(s instanceof n.Dict||!s.dict||(s=s.dict),!(s instanceof n.Dict))throw new i.FormatError("Invalid XRef table: could not parse trailer dictionary");return delete this.tableState,s}readXRefTable(t){const e=t.lexer.stream,s=this.tableState;let r;for(e.pos=s.streamPos,t.buf1=s.parserBuf1,t.buf2=s.parserBuf2;;){if(!("firstEntryNum"in s)||!("entryCount"in s)){if((0,n.isCmd)(r=t.getObj(),"trailer"))break;s.firstEntryNum=r,s.entryCount=t.getObj()}let o=s.firstEntryNum;const a=s.entryCount;if(!Number.isInteger(o)||!Number.isInteger(a))throw new i.FormatError("Invalid XRef table: wrong types in subsection header");for(let r=s.entryNum;r<a;r++){s.streamPos=e.pos,s.entryNum=r,s.parserBuf1=t.buf1,s.parserBuf2=t.buf2;const c={};c.offset=t.getObj(),c.gen=t.getObj();const h=t.getObj();if(h instanceof n.Cmd)switch(h.cmd){case"f":c.free=!0;break;case"n":c.uncompressed=!0}if(!Number.isInteger(c.offset)||!Number.isInteger(c.gen)||!c.free&&!c.uncompressed)throw new i.FormatError(`Invalid entry in XRef subsection: ${o}, ${a}`);0===r&&c.free&&1===o&&(o=0),this.entries[r+o]||(this.entries[r+o]=c)}s.entryNum=0,s.streamPos=e.pos,s.parserBuf1=t.buf1,s.parserBuf2=t.buf2,delete s.firstEntryNum,delete s.entryCount}if(this.entries[0]&&!this.entries[0].free)throw new i.FormatError("Invalid XRef table: unexpected first object");return r}processXRefStream(t){if(!("streamState"in this)){const e=t.dict,s=e.get("W");let i=e.get("Index");i||(i=[0,e.get("Size")]),this.streamState={entryRanges:i,byteWidths:s,entryNum:0,streamPos:t.pos}}return this.readXRefStream(t),delete this.streamState,t.dict}readXRefStream(t){const e=this.streamState;t.pos=e.streamPos;const[s,n,r]=e.byteWidths,o=e.entryRanges;for(;o.length>0;){const[a,c]=o;if(!Number.isInteger(a)||!Number.isInteger(c))throw new i.FormatError(`Invalid XRef range fields: ${a}, ${c}`);if(!Number.isInteger(s)||!Number.isInteger(n)||!Number.isInteger(r))throw new i.FormatError(`Invalid XRef entry fields length: ${a}, ${c}`);for(let o=e.entryNum;o<c;++o){e.entryNum=o,e.streamPos=t.pos;let c=0,h=0,l=0;for(let e=0;e<s;++e){const e=t.getByte();if(-1===e)throw new i.FormatError("Invalid XRef byteWidths 'type'.");c=c<<8|e}0===s&&(c=1);for(let e=0;e<n;++e){const e=t.getByte();if(-1===e)throw new i.FormatError("Invalid XRef byteWidths 'offset'.");h=h<<8|e}for(let e=0;e<r;++e){const e=t.getByte();if(-1===e)throw new i.FormatError("Invalid XRef byteWidths 'generation'.");l=l<<8|e}const u={};switch(u.offset=h,u.gen=l,c){case 0:u.free=!0;break;case 1:u.uncompressed=!0;break;case 2:break;default:throw new i.FormatError(`Invalid XRef entry type: ${c}`)}this.entries[a+o]||(this.entries[a+o]=u)}e.entryNum=0,e.streamPos=t.pos,o.splice(0,2)}}indexObjects(){function t(t,e){let s="",i=t[e];for(;10!==i&&13!==i&&60!==i&&!(++e>=t.length);)s+=String.fromCharCode(i),i=t[e];return s}function e(t,e,s){const i=s.length,n=t.length;let r=0;for(;e<n;){let n=0;for(;n<i&&t[e+n]===s[n];)++n;if(n>=i)break;e++,r++}return r}const s=/\b(endobj|\d+\s+\d+\s+obj|xref|trailer\s*<<)\b/g,a=/\b(startxref|\d+\s+\d+\s+obj)\b/g,c=/^(\d+)\s+(\d+)\s+obj\b/,h=new Uint8Array([116,114,97,105,108,101,114]),l=new Uint8Array([115,116,97,114,116,120,114,101,102]),u=new Uint8Array([47,88,82,101,102]);this.entries.length=0,this._cacheMap.clear();const f=this.stream;f.pos=0;const d=f.getBytes(),p=(0,i.bytesToString)(d),g=d.length;let m=f.start;const w=[],b=[];for(;m<g;){let n=d[m];if(9===n||10===n||13===n||32===n){++m;continue}if(37===n){do{if(++m,m>=g)break;n=d[m]}while(10!==n&&13!==n);continue}const y=t(d,m);let A;if(y.startsWith("xref")&&(4===y.length||/\s/.test(y[4])))m+=e(d,m,h),w.push(m),m+=e(d,m,l);else if(A=c.exec(y)){const t=0|A[1],n=0|A[2],a=m+y.length;let c,h=!1;if(this.entries[t]){if(this.entries[t].gen===n)try{new r.Parser({lexer:new r.Lexer(f.makeSubStream(a))}).getObj(),h=!0}catch(t){t instanceof o.ParserEOFException?(0,i.warn)(`indexObjects -- checking object (${y}): "${t}".`):h=!0}}else h=!0;h&&(this.entries[t]={offset:m-f.start,gen:n,uncompressed:!0}),s.lastIndex=a;const l=s.exec(p);l?(c=s.lastIndex+1-m,"endobj"!==l[1]&&((0,i.warn)(`indexObjects: Found "${l[1]}" inside of another "obj", caused by missing "endobj" -- trying to recover.`),c-=l[1].length+1)):c=g-m;const w=d.subarray(m,m+c),v=e(w,0,u);v<c&&w[v+5]<64&&(b.push(m-f.start),this._xrefStms.add(m-f.start)),m+=c}else if(y.startsWith("trailer")&&(7===y.length||/\s/.test(y[7]))){let t;w.push(m),a.lastIndex=m+y.length;const e=a.exec(p);e?(t=a.lastIndex+1-m,"startxref"!==e[1]&&((0,i.warn)(`indexObjects: Found "${e[1]}" after "trailer", caused by missing "startxref" -- trying to recover.`),t-=e[1].length+1)):t=g-m,m+=t}else m+=y.length+1}for(const t of b)this.startXRefQueue.push(t),this.readXRef(!0);const y=[];let A,v,x=!1;for(const t of w){f.pos=t;const e=new r.Parser({lexer:new r.Lexer(f),xref:this,allowStreams:!0,recoveryMode:!0}),s=e.getObj();if(!(0,n.isCmd)(s,"trailer"))continue;const i=e.getObj();i instanceof n.Dict&&(y.push(i),i.has("Encrypt")&&(x=!0))}for(const t of[...y,"genFallback",...y]){if("genFallback"===t){if(!v)break;this._generationFallback=!0;continue}let e=!1;try{const s=t.get("Root");if(!(s instanceof n.Dict))continue;const i=s.get("Pages");if(!(i instanceof n.Dict))continue;const r=i.get("Count");Number.isInteger(r)&&(e=!0)}catch(t){v=t;continue}if(e&&(!x||t.has("Encrypt"))&&t.has("ID"))return t;A=t}if(A)return A;if(this.topDict)return this.topDict;throw new i.InvalidPDFException("Invalid PDF structure.")}readXRef(t=!1){const e=this.stream,s=new Set;for(;this.startXRefQueue.length;){try{const t=this.startXRefQueue[0];if(s.has(t)){(0,i.warn)("readXRef - skipping XRef table since it was already parsed."),this.startXRefQueue.shift();continue}s.add(t),e.pos=t+e.start;const o=new r.Parser({lexer:new r.Lexer(e),xref:this,allowStreams:!0});let c,h=o.getObj();if((0,n.isCmd)(h,"xref"))c=this.processXRefTable(o),this.topDict||(this.topDict=c),h=c.get("XRefStm"),Number.isInteger(h)&&!this._xrefStms.has(h)&&(this._xrefStms.add(h),this.startXRefQueue.push(h),this.#ln??=h);else{if(!Number.isInteger(h))throw new i.FormatError("Invalid XRef stream header");if(!(Number.isInteger(o.getObj())&&(0,n.isCmd)(o.getObj(),"obj")&&(h=o.getObj())instanceof a.BaseStream))throw new i.FormatError("Invalid XRef stream");if(c=this.processXRefStream(h),this.topDict||(this.topDict=c),!c)throw new i.FormatError("Failed to read XRef stream")}h=c.get("Prev"),Number.isInteger(h)?this.startXRefQueue.push(h):h instanceof n.Ref&&this.startXRefQueue.push(h.num)}catch(t){if(t instanceof o.MissingDataException)throw t;(0,i.info)("(while reading XRef): "+t)}this.startXRefQueue.shift()}if(this.topDict)return this.topDict;if(!t)throw new o.XRefParseException}get lastXRefStreamPos(){return this.#ln??(this._xrefStms.size>0?Math.max(...this._xrefStms):null)}getEntry(t){const e=this.entries[t];return e&&!e.free&&e.offset?e:null}fetchIfRef(t,e=!1){return t instanceof n.Ref?this.fetch(t,e):t}fetch(t,e=!1){if(!(t instanceof n.Ref))throw new Error("ref object is not a reference");const s=t.num,r=this._cacheMap.get(s);if(void 0!==r)return r instanceof n.Dict&&!r.objId&&(r.objId=t.toString()),r;let o=this.getEntry(s);if(null===o)return this._cacheMap.set(s,o),o;if(this._pendingRefs.has(t))return this._pendingRefs.remove(t),(0,i.warn)(`Ignoring circular reference: ${t}.`),n.CIRCULAR_REF;this._pendingRefs.put(t);try{o=o.uncompressed?this.fetchUncompressed(t,o,e):this.fetchCompressed(t,o,e),this._pendingRefs.remove(t)}catch(e){throw this._pendingRefs.remove(t),e}return o instanceof n.Dict?o.objId=t.toString():o instanceof a.BaseStream&&(o.dict.objId=t.toString()),o}fetchUncompressed(t,e,s=!1){const c=t.gen;let h=t.num;if(e.gen!==c){const r=`Inconsistent generation in XRef: ${t}`;if(this._generationFallback&&e.gen<c)return(0,i.warn)(r),this.fetchUncompressed(n.Ref.get(h,e.gen),e,s);throw new o.XRefEntryException(r)}const l=this.stream.makeSubStream(e.offset+this.stream.start),u=new r.Parser({lexer:new r.Lexer(l),xref:this,allowStreams:!0}),f=u.getObj(),d=u.getObj(),p=u.getObj();if(f!==h||d!==c||!(p instanceof n.Cmd))throw new o.XRefEntryException(`Bad (uncompressed) XRef entry: ${t}`);if("obj"!==p.cmd){if(p.cmd.startsWith("obj")&&(h=parseInt(p.cmd.substring(3),10),!Number.isNaN(h)))return h;throw new o.XRefEntryException(`Bad (uncompressed) XRef entry: ${t}`)}return(e=this.encrypt&&!s?u.getObj(this.encrypt.createCipherTransform(h,c)):u.getObj())instanceof a.BaseStream||this._cacheMap.set(h,e),e}fetchCompressed(t,e,s=!1){const c=e.offset,h=this.fetch(n.Ref.get(c,0));if(!(h instanceof a.BaseStream))throw new i.FormatError("bad ObjStm stream");const l=h.dict.get("First"),u=h.dict.get("N");if(!Number.isInteger(l)||!Number.isInteger(u))throw new i.FormatError("invalid first and n parameters for ObjStm stream");let f=new r.Parser({lexer:new r.Lexer(h),xref:this,allowStreams:!0});const d=new Array(u),p=new Array(u);for(let t=0;t<u;++t){const e=f.getObj();if(!Number.isInteger(e))throw new i.FormatError(`invalid object number in the ObjStm stream: ${e}`);const s=f.getObj();if(!Number.isInteger(s))throw new i.FormatError(`invalid object offset in the ObjStm stream: ${s}`);d[t]=e,p[t]=s}const g=(h.start||0)+l,m=new Array(u);for(let t=0;t<u;++t){const e=t<u-1?p[t+1]-p[t]:void 0;if(e<0)throw new i.FormatError("Invalid offset in the ObjStm stream.");f=new r.Parser({lexer:new r.Lexer(h.makeSubStream(g+p[t],e,h.dict)),xref:this,allowStreams:!0});const s=f.getObj();if(m[t]=s,s instanceof a.BaseStream)continue;const n=d[t],o=this.entries[n];o&&o.offset===c&&o.gen===t&&this._cacheMap.set(n,s)}if(void 0===(e=m[e.gen]))throw new o.XRefEntryException(`Bad (compressed) XRef entry: ${t}`);return e}async fetchIfRefAsync(t,e){return t instanceof n.Ref?this.fetchAsync(t,e):t}async fetchAsync(t,e){try{return this.fetch(t,e)}catch(s){if(!(s instanceof o.MissingDataException))throw s;return await this.pdfManager.requestRange(s.begin,s.end),this.fetchAsync(t,e)}}getCatalogObj(){return this.root}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MessageHandler=void 0;var i=s(2);function n(t){switch(t instanceof Error||"object"==typeof t&&null!==t||(0,i.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),t.name){case"AbortException":return new i.AbortException(t.message);case"MissingPDFException":return new i.MissingPDFException(t.message);case"PasswordException":return new i.PasswordException(t.message,t.code);case"UnexpectedResponseException":return new i.UnexpectedResponseException(t.message,t.status);case"UnknownErrorException":return new i.UnknownErrorException(t.message,t.details);default:return new i.UnknownErrorException(t.message,t.toString())}}e.MessageHandler=class{constructor(t,e,s){this.sourceName=t,this.targetName=e,this.comObj=s,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=t=>{const e=t.data;if(e.targetName!==this.sourceName)return;if(e.stream)return void this.#ue(e);if(e.callback){const t=e.callbackId,s=this.callbackCapabilities[t];if(!s)throw new Error(`Cannot resolve callback ${t}`);if(delete this.callbackCapabilities[t],1===e.callback)s.resolve(e.data);else{if(2!==e.callback)throw new Error("Unexpected callback case");s.reject(n(e.reason))}return}const i=this.actionHandler[e.action];if(!i)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){const t=this.sourceName,r=e.sourceName;new Promise((function(t){t(i(e.data))})).then((function(i){s.postMessage({sourceName:t,targetName:r,callback:1,callbackId:e.callbackId,data:i})}),(function(i){s.postMessage({sourceName:t,targetName:r,callback:2,callbackId:e.callbackId,reason:n(i)})}))}else e.streamId?this.#fe(e):i(e.data)},s.addEventListener("message",this._onComObjOnMessage)}on(t,e){const s=this.actionHandler;if(s[t])throw new Error(`There is already an actionName called "${t}"`);s[t]=e}send(t,e,s){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},s)}sendWithPromise(t,e,s){const n=this.callbackId++,r=new i.PromiseCapability;this.callbackCapabilities[n]=r;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:n,data:e},s)}catch(t){r.reject(t)}return r.promise}sendWithStream(t,e,s,r){const o=this.streamId++,a=this.sourceName,c=this.targetName,h=this.comObj;return new ReadableStream({start:s=>{const n=new i.PromiseCapability;return this.streamControllers[o]={controller:s,startCall:n,pullCall:null,cancelCall:null,isClosed:!1},h.postMessage({sourceName:a,targetName:c,action:t,streamId:o,data:e,desiredSize:s.desiredSize},r),n.promise},pull:t=>{const e=new i.PromiseCapability;return this.streamControllers[o].pullCall=e,h.postMessage({sourceName:a,targetName:c,stream:6,streamId:o,desiredSize:t.desiredSize}),e.promise},cancel:t=>{(0,i.assert)(t instanceof Error,"cancel must have a valid reason");const e=new i.PromiseCapability;return this.streamControllers[o].cancelCall=e,this.streamControllers[o].isClosed=!0,h.postMessage({sourceName:a,targetName:c,stream:1,streamId:o,reason:n(t)}),e.promise}},s)}#fe(t){const e=t.streamId,s=this.sourceName,r=t.sourceName,o=this.comObj,a=this,c=this.actionHandler[t.action],h={enqueue(t,n=1,a){if(this.isCancelled)return;const c=this.desiredSize;this.desiredSize-=n,c>0&&this.desiredSize<=0&&(this.sinkCapability=new i.PromiseCapability,this.ready=this.sinkCapability.promise),o.postMessage({sourceName:s,targetName:r,stream:4,streamId:e,chunk:t},a)},close(){this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:s,targetName:r,stream:3,streamId:e}),delete a.streamSinks[e])},error(t){(0,i.assert)(t instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:s,targetName:r,stream:5,streamId:e,reason:n(t)}))},sinkCapability:new i.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};h.sinkCapability.resolve(),h.ready=h.sinkCapability.promise,this.streamSinks[e]=h,new Promise((function(e){e(c(t.data,h))})).then((function(){o.postMessage({sourceName:s,targetName:r,stream:8,streamId:e,success:!0})}),(function(t){o.postMessage({sourceName:s,targetName:r,stream:8,streamId:e,reason:n(t)})}))}#ue(t){const e=t.streamId,s=this.sourceName,r=t.sourceName,o=this.comObj,a=this.streamControllers[e],c=this.streamSinks[e];switch(t.stream){case 8:t.success?a.startCall.resolve():a.startCall.reject(n(t.reason));break;case 7:t.success?a.pullCall.resolve():a.pullCall.reject(n(t.reason));break;case 6:if(!c){o.postMessage({sourceName:s,targetName:r,stream:7,streamId:e,success:!0});break}c.desiredSize<=0&&t.desiredSize>0&&c.sinkCapability.resolve(),c.desiredSize=t.desiredSize,new Promise((function(t){t(c.onPull?.())})).then((function(){o.postMessage({sourceName:s,targetName:r,stream:7,streamId:e,success:!0})}),(function(t){o.postMessage({sourceName:s,targetName:r,stream:7,streamId:e,reason:n(t)})}));break;case 4:if((0,i.assert)(a,"enqueue should have stream controller"),a.isClosed)break;a.controller.enqueue(t.chunk);break;case 3:if((0,i.assert)(a,"close should have stream controller"),a.isClosed)break;a.isClosed=!0,a.controller.close(),this.#de(a,e);break;case 5:(0,i.assert)(a,"error should have stream controller"),a.controller.error(n(t.reason)),this.#de(a,e);break;case 2:t.success?a.cancelCall.resolve():a.cancelCall.reject(n(t.reason)),this.#de(a,e);break;case 1:if(!c)break;new Promise((function(e){e(c.onCancel?.(n(t.reason)))})).then((function(){o.postMessage({sourceName:s,targetName:r,stream:2,streamId:e,success:!0})}),(function(t){o.postMessage({sourceName:s,targetName:r,stream:2,streamId:e,reason:n(t)})})),c.sinkCapability.reject(n(t.reason)),c.isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}}async#de(t,e){await Promise.allSettled([t.startCall?.promise,t.pullCall?.promise,t.cancelCall?.promise]),delete this.streamControllers[e]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(t,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PDFWorkerStream=void 0;var i=s(2);e.PDFWorkerStream=class{constructor(t){this._msgHandler=t,this._contentLength=null,this._fullRequestReader=null,this._rangeRequestReaders=[]}getFullReader(){return(0,i.assert)(!this._fullRequestReader,"PDFWorkerStream.getFullReader can only be called once."),this._fullRequestReader=new n(this._msgHandler),this._fullRequestReader}getRangeReader(t,e){const s=new r(t,e,this._msgHandler);return this._rangeRequestReaders.push(s),s}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeRequestReaders.slice(0))e.cancel(t)}};class n{constructor(t){this._msgHandler=t,this.onProgress=null,this._contentLength=null,this._isRangeSupported=!1,this._isStreamingSupported=!1;const e=this._msgHandler.sendWithStream("GetReader");this._reader=e.getReader(),this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then((t=>{this._isStreamingSupported=t.isStreamingSupported,this._isRangeSupported=t.isRangeSupported,this._contentLength=t.contentLength}))}get headersReady(){return this._headersReady}get contentLength(){return this._contentLength}get isStreamingSupported(){return this._isStreamingSupported}get isRangeSupported(){return this._isRangeSupported}async read(){const{value:t,done:e}=await this._reader.read();return e?{value:void 0,done:!0}:{value:t.buffer,done:!1}}cancel(t){this._reader.cancel(t)}}class r{constructor(t,e,s){this._msgHandler=s,this.onProgress=null;const i=this._msgHandler.sendWithStream("GetRangeReader",{begin:t,end:e});this._reader=i.getReader()}get isStreamingSupported(){return!1}async read(){const{value:t,done:e}=await this._reader.read();return e?{value:void 0,done:!0}:{value:t.buffer,done:!1}}cancel(t){this._reader.cancel(t)}}}],e={};function s(i){var n=e[i];if(void 0!==n)return n.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,s),r.exports}var i={};return(()=>{var t=i;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"WorkerMessageHandler",{enumerable:!0,get:function(){return e.WorkerMessageHandler}});var e=s(1)})(),i})(),pdf_worker$1.exports=root.pdfjsWorker=factory();const pdf_worker=getDefaultExportFromCjs(pdf_worker$1.exports),pdfjsWorker=Object.freeze(Object.assign(Object.create(null),pdf_worker$1.exports,{default:pdf_worker})),kupPdfCss=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_pdf_height:var(--kup-pdf-height, 100%);--kup_pdf_width:var(--kup-pdf-width, 100%);height:var(--kup_pdf_height);width:var(--kup_pdf_width);display:block}#kup-component{height:var(--kup_pdf_height);width:var(--kup_pdf_width);overflow:auto}#kup-component::-webkit-scrollbar{width:1.1rem;height:1.1rem}#kup-component::-webkit-scrollbar-corner{background:transparent}#kup-component::-webkit-scrollbar-thumb{border:6px solid transparent;background:rgba(0, 0, 0, 0.2);background:var(--palette-black-alpha-20, rgba(0, 0, 0, 0.2));border-radius:10px;background-clip:padding-box}#kup-component::-webkit-scrollbar-thumb:hover{border:4px solid transparent;background:rgba(0, 0, 0, 0.3);background:var(--palette-black-alpha-30, rgba(0, 0, 0, 0.3));background-clip:padding-box}",KupPdfStyle0=kupPdfCss;var __classPrivateFieldGet=function(t,e,s,i){if("a"===s&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?i:"a"===s?i.call(t):i?i.value:e.get(t)},_KupPdf_kupManager;const KupPdf=class{constructor(t){registerInstance(this,t),this.kupReady=createEvent(this,"kup-pdf-ready",6),_KupPdf_kupManager.set(this,kupManagerInstance()),this.pdfPath=void 0,this.sendCredentials=void 0}onPdfPathChange(){this.wrapperRef.innerHTML="",this.renderPdf()}async getProps(t){return getProps(this,KupPdfProps,t)}async refresh(){forceUpdate(this)}async setProps(t){setProps(this,KupPdfProps,t)}componentWillLoad(){__classPrivateFieldGet(this,_KupPdf_kupManager,"f").debug.logLoad(this,!1),__classPrivateFieldGet(this,_KupPdf_kupManager,"f").theme.register(this)}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id}),pdf.exports.GlobalWorkerOptions.workerSrc=pdfjsWorker,this.renderPdf().then((()=>{__classPrivateFieldGet(this,_KupPdf_kupManager,"f").debug.logLoad(this,!0)}))}componentWillRender(){__classPrivateFieldGet(this,_KupPdf_kupManager,"f").debug.logRender(this,!1)}componentDidRender(){__classPrivateFieldGet(this,_KupPdf_kupManager,"f").debug.logRender(this,!0)}async renderPdf(){try{const t=pdf.exports.getDocument({url:this.pdfPath,withCredentials:this.sendCredentials}),e=await t.promise,s=this.wrapperRef;for(let t=1;t<=e.numPages;t++){const i=document.createElement("canvas");s.appendChild(i),e.getPage(t).then((function(t){const e=t.getViewport({scale:2});i.height=2*e.height,i.width=2*e.width,i.style.width="100%",t.render({canvasContext:i.getContext("2d"),viewport:e,transform:[2,0,0,2,0,0]})}))}}catch(t){}}render(){return h(Host,{key:"820aee214400dc43c373a270f70e43c609390a6c"},h("div",{key:"f71a13853b9bef608ea84e7e270f0d6db3bc03dc",id:componentWrapperId,ref:t=>this.wrapperRef=t}))}disconnectedCallback(){__classPrivateFieldGet(this,_KupPdf_kupManager,"f").theme.unregister(this)}get rootElement(){return getElement(this)}static get watchers(){return{pdfPath:["onPdfPathChange"]}}};_KupPdf_kupManager=new WeakMap,KupPdf.style=KupPdfStyle0;export{KupPdf as kup_pdf}