@itfin/components 1.0.6 → 1.0.10

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 (1242) hide show
  1. package/package.json +3 -1
  2. package/src/assets/loading.css +49 -0
  3. package/src/assets/scss/components/_selected.scss +4 -0
  4. package/src/assets/scss/components/_states.scss +2 -1
  5. package/src/components/app/App.vue +1 -1
  6. package/src/components/button/Button.vue +2 -1
  7. package/src/components/datepicker/DateRangePicker.vue +1 -1
  8. package/src/components/form/Label.vue +2 -0
  9. package/src/components/icon/Icon.vue +8 -3
  10. package/src/components/icon/components/airplay.vue +1 -0
  11. package/src/components/icon/components/alarm_clock.vue +1 -0
  12. package/src/components/icon/components/align_horizontal.vue +1 -0
  13. package/src/components/icon/components/align_vertical.vue +1 -0
  14. package/src/components/icon/components/angle.vue +1 -0
  15. package/src/components/icon/components/archive.vue +1 -0
  16. package/src/components/icon/components/arrow_bottom_left.vue +1 -0
  17. package/src/components/icon/components/arrow_bottom_right.vue +1 -0
  18. package/src/components/icon/components/arrow_down.vue +1 -0
  19. package/src/components/icon/components/arrow_down_circle.vue +1 -0
  20. package/src/components/icon/components/arrow_left.vue +1 -0
  21. package/src/components/icon/components/arrow_left_circle.vue +1 -0
  22. package/src/components/icon/components/arrow_right.vue +1 -0
  23. package/src/components/icon/components/arrow_right_circle.vue +1 -0
  24. package/src/components/icon/components/arrow_top_left.vue +1 -0
  25. package/src/components/icon/components/arrow_top_right.vue +1 -0
  26. package/src/components/icon/components/arrow_up.vue +1 -0
  27. package/src/components/icon/components/arrow_up_circle.vue +1 -0
  28. package/src/components/icon/components/audio_wave.vue +1 -0
  29. package/src/components/icon/components/backspace.vue +1 -0
  30. package/src/components/icon/components/backward.vue +1 -0
  31. package/src/components/icon/components/bag.vue +1 -0
  32. package/src/components/icon/components/battery_75.vue +1 -0
  33. package/src/components/icon/components/battery_charging.vue +1 -0
  34. package/src/components/icon/components/battery_empty.vue +1 -0
  35. package/src/components/icon/components/battery_full.vue +1 -0
  36. package/src/components/icon/components/battery_half.vue +1 -0
  37. package/src/components/icon/components/battery_low.vue +1 -0
  38. package/src/components/icon/components/bell.vue +1 -0
  39. package/src/components/icon/components/bell_disabled.vue +1 -0
  40. package/src/components/icon/components/bell_ringing.vue +1 -0
  41. package/src/components/icon/components/bell_snooze.vue +1 -0
  42. package/src/components/icon/components/bluetooth.vue +1 -0
  43. package/src/components/icon/components/book.vue +1 -0
  44. package/src/components/icon/components/book_closed.vue +1 -0
  45. package/src/components/icon/components/book_text.vue +1 -0
  46. package/src/components/icon/components/bookmark.vue +1 -0
  47. package/src/components/icon/components/bookmark_book.vue +1 -0
  48. package/src/components/icon/components/box.vue +1 -0
  49. package/src/components/icon/components/box_download.vue +1 -0
  50. package/src/components/icon/components/box_open.vue +1 -0
  51. package/src/components/icon/components/branch.vue +1 -0
  52. package/src/components/icon/components/briefcase.vue +1 -0
  53. package/src/components/icon/components/browser.vue +1 -0
  54. package/src/components/icon/components/browser_alt.vue +1 -0
  55. package/src/components/icon/components/button_add.vue +1 -0
  56. package/src/components/icon/components/button_minus.vue +1 -0
  57. package/src/components/icon/components/calculator.vue +1 -0
  58. package/src/components/icon/components/calendar.vue +1 -0
  59. package/src/components/icon/components/calendar_add.vue +1 -0
  60. package/src/components/icon/components/calendar_date.vue +1 -0
  61. package/src/components/icon/components/calendar_day.vue +1 -0
  62. package/src/components/icon/components/calendar_days.vue +1 -0
  63. package/src/components/icon/components/calendar_last_day.vue +1 -0
  64. package/src/components/icon/components/calendar_month.vue +1 -0
  65. package/src/components/icon/components/calendar_move.vue +1 -0
  66. package/src/components/icon/components/calendar_remove.vue +1 -0
  67. package/src/components/icon/components/calendar_split.vue +1 -0
  68. package/src/components/icon/components/calendar_week.vue +1 -0
  69. package/src/components/icon/components/camera.vue +1 -0
  70. package/src/components/icon/components/camera_alt.vue +1 -0
  71. package/src/components/icon/components/camera_noflash.vue +1 -0
  72. package/src/components/icon/components/camera_noflash_alt.vue +1 -0
  73. package/src/components/icon/components/capture.vue +1 -0
  74. package/src/components/icon/components/card_timeline.vue +1 -0
  75. package/src/components/icon/components/card_view.vue +1 -0
  76. package/src/components/icon/components/carousel.vue +1 -0
  77. package/src/components/icon/components/cart.vue +1 -0
  78. package/src/components/icon/components/cast.vue +1 -0
  79. package/src/components/icon/components/chain.vue +1 -0
  80. package/src/components/icon/components/chat_add.vue +1 -0
  81. package/src/components/icon/components/check.vue +1 -0
  82. package/src/components/icon/components/check_circle.vue +1 -0
  83. package/src/components/icon/components/check_circle_outside.vue +1 -0
  84. package/src/components/icon/components/checkbox_checked.vue +1 -0
  85. package/src/components/icon/components/checkbox_empty.vue +1 -0
  86. package/src/components/icon/components/chevron_close.vue +1 -0
  87. package/src/components/icon/components/chevron_down.vue +1 -0
  88. package/src/components/icon/components/chevron_down_circle.vue +1 -0
  89. package/src/components/icon/components/chevron_down_double.vue +1 -0
  90. package/src/components/icon/components/chevron_left.vue +1 -0
  91. package/src/components/icon/components/chevron_left_circle.vue +1 -0
  92. package/src/components/icon/components/chevron_left_double.vue +1 -0
  93. package/src/components/icon/components/chevron_open.vue +1 -0
  94. package/src/components/icon/components/chevron_right.vue +1 -0
  95. package/src/components/icon/components/chevron_right_circle.vue +1 -0
  96. package/src/components/icon/components/chevron_right_double.vue +1 -0
  97. package/src/components/icon/components/chevron_up.vue +1 -0
  98. package/src/components/icon/components/chevron_up_circle.vue +1 -0
  99. package/src/components/icon/components/chevron_up_double.vue +1 -0
  100. package/src/components/icon/components/circle.vue +1 -0
  101. package/src/components/icon/components/circle_menu.vue +1 -0
  102. package/src/components/icon/components/circle_split.vue +1 -0
  103. package/src/components/icon/components/clipboard.vue +1 -0
  104. package/src/components/icon/components/clipboard_add.vue +1 -0
  105. package/src/components/icon/components/clipboard_check.vue +1 -0
  106. package/src/components/icon/components/clipboard_copy.vue +1 -0
  107. package/src/components/icon/components/clipboard_cross.vue +1 -0
  108. package/src/components/icon/components/clipboard_notes.vue +1 -0
  109. package/src/components/icon/components/clipboard_remove.vue +1 -0
  110. package/src/components/icon/components/clock.vue +1 -0
  111. package/src/components/icon/components/close.vue +1 -0
  112. package/src/components/icon/components/cloud.vue +1 -0
  113. package/src/components/icon/components/cloud_disconnect.vue +1 -0
  114. package/src/components/icon/components/cloud_download.vue +1 -0
  115. package/src/components/icon/components/cloud_download_alt.vue +1 -0
  116. package/src/components/icon/components/cloud_upload.vue +1 -0
  117. package/src/components/icon/components/cloud_upload_alt.vue +1 -0
  118. package/src/components/icon/components/code.vue +1 -0
  119. package/src/components/icon/components/coffee.vue +1 -0
  120. package/src/components/icon/components/coin.vue +1 -0
  121. package/src/components/icon/components/coins.vue +1 -0
  122. package/src/components/icon/components/compass.vue +1 -0
  123. package/src/components/icon/components/component_add.vue +1 -0
  124. package/src/components/icon/components/contacts.vue +1 -0
  125. package/src/components/icon/components/contract.vue +1 -0
  126. package/src/components/icon/components/create.vue +1 -0
  127. package/src/components/icon/components/credit_card.vue +1 -0
  128. package/src/components/icon/components/crop.vue +1 -0
  129. package/src/components/icon/components/cross.vue +1 -0
  130. package/src/components/icon/components/cross_circle.vue +1 -0
  131. package/src/components/icon/components/crosshair.vue +1 -0
  132. package/src/components/icon/components/cube.vue +1 -0
  133. package/src/components/icon/components/cylinder.vue +1 -0
  134. package/src/components/icon/components/database.vue +1 -0
  135. package/src/components/icon/components/diamond.vue +1 -0
  136. package/src/components/icon/components/directions.vue +1 -0
  137. package/src/components/icon/components/disc.vue +1 -0
  138. package/src/components/icon/components/display.vue +1 -0
  139. package/src/components/icon/components/display_alt.vue +1 -0
  140. package/src/components/icon/components/document.vue +1 -0
  141. package/src/components/icon/components/document_justified.vue +1 -0
  142. package/src/components/icon/components/document_list.vue +1 -0
  143. package/src/components/icon/components/document_stack.vue +1 -0
  144. package/src/components/icon/components/document_words.vue +1 -0
  145. package/src/components/icon/components/door.vue +1 -0
  146. package/src/components/icon/components/door_alt.vue +1 -0
  147. package/src/components/icon/components/download.vue +1 -0
  148. package/src/components/icon/components/download_alt.vue +1 -0
  149. package/src/components/icon/components/downward.vue +1 -0
  150. package/src/components/icon/components/drag.vue +1 -0
  151. package/src/components/icon/components/drag_circle.vue +1 -0
  152. package/src/components/icon/components/drag_vertical.vue +1 -0
  153. package/src/components/icon/components/duplicate.vue +1 -0
  154. package/src/components/icon/components/duplicate_alt.vue +1 -0
  155. package/src/components/icon/components/enter.vue +1 -0
  156. package/src/components/icon/components/enter_alt.vue +1 -0
  157. package/src/components/icon/components/episodes.vue +1 -0
  158. package/src/components/icon/components/exit_left.vue +1 -0
  159. package/src/components/icon/components/exit_right.vue +1 -0
  160. package/src/components/icon/components/expand.vue +1 -0
  161. package/src/components/icon/components/expand_height.vue +1 -0
  162. package/src/components/icon/components/expand_width.vue +1 -0
  163. package/src/components/icon/components/external.vue +1 -0
  164. package/src/components/icon/components/eye.vue +1 -0
  165. package/src/components/icon/components/eye_closed.vue +1 -0
  166. package/src/components/icon/components/eye_no.vue +1 -0
  167. package/src/components/icon/components/face_delighted.vue +1 -0
  168. package/src/components/icon/components/face_happy.vue +1 -0
  169. package/src/components/icon/components/face_neutral.vue +1 -0
  170. package/src/components/icon/components/face_sad.vue +1 -0
  171. package/src/components/icon/components/file_download.vue +1 -0
  172. package/src/components/icon/components/file_upload.vue +1 -0
  173. package/src/components/icon/components/files_history.vue +1 -0
  174. package/src/components/icon/components/files_multi.vue +1 -0
  175. package/src/components/icon/components/files_stack.vue +1 -0
  176. package/src/components/icon/components/film.vue +1 -0
  177. package/src/components/icon/components/filter.vue +1 -0
  178. package/src/components/icon/components/filter_circle.vue +1 -0
  179. package/src/components/icon/components/filter_single.vue +1 -0
  180. package/src/components/icon/components/filtering.vue +1 -0
  181. package/src/components/icon/components/fingerprint.vue +1 -0
  182. package/src/components/icon/components/flag.vue +1 -0
  183. package/src/components/icon/components/flame.vue +7 -0
  184. package/src/components/icon/components/flame_alt.vue +1 -0
  185. package/src/components/icon/components/flip_view.vue +1 -0
  186. package/src/components/icon/components/floppy.vue +1 -0
  187. package/src/components/icon/components/folder_add.vue +1 -0
  188. package/src/components/icon/components/folder_closed.vue +1 -0
  189. package/src/components/icon/components/folder_minus.vue +1 -0
  190. package/src/components/icon/components/folder_open.vue +1 -0
  191. package/src/components/icon/components/fork_git.vue +1 -0
  192. package/src/components/icon/components/forward.vue +1 -0
  193. package/src/components/icon/components/frame.vue +1 -0
  194. package/src/components/icon/components/fullscreen.vue +1 -0
  195. package/src/components/icon/components/funnel.vue +1 -0
  196. package/src/components/icon/components/gauge.vue +1 -0
  197. package/src/components/icon/components/gift.vue +1 -0
  198. package/src/components/icon/components/globe.vue +1 -0
  199. package/src/components/icon/components/gps.vue +1 -0
  200. package/src/components/icon/components/grab.vue +1 -0
  201. package/src/components/icon/components/graph_bar.vue +1 -0
  202. package/src/components/icon/components/graph_box.vue +1 -0
  203. package/src/components/icon/components/graph_increase.vue +1 -0
  204. package/src/components/icon/components/grid.vue +1 -0
  205. package/src/components/icon/components/grid_circles.vue +1 -0
  206. package/src/components/icon/components/grid_circles_add.vue +1 -0
  207. package/src/components/icon/components/grid_small.vue +1 -0
  208. package/src/components/icon/components/grid_squares.vue +1 -0
  209. package/src/components/icon/components/grid_squares_add.vue +1 -0
  210. package/src/components/icon/components/hand.vue +1 -0
  211. package/src/components/icon/components/harddrive.vue +1 -0
  212. package/src/components/icon/components/hash.vue +1 -0
  213. package/src/components/icon/components/heart.vue +1 -0
  214. package/src/components/icon/components/heart_rate.vue +1 -0
  215. package/src/components/icon/components/heart_remove.vue +1 -0
  216. package/src/components/icon/components/height.vue +1 -0
  217. package/src/components/icon/components/hierarchy.vue +1 -0
  218. package/src/components/icon/components/home.vue +1 -0
  219. package/src/components/icon/components/home_alt.vue +1 -0
  220. package/src/components/icon/components/home_check.vue +1 -0
  221. package/src/components/icon/components/home_door.vue +1 -0
  222. package/src/components/icon/components/import.vue +1 -0
  223. package/src/components/icon/components/inbox.vue +1 -0
  224. package/src/components/icon/components/inbox_alt.vue +1 -0
  225. package/src/components/icon/components/info_circle.vue +1 -0
  226. package/src/components/icon/components/iphone_landscape.vue +1 -0
  227. package/src/components/icon/components/iphone_portrait.vue +1 -0
  228. package/src/components/icon/components/jump_backward.vue +1 -0
  229. package/src/components/icon/components/jump_forward.vue +1 -0
  230. package/src/components/icon/components/jump_left.vue +1 -0
  231. package/src/components/icon/components/jump_right.vue +1 -0
  232. package/src/components/icon/components/keyboard.vue +1 -0
  233. package/src/components/icon/components/laptop.vue +1 -0
  234. package/src/components/icon/components/lightbulb.vue +1 -0
  235. package/src/components/icon/components/lightbulb_on.vue +1 -0
  236. package/src/components/icon/components/lightning.vue +1 -0
  237. package/src/components/icon/components/lightning_alt.vue +1 -0
  238. package/src/components/icon/components/lineweight.vue +1 -0
  239. package/src/components/icon/components/link.vue +1 -0
  240. package/src/components/icon/components/link_alt.vue +1 -0
  241. package/src/components/icon/components/link_broken.vue +1 -0
  242. package/src/components/icon/components/link_horizontal.vue +1 -0
  243. package/src/components/icon/components/link_vertical.vue +1 -0
  244. package/src/components/icon/components/list.vue +1 -0
  245. package/src/components/icon/components/list_add.vue +1 -0
  246. package/src/components/icon/components/list_numbered.vue +1 -0
  247. package/src/components/icon/components/loader.vue +1 -0
  248. package/src/components/icon/components/location.vue +1 -0
  249. package/src/components/icon/components/lock.vue +1 -0
  250. package/src/components/icon/components/lock_open.vue +1 -0
  251. package/src/components/icon/components/mail.vue +1 -0
  252. package/src/components/icon/components/mail_add.vue +1 -0
  253. package/src/components/icon/components/mail_delete.vue +1 -0
  254. package/src/components/icon/components/mail_minus.vue +1 -0
  255. package/src/components/icon/components/mail_new.vue +1 -0
  256. package/src/components/icon/components/mail_open.vue +1 -0
  257. package/src/components/icon/components/mail_remove.vue +1 -0
  258. package/src/components/icon/components/marquee.vue +1 -0
  259. package/src/components/icon/components/maximise.vue +1 -0
  260. package/src/components/icon/components/menu_hamburger.vue +1 -0
  261. package/src/components/icon/components/menu_horizontal.vue +1 -0
  262. package/src/components/icon/components/menu_vertical.vue +1 -0
  263. package/src/components/icon/components/message.vue +1 -0
  264. package/src/components/icon/components/message_writing.vue +1 -0
  265. package/src/components/icon/components/microphone.vue +1 -0
  266. package/src/components/icon/components/microphone_disabled.vue +1 -0
  267. package/src/components/icon/components/microphone_muted.vue +1 -0
  268. package/src/components/icon/components/midpoint.vue +1 -0
  269. package/src/components/icon/components/mini_player.vue +1 -0
  270. package/src/components/icon/components/minimise.vue +1 -0
  271. package/src/components/icon/components/minus.vue +1 -0
  272. package/src/components/icon/components/minus_circle.vue +1 -0
  273. package/src/components/icon/components/moon.vue +1 -0
  274. package/src/components/icon/components/move.vue +1 -0
  275. package/src/components/icon/components/newspaper.vue +1 -0
  276. package/src/components/icon/components/no_sign.vue +1 -0
  277. package/src/components/icon/components/notebook.vue +1 -0
  278. package/src/components/icon/components/notification.vue +1 -0
  279. package/src/components/icon/components/nut.vue +1 -0
  280. package/src/components/icon/components/pages.vue +1 -0
  281. package/src/components/icon/components/panel_bottom.vue +1 -0
  282. package/src/components/icon/components/panel_center.vue +1 -0
  283. package/src/components/icon/components/panel_left.vue +1 -0
  284. package/src/components/icon/components/panel_right.vue +1 -0
  285. package/src/components/icon/components/panel_sectioned.vue +1 -0
  286. package/src/components/icon/components/panel_top.vue +1 -0
  287. package/src/components/icon/components/paper.vue +1 -0
  288. package/src/components/icon/components/paper_folded.vue +1 -0
  289. package/src/components/icon/components/paper_plane.vue +1 -0
  290. package/src/components/icon/components/paper_plane_alt.vue +1 -0
  291. package/src/components/icon/components/paperclip.vue +1 -0
  292. package/src/components/icon/components/paragraph_center.vue +1 -0
  293. package/src/components/icon/components/paragraph_end.vue +1 -0
  294. package/src/components/icon/components/paragraph_left.vue +1 -0
  295. package/src/components/icon/components/paragraph_right.vue +1 -0
  296. package/src/components/icon/components/paragraph_start.vue +1 -0
  297. package/src/components/icon/components/pen.vue +1 -0
  298. package/src/components/icon/components/phone_landscape.vue +1 -0
  299. package/src/components/icon/components/phone_portrait.vue +1 -0
  300. package/src/components/icon/components/picture.vue +1 -0
  301. package/src/components/icon/components/pie_half.vue +1 -0
  302. package/src/components/icon/components/pie_quarter.vue +1 -0
  303. package/src/components/icon/components/pie_third.vue +1 -0
  304. package/src/components/icon/components/play_button.vue +1 -0
  305. package/src/components/icon/components/plus.vue +1 -0
  306. package/src/components/icon/components/plus_circle.vue +1 -0
  307. package/src/components/icon/components/postcard.vue +1 -0
  308. package/src/components/icon/components/printer.vue +1 -0
  309. package/src/components/icon/components/projector.vue +1 -0
  310. package/src/components/icon/components/pull_down.vue +1 -0
  311. package/src/components/icon/components/pull_left.vue +1 -0
  312. package/src/components/icon/components/pull_right.vue +1 -0
  313. package/src/components/icon/components/pull_up.vue +1 -0
  314. package/src/components/icon/components/push_down.vue +1 -0
  315. package/src/components/icon/components/push_left.vue +1 -0
  316. package/src/components/icon/components/push_right.vue +1 -0
  317. package/src/components/icon/components/push_up.vue +1 -0
  318. package/src/components/icon/components/question_circle.vue +1 -0
  319. package/src/components/icon/components/radio_on.vue +1 -0
  320. package/src/components/icon/components/receipt.vue +1 -0
  321. package/src/components/icon/components/record.vue +1 -0
  322. package/src/components/icon/components/redo.vue +1 -0
  323. package/src/components/icon/components/refresh.vue +1 -0
  324. package/src/components/icon/components/refresh_alt.vue +1 -0
  325. package/src/components/icon/components/replicate.vue +1 -0
  326. package/src/components/icon/components/replicate_alt.vue +1 -0
  327. package/src/components/icon/components/reset.vue +1 -0
  328. package/src/components/icon/components/reset_alt.vue +1 -0
  329. package/src/components/icon/components/reset_forward.vue +1 -0
  330. package/src/components/icon/components/reset_hard.vue +1 -0
  331. package/src/components/icon/components/reset_temporary.vue +1 -0
  332. package/src/components/icon/components/retweet.vue +1 -0
  333. package/src/components/icon/components/reuse.vue +1 -0
  334. package/src/components/icon/components/reverse.vue +1 -0
  335. package/src/components/icon/components/reverse_alt.vue +1 -0
  336. package/src/components/icon/components/revert.vue +1 -0
  337. package/src/components/icon/components/rocket.vue +1 -0
  338. package/src/components/icon/components/ruler.vue +1 -0
  339. package/src/components/icon/components/scale.vue +1 -0
  340. package/src/components/icon/components/scale_contract.vue +1 -0
  341. package/src/components/icon/components/scale_extend.vue +1 -0
  342. package/src/components/icon/components/scalpel.vue +1 -0
  343. package/src/components/icon/components/search.vue +1 -0
  344. package/src/components/icon/components/server.vue +1 -0
  345. package/src/components/icon/components/settings.vue +1 -0
  346. package/src/components/icon/components/share.vue +1 -0
  347. package/src/components/icon/components/share_alt.vue +1 -0
  348. package/src/components/icon/components/shuffle.vue +1 -0
  349. package/src/components/icon/components/side_menu.vue +1 -0
  350. package/src/components/icon/components/slash_backward.vue +1 -0
  351. package/src/components/icon/components/slash_forward.vue +1 -0
  352. package/src/components/icon/components/sliders.vue +1 -0
  353. package/src/components/icon/components/sort.vue +1 -0
  354. package/src/components/icon/components/sort_alt.vue +1 -0
  355. package/src/components/icon/components/speaker.vue +1 -0
  356. package/src/components/icon/components/speech_bubble.vue +1 -0
  357. package/src/components/icon/components/speech_typing.vue +1 -0
  358. package/src/components/icon/components/split.vue +1 -0
  359. package/src/components/icon/components/split_three.vue +1 -0
  360. package/src/components/icon/components/star.vue +1 -0
  361. package/src/components/icon/components/sun.vue +1 -0
  362. package/src/components/icon/components/support.vue +1 -0
  363. package/src/components/icon/components/swap.vue +1 -0
  364. package/src/components/icon/components/switch.vue +1 -0
  365. package/src/components/icon/components/table.vue +1 -0
  366. package/src/components/icon/components/table_header.vue +1 -0
  367. package/src/components/icon/components/tag.vue +1 -0
  368. package/src/components/icon/components/tag_milestone.vue +1 -0
  369. package/src/components/icon/components/tags.vue +1 -0
  370. package/src/components/icon/components/target.vue +1 -0
  371. package/src/components/icon/components/thread.vue +1 -0
  372. package/src/components/icon/components/thumbs_down.vue +1 -0
  373. package/src/components/icon/components/thumbs_up.vue +1 -0
  374. package/src/components/icon/components/ticket.vue +1 -0
  375. package/src/components/icon/components/timeline.vue +1 -0
  376. package/src/components/icon/components/todo.vue +1 -0
  377. package/src/components/icon/components/toggle.vue +1 -0
  378. package/src/components/icon/components/toggles.vue +1 -0
  379. package/src/components/icon/components/translate.vue +1 -0
  380. package/src/components/icon/components/trash.vue +1 -0
  381. package/src/components/icon/components/trash_alt.vue +1 -0
  382. package/src/components/icon/components/trophy.vue +1 -0
  383. package/src/components/icon/components/tv_mode.vue +1 -0
  384. package/src/components/icon/components/unarchive.vue +1 -0
  385. package/src/components/icon/components/undo.vue +1 -0
  386. package/src/components/icon/components/undo_history.vue +1 -0
  387. package/src/components/icon/components/unlink_horizontal.vue +1 -0
  388. package/src/components/icon/components/unlink_vertical.vue +1 -0
  389. package/src/components/icon/components/upload.vue +1 -0
  390. package/src/components/icon/components/upload_alt.vue +1 -0
  391. package/src/components/icon/components/upward.vue +1 -0
  392. package/src/components/icon/components/user.vue +1 -0
  393. package/src/components/icon/components/user_add.vue +1 -0
  394. package/src/components/icon/components/user_circle.vue +1 -0
  395. package/src/components/icon/components/user_male.vue +1 -0
  396. package/src/components/icon/components/user_male_circle.vue +1 -0
  397. package/src/components/icon/components/user_remove.vue +1 -0
  398. package/src/components/icon/components/users.vue +1 -0
  399. package/src/components/icon/components/venn.vue +1 -0
  400. package/src/components/icon/components/version.vue +1 -0
  401. package/src/components/icon/components/versions.vue +1 -0
  402. package/src/components/icon/components/video.vue +1 -0
  403. package/src/components/icon/components/volume_0.vue +1 -0
  404. package/src/components/icon/components/volume_add.vue +1 -0
  405. package/src/components/icon/components/volume_disabled.vue +1 -0
  406. package/src/components/icon/components/volume_high.vue +1 -0
  407. package/src/components/icon/components/volume_low.vue +1 -0
  408. package/src/components/icon/components/volume_minus.vue +1 -0
  409. package/src/components/icon/components/volume_muted.vue +1 -0
  410. package/src/components/icon/components/wallet.vue +1 -0
  411. package/src/components/icon/components/warning_circle.vue +1 -0
  412. package/src/components/icon/components/warning_hex.vue +1 -0
  413. package/src/components/icon/components/warning_triangle.vue +1 -0
  414. package/src/components/icon/components/waves.vue +1 -0
  415. package/src/components/icon/components/width.vue +1 -0
  416. package/src/components/icon/components/wifi.vue +1 -0
  417. package/src/components/icon/components/wifi_error.vue +1 -0
  418. package/src/components/icon/components/wifi_none.vue +1 -0
  419. package/src/components/icon/components/window.vue +1 -0
  420. package/src/components/icon/components/window_collapse_left.vue +1 -0
  421. package/src/components/icon/components/window_collapse_right.vue +1 -0
  422. package/src/components/icon/components/window_content.vue +1 -0
  423. package/src/components/icon/components/wrap_back.vue +1 -0
  424. package/src/components/icon/components/wrap_forward.vue +1 -0
  425. package/src/components/icon/components/write.vue +1 -0
  426. package/src/components/icon/components/zoom_cancel.vue +1 -0
  427. package/src/components/icon/components/zoom_in.vue +1 -0
  428. package/src/components/icon/components/zoom_out.vue +1 -0
  429. package/src/components/icon/components/zoom_reset.vue +1 -0
  430. package/src/components/icon/convert-icons.js +24 -0
  431. package/src/components/icon/icons/airplay.svg +1 -0
  432. package/src/components/icon/icons/alarm_clock.svg +1 -0
  433. package/src/components/icon/icons/align_horizontal.svg +1 -0
  434. package/src/components/icon/icons/align_vertical.svg +1 -0
  435. package/src/components/icon/icons/angle.svg +1 -0
  436. package/src/components/icon/icons/archive.svg +1 -0
  437. package/src/components/icon/icons/arrow_bottom_left.svg +1 -0
  438. package/src/components/icon/icons/arrow_bottom_right.svg +1 -0
  439. package/src/components/icon/icons/arrow_down.svg +1 -0
  440. package/src/components/icon/icons/arrow_down_circle.svg +1 -0
  441. package/src/components/icon/icons/arrow_left.svg +1 -0
  442. package/src/components/icon/icons/arrow_left_circle.svg +1 -0
  443. package/src/components/icon/icons/arrow_right.svg +1 -0
  444. package/src/components/icon/icons/arrow_right_circle.svg +1 -0
  445. package/src/components/icon/icons/arrow_top_left.svg +1 -0
  446. package/src/components/icon/icons/arrow_top_right.svg +1 -0
  447. package/src/components/icon/icons/arrow_up.svg +1 -0
  448. package/src/components/icon/icons/arrow_up_circle.svg +1 -0
  449. package/src/components/icon/icons/audio_wave.svg +1 -0
  450. package/src/components/icon/icons/backspace.svg +1 -0
  451. package/src/components/icon/icons/backward.svg +1 -0
  452. package/src/components/icon/icons/bag.svg +1 -0
  453. package/src/components/icon/icons/battery_75.svg +1 -0
  454. package/src/components/icon/icons/battery_charging.svg +1 -0
  455. package/src/components/icon/icons/battery_empty.svg +1 -0
  456. package/src/components/icon/icons/battery_full.svg +1 -0
  457. package/src/components/icon/icons/battery_half.svg +1 -0
  458. package/src/components/icon/icons/battery_low.svg +1 -0
  459. package/src/components/icon/icons/bell.svg +1 -0
  460. package/src/components/icon/icons/bell_disabled.svg +1 -0
  461. package/src/components/icon/icons/bell_ringing.svg +1 -0
  462. package/src/components/icon/icons/bell_snooze.svg +1 -0
  463. package/src/components/icon/icons/bluetooth.svg +1 -0
  464. package/src/components/icon/icons/book.svg +1 -0
  465. package/src/components/icon/icons/book_closed.svg +1 -0
  466. package/src/components/icon/icons/book_text.svg +1 -0
  467. package/src/components/icon/icons/bookmark.svg +1 -0
  468. package/src/components/icon/icons/bookmark_book.svg +1 -0
  469. package/src/components/icon/icons/box.svg +1 -0
  470. package/src/components/icon/icons/box_download.svg +1 -0
  471. package/src/components/icon/icons/box_open.svg +1 -0
  472. package/src/components/icon/icons/branch.svg +1 -0
  473. package/src/components/icon/icons/briefcase.svg +1 -0
  474. package/src/components/icon/icons/browser.svg +1 -0
  475. package/src/components/icon/icons/browser_alt.svg +1 -0
  476. package/src/components/icon/icons/button_add.svg +1 -0
  477. package/src/components/icon/icons/button_minus.svg +1 -0
  478. package/src/components/icon/icons/calculator.svg +1 -0
  479. package/src/components/icon/icons/calendar.svg +1 -0
  480. package/src/components/icon/icons/calendar_add.svg +1 -0
  481. package/src/components/icon/icons/calendar_date.svg +1 -0
  482. package/src/components/icon/icons/calendar_day.svg +1 -0
  483. package/src/components/icon/icons/calendar_days.svg +1 -0
  484. package/src/components/icon/icons/calendar_last_day.svg +1 -0
  485. package/src/components/icon/icons/calendar_month.svg +1 -0
  486. package/src/components/icon/icons/calendar_move.svg +1 -0
  487. package/src/components/icon/icons/calendar_remove.svg +1 -0
  488. package/src/components/icon/icons/calendar_split.svg +1 -0
  489. package/src/components/icon/icons/calendar_week.svg +1 -0
  490. package/src/components/icon/icons/camera.svg +1 -0
  491. package/src/components/icon/icons/camera_alt.svg +1 -0
  492. package/src/components/icon/icons/camera_noflash.svg +1 -0
  493. package/src/components/icon/icons/camera_noflash_alt.svg +1 -0
  494. package/src/components/icon/icons/capture.svg +1 -0
  495. package/src/components/icon/icons/card_timeline.svg +1 -0
  496. package/src/components/icon/icons/card_view.svg +1 -0
  497. package/src/components/icon/icons/carousel.svg +1 -0
  498. package/src/components/icon/icons/cart.svg +1 -0
  499. package/src/components/icon/icons/cast.svg +1 -0
  500. package/src/components/icon/icons/chain.svg +1 -0
  501. package/src/components/icon/icons/chat_add.svg +1 -0
  502. package/src/components/icon/icons/check.svg +1 -0
  503. package/src/components/icon/icons/check_circle.svg +1 -0
  504. package/src/components/icon/icons/check_circle_outside.svg +1 -0
  505. package/src/components/icon/icons/checkbox_checked.svg +1 -0
  506. package/src/components/icon/icons/checkbox_empty.svg +1 -0
  507. package/src/components/icon/icons/chevron_close.svg +1 -0
  508. package/src/components/icon/icons/chevron_down.svg +1 -0
  509. package/src/components/icon/icons/chevron_down_circle.svg +1 -0
  510. package/src/components/icon/icons/chevron_down_double.svg +1 -0
  511. package/src/components/icon/icons/chevron_left.svg +1 -0
  512. package/src/components/icon/icons/chevron_left_circle.svg +1 -0
  513. package/src/components/icon/icons/chevron_left_double.svg +1 -0
  514. package/src/components/icon/icons/chevron_open.svg +1 -0
  515. package/src/components/icon/icons/chevron_right.svg +1 -0
  516. package/src/components/icon/icons/chevron_right_circle.svg +1 -0
  517. package/src/components/icon/icons/chevron_right_double.svg +1 -0
  518. package/src/components/icon/icons/chevron_up.svg +1 -0
  519. package/src/components/icon/icons/chevron_up_circle.svg +1 -0
  520. package/src/components/icon/icons/chevron_up_double.svg +1 -0
  521. package/src/components/icon/icons/circle.svg +1 -0
  522. package/src/components/icon/icons/circle_menu.svg +1 -0
  523. package/src/components/icon/icons/circle_split.svg +1 -0
  524. package/src/components/icon/icons/clipboard.svg +1 -0
  525. package/src/components/icon/icons/clipboard_add.svg +1 -0
  526. package/src/components/icon/icons/clipboard_check.svg +1 -0
  527. package/src/components/icon/icons/clipboard_copy.svg +1 -0
  528. package/src/components/icon/icons/clipboard_cross.svg +1 -0
  529. package/src/components/icon/icons/clipboard_notes.svg +1 -0
  530. package/src/components/icon/icons/clipboard_remove.svg +1 -0
  531. package/src/components/icon/icons/clock.svg +1 -0
  532. package/src/components/icon/icons/close.svg +1 -0
  533. package/src/components/icon/icons/cloud.svg +1 -0
  534. package/src/components/icon/icons/cloud_disconnect.svg +1 -0
  535. package/src/components/icon/icons/cloud_download.svg +1 -0
  536. package/src/components/icon/icons/cloud_download_alt.svg +1 -0
  537. package/src/components/icon/icons/cloud_upload.svg +1 -0
  538. package/src/components/icon/icons/cloud_upload_alt.svg +1 -0
  539. package/src/components/icon/icons/code.svg +1 -0
  540. package/src/components/icon/icons/coffee.svg +1 -0
  541. package/src/components/icon/icons/coin.svg +1 -0
  542. package/src/components/icon/icons/coins.svg +1 -0
  543. package/src/components/icon/icons/compass.svg +1 -0
  544. package/src/components/icon/icons/component_add.svg +1 -0
  545. package/src/components/icon/icons/contacts.svg +1 -0
  546. package/src/components/icon/icons/contract.svg +1 -0
  547. package/src/components/icon/icons/create.svg +1 -0
  548. package/src/components/icon/icons/credit_card.svg +1 -0
  549. package/src/components/icon/icons/crop.svg +1 -0
  550. package/src/components/icon/icons/cross.svg +1 -0
  551. package/src/components/icon/icons/cross_circle.svg +1 -0
  552. package/src/components/icon/icons/crosshair.svg +1 -0
  553. package/src/components/icon/icons/cube.svg +1 -0
  554. package/src/components/icon/icons/cylinder.svg +1 -0
  555. package/src/components/icon/icons/database.svg +1 -0
  556. package/src/components/icon/icons/diamond.svg +1 -0
  557. package/src/components/icon/icons/directions.svg +1 -0
  558. package/src/components/icon/icons/disc.svg +1 -0
  559. package/src/components/icon/icons/display.svg +1 -0
  560. package/src/components/icon/icons/display_alt.svg +1 -0
  561. package/src/components/icon/icons/document.svg +1 -0
  562. package/src/components/icon/icons/document_justified.svg +1 -0
  563. package/src/components/icon/icons/document_list.svg +1 -0
  564. package/src/components/icon/icons/document_stack.svg +1 -0
  565. package/src/components/icon/icons/document_words.svg +1 -0
  566. package/src/components/icon/icons/door.svg +1 -0
  567. package/src/components/icon/icons/door_alt.svg +1 -0
  568. package/src/components/icon/icons/download.svg +1 -0
  569. package/src/components/icon/icons/download_alt.svg +1 -0
  570. package/src/components/icon/icons/downward.svg +1 -0
  571. package/src/components/icon/icons/drag.svg +1 -0
  572. package/src/components/icon/icons/drag_circle.svg +1 -0
  573. package/src/components/icon/icons/drag_vertical.svg +1 -0
  574. package/src/components/icon/icons/duplicate.svg +1 -0
  575. package/src/components/icon/icons/duplicate_alt.svg +1 -0
  576. package/src/components/icon/icons/enter.svg +1 -0
  577. package/src/components/icon/icons/enter_alt.svg +1 -0
  578. package/src/components/icon/icons/episodes.svg +1 -0
  579. package/src/components/icon/icons/exit_left.svg +1 -0
  580. package/src/components/icon/icons/exit_right.svg +1 -0
  581. package/src/components/icon/icons/expand.svg +1 -0
  582. package/src/components/icon/icons/expand_height.svg +1 -0
  583. package/src/components/icon/icons/expand_width.svg +1 -0
  584. package/src/components/icon/icons/external.svg +1 -0
  585. package/src/components/icon/icons/eye.svg +1 -0
  586. package/src/components/icon/icons/eye_closed.svg +1 -0
  587. package/src/components/icon/icons/eye_no.svg +1 -0
  588. package/src/components/icon/icons/face_delighted.svg +1 -0
  589. package/src/components/icon/icons/face_happy.svg +1 -0
  590. package/src/components/icon/icons/face_neutral.svg +1 -0
  591. package/src/components/icon/icons/face_sad.svg +1 -0
  592. package/src/components/icon/icons/file_download.svg +1 -0
  593. package/src/components/icon/icons/file_upload.svg +1 -0
  594. package/src/components/icon/icons/files_history.svg +1 -0
  595. package/src/components/icon/icons/files_multi.svg +1 -0
  596. package/src/components/icon/icons/files_stack.svg +1 -0
  597. package/src/components/icon/icons/film.svg +1 -0
  598. package/src/components/icon/icons/filter.svg +1 -0
  599. package/src/components/icon/icons/filter_circle.svg +1 -0
  600. package/src/components/icon/icons/filter_single.svg +1 -0
  601. package/src/components/icon/icons/filtering.svg +1 -0
  602. package/src/components/icon/icons/fingerprint.svg +1 -0
  603. package/src/components/icon/icons/flag.svg +1 -0
  604. package/src/components/icon/icons/flame.svg +6 -0
  605. package/src/components/icon/icons/flame_alt.svg +1 -0
  606. package/src/components/icon/icons/flip_view.svg +1 -0
  607. package/src/components/icon/icons/floppy.svg +1 -0
  608. package/src/components/icon/icons/folder_add.svg +1 -0
  609. package/src/components/icon/icons/folder_closed.svg +1 -0
  610. package/src/components/icon/icons/folder_minus.svg +1 -0
  611. package/src/components/icon/icons/folder_open.svg +1 -0
  612. package/src/components/icon/icons/fork_git.svg +1 -0
  613. package/src/components/icon/icons/forward.svg +1 -0
  614. package/src/components/icon/icons/frame.svg +1 -0
  615. package/src/components/icon/icons/fullscreen.svg +1 -0
  616. package/src/components/icon/icons/funnel.svg +1 -0
  617. package/src/components/icon/icons/gauge.svg +1 -0
  618. package/src/components/icon/icons/gift.svg +1 -0
  619. package/src/components/icon/icons/globe.svg +1 -0
  620. package/src/components/icon/icons/gps.svg +1 -0
  621. package/src/components/icon/icons/grab.svg +1 -0
  622. package/src/components/icon/icons/graph_bar.svg +1 -0
  623. package/src/components/icon/icons/graph_box.svg +1 -0
  624. package/src/components/icon/icons/graph_increase.svg +1 -0
  625. package/src/components/icon/icons/grid.svg +1 -0
  626. package/src/components/icon/icons/grid_circles.svg +1 -0
  627. package/src/components/icon/icons/grid_circles_add.svg +1 -0
  628. package/src/components/icon/icons/grid_small.svg +1 -0
  629. package/src/components/icon/icons/grid_squares.svg +1 -0
  630. package/src/components/icon/icons/grid_squares_add.svg +1 -0
  631. package/src/components/icon/icons/hand.svg +1 -0
  632. package/src/components/icon/icons/harddrive.svg +1 -0
  633. package/src/components/icon/icons/hash.svg +1 -0
  634. package/src/components/icon/icons/heart.svg +1 -0
  635. package/src/components/icon/icons/heart_rate.svg +1 -0
  636. package/src/components/icon/icons/heart_remove.svg +1 -0
  637. package/src/components/icon/icons/height.svg +1 -0
  638. package/src/components/icon/icons/hierarchy.svg +1 -0
  639. package/src/components/icon/icons/home.svg +1 -0
  640. package/src/components/icon/icons/home_alt.svg +1 -0
  641. package/src/components/icon/icons/home_check.svg +1 -0
  642. package/src/components/icon/icons/home_door.svg +1 -0
  643. package/src/components/icon/icons/import.svg +1 -0
  644. package/src/components/icon/icons/inbox.svg +1 -0
  645. package/src/components/icon/icons/inbox_alt.svg +1 -0
  646. package/src/components/icon/icons/info_circle.svg +1 -0
  647. package/src/components/icon/icons/iphone_landscape.svg +1 -0
  648. package/src/components/icon/icons/iphone_portrait.svg +1 -0
  649. package/src/components/icon/icons/jump_backward.svg +1 -0
  650. package/src/components/icon/icons/jump_forward.svg +1 -0
  651. package/src/components/icon/icons/jump_left.svg +1 -0
  652. package/src/components/icon/icons/jump_right.svg +1 -0
  653. package/src/components/icon/icons/keyboard.svg +1 -0
  654. package/src/components/icon/icons/laptop.svg +1 -0
  655. package/src/components/icon/icons/lightbulb.svg +1 -0
  656. package/src/components/icon/icons/lightbulb_on.svg +1 -0
  657. package/src/components/icon/icons/lightning.svg +1 -0
  658. package/src/components/icon/icons/lightning_alt.svg +1 -0
  659. package/src/components/icon/icons/lineweight.svg +1 -0
  660. package/src/components/icon/icons/link.svg +1 -0
  661. package/src/components/icon/icons/link_alt.svg +1 -0
  662. package/src/components/icon/icons/link_broken.svg +1 -0
  663. package/src/components/icon/icons/link_horizontal.svg +1 -0
  664. package/src/components/icon/icons/link_vertical.svg +1 -0
  665. package/src/components/icon/icons/list.svg +1 -0
  666. package/src/components/icon/icons/list_add.svg +1 -0
  667. package/src/components/icon/icons/list_numbered.svg +1 -0
  668. package/src/components/icon/icons/loader.svg +1 -0
  669. package/src/components/icon/icons/location.svg +1 -0
  670. package/src/components/icon/icons/lock.svg +1 -0
  671. package/src/components/icon/icons/lock_open.svg +1 -0
  672. package/src/components/icon/icons/mail.svg +1 -0
  673. package/src/components/icon/icons/mail_add.svg +1 -0
  674. package/src/components/icon/icons/mail_delete.svg +1 -0
  675. package/src/components/icon/icons/mail_minus.svg +1 -0
  676. package/src/components/icon/icons/mail_new.svg +1 -0
  677. package/src/components/icon/icons/mail_open.svg +1 -0
  678. package/src/components/icon/icons/mail_remove.svg +1 -0
  679. package/src/components/icon/icons/marquee.svg +1 -0
  680. package/src/components/icon/icons/maximise.svg +1 -0
  681. package/src/components/icon/icons/menu_hamburger.svg +1 -0
  682. package/src/components/icon/icons/menu_horizontal.svg +1 -0
  683. package/src/components/icon/icons/menu_vertical.svg +1 -0
  684. package/src/components/icon/icons/message.svg +1 -0
  685. package/src/components/icon/icons/message_writing.svg +1 -0
  686. package/src/components/icon/icons/microphone.svg +1 -0
  687. package/src/components/icon/icons/microphone_disabled.svg +1 -0
  688. package/src/components/icon/icons/microphone_muted.svg +1 -0
  689. package/src/components/icon/icons/midpoint.svg +1 -0
  690. package/src/components/icon/icons/mini_player.svg +1 -0
  691. package/src/components/icon/icons/minimise.svg +1 -0
  692. package/src/components/icon/icons/minus.svg +1 -0
  693. package/src/components/icon/icons/minus_circle.svg +1 -0
  694. package/src/components/icon/icons/moon.svg +1 -0
  695. package/src/components/icon/icons/move.svg +1 -0
  696. package/src/components/icon/icons/newspaper.svg +1 -0
  697. package/src/components/icon/icons/no_sign.svg +1 -0
  698. package/src/components/icon/icons/notebook.svg +1 -0
  699. package/src/components/icon/icons/notification.svg +1 -0
  700. package/src/components/icon/icons/nut.svg +1 -0
  701. package/src/components/icon/icons/pages.svg +1 -0
  702. package/src/components/icon/icons/panel_bottom.svg +1 -0
  703. package/src/components/icon/icons/panel_center.svg +1 -0
  704. package/src/components/icon/icons/panel_left.svg +1 -0
  705. package/src/components/icon/icons/panel_right.svg +1 -0
  706. package/src/components/icon/icons/panel_sectioned.svg +1 -0
  707. package/src/components/icon/icons/panel_top.svg +1 -0
  708. package/src/components/icon/icons/paper.svg +1 -0
  709. package/src/components/icon/icons/paper_folded.svg +1 -0
  710. package/src/components/icon/icons/paper_plane.svg +1 -0
  711. package/src/components/icon/icons/paper_plane_alt.svg +1 -0
  712. package/src/components/icon/icons/paperclip.svg +1 -0
  713. package/src/components/icon/icons/paragraph_center.svg +1 -0
  714. package/src/components/icon/icons/paragraph_end.svg +1 -0
  715. package/src/components/icon/icons/paragraph_left.svg +1 -0
  716. package/src/components/icon/icons/paragraph_right.svg +1 -0
  717. package/src/components/icon/icons/paragraph_start.svg +1 -0
  718. package/src/components/icon/icons/pen.svg +1 -0
  719. package/src/components/icon/icons/phone_landscape.svg +1 -0
  720. package/src/components/icon/icons/phone_portrait.svg +1 -0
  721. package/src/components/icon/icons/picture.svg +1 -0
  722. package/src/components/icon/icons/pie_half.svg +1 -0
  723. package/src/components/icon/icons/pie_quarter.svg +1 -0
  724. package/src/components/icon/icons/pie_third.svg +1 -0
  725. package/src/components/icon/icons/play_button.svg +1 -0
  726. package/src/components/icon/icons/plus.svg +1 -0
  727. package/src/components/icon/icons/plus_circle.svg +1 -0
  728. package/src/components/icon/icons/postcard.svg +1 -0
  729. package/src/components/icon/icons/printer.svg +1 -0
  730. package/src/components/icon/icons/projector.svg +1 -0
  731. package/src/components/icon/icons/pull_down.svg +1 -0
  732. package/src/components/icon/icons/pull_left.svg +1 -0
  733. package/src/components/icon/icons/pull_right.svg +1 -0
  734. package/src/components/icon/icons/pull_up.svg +1 -0
  735. package/src/components/icon/icons/push_down.svg +1 -0
  736. package/src/components/icon/icons/push_left.svg +1 -0
  737. package/src/components/icon/icons/push_right.svg +1 -0
  738. package/src/components/icon/icons/push_up.svg +1 -0
  739. package/src/components/icon/icons/question_circle.svg +1 -0
  740. package/src/components/icon/icons/radio_on.svg +1 -0
  741. package/src/components/icon/icons/receipt.svg +1 -0
  742. package/src/components/icon/icons/record.svg +1 -0
  743. package/src/components/icon/icons/redo.svg +1 -0
  744. package/src/components/icon/icons/refresh.svg +1 -0
  745. package/src/components/icon/icons/refresh_alt.svg +1 -0
  746. package/src/components/icon/icons/replicate.svg +1 -0
  747. package/src/components/icon/icons/replicate_alt.svg +1 -0
  748. package/src/components/icon/icons/reset.svg +1 -0
  749. package/src/components/icon/icons/reset_alt.svg +1 -0
  750. package/src/components/icon/icons/reset_forward.svg +1 -0
  751. package/src/components/icon/icons/reset_hard.svg +1 -0
  752. package/src/components/icon/icons/reset_temporary.svg +1 -0
  753. package/src/components/icon/icons/retweet.svg +1 -0
  754. package/src/components/icon/icons/reuse.svg +1 -0
  755. package/src/components/icon/icons/reverse.svg +1 -0
  756. package/src/components/icon/icons/reverse_alt.svg +1 -0
  757. package/src/components/icon/icons/revert.svg +1 -0
  758. package/src/components/icon/icons/rocket.svg +1 -0
  759. package/src/components/icon/icons/ruler.svg +1 -0
  760. package/src/components/icon/icons/scale.svg +1 -0
  761. package/src/components/icon/icons/scale_contract.svg +1 -0
  762. package/src/components/icon/icons/scale_extend.svg +1 -0
  763. package/src/components/icon/icons/scalpel.svg +1 -0
  764. package/src/components/icon/icons/search.svg +1 -0
  765. package/src/components/icon/icons/server.svg +1 -0
  766. package/src/components/icon/icons/settings.svg +1 -0
  767. package/src/components/icon/icons/share.svg +1 -0
  768. package/src/components/icon/icons/share_alt.svg +1 -0
  769. package/src/components/icon/icons/shuffle.svg +1 -0
  770. package/src/components/icon/icons/side_menu.svg +1 -0
  771. package/src/components/icon/icons/slash_backward.svg +1 -0
  772. package/src/components/icon/icons/slash_forward.svg +1 -0
  773. package/src/components/icon/icons/sliders.svg +1 -0
  774. package/src/components/icon/icons/sort.svg +1 -0
  775. package/src/components/icon/icons/sort_alt.svg +1 -0
  776. package/src/components/icon/icons/speaker.svg +1 -0
  777. package/src/components/icon/icons/speech_bubble.svg +1 -0
  778. package/src/components/icon/icons/speech_typing.svg +1 -0
  779. package/src/components/icon/icons/split.svg +1 -0
  780. package/src/components/icon/icons/split_three.svg +1 -0
  781. package/src/components/icon/icons/star.svg +1 -0
  782. package/src/components/icon/icons/sun.svg +1 -0
  783. package/src/components/icon/icons/support.svg +1 -0
  784. package/src/components/icon/icons/swap.svg +1 -0
  785. package/src/components/icon/icons/switch.svg +1 -0
  786. package/src/components/icon/icons/table.svg +1 -0
  787. package/src/components/icon/icons/table_header.svg +1 -0
  788. package/src/components/icon/icons/tag.svg +1 -0
  789. package/src/components/icon/icons/tag_milestone.svg +1 -0
  790. package/src/components/icon/icons/tags.svg +1 -0
  791. package/src/components/icon/icons/target.svg +1 -0
  792. package/src/components/icon/icons/thread.svg +1 -0
  793. package/src/components/icon/icons/thumbs_down.svg +1 -0
  794. package/src/components/icon/icons/thumbs_up.svg +1 -0
  795. package/src/components/icon/icons/ticket.svg +1 -0
  796. package/src/components/icon/icons/timeline.svg +1 -0
  797. package/src/components/icon/icons/todo.svg +1 -0
  798. package/src/components/icon/icons/toggle.svg +1 -0
  799. package/src/components/icon/icons/toggles.svg +1 -0
  800. package/src/components/icon/icons/translate.svg +1 -0
  801. package/src/components/icon/icons/trash.svg +1 -0
  802. package/src/components/icon/icons/trash_alt.svg +1 -0
  803. package/src/components/icon/icons/trophy.svg +1 -0
  804. package/src/components/icon/icons/tv_mode.svg +1 -0
  805. package/src/components/icon/icons/unarchive.svg +1 -0
  806. package/src/components/icon/icons/undo.svg +1 -0
  807. package/src/components/icon/icons/undo_history.svg +1 -0
  808. package/src/components/icon/icons/unlink_horizontal.svg +1 -0
  809. package/src/components/icon/icons/unlink_vertical.svg +1 -0
  810. package/src/components/icon/icons/upload.svg +1 -0
  811. package/src/components/icon/icons/upload_alt.svg +1 -0
  812. package/src/components/icon/icons/upward.svg +1 -0
  813. package/src/components/icon/icons/user.svg +1 -0
  814. package/src/components/icon/icons/user_add.svg +1 -0
  815. package/src/components/icon/icons/user_circle.svg +1 -0
  816. package/src/components/icon/icons/user_male.svg +1 -0
  817. package/src/components/icon/icons/user_male_circle.svg +1 -0
  818. package/src/components/icon/icons/user_remove.svg +1 -0
  819. package/src/components/icon/icons/users.svg +1 -0
  820. package/src/components/icon/icons/venn.svg +1 -0
  821. package/src/components/icon/icons/version.svg +1 -0
  822. package/src/components/icon/icons/versions.svg +1 -0
  823. package/src/components/icon/icons/video.svg +1 -0
  824. package/src/components/icon/icons/volume_0.svg +1 -0
  825. package/src/components/icon/icons/volume_add.svg +1 -0
  826. package/src/components/icon/icons/volume_disabled.svg +1 -0
  827. package/src/components/icon/icons/volume_high.svg +1 -0
  828. package/src/components/icon/icons/volume_low.svg +1 -0
  829. package/src/components/icon/icons/volume_minus.svg +1 -0
  830. package/src/components/icon/icons/volume_muted.svg +1 -0
  831. package/src/components/icon/icons/wallet.svg +1 -0
  832. package/src/components/icon/icons/warning_circle.svg +1 -0
  833. package/src/components/icon/icons/warning_hex.svg +1 -0
  834. package/src/components/icon/icons/warning_triangle.svg +1 -0
  835. package/src/components/icon/icons/waves.svg +1 -0
  836. package/src/components/icon/icons/width.svg +1 -0
  837. package/src/components/icon/icons/wifi.svg +1 -0
  838. package/src/components/icon/icons/wifi_error.svg +1 -0
  839. package/src/components/icon/icons/wifi_none.svg +1 -0
  840. package/src/components/icon/icons/window.svg +1 -0
  841. package/src/components/icon/icons/window_collapse_left.svg +1 -0
  842. package/src/components/icon/icons/window_collapse_right.svg +1 -0
  843. package/src/components/icon/icons/window_content.svg +1 -0
  844. package/src/components/icon/icons/wrap_back.svg +1 -0
  845. package/src/components/icon/icons/wrap_forward.svg +1 -0
  846. package/src/components/icon/icons/write.svg +1 -0
  847. package/src/components/icon/icons/zoom_cancel.svg +1 -0
  848. package/src/components/icon/icons/zoom_in.svg +1 -0
  849. package/src/components/icon/icons/zoom_out.svg +1 -0
  850. package/src/components/icon/icons/zoom_reset.svg +1 -0
  851. package/src/components/icon/icons.js +422 -0
  852. package/src/components/icon/index.stories.js +44 -0
  853. package/src/components/pdf-viewer/PdfViewer.vue +1354 -0
  854. package/src/components/pdf-viewer/images/loading-icon.svg +26 -0
  855. package/src/components/pdf-viewer/images/shadow.png +0 -0
  856. package/src/components/pdf-viewer/images/treeitem-collapsed.png +0 -0
  857. package/src/components/pdf-viewer/images/treeitem-collapsed@2x.png +0 -0
  858. package/src/components/pdf-viewer/images/treeitem-expanded.png +0 -0
  859. package/src/components/pdf-viewer/images/treeitem-expanded@2x.png +0 -0
  860. package/src/components/pdf-viewer/index.stories.js +44 -0
  861. package/src/components/pdf-viewer/pdfjs-dist/CODE_OF_CONDUCT.md +15 -0
  862. package/src/components/pdf-viewer/pdfjs-dist/LICENSE +177 -0
  863. package/src/components/pdf-viewer/pdfjs-dist/README.md +14 -0
  864. package/src/components/pdf-viewer/pdfjs-dist/bower.json +14 -0
  865. package/src/components/pdf-viewer/pdfjs-dist/build/pdf.js +13421 -0
  866. package/src/components/pdf-viewer/pdfjs-dist/build/pdf.js.map +1 -0
  867. package/src/components/pdf-viewer/pdfjs-dist/build/pdf.min.js +22 -0
  868. package/src/components/pdf-viewer/pdfjs-dist/build/pdf.worker.entry.js +19 -0
  869. package/src/components/pdf-viewer/pdfjs-dist/build/pdf.worker.js +45929 -0
  870. package/src/components/pdf-viewer/pdfjs-dist/build/pdf.worker.js.map +1 -0
  871. package/src/components/pdf-viewer/pdfjs-dist/build/pdf.worker.min.js +22 -0
  872. package/src/components/pdf-viewer/pdfjs-dist/cmaps/78-EUC-H.bcmap +0 -0
  873. package/src/components/pdf-viewer/pdfjs-dist/cmaps/78-EUC-V.bcmap +0 -0
  874. package/src/components/pdf-viewer/pdfjs-dist/cmaps/78-H.bcmap +0 -0
  875. package/src/components/pdf-viewer/pdfjs-dist/cmaps/78-RKSJ-H.bcmap +0 -0
  876. package/src/components/pdf-viewer/pdfjs-dist/cmaps/78-RKSJ-V.bcmap +0 -0
  877. package/src/components/pdf-viewer/pdfjs-dist/cmaps/78-V.bcmap +0 -0
  878. package/src/components/pdf-viewer/pdfjs-dist/cmaps/78ms-RKSJ-H.bcmap +0 -0
  879. package/src/components/pdf-viewer/pdfjs-dist/cmaps/78ms-RKSJ-V.bcmap +0 -0
  880. package/src/components/pdf-viewer/pdfjs-dist/cmaps/83pv-RKSJ-H.bcmap +0 -0
  881. package/src/components/pdf-viewer/pdfjs-dist/cmaps/90ms-RKSJ-H.bcmap +0 -0
  882. package/src/components/pdf-viewer/pdfjs-dist/cmaps/90ms-RKSJ-V.bcmap +0 -0
  883. package/src/components/pdf-viewer/pdfjs-dist/cmaps/90msp-RKSJ-H.bcmap +0 -0
  884. package/src/components/pdf-viewer/pdfjs-dist/cmaps/90msp-RKSJ-V.bcmap +0 -0
  885. package/src/components/pdf-viewer/pdfjs-dist/cmaps/90pv-RKSJ-H.bcmap +0 -0
  886. package/src/components/pdf-viewer/pdfjs-dist/cmaps/90pv-RKSJ-V.bcmap +0 -0
  887. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Add-H.bcmap +0 -0
  888. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Add-RKSJ-H.bcmap +0 -0
  889. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Add-RKSJ-V.bcmap +0 -0
  890. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Add-V.bcmap +0 -0
  891. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-CNS1-0.bcmap +0 -0
  892. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-CNS1-1.bcmap +0 -0
  893. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-CNS1-2.bcmap +0 -0
  894. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-CNS1-3.bcmap +0 -0
  895. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-CNS1-4.bcmap +0 -0
  896. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-CNS1-5.bcmap +0 -0
  897. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-CNS1-6.bcmap +0 -0
  898. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  899. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-GB1-0.bcmap +0 -0
  900. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-GB1-1.bcmap +0 -0
  901. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-GB1-2.bcmap +0 -0
  902. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-GB1-3.bcmap +0 -0
  903. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-GB1-4.bcmap +0 -0
  904. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-GB1-5.bcmap +0 -0
  905. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  906. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-Japan1-0.bcmap +0 -0
  907. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-Japan1-1.bcmap +0 -0
  908. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-Japan1-2.bcmap +0 -0
  909. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-Japan1-3.bcmap +0 -0
  910. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-Japan1-4.bcmap +0 -0
  911. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-Japan1-5.bcmap +0 -0
  912. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-Japan1-6.bcmap +0 -0
  913. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  914. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-Korea1-0.bcmap +0 -0
  915. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-Korea1-1.bcmap +0 -0
  916. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-Korea1-2.bcmap +0 -0
  917. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  918. package/src/components/pdf-viewer/pdfjs-dist/cmaps/B5-H.bcmap +0 -0
  919. package/src/components/pdf-viewer/pdfjs-dist/cmaps/B5-V.bcmap +0 -0
  920. package/src/components/pdf-viewer/pdfjs-dist/cmaps/B5pc-H.bcmap +0 -0
  921. package/src/components/pdf-viewer/pdfjs-dist/cmaps/B5pc-V.bcmap +0 -0
  922. package/src/components/pdf-viewer/pdfjs-dist/cmaps/CNS-EUC-H.bcmap +0 -0
  923. package/src/components/pdf-viewer/pdfjs-dist/cmaps/CNS-EUC-V.bcmap +0 -0
  924. package/src/components/pdf-viewer/pdfjs-dist/cmaps/CNS1-H.bcmap +0 -0
  925. package/src/components/pdf-viewer/pdfjs-dist/cmaps/CNS1-V.bcmap +0 -0
  926. package/src/components/pdf-viewer/pdfjs-dist/cmaps/CNS2-H.bcmap +0 -0
  927. package/src/components/pdf-viewer/pdfjs-dist/cmaps/CNS2-V.bcmap +3 -0
  928. package/src/components/pdf-viewer/pdfjs-dist/cmaps/ETHK-B5-H.bcmap +0 -0
  929. package/src/components/pdf-viewer/pdfjs-dist/cmaps/ETHK-B5-V.bcmap +0 -0
  930. package/src/components/pdf-viewer/pdfjs-dist/cmaps/ETen-B5-H.bcmap +0 -0
  931. package/src/components/pdf-viewer/pdfjs-dist/cmaps/ETen-B5-V.bcmap +0 -0
  932. package/src/components/pdf-viewer/pdfjs-dist/cmaps/ETenms-B5-H.bcmap +3 -0
  933. package/src/components/pdf-viewer/pdfjs-dist/cmaps/ETenms-B5-V.bcmap +0 -0
  934. package/src/components/pdf-viewer/pdfjs-dist/cmaps/EUC-H.bcmap +0 -0
  935. package/src/components/pdf-viewer/pdfjs-dist/cmaps/EUC-V.bcmap +0 -0
  936. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Ext-H.bcmap +0 -0
  937. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Ext-RKSJ-H.bcmap +0 -0
  938. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Ext-RKSJ-V.bcmap +0 -0
  939. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Ext-V.bcmap +0 -0
  940. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GB-EUC-H.bcmap +0 -0
  941. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GB-EUC-V.bcmap +0 -0
  942. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GB-H.bcmap +4 -0
  943. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GB-V.bcmap +0 -0
  944. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GBK-EUC-H.bcmap +0 -0
  945. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GBK-EUC-V.bcmap +0 -0
  946. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GBK2K-H.bcmap +0 -0
  947. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GBK2K-V.bcmap +0 -0
  948. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GBKp-EUC-H.bcmap +0 -0
  949. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GBKp-EUC-V.bcmap +0 -0
  950. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GBT-EUC-H.bcmap +0 -0
  951. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GBT-EUC-V.bcmap +0 -0
  952. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GBT-H.bcmap +0 -0
  953. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GBT-V.bcmap +0 -0
  954. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GBTpc-EUC-H.bcmap +0 -0
  955. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GBTpc-EUC-V.bcmap +0 -0
  956. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GBpc-EUC-H.bcmap +0 -0
  957. package/src/components/pdf-viewer/pdfjs-dist/cmaps/GBpc-EUC-V.bcmap +0 -0
  958. package/src/components/pdf-viewer/pdfjs-dist/cmaps/H.bcmap +0 -0
  959. package/src/components/pdf-viewer/pdfjs-dist/cmaps/HKdla-B5-H.bcmap +0 -0
  960. package/src/components/pdf-viewer/pdfjs-dist/cmaps/HKdla-B5-V.bcmap +0 -0
  961. package/src/components/pdf-viewer/pdfjs-dist/cmaps/HKdlb-B5-H.bcmap +0 -0
  962. package/src/components/pdf-viewer/pdfjs-dist/cmaps/HKdlb-B5-V.bcmap +0 -0
  963. package/src/components/pdf-viewer/pdfjs-dist/cmaps/HKgccs-B5-H.bcmap +0 -0
  964. package/src/components/pdf-viewer/pdfjs-dist/cmaps/HKgccs-B5-V.bcmap +0 -0
  965. package/src/components/pdf-viewer/pdfjs-dist/cmaps/HKm314-B5-H.bcmap +0 -0
  966. package/src/components/pdf-viewer/pdfjs-dist/cmaps/HKm314-B5-V.bcmap +0 -0
  967. package/src/components/pdf-viewer/pdfjs-dist/cmaps/HKm471-B5-H.bcmap +0 -0
  968. package/src/components/pdf-viewer/pdfjs-dist/cmaps/HKm471-B5-V.bcmap +0 -0
  969. package/src/components/pdf-viewer/pdfjs-dist/cmaps/HKscs-B5-H.bcmap +0 -0
  970. package/src/components/pdf-viewer/pdfjs-dist/cmaps/HKscs-B5-V.bcmap +0 -0
  971. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Hankaku.bcmap +0 -0
  972. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Hiragana.bcmap +0 -0
  973. package/src/components/pdf-viewer/pdfjs-dist/cmaps/KSC-EUC-H.bcmap +0 -0
  974. package/src/components/pdf-viewer/pdfjs-dist/cmaps/KSC-EUC-V.bcmap +0 -0
  975. package/src/components/pdf-viewer/pdfjs-dist/cmaps/KSC-H.bcmap +0 -0
  976. package/src/components/pdf-viewer/pdfjs-dist/cmaps/KSC-Johab-H.bcmap +0 -0
  977. package/src/components/pdf-viewer/pdfjs-dist/cmaps/KSC-Johab-V.bcmap +0 -0
  978. package/src/components/pdf-viewer/pdfjs-dist/cmaps/KSC-V.bcmap +0 -0
  979. package/src/components/pdf-viewer/pdfjs-dist/cmaps/KSCms-UHC-H.bcmap +0 -0
  980. package/src/components/pdf-viewer/pdfjs-dist/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  981. package/src/components/pdf-viewer/pdfjs-dist/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  982. package/src/components/pdf-viewer/pdfjs-dist/cmaps/KSCms-UHC-V.bcmap +0 -0
  983. package/src/components/pdf-viewer/pdfjs-dist/cmaps/KSCpc-EUC-H.bcmap +0 -0
  984. package/src/components/pdf-viewer/pdfjs-dist/cmaps/KSCpc-EUC-V.bcmap +0 -0
  985. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Katakana.bcmap +0 -0
  986. package/src/components/pdf-viewer/pdfjs-dist/cmaps/LICENSE +36 -0
  987. package/src/components/pdf-viewer/pdfjs-dist/cmaps/NWP-H.bcmap +0 -0
  988. package/src/components/pdf-viewer/pdfjs-dist/cmaps/NWP-V.bcmap +0 -0
  989. package/src/components/pdf-viewer/pdfjs-dist/cmaps/RKSJ-H.bcmap +0 -0
  990. package/src/components/pdf-viewer/pdfjs-dist/cmaps/RKSJ-V.bcmap +0 -0
  991. package/src/components/pdf-viewer/pdfjs-dist/cmaps/Roman.bcmap +0 -0
  992. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  993. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  994. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  995. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  996. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  997. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  998. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  999. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  1000. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniGB-UCS2-H.bcmap +0 -0
  1001. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniGB-UCS2-V.bcmap +0 -0
  1002. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniGB-UTF16-H.bcmap +0 -0
  1003. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniGB-UTF16-V.bcmap +0 -0
  1004. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniGB-UTF32-H.bcmap +0 -0
  1005. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniGB-UTF32-V.bcmap +0 -0
  1006. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniGB-UTF8-H.bcmap +0 -0
  1007. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniGB-UTF8-V.bcmap +0 -0
  1008. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  1009. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  1010. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  1011. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  1012. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  1013. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  1014. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  1015. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  1016. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  1017. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  1018. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  1019. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  1020. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  1021. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  1022. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  1023. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  1024. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  1025. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  1026. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  1027. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  1028. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  1029. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  1030. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  1031. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniKS-UCS2-H.bcmap +0 -0
  1032. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniKS-UCS2-V.bcmap +0 -0
  1033. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniKS-UTF16-H.bcmap +0 -0
  1034. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniKS-UTF16-V.bcmap +0 -0
  1035. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniKS-UTF32-H.bcmap +0 -0
  1036. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniKS-UTF32-V.bcmap +0 -0
  1037. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniKS-UTF8-H.bcmap +0 -0
  1038. package/src/components/pdf-viewer/pdfjs-dist/cmaps/UniKS-UTF8-V.bcmap +0 -0
  1039. package/src/components/pdf-viewer/pdfjs-dist/cmaps/V.bcmap +0 -0
  1040. package/src/components/pdf-viewer/pdfjs-dist/cmaps/WP-Symbol.bcmap +0 -0
  1041. package/src/components/pdf-viewer/pdfjs-dist/es5/build/pdf.js +25473 -0
  1042. package/src/components/pdf-viewer/pdfjs-dist/es5/build/pdf.js.map +1 -0
  1043. package/src/components/pdf-viewer/pdfjs-dist/es5/build/pdf.worker.entry.js +19 -0
  1044. package/src/components/pdf-viewer/pdfjs-dist/es5/build/pdf.worker.js +57878 -0
  1045. package/src/components/pdf-viewer/pdfjs-dist/es5/build/pdf.worker.js.map +1 -0
  1046. package/src/components/pdf-viewer/pdfjs-dist/es5/web/images/annotation-check.svg +11 -0
  1047. package/src/components/pdf-viewer/pdfjs-dist/es5/web/images/annotation-comment.svg +16 -0
  1048. package/src/components/pdf-viewer/pdfjs-dist/es5/web/images/annotation-help.svg +26 -0
  1049. package/src/components/pdf-viewer/pdfjs-dist/es5/web/images/annotation-insert.svg +10 -0
  1050. package/src/components/pdf-viewer/pdfjs-dist/es5/web/images/annotation-key.svg +11 -0
  1051. package/src/components/pdf-viewer/pdfjs-dist/es5/web/images/annotation-newparagraph.svg +11 -0
  1052. package/src/components/pdf-viewer/pdfjs-dist/es5/web/images/annotation-noicon.svg +7 -0
  1053. package/src/components/pdf-viewer/pdfjs-dist/es5/web/images/annotation-note.svg +42 -0
  1054. package/src/components/pdf-viewer/pdfjs-dist/es5/web/images/annotation-paragraph.svg +16 -0
  1055. package/src/components/pdf-viewer/pdfjs-dist/es5/web/images/loading-icon.gif +0 -0
  1056. package/src/components/pdf-viewer/pdfjs-dist/es5/web/images/shadow.png +0 -0
  1057. package/src/components/pdf-viewer/pdfjs-dist/es5/web/images/texture.png +0 -0
  1058. package/src/components/pdf-viewer/pdfjs-dist/es5/web/pdf_viewer.css +407 -0
  1059. package/src/components/pdf-viewer/pdfjs-dist/es5/web/pdf_viewer.js +7757 -0
  1060. package/src/components/pdf-viewer/pdfjs-dist/es5/web/pdf_viewer.js.map +1 -0
  1061. package/src/components/pdf-viewer/pdfjs-dist/image_decoders/pdf.image_decoders.js +7994 -0
  1062. package/src/components/pdf-viewer/pdfjs-dist/image_decoders/pdf.image_decoders.js.map +1 -0
  1063. package/src/components/pdf-viewer/pdfjs-dist/image_decoders/pdf.image_decoders.min.js +22 -0
  1064. package/src/components/pdf-viewer/pdfjs-dist/lib/README.md +7 -0
  1065. package/src/components/pdf-viewer/pdfjs-dist/lib/core/annotation.js +1098 -0
  1066. package/src/components/pdf-viewer/pdfjs-dist/lib/core/arithmetic_decoder.js +369 -0
  1067. package/src/components/pdf-viewer/pdfjs-dist/lib/core/bidi.js +327 -0
  1068. package/src/components/pdf-viewer/pdfjs-dist/lib/core/ccitt.js +720 -0
  1069. package/src/components/pdf-viewer/pdfjs-dist/lib/core/ccitt_stream.js +82 -0
  1070. package/src/components/pdf-viewer/pdfjs-dist/lib/core/cff_parser.js +1818 -0
  1071. package/src/components/pdf-viewer/pdfjs-dist/lib/core/charsets.js +33 -0
  1072. package/src/components/pdf-viewer/pdfjs-dist/lib/core/chunked_stream.js +628 -0
  1073. package/src/components/pdf-viewer/pdfjs-dist/lib/core/cmap.js +912 -0
  1074. package/src/components/pdf-viewer/pdfjs-dist/lib/core/colorspace.js +1061 -0
  1075. package/src/components/pdf-viewer/pdfjs-dist/lib/core/core_utils.js +152 -0
  1076. package/src/components/pdf-viewer/pdfjs-dist/lib/core/crypto.js +1605 -0
  1077. package/src/components/pdf-viewer/pdfjs-dist/lib/core/document.js +760 -0
  1078. package/src/components/pdf-viewer/pdfjs-dist/lib/core/encodings.js +69 -0
  1079. package/src/components/pdf-viewer/pdfjs-dist/lib/core/evaluator.js +3576 -0
  1080. package/src/components/pdf-viewer/pdfjs-dist/lib/core/font_renderer.js +981 -0
  1081. package/src/components/pdf-viewer/pdfjs-dist/lib/core/fonts.js +3239 -0
  1082. package/src/components/pdf-viewer/pdfjs-dist/lib/core/function.js +1366 -0
  1083. package/src/components/pdf-viewer/pdfjs-dist/lib/core/glyphlist.js +4556 -0
  1084. package/src/components/pdf-viewer/pdfjs-dist/lib/core/image.js +707 -0
  1085. package/src/components/pdf-viewer/pdfjs-dist/lib/core/image_utils.js +94 -0
  1086. package/src/components/pdf-viewer/pdfjs-dist/lib/core/jbig2.js +2223 -0
  1087. package/src/components/pdf-viewer/pdfjs-dist/lib/core/jbig2_stream.js +99 -0
  1088. package/src/components/pdf-viewer/pdfjs-dist/lib/core/jpeg_stream.js +236 -0
  1089. package/src/components/pdf-viewer/pdfjs-dist/lib/core/jpg.js +1264 -0
  1090. package/src/components/pdf-viewer/pdfjs-dist/lib/core/jpx.js +2351 -0
  1091. package/src/components/pdf-viewer/pdfjs-dist/lib/core/jpx_stream.js +102 -0
  1092. package/src/components/pdf-viewer/pdfjs-dist/lib/core/metrics.js +2969 -0
  1093. package/src/components/pdf-viewer/pdfjs-dist/lib/core/murmurhash3.js +141 -0
  1094. package/src/components/pdf-viewer/pdfjs-dist/lib/core/obj.js +2262 -0
  1095. package/src/components/pdf-viewer/pdfjs-dist/lib/core/operator_list.js +672 -0
  1096. package/src/components/pdf-viewer/pdfjs-dist/lib/core/parser.js +1322 -0
  1097. package/src/components/pdf-viewer/pdfjs-dist/lib/core/pattern.js +954 -0
  1098. package/src/components/pdf-viewer/pdfjs-dist/lib/core/pdf_manager.js +222 -0
  1099. package/src/components/pdf-viewer/pdfjs-dist/lib/core/primitives.js +329 -0
  1100. package/src/components/pdf-viewer/pdfjs-dist/lib/core/ps_parser.js +269 -0
  1101. package/src/components/pdf-viewer/pdfjs-dist/lib/core/standard_fonts.js +759 -0
  1102. package/src/components/pdf-viewer/pdfjs-dist/lib/core/stream.js +1317 -0
  1103. package/src/components/pdf-viewer/pdfjs-dist/lib/core/type1_parser.js +726 -0
  1104. package/src/components/pdf-viewer/pdfjs-dist/lib/core/unicode.js +1899 -0
  1105. package/src/components/pdf-viewer/pdfjs-dist/lib/core/worker.js +551 -0
  1106. package/src/components/pdf-viewer/pdfjs-dist/lib/core/worker_stream.js +168 -0
  1107. package/src/components/pdf-viewer/pdfjs-dist/lib/display/annotation_layer.js +1048 -0
  1108. package/src/components/pdf-viewer/pdfjs-dist/lib/display/api.js +2206 -0
  1109. package/src/components/pdf-viewer/pdfjs-dist/lib/display/api_compatibility.js +47 -0
  1110. package/src/components/pdf-viewer/pdfjs-dist/lib/display/canvas.js +2088 -0
  1111. package/src/components/pdf-viewer/pdfjs-dist/lib/display/content_disposition.js +203 -0
  1112. package/src/components/pdf-viewer/pdfjs-dist/lib/display/display_utils.js +524 -0
  1113. package/src/components/pdf-viewer/pdfjs-dist/lib/display/fetch_stream.js +301 -0
  1114. package/src/components/pdf-viewer/pdfjs-dist/lib/display/font_loader.js +402 -0
  1115. package/src/components/pdf-viewer/pdfjs-dist/lib/display/metadata.js +143 -0
  1116. package/src/components/pdf-viewer/pdfjs-dist/lib/display/network.js +572 -0
  1117. package/src/components/pdf-viewer/pdfjs-dist/lib/display/network_utils.js +107 -0
  1118. package/src/components/pdf-viewer/pdfjs-dist/lib/display/node_stream.js +482 -0
  1119. package/src/components/pdf-viewer/pdfjs-dist/lib/display/pattern_helper.js +496 -0
  1120. package/src/components/pdf-viewer/pdfjs-dist/lib/display/svg.js +1511 -0
  1121. package/src/components/pdf-viewer/pdfjs-dist/lib/display/text_layer.js +698 -0
  1122. package/src/components/pdf-viewer/pdfjs-dist/lib/display/transport_stream.js +370 -0
  1123. package/src/components/pdf-viewer/pdfjs-dist/lib/display/webgl.js +462 -0
  1124. package/src/components/pdf-viewer/pdfjs-dist/lib/display/worker_options.js +31 -0
  1125. package/src/components/pdf-viewer/pdfjs-dist/lib/display/xml_parser.js +458 -0
  1126. package/src/components/pdf-viewer/pdfjs-dist/lib/examples/node/domstubs.js +302 -0
  1127. package/src/components/pdf-viewer/pdfjs-dist/lib/external/webL10n/l10n.js +1028 -0
  1128. package/src/components/pdf-viewer/pdfjs-dist/lib/pdf.js +104 -0
  1129. package/src/components/pdf-viewer/pdfjs-dist/lib/pdf.worker.js +29 -0
  1130. package/src/components/pdf-viewer/pdfjs-dist/lib/shared/compatibility.js +24 -0
  1131. package/src/components/pdf-viewer/pdfjs-dist/lib/shared/is_node.js +29 -0
  1132. package/src/components/pdf-viewer/pdfjs-dist/lib/shared/message_handler.js +516 -0
  1133. package/src/components/pdf-viewer/pdfjs-dist/lib/shared/util.js +837 -0
  1134. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/annotation_spec.js +2238 -0
  1135. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/api_spec.js +1613 -0
  1136. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/bidi_spec.js +41 -0
  1137. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/cff_parser_spec.js +322 -0
  1138. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/clitests_helper.js +39 -0
  1139. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/cmap_spec.js +357 -0
  1140. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/colorspace_spec.js +342 -0
  1141. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/core_utils_spec.js +211 -0
  1142. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/crypto_spec.js +537 -0
  1143. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/custom_spec.js +108 -0
  1144. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/display_svg_spec.js +160 -0
  1145. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/display_utils_spec.js +263 -0
  1146. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/document_spec.js +42 -0
  1147. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/encodings_spec.js +45 -0
  1148. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/evaluator_spec.js +322 -0
  1149. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/fetch_stream_spec.js +111 -0
  1150. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/function_spec.js +645 -0
  1151. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/jasmine-boot.js +155 -0
  1152. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/message_handler_spec.js +365 -0
  1153. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/metadata_spec.js +118 -0
  1154. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/murmurhash3_spec.js +71 -0
  1155. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/network_spec.js +120 -0
  1156. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/network_utils_spec.js +349 -0
  1157. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/node_stream_spec.js +227 -0
  1158. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/parser_spec.js +240 -0
  1159. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/pdf_find_controller_spec.js +199 -0
  1160. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/pdf_find_utils_spec.js +63 -0
  1161. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/pdf_history_spec.js +95 -0
  1162. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/primitives_spec.js +333 -0
  1163. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/stream_spec.js +78 -0
  1164. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/test_utils.js +217 -0
  1165. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/testreporter.js +102 -0
  1166. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/type1_parser_spec.js +104 -0
  1167. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/ui_utils_spec.js +711 -0
  1168. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/unicode_spec.js +121 -0
  1169. package/src/components/pdf-viewer/pdfjs-dist/lib/test/unit/util_spec.js +241 -0
  1170. package/src/components/pdf-viewer/pdfjs-dist/lib/web/annotation_layer_builder.js +126 -0
  1171. package/src/components/pdf-viewer/pdfjs-dist/lib/web/app.js +2424 -0
  1172. package/src/components/pdf-viewer/pdfjs-dist/lib/web/app_options.js +257 -0
  1173. package/src/components/pdf-viewer/pdfjs-dist/lib/web/base_viewer.js +1127 -0
  1174. package/src/components/pdf-viewer/pdfjs-dist/lib/web/chromecom.js +392 -0
  1175. package/src/components/pdf-viewer/pdfjs-dist/lib/web/debugger.js +670 -0
  1176. package/src/components/pdf-viewer/pdfjs-dist/lib/web/download_manager.js +100 -0
  1177. package/src/components/pdf-viewer/pdfjs-dist/lib/web/firefox_print_service.js +119 -0
  1178. package/src/components/pdf-viewer/pdfjs-dist/lib/web/firefoxcom.js +363 -0
  1179. package/src/components/pdf-viewer/pdfjs-dist/lib/web/genericcom.js +69 -0
  1180. package/src/components/pdf-viewer/pdfjs-dist/lib/web/genericl10n.js +65 -0
  1181. package/src/components/pdf-viewer/pdfjs-dist/lib/web/grab_to_pan.js +180 -0
  1182. package/src/components/pdf-viewer/pdfjs-dist/lib/web/interfaces.js +125 -0
  1183. package/src/components/pdf-viewer/pdfjs-dist/lib/web/overlay_manager.js +126 -0
  1184. package/src/components/pdf-viewer/pdfjs-dist/lib/web/password_prompt.js +94 -0
  1185. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_attachment_viewer.js +164 -0
  1186. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_cursor_tools.js +139 -0
  1187. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_document_properties.js +315 -0
  1188. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_find_bar.js +226 -0
  1189. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_find_controller.js +696 -0
  1190. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_find_utils.js +111 -0
  1191. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_history.js +601 -0
  1192. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_link_service.js +455 -0
  1193. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_outline_viewer.js +215 -0
  1194. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_page_view.js +613 -0
  1195. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_presentation_mode.js +420 -0
  1196. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_print_service.js +316 -0
  1197. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_rendering_queue.js +151 -0
  1198. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_sidebar.js +397 -0
  1199. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_sidebar_resizer.js +164 -0
  1200. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_single_page_viewer.js +137 -0
  1201. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_thumbnail_view.js +425 -0
  1202. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_thumbnail_viewer.js +272 -0
  1203. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_viewer.component.js +147 -0
  1204. package/src/components/pdf-viewer/pdfjs-dist/lib/web/pdf_viewer.js +102 -0
  1205. package/src/components/pdf-viewer/pdfjs-dist/lib/web/preferences.js +162 -0
  1206. package/src/components/pdf-viewer/pdfjs-dist/lib/web/secondary_toolbar.js +333 -0
  1207. package/src/components/pdf-viewer/pdfjs-dist/lib/web/text_layer_builder.js +401 -0
  1208. package/src/components/pdf-viewer/pdfjs-dist/lib/web/toolbar.js +285 -0
  1209. package/src/components/pdf-viewer/pdfjs-dist/lib/web/ui_utils.js +802 -0
  1210. package/src/components/pdf-viewer/pdfjs-dist/lib/web/view_history.js +112 -0
  1211. package/src/components/pdf-viewer/pdfjs-dist/lib/web/viewer_compatibility.js +38 -0
  1212. package/src/components/pdf-viewer/pdfjs-dist/package.json +54 -0
  1213. package/src/components/pdf-viewer/pdfjs-dist/web/images/annotation-check.svg +11 -0
  1214. package/src/components/pdf-viewer/pdfjs-dist/web/images/annotation-comment.svg +16 -0
  1215. package/src/components/pdf-viewer/pdfjs-dist/web/images/annotation-help.svg +26 -0
  1216. package/src/components/pdf-viewer/pdfjs-dist/web/images/annotation-insert.svg +10 -0
  1217. package/src/components/pdf-viewer/pdfjs-dist/web/images/annotation-key.svg +11 -0
  1218. package/src/components/pdf-viewer/pdfjs-dist/web/images/annotation-newparagraph.svg +11 -0
  1219. package/src/components/pdf-viewer/pdfjs-dist/web/images/annotation-noicon.svg +7 -0
  1220. package/src/components/pdf-viewer/pdfjs-dist/web/images/annotation-note.svg +42 -0
  1221. package/src/components/pdf-viewer/pdfjs-dist/web/images/annotation-paragraph.svg +16 -0
  1222. package/src/components/pdf-viewer/pdfjs-dist/web/images/loading-icon.gif +0 -0
  1223. package/src/components/pdf-viewer/pdfjs-dist/web/images/shadow.png +0 -0
  1224. package/src/components/pdf-viewer/pdfjs-dist/web/images/texture.png +0 -0
  1225. package/src/components/pdf-viewer/pdfjs-dist/web/pdf_viewer.css +407 -0
  1226. package/src/components/pdf-viewer/pdfjs-dist/web/pdf_viewer.js +6394 -0
  1227. package/src/components/pdf-viewer/pdfjs-dist/web/pdf_viewer.js.map +1 -0
  1228. package/src/components/pdf-viewer/pdfjs-dist/webpack.js +33 -0
  1229. package/src/components/pdf-viewer/styles/_annotation_layer_builder.scss +205 -0
  1230. package/src/components/pdf-viewer/styles/_colors.scss +551 -0
  1231. package/src/components/pdf-viewer/styles/_pdf_viewer.scss +131 -0
  1232. package/src/components/pdf-viewer/styles/_text_layer_builder.scss +76 -0
  1233. package/src/components/pdf-viewer/styles/_variables.scss +63 -0
  1234. package/src/components/pdf-viewer/styles/_viewer.scss +1413 -0
  1235. package/src/components/pdf-viewer/styles/index.css +0 -0
  1236. package/src/components/pdf-viewer/styles/index.scss +4 -0
  1237. package/src/components/pdf-viewer/utils/constants.js +1 -0
  1238. package/src/components/pdf-viewer/utils/locale.js +290 -0
  1239. package/src/components/pdf-viewer/utils/pdf-config.js +137 -0
  1240. package/src/components/pdf-viewer/utils/toolbar-config.js +60 -0
  1241. package/src/components/popover/Popover.vue +15 -2
  1242. package/src/components/select/Select.vue +4 -2
@@ -0,0 +1,3239 @@
1
+ /**
2
+ * @licstart The following is the entire license notice for the
3
+ * Javascript code in this page
4
+ *
5
+ * Copyright 2020 Mozilla Foundation
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * @licend The above is the entire license notice for the
20
+ * Javascript code in this page
21
+ */
22
+ "use strict";
23
+
24
+ Object.defineProperty(exports, "__esModule", {
25
+ value: true
26
+ });
27
+ exports.getFontType = getFontType;
28
+ exports.IdentityToUnicodeMap = exports.ToUnicodeMap = exports.FontFlags = exports.Font = exports.ErrorFont = exports.SEAC_ANALYSIS_ENABLED = void 0;
29
+
30
+ var _util = require("../shared/util.js");
31
+
32
+ var _cff_parser = require("./cff_parser.js");
33
+
34
+ var _glyphlist = require("./glyphlist.js");
35
+
36
+ var _encodings = require("./encodings.js");
37
+
38
+ var _standard_fonts = require("./standard_fonts.js");
39
+
40
+ var _unicode = require("./unicode.js");
41
+
42
+ var _core_utils = require("./core_utils.js");
43
+
44
+ var _font_renderer = require("./font_renderer.js");
45
+
46
+ var _cmap = require("./cmap.js");
47
+
48
+ var _stream = require("./stream.js");
49
+
50
+ var _type1_parser = require("./type1_parser.js");
51
+
52
+ const PRIVATE_USE_AREAS = [[0xe000, 0xf8ff], [0x100000, 0x10fffd]];
53
+ var PDF_GLYPH_SPACE_UNITS = 1000;
54
+ var SEAC_ANALYSIS_ENABLED = true;
55
+ exports.SEAC_ANALYSIS_ENABLED = SEAC_ANALYSIS_ENABLED;
56
+ var FontFlags = {
57
+ FixedPitch: 1,
58
+ Serif: 2,
59
+ Symbolic: 4,
60
+ Script: 8,
61
+ Nonsymbolic: 32,
62
+ Italic: 64,
63
+ AllCap: 65536,
64
+ SmallCap: 131072,
65
+ ForceBold: 262144
66
+ };
67
+ exports.FontFlags = FontFlags;
68
+ var 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"];
69
+
70
+ function adjustWidths(properties) {
71
+ if (!properties.fontMatrix) {
72
+ return;
73
+ }
74
+
75
+ if (properties.fontMatrix[0] === _util.FONT_IDENTITY_MATRIX[0]) {
76
+ return;
77
+ }
78
+
79
+ var scale = 0.001 / properties.fontMatrix[0];
80
+ var glyphsWidths = properties.widths;
81
+
82
+ for (var glyph in glyphsWidths) {
83
+ glyphsWidths[glyph] *= scale;
84
+ }
85
+
86
+ properties.defaultWidth *= scale;
87
+ }
88
+
89
+ function adjustToUnicode(properties, builtInEncoding) {
90
+ if (properties.hasIncludedToUnicodeMap) {
91
+ return;
92
+ }
93
+
94
+ if (properties.hasEncoding) {
95
+ return;
96
+ }
97
+
98
+ if (builtInEncoding === properties.defaultEncoding) {
99
+ return;
100
+ }
101
+
102
+ if (properties.toUnicode instanceof IdentityToUnicodeMap) {
103
+ return;
104
+ }
105
+
106
+ var toUnicode = [],
107
+ glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)();
108
+
109
+ for (var charCode in builtInEncoding) {
110
+ var glyphName = builtInEncoding[charCode];
111
+ var unicode = (0, _unicode.getUnicodeForGlyph)(glyphName, glyphsUnicodeMap);
112
+
113
+ if (unicode !== -1) {
114
+ toUnicode[charCode] = String.fromCharCode(unicode);
115
+ }
116
+ }
117
+
118
+ properties.toUnicode.amend(toUnicode);
119
+ }
120
+
121
+ function getFontType(type, subtype) {
122
+ switch (type) {
123
+ case "Type1":
124
+ return subtype === "Type1C" ? _util.FontType.TYPE1C : _util.FontType.TYPE1;
125
+
126
+ case "CIDFontType0":
127
+ return subtype === "CIDFontType0C" ? _util.FontType.CIDFONTTYPE0C : _util.FontType.CIDFONTTYPE0;
128
+
129
+ case "OpenType":
130
+ return _util.FontType.OPENTYPE;
131
+
132
+ case "TrueType":
133
+ return _util.FontType.TRUETYPE;
134
+
135
+ case "CIDFontType2":
136
+ return _util.FontType.CIDFONTTYPE2;
137
+
138
+ case "MMType1":
139
+ return _util.FontType.MMTYPE1;
140
+
141
+ case "Type0":
142
+ return _util.FontType.TYPE0;
143
+
144
+ default:
145
+ return _util.FontType.UNKNOWN;
146
+ }
147
+ }
148
+
149
+ function recoverGlyphName(name, glyphsUnicodeMap) {
150
+ if (glyphsUnicodeMap[name] !== undefined) {
151
+ return name;
152
+ }
153
+
154
+ var unicode = (0, _unicode.getUnicodeForGlyph)(name, glyphsUnicodeMap);
155
+
156
+ if (unicode !== -1) {
157
+ for (var key in glyphsUnicodeMap) {
158
+ if (glyphsUnicodeMap[key] === unicode) {
159
+ return key;
160
+ }
161
+ }
162
+ }
163
+
164
+ (0, _util.info)("Unable to recover a standard glyph name for: " + name);
165
+ return name;
166
+ }
167
+
168
+ var Glyph = function GlyphClosure() {
169
+ function Glyph(fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont) {
170
+ this.fontChar = fontChar;
171
+ this.unicode = unicode;
172
+ this.accent = accent;
173
+ this.width = width;
174
+ this.vmetric = vmetric;
175
+ this.operatorListId = operatorListId;
176
+ this.isSpace = isSpace;
177
+ this.isInFont = isInFont;
178
+ }
179
+
180
+ Glyph.prototype.matchesForCache = function (fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont) {
181
+ return this.fontChar === fontChar && this.unicode === unicode && this.accent === accent && this.width === width && this.vmetric === vmetric && this.operatorListId === operatorListId && this.isSpace === isSpace && this.isInFont === isInFont;
182
+ };
183
+
184
+ return Glyph;
185
+ }();
186
+
187
+ var ToUnicodeMap = function ToUnicodeMapClosure() {
188
+ function ToUnicodeMap(cmap = []) {
189
+ this._map = cmap;
190
+ }
191
+
192
+ ToUnicodeMap.prototype = {
193
+ get length() {
194
+ return this._map.length;
195
+ },
196
+
197
+ forEach(callback) {
198
+ for (var charCode in this._map) {
199
+ callback(charCode, this._map[charCode].charCodeAt(0));
200
+ }
201
+ },
202
+
203
+ has(i) {
204
+ return this._map[i] !== undefined;
205
+ },
206
+
207
+ get(i) {
208
+ return this._map[i];
209
+ },
210
+
211
+ charCodeOf(value) {
212
+ const map = this._map;
213
+
214
+ if (map.length <= 0x10000) {
215
+ return map.indexOf(value);
216
+ }
217
+
218
+ for (const charCode in map) {
219
+ if (map[charCode] === value) {
220
+ return charCode | 0;
221
+ }
222
+ }
223
+
224
+ return -1;
225
+ },
226
+
227
+ amend(map) {
228
+ for (var charCode in map) {
229
+ this._map[charCode] = map[charCode];
230
+ }
231
+ }
232
+
233
+ };
234
+ return ToUnicodeMap;
235
+ }();
236
+
237
+ exports.ToUnicodeMap = ToUnicodeMap;
238
+
239
+ var IdentityToUnicodeMap = function IdentityToUnicodeMapClosure() {
240
+ function IdentityToUnicodeMap(firstChar, lastChar) {
241
+ this.firstChar = firstChar;
242
+ this.lastChar = lastChar;
243
+ }
244
+
245
+ IdentityToUnicodeMap.prototype = {
246
+ get length() {
247
+ return this.lastChar + 1 - this.firstChar;
248
+ },
249
+
250
+ forEach(callback) {
251
+ for (var i = this.firstChar, ii = this.lastChar; i <= ii; i++) {
252
+ callback(i, i);
253
+ }
254
+ },
255
+
256
+ has(i) {
257
+ return this.firstChar <= i && i <= this.lastChar;
258
+ },
259
+
260
+ get(i) {
261
+ if (this.firstChar <= i && i <= this.lastChar) {
262
+ return String.fromCharCode(i);
263
+ }
264
+
265
+ return undefined;
266
+ },
267
+
268
+ charCodeOf(v) {
269
+ return Number.isInteger(v) && v >= this.firstChar && v <= this.lastChar ? v : -1;
270
+ },
271
+
272
+ amend(map) {
273
+ (0, _util.unreachable)("Should not call amend()");
274
+ }
275
+
276
+ };
277
+ return IdentityToUnicodeMap;
278
+ }();
279
+
280
+ exports.IdentityToUnicodeMap = IdentityToUnicodeMap;
281
+
282
+ var OpenTypeFileBuilder = function OpenTypeFileBuilderClosure() {
283
+ function writeInt16(dest, offset, num) {
284
+ dest[offset] = num >> 8 & 0xff;
285
+ dest[offset + 1] = num & 0xff;
286
+ }
287
+
288
+ function writeInt32(dest, offset, num) {
289
+ dest[offset] = num >> 24 & 0xff;
290
+ dest[offset + 1] = num >> 16 & 0xff;
291
+ dest[offset + 2] = num >> 8 & 0xff;
292
+ dest[offset + 3] = num & 0xff;
293
+ }
294
+
295
+ function writeData(dest, offset, data) {
296
+ var i, ii;
297
+
298
+ if (data instanceof Uint8Array) {
299
+ dest.set(data, offset);
300
+ } else if (typeof data === "string") {
301
+ for (i = 0, ii = data.length; i < ii; i++) {
302
+ dest[offset++] = data.charCodeAt(i) & 0xff;
303
+ }
304
+ } else {
305
+ for (i = 0, ii = data.length; i < ii; i++) {
306
+ dest[offset++] = data[i] & 0xff;
307
+ }
308
+ }
309
+ }
310
+
311
+ function OpenTypeFileBuilder(sfnt) {
312
+ this.sfnt = sfnt;
313
+ this.tables = Object.create(null);
314
+ }
315
+
316
+ OpenTypeFileBuilder.getSearchParams = function OpenTypeFileBuilder_getSearchParams(entriesCount, entrySize) {
317
+ var maxPower2 = 1,
318
+ log2 = 0;
319
+
320
+ while ((maxPower2 ^ entriesCount) > maxPower2) {
321
+ maxPower2 <<= 1;
322
+ log2++;
323
+ }
324
+
325
+ var searchRange = maxPower2 * entrySize;
326
+ return {
327
+ range: searchRange,
328
+ entry: log2,
329
+ rangeShift: entrySize * entriesCount - searchRange
330
+ };
331
+ };
332
+
333
+ var OTF_HEADER_SIZE = 12;
334
+ var OTF_TABLE_ENTRY_SIZE = 16;
335
+ OpenTypeFileBuilder.prototype = {
336
+ toArray: function OpenTypeFileBuilder_toArray() {
337
+ var sfnt = this.sfnt;
338
+ var tables = this.tables;
339
+ var tablesNames = Object.keys(tables);
340
+ tablesNames.sort();
341
+ var numTables = tablesNames.length;
342
+ var i, j, jj, table, tableName;
343
+ var offset = OTF_HEADER_SIZE + numTables * OTF_TABLE_ENTRY_SIZE;
344
+ var tableOffsets = [offset];
345
+
346
+ for (i = 0; i < numTables; i++) {
347
+ table = tables[tablesNames[i]];
348
+ var paddedLength = (table.length + 3 & ~3) >>> 0;
349
+ offset += paddedLength;
350
+ tableOffsets.push(offset);
351
+ }
352
+
353
+ var file = new Uint8Array(offset);
354
+
355
+ for (i = 0; i < numTables; i++) {
356
+ table = tables[tablesNames[i]];
357
+ writeData(file, tableOffsets[i], table);
358
+ }
359
+
360
+ if (sfnt === "true") {
361
+ sfnt = (0, _util.string32)(0x00010000);
362
+ }
363
+
364
+ file[0] = sfnt.charCodeAt(0) & 0xff;
365
+ file[1] = sfnt.charCodeAt(1) & 0xff;
366
+ file[2] = sfnt.charCodeAt(2) & 0xff;
367
+ file[3] = sfnt.charCodeAt(3) & 0xff;
368
+ writeInt16(file, 4, numTables);
369
+ var searchParams = OpenTypeFileBuilder.getSearchParams(numTables, 16);
370
+ writeInt16(file, 6, searchParams.range);
371
+ writeInt16(file, 8, searchParams.entry);
372
+ writeInt16(file, 10, searchParams.rangeShift);
373
+ offset = OTF_HEADER_SIZE;
374
+
375
+ for (i = 0; i < numTables; i++) {
376
+ tableName = tablesNames[i];
377
+ file[offset] = tableName.charCodeAt(0) & 0xff;
378
+ file[offset + 1] = tableName.charCodeAt(1) & 0xff;
379
+ file[offset + 2] = tableName.charCodeAt(2) & 0xff;
380
+ file[offset + 3] = tableName.charCodeAt(3) & 0xff;
381
+ var checksum = 0;
382
+
383
+ for (j = tableOffsets[i], jj = tableOffsets[i + 1]; j < jj; j += 4) {
384
+ var quad = (0, _core_utils.readUint32)(file, j);
385
+ checksum = checksum + quad >>> 0;
386
+ }
387
+
388
+ writeInt32(file, offset + 4, checksum);
389
+ writeInt32(file, offset + 8, tableOffsets[i]);
390
+ writeInt32(file, offset + 12, tables[tableName].length);
391
+ offset += OTF_TABLE_ENTRY_SIZE;
392
+ }
393
+
394
+ return file;
395
+ },
396
+ addTable: function OpenTypeFileBuilder_addTable(tag, data) {
397
+ if (tag in this.tables) {
398
+ throw new Error("Table " + tag + " already exists");
399
+ }
400
+
401
+ this.tables[tag] = data;
402
+ }
403
+ };
404
+ return OpenTypeFileBuilder;
405
+ }();
406
+
407
+ var Font = function FontClosure() {
408
+ function Font(name, file, properties) {
409
+ var charCode;
410
+ this.name = name;
411
+ this.loadedName = properties.loadedName;
412
+ this.isType3Font = properties.isType3Font;
413
+ this.sizes = [];
414
+ this.missingFile = false;
415
+ this.glyphCache = Object.create(null);
416
+ this.isSerifFont = !!(properties.flags & FontFlags.Serif);
417
+ this.isSymbolicFont = !!(properties.flags & FontFlags.Symbolic);
418
+ this.isMonospace = !!(properties.flags & FontFlags.FixedPitch);
419
+ var type = properties.type;
420
+ var subtype = properties.subtype;
421
+ this.type = type;
422
+ this.subtype = subtype;
423
+ let fallbackName = "sans-serif";
424
+
425
+ if (this.isMonospace) {
426
+ fallbackName = "monospace";
427
+ } else if (this.isSerifFont) {
428
+ fallbackName = "serif";
429
+ }
430
+
431
+ this.fallbackName = fallbackName;
432
+ this.differences = properties.differences;
433
+ this.widths = properties.widths;
434
+ this.defaultWidth = properties.defaultWidth;
435
+ this.composite = properties.composite;
436
+ this.wideChars = properties.wideChars;
437
+ this.cMap = properties.cMap;
438
+ this.ascent = properties.ascent / PDF_GLYPH_SPACE_UNITS;
439
+ this.descent = properties.descent / PDF_GLYPH_SPACE_UNITS;
440
+ this.fontMatrix = properties.fontMatrix;
441
+ this.bbox = properties.bbox;
442
+ this.defaultEncoding = properties.defaultEncoding;
443
+ this.toUnicode = properties.toUnicode;
444
+ this.fallbackToUnicode = properties.fallbackToUnicode || new ToUnicodeMap();
445
+ this.toFontChar = [];
446
+
447
+ if (properties.type === "Type3") {
448
+ for (charCode = 0; charCode < 256; charCode++) {
449
+ this.toFontChar[charCode] = this.differences[charCode] || properties.defaultEncoding[charCode];
450
+ }
451
+
452
+ this.fontType = _util.FontType.TYPE3;
453
+ return;
454
+ }
455
+
456
+ this.cidEncoding = properties.cidEncoding;
457
+ this.vertical = properties.vertical;
458
+
459
+ if (this.vertical) {
460
+ this.vmetrics = properties.vmetrics;
461
+ this.defaultVMetrics = properties.defaultVMetrics;
462
+ }
463
+
464
+ if (!file || file.isEmpty) {
465
+ if (file) {
466
+ (0, _util.warn)('Font file is empty in "' + name + '" (' + this.loadedName + ")");
467
+ }
468
+
469
+ this.fallbackToSystemFont();
470
+ return;
471
+ }
472
+
473
+ [type, subtype] = getFontFileType(file, properties);
474
+
475
+ if (type !== this.type || subtype !== this.subtype) {
476
+ (0, _util.info)("Inconsistent font file Type/SubType, expected: " + `${this.type}/${this.subtype} but found: ${type}/${subtype}.`);
477
+ }
478
+
479
+ try {
480
+ var data;
481
+
482
+ switch (type) {
483
+ case "MMType1":
484
+ (0, _util.info)("MMType1 font (" + name + "), falling back to Type1.");
485
+
486
+ case "Type1":
487
+ case "CIDFontType0":
488
+ this.mimetype = "font/opentype";
489
+ var cff = subtype === "Type1C" || subtype === "CIDFontType0C" ? new CFFFont(file, properties) : new Type1Font(name, file, properties);
490
+ adjustWidths(properties);
491
+ data = this.convert(name, cff, properties);
492
+ break;
493
+
494
+ case "OpenType":
495
+ case "TrueType":
496
+ case "CIDFontType2":
497
+ this.mimetype = "font/opentype";
498
+ data = this.checkAndRepair(name, file, properties);
499
+
500
+ if (this.isOpenType) {
501
+ adjustWidths(properties);
502
+ type = "OpenType";
503
+ }
504
+
505
+ break;
506
+
507
+ default:
508
+ throw new _util.FormatError(`Font ${type} is not supported`);
509
+ }
510
+ } catch (e) {
511
+ (0, _util.warn)(e);
512
+ this.fallbackToSystemFont();
513
+ return;
514
+ }
515
+
516
+ this.data = data;
517
+ this.fontType = getFontType(type, subtype);
518
+ this.fontMatrix = properties.fontMatrix;
519
+ this.widths = properties.widths;
520
+ this.defaultWidth = properties.defaultWidth;
521
+ this.toUnicode = properties.toUnicode;
522
+ this.encoding = properties.baseEncoding;
523
+ this.seacMap = properties.seacMap;
524
+ }
525
+
526
+ Font.getFontID = function () {
527
+ var ID = 1;
528
+ return function Font_getFontID() {
529
+ return String(ID++);
530
+ };
531
+ }();
532
+
533
+ function int16(b0, b1) {
534
+ return (b0 << 8) + b1;
535
+ }
536
+
537
+ function writeSignedInt16(bytes, index, value) {
538
+ bytes[index + 1] = value;
539
+ bytes[index] = value >>> 8;
540
+ }
541
+
542
+ function signedInt16(b0, b1) {
543
+ var value = (b0 << 8) + b1;
544
+ return value & 1 << 15 ? value - 0x10000 : value;
545
+ }
546
+
547
+ function int32(b0, b1, b2, b3) {
548
+ return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;
549
+ }
550
+
551
+ function string16(value) {
552
+ return String.fromCharCode(value >> 8 & 0xff, value & 0xff);
553
+ }
554
+
555
+ function safeString16(value) {
556
+ if (value > 0x7fff) {
557
+ value = 0x7fff;
558
+ } else if (value < -0x8000) {
559
+ value = -0x8000;
560
+ }
561
+
562
+ return String.fromCharCode(value >> 8 & 0xff, value & 0xff);
563
+ }
564
+
565
+ function isTrueTypeFile(file) {
566
+ var header = file.peekBytes(4);
567
+ return (0, _core_utils.readUint32)(header, 0) === 0x00010000 || (0, _util.bytesToString)(header) === "true";
568
+ }
569
+
570
+ function isTrueTypeCollectionFile(file) {
571
+ const header = file.peekBytes(4);
572
+ return (0, _util.bytesToString)(header) === "ttcf";
573
+ }
574
+
575
+ function isOpenTypeFile(file) {
576
+ var header = file.peekBytes(4);
577
+ return (0, _util.bytesToString)(header) === "OTTO";
578
+ }
579
+
580
+ function isType1File(file) {
581
+ var header = file.peekBytes(2);
582
+
583
+ if (header[0] === 0x25 && header[1] === 0x21) {
584
+ return true;
585
+ }
586
+
587
+ if (header[0] === 0x80 && header[1] === 0x01) {
588
+ return true;
589
+ }
590
+
591
+ return false;
592
+ }
593
+
594
+ function isCFFFile(file) {
595
+ const header = file.peekBytes(4);
596
+
597
+ if (header[0] >= 1 && header[3] >= 1 && header[3] <= 4) {
598
+ return true;
599
+ }
600
+
601
+ return false;
602
+ }
603
+
604
+ function getFontFileType(file, {
605
+ type,
606
+ subtype,
607
+ composite
608
+ }) {
609
+ let fileType, fileSubtype;
610
+
611
+ if (isTrueTypeFile(file) || isTrueTypeCollectionFile(file)) {
612
+ if (composite) {
613
+ fileType = "CIDFontType2";
614
+ } else {
615
+ fileType = "TrueType";
616
+ }
617
+ } else if (isOpenTypeFile(file)) {
618
+ if (composite) {
619
+ fileType = "CIDFontType2";
620
+ } else {
621
+ fileType = "OpenType";
622
+ }
623
+ } else if (isType1File(file)) {
624
+ if (composite) {
625
+ fileType = "CIDFontType0";
626
+ } else {
627
+ fileType = type === "MMType1" ? "MMType1" : "Type1";
628
+ }
629
+ } else if (isCFFFile(file)) {
630
+ if (composite) {
631
+ fileType = "CIDFontType0";
632
+ fileSubtype = "CIDFontType0C";
633
+ } else {
634
+ fileType = type === "MMType1" ? "MMType1" : "Type1";
635
+ fileSubtype = "Type1C";
636
+ }
637
+ } else {
638
+ (0, _util.warn)("getFontFileType: Unable to detect correct font file Type/Subtype.");
639
+ fileType = type;
640
+ fileSubtype = subtype;
641
+ }
642
+
643
+ return [fileType, fileSubtype];
644
+ }
645
+
646
+ function buildToFontChar(encoding, glyphsUnicodeMap, differences) {
647
+ var toFontChar = [],
648
+ unicode;
649
+
650
+ for (var i = 0, ii = encoding.length; i < ii; i++) {
651
+ unicode = (0, _unicode.getUnicodeForGlyph)(encoding[i], glyphsUnicodeMap);
652
+
653
+ if (unicode !== -1) {
654
+ toFontChar[i] = unicode;
655
+ }
656
+ }
657
+
658
+ for (var charCode in differences) {
659
+ unicode = (0, _unicode.getUnicodeForGlyph)(differences[charCode], glyphsUnicodeMap);
660
+
661
+ if (unicode !== -1) {
662
+ toFontChar[+charCode] = unicode;
663
+ }
664
+ }
665
+
666
+ return toFontChar;
667
+ }
668
+
669
+ function adjustMapping(charCodeToGlyphId, hasGlyph, newGlyphZeroId) {
670
+ var newMap = Object.create(null);
671
+ var toFontChar = [];
672
+ var privateUseAreaIndex = 0;
673
+ var nextAvailableFontCharCode = PRIVATE_USE_AREAS[privateUseAreaIndex][0];
674
+ var privateUseOffetEnd = PRIVATE_USE_AREAS[privateUseAreaIndex][1];
675
+
676
+ for (var originalCharCode in charCodeToGlyphId) {
677
+ originalCharCode |= 0;
678
+ var glyphId = charCodeToGlyphId[originalCharCode];
679
+
680
+ if (!hasGlyph(glyphId)) {
681
+ continue;
682
+ }
683
+
684
+ if (nextAvailableFontCharCode > privateUseOffetEnd) {
685
+ privateUseAreaIndex++;
686
+
687
+ if (privateUseAreaIndex >= PRIVATE_USE_AREAS.length) {
688
+ (0, _util.warn)("Ran out of space in font private use area.");
689
+ break;
690
+ }
691
+
692
+ nextAvailableFontCharCode = PRIVATE_USE_AREAS[privateUseAreaIndex][0];
693
+ privateUseOffetEnd = PRIVATE_USE_AREAS[privateUseAreaIndex][1];
694
+ }
695
+
696
+ var fontCharCode = nextAvailableFontCharCode++;
697
+
698
+ if (glyphId === 0) {
699
+ glyphId = newGlyphZeroId;
700
+ }
701
+
702
+ newMap[fontCharCode] = glyphId;
703
+ toFontChar[originalCharCode] = fontCharCode;
704
+ }
705
+
706
+ return {
707
+ toFontChar,
708
+ charCodeToGlyphId: newMap,
709
+ nextAvailableFontCharCode
710
+ };
711
+ }
712
+
713
+ function getRanges(glyphs, numGlyphs) {
714
+ var codes = [];
715
+
716
+ for (var charCode in glyphs) {
717
+ if (glyphs[charCode] >= numGlyphs) {
718
+ continue;
719
+ }
720
+
721
+ codes.push({
722
+ fontCharCode: charCode | 0,
723
+ glyphId: glyphs[charCode]
724
+ });
725
+ }
726
+
727
+ if (codes.length === 0) {
728
+ codes.push({
729
+ fontCharCode: 0,
730
+ glyphId: 0
731
+ });
732
+ }
733
+
734
+ codes.sort(function fontGetRangesSort(a, b) {
735
+ return a.fontCharCode - b.fontCharCode;
736
+ });
737
+ var ranges = [];
738
+ var length = codes.length;
739
+
740
+ for (var n = 0; n < length;) {
741
+ var start = codes[n].fontCharCode;
742
+ var codeIndices = [codes[n].glyphId];
743
+ ++n;
744
+ var end = start;
745
+
746
+ while (n < length && end + 1 === codes[n].fontCharCode) {
747
+ codeIndices.push(codes[n].glyphId);
748
+ ++end;
749
+ ++n;
750
+
751
+ if (end === 0xffff) {
752
+ break;
753
+ }
754
+ }
755
+
756
+ ranges.push([start, end, codeIndices]);
757
+ }
758
+
759
+ return ranges;
760
+ }
761
+
762
+ function createCmapTable(glyphs, numGlyphs) {
763
+ var ranges = getRanges(glyphs, numGlyphs);
764
+ var numTables = ranges[ranges.length - 1][1] > 0xffff ? 2 : 1;
765
+ var cmap = "\x00\x00" + string16(numTables) + "\x00\x03" + "\x00\x01" + (0, _util.string32)(4 + numTables * 8);
766
+ var i, ii, j, jj;
767
+
768
+ for (i = ranges.length - 1; i >= 0; --i) {
769
+ if (ranges[i][0] <= 0xffff) {
770
+ break;
771
+ }
772
+ }
773
+
774
+ var bmpLength = i + 1;
775
+
776
+ if (ranges[i][0] < 0xffff && ranges[i][1] === 0xffff) {
777
+ ranges[i][1] = 0xfffe;
778
+ }
779
+
780
+ var trailingRangesCount = ranges[i][1] < 0xffff ? 1 : 0;
781
+ var segCount = bmpLength + trailingRangesCount;
782
+ var searchParams = OpenTypeFileBuilder.getSearchParams(segCount, 2);
783
+ var startCount = "";
784
+ var endCount = "";
785
+ var idDeltas = "";
786
+ var idRangeOffsets = "";
787
+ var glyphsIds = "";
788
+ var bias = 0;
789
+ var range, start, end, codes;
790
+
791
+ for (i = 0, ii = bmpLength; i < ii; i++) {
792
+ range = ranges[i];
793
+ start = range[0];
794
+ end = range[1];
795
+ startCount += string16(start);
796
+ endCount += string16(end);
797
+ codes = range[2];
798
+ var contiguous = true;
799
+
800
+ for (j = 1, jj = codes.length; j < jj; ++j) {
801
+ if (codes[j] !== codes[j - 1] + 1) {
802
+ contiguous = false;
803
+ break;
804
+ }
805
+ }
806
+
807
+ if (!contiguous) {
808
+ var offset = (segCount - i) * 2 + bias * 2;
809
+ bias += end - start + 1;
810
+ idDeltas += string16(0);
811
+ idRangeOffsets += string16(offset);
812
+
813
+ for (j = 0, jj = codes.length; j < jj; ++j) {
814
+ glyphsIds += string16(codes[j]);
815
+ }
816
+ } else {
817
+ var startCode = codes[0];
818
+ idDeltas += string16(startCode - start & 0xffff);
819
+ idRangeOffsets += string16(0);
820
+ }
821
+ }
822
+
823
+ if (trailingRangesCount > 0) {
824
+ endCount += "\xFF\xFF";
825
+ startCount += "\xFF\xFF";
826
+ idDeltas += "\x00\x01";
827
+ idRangeOffsets += "\x00\x00";
828
+ }
829
+
830
+ var format314 = "\x00\x00" + string16(2 * segCount) + string16(searchParams.range) + string16(searchParams.entry) + string16(searchParams.rangeShift) + endCount + "\x00\x00" + startCount + idDeltas + idRangeOffsets + glyphsIds;
831
+ var format31012 = "";
832
+ var header31012 = "";
833
+
834
+ if (numTables > 1) {
835
+ cmap += "\x00\x03" + "\x00\x0A" + (0, _util.string32)(4 + numTables * 8 + 4 + format314.length);
836
+ format31012 = "";
837
+
838
+ for (i = 0, ii = ranges.length; i < ii; i++) {
839
+ range = ranges[i];
840
+ start = range[0];
841
+ codes = range[2];
842
+ var code = codes[0];
843
+
844
+ for (j = 1, jj = codes.length; j < jj; ++j) {
845
+ if (codes[j] !== codes[j - 1] + 1) {
846
+ end = range[0] + j - 1;
847
+ format31012 += (0, _util.string32)(start) + (0, _util.string32)(end) + (0, _util.string32)(code);
848
+ start = end + 1;
849
+ code = codes[j];
850
+ }
851
+ }
852
+
853
+ format31012 += (0, _util.string32)(start) + (0, _util.string32)(range[1]) + (0, _util.string32)(code);
854
+ }
855
+
856
+ header31012 = "\x00\x0C" + "\x00\x00" + (0, _util.string32)(format31012.length + 16) + "\x00\x00\x00\x00" + (0, _util.string32)(format31012.length / 12);
857
+ }
858
+
859
+ return cmap + "\x00\x04" + string16(format314.length + 4) + format314 + header31012 + format31012;
860
+ }
861
+
862
+ function validateOS2Table(os2) {
863
+ var stream = new _stream.Stream(os2.data);
864
+ var version = stream.getUint16();
865
+ stream.getBytes(60);
866
+ var selection = stream.getUint16();
867
+
868
+ if (version < 4 && selection & 0x0300) {
869
+ return false;
870
+ }
871
+
872
+ var firstChar = stream.getUint16();
873
+ var lastChar = stream.getUint16();
874
+
875
+ if (firstChar > lastChar) {
876
+ return false;
877
+ }
878
+
879
+ stream.getBytes(6);
880
+ var usWinAscent = stream.getUint16();
881
+
882
+ if (usWinAscent === 0) {
883
+ return false;
884
+ }
885
+
886
+ os2.data[8] = os2.data[9] = 0;
887
+ return true;
888
+ }
889
+
890
+ function createOS2Table(properties, charstrings, override) {
891
+ override = override || {
892
+ unitsPerEm: 0,
893
+ yMax: 0,
894
+ yMin: 0,
895
+ ascent: 0,
896
+ descent: 0
897
+ };
898
+ var ulUnicodeRange1 = 0;
899
+ var ulUnicodeRange2 = 0;
900
+ var ulUnicodeRange3 = 0;
901
+ var ulUnicodeRange4 = 0;
902
+ var firstCharIndex = null;
903
+ var lastCharIndex = 0;
904
+
905
+ if (charstrings) {
906
+ for (var code in charstrings) {
907
+ code |= 0;
908
+
909
+ if (firstCharIndex > code || !firstCharIndex) {
910
+ firstCharIndex = code;
911
+ }
912
+
913
+ if (lastCharIndex < code) {
914
+ lastCharIndex = code;
915
+ }
916
+
917
+ var position = (0, _unicode.getUnicodeRangeFor)(code);
918
+
919
+ if (position < 32) {
920
+ ulUnicodeRange1 |= 1 << position;
921
+ } else if (position < 64) {
922
+ ulUnicodeRange2 |= 1 << position - 32;
923
+ } else if (position < 96) {
924
+ ulUnicodeRange3 |= 1 << position - 64;
925
+ } else if (position < 123) {
926
+ ulUnicodeRange4 |= 1 << position - 96;
927
+ } else {
928
+ throw new _util.FormatError("Unicode ranges Bits > 123 are reserved for internal usage");
929
+ }
930
+ }
931
+
932
+ if (lastCharIndex > 0xffff) {
933
+ lastCharIndex = 0xffff;
934
+ }
935
+ } else {
936
+ firstCharIndex = 0;
937
+ lastCharIndex = 255;
938
+ }
939
+
940
+ var bbox = properties.bbox || [0, 0, 0, 0];
941
+ var unitsPerEm = override.unitsPerEm || 1 / (properties.fontMatrix || _util.FONT_IDENTITY_MATRIX)[0];
942
+ var scale = properties.ascentScaled ? 1.0 : unitsPerEm / PDF_GLYPH_SPACE_UNITS;
943
+ var typoAscent = override.ascent || Math.round(scale * (properties.ascent || bbox[3]));
944
+ var typoDescent = override.descent || Math.round(scale * (properties.descent || bbox[1]));
945
+
946
+ if (typoDescent > 0 && properties.descent > 0 && bbox[1] < 0) {
947
+ typoDescent = -typoDescent;
948
+ }
949
+
950
+ var winAscent = override.yMax || typoAscent;
951
+ var winDescent = -override.yMin || -typoDescent;
952
+ return "\x00\x03" + "\x02\x24" + "\x01\xF4" + "\x00\x05" + "\x00\x00" + "\x02\x8A" + "\x02\xBB" + "\x00\x00" + "\x00\x8C" + "\x02\x8A" + "\x02\xBB" + "\x00\x00" + "\x01\xDF" + "\x00\x31" + "\x01\x02" + "\x00\x00" + "\x00\x00\x06" + String.fromCharCode(properties.fixedPitch ? 0x09 : 0x00) + "\x00\x00\x00\x00\x00\x00" + (0, _util.string32)(ulUnicodeRange1) + (0, _util.string32)(ulUnicodeRange2) + (0, _util.string32)(ulUnicodeRange3) + (0, _util.string32)(ulUnicodeRange4) + "\x2A\x32\x31\x2A" + string16(properties.italicAngle ? 1 : 0) + string16(firstCharIndex || properties.firstChar) + string16(lastCharIndex || properties.lastChar) + string16(typoAscent) + string16(typoDescent) + "\x00\x64" + string16(winAscent) + string16(winDescent) + "\x00\x00\x00\x00" + "\x00\x00\x00\x00" + string16(properties.xHeight) + string16(properties.capHeight) + string16(0) + string16(firstCharIndex || properties.firstChar) + "\x00\x03";
953
+ }
954
+
955
+ function createPostTable(properties) {
956
+ var angle = Math.floor(properties.italicAngle * 2 ** 16);
957
+ return "\x00\x03\x00\x00" + (0, _util.string32)(angle) + "\x00\x00" + "\x00\x00" + (0, _util.string32)(properties.fixedPitch) + "\x00\x00\x00\x00" + "\x00\x00\x00\x00" + "\x00\x00\x00\x00" + "\x00\x00\x00\x00";
958
+ }
959
+
960
+ function createNameTable(name, proto) {
961
+ if (!proto) {
962
+ proto = [[], []];
963
+ }
964
+
965
+ var strings = [proto[0][0] || "Original licence", proto[0][1] || name, proto[0][2] || "Unknown", proto[0][3] || "uniqueID", proto[0][4] || name, proto[0][5] || "Version 0.11", proto[0][6] || "", proto[0][7] || "Unknown", proto[0][8] || "Unknown", proto[0][9] || "Unknown"];
966
+ var stringsUnicode = [];
967
+ var i, ii, j, jj, str;
968
+
969
+ for (i = 0, ii = strings.length; i < ii; i++) {
970
+ str = proto[1][i] || strings[i];
971
+ var strBufUnicode = [];
972
+
973
+ for (j = 0, jj = str.length; j < jj; j++) {
974
+ strBufUnicode.push(string16(str.charCodeAt(j)));
975
+ }
976
+
977
+ stringsUnicode.push(strBufUnicode.join(""));
978
+ }
979
+
980
+ var names = [strings, stringsUnicode];
981
+ var platforms = ["\x00\x01", "\x00\x03"];
982
+ var encodings = ["\x00\x00", "\x00\x01"];
983
+ var languages = ["\x00\x00", "\x04\x09"];
984
+ var namesRecordCount = strings.length * platforms.length;
985
+ var nameTable = "\x00\x00" + string16(namesRecordCount) + string16(namesRecordCount * 12 + 6);
986
+ var strOffset = 0;
987
+
988
+ for (i = 0, ii = platforms.length; i < ii; i++) {
989
+ var strs = names[i];
990
+
991
+ for (j = 0, jj = strs.length; j < jj; j++) {
992
+ str = strs[j];
993
+ var nameRecord = platforms[i] + encodings[i] + languages[i] + string16(j) + string16(str.length) + string16(strOffset);
994
+ nameTable += nameRecord;
995
+ strOffset += str.length;
996
+ }
997
+ }
998
+
999
+ nameTable += strings.join("") + stringsUnicode.join("");
1000
+ return nameTable;
1001
+ }
1002
+
1003
+ Font.prototype = {
1004
+ name: null,
1005
+ font: null,
1006
+ mimetype: null,
1007
+ encoding: null,
1008
+ disableFontFace: false,
1009
+
1010
+ get renderer() {
1011
+ var renderer = _font_renderer.FontRendererFactory.create(this, SEAC_ANALYSIS_ENABLED);
1012
+
1013
+ return (0, _util.shadow)(this, "renderer", renderer);
1014
+ },
1015
+
1016
+ exportData: function Font_exportData() {
1017
+ var data = {};
1018
+
1019
+ for (var i in this) {
1020
+ if (this.hasOwnProperty(i)) {
1021
+ data[i] = this[i];
1022
+ }
1023
+ }
1024
+
1025
+ return data;
1026
+ },
1027
+ fallbackToSystemFont: function Font_fallbackToSystemFont() {
1028
+ this.missingFile = true;
1029
+ var charCode, unicode;
1030
+ var name = this.name;
1031
+ var type = this.type;
1032
+ var subtype = this.subtype;
1033
+ let fontName = name.replace(/[,_]/g, "-").replace(/\s/g, "");
1034
+ var stdFontMap = (0, _standard_fonts.getStdFontMap)(),
1035
+ nonStdFontMap = (0, _standard_fonts.getNonStdFontMap)();
1036
+ var isStandardFont = !!stdFontMap[fontName] || !!(nonStdFontMap[fontName] && stdFontMap[nonStdFontMap[fontName]]);
1037
+ fontName = stdFontMap[fontName] || nonStdFontMap[fontName] || fontName;
1038
+ this.bold = fontName.search(/bold/gi) !== -1;
1039
+ this.italic = fontName.search(/oblique/gi) !== -1 || fontName.search(/italic/gi) !== -1;
1040
+ this.black = name.search(/Black/g) !== -1;
1041
+ this.remeasure = Object.keys(this.widths).length > 0;
1042
+
1043
+ if (isStandardFont && type === "CIDFontType2" && this.cidEncoding.startsWith("Identity-")) {
1044
+ const GlyphMapForStandardFonts = (0, _standard_fonts.getGlyphMapForStandardFonts)();
1045
+ const map = [];
1046
+
1047
+ for (charCode in GlyphMapForStandardFonts) {
1048
+ map[+charCode] = GlyphMapForStandardFonts[charCode];
1049
+ }
1050
+
1051
+ if (/Arial-?Black/i.test(name)) {
1052
+ var SupplementalGlyphMapForArialBlack = (0, _standard_fonts.getSupplementalGlyphMapForArialBlack)();
1053
+
1054
+ for (charCode in SupplementalGlyphMapForArialBlack) {
1055
+ map[+charCode] = SupplementalGlyphMapForArialBlack[charCode];
1056
+ }
1057
+ } else if (/Calibri/i.test(name)) {
1058
+ const SupplementalGlyphMapForCalibri = (0, _standard_fonts.getSupplementalGlyphMapForCalibri)();
1059
+
1060
+ for (charCode in SupplementalGlyphMapForCalibri) {
1061
+ map[+charCode] = SupplementalGlyphMapForCalibri[charCode];
1062
+ }
1063
+ }
1064
+
1065
+ var isIdentityUnicode = this.toUnicode instanceof IdentityToUnicodeMap;
1066
+
1067
+ if (!isIdentityUnicode) {
1068
+ this.toUnicode.forEach(function (charCode, unicodeCharCode) {
1069
+ map[+charCode] = unicodeCharCode;
1070
+ });
1071
+ }
1072
+
1073
+ this.toFontChar = map;
1074
+ this.toUnicode = new ToUnicodeMap(map);
1075
+ } else if (/Symbol/i.test(fontName)) {
1076
+ this.toFontChar = buildToFontChar(_encodings.SymbolSetEncoding, (0, _glyphlist.getGlyphsUnicode)(), this.differences);
1077
+ } else if (/Dingbats/i.test(fontName)) {
1078
+ if (/Wingdings/i.test(name)) {
1079
+ (0, _util.warn)("Non-embedded Wingdings font, falling back to ZapfDingbats.");
1080
+ }
1081
+
1082
+ this.toFontChar = buildToFontChar(_encodings.ZapfDingbatsEncoding, (0, _glyphlist.getDingbatsGlyphsUnicode)(), this.differences);
1083
+ } else if (isStandardFont) {
1084
+ this.toFontChar = buildToFontChar(this.defaultEncoding, (0, _glyphlist.getGlyphsUnicode)(), this.differences);
1085
+ } else {
1086
+ const glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)();
1087
+ const map = [];
1088
+ this.toUnicode.forEach((charCode, unicodeCharCode) => {
1089
+ if (!this.composite) {
1090
+ var glyphName = this.differences[charCode] || this.defaultEncoding[charCode];
1091
+ unicode = (0, _unicode.getUnicodeForGlyph)(glyphName, glyphsUnicodeMap);
1092
+
1093
+ if (unicode !== -1) {
1094
+ unicodeCharCode = unicode;
1095
+ }
1096
+ }
1097
+
1098
+ map[+charCode] = unicodeCharCode;
1099
+ });
1100
+
1101
+ if (this.composite && this.toUnicode instanceof IdentityToUnicodeMap) {
1102
+ if (/Verdana/i.test(name)) {
1103
+ const GlyphMapForStandardFonts = (0, _standard_fonts.getGlyphMapForStandardFonts)();
1104
+
1105
+ for (charCode in GlyphMapForStandardFonts) {
1106
+ map[+charCode] = GlyphMapForStandardFonts[charCode];
1107
+ }
1108
+ }
1109
+ }
1110
+
1111
+ this.toFontChar = map;
1112
+ }
1113
+
1114
+ this.loadedName = fontName.split("-")[0];
1115
+ this.fontType = getFontType(type, subtype);
1116
+ },
1117
+ checkAndRepair: function Font_checkAndRepair(name, font, properties) {
1118
+ const VALID_TABLES = ["OS/2", "cmap", "head", "hhea", "hmtx", "maxp", "name", "post", "loca", "glyf", "fpgm", "prep", "cvt ", "CFF "];
1119
+
1120
+ function readTables(file, numTables) {
1121
+ const tables = Object.create(null);
1122
+ tables["OS/2"] = null;
1123
+ tables["cmap"] = null;
1124
+ tables["head"] = null;
1125
+ tables["hhea"] = null;
1126
+ tables["hmtx"] = null;
1127
+ tables["maxp"] = null;
1128
+ tables["name"] = null;
1129
+ tables["post"] = null;
1130
+
1131
+ for (let i = 0; i < numTables; i++) {
1132
+ const table = readTableEntry(font);
1133
+
1134
+ if (!VALID_TABLES.includes(table.tag)) {
1135
+ continue;
1136
+ }
1137
+
1138
+ if (table.length === 0) {
1139
+ continue;
1140
+ }
1141
+
1142
+ tables[table.tag] = table;
1143
+ }
1144
+
1145
+ return tables;
1146
+ }
1147
+
1148
+ function readTableEntry(file) {
1149
+ var tag = (0, _util.bytesToString)(file.getBytes(4));
1150
+ var checksum = file.getInt32() >>> 0;
1151
+ var offset = file.getInt32() >>> 0;
1152
+ var length = file.getInt32() >>> 0;
1153
+ var previousPosition = file.pos;
1154
+ file.pos = file.start ? file.start : 0;
1155
+ file.skip(offset);
1156
+ var data = file.getBytes(length);
1157
+ file.pos = previousPosition;
1158
+
1159
+ if (tag === "head") {
1160
+ data[8] = data[9] = data[10] = data[11] = 0;
1161
+ data[17] |= 0x20;
1162
+ }
1163
+
1164
+ return {
1165
+ tag,
1166
+ checksum,
1167
+ length,
1168
+ offset,
1169
+ data
1170
+ };
1171
+ }
1172
+
1173
+ function readOpenTypeHeader(ttf) {
1174
+ return {
1175
+ version: (0, _util.bytesToString)(ttf.getBytes(4)),
1176
+ numTables: ttf.getUint16(),
1177
+ searchRange: ttf.getUint16(),
1178
+ entrySelector: ttf.getUint16(),
1179
+ rangeShift: ttf.getUint16()
1180
+ };
1181
+ }
1182
+
1183
+ function readTrueTypeCollectionHeader(ttc) {
1184
+ const ttcTag = (0, _util.bytesToString)(ttc.getBytes(4));
1185
+ (0, _util.assert)(ttcTag === "ttcf", "Must be a TrueType Collection font.");
1186
+ const majorVersion = ttc.getUint16();
1187
+ const minorVersion = ttc.getUint16();
1188
+ const numFonts = ttc.getInt32() >>> 0;
1189
+ const offsetTable = [];
1190
+
1191
+ for (let i = 0; i < numFonts; i++) {
1192
+ offsetTable.push(ttc.getInt32() >>> 0);
1193
+ }
1194
+
1195
+ const header = {
1196
+ ttcTag,
1197
+ majorVersion,
1198
+ minorVersion,
1199
+ numFonts,
1200
+ offsetTable
1201
+ };
1202
+
1203
+ switch (majorVersion) {
1204
+ case 1:
1205
+ return header;
1206
+
1207
+ case 2:
1208
+ header.dsigTag = ttc.getInt32() >>> 0;
1209
+ header.dsigLength = ttc.getInt32() >>> 0;
1210
+ header.dsigOffset = ttc.getInt32() >>> 0;
1211
+ return header;
1212
+ }
1213
+
1214
+ throw new _util.FormatError(`Invalid TrueType Collection majorVersion: ${majorVersion}.`);
1215
+ }
1216
+
1217
+ function readTrueTypeCollectionData(ttc, fontName) {
1218
+ const {
1219
+ numFonts,
1220
+ offsetTable
1221
+ } = readTrueTypeCollectionHeader(ttc);
1222
+
1223
+ for (let i = 0; i < numFonts; i++) {
1224
+ ttc.pos = (ttc.start || 0) + offsetTable[i];
1225
+ const potentialHeader = readOpenTypeHeader(ttc);
1226
+ const potentialTables = readTables(ttc, potentialHeader.numTables);
1227
+
1228
+ if (!potentialTables["name"]) {
1229
+ throw new _util.FormatError('TrueType Collection font must contain a "name" table.');
1230
+ }
1231
+
1232
+ const nameTable = readNameTable(potentialTables["name"]);
1233
+
1234
+ for (let j = 0, jj = nameTable.length; j < jj; j++) {
1235
+ for (let k = 0, kk = nameTable[j].length; k < kk; k++) {
1236
+ const nameEntry = nameTable[j][k];
1237
+
1238
+ if (nameEntry && nameEntry.replace(/\s/g, "") === fontName) {
1239
+ return {
1240
+ header: potentialHeader,
1241
+ tables: potentialTables
1242
+ };
1243
+ }
1244
+ }
1245
+ }
1246
+ }
1247
+
1248
+ throw new _util.FormatError(`TrueType Collection does not contain "${fontName}" font.`);
1249
+ }
1250
+
1251
+ function readCmapTable(cmap, font, isSymbolicFont, hasEncoding) {
1252
+ if (!cmap) {
1253
+ (0, _util.warn)("No cmap table available.");
1254
+ return {
1255
+ platformId: -1,
1256
+ encodingId: -1,
1257
+ mappings: [],
1258
+ hasShortCmap: false
1259
+ };
1260
+ }
1261
+
1262
+ var segment;
1263
+ var start = (font.start ? font.start : 0) + cmap.offset;
1264
+ font.pos = start;
1265
+ font.getUint16();
1266
+ var numTables = font.getUint16();
1267
+ var potentialTable;
1268
+ var canBreak = false;
1269
+
1270
+ for (var i = 0; i < numTables; i++) {
1271
+ var platformId = font.getUint16();
1272
+ var encodingId = font.getUint16();
1273
+ var offset = font.getInt32() >>> 0;
1274
+ var useTable = false;
1275
+
1276
+ if (potentialTable && potentialTable.platformId === platformId && potentialTable.encodingId === encodingId) {
1277
+ continue;
1278
+ }
1279
+
1280
+ if (platformId === 0 && encodingId === 0) {
1281
+ useTable = true;
1282
+ } else if (platformId === 1 && encodingId === 0) {
1283
+ useTable = true;
1284
+ } else if (platformId === 3 && encodingId === 1 && (hasEncoding || !potentialTable)) {
1285
+ useTable = true;
1286
+
1287
+ if (!isSymbolicFont) {
1288
+ canBreak = true;
1289
+ }
1290
+ } else if (isSymbolicFont && platformId === 3 && encodingId === 0) {
1291
+ useTable = true;
1292
+ canBreak = true;
1293
+ }
1294
+
1295
+ if (useTable) {
1296
+ potentialTable = {
1297
+ platformId,
1298
+ encodingId,
1299
+ offset
1300
+ };
1301
+ }
1302
+
1303
+ if (canBreak) {
1304
+ break;
1305
+ }
1306
+ }
1307
+
1308
+ if (potentialTable) {
1309
+ font.pos = start + potentialTable.offset;
1310
+ }
1311
+
1312
+ if (!potentialTable || font.peekByte() === -1) {
1313
+ (0, _util.warn)("Could not find a preferred cmap table.");
1314
+ return {
1315
+ platformId: -1,
1316
+ encodingId: -1,
1317
+ mappings: [],
1318
+ hasShortCmap: false
1319
+ };
1320
+ }
1321
+
1322
+ var format = font.getUint16();
1323
+ font.getUint16();
1324
+ font.getUint16();
1325
+ var hasShortCmap = false;
1326
+ var mappings = [];
1327
+ var j, glyphId;
1328
+
1329
+ if (format === 0) {
1330
+ for (j = 0; j < 256; j++) {
1331
+ var index = font.getByte();
1332
+
1333
+ if (!index) {
1334
+ continue;
1335
+ }
1336
+
1337
+ mappings.push({
1338
+ charCode: j,
1339
+ glyphId: index
1340
+ });
1341
+ }
1342
+
1343
+ hasShortCmap = true;
1344
+ } else if (format === 4) {
1345
+ var segCount = font.getUint16() >> 1;
1346
+ font.getBytes(6);
1347
+ var segIndex,
1348
+ segments = [];
1349
+
1350
+ for (segIndex = 0; segIndex < segCount; segIndex++) {
1351
+ segments.push({
1352
+ end: font.getUint16()
1353
+ });
1354
+ }
1355
+
1356
+ font.getUint16();
1357
+
1358
+ for (segIndex = 0; segIndex < segCount; segIndex++) {
1359
+ segments[segIndex].start = font.getUint16();
1360
+ }
1361
+
1362
+ for (segIndex = 0; segIndex < segCount; segIndex++) {
1363
+ segments[segIndex].delta = font.getUint16();
1364
+ }
1365
+
1366
+ var offsetsCount = 0;
1367
+
1368
+ for (segIndex = 0; segIndex < segCount; segIndex++) {
1369
+ segment = segments[segIndex];
1370
+ var rangeOffset = font.getUint16();
1371
+
1372
+ if (!rangeOffset) {
1373
+ segment.offsetIndex = -1;
1374
+ continue;
1375
+ }
1376
+
1377
+ var offsetIndex = (rangeOffset >> 1) - (segCount - segIndex);
1378
+ segment.offsetIndex = offsetIndex;
1379
+ offsetsCount = Math.max(offsetsCount, offsetIndex + segment.end - segment.start + 1);
1380
+ }
1381
+
1382
+ var offsets = [];
1383
+
1384
+ for (j = 0; j < offsetsCount; j++) {
1385
+ offsets.push(font.getUint16());
1386
+ }
1387
+
1388
+ for (segIndex = 0; segIndex < segCount; segIndex++) {
1389
+ segment = segments[segIndex];
1390
+ start = segment.start;
1391
+ var end = segment.end;
1392
+ var delta = segment.delta;
1393
+ offsetIndex = segment.offsetIndex;
1394
+
1395
+ for (j = start; j <= end; j++) {
1396
+ if (j === 0xffff) {
1397
+ continue;
1398
+ }
1399
+
1400
+ glyphId = offsetIndex < 0 ? j : offsets[offsetIndex + j - start];
1401
+ glyphId = glyphId + delta & 0xffff;
1402
+ mappings.push({
1403
+ charCode: j,
1404
+ glyphId
1405
+ });
1406
+ }
1407
+ }
1408
+ } else if (format === 6) {
1409
+ var firstCode = font.getUint16();
1410
+ var entryCount = font.getUint16();
1411
+
1412
+ for (j = 0; j < entryCount; j++) {
1413
+ glyphId = font.getUint16();
1414
+ var charCode = firstCode + j;
1415
+ mappings.push({
1416
+ charCode,
1417
+ glyphId
1418
+ });
1419
+ }
1420
+ } else {
1421
+ (0, _util.warn)("cmap table has unsupported format: " + format);
1422
+ return {
1423
+ platformId: -1,
1424
+ encodingId: -1,
1425
+ mappings: [],
1426
+ hasShortCmap: false
1427
+ };
1428
+ }
1429
+
1430
+ mappings.sort(function (a, b) {
1431
+ return a.charCode - b.charCode;
1432
+ });
1433
+
1434
+ for (i = 1; i < mappings.length; i++) {
1435
+ if (mappings[i - 1].charCode === mappings[i].charCode) {
1436
+ mappings.splice(i, 1);
1437
+ i--;
1438
+ }
1439
+ }
1440
+
1441
+ return {
1442
+ platformId: potentialTable.platformId,
1443
+ encodingId: potentialTable.encodingId,
1444
+ mappings,
1445
+ hasShortCmap
1446
+ };
1447
+ }
1448
+
1449
+ function sanitizeMetrics(font, header, metrics, numGlyphs, dupFirstEntry) {
1450
+ if (!header) {
1451
+ if (metrics) {
1452
+ metrics.data = null;
1453
+ }
1454
+
1455
+ return;
1456
+ }
1457
+
1458
+ font.pos = (font.start ? font.start : 0) + header.offset;
1459
+ font.pos += 4;
1460
+ font.pos += 2;
1461
+ font.pos += 2;
1462
+ font.pos += 2;
1463
+ font.pos += 2;
1464
+ font.pos += 2;
1465
+ font.pos += 2;
1466
+ font.pos += 2;
1467
+ font.pos += 2;
1468
+ font.pos += 2;
1469
+ font.pos += 2;
1470
+ font.pos += 8;
1471
+ font.pos += 2;
1472
+ var numOfMetrics = font.getUint16();
1473
+
1474
+ if (numOfMetrics > numGlyphs) {
1475
+ (0, _util.info)("The numOfMetrics (" + numOfMetrics + ") should not be " + "greater than the numGlyphs (" + numGlyphs + ")");
1476
+ numOfMetrics = numGlyphs;
1477
+ header.data[34] = (numOfMetrics & 0xff00) >> 8;
1478
+ header.data[35] = numOfMetrics & 0x00ff;
1479
+ }
1480
+
1481
+ var numOfSidebearings = numGlyphs - numOfMetrics;
1482
+ var numMissing = numOfSidebearings - (metrics.length - numOfMetrics * 4 >> 1);
1483
+
1484
+ if (numMissing > 0) {
1485
+ var entries = new Uint8Array(metrics.length + numMissing * 2);
1486
+ entries.set(metrics.data);
1487
+
1488
+ if (dupFirstEntry) {
1489
+ entries[metrics.length] = metrics.data[2];
1490
+ entries[metrics.length + 1] = metrics.data[3];
1491
+ }
1492
+
1493
+ metrics.data = entries;
1494
+ }
1495
+ }
1496
+
1497
+ function sanitizeGlyph(source, sourceStart, sourceEnd, dest, destStart, hintsValid) {
1498
+ var glyphProfile = {
1499
+ length: 0,
1500
+ sizeOfInstructions: 0
1501
+ };
1502
+
1503
+ if (sourceEnd - sourceStart <= 12) {
1504
+ return glyphProfile;
1505
+ }
1506
+
1507
+ var glyf = source.subarray(sourceStart, sourceEnd);
1508
+ var contoursCount = signedInt16(glyf[0], glyf[1]);
1509
+
1510
+ if (contoursCount < 0) {
1511
+ contoursCount = -1;
1512
+ writeSignedInt16(glyf, 0, contoursCount);
1513
+ dest.set(glyf, destStart);
1514
+ glyphProfile.length = glyf.length;
1515
+ return glyphProfile;
1516
+ }
1517
+
1518
+ var i,
1519
+ j = 10,
1520
+ flagsCount = 0;
1521
+
1522
+ for (i = 0; i < contoursCount; i++) {
1523
+ var endPoint = glyf[j] << 8 | glyf[j + 1];
1524
+ flagsCount = endPoint + 1;
1525
+ j += 2;
1526
+ }
1527
+
1528
+ var instructionsStart = j;
1529
+ var instructionsLength = glyf[j] << 8 | glyf[j + 1];
1530
+ glyphProfile.sizeOfInstructions = instructionsLength;
1531
+ j += 2 + instructionsLength;
1532
+ var instructionsEnd = j;
1533
+ var coordinatesLength = 0;
1534
+
1535
+ for (i = 0; i < flagsCount; i++) {
1536
+ var flag = glyf[j++];
1537
+
1538
+ if (flag & 0xc0) {
1539
+ glyf[j - 1] = flag & 0x3f;
1540
+ }
1541
+
1542
+ let xLength = 2;
1543
+
1544
+ if (flag & 2) {
1545
+ xLength = 1;
1546
+ } else if (flag & 16) {
1547
+ xLength = 0;
1548
+ }
1549
+
1550
+ let yLength = 2;
1551
+
1552
+ if (flag & 4) {
1553
+ yLength = 1;
1554
+ } else if (flag & 32) {
1555
+ yLength = 0;
1556
+ }
1557
+
1558
+ const xyLength = xLength + yLength;
1559
+ coordinatesLength += xyLength;
1560
+
1561
+ if (flag & 8) {
1562
+ var repeat = glyf[j++];
1563
+ i += repeat;
1564
+ coordinatesLength += repeat * xyLength;
1565
+ }
1566
+ }
1567
+
1568
+ if (coordinatesLength === 0) {
1569
+ return glyphProfile;
1570
+ }
1571
+
1572
+ var glyphDataLength = j + coordinatesLength;
1573
+
1574
+ if (glyphDataLength > glyf.length) {
1575
+ return glyphProfile;
1576
+ }
1577
+
1578
+ if (!hintsValid && instructionsLength > 0) {
1579
+ dest.set(glyf.subarray(0, instructionsStart), destStart);
1580
+ dest.set([0, 0], destStart + instructionsStart);
1581
+ dest.set(glyf.subarray(instructionsEnd, glyphDataLength), destStart + instructionsStart + 2);
1582
+ glyphDataLength -= instructionsLength;
1583
+
1584
+ if (glyf.length - glyphDataLength > 3) {
1585
+ glyphDataLength = glyphDataLength + 3 & ~3;
1586
+ }
1587
+
1588
+ glyphProfile.length = glyphDataLength;
1589
+ return glyphProfile;
1590
+ }
1591
+
1592
+ if (glyf.length - glyphDataLength > 3) {
1593
+ glyphDataLength = glyphDataLength + 3 & ~3;
1594
+ dest.set(glyf.subarray(0, glyphDataLength), destStart);
1595
+ glyphProfile.length = glyphDataLength;
1596
+ return glyphProfile;
1597
+ }
1598
+
1599
+ dest.set(glyf, destStart);
1600
+ glyphProfile.length = glyf.length;
1601
+ return glyphProfile;
1602
+ }
1603
+
1604
+ function sanitizeHead(head, numGlyphs, locaLength) {
1605
+ var data = head.data;
1606
+ var version = int32(data[0], data[1], data[2], data[3]);
1607
+
1608
+ if (version >> 16 !== 1) {
1609
+ (0, _util.info)("Attempting to fix invalid version in head table: " + version);
1610
+ data[0] = 0;
1611
+ data[1] = 1;
1612
+ data[2] = 0;
1613
+ data[3] = 0;
1614
+ }
1615
+
1616
+ var indexToLocFormat = int16(data[50], data[51]);
1617
+
1618
+ if (indexToLocFormat < 0 || indexToLocFormat > 1) {
1619
+ (0, _util.info)("Attempting to fix invalid indexToLocFormat in head table: " + indexToLocFormat);
1620
+ var numGlyphsPlusOne = numGlyphs + 1;
1621
+
1622
+ if (locaLength === numGlyphsPlusOne << 1) {
1623
+ data[50] = 0;
1624
+ data[51] = 0;
1625
+ } else if (locaLength === numGlyphsPlusOne << 2) {
1626
+ data[50] = 0;
1627
+ data[51] = 1;
1628
+ } else {
1629
+ throw new _util.FormatError("Could not fix indexToLocFormat: " + indexToLocFormat);
1630
+ }
1631
+ }
1632
+ }
1633
+
1634
+ function sanitizeGlyphLocations(loca, glyf, numGlyphs, isGlyphLocationsLong, hintsValid, dupFirstEntry, maxSizeOfInstructions) {
1635
+ var itemSize, itemDecode, itemEncode;
1636
+
1637
+ if (isGlyphLocationsLong) {
1638
+ itemSize = 4;
1639
+
1640
+ itemDecode = function fontItemDecodeLong(data, offset) {
1641
+ return data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3];
1642
+ };
1643
+
1644
+ itemEncode = function fontItemEncodeLong(data, offset, value) {
1645
+ data[offset] = value >>> 24 & 0xff;
1646
+ data[offset + 1] = value >> 16 & 0xff;
1647
+ data[offset + 2] = value >> 8 & 0xff;
1648
+ data[offset + 3] = value & 0xff;
1649
+ };
1650
+ } else {
1651
+ itemSize = 2;
1652
+
1653
+ itemDecode = function fontItemDecode(data, offset) {
1654
+ return data[offset] << 9 | data[offset + 1] << 1;
1655
+ };
1656
+
1657
+ itemEncode = function fontItemEncode(data, offset, value) {
1658
+ data[offset] = value >> 9 & 0xff;
1659
+ data[offset + 1] = value >> 1 & 0xff;
1660
+ };
1661
+ }
1662
+
1663
+ var numGlyphsOut = dupFirstEntry ? numGlyphs + 1 : numGlyphs;
1664
+ var locaDataSize = itemSize * (1 + numGlyphsOut);
1665
+ var locaData = new Uint8Array(locaDataSize);
1666
+ locaData.set(loca.data.subarray(0, locaDataSize));
1667
+ loca.data = locaData;
1668
+ var oldGlyfData = glyf.data;
1669
+ var oldGlyfDataLength = oldGlyfData.length;
1670
+ var newGlyfData = new Uint8Array(oldGlyfDataLength);
1671
+ var startOffset = itemDecode(locaData, 0);
1672
+ var writeOffset = 0;
1673
+ var missingGlyphs = Object.create(null);
1674
+ itemEncode(locaData, 0, writeOffset);
1675
+ var i, j;
1676
+
1677
+ for (i = 0, j = itemSize; i < numGlyphs; i++, j += itemSize) {
1678
+ var endOffset = itemDecode(locaData, j);
1679
+
1680
+ if (endOffset === 0) {
1681
+ endOffset = startOffset;
1682
+ }
1683
+
1684
+ if (endOffset > oldGlyfDataLength && (oldGlyfDataLength + 3 & ~3) === endOffset) {
1685
+ endOffset = oldGlyfDataLength;
1686
+ }
1687
+
1688
+ if (endOffset > oldGlyfDataLength) {
1689
+ startOffset = endOffset;
1690
+ }
1691
+
1692
+ var glyphProfile = sanitizeGlyph(oldGlyfData, startOffset, endOffset, newGlyfData, writeOffset, hintsValid);
1693
+ var newLength = glyphProfile.length;
1694
+
1695
+ if (newLength === 0) {
1696
+ missingGlyphs[i] = true;
1697
+ }
1698
+
1699
+ if (glyphProfile.sizeOfInstructions > maxSizeOfInstructions) {
1700
+ maxSizeOfInstructions = glyphProfile.sizeOfInstructions;
1701
+ }
1702
+
1703
+ writeOffset += newLength;
1704
+ itemEncode(locaData, j, writeOffset);
1705
+ startOffset = endOffset;
1706
+ }
1707
+
1708
+ if (writeOffset === 0) {
1709
+ var simpleGlyph = new Uint8Array([0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0]);
1710
+
1711
+ for (i = 0, j = itemSize; i < numGlyphsOut; i++, j += itemSize) {
1712
+ itemEncode(locaData, j, simpleGlyph.length);
1713
+ }
1714
+
1715
+ glyf.data = simpleGlyph;
1716
+ } else if (dupFirstEntry) {
1717
+ var firstEntryLength = itemDecode(locaData, itemSize);
1718
+
1719
+ if (newGlyfData.length > firstEntryLength + writeOffset) {
1720
+ glyf.data = newGlyfData.subarray(0, firstEntryLength + writeOffset);
1721
+ } else {
1722
+ glyf.data = new Uint8Array(firstEntryLength + writeOffset);
1723
+ glyf.data.set(newGlyfData.subarray(0, writeOffset));
1724
+ }
1725
+
1726
+ glyf.data.set(newGlyfData.subarray(0, firstEntryLength), writeOffset);
1727
+ itemEncode(loca.data, locaData.length - itemSize, writeOffset + firstEntryLength);
1728
+ } else {
1729
+ glyf.data = newGlyfData.subarray(0, writeOffset);
1730
+ }
1731
+
1732
+ return {
1733
+ missingGlyphs,
1734
+ maxSizeOfInstructions
1735
+ };
1736
+ }
1737
+
1738
+ function readPostScriptTable(post, properties, maxpNumGlyphs) {
1739
+ var start = (font.start ? font.start : 0) + post.offset;
1740
+ font.pos = start;
1741
+ var length = post.length,
1742
+ end = start + length;
1743
+ var version = font.getInt32();
1744
+ font.getBytes(28);
1745
+ var glyphNames;
1746
+ var valid = true;
1747
+ var i;
1748
+
1749
+ switch (version) {
1750
+ case 0x00010000:
1751
+ glyphNames = MacStandardGlyphOrdering;
1752
+ break;
1753
+
1754
+ case 0x00020000:
1755
+ var numGlyphs = font.getUint16();
1756
+
1757
+ if (numGlyphs !== maxpNumGlyphs) {
1758
+ valid = false;
1759
+ break;
1760
+ }
1761
+
1762
+ var glyphNameIndexes = [];
1763
+
1764
+ for (i = 0; i < numGlyphs; ++i) {
1765
+ var index = font.getUint16();
1766
+
1767
+ if (index >= 32768) {
1768
+ valid = false;
1769
+ break;
1770
+ }
1771
+
1772
+ glyphNameIndexes.push(index);
1773
+ }
1774
+
1775
+ if (!valid) {
1776
+ break;
1777
+ }
1778
+
1779
+ var customNames = [];
1780
+ var strBuf = [];
1781
+
1782
+ while (font.pos < end) {
1783
+ var stringLength = font.getByte();
1784
+ strBuf.length = stringLength;
1785
+
1786
+ for (i = 0; i < stringLength; ++i) {
1787
+ strBuf[i] = String.fromCharCode(font.getByte());
1788
+ }
1789
+
1790
+ customNames.push(strBuf.join(""));
1791
+ }
1792
+
1793
+ glyphNames = [];
1794
+
1795
+ for (i = 0; i < numGlyphs; ++i) {
1796
+ var j = glyphNameIndexes[i];
1797
+
1798
+ if (j < 258) {
1799
+ glyphNames.push(MacStandardGlyphOrdering[j]);
1800
+ continue;
1801
+ }
1802
+
1803
+ glyphNames.push(customNames[j - 258]);
1804
+ }
1805
+
1806
+ break;
1807
+
1808
+ case 0x00030000:
1809
+ break;
1810
+
1811
+ default:
1812
+ (0, _util.warn)("Unknown/unsupported post table version " + version);
1813
+ valid = false;
1814
+
1815
+ if (properties.defaultEncoding) {
1816
+ glyphNames = properties.defaultEncoding;
1817
+ }
1818
+
1819
+ break;
1820
+ }
1821
+
1822
+ properties.glyphNames = glyphNames;
1823
+ return valid;
1824
+ }
1825
+
1826
+ function readNameTable(nameTable) {
1827
+ var start = (font.start ? font.start : 0) + nameTable.offset;
1828
+ font.pos = start;
1829
+ var names = [[], []];
1830
+ var length = nameTable.length,
1831
+ end = start + length;
1832
+ var format = font.getUint16();
1833
+ var FORMAT_0_HEADER_LENGTH = 6;
1834
+
1835
+ if (format !== 0 || length < FORMAT_0_HEADER_LENGTH) {
1836
+ return names;
1837
+ }
1838
+
1839
+ var numRecords = font.getUint16();
1840
+ var stringsStart = font.getUint16();
1841
+ var records = [];
1842
+ var NAME_RECORD_LENGTH = 12;
1843
+ var i, ii;
1844
+
1845
+ for (i = 0; i < numRecords && font.pos + NAME_RECORD_LENGTH <= end; i++) {
1846
+ var r = {
1847
+ platform: font.getUint16(),
1848
+ encoding: font.getUint16(),
1849
+ language: font.getUint16(),
1850
+ name: font.getUint16(),
1851
+ length: font.getUint16(),
1852
+ offset: font.getUint16()
1853
+ };
1854
+
1855
+ if (r.platform === 1 && r.encoding === 0 && r.language === 0 || r.platform === 3 && r.encoding === 1 && r.language === 0x409) {
1856
+ records.push(r);
1857
+ }
1858
+ }
1859
+
1860
+ for (i = 0, ii = records.length; i < ii; i++) {
1861
+ var record = records[i];
1862
+
1863
+ if (record.length <= 0) {
1864
+ continue;
1865
+ }
1866
+
1867
+ var pos = start + stringsStart + record.offset;
1868
+
1869
+ if (pos + record.length > end) {
1870
+ continue;
1871
+ }
1872
+
1873
+ font.pos = pos;
1874
+ var nameIndex = record.name;
1875
+
1876
+ if (record.encoding) {
1877
+ var str = "";
1878
+
1879
+ for (var j = 0, jj = record.length; j < jj; j += 2) {
1880
+ str += String.fromCharCode(font.getUint16());
1881
+ }
1882
+
1883
+ names[1][nameIndex] = str;
1884
+ } else {
1885
+ names[0][nameIndex] = (0, _util.bytesToString)(font.getBytes(record.length));
1886
+ }
1887
+ }
1888
+
1889
+ return names;
1890
+ }
1891
+
1892
+ var TTOpsStackDeltas = [0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -2, -2, 0, 0, -2, -5, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, -1, -1, 1, -1, -999, 0, 1, 0, -1, -2, 0, -1, -2, -1, -1, 0, -1, -1, 0, 0, -999, -999, -1, -1, -1, -1, -2, -999, -2, -2, -999, 0, -2, -2, 0, 0, -2, 0, -2, 0, 0, 0, -2, -1, -1, 1, 1, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, 0, -999, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -999, -999, -999, -999, -999, -1, -1, -2, -2, 0, 0, 0, 0, -1, -1, -999, -2, -2, 0, 0, -1, -2, -2, 0, 0, 0, -1, -1, -1, -2];
1893
+
1894
+ function sanitizeTTProgram(table, ttContext) {
1895
+ var data = table.data;
1896
+ var i = 0,
1897
+ j,
1898
+ n,
1899
+ b,
1900
+ funcId,
1901
+ pc,
1902
+ lastEndf = 0,
1903
+ lastDeff = 0;
1904
+ var stack = [];
1905
+ var callstack = [];
1906
+ var functionsCalled = [];
1907
+ var tooComplexToFollowFunctions = ttContext.tooComplexToFollowFunctions;
1908
+ var inFDEF = false,
1909
+ ifLevel = 0,
1910
+ inELSE = 0;
1911
+
1912
+ for (var ii = data.length; i < ii;) {
1913
+ var op = data[i++];
1914
+
1915
+ if (op === 0x40) {
1916
+ n = data[i++];
1917
+
1918
+ if (inFDEF || inELSE) {
1919
+ i += n;
1920
+ } else {
1921
+ for (j = 0; j < n; j++) {
1922
+ stack.push(data[i++]);
1923
+ }
1924
+ }
1925
+ } else if (op === 0x41) {
1926
+ n = data[i++];
1927
+
1928
+ if (inFDEF || inELSE) {
1929
+ i += n * 2;
1930
+ } else {
1931
+ for (j = 0; j < n; j++) {
1932
+ b = data[i++];
1933
+ stack.push(b << 8 | data[i++]);
1934
+ }
1935
+ }
1936
+ } else if ((op & 0xf8) === 0xb0) {
1937
+ n = op - 0xb0 + 1;
1938
+
1939
+ if (inFDEF || inELSE) {
1940
+ i += n;
1941
+ } else {
1942
+ for (j = 0; j < n; j++) {
1943
+ stack.push(data[i++]);
1944
+ }
1945
+ }
1946
+ } else if ((op & 0xf8) === 0xb8) {
1947
+ n = op - 0xb8 + 1;
1948
+
1949
+ if (inFDEF || inELSE) {
1950
+ i += n * 2;
1951
+ } else {
1952
+ for (j = 0; j < n; j++) {
1953
+ b = data[i++];
1954
+ stack.push(b << 8 | data[i++]);
1955
+ }
1956
+ }
1957
+ } else if (op === 0x2b && !tooComplexToFollowFunctions) {
1958
+ if (!inFDEF && !inELSE) {
1959
+ funcId = stack[stack.length - 1];
1960
+
1961
+ if (isNaN(funcId)) {
1962
+ (0, _util.info)("TT: CALL empty stack (or invalid entry).");
1963
+ } else {
1964
+ ttContext.functionsUsed[funcId] = true;
1965
+
1966
+ if (funcId in ttContext.functionsStackDeltas) {
1967
+ const newStackLength = stack.length + ttContext.functionsStackDeltas[funcId];
1968
+
1969
+ if (newStackLength < 0) {
1970
+ (0, _util.warn)("TT: CALL invalid functions stack delta.");
1971
+ ttContext.hintsValid = false;
1972
+ return;
1973
+ }
1974
+
1975
+ stack.length = newStackLength;
1976
+ } else if (funcId in ttContext.functionsDefined && !functionsCalled.includes(funcId)) {
1977
+ callstack.push({
1978
+ data,
1979
+ i,
1980
+ stackTop: stack.length - 1
1981
+ });
1982
+ functionsCalled.push(funcId);
1983
+ pc = ttContext.functionsDefined[funcId];
1984
+
1985
+ if (!pc) {
1986
+ (0, _util.warn)("TT: CALL non-existent function");
1987
+ ttContext.hintsValid = false;
1988
+ return;
1989
+ }
1990
+
1991
+ data = pc.data;
1992
+ i = pc.i;
1993
+ }
1994
+ }
1995
+ }
1996
+ } else if (op === 0x2c && !tooComplexToFollowFunctions) {
1997
+ if (inFDEF || inELSE) {
1998
+ (0, _util.warn)("TT: nested FDEFs not allowed");
1999
+ tooComplexToFollowFunctions = true;
2000
+ }
2001
+
2002
+ inFDEF = true;
2003
+ lastDeff = i;
2004
+ funcId = stack.pop();
2005
+ ttContext.functionsDefined[funcId] = {
2006
+ data,
2007
+ i
2008
+ };
2009
+ } else if (op === 0x2d) {
2010
+ if (inFDEF) {
2011
+ inFDEF = false;
2012
+ lastEndf = i;
2013
+ } else {
2014
+ pc = callstack.pop();
2015
+
2016
+ if (!pc) {
2017
+ (0, _util.warn)("TT: ENDF bad stack");
2018
+ ttContext.hintsValid = false;
2019
+ return;
2020
+ }
2021
+
2022
+ funcId = functionsCalled.pop();
2023
+ data = pc.data;
2024
+ i = pc.i;
2025
+ ttContext.functionsStackDeltas[funcId] = stack.length - pc.stackTop;
2026
+ }
2027
+ } else if (op === 0x89) {
2028
+ if (inFDEF || inELSE) {
2029
+ (0, _util.warn)("TT: nested IDEFs not allowed");
2030
+ tooComplexToFollowFunctions = true;
2031
+ }
2032
+
2033
+ inFDEF = true;
2034
+ lastDeff = i;
2035
+ } else if (op === 0x58) {
2036
+ ++ifLevel;
2037
+ } else if (op === 0x1b) {
2038
+ inELSE = ifLevel;
2039
+ } else if (op === 0x59) {
2040
+ if (inELSE === ifLevel) {
2041
+ inELSE = 0;
2042
+ }
2043
+
2044
+ --ifLevel;
2045
+ } else if (op === 0x1c) {
2046
+ if (!inFDEF && !inELSE) {
2047
+ var offset = stack[stack.length - 1];
2048
+
2049
+ if (offset > 0) {
2050
+ i += offset - 1;
2051
+ }
2052
+ }
2053
+ }
2054
+
2055
+ if (!inFDEF && !inELSE) {
2056
+ let stackDelta = 0;
2057
+
2058
+ if (op <= 0x8e) {
2059
+ stackDelta = TTOpsStackDeltas[op];
2060
+ } else if (op >= 0xc0 && op <= 0xdf) {
2061
+ stackDelta = -1;
2062
+ } else if (op >= 0xe0) {
2063
+ stackDelta = -2;
2064
+ }
2065
+
2066
+ if (op >= 0x71 && op <= 0x75) {
2067
+ n = stack.pop();
2068
+
2069
+ if (!isNaN(n)) {
2070
+ stackDelta = -n * 2;
2071
+ }
2072
+ }
2073
+
2074
+ while (stackDelta < 0 && stack.length > 0) {
2075
+ stack.pop();
2076
+ stackDelta++;
2077
+ }
2078
+
2079
+ while (stackDelta > 0) {
2080
+ stack.push(NaN);
2081
+ stackDelta--;
2082
+ }
2083
+ }
2084
+ }
2085
+
2086
+ ttContext.tooComplexToFollowFunctions = tooComplexToFollowFunctions;
2087
+ var content = [data];
2088
+
2089
+ if (i > data.length) {
2090
+ content.push(new Uint8Array(i - data.length));
2091
+ }
2092
+
2093
+ if (lastDeff > lastEndf) {
2094
+ (0, _util.warn)("TT: complementing a missing function tail");
2095
+ content.push(new Uint8Array([0x22, 0x2d]));
2096
+ }
2097
+
2098
+ foldTTTable(table, content);
2099
+ }
2100
+
2101
+ function checkInvalidFunctions(ttContext, maxFunctionDefs) {
2102
+ if (ttContext.tooComplexToFollowFunctions) {
2103
+ return;
2104
+ }
2105
+
2106
+ if (ttContext.functionsDefined.length > maxFunctionDefs) {
2107
+ (0, _util.warn)("TT: more functions defined than expected");
2108
+ ttContext.hintsValid = false;
2109
+ return;
2110
+ }
2111
+
2112
+ for (var j = 0, jj = ttContext.functionsUsed.length; j < jj; j++) {
2113
+ if (j > maxFunctionDefs) {
2114
+ (0, _util.warn)("TT: invalid function id: " + j);
2115
+ ttContext.hintsValid = false;
2116
+ return;
2117
+ }
2118
+
2119
+ if (ttContext.functionsUsed[j] && !ttContext.functionsDefined[j]) {
2120
+ (0, _util.warn)("TT: undefined function: " + j);
2121
+ ttContext.hintsValid = false;
2122
+ return;
2123
+ }
2124
+ }
2125
+ }
2126
+
2127
+ function foldTTTable(table, content) {
2128
+ if (content.length > 1) {
2129
+ var newLength = 0;
2130
+ var j, jj;
2131
+
2132
+ for (j = 0, jj = content.length; j < jj; j++) {
2133
+ newLength += content[j].length;
2134
+ }
2135
+
2136
+ newLength = newLength + 3 & ~3;
2137
+ var result = new Uint8Array(newLength);
2138
+ var pos = 0;
2139
+
2140
+ for (j = 0, jj = content.length; j < jj; j++) {
2141
+ result.set(content[j], pos);
2142
+ pos += content[j].length;
2143
+ }
2144
+
2145
+ table.data = result;
2146
+ table.length = newLength;
2147
+ }
2148
+ }
2149
+
2150
+ function sanitizeTTPrograms(fpgm, prep, cvt, maxFunctionDefs) {
2151
+ var ttContext = {
2152
+ functionsDefined: [],
2153
+ functionsUsed: [],
2154
+ functionsStackDeltas: [],
2155
+ tooComplexToFollowFunctions: false,
2156
+ hintsValid: true
2157
+ };
2158
+
2159
+ if (fpgm) {
2160
+ sanitizeTTProgram(fpgm, ttContext);
2161
+ }
2162
+
2163
+ if (prep) {
2164
+ sanitizeTTProgram(prep, ttContext);
2165
+ }
2166
+
2167
+ if (fpgm) {
2168
+ checkInvalidFunctions(ttContext, maxFunctionDefs);
2169
+ }
2170
+
2171
+ if (cvt && cvt.length & 1) {
2172
+ var cvtData = new Uint8Array(cvt.length + 1);
2173
+ cvtData.set(cvt.data);
2174
+ cvt.data = cvtData;
2175
+ }
2176
+
2177
+ return ttContext.hintsValid;
2178
+ }
2179
+
2180
+ font = new _stream.Stream(new Uint8Array(font.getBytes()));
2181
+ let header, tables;
2182
+
2183
+ if (isTrueTypeCollectionFile(font)) {
2184
+ const ttcData = readTrueTypeCollectionData(font, this.name);
2185
+ header = ttcData.header;
2186
+ tables = ttcData.tables;
2187
+ } else {
2188
+ header = readOpenTypeHeader(font);
2189
+ tables = readTables(font, header.numTables);
2190
+ }
2191
+
2192
+ let cff, cffFile;
2193
+ var isTrueType = !tables["CFF "];
2194
+
2195
+ if (!isTrueType) {
2196
+ const isComposite = properties.composite && ((properties.cidToGidMap || []).length > 0 || !(properties.cMap instanceof _cmap.IdentityCMap));
2197
+
2198
+ if (header.version === "OTTO" && !isComposite || !tables["head"] || !tables["hhea"] || !tables["maxp"] || !tables["post"]) {
2199
+ cffFile = new _stream.Stream(tables["CFF "].data);
2200
+ cff = new CFFFont(cffFile, properties);
2201
+ adjustWidths(properties);
2202
+ return this.convert(name, cff, properties);
2203
+ }
2204
+
2205
+ delete tables["glyf"];
2206
+ delete tables["loca"];
2207
+ delete tables["fpgm"];
2208
+ delete tables["prep"];
2209
+ delete tables["cvt "];
2210
+ this.isOpenType = true;
2211
+ } else {
2212
+ if (!tables["loca"]) {
2213
+ throw new _util.FormatError('Required "loca" table is not found');
2214
+ }
2215
+
2216
+ if (!tables["glyf"]) {
2217
+ (0, _util.warn)('Required "glyf" table is not found -- trying to recover.');
2218
+ tables["glyf"] = {
2219
+ tag: "glyf",
2220
+ data: new Uint8Array(0)
2221
+ };
2222
+ }
2223
+
2224
+ this.isOpenType = false;
2225
+ }
2226
+
2227
+ if (!tables["maxp"]) {
2228
+ throw new _util.FormatError('Required "maxp" table is not found');
2229
+ }
2230
+
2231
+ font.pos = (font.start || 0) + tables["maxp"].offset;
2232
+ var version = font.getInt32();
2233
+ const numGlyphs = font.getUint16();
2234
+ let numGlyphsOut = numGlyphs + 1;
2235
+ let dupFirstEntry = true;
2236
+
2237
+ if (numGlyphsOut > 0xffff) {
2238
+ dupFirstEntry = false;
2239
+ numGlyphsOut = numGlyphs;
2240
+ (0, _util.warn)("Not enough space in glyfs to duplicate first glyph.");
2241
+ }
2242
+
2243
+ var maxFunctionDefs = 0;
2244
+ var maxSizeOfInstructions = 0;
2245
+
2246
+ if (version >= 0x00010000 && tables["maxp"].length >= 22) {
2247
+ font.pos += 8;
2248
+ var maxZones = font.getUint16();
2249
+
2250
+ if (maxZones > 2) {
2251
+ tables["maxp"].data[14] = 0;
2252
+ tables["maxp"].data[15] = 2;
2253
+ }
2254
+
2255
+ font.pos += 4;
2256
+ maxFunctionDefs = font.getUint16();
2257
+ font.pos += 4;
2258
+ maxSizeOfInstructions = font.getUint16();
2259
+ }
2260
+
2261
+ tables["maxp"].data[4] = numGlyphsOut >> 8;
2262
+ tables["maxp"].data[5] = numGlyphsOut & 255;
2263
+ var hintsValid = sanitizeTTPrograms(tables["fpgm"], tables["prep"], tables["cvt "], maxFunctionDefs);
2264
+
2265
+ if (!hintsValid) {
2266
+ delete tables["fpgm"];
2267
+ delete tables["prep"];
2268
+ delete tables["cvt "];
2269
+ }
2270
+
2271
+ sanitizeMetrics(font, tables["hhea"], tables["hmtx"], numGlyphsOut, dupFirstEntry);
2272
+
2273
+ if (!tables["head"]) {
2274
+ throw new _util.FormatError('Required "head" table is not found');
2275
+ }
2276
+
2277
+ sanitizeHead(tables["head"], numGlyphs, isTrueType ? tables["loca"].length : 0);
2278
+ var missingGlyphs = Object.create(null);
2279
+
2280
+ if (isTrueType) {
2281
+ var isGlyphLocationsLong = int16(tables["head"].data[50], tables["head"].data[51]);
2282
+ var glyphsInfo = sanitizeGlyphLocations(tables["loca"], tables["glyf"], numGlyphs, isGlyphLocationsLong, hintsValid, dupFirstEntry, maxSizeOfInstructions);
2283
+ missingGlyphs = glyphsInfo.missingGlyphs;
2284
+
2285
+ if (version >= 0x00010000 && tables["maxp"].length >= 22) {
2286
+ tables["maxp"].data[26] = glyphsInfo.maxSizeOfInstructions >> 8;
2287
+ tables["maxp"].data[27] = glyphsInfo.maxSizeOfInstructions & 255;
2288
+ }
2289
+ }
2290
+
2291
+ if (!tables["hhea"]) {
2292
+ throw new _util.FormatError('Required "hhea" table is not found');
2293
+ }
2294
+
2295
+ if (tables["hhea"].data[10] === 0 && tables["hhea"].data[11] === 0) {
2296
+ tables["hhea"].data[10] = 0xff;
2297
+ tables["hhea"].data[11] = 0xff;
2298
+ }
2299
+
2300
+ var metricsOverride = {
2301
+ unitsPerEm: int16(tables["head"].data[18], tables["head"].data[19]),
2302
+ yMax: int16(tables["head"].data[42], tables["head"].data[43]),
2303
+ yMin: signedInt16(tables["head"].data[38], tables["head"].data[39]),
2304
+ ascent: int16(tables["hhea"].data[4], tables["hhea"].data[5]),
2305
+ descent: signedInt16(tables["hhea"].data[6], tables["hhea"].data[7])
2306
+ };
2307
+ this.ascent = metricsOverride.ascent / metricsOverride.unitsPerEm;
2308
+ this.descent = metricsOverride.descent / metricsOverride.unitsPerEm;
2309
+
2310
+ if (tables["post"]) {
2311
+ readPostScriptTable(tables["post"], properties, numGlyphs);
2312
+ }
2313
+
2314
+ tables["post"] = {
2315
+ tag: "post",
2316
+ data: createPostTable(properties)
2317
+ };
2318
+ var charCodeToGlyphId = [],
2319
+ charCode;
2320
+
2321
+ function hasGlyph(glyphId) {
2322
+ return !missingGlyphs[glyphId];
2323
+ }
2324
+
2325
+ if (properties.composite) {
2326
+ var cidToGidMap = properties.cidToGidMap || [];
2327
+ var isCidToGidMapEmpty = cidToGidMap.length === 0;
2328
+ properties.cMap.forEach(function (charCode, cid) {
2329
+ if (cid > 0xffff) {
2330
+ throw new _util.FormatError("Max size of CID is 65,535");
2331
+ }
2332
+
2333
+ var glyphId = -1;
2334
+
2335
+ if (isCidToGidMapEmpty) {
2336
+ glyphId = cid;
2337
+ } else if (cidToGidMap[cid] !== undefined) {
2338
+ glyphId = cidToGidMap[cid];
2339
+ }
2340
+
2341
+ if (glyphId >= 0 && glyphId < numGlyphs && hasGlyph(glyphId)) {
2342
+ charCodeToGlyphId[charCode] = glyphId;
2343
+ }
2344
+ });
2345
+ } else {
2346
+ var cmapTable = readCmapTable(tables["cmap"], font, this.isSymbolicFont, properties.hasEncoding);
2347
+ var cmapPlatformId = cmapTable.platformId;
2348
+ var cmapEncodingId = cmapTable.encodingId;
2349
+ var cmapMappings = cmapTable.mappings;
2350
+ var cmapMappingsLength = cmapMappings.length;
2351
+
2352
+ if (properties.hasEncoding && (cmapPlatformId === 3 && cmapEncodingId === 1 || cmapPlatformId === 1 && cmapEncodingId === 0) || cmapPlatformId === -1 && cmapEncodingId === -1 && !!(0, _encodings.getEncoding)(properties.baseEncodingName)) {
2353
+ var baseEncoding = [];
2354
+
2355
+ if (properties.baseEncodingName === "MacRomanEncoding" || properties.baseEncodingName === "WinAnsiEncoding") {
2356
+ baseEncoding = (0, _encodings.getEncoding)(properties.baseEncodingName);
2357
+ }
2358
+
2359
+ var glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)();
2360
+
2361
+ for (charCode = 0; charCode < 256; charCode++) {
2362
+ var glyphName, standardGlyphName;
2363
+
2364
+ if (this.differences && charCode in this.differences) {
2365
+ glyphName = this.differences[charCode];
2366
+ } else if (charCode in baseEncoding && baseEncoding[charCode] !== "") {
2367
+ glyphName = baseEncoding[charCode];
2368
+ } else {
2369
+ glyphName = _encodings.StandardEncoding[charCode];
2370
+ }
2371
+
2372
+ if (!glyphName) {
2373
+ continue;
2374
+ }
2375
+
2376
+ standardGlyphName = recoverGlyphName(glyphName, glyphsUnicodeMap);
2377
+ var unicodeOrCharCode;
2378
+
2379
+ if (cmapPlatformId === 3 && cmapEncodingId === 1) {
2380
+ unicodeOrCharCode = glyphsUnicodeMap[standardGlyphName];
2381
+ } else if (cmapPlatformId === 1 && cmapEncodingId === 0) {
2382
+ unicodeOrCharCode = _encodings.MacRomanEncoding.indexOf(standardGlyphName);
2383
+ }
2384
+
2385
+ var found = false;
2386
+
2387
+ for (let i = 0; i < cmapMappingsLength; ++i) {
2388
+ if (cmapMappings[i].charCode !== unicodeOrCharCode) {
2389
+ continue;
2390
+ }
2391
+
2392
+ charCodeToGlyphId[charCode] = cmapMappings[i].glyphId;
2393
+ found = true;
2394
+ break;
2395
+ }
2396
+
2397
+ if (!found && properties.glyphNames) {
2398
+ var glyphId = properties.glyphNames.indexOf(glyphName);
2399
+
2400
+ if (glyphId === -1 && standardGlyphName !== glyphName) {
2401
+ glyphId = properties.glyphNames.indexOf(standardGlyphName);
2402
+ }
2403
+
2404
+ if (glyphId > 0 && hasGlyph(glyphId)) {
2405
+ charCodeToGlyphId[charCode] = glyphId;
2406
+ }
2407
+ }
2408
+ }
2409
+ } else if (cmapPlatformId === 0 && cmapEncodingId === 0) {
2410
+ for (let i = 0; i < cmapMappingsLength; ++i) {
2411
+ charCodeToGlyphId[cmapMappings[i].charCode] = cmapMappings[i].glyphId;
2412
+ }
2413
+ } else {
2414
+ for (let i = 0; i < cmapMappingsLength; ++i) {
2415
+ charCode = cmapMappings[i].charCode;
2416
+
2417
+ if (cmapPlatformId === 3 && charCode >= 0xf000 && charCode <= 0xf0ff) {
2418
+ charCode &= 0xff;
2419
+ }
2420
+
2421
+ charCodeToGlyphId[charCode] = cmapMappings[i].glyphId;
2422
+ }
2423
+ }
2424
+ }
2425
+
2426
+ if (charCodeToGlyphId.length === 0) {
2427
+ charCodeToGlyphId[0] = 0;
2428
+ }
2429
+
2430
+ let glyphZeroId = numGlyphsOut - 1;
2431
+
2432
+ if (!dupFirstEntry) {
2433
+ glyphZeroId = 0;
2434
+ }
2435
+
2436
+ var newMapping = adjustMapping(charCodeToGlyphId, hasGlyph, glyphZeroId);
2437
+ this.toFontChar = newMapping.toFontChar;
2438
+ tables["cmap"] = {
2439
+ tag: "cmap",
2440
+ data: createCmapTable(newMapping.charCodeToGlyphId, numGlyphsOut)
2441
+ };
2442
+
2443
+ if (!tables["OS/2"] || !validateOS2Table(tables["OS/2"])) {
2444
+ tables["OS/2"] = {
2445
+ tag: "OS/2",
2446
+ data: createOS2Table(properties, newMapping.charCodeToGlyphId, metricsOverride)
2447
+ };
2448
+ }
2449
+
2450
+ if (!isTrueType) {
2451
+ try {
2452
+ cffFile = new _stream.Stream(tables["CFF "].data);
2453
+ var parser = new _cff_parser.CFFParser(cffFile, properties, SEAC_ANALYSIS_ENABLED);
2454
+ cff = parser.parse();
2455
+ cff.duplicateFirstGlyph();
2456
+ var compiler = new _cff_parser.CFFCompiler(cff);
2457
+ tables["CFF "].data = compiler.compile();
2458
+ } catch (e) {
2459
+ (0, _util.warn)("Failed to compile font " + properties.loadedName);
2460
+ }
2461
+ }
2462
+
2463
+ if (!tables["name"]) {
2464
+ tables["name"] = {
2465
+ tag: "name",
2466
+ data: createNameTable(this.name)
2467
+ };
2468
+ } else {
2469
+ var namePrototype = readNameTable(tables["name"]);
2470
+ tables["name"].data = createNameTable(name, namePrototype);
2471
+ }
2472
+
2473
+ var builder = new OpenTypeFileBuilder(header.version);
2474
+
2475
+ for (var tableTag in tables) {
2476
+ builder.addTable(tableTag, tables[tableTag].data);
2477
+ }
2478
+
2479
+ return builder.toArray();
2480
+ },
2481
+ convert: function Font_convert(fontName, font, properties) {
2482
+ properties.fixedPitch = false;
2483
+
2484
+ if (properties.builtInEncoding) {
2485
+ adjustToUnicode(properties, properties.builtInEncoding);
2486
+ }
2487
+
2488
+ let glyphZeroId = 1;
2489
+
2490
+ if (font instanceof CFFFont) {
2491
+ glyphZeroId = font.numGlyphs - 1;
2492
+ }
2493
+
2494
+ var mapping = font.getGlyphMapping(properties);
2495
+ var newMapping = adjustMapping(mapping, font.hasGlyphId.bind(font), glyphZeroId);
2496
+ this.toFontChar = newMapping.toFontChar;
2497
+ var numGlyphs = font.numGlyphs;
2498
+
2499
+ function getCharCodes(charCodeToGlyphId, glyphId) {
2500
+ var charCodes = null;
2501
+
2502
+ for (var charCode in charCodeToGlyphId) {
2503
+ if (glyphId === charCodeToGlyphId[charCode]) {
2504
+ if (!charCodes) {
2505
+ charCodes = [];
2506
+ }
2507
+
2508
+ charCodes.push(charCode | 0);
2509
+ }
2510
+ }
2511
+
2512
+ return charCodes;
2513
+ }
2514
+
2515
+ function createCharCode(charCodeToGlyphId, glyphId) {
2516
+ for (var charCode in charCodeToGlyphId) {
2517
+ if (glyphId === charCodeToGlyphId[charCode]) {
2518
+ return charCode | 0;
2519
+ }
2520
+ }
2521
+
2522
+ newMapping.charCodeToGlyphId[newMapping.nextAvailableFontCharCode] = glyphId;
2523
+ return newMapping.nextAvailableFontCharCode++;
2524
+ }
2525
+
2526
+ var seacs = font.seacs;
2527
+
2528
+ if (SEAC_ANALYSIS_ENABLED && seacs && seacs.length) {
2529
+ var matrix = properties.fontMatrix || _util.FONT_IDENTITY_MATRIX;
2530
+ var charset = font.getCharset();
2531
+ var seacMap = Object.create(null);
2532
+
2533
+ for (var glyphId in seacs) {
2534
+ glyphId |= 0;
2535
+ var seac = seacs[glyphId];
2536
+ var baseGlyphName = _encodings.StandardEncoding[seac[2]];
2537
+ var accentGlyphName = _encodings.StandardEncoding[seac[3]];
2538
+ var baseGlyphId = charset.indexOf(baseGlyphName);
2539
+ var accentGlyphId = charset.indexOf(accentGlyphName);
2540
+
2541
+ if (baseGlyphId < 0 || accentGlyphId < 0) {
2542
+ continue;
2543
+ }
2544
+
2545
+ var accentOffset = {
2546
+ x: seac[0] * matrix[0] + seac[1] * matrix[2] + matrix[4],
2547
+ y: seac[0] * matrix[1] + seac[1] * matrix[3] + matrix[5]
2548
+ };
2549
+ var charCodes = getCharCodes(mapping, glyphId);
2550
+
2551
+ if (!charCodes) {
2552
+ continue;
2553
+ }
2554
+
2555
+ for (var i = 0, ii = charCodes.length; i < ii; i++) {
2556
+ var charCode = charCodes[i];
2557
+ var charCodeToGlyphId = newMapping.charCodeToGlyphId;
2558
+ var baseFontCharCode = createCharCode(charCodeToGlyphId, baseGlyphId);
2559
+ var accentFontCharCode = createCharCode(charCodeToGlyphId, accentGlyphId);
2560
+ seacMap[charCode] = {
2561
+ baseFontCharCode,
2562
+ accentFontCharCode,
2563
+ accentOffset
2564
+ };
2565
+ }
2566
+ }
2567
+
2568
+ properties.seacMap = seacMap;
2569
+ }
2570
+
2571
+ var unitsPerEm = 1 / (properties.fontMatrix || _util.FONT_IDENTITY_MATRIX)[0];
2572
+ var builder = new OpenTypeFileBuilder("\x4F\x54\x54\x4F");
2573
+ builder.addTable("CFF ", font.data);
2574
+ builder.addTable("OS/2", createOS2Table(properties, newMapping.charCodeToGlyphId));
2575
+ builder.addTable("cmap", createCmapTable(newMapping.charCodeToGlyphId, numGlyphs));
2576
+ builder.addTable("head", "\x00\x01\x00\x00" + "\x00\x00\x10\x00" + "\x00\x00\x00\x00" + "\x5F\x0F\x3C\xF5" + "\x00\x00" + safeString16(unitsPerEm) + "\x00\x00\x00\x00\x9e\x0b\x7e\x27" + "\x00\x00\x00\x00\x9e\x0b\x7e\x27" + "\x00\x00" + safeString16(properties.descent) + "\x0F\xFF" + safeString16(properties.ascent) + string16(properties.italicAngle ? 2 : 0) + "\x00\x11" + "\x00\x00" + "\x00\x00" + "\x00\x00");
2577
+ builder.addTable("hhea", "\x00\x01\x00\x00" + safeString16(properties.ascent) + safeString16(properties.descent) + "\x00\x00" + "\xFF\xFF" + "\x00\x00" + "\x00\x00" + "\x00\x00" + safeString16(properties.capHeight) + safeString16(Math.tan(properties.italicAngle) * properties.xHeight) + "\x00\x00" + "\x00\x00" + "\x00\x00" + "\x00\x00" + "\x00\x00" + "\x00\x00" + string16(numGlyphs));
2578
+ builder.addTable("hmtx", function fontFieldsHmtx() {
2579
+ var charstrings = font.charstrings;
2580
+ var cffWidths = font.cff ? font.cff.widths : null;
2581
+ var hmtx = "\x00\x00\x00\x00";
2582
+
2583
+ for (var i = 1, ii = numGlyphs; i < ii; i++) {
2584
+ var width = 0;
2585
+
2586
+ if (charstrings) {
2587
+ var charstring = charstrings[i - 1];
2588
+ width = "width" in charstring ? charstring.width : 0;
2589
+ } else if (cffWidths) {
2590
+ width = Math.ceil(cffWidths[i] || 0);
2591
+ }
2592
+
2593
+ hmtx += string16(width) + string16(0);
2594
+ }
2595
+
2596
+ return hmtx;
2597
+ }());
2598
+ builder.addTable("maxp", "\x00\x00\x50\x00" + string16(numGlyphs));
2599
+ builder.addTable("name", createNameTable(fontName));
2600
+ builder.addTable("post", createPostTable(properties));
2601
+ return builder.toArray();
2602
+ },
2603
+
2604
+ get spaceWidth() {
2605
+ if ("_shadowWidth" in this) {
2606
+ return this._shadowWidth;
2607
+ }
2608
+
2609
+ var possibleSpaceReplacements = ["space", "minus", "one", "i", "I"];
2610
+ var width;
2611
+
2612
+ for (var i = 0, ii = possibleSpaceReplacements.length; i < ii; i++) {
2613
+ var glyphName = possibleSpaceReplacements[i];
2614
+
2615
+ if (glyphName in this.widths) {
2616
+ width = this.widths[glyphName];
2617
+ break;
2618
+ }
2619
+
2620
+ var glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)();
2621
+ var glyphUnicode = glyphsUnicodeMap[glyphName];
2622
+ var charcode = 0;
2623
+
2624
+ if (this.composite) {
2625
+ if (this.cMap.contains(glyphUnicode)) {
2626
+ charcode = this.cMap.lookup(glyphUnicode);
2627
+ }
2628
+ }
2629
+
2630
+ if (!charcode && this.toUnicode) {
2631
+ charcode = this.toUnicode.charCodeOf(glyphUnicode);
2632
+ }
2633
+
2634
+ if (charcode <= 0) {
2635
+ charcode = glyphUnicode;
2636
+ }
2637
+
2638
+ width = this.widths[charcode];
2639
+
2640
+ if (width) {
2641
+ break;
2642
+ }
2643
+ }
2644
+
2645
+ width = width || this.defaultWidth;
2646
+ this._shadowWidth = width;
2647
+ return width;
2648
+ },
2649
+
2650
+ charToGlyph: function Font_charToGlyph(charcode, isSpace) {
2651
+ var fontCharCode, width, operatorListId;
2652
+ var widthCode = charcode;
2653
+
2654
+ if (this.cMap && this.cMap.contains(charcode)) {
2655
+ widthCode = this.cMap.lookup(charcode);
2656
+ }
2657
+
2658
+ width = this.widths[widthCode];
2659
+ width = (0, _util.isNum)(width) ? width : this.defaultWidth;
2660
+ var vmetric = this.vmetrics && this.vmetrics[widthCode];
2661
+ let unicode = this.toUnicode.get(charcode) || this.fallbackToUnicode.get(charcode) || charcode;
2662
+
2663
+ if (typeof unicode === "number") {
2664
+ unicode = String.fromCharCode(unicode);
2665
+ }
2666
+
2667
+ var isInFont = charcode in this.toFontChar;
2668
+ fontCharCode = this.toFontChar[charcode] || charcode;
2669
+
2670
+ if (this.missingFile) {
2671
+ const glyphName = this.differences[charcode] || this.defaultEncoding[charcode];
2672
+
2673
+ if ((glyphName === ".notdef" || glyphName === "") && this.type === "Type1") {
2674
+ fontCharCode = 0x20;
2675
+ }
2676
+
2677
+ fontCharCode = (0, _unicode.mapSpecialUnicodeValues)(fontCharCode);
2678
+ }
2679
+
2680
+ if (this.isType3Font) {
2681
+ operatorListId = fontCharCode;
2682
+ }
2683
+
2684
+ var accent = null;
2685
+
2686
+ if (this.seacMap && this.seacMap[charcode]) {
2687
+ isInFont = true;
2688
+ var seac = this.seacMap[charcode];
2689
+ fontCharCode = seac.baseFontCharCode;
2690
+ accent = {
2691
+ fontChar: String.fromCodePoint(seac.accentFontCharCode),
2692
+ offset: seac.accentOffset
2693
+ };
2694
+ }
2695
+
2696
+ var fontChar = typeof fontCharCode === "number" ? String.fromCodePoint(fontCharCode) : "";
2697
+ var glyph = this.glyphCache[charcode];
2698
+
2699
+ if (!glyph || !glyph.matchesForCache(fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont)) {
2700
+ glyph = new Glyph(fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont);
2701
+ this.glyphCache[charcode] = glyph;
2702
+ }
2703
+
2704
+ return glyph;
2705
+ },
2706
+ charsToGlyphs: function Font_charsToGlyphs(chars) {
2707
+ var charsCache = this.charsCache;
2708
+ var glyphs, glyph, charcode;
2709
+
2710
+ if (charsCache) {
2711
+ glyphs = charsCache[chars];
2712
+
2713
+ if (glyphs) {
2714
+ return glyphs;
2715
+ }
2716
+ }
2717
+
2718
+ if (!charsCache) {
2719
+ charsCache = this.charsCache = Object.create(null);
2720
+ }
2721
+
2722
+ glyphs = [];
2723
+ var charsCacheKey = chars;
2724
+ var i = 0,
2725
+ ii;
2726
+
2727
+ if (this.cMap) {
2728
+ var c = Object.create(null);
2729
+
2730
+ while (i < chars.length) {
2731
+ this.cMap.readCharCode(chars, i, c);
2732
+ charcode = c.charcode;
2733
+ var length = c.length;
2734
+ i += length;
2735
+ var isSpace = length === 1 && chars.charCodeAt(i - 1) === 0x20;
2736
+ glyph = this.charToGlyph(charcode, isSpace);
2737
+ glyphs.push(glyph);
2738
+ }
2739
+ } else {
2740
+ for (i = 0, ii = chars.length; i < ii; ++i) {
2741
+ charcode = chars.charCodeAt(i);
2742
+ glyph = this.charToGlyph(charcode, charcode === 0x20);
2743
+ glyphs.push(glyph);
2744
+ }
2745
+ }
2746
+
2747
+ return charsCache[charsCacheKey] = glyphs;
2748
+ },
2749
+
2750
+ get glyphCacheValues() {
2751
+ return Object.values(this.glyphCache);
2752
+ }
2753
+
2754
+ };
2755
+ return Font;
2756
+ }();
2757
+
2758
+ exports.Font = Font;
2759
+
2760
+ var ErrorFont = function ErrorFontClosure() {
2761
+ function ErrorFont(error) {
2762
+ this.error = error;
2763
+ this.loadedName = "g_font_error";
2764
+ this.missingFile = true;
2765
+ }
2766
+
2767
+ ErrorFont.prototype = {
2768
+ charsToGlyphs: function ErrorFont_charsToGlyphs() {
2769
+ return [];
2770
+ },
2771
+ exportData: function ErrorFont_exportData() {
2772
+ return {
2773
+ error: this.error
2774
+ };
2775
+ }
2776
+ };
2777
+ return ErrorFont;
2778
+ }();
2779
+
2780
+ exports.ErrorFont = ErrorFont;
2781
+
2782
+ function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) {
2783
+ var charCodeToGlyphId = Object.create(null);
2784
+ var glyphId, charCode, baseEncoding;
2785
+ var isSymbolicFont = !!(properties.flags & FontFlags.Symbolic);
2786
+
2787
+ if (properties.baseEncodingName) {
2788
+ baseEncoding = (0, _encodings.getEncoding)(properties.baseEncodingName);
2789
+
2790
+ for (charCode = 0; charCode < baseEncoding.length; charCode++) {
2791
+ glyphId = glyphNames.indexOf(baseEncoding[charCode]);
2792
+
2793
+ if (glyphId >= 0) {
2794
+ charCodeToGlyphId[charCode] = glyphId;
2795
+ } else {
2796
+ charCodeToGlyphId[charCode] = 0;
2797
+ }
2798
+ }
2799
+ } else if (isSymbolicFont) {
2800
+ for (charCode in builtInEncoding) {
2801
+ charCodeToGlyphId[charCode] = builtInEncoding[charCode];
2802
+ }
2803
+ } else {
2804
+ baseEncoding = _encodings.StandardEncoding;
2805
+
2806
+ for (charCode = 0; charCode < baseEncoding.length; charCode++) {
2807
+ glyphId = glyphNames.indexOf(baseEncoding[charCode]);
2808
+
2809
+ if (glyphId >= 0) {
2810
+ charCodeToGlyphId[charCode] = glyphId;
2811
+ } else {
2812
+ charCodeToGlyphId[charCode] = 0;
2813
+ }
2814
+ }
2815
+ }
2816
+
2817
+ var differences = properties.differences,
2818
+ glyphsUnicodeMap;
2819
+
2820
+ if (differences) {
2821
+ for (charCode in differences) {
2822
+ var glyphName = differences[charCode];
2823
+ glyphId = glyphNames.indexOf(glyphName);
2824
+
2825
+ if (glyphId === -1) {
2826
+ if (!glyphsUnicodeMap) {
2827
+ glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)();
2828
+ }
2829
+
2830
+ var standardGlyphName = recoverGlyphName(glyphName, glyphsUnicodeMap);
2831
+
2832
+ if (standardGlyphName !== glyphName) {
2833
+ glyphId = glyphNames.indexOf(standardGlyphName);
2834
+ }
2835
+ }
2836
+
2837
+ if (glyphId >= 0) {
2838
+ charCodeToGlyphId[charCode] = glyphId;
2839
+ } else {
2840
+ charCodeToGlyphId[charCode] = 0;
2841
+ }
2842
+ }
2843
+ }
2844
+
2845
+ return charCodeToGlyphId;
2846
+ }
2847
+
2848
+ var Type1Font = function Type1FontClosure() {
2849
+ function findBlock(streamBytes, signature, startIndex) {
2850
+ var streamBytesLength = streamBytes.length;
2851
+ var signatureLength = signature.length;
2852
+ var scanLength = streamBytesLength - signatureLength;
2853
+ var i = startIndex,
2854
+ j,
2855
+ found = false;
2856
+
2857
+ while (i < scanLength) {
2858
+ j = 0;
2859
+
2860
+ while (j < signatureLength && streamBytes[i + j] === signature[j]) {
2861
+ j++;
2862
+ }
2863
+
2864
+ if (j >= signatureLength) {
2865
+ i += j;
2866
+
2867
+ while (i < streamBytesLength && (0, _core_utils.isWhiteSpace)(streamBytes[i])) {
2868
+ i++;
2869
+ }
2870
+
2871
+ found = true;
2872
+ break;
2873
+ }
2874
+
2875
+ i++;
2876
+ }
2877
+
2878
+ return {
2879
+ found,
2880
+ length: i
2881
+ };
2882
+ }
2883
+
2884
+ function getHeaderBlock(stream, suggestedLength) {
2885
+ var EEXEC_SIGNATURE = [0x65, 0x65, 0x78, 0x65, 0x63];
2886
+ var streamStartPos = stream.pos;
2887
+ var headerBytes, headerBytesLength, block;
2888
+
2889
+ try {
2890
+ headerBytes = stream.getBytes(suggestedLength);
2891
+ headerBytesLength = headerBytes.length;
2892
+ } catch (ex) {
2893
+ if (ex instanceof _core_utils.MissingDataException) {
2894
+ throw ex;
2895
+ }
2896
+ }
2897
+
2898
+ if (headerBytesLength === suggestedLength) {
2899
+ block = findBlock(headerBytes, EEXEC_SIGNATURE, suggestedLength - 2 * EEXEC_SIGNATURE.length);
2900
+
2901
+ if (block.found && block.length === suggestedLength) {
2902
+ return {
2903
+ stream: new _stream.Stream(headerBytes),
2904
+ length: suggestedLength
2905
+ };
2906
+ }
2907
+ }
2908
+
2909
+ (0, _util.warn)('Invalid "Length1" property in Type1 font -- trying to recover.');
2910
+ stream.pos = streamStartPos;
2911
+ var SCAN_BLOCK_LENGTH = 2048;
2912
+ var actualLength;
2913
+
2914
+ while (true) {
2915
+ var scanBytes = stream.peekBytes(SCAN_BLOCK_LENGTH);
2916
+ block = findBlock(scanBytes, EEXEC_SIGNATURE, 0);
2917
+
2918
+ if (block.length === 0) {
2919
+ break;
2920
+ }
2921
+
2922
+ stream.pos += block.length;
2923
+
2924
+ if (block.found) {
2925
+ actualLength = stream.pos - streamStartPos;
2926
+ break;
2927
+ }
2928
+ }
2929
+
2930
+ stream.pos = streamStartPos;
2931
+
2932
+ if (actualLength) {
2933
+ return {
2934
+ stream: new _stream.Stream(stream.getBytes(actualLength)),
2935
+ length: actualLength
2936
+ };
2937
+ }
2938
+
2939
+ (0, _util.warn)('Unable to recover "Length1" property in Type1 font -- using as is.');
2940
+ return {
2941
+ stream: new _stream.Stream(stream.getBytes(suggestedLength)),
2942
+ length: suggestedLength
2943
+ };
2944
+ }
2945
+
2946
+ function getEexecBlock(stream, suggestedLength) {
2947
+ var eexecBytes = stream.getBytes();
2948
+ return {
2949
+ stream: new _stream.Stream(eexecBytes),
2950
+ length: eexecBytes.length
2951
+ };
2952
+ }
2953
+
2954
+ function Type1Font(name, file, properties) {
2955
+ var PFB_HEADER_SIZE = 6;
2956
+ var headerBlockLength = properties.length1;
2957
+ var eexecBlockLength = properties.length2;
2958
+ var pfbHeader = file.peekBytes(PFB_HEADER_SIZE);
2959
+ var pfbHeaderPresent = pfbHeader[0] === 0x80 && pfbHeader[1] === 0x01;
2960
+
2961
+ if (pfbHeaderPresent) {
2962
+ file.skip(PFB_HEADER_SIZE);
2963
+ headerBlockLength = pfbHeader[5] << 24 | pfbHeader[4] << 16 | pfbHeader[3] << 8 | pfbHeader[2];
2964
+ }
2965
+
2966
+ var headerBlock = getHeaderBlock(file, headerBlockLength);
2967
+ var headerBlockParser = new _type1_parser.Type1Parser(headerBlock.stream, false, SEAC_ANALYSIS_ENABLED);
2968
+ headerBlockParser.extractFontHeader(properties);
2969
+
2970
+ if (pfbHeaderPresent) {
2971
+ pfbHeader = file.getBytes(PFB_HEADER_SIZE);
2972
+ eexecBlockLength = pfbHeader[5] << 24 | pfbHeader[4] << 16 | pfbHeader[3] << 8 | pfbHeader[2];
2973
+ }
2974
+
2975
+ var eexecBlock = getEexecBlock(file, eexecBlockLength);
2976
+ var eexecBlockParser = new _type1_parser.Type1Parser(eexecBlock.stream, true, SEAC_ANALYSIS_ENABLED);
2977
+ var data = eexecBlockParser.extractFontProgram(properties);
2978
+
2979
+ for (var info in data.properties) {
2980
+ properties[info] = data.properties[info];
2981
+ }
2982
+
2983
+ var charstrings = data.charstrings;
2984
+ var type2Charstrings = this.getType2Charstrings(charstrings);
2985
+ var subrs = this.getType2Subrs(data.subrs);
2986
+ this.charstrings = charstrings;
2987
+ this.data = this.wrap(name, type2Charstrings, this.charstrings, subrs, properties);
2988
+ this.seacs = this.getSeacs(data.charstrings);
2989
+ }
2990
+
2991
+ Type1Font.prototype = {
2992
+ get numGlyphs() {
2993
+ return this.charstrings.length + 1;
2994
+ },
2995
+
2996
+ getCharset: function Type1Font_getCharset() {
2997
+ var charset = [".notdef"];
2998
+ var charstrings = this.charstrings;
2999
+
3000
+ for (var glyphId = 0; glyphId < charstrings.length; glyphId++) {
3001
+ charset.push(charstrings[glyphId].glyphName);
3002
+ }
3003
+
3004
+ return charset;
3005
+ },
3006
+ getGlyphMapping: function Type1Font_getGlyphMapping(properties) {
3007
+ var charstrings = this.charstrings;
3008
+ var glyphNames = [".notdef"],
3009
+ glyphId;
3010
+
3011
+ for (glyphId = 0; glyphId < charstrings.length; glyphId++) {
3012
+ glyphNames.push(charstrings[glyphId].glyphName);
3013
+ }
3014
+
3015
+ var encoding = properties.builtInEncoding;
3016
+
3017
+ if (encoding) {
3018
+ var builtInEncoding = Object.create(null);
3019
+
3020
+ for (var charCode in encoding) {
3021
+ glyphId = glyphNames.indexOf(encoding[charCode]);
3022
+
3023
+ if (glyphId >= 0) {
3024
+ builtInEncoding[charCode] = glyphId;
3025
+ }
3026
+ }
3027
+ }
3028
+
3029
+ return type1FontGlyphMapping(properties, builtInEncoding, glyphNames);
3030
+ },
3031
+ hasGlyphId: function Type1Font_hasGlyphID(id) {
3032
+ if (id < 0 || id >= this.numGlyphs) {
3033
+ return false;
3034
+ }
3035
+
3036
+ if (id === 0) {
3037
+ return true;
3038
+ }
3039
+
3040
+ var glyph = this.charstrings[id - 1];
3041
+ return glyph.charstring.length > 0;
3042
+ },
3043
+ getSeacs: function Type1Font_getSeacs(charstrings) {
3044
+ var i, ii;
3045
+ var seacMap = [];
3046
+
3047
+ for (i = 0, ii = charstrings.length; i < ii; i++) {
3048
+ var charstring = charstrings[i];
3049
+
3050
+ if (charstring.seac) {
3051
+ seacMap[i + 1] = charstring.seac;
3052
+ }
3053
+ }
3054
+
3055
+ return seacMap;
3056
+ },
3057
+ getType2Charstrings: function Type1Font_getType2Charstrings(type1Charstrings) {
3058
+ var type2Charstrings = [];
3059
+
3060
+ for (var i = 0, ii = type1Charstrings.length; i < ii; i++) {
3061
+ type2Charstrings.push(type1Charstrings[i].charstring);
3062
+ }
3063
+
3064
+ return type2Charstrings;
3065
+ },
3066
+ getType2Subrs: function Type1Font_getType2Subrs(type1Subrs) {
3067
+ var bias = 0;
3068
+ var count = type1Subrs.length;
3069
+
3070
+ if (count < 1133) {
3071
+ bias = 107;
3072
+ } else if (count < 33769) {
3073
+ bias = 1131;
3074
+ } else {
3075
+ bias = 32768;
3076
+ }
3077
+
3078
+ var type2Subrs = [];
3079
+ var i;
3080
+
3081
+ for (i = 0; i < bias; i++) {
3082
+ type2Subrs.push([0x0b]);
3083
+ }
3084
+
3085
+ for (i = 0; i < count; i++) {
3086
+ type2Subrs.push(type1Subrs[i]);
3087
+ }
3088
+
3089
+ return type2Subrs;
3090
+ },
3091
+ wrap: function Type1Font_wrap(name, glyphs, charstrings, subrs, properties) {
3092
+ var cff = new _cff_parser.CFF();
3093
+ cff.header = new _cff_parser.CFFHeader(1, 0, 4, 4);
3094
+ cff.names = [name];
3095
+ var topDict = new _cff_parser.CFFTopDict();
3096
+ topDict.setByName("version", 391);
3097
+ topDict.setByName("Notice", 392);
3098
+ topDict.setByName("FullName", 393);
3099
+ topDict.setByName("FamilyName", 394);
3100
+ topDict.setByName("Weight", 395);
3101
+ topDict.setByName("Encoding", null);
3102
+ topDict.setByName("FontMatrix", properties.fontMatrix);
3103
+ topDict.setByName("FontBBox", properties.bbox);
3104
+ topDict.setByName("charset", null);
3105
+ topDict.setByName("CharStrings", null);
3106
+ topDict.setByName("Private", null);
3107
+ cff.topDict = topDict;
3108
+ var strings = new _cff_parser.CFFStrings();
3109
+ strings.add("Version 0.11");
3110
+ strings.add("See original notice");
3111
+ strings.add(name);
3112
+ strings.add(name);
3113
+ strings.add("Medium");
3114
+ cff.strings = strings;
3115
+ cff.globalSubrIndex = new _cff_parser.CFFIndex();
3116
+ var count = glyphs.length;
3117
+ var charsetArray = [".notdef"];
3118
+ var i, ii;
3119
+
3120
+ for (i = 0; i < count; i++) {
3121
+ const glyphName = charstrings[i].glyphName;
3122
+
3123
+ const index = _cff_parser.CFFStandardStrings.indexOf(glyphName);
3124
+
3125
+ if (index === -1) {
3126
+ strings.add(glyphName);
3127
+ }
3128
+
3129
+ charsetArray.push(glyphName);
3130
+ }
3131
+
3132
+ cff.charset = new _cff_parser.CFFCharset(false, 0, charsetArray);
3133
+ var charStringsIndex = new _cff_parser.CFFIndex();
3134
+ charStringsIndex.add([0x8b, 0x0e]);
3135
+
3136
+ for (i = 0; i < count; i++) {
3137
+ charStringsIndex.add(glyphs[i]);
3138
+ }
3139
+
3140
+ cff.charStrings = charStringsIndex;
3141
+ var privateDict = new _cff_parser.CFFPrivateDict();
3142
+ privateDict.setByName("Subrs", null);
3143
+ var fields = ["BlueValues", "OtherBlues", "FamilyBlues", "FamilyOtherBlues", "StemSnapH", "StemSnapV", "BlueShift", "BlueFuzz", "BlueScale", "LanguageGroup", "ExpansionFactor", "ForceBold", "StdHW", "StdVW"];
3144
+
3145
+ for (i = 0, ii = fields.length; i < ii; i++) {
3146
+ var field = fields[i];
3147
+
3148
+ if (!(field in properties.privateData)) {
3149
+ continue;
3150
+ }
3151
+
3152
+ var value = properties.privateData[field];
3153
+
3154
+ if (Array.isArray(value)) {
3155
+ for (var j = value.length - 1; j > 0; j--) {
3156
+ value[j] -= value[j - 1];
3157
+ }
3158
+ }
3159
+
3160
+ privateDict.setByName(field, value);
3161
+ }
3162
+
3163
+ cff.topDict.privateDict = privateDict;
3164
+ var subrIndex = new _cff_parser.CFFIndex();
3165
+
3166
+ for (i = 0, ii = subrs.length; i < ii; i++) {
3167
+ subrIndex.add(subrs[i]);
3168
+ }
3169
+
3170
+ privateDict.subrsIndex = subrIndex;
3171
+ var compiler = new _cff_parser.CFFCompiler(cff);
3172
+ return compiler.compile();
3173
+ }
3174
+ };
3175
+ return Type1Font;
3176
+ }();
3177
+
3178
+ var CFFFont = function CFFFontClosure() {
3179
+ function CFFFont(file, properties) {
3180
+ this.properties = properties;
3181
+ var parser = new _cff_parser.CFFParser(file, properties, SEAC_ANALYSIS_ENABLED);
3182
+ this.cff = parser.parse();
3183
+ this.cff.duplicateFirstGlyph();
3184
+ var compiler = new _cff_parser.CFFCompiler(this.cff);
3185
+ this.seacs = this.cff.seacs;
3186
+
3187
+ try {
3188
+ this.data = compiler.compile();
3189
+ } catch (e) {
3190
+ (0, _util.warn)("Failed to compile font " + properties.loadedName);
3191
+ this.data = file;
3192
+ }
3193
+ }
3194
+
3195
+ CFFFont.prototype = {
3196
+ get numGlyphs() {
3197
+ return this.cff.charStrings.count;
3198
+ },
3199
+
3200
+ getCharset: function CFFFont_getCharset() {
3201
+ return this.cff.charset.charset;
3202
+ },
3203
+ getGlyphMapping: function CFFFont_getGlyphMapping() {
3204
+ var cff = this.cff;
3205
+ var properties = this.properties;
3206
+ var charsets = cff.charset.charset;
3207
+ var charCodeToGlyphId;
3208
+ var glyphId;
3209
+
3210
+ if (properties.composite) {
3211
+ charCodeToGlyphId = Object.create(null);
3212
+ let charCode;
3213
+
3214
+ if (cff.isCIDFont) {
3215
+ for (glyphId = 0; glyphId < charsets.length; glyphId++) {
3216
+ var cid = charsets[glyphId];
3217
+ charCode = properties.cMap.charCodeOf(cid);
3218
+ charCodeToGlyphId[charCode] = glyphId;
3219
+ }
3220
+ } else {
3221
+ for (glyphId = 0; glyphId < cff.charStrings.count; glyphId++) {
3222
+ charCode = properties.cMap.charCodeOf(glyphId);
3223
+ charCodeToGlyphId[charCode] = glyphId;
3224
+ }
3225
+ }
3226
+
3227
+ return charCodeToGlyphId;
3228
+ }
3229
+
3230
+ var encoding = cff.encoding ? cff.encoding.encoding : null;
3231
+ charCodeToGlyphId = type1FontGlyphMapping(properties, encoding, charsets);
3232
+ return charCodeToGlyphId;
3233
+ },
3234
+ hasGlyphId: function CFFFont_hasGlyphID(id) {
3235
+ return this.cff.hasGlyphId(id);
3236
+ }
3237
+ };
3238
+ return CFFFont;
3239
+ }();