@internetarchive/bookreader 5.0.0-95 → 5.0.0-96

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 (305) hide show
  1. package/BookReader/BookReader.css +2251 -0
  2. package/BookReader/BookReader.js +3 -0
  3. package/BookReader/BookReader.js.LICENSE.txt +72 -0
  4. package/BookReader/BookReader.js.map +1 -0
  5. package/BookReader/hypothesis/LICENSE +50 -0
  6. package/BookReader/hypothesis/README.md +55 -0
  7. package/BookReader/hypothesis/build/boot.js +1 -0
  8. package/BookReader/hypothesis/build/manifest.json +20 -0
  9. package/BookReader/hypothesis/build/scripts/annotator.bundle.js +184 -0
  10. package/BookReader/hypothesis/build/scripts/annotator.bundle.js.map +1 -0
  11. package/BookReader/hypothesis/build/scripts/sidebar.bundle.js +798 -0
  12. package/BookReader/hypothesis/build/scripts/sidebar.bundle.js.map +1 -0
  13. package/BookReader/hypothesis/build/scripts/ui-playground.bundle.js +711 -0
  14. package/BookReader/hypothesis/build/scripts/ui-playground.bundle.js.map +1 -0
  15. package/BookReader/hypothesis/build/styles/annotator.css +2235 -0
  16. package/BookReader/hypothesis/build/styles/annotator.css.map +1 -0
  17. package/BookReader/hypothesis/build/styles/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  18. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  19. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  20. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  21. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  22. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Main-Bold.woff2 +0 -0
  23. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  24. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Main-Italic.woff2 +0 -0
  25. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Main-Regular.woff2 +0 -0
  26. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  27. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Math-Italic.woff2 +0 -0
  28. package/BookReader/hypothesis/build/styles/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  29. package/BookReader/hypothesis/build/styles/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  30. package/BookReader/hypothesis/build/styles/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  31. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Script-Regular.woff2 +0 -0
  32. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  33. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  34. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  35. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  36. package/BookReader/hypothesis/build/styles/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  37. package/BookReader/hypothesis/build/styles/highlights.css +2 -0
  38. package/BookReader/hypothesis/build/styles/highlights.css.map +1 -0
  39. package/BookReader/hypothesis/build/styles/katex.min.css +2 -0
  40. package/BookReader/hypothesis/build/styles/katex.min.css.map +1 -0
  41. package/BookReader/hypothesis/build/styles/pdfjs-overrides.css +2 -0
  42. package/BookReader/hypothesis/build/styles/pdfjs-overrides.css.map +1 -0
  43. package/BookReader/hypothesis/build/styles/sidebar.css +2731 -0
  44. package/BookReader/hypothesis/build/styles/sidebar.css.map +1 -0
  45. package/BookReader/hypothesis/build/styles/ui-playground.css +2659 -0
  46. package/BookReader/hypothesis/build/styles/ui-playground.css.map +1 -0
  47. package/BookReader/hypothesis/package.json +126 -0
  48. package/BookReader/ia-bookreader-bundle.js +1782 -0
  49. package/BookReader/ia-bookreader-bundle.js.LICENSE.txt +7 -0
  50. package/BookReader/ia-bookreader-bundle.js.map +1 -0
  51. package/BookReader/icons/1up.svg +1 -0
  52. package/BookReader/icons/2up.svg +1 -0
  53. package/BookReader/icons/advance.svg +3 -0
  54. package/BookReader/icons/chevron-right.svg +1 -0
  55. package/BookReader/icons/close-circle-dark.svg +1 -0
  56. package/BookReader/icons/close-circle.svg +1 -0
  57. package/BookReader/icons/fullscreen.svg +1 -0
  58. package/BookReader/icons/fullscreen_exit.svg +1 -0
  59. package/BookReader/icons/hamburger.svg +1 -0
  60. package/BookReader/icons/left-arrow.svg +1 -0
  61. package/BookReader/icons/magnify-minus.svg +1 -0
  62. package/BookReader/icons/magnify-plus.svg +1 -0
  63. package/BookReader/icons/magnify.svg +1 -0
  64. package/BookReader/icons/pause.svg +1 -0
  65. package/BookReader/icons/play.svg +1 -0
  66. package/BookReader/icons/playback-speed.svg +1 -0
  67. package/BookReader/icons/read-aloud.svg +1 -0
  68. package/BookReader/icons/review.svg +3 -0
  69. package/BookReader/icons/thumbnails.svg +1 -0
  70. package/BookReader/icons/voice.svg +1 -0
  71. package/BookReader/icons/volume-full.svg +1 -0
  72. package/BookReader/images/BRicons.png +0 -0
  73. package/BookReader/images/BRicons.svg +5 -0
  74. package/BookReader/images/BRicons_ia.png +0 -0
  75. package/BookReader/images/back_pages.png +0 -0
  76. package/BookReader/images/book_bottom_icon.png +0 -0
  77. package/BookReader/images/book_down_icon.png +0 -0
  78. package/BookReader/images/book_left_icon.png +0 -0
  79. package/BookReader/images/book_leftmost_icon.png +0 -0
  80. package/BookReader/images/book_right_icon.png +0 -0
  81. package/BookReader/images/book_rightmost_icon.png +0 -0
  82. package/BookReader/images/book_top_icon.png +0 -0
  83. package/BookReader/images/book_up_icon.png +0 -0
  84. package/BookReader/images/books_graphic.svg +1 -0
  85. package/BookReader/images/booksplit.png +0 -0
  86. package/BookReader/images/control_pause_icon.png +0 -0
  87. package/BookReader/images/control_play_icon.png +0 -0
  88. package/BookReader/images/embed_icon.png +0 -0
  89. package/BookReader/images/hypothesis.ico +0 -0
  90. package/BookReader/images/icon-home-ia.png +0 -0
  91. package/BookReader/images/icon_OL-logo-xs.png +0 -0
  92. package/BookReader/images/icon_alert-xs.png +0 -0
  93. package/BookReader/images/icon_book.svg +1 -0
  94. package/BookReader/images/icon_bookmark.svg +1 -0
  95. package/BookReader/images/icon_close-pop.png +0 -0
  96. package/BookReader/images/icon_download.png +0 -0
  97. package/BookReader/images/icon_gear.svg +1 -0
  98. package/BookReader/images/icon_hamburger.svg +1 -0
  99. package/BookReader/images/icon_home.png +0 -0
  100. package/BookReader/images/icon_home.svg +1 -0
  101. package/BookReader/images/icon_home_ia.png +0 -0
  102. package/BookReader/images/icon_indicator.png +0 -0
  103. package/BookReader/images/icon_info.svg +1 -0
  104. package/BookReader/images/icon_one_page.svg +1 -0
  105. package/BookReader/images/icon_pause.svg +1 -0
  106. package/BookReader/images/icon_play.svg +1 -0
  107. package/BookReader/images/icon_playback-rate.svg +1 -0
  108. package/BookReader/images/icon_return.png +0 -0
  109. package/BookReader/images/icon_search_button.svg +1 -0
  110. package/BookReader/images/icon_share.svg +1 -0
  111. package/BookReader/images/icon_skip-ahead.svg +1 -0
  112. package/BookReader/images/icon_skip-back.svg +2 -0
  113. package/BookReader/images/icon_speaker.svg +1 -0
  114. package/BookReader/images/icon_speaker_open.svg +1 -0
  115. package/BookReader/images/icon_thumbnails.svg +1 -0
  116. package/BookReader/images/icon_toc.svg +1 -0
  117. package/BookReader/images/icon_two_pages.svg +1 -0
  118. package/BookReader/images/icon_zoomer.png +0 -0
  119. package/BookReader/images/loading.gif +0 -0
  120. package/BookReader/images/logo_icon.png +0 -0
  121. package/BookReader/images/marker_chap-off.png +0 -0
  122. package/BookReader/images/marker_chap-off.svg +1 -0
  123. package/BookReader/images/marker_chap-off_ia.png +0 -0
  124. package/BookReader/images/marker_chap-on.png +0 -0
  125. package/BookReader/images/marker_chap-on.svg +1 -0
  126. package/BookReader/images/marker_srch-on.svg +1 -0
  127. package/BookReader/images/marker_srchchap-off.png +0 -0
  128. package/BookReader/images/marker_srchchap-on.png +0 -0
  129. package/BookReader/images/nav_control-dn.png +0 -0
  130. package/BookReader/images/nav_control-dn_ia.png +0 -0
  131. package/BookReader/images/nav_control-up.png +0 -0
  132. package/BookReader/images/nav_control-up_ia.png +0 -0
  133. package/BookReader/images/nav_control.png +0 -0
  134. package/BookReader/images/one_page_mode_icon.png +0 -0
  135. package/BookReader/images/paper-badge.png +0 -0
  136. package/BookReader/images/print_icon.png +0 -0
  137. package/BookReader/images/progressbar.gif +0 -0
  138. package/BookReader/images/right_edges.png +0 -0
  139. package/BookReader/images/slider.png +0 -0
  140. package/BookReader/images/slider_ia.png +0 -0
  141. package/BookReader/images/thumbnail_mode_icon.png +0 -0
  142. package/BookReader/images/transparent.png +0 -0
  143. package/BookReader/images/two_page_mode_icon.png +0 -0
  144. package/BookReader/images/unviewable_page.png +0 -0
  145. package/BookReader/images/zoom_in_icon.png +0 -0
  146. package/BookReader/images/zoom_out_icon.png +0 -0
  147. package/BookReader/jquery-3.js +2 -0
  148. package/BookReader/jquery-3.js.LICENSE.txt +24 -0
  149. package/BookReader/plugins/plugin.archive_analytics.js +2 -0
  150. package/BookReader/plugins/plugin.archive_analytics.js.map +1 -0
  151. package/BookReader/plugins/plugin.autoplay.js +2 -0
  152. package/BookReader/plugins/plugin.autoplay.js.map +1 -0
  153. package/BookReader/plugins/plugin.chapters.js +26 -0
  154. package/BookReader/plugins/plugin.chapters.js.LICENSE.txt +1 -0
  155. package/BookReader/plugins/plugin.chapters.js.map +1 -0
  156. package/BookReader/plugins/plugin.experiments.js +3 -0
  157. package/BookReader/plugins/plugin.experiments.js.LICENSE.txt +1 -0
  158. package/BookReader/plugins/plugin.experiments.js.map +1 -0
  159. package/BookReader/plugins/plugin.iframe.js +2 -0
  160. package/BookReader/plugins/plugin.iframe.js.map +1 -0
  161. package/BookReader/plugins/plugin.iiif.js +2 -0
  162. package/BookReader/plugins/plugin.iiif.js.map +1 -0
  163. package/BookReader/plugins/plugin.resume.js +2 -0
  164. package/BookReader/plugins/plugin.resume.js.map +1 -0
  165. package/BookReader/plugins/plugin.search.js +3 -0
  166. package/BookReader/plugins/plugin.search.js.LICENSE.txt +1 -0
  167. package/BookReader/plugins/plugin.search.js.map +1 -0
  168. package/BookReader/plugins/plugin.text_selection.js +3 -0
  169. package/BookReader/plugins/plugin.text_selection.js.LICENSE.txt +1 -0
  170. package/BookReader/plugins/plugin.text_selection.js.map +1 -0
  171. package/BookReader/plugins/plugin.tts.js +3 -0
  172. package/BookReader/plugins/plugin.tts.js.LICENSE.txt +29 -0
  173. package/BookReader/plugins/plugin.tts.js.map +1 -0
  174. package/BookReader/plugins/plugin.url.js +2 -0
  175. package/BookReader/plugins/plugin.url.js.map +1 -0
  176. package/BookReader/plugins/plugin.vendor-fullscreen.js +2 -0
  177. package/BookReader/plugins/plugin.vendor-fullscreen.js.map +1 -0
  178. package/BookReader/webcomponents-bundle.js +3 -0
  179. package/BookReader/webcomponents-bundle.js.LICENSE.txt +9 -0
  180. package/BookReader/webcomponents-bundle.js.map +1 -0
  181. package/package.json +6 -1
  182. package/src/BookReader/BookModel.js +564 -0
  183. package/src/BookReader/DragScrollable.js +233 -0
  184. package/src/BookReader/ImageCache.js +149 -0
  185. package/src/BookReader/Mode1Up.js +110 -0
  186. package/src/BookReader/Mode1UpLit.js +388 -0
  187. package/src/BookReader/Mode2Up.js +107 -0
  188. package/src/BookReader/Mode2UpLit.js +777 -0
  189. package/src/BookReader/ModeCoordinateSpace.js +29 -0
  190. package/src/BookReader/ModeSmoothZoom.js +312 -0
  191. package/src/BookReader/ModeThumb.js +344 -0
  192. package/src/BookReader/Navbar/Navbar.js +355 -0
  193. package/src/BookReader/PageContainer.js +172 -0
  194. package/src/BookReader/ReduceSet.js +26 -0
  195. package/src/BookReader/Toolbar/Toolbar.js +362 -0
  196. package/src/BookReader/events.js +19 -0
  197. package/src/BookReader/options.js +387 -0
  198. package/src/BookReader/utils/HTMLDimensionsCacher.js +44 -0
  199. package/src/BookReader/utils/ScrollClassAdder.js +31 -0
  200. package/src/BookReader/utils/SelectionObserver.js +45 -0
  201. package/src/BookReader/utils/classes.js +36 -0
  202. package/src/BookReader/utils.js +313 -0
  203. package/.eslintrc.cjs +0 -51
  204. package/.gitattributes +0 -2
  205. package/.github/ISSUE_TEMPLATE/bug.md +0 -32
  206. package/.github/ISSUE_TEMPLATE/feature-request.md +0 -30
  207. package/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +0 -15
  208. package/.github/workflows/node.js.yml +0 -102
  209. package/.github/workflows/npm-publish.yml +0 -23
  210. package/.testcaferc.cjs +0 -10
  211. package/BookReaderDemo/BookReaderDemo.css +0 -40
  212. package/BookReaderDemo/BookReaderJSAdvanced.js +0 -112
  213. package/BookReaderDemo/BookReaderJSSimple.js +0 -56
  214. package/BookReaderDemo/IADemoBr.js +0 -149
  215. package/BookReaderDemo/assets/v5/Bookreader-logo-cool-grad.svg +0 -1
  216. package/BookReaderDemo/assets/v5/Bookreader-logo-flat.svg +0 -1
  217. package/BookReaderDemo/assets/v5/Bookreader-logo-hex-cool-grad.png +0 -0
  218. package/BookReaderDemo/assets/v5/Bookreader-logo-hex-flat.png +0 -0
  219. package/BookReaderDemo/assets/v5/Bookreader-logo-lines.png +0 -0
  220. package/BookReaderDemo/assets/v5/Bookreader-logo-lines.svg +0 -1
  221. package/BookReaderDemo/assets/v5/Bookreader-logo-warm.svg +0 -1
  222. package/BookReaderDemo/assets/v5/bookreader-logo-renders@1x.png +0 -0
  223. package/BookReaderDemo/assets/v5/bookreader-logo-renders@2x.png +0 -0
  224. package/BookReaderDemo/assets/v5/bookreader-v5-screenshot.png +0 -0
  225. package/BookReaderDemo/demo-advanced.html +0 -33
  226. package/BookReaderDemo/demo-embed-iframe-src.html +0 -85
  227. package/BookReaderDemo/demo-embed.html +0 -26
  228. package/BookReaderDemo/demo-fullscreen-mobile.html +0 -34
  229. package/BookReaderDemo/demo-fullscreen.html +0 -31
  230. package/BookReaderDemo/demo-iiif.html +0 -121
  231. package/BookReaderDemo/demo-internetarchive.html +0 -271
  232. package/BookReaderDemo/demo-multiple.html +0 -44
  233. package/BookReaderDemo/demo-preview-pages.html +0 -1093
  234. package/BookReaderDemo/demo-simple.html +0 -35
  235. package/BookReaderDemo/demo-vendor-fullscreen.html +0 -34
  236. package/BookReaderDemo/ia-multiple-volumes-manifest.js +0 -169
  237. package/BookReaderDemo/immersion-1up.html +0 -64
  238. package/BookReaderDemo/immersion-mode.html +0 -33
  239. package/BookReaderDemo/toggle_controls.html +0 -54
  240. package/BookReaderDemo/view_mode.html +0 -40
  241. package/BookReaderDemo/viewmode-cycle.html +0 -40
  242. package/CHANGELOG.md +0 -1087
  243. package/CONTRIBUTING.md +0 -7
  244. package/babel.config.cjs +0 -20
  245. package/codecov.yml +0 -23
  246. package/index.html +0 -34
  247. package/netlify.toml +0 -9
  248. package/renovate.json +0 -52
  249. package/screenshot.png +0 -0
  250. package/scripts/postversion.js +0 -11
  251. package/scripts/preversion.js +0 -15
  252. package/scripts/version.js +0 -24
  253. package/tests/e2e/README.md +0 -112
  254. package/tests/e2e/autoplay.test.js +0 -16
  255. package/tests/e2e/base.test.js +0 -27
  256. package/tests/e2e/helpers/base.js +0 -263
  257. package/tests/e2e/helpers/debug.js +0 -13
  258. package/tests/e2e/helpers/mockSearch.js +0 -90
  259. package/tests/e2e/helpers/params.js +0 -17
  260. package/tests/e2e/helpers/rightToLeft.js +0 -23
  261. package/tests/e2e/helpers/search.js +0 -73
  262. package/tests/e2e/models/BookReader.js +0 -11
  263. package/tests/e2e/models/Navigation.js +0 -39
  264. package/tests/e2e/rightToLeft.test.js +0 -19
  265. package/tests/e2e/viewmode.test.js +0 -44
  266. package/tests/jest/BookNavigator/book-navigator.test.js +0 -653
  267. package/tests/jest/BookNavigator/bookmarks/bookmark-button.test.js +0 -43
  268. package/tests/jest/BookNavigator/bookmarks/bookmark-edit.test.js +0 -132
  269. package/tests/jest/BookNavigator/bookmarks/bookmarks-list.test.js +0 -221
  270. package/tests/jest/BookNavigator/bookmarks/ia-bookmarks.test.js +0 -45
  271. package/tests/jest/BookNavigator/downloads/downloads-provider.test.js +0 -67
  272. package/tests/jest/BookNavigator/downloads/downloads.test.js +0 -53
  273. package/tests/jest/BookNavigator/search/search-provider.test.js +0 -179
  274. package/tests/jest/BookNavigator/search/search-results.test.js +0 -289
  275. package/tests/jest/BookNavigator/sharing/sharing-provider.test.js +0 -49
  276. package/tests/jest/BookNavigator/viewable-files/viewable-files-provider.test.js +0 -80
  277. package/tests/jest/BookNavigator/visual-adjustments.test.js +0 -200
  278. package/tests/jest/BookReader.keyboard.test.js +0 -190
  279. package/tests/jest/BookReader.options.test.js +0 -47
  280. package/tests/jest/BookReader.test.js +0 -316
  281. package/tests/jest/plugins/plugin.archive_analytics.test.js +0 -20
  282. package/tests/jest/plugins/plugin.autoplay.test.js +0 -35
  283. package/tests/jest/plugins/plugin.chapters.test.js +0 -193
  284. package/tests/jest/plugins/plugin.iframe.test.js +0 -42
  285. package/tests/jest/plugins/plugin.resume.test.js +0 -85
  286. package/tests/jest/plugins/plugin.text_selection.test.js +0 -447
  287. package/tests/jest/plugins/plugin.vendor-fullscreen.test.js +0 -65
  288. package/tests/jest/plugins/search/plugin.search.test.js +0 -120
  289. package/tests/jest/plugins/search/plugin.search.view.test.js +0 -131
  290. package/tests/jest/plugins/search/utils.js +0 -25
  291. package/tests/jest/plugins/search/utils.test.js +0 -29
  292. package/tests/jest/plugins/tts/AbstractTTSEngine.test.js +0 -173
  293. package/tests/jest/plugins/tts/FestivalTTSEngine.test.js +0 -59
  294. package/tests/jest/plugins/tts/PageChunk.test.js +0 -57
  295. package/tests/jest/plugins/tts/PageChunkIterator.test.js +0 -179
  296. package/tests/jest/plugins/tts/WebTTSEngine.test.js +0 -178
  297. package/tests/jest/plugins/tts/utils.test.js +0 -74
  298. package/tests/jest/plugins/url/UrlPlugin.test.js +0 -198
  299. package/tests/jest/plugins/url/plugin.url.test.js +0 -168
  300. package/tests/jest/setup.js +0 -3
  301. package/tests/jest/util/browserSniffing.test.js +0 -62
  302. package/tests/jest/util/docCookies.test.js +0 -24
  303. package/tests/jest/util/strings.test.js +0 -63
  304. package/tests/jest/utils.js +0 -83
  305. package/webpack.config.js +0 -97
@@ -0,0 +1,798 @@
1
+ var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n;n||(n=1,function(){function e(e){var t=!0,n=!1,r=null,o={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function i(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function a(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!o[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}function s(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function l(e){e.hasAttribute("data-focus-visible-added")&&(e.classList.remove("focus-visible"),e.removeAttribute("data-focus-visible-added"))}function c(n){
2
+ n.metaKey||n.altKey||n.ctrlKey||(i(e.activeElement)&&s(e.activeElement),t=!0)}function u(e){t=!1}function d(e){i(e.target)&&(t||a(e.target))&&s(e.target)}function h(e){i(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(r),r=window.setTimeout((function(){n=!1}),100),l(e.target))}function m(e){"hidden"===document.visibilityState&&(n&&(t=!0),p())}function p(){document.addEventListener("mousemove",g),document.addEventListener("mousedown",g),document.addEventListener("mouseup",g),document.addEventListener("pointermove",g),document.addEventListener("pointerdown",g),document.addEventListener("pointerup",g),document.addEventListener("touchmove",g),document.addEventListener("touchstart",g),document.addEventListener("touchend",g)}function f(){document.removeEventListener("mousemove",g),document.removeEventListener("mousedown",g),document.removeEventListener("mouseup",g),document.removeEventListener("pointermove",g),
3
+ document.removeEventListener("pointerdown",g),document.removeEventListener("pointerup",g),document.removeEventListener("touchmove",g),document.removeEventListener("touchstart",g),document.removeEventListener("touchend",g)}function g(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,f())}document.addEventListener("keydown",c,!0),document.addEventListener("mousedown",u,!0),document.addEventListener("pointerdown",u,!0),document.addEventListener("touchstart",u,!0),document.addEventListener("visibilitychange",m,!0),p(),e.addEventListener("focus",d,!0),e.addEventListener("blur",h,!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")
4
+ }catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!=typeof document&&e(document)}());var r,o,i,a,s,l,c,u,d,h,m,p,f={},g=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,b=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function _(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function w(e,t,n,r,a){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==a?++i:a,__i:-1,__u:0};return null==a&&null!=o.vnode&&o.vnode(s),s}function x(e){return e.children}function k(e,t){this.props=e,this.context=t}function N(e,t){if(null==t)return e.__?N(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?N(e):null}function S(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break
5
+ }return S(e)}}function A(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!E.__r++||s!=o.debounceRendering)&&((s=o.debounceRendering)||l)(E)}function E(){for(var e,t,n,r,i,s,l,u=1;a.length;)a.length>u&&a.sort(c),e=a.shift(),u=a.length,e.__d&&(n=void 0,i=(r=(t=e).__v).__e,s=[],l=[],t.__P&&((n=y({},r)).__v=r.__v+1,o.vnode&&o.vnode(n),R(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[i]:null,s,null==i?N(r):i,!!(32&r.__u),l),n.__v=r.__v,n.__.__k[n.__i]=n,P(s,n,l),n.__e!=i&&S(n)));E.__r=0}function T(e,t,n,r,o,i,a,s,l,c,u){var d,h,m,p,v,y,_=r&&r.__k||g,k=t.length;for(l=function(e,t,n,r,o){var i,a,s,l,c,u=n.length,d=u,h=0;for(e.__k=new Array(o),i=0;i<o;i++)null!=(a=t[i])&&"boolean"!=typeof a&&"function"!=typeof a?(l=i+h,(a=e.__k[i]="string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?w(null,a,null,null,null):b(a)?w(x,{children:a},null,null,null):null==a.constructor&&a.__b>0?w(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,s=null,-1!=(c=a.__i=I(a,n,l,d))&&(d--,(s=n[c])&&(s.__u|=2)),
6
+ null==s||null==s.__v?(-1==c&&(o>u?h--:o<u&&h++),"function"!=typeof a.type&&(a.__u|=4)):c!=l&&(c==l-1?h--:c==l+1?h++:(c>l?h--:h++,a.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<u;i++)null!=(s=n[i])&&0==(2&s.__u)&&(s.__e==r&&(r=N(s)),H(s,s));return r}(n,t,_,l,k),d=0;d<k;d++)null!=(m=n.__k[d])&&(h=-1==m.__i?f:_[m.__i]||f,m.__i=d,y=R(e,m,h,o,i,a,s,l,c,u),p=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&F(h.ref,null,m),u.push(m.ref,m.__c||p,m)),null==v&&null!=p&&(v=p),4&m.__u||h.__k===m.__k?l=C(m,l,e):"function"==typeof m.type&&void 0!==y?l=y:p&&(l=p.nextSibling),m.__u&=-7);return n.__e=v,l}function C(e,t,n){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=C(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=N(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function M(e,t){return t=t||[],null==e||"boolean"==typeof e||(b(e)?e.some((function(e){M(e,t)})):t.push(e)),t}function I(e,t,n,r){var o,i,a=e.key,s=e.type,l=t[n]
7
+ ;if(null===l&&null==e.key||l&&a==l.key&&s==l.type&&0==(2&l.__u))return n;if(r>(null!=l&&0==(2&l.__u)?1:0))for(o=n-1,i=n+1;o>=0||i<t.length;){if(o>=0){if((l=t[o])&&0==(2&l.__u)&&a==l.key&&s==l.type)return o;o--}if(i<t.length){if((l=t[i])&&0==(2&l.__u)&&a==l.key&&s==l.type)return i;i++}}return-1}function z(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||v.test(t)?n:n+"px"}function L(e,t,n,r,o){var i;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||z(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||z(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(u,"$1")),t=t.toLowerCase()in e||"onFocusOut"==t||"onFocusIn"==t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=d,e.addEventListener(t,i?m:h,i)):e.removeEventListener(t,i?m:h,i);else{
8
+ if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function O(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=d++;else if(t.t<n.u)return;return n(o.event?o.event(t):t)}}}function R(e,t,n,i,a,s,l,c,u,d){var h,m,p,g,v,w,S,A,E,C,M,I,z,O,R,P,F,H=t.type;if(null!=t.constructor)return null;128&n.__u&&(u=!!(32&n.__u),s=[c=t.__e=n.__e]),(h=o.__b)&&h(t);e:if("function"==typeof H)try{if(A=t.props,E="prototype"in H&&H.prototype.render,C=(h=H.contextType)&&i[h.__c],M=h?C?C.props.value:h.__:i,n.__c?S=(m=t.__c=n.__c).__=m.__E:(E?t.__c=m=new H(A,M):(t.__c=m=new k(A,M),m.constructor=H,m.render=B),C&&C.sub(m),m.props=A,m.state||(m.state={}),m.context=M,m.__n=i,
9
+ p=m.__d=!0,m.__h=[],m._sb=[]),E&&null==m.__s&&(m.__s=m.state),E&&null!=H.getDerivedStateFromProps&&(m.__s==m.state&&(m.__s=y({},m.__s)),y(m.__s,H.getDerivedStateFromProps(A,m.__s))),g=m.props,v=m.state,m.__v=t,p)E&&null==H.getDerivedStateFromProps&&null!=m.componentWillMount&&m.componentWillMount(),E&&null!=m.componentDidMount&&m.__h.push(m.componentDidMount);else{if(E&&null==H.getDerivedStateFromProps&&A!==g&&null!=m.componentWillReceiveProps&&m.componentWillReceiveProps(A,M),!m.__e&&null!=m.shouldComponentUpdate&&!1===m.shouldComponentUpdate(A,m.__s,M)||t.__v==n.__v){for(t.__v!=n.__v&&(m.props=A,m.state=m.__s,m.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),I=0;I<m._sb.length;I++)m.__h.push(m._sb[I]);m._sb=[],m.__h.length&&l.push(m);break e}null!=m.componentWillUpdate&&m.componentWillUpdate(A,m.__s,M),E&&null!=m.componentDidUpdate&&m.__h.push((function(){m.componentDidUpdate(g,v,w)}))}if(m.context=M,m.props=A,m.__P=e,m.__e=!1,z=o.__r,O=0,E){for(m.state=m.__s,m.__d=!1,z&&z(t),
10
+ h=m.render(m.props,m.state,m.context),R=0;R<m._sb.length;R++)m.__h.push(m._sb[R]);m._sb=[]}else do{m.__d=!1,z&&z(t),h=m.render(m.props,m.state,m.context),m.state=m.__s}while(m.__d&&++O<25);m.state=m.__s,null!=m.getChildContext&&(i=y(y({},i),m.getChildContext())),E&&!p&&null!=m.getSnapshotBeforeUpdate&&(w=m.getSnapshotBeforeUpdate(g,v)),P=h,null!=h&&h.type===x&&null==h.key&&(P=D(h.props.children)),c=T(e,b(P)?P:[P],t,n,i,a,s,l,c,u,d),m.base=t.__e,t.__u&=-161,m.__h.length&&l.push(m),S&&(m.__E=m.__=null)}catch(e){if(t.__v=null,u||null!=s)if(e.then){for(t.__u|=u?160:128;c&&8==c.nodeType&&c.nextSibling;)c=c.nextSibling;s[s.indexOf(c)]=null,t.__e=c}else for(F=s.length;F--;)_(s[F]);else t.__e=n.__e,t.__k=n.__k;o.__e(e,t,n)}else null==s&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):c=t.__e=function(e,t,n,i,a,s,l,c,u){var d,h,m,p,g,v,y,w=n.props,x=t.props,k=t.type;if("svg"==k?a="http://www.w3.org/2000/svg":"math"==k?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),
11
+ null!=s)for(d=0;d<s.length;d++)if((g=s[d])&&"setAttribute"in g==!!k&&(k?g.localName==k:3==g.nodeType)){e=g,s[d]=null;break}if(null==e){if(null==k)return document.createTextNode(x);e=document.createElementNS(a,k,x.is&&x),c&&(o.__m&&o.__m(t,s),c=!1),s=null}if(null==k)w===x||c&&e.data==x||(e.data=x);else{if(s=s&&r.call(e.childNodes),w=n.props||f,!c&&null!=s)for(w={},d=0;d<e.attributes.length;d++)w[(g=e.attributes[d]).name]=g.value;for(d in w)if(g=w[d],"children"==d);else if("dangerouslySetInnerHTML"==d)m=g;else if(!(d in x)){if("value"==d&&"defaultValue"in x||"checked"==d&&"defaultChecked"in x)continue;L(e,d,null,g,a)}for(d in x)g=x[d],"children"==d?p=g:"dangerouslySetInnerHTML"==d?h=g:"value"==d?v=g:"checked"==d?y=g:c&&"function"!=typeof g||w[d]===g||L(e,d,g,w[d],a);if(h)c||m&&(h.__html==m.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(m&&(e.innerHTML=""),T("template"==t.type?e.content:e,b(p)?p:[p],t,n,i,"foreignObject"==k?"http://www.w3.org/1999/xhtml":a,s,l,s?s[0]:n.__k&&N(n,0),c,u),
12
+ null!=s)for(d=s.length;d--;)_(s[d]);c||(d="value","progress"==k&&null==v?e.removeAttribute("value"):null!=v&&(v!==e[d]||"progress"==k&&!v||"option"==k&&v!=w[d])&&L(e,d,v,w[d],a),d="checked",null!=y&&y!=e[d]&&L(e,d,y,w[d],a))}return e}(n.__e,t,n,i,a,s,l,u,d);return(h=o.diffed)&&h(t),128&t.__u?void 0:c}function P(e,t,n){for(var r=0;r<n.length;r++)F(n[r],n[++r],n[++r]);o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function D(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:b(e)?e.map(D):y({},e)}function F(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){o.__e(e,n)}}function H(e,t,n){var r,i;if(o.unmount&&o.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||F(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&H(r[i],t,n||"function"!=typeof e.type)
13
+ ;n||_(e.__e),e.__c=e.__=e.__e=void 0}function B(e,t,n){return this.constructor(e,n)}function $(e,t,n){var i,a,s;t==document&&(t=document.documentElement),o.__&&o.__(e,t),i=!1?null:t.__k,a=[],s=[],R(t,e=t.__k=function(e,t,n){var o,i,a,s={};for(a in t)"key"==a?o=t[a]:"ref"==a?i=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)null==s[a]&&(s[a]=e.defaultProps[a]);return w(e,s,o,i,null)}(x,null,[e]),i||f,f,t.namespaceURI,i?null:t.firstChild?r.call(t.childNodes):null,a,i?i.__e:t.firstChild,false,s),P(a,e,s)}function j(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach((function(e){e.__e=!0,A(e)}))},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),
14
+ t&&t.call(e)}}),e.children}return t.__c="__cC"+p++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}function q(e){return"value"in e}function U(e){return"class"in e&&"function"==typeof e.class}function G(e){return"factory"in e&&"function"==typeof e.factory}r=g.slice,o={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},i=0,k.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},n),this.props)),e&&y(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),A(this))},k.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),A(this))},k.prototype.render=x,a=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,
15
+ c=function(e,t){return e.__v.__b-t.__v.__b},E.__r=0,u=/(PointerCapture)$|Capture$/i,d=0,h=O(!1),m=O(!0),p=0;class V{constructor(){this._providers=new Map,this._instances=new Map,this._constructing=new Set}get(e){if(this._instances.has(e))return this._instances.get(e);const t=this._providers.get(e);if(!t)throw new Error(`"${e}" is not registered`);if(q(t))return this._instances.set(e,t.value),t.value;if(this._constructing.has(e))throw new Error(`Encountered a circular dependency when constructing "${e}"`);this._constructing.add(e);try{const n=[],r=U(t)&&t.class.$inject||G(t)&&t.factory.$inject||[];for(const t of r)try{n.push(this.get(t))}catch(n){const r=new Error(`Failed to construct dependency "${t}" of "${e}": ${n.message}`);throw r.cause=n,r}let o;if(U(t))o=new t.class(...n);else{o=(0,t.factory)(...n)}return this._instances.set(e,o),o}finally{this._constructing.delete(e)}}register(e,t){if("function"==typeof t)t={class:t};else if(!function(e){return"object"==typeof e&&null!==e&&(q(e)||U(e)||G(e))
16
+ }(t))throw new Error(`Invalid provider for "${e}"`);return this._providers.set(e,t),this}run(e){const t="Injector.run";this.register(t,{factory:e});try{return this.get(t)}finally{this._instances.delete(t),this._providers.delete(t)}}}var W,K,Y,X,Z=0,J=[],Q=o,ee=Q.__b,te=Q.__r,ne=Q.diffed,re=Q.__c,oe=Q.unmount,ie=Q.__;function ae(e,t){Q.__h&&Q.__h(K,e,Z||t),Z=0;var n=K.__H||(K.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function se(e){return Z=1,le(xe,e)}function le(e,t,n){var r=ae(W++,2);if(r.t=e,!r.__c&&(r.__=[xe(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=K,!K.__f)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return!!e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=r.__c.props!==e;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),i&&i.call(this,e,t,n)||a};K.__f=!0
17
+ ;var i=K.shouldComponentUpdate,a=K.componentWillUpdate;K.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}a&&a.call(this,e,t,n)},K.shouldComponentUpdate=o}return r.__N||r.__}function ce(e,t){var n=ae(W++,3);!Q.__s&&we(n.__H,t)&&(n.__=e,n.u=t,K.__H.__h.push(n))}function ue(e,t){var n=ae(W++,4);!Q.__s&&we(n.__H,t)&&(n.__=e,n.u=t,K.__h.push(n))}function de(e){return Z=5,he((function(){return{current:e}}),[])}function he(e,t){var n=ae(W++,7);return we(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function me(e,t){return Z=8,he((function(){return e}),t)}function pe(e){var t=K.context[e.__c],n=ae(W++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(K)),t.props.value):e.__}function fe(){var e=ae(W++,11);if(!e.__){for(var t=K.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ge(){for(var e;e=J.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ye),e.__H.__h.forEach(_e),e.__H.__h=[]}catch(t){e.__H.__h=[],Q.__e(t,e.__v)}}
18
+ Q.__b=function(e){K=null,ee&&ee(e)},Q.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ie&&ie(e,t)},Q.__r=function(e){te&&te(e),W=0;var t=(K=e.__c).__H;t&&(Y===K?(t.__h=[],K.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0}))):(t.__h.forEach(ye),t.__h.forEach(_e),t.__h=[],W=0)),Y=K},Q.diffed=function(e){ne&&ne(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==J.push(t)&&X===Q.requestAnimationFrame||((X=Q.requestAnimationFrame)||be)(ge)),t.__H.__.forEach((function(e){e.u&&(e.__H=e.u),e.u=void 0}))),Y=K=null},Q.__c=function(e,t){t.some((function(e){try{e.__h.forEach(ye),e.__h=e.__h.filter((function(e){return!e.__||_e(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Q.__e(n,e.__v)}})),re&&re(e,t)},Q.unmount=function(e){oe&&oe(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{ye(e)}catch(e){t=e}})),n.__H=void 0,t&&Q.__e(t,n.__v))};var ve="function"==typeof requestAnimationFrame;function be(e){var t,n=function(){clearTimeout(r),ve&&cancelAnimationFrame(t),
19
+ setTimeout(e)},r=setTimeout(n,100);ve&&(t=requestAnimationFrame(n))}function ye(e){var t=K,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),K=t}function _e(e){var t=K;e.__c=e.__(),K=t}function we(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function xe(e,t){return"function"==typeof t?t(e):t}function ke(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ne{constructor(){ke(this,"_listeners",void 0),this._listeners=new Map}add(e,t,n,r){e.addEventListener(t,n,r);const o=Symbol();return this._listeners.set(o,{eventTarget:e,eventType:t,listener:n,options:r}),o}remove(e){const t=this._listeners.get(e);if(t){
20
+ const{eventTarget:n,eventType:r,listener:o,options:i}=t;n.removeEventListener(r,o,i),this._listeners.delete(e)}}removeAll(){this._listeners.forEach((({eventTarget:e,eventType:t,listener:n,options:r})=>{e.removeEventListener(t,n,r)})),this._listeners.clear()}}function Se(e){e.focus()}function Ae(e,{autofocus:t=!1,loop:n=!0,horizontal:r=!0,vertical:o=!0,selector:i="a,button",containerVisible:a=!0,focusElement:s=Se}={}){const l=de(null),c=function(e){const t=de({callback:e,call:(...e)=>t.current.callback(...e)});return t.current.callback=e,t.current.call}(s);ce((()=>{if(!a)return()=>{};if(!e.current)throw new Error("Container ref not set");const s=e.current,u=()=>{const e=Array.from(s.querySelectorAll(i)).filter((e=>null!==e.offsetParent&&!function(e){return"boolean"==typeof e.disabled&&e.disabled}(e)));return document.activeElement===s&&e.unshift(s),e},d=(e=u(),t=-1,n=!1,r)=>{t<0&&(t=e.findIndex((e=>0===e.tabIndex)))<0&&(t=0);for(const[o,i]of e.entries())i.tabIndex=o===t?0:-1,o===t&&n&&(l.current=i,c(i,r))
21
+ },h=u(),m=l.current?h.indexOf(l.current):0;d(h,m,t);const p=new Ne;p.add(s,"focusin",(e=>{if(e.target===s&&l.current)return void c(l.current);const n=u(),r=n.indexOf(e.target);r>=0&&d(n,r,t)})),p.add(s,"keydown",(e=>{const t=u();let i=t.findIndex((e=>0===e.tabIndex)),a=!1;r&&"ArrowLeft"===e.key||o&&"ArrowUp"===e.key?(0===i?i=n?t.length-1:i:--i,a=!0):r&&"ArrowRight"===e.key||o&&"ArrowDown"===e.key?(i===t.length-1?i=n?0:i:++i,a=!0):"Home"===e.key?(i=0,a=!0):"End"===e.key&&(i=t.length-1,a=!0),a&&(d(t,i,!0,e),e.preventDefault(),e.stopPropagation())}));const f=new MutationObserver((()=>{d()}));return f.observe(s,{subtree:!0,attributes:!0,attributeFilter:["disabled"],childList:!0}),()=>{p.removeAll(),f.disconnect()}}),[t,e,c,r,n,i,o,a])}function Ee(e,t,{enabled:n=!0}={}){ce((()=>{if(!n)return()=>{};const r=document.body,o=new Ne,i=n=>{e.current&&!n.composedPath().includes(e.current)&&t(n)};return o.add(r,"mousedown",i),o.add(r,"click",i),()=>{o.removeAll()}}),[e,n,t])}function Te(e,t,{enabled:n=!0}={}){ce((()=>{
22
+ if(!n||!e.current)return()=>{};const r=new Ne;return r.add(e.current,"focusout",(n=>{const r=n;e.current&&!e.current.contains(r.relatedTarget)&&t(r)})),()=>{r.removeAll()}}),[e,n,t])}function Ce(e,t,{enabled:n=!0}={}){ce((()=>{if(!n)return()=>{};const r=document.body,o=new Ne;return o.add(r,"keydown",(n=>{e.includes(n.key)&&t(n)})),()=>{o.removeAll()}}),[n,t,e])}function Me(e,t,n={}){Ee(e,t,n),Te(e,t,n),Ce(["Escape"],t,n)}function Ie(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class ze{constructor(e){Ie(this,"_target",void 0),Ie(this,"_value",void 0),this._target=e,this._value=null}get current(){return this._value}set current(e){
23
+ this._value=e,this._updateTarget()}get target(){return this._target}set target(e){e!==this._target&&(this._target=e,this._updateTarget())}_updateTarget(){const e=this._value;"function"==typeof this._target?this._target(e):this._target&&(this._target.current=e)}}function Le(e){const t=de(new ze(e));return t.current.target=e,t.current}const Oe=1e3,Re=60*Oe,Pe=60*Re;let De=new Map;function Fe(e,t){return t-e}function He(e,t,n=window.Intl){const r=JSON.stringify(t);let o=De.get(r);return o||(o=new n.DateTimeFormat(void 0,t),De.set(r,o)),o.format(e)}const Be=[{test:(e,t)=>Fe(e,t)<30*Oe,formatter:()=>"Just now",nextUpdate:1*Oe},{test:(e,t)=>Fe(e,t)<1*Re,formatter:(e,t)=>`${Math.floor(Fe(e,t)/Oe)} secs ago`,nextUpdate:1*Oe},{test:(e,t)=>Fe(e,t)<1*Pe,formatter:(e,t)=>{const n=Math.floor(Fe(e,t)/Re);return`${n} min${n>1?"s":""} ago`},nextUpdate:1*Re},{test:(e,t)=>Fe(e,t)<24*Pe,formatter:(e,t)=>{const n=Math.floor(Fe(e,t)/Pe);return`${n} hr${n>1?"s":""} ago`},nextUpdate:1*Pe},{
24
+ test:(e,t)=>e.getFullYear()===t.getFullYear(),formatter:(e,t,n)=>He(e,{month:"short",day:"numeric"},n),nextUpdate:null}],$e={test:()=>!0,formatter:(e,t,n)=>He(e,{day:"numeric",month:"short",year:"numeric"},n),nextUpdate:null};function je(e,t){for(const n of Be)if(n.test(e,t))return n;return $e}function qe(e){return!isNaN(e.valueOf())}function Ue(e,t){let n;const r=new Date(e),o=()=>{const e=function(e,t){if(!e||!qe(e)||!qe(t))return null;let n=je(e,t).nextUpdate;return null===n?null:(n=Math.max(n,5*Oe),n=Math.min(n,2073600*Oe),n)}(r,new Date);if(null===e)return;n=setTimeout((()=>{t(),o()}),e+500)};return o(),()=>clearTimeout(n)}function Ge(e,t,n){return e?je(e,t).formatter(e,t,n):""}function Ve(e,{includeWeekday:t=!1,includeTime:n=!0}={},r){return He("string"==typeof e?new Date(e):e,{year:"numeric",month:"short",day:"2-digit",weekday:t?"long":void 0,hour:n?"2-digit":void 0,minute:n?"2-digit":void 0},r)}var We,Ke={exports:{}};var Ye,Xe=(We||(We=1,Ye=Ke,function(){var e={}.hasOwnProperty;function t(){
25
+ for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=r(e,n(o)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var o="";for(var i in n)e.call(n,i)&&n[i]&&(o=r(o,i));return o}function r(e,t){return t?e?e+" "+t:e+t:e}Ye.exports?(t.default=t,Ye.exports=t):window.classNames=t}()),Ke.exports),Ze=t(Xe);const Je='a,button:not([role="tab"]),input,select,textarea,[role="grid"],[role="tablist"]';var Qe=0;function et(e,t,n,r,i,a){t||(t={});var s,l,c=t;if("ref"in c)for(l in c={},t)"ref"==l?s=t[l]:c[l]=t[l];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Qe,__i:-1,__u:0,__source:i,__self:a};if("function"==typeof e&&(s=e.defaultProps))for(l in s)void 0===c[l]&&(c[l]=s[l]);return o.vnode&&o.vnode(u),u}
26
+ var tt="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/Overlay.tsx";function nt({children:e,classes:t,elementRef:n,open:r=!0,variant:o="dark",...i}){return r?et("div",{"data-component":"Overlay",...i,ref:n,className:Ze("fixed top-0 left-0 w-full h-full z-10 flex items-center justify-center",{"bg-black/50":"dark"===o,"bg-white/50":"light"===o},t),children:e},void 0,0,{fileName:tt,lineNumber:35,columnNumber:5},this):null}const rt=j({}),ot=j({});var it="/home/runner/work/frontend-shared/frontend-shared/src/components/data/Scroll.tsx";function at({children:e,classes:t,elementRef:n,variant:r="raised",...o}){const i=Le(n),a=he((()=>({scrollRef:i})),[i]);return et(ot.Provider,{value:a,children:et("div",{"data-component":"Scroll",...o,ref:i,className:Ze("min-h-0","h-full w-full overflow-auto",{"scroll-shadows":"raised"===r},t),children:e},void 0,0,{fileName:it,lineNumber:39,columnNumber:7},this)},void 0,0,{fileName:it,lineNumber:38,columnNumber:5},this)}
27
+ var st="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/Card.tsx";function lt({children:e,classes:t,elementRef:n,active:r=!1,variant:o="raised",width:i="full",...a}){return et("div",{"data-component":"Card",...a,ref:n,className:Ze("rounded-lg border bg-white",{"shadow hover:shadow-md":"raised"===o,"shadow-md":r&&"raised"===o},{"w-full":"full"===i,"w-auto":"auto"===i},t),children:e},void 0,0,{fileName:st,lineNumber:40,columnNumber:5},this)}var ct="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/CardActions.tsx";function ut({children:e,classes:t,elementRef:n,...r}){return et("div",{"data-component":"CardActions",...r,className:Ze("flex items-center justify-end space-x-3",t),ref:n,children:e},void 0,0,{fileName:ct,lineNumber:21,columnNumber:5},this)}var dt="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/CardContent.tsx";function ht({children:e,classes:t,elementRef:n,size:r="md",...o}){return et("div",{"data-component":"CardContent",...o,
28
+ ref:n,className:Ze({"p-3 space-y-4":"md"===r,"p-2 space-y-3":"sm"===r,"p-4 space-y-6":"lg"===r},t),children:e},void 0,0,{fileName:dt,lineNumber:29,columnNumber:5},this)}var mt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Annotate.tsx";function pt(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"AnnotateIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:mt,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
29
+ d:"M14 0a2 2 0 0 1 2 2v13a1 1 0 0 1-1.555.832l-4.262-1.757A1 1 0 0 0 9.802 14H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm-2.109 3.5h-.484l-.14.006-.122.018a.7.7 0 0 0-.2.071l-.076.054-.108.1-.097.1-1.632 1.999-.091.12-.084.129a2.6 2.6 0 0 0-.291.722l-.03.142-.027.218-.009.223v2.646l.01.086.027.08a.54.54 0 0 0 .236.236l.067.028.07.017.074.005h2.907l.074-.005.094-.025a.5.5 0 0 0 .169-.108.5.5 0 0 0 .082-.096l.029-.051.027-.081.01-.086V7.336l-.006-.073-.018-.068a.44.44 0 0 0-.124-.178.6.6 0 0 0-.103-.074l-.055-.026-.087-.024-.092-.009h-.579l-.057-.006-.054-.017a.3.3 0 0 1-.096-.07.2.2 0 0 1-.045-.078l-.004-.04.01-.043.022-.043 1.311-2.227.047-.09.037-.106a.5.5 0 0 0-.06-.394.53.53 0 0 0-.255-.22l-.084-.028-.092-.016zm-5.924 0h-.424l-.121.006-.108.018a.6.6 0 0 0-.174.071l-.067.054-.095.1-.084.1-1.429 1.999-.08.12-.096.174a2.8 2.8 0 0 0-.232.677l-.025.142-.024.218L3 7.402v2.646l.008.086.024.08a.5.5 0 0 0 .097.148q.052.055.11.088l.058.028.062.017.065.005h2.543l.065-.005.082-.025a.515.515 0 0 0 .22-.204l.025-.051.024-.081.008-.086V7.336l-.005-.073-.023-.09a.487.487 0 0 0-.191-.23l-.048-.026-.076-.024-.08-.009H5.46l-.05-.006-.047-.017a.3.3 0 0 1-.084-.07.2.2 0 0 1-.04-.078l-.003-.04.008-.043.02-.043L6.411 4.36l.04-.09.033-.106a.55.55 0 0 0-.053-.394.5.5 0 0 0-.222-.22l-.074-.028-.08-.016z"
30
+ },void 0,0,{fileName:mt,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:mt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:mt,lineNumber:11,columnNumber:5},this)}var ft="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/ArrowLeft.tsx";function gt(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"ArrowLeftIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:ft,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M7.707 3.293a1 1 0 0 1 .083 1.32l-.083.094L5.415 7H13a1 1 0 0 1 .117 1.993L13 9H5.415l2.292 2.293a1 1 0 0 1 .083 1.32l-.083.094a1 1 0 0 1-1.32.083l-.094-.083-4-4a1 1 0 0 1-.083-1.32l.083-.094 4-4a1 1 0 0 1 1.414 0"},void 0,0,{fileName:ft,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:ft,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:ft,lineNumber:11,columnNumber:5},this)}
31
+ var vt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/ArrowRight.tsx";function bt(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"ArrowRightIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:vt,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"m9.613 3.21.094.083 4 4a1 1 0 0 1 .083 1.32l-.083.094-4 4a1 1 0 0 1-1.497-1.32l.083-.094L10.585 9H3a1 1 0 0 1-.117-1.993L3 7h7.585L8.293 4.707a1 1 0 0 1-.083-1.32l.083-.094a1 1 0 0 1 1.32-.083"},void 0,0,{fileName:vt,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:vt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:vt,lineNumber:11,columnNumber:5},this)}var yt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Cancel.tsx";function _t(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",
32
+ viewBox:"0 0 16 16","data-component":"CancelIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:yt,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"m12.322 5.085-.08.087-2.828 2.827 2.829 2.83a1 1 0 0 1-1.32 1.497l-.095-.083L8 9.414l-2.828 2.829c-.915.914-2.272-.388-1.494-1.328l.08-.087L6.584 8 3.757 5.172a1 1 0 0 1 1.32-1.498l.095.083L8 6.585l2.828-2.828c.886-.885 2.188.309 1.56 1.239z"},void 0,0,{fileName:yt,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:yt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:yt,lineNumber:11,columnNumber:5},this)}var wt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/CaretRight.tsx";function xt(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CaretRightIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"
33
+ },void 0,0,{fileName:wt,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M5.293 3.293a1 1 0 0 1 1.32-.083l.094.083 4 4a1 1 0 0 1 .083 1.32l-.083.094-4 4a1 1 0 0 1-1.497-1.32l.083-.094L8.585 8 5.293 4.707a1 1 0 0 1-.083-1.32z"},void 0,0,{fileName:wt,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:wt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:wt,lineNumber:11,columnNumber:5},this)}var kt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Caution.tsx";function Nt(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CautionIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:kt,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
34
+ d:"M8 0c.767 0 1.432.455 1.794 1.148l5.917 11.326c.386.738.36 1.573.071 2.23-.286.651-.926 1.296-1.864 1.296H2.082c-.938 0-1.578-.645-1.864-1.295a2.6 2.6 0 0 1 .07-2.23L6.207 1.147C6.568.455 7.233 0 8 0m0 2.038-.021.036L2.06 13.4a.6.6 0 0 0-.012.5.3.3 0 0 0 .062.1H13.89a.3.3 0 0 0 .061-.1.6.6 0 0 0-.012-.5L8.02 2.074zm5.874 11.972q0 0 .01-.006-.01.007-.01.006m-11.748 0q0 .002-.01-.006z"},void 0,0,{fileName:kt,lineNumber:22,columnNumber:9},this),et("path",{fill:"currentColor",d:"M8 5a1 1 0 0 1 1 1v3a1 1 0 0 1-2 0V6a1 1 0 0 1 1-1M9 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0"},void 0,0,{fileName:kt,lineNumber:26,columnNumber:9},this)]},void 0,0,{fileName:kt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:kt,lineNumber:11,columnNumber:5},this)}var St="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/CcStd.tsx";function At(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CcStdIcon",...e,children:et("g",{
35
+ "fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:St,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
36
+ d:"M13.7 2.343Q11.342 0 7.985 0 4.657 0 2.371 2.329A8 8 0 0 0 .607 4.95 7.9 7.9 0 0 0 0 8a7.85 7.85 0 0 0 2.35 5.636 8.05 8.05 0 0 0 2.6 1.757A7.8 7.8 0 0 0 7.986 16a8 8 0 0 0 3.071-.614q1.486-.615 2.657-1.772a7.35 7.35 0 0 0 1.707-2.536A8.2 8.2 0 0 0 16 8a8.15 8.15 0 0 0-.586-3.078A7.7 7.7 0 0 0 13.7 2.343M3.4 3.357q1.872-1.914 4.614-1.914 2.714 0 4.644 1.929a6.4 6.4 0 0 1 1.413 2.114q.486 1.185.486 2.515 0 2.757-1.871 4.586a6.9 6.9 0 0 1-2.178 1.443q-1.209.5-2.494.5a6.4 6.4 0 0 1-2.485-.493 6.6 6.6 0 0 1-2.13-1.43 6.6 6.6 0 0 1-1.45-2.128A6.3 6.3 0 0 1 1.444 8q0-1.299.507-2.493a6.9 6.9 0 0 1 1.45-2.15m4.514 3.315-1.072.557q-.171-.357-.42-.5a.95.95 0 0 0-.465-.143q-1.072 0-1.072 1.415 0 .642.271 1.028.272.386.8.386.7 0 .987-.686l.985.5a2.35 2.35 0 0 1-2.1 1.257q-1.07 0-1.729-.657-.657-.657-.657-1.828 0-1.143.665-1.814.664-.672 1.678-.672 1.486 0 2.13 1.157m3.557.557 1.057-.557q-.628-1.157-2.114-1.157-1.015 0-1.678.672Q8.07 6.857 8.07 8q0 1.17.65 1.828t1.736.657q.657 0 1.214-.335.557-.336.885-.922l-1-.5q-.285.686-.985.686-.53 0-.8-.386Q9.5 8.643 9.499 8q0-1.415 1.072-1.415.228 0 .479.143.25.143.421.5"
37
+ },void 0,0,{fileName:St,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:St,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:St,lineNumber:11,columnNumber:5},this)}var Et="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/CcZero.tsx";function Tt(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CcZeroIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Et,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
38
+ d:"M7.983 0c2.238 0 4.148.78 5.72 2.342a7.7 7.7 0 0 1 1.715 2.582c.39.962.582 1.99.582 3.076a8.1 8.1 0 0 1-.583 3.087 7.3 7.3 0 0 1-1.703 2.526 8.2 8.2 0 0 1-2.655 1.77Q9.572 16 7.983 16a7.9 7.9 0 0 1-3.042-.6 8.3 8.3 0 0 1-2.6-1.759A8.1 8.1 0 0 1 .6 11.042 7.8 7.8 0 0 1 0 8q0-1.585.6-3.042a8.1 8.1 0 0 1 1.77-2.633C3.893.772 5.764 0 7.983 0m.034 1.44Q5.272 1.44 3.4 3.355a7 7 0 0 0-1.457 2.157 6.387 6.387 0 0 0 0 4.969 6.83 6.83 0 0 0 3.585 3.558q1.186.486 2.488.487a6.4 6.4 0 0 0 2.482-.498 6.9 6.9 0 0 0 2.185-1.446C13.93 11.364 14.56 9.839 14.56 8a6.6 6.6 0 0 0-.487-2.515 6.4 6.4 0 0 0-1.418-2.118Q10.73 1.439 8.017 1.44M11.305 8c0-2.113-.664-4.605-3.305-4.605-2.495 0-3.226 2.223-3.3 4.25L4.695 8c0 2.113.665 4.605 3.306 4.605S11.305 10.113 11.305 8M9.316 6.622 7.35 10.017c-.274.412-.083.645.219.774l.135.044q.137.033.297.034c1.358 0 1.422-1.938 1.422-2.869l-.007-.409a7 7 0 0 0-.06-.72zM6.58 7.778c.015-.985.163-2.646 1.421-2.646.107 0 .205.016.297.039.19.164.283.39.1.705L6.64 9.11l-.027-.244A10 10 0 0 1 6.577 8z"
39
+ },void 0,0,{fileName:Et,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Et,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Et,lineNumber:11,columnNumber:5},this)}var Ct="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Check.tsx";function Mt(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CheckIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Ct,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M12.18 2.427a1 1 0 0 1 1.705 1.04l-.066.106-7 10a1 1 0 0 1-1.606.045l-.07-.104-3-5A1 1 0 0 1 3.792 7.39l.065.097 2.207 3.677z"},void 0,0,{fileName:Ct,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Ct,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Ct,lineNumber:11,columnNumber:5},this)}var It="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Checkbox.tsx"
40
+ ;function zt(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CheckboxIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:It,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M0 2.5A2.5 2.5 0 0 1 2.5 0h11A2.5 2.5 0 0 1 16 2.5v11a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 0 13.5zM2.5 1A1.5 1.5 0 0 0 1 2.5v11A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-11A1.5 1.5 0 0 0 13.5 1z","clip-rule":"evenodd"},void 0,0,{fileName:It,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:It,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:It,lineNumber:11,columnNumber:5},this)}var Lt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/CheckboxCheckedFilled.tsx";function Ot(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16",
41
+ "data-component":"CheckboxCheckedFilledIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Lt,lineNumber:23,columnNumber:9},this),et("path",{fill:"currentColor",d:"M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zm10.18 3.636a.75.75 0 0 0-1.044.184l-4.588 6.552-1.655-2.758-.05-.072a.75.75 0 0 0-1.236.844l2.25 3.75.053.078a.75.75 0 0 0 1.204-.034l5.25-7.5.05-.08a.75.75 0 0 0-.234-.964","clip-rule":"evenodd"},void 0,0,{fileName:Lt,lineNumber:24,columnNumber:9},this)]},void 0,0,{fileName:Lt,lineNumber:22,columnNumber:7},this)},void 0,0,{fileName:Lt,lineNumber:13,columnNumber:5},this)}var Rt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Collapse.tsx";function Pt(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CollapseIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",
42
+ d:"M0 0h16v16H0z"},void 0,0,{fileName:Rt,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M15.79 1.613a1 1 0 0 0-1.497-1.32L11 3.584V2l-.007-.117A1 1 0 0 0 9 2v4l.007.117A1 1 0 0 0 10 7h4l.117-.007A1 1 0 0 0 15 6l-.007-.117A1 1 0 0 0 14 5h-1.586l3.293-3.293zm-8.797 8.27A1 1 0 0 0 6 9H2l-.117.007A1 1 0 0 0 1 10l.007.117A1 1 0 0 0 2 11h1.584L.293 14.293l-.083.094a1 1 0 0 0 1.497 1.32L5 12.414V14l.007.117A1 1 0 0 0 7 14v-4z"},void 0,0,{fileName:Rt,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Rt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Rt,lineNumber:11,columnNumber:5},this)}var Dt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Copy.tsx";function Ft(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CopyIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Dt,lineNumber:21,columnNumber:9
43
+ },this),et("path",{fill:"currentColor",d:"M15 0a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H7a1 1 0 0 1-.993-.883L6 11V1a1 1 0 0 1 .883-.993L7 0zM4 4a1 1 0 0 1 .117 1.993L4 6H2v8h7a1 1 0 0 1 .993.883L10 15a1 1 0 0 1-.883.993L9 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm4-2h6v8H8z"},void 0,0,{fileName:Dt,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Dt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Dt,lineNumber:11,columnNumber:5},this)}var Ht="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Download.tsx";function Bt(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"DownloadIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Ht,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
44
+ d:"m8.707 11.707-.094.083-.102.07a1 1 0 0 1-1.218-.153l-4-4-.083-.094a1 1 0 0 1 .083-1.32l.094-.083a1 1 0 0 1 1.32.083L7 8.585V1l.007-.117A1 1 0 0 1 9 1v7.585l2.293-2.292.094-.083a1 1 0 0 1 1.32 1.497zm7.286-1.824A1 1 0 0 0 15 9l-.117.007A1 1 0 0 0 14 10v4H2v-4l-.007-.117A1 1 0 0 0 0 10v5l.007.117A1 1 0 0 0 1 16h14l.117-.007A1 1 0 0 0 16 15v-5z"},void 0,0,{fileName:Ht,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Ht,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Ht,lineNumber:11,columnNumber:5},this)}var $t="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Edit.tsx";function jt(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"EditIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:$t,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
45
+ d:"M14.613.21a1 1 0 0 0-1.32.083l-1 1-.083.094a1 1 0 0 0 .083 1.32l1 1 .094.083a1 1 0 0 0 1.32-.083l1-1 .083-.094a1 1 0 0 0-.083-1.32l-1-1zm-3 3a1 1 0 0 0-1.32.083l-9 9-.072.08a1 1 0 0 0-.115.18l-1 2-.044.1c-.316.827.559 1.655 1.385 1.241l2-1 .093-.053a1 1 0 0 0 .167-.134l9-9 .083-.094a1 1 0 0 0-.083-1.32l-1-1z"},void 0,0,{fileName:$t,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:$t,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:$t,lineNumber:11,columnNumber:5},this)}var qt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/EditorLatex.tsx";function Ut(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"EditorLatexIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:qt,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
46
+ d:"M13.392 16q.237 0 .423-.108.185-.109.185-.248v-1.778q0-.149-.185-.252a.85.85 0 0 0-.423-.104H6.85q-.207 0-.267-.083-.06-.082 0-.152l5.533-5.101q.238-.21.193-.378a.75.75 0 0 0-.193-.325L6.88 2.707q-.06-.07-.007-.143.05-.075.289-.074h6.17a.8.8 0 0 0 .416-.108q.178-.109.178-.248V.356q0-.139-.178-.248A.8.8 0 0 0 13.333 0H2.904q-.238 0-.423.108-.185.109-.185.248v1.943q0 .192.11.326l.171.204 5.31 4.815q.06.07.075.178a.22.22 0 0 1-.074.195l-5.622 5.154a8 8 0 0 0-.163.2.5.5 0 0 0-.104.33v1.943q0 .139.185.248a.8.8 0 0 0 .423.108z"},void 0,0,{fileName:qt,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:qt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:qt,lineNumber:11,columnNumber:5},this)}var Gt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/EditorQuote.tsx";function Vt(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"EditorQuoteIcon",...e,children:et("g",{"fill-rule":"evenodd",
47
+ children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Gt,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M3.538 13.745Q3.27 14 2.7 14h-.754q-.57 0-.827-.463-.258-.463.037-1.011l2.04-3.817q.111-.19-.027-.35a.41.41 0 0 0-.322-.16h-.9a.73.73 0 0 1-.525-.227.74.74 0 0 1-.23-.548v-4.65q0-.3.23-.538A.71.71 0 0 1 1.947 2H6.47q.293 0 .524.236.23.236.23.539V7.31a4.7 4.7 0 0 1-.23 1.474 4.1 4.1 0 0 1-.598 1.19l-2.408 3.251q-.184.265-.45.52m7.776 0q-.267.255-.818.255h-.754q-.57 0-.836-.463-.267-.463.045-1.011l2.023-3.817q.11-.19-.019-.35a.39.39 0 0 0-.312-.16h-.901a.73.73 0 0 1-.524-.227.74.74 0 0 1-.23-.548v-4.65q0-.3.22-.538A.7.7 0 0 1 9.743 2h4.504q.294 0 .524.236t.23.539V7.31a4.9 4.9 0 0 1-.22 1.474q-.222.7-.607 1.19l-2.409 3.251q-.183.265-.45.52"},void 0,0,{fileName:Gt,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Gt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Gt,lineNumber:11,columnNumber:5},this)}
48
+ var Wt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/EditorTextBold.tsx";function Kt(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"EditorTextBoldIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Wt,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
49
+ d:"M8.661 16q1.207 0 2.193-.351a5 5 0 0 0 1.69-.993q.706-.642 1.081-1.557t.375-2.03q0-.435-.114-.893a4 4 0 0 0-.325-.87 4 4 0 0 0-.495-.754 4.4 4.4 0 0 0-.604-.597q-.255-.19 0-.412.572-.503.953-1.311.382-.81.382-1.568 0-.96-.395-1.813a4.6 4.6 0 0 0-1.08-1.484q-.687-.63-1.627-.999A5.5 5.5 0 0 0 8.66 0h-6.14a.53.53 0 0 0-.362.14A.42.42 0 0 0 2 .456v15.086q0 .178.159.318.16.139.362.139zm-.127-9.852H5.826q-.255 0-.254-.223V3.437q0-.235.254-.235h2.708q.673 0 1.195.435.52.435.521 1.027 0 .591-.521 1.038a1.78 1.78 0 0 1-1.195.446m-2.708 6.65h2.708q.84 0 1.335-.525.495-.524.495-1.205 0-.658-.495-1.188-.496-.53-1.335-.53H5.826q-.255 0-.254.234v2.99q0 .224.254.224"},void 0,0,{fileName:Wt,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Wt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Wt,lineNumber:11,columnNumber:5},this)}var Yt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/EditorTextItalic.tsx";function Xt(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",
50
+ height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"EditorTextItalicIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Yt,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M10.61 16q.18 0 .329-.14a.63.63 0 0 0 .191-.317l.457-2.176a.35.35 0 0 0-.063-.313.34.34 0 0 0-.277-.133H8.845q-.213-.012-.17-.235l1.892-9.372q.053-.223.266-.223H13a.5.5 0 0 0 .335-.14.6.6 0 0 0 .196-.318L13.99.457a.5.5 0 0 0 .011-.1.34.34 0 0 0-.085-.223.34.34 0 0 0-.276-.134H5.805a.5.5 0 0 0-.335.14.62.62 0 0 0-.196.317l-.457 2.176a.35.35 0 0 0 .069.318q.111.14.281.14h2.18q.212 0 .17.223l-1.893 9.372q-.042.235-.255.235H2.967a.5.5 0 0 0-.324.133.6.6 0 0 0-.197.313l-.435 2.175a.5.5 0 0 0-.011.101q0 .123.074.223.107.134.266.134z"},void 0,0,{fileName:Yt,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Yt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Yt,lineNumber:11,columnNumber:5},this)}
51
+ var Zt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Email.tsx";function Jt(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"EmailIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Zt,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M16 12a2 2 0 0 1-1.85 1.995L14 14H2a2 2 0 0 1-1.995-1.85L0 12V4a2 2 0 0 1 1.85-1.995L2 2h12a2 2 0 0 1 1.995 1.85l.005.138zm-2-6.058L8.581 9.814a1 1 0 0 1-1.055.067l-.107-.067L2 5.943V12h12zM2.721 4h10.558L8 7.771z"},void 0,0,{fileName:Zt,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Zt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Zt,lineNumber:11,columnNumber:5},this)}var Qt="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Expand.tsx";function en(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",
52
+ "aria-hidden":"true",viewBox:"0 0 16 16","data-component":"ExpandIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Qt,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M15.993.883A1 1 0 0 0 15 0h-4l-.117.007A1 1 0 0 0 10 1l.007.117A1 1 0 0 0 11 2h1.584L9.293 5.293l-.083.094a1 1 0 0 0 1.497 1.32L14 3.414V5l.007.117A1 1 0 0 0 16 5V1zm-9.203 9.73a1 1 0 0 0-1.497-1.32L2 12.584V11l-.007-.117A1 1 0 0 0 0 11v4l.007.117A1 1 0 0 0 1 16h4l.117-.007A1 1 0 0 0 6 15l-.007-.117A1 1 0 0 0 5 14H3.414l3.293-3.293z"},void 0,0,{fileName:Qt,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Qt,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Qt,lineNumber:11,columnNumber:5},this)}var tn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/External.tsx";function nn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16",
53
+ "data-component":"ExternalIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:tn,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M13 2a1 1 0 0 1 .993.883L14 3v6a1 1 0 0 1-1.993.117L12 9V5.414l-8.293 8.293a1 1 0 0 1-1.497-1.32l.083-.094L10.584 4H7a1 1 0 0 1-.993-.883L6 3a1 1 0 0 1 .883-.993L7 2z"},void 0,0,{fileName:tn,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:tn,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:tn,lineNumber:11,columnNumber:5},this)}var rn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/FileGeneric.tsx";function on(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"FileGenericIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:rn,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
54
+ d:"M12.333 0a.5.5 0 0 1 .352.144l2.167 2.143a.5.5 0 0 1 .148.356V15.5a.5.5 0 0 1-.5.5h-13a.5.5 0 0 1-.5-.5V.5a.5.5 0 0 1 .5-.5zM11 1H2v14h12V4h-2.5a.5.5 0 0 1-.5-.5zM8 11.25a.75.75 0 0 0-.75-.75h-2.5a.75.75 0 0 0 0 1.5h2.5a.75.75 0 0 0 .75-.75m3.25-3.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5zm.75-2a.75.75 0 0 0-.75-.75h-6.5a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 .75-.75"},void 0,0,{fileName:rn,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:rn,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:rn,lineNumber:11,columnNumber:5},this)}var an="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Flag.tsx";function sn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"FlagIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:an,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
55
+ d:"M2.883.007A1 1 0 0 0 2 1v14l.007.117A1 1 0 0 0 4 15v-5h11l.114-.006.108-.017c.738-.16 1.06-1.109.485-1.684L12.415 5l3.292-3.293.076-.084C16.297.986 15.853 0 15 0H3zM4 2h8.584l-2.291 2.293-.083.094-.07.102a1 1 0 0 0 .153 1.218L12.585 8H4z"},void 0,0,{fileName:an,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:an,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:an,lineNumber:11,columnNumber:5},this)}var ln="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/FlagFilled.tsx";function cn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"FlagFilledIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:ln,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
56
+ d:"M2 1a1 1 0 0 1 .883-.993L3 0h12c.852 0 1.297.986.783 1.623l-.076.084L12.415 5l3.292 3.293c.575.575.253 1.523-.485 1.684l-.108.017L15 10H4v5a1 1 0 0 1-1.993.117L2 15z"},void 0,0,{fileName:ln,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:ln,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:ln,lineNumber:11,columnNumber:5},this)}var un="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Globe.tsx";function dn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"GlobeIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:un,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
57
+ d:"M16 8A8 8 0 1 0 0 8a8 8 0 0 0 16 0m-8.86 2.516a23 23 0 0 1 1.72.002c-.093.809-.232 1.543-.407 2.157l-.06.198-.073.222a5 5 0 0 1-.229.55L8 13.81l-.078-.138-.078-.16a6 6 0 0 1-.297-.836 13.7 13.7 0 0 1-.407-2.16m-4.06.604-.17.058a6.02 6.02 0 0 0 2.8 2.37 12.6 12.6 0 0 1-.467-2.03l-.054-.383-.054-.451a13 13 0 0 0-1.807.36zm7.731.016.055-.452.323.046c.741.115 1.39.268 1.902.447a6.02 6.02 0 0 1-2.8 2.37c.228-.693.402-1.508.52-2.411M2.146 6.673l-.001.012a6 6 0 0 0 .003 2.643c.781-.285 1.761-.504 2.86-.645l-.006-.38v-.606l.006-.378c-1.099-.141-2.079-.36-2.862-.646m11.578.046.129-.046Q13.999 7.314 14 8q-.002.687-.146 1.328c-.783-.285-1.763-.504-2.862-.645l.006-.38L11 8q0-.305-.006-.603l-.002-.078c1.039-.134 1.972-.337 2.732-.6m-4.73.762-.259.01a26 26 0 0 1-1.73-.009L7 8q0 .262.006.52a24 24 0 0 1 1.988 0L9 8zM7.922 2.33l.077-.14.08.14.077.16c.102.227.203.508.297.835.175.614.314 1.349.407 2.16a23 23 0 0 1-1.72-.002c.093-.81.232-1.544.407-2.158a5.6 5.6 0 0 1 .375-.995m-2.212.123-.045.019a6.02 6.02 0 0 0-2.756 2.351c.584.206 1.348.376 2.225.494l.055-.453c.118-.903.292-1.718.52-2.411m4.63.157-.05-.158.265.118a6.03 6.03 0 0 1 2.537 2.254c-.585.205-1.35.375-2.227.494l-.054-.454-.058-.411a13 13 0 0 0-.412-1.843"
58
+ },void 0,0,{fileName:un,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:un,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:un,lineNumber:11,columnNumber:5},this)}var hn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/GlobeLock.tsx";function mn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"GlobeLockIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:hn,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
59
+ d:"M15.372 10.303c-.07-1.663-.816-2.364-2.497-2.364-1.726 0-2.5.774-2.5 2.5v.312c0 .173.14.313.313.313h.624c.173 0 .313-.14.313-.313v-.312l.003-.11c.057-.985.248-1.14 1.247-1.14 1.036 0 1.25.214 1.25 1.25v.312c0 .173.14.313.313.313h.624c.173 0 .313-.14.313-.313v-.312zm.624 1.938a.625.625 0 0 0-.621-.552h-5l-.073.004a.625.625 0 0 0-.552.62v3.75l.004.074c.036.31.3.552.621.552h5l.073-.004c.31-.036.552-.3.552-.621v-3.75z"},void 0,0,{fileName:hn,lineNumber:22,columnNumber:9},this),et("path",{fill:"currentColor",
60
+ d:"M8.342 16.682a8 8 0 1 1 7.582-9.105 3 3 0 0 0-.166-.17c-.807-.762-1.871-.968-2.883-.968-1.053 0-2.148.233-2.958 1.042-.81.81-1.042 1.905-1.042 2.958v.369a2 2 0 0 0-.308.388 21 21 0 0 0-1.427.009c.093.81.232 1.545.407 2.159.094.327.195.608.297.835l.078.16.078.139c.053-.106.198.61.25.476v1.133l.01.16.004.043q.023.192.078.372M2.91 11.867l.17-.059.248-.075a13 13 0 0 1 1.807-.36l.054.451.054.382a12.6 12.6 0 0 0 .467 2.03 6.02 6.02 0 0 1-2.8-2.37m-.765-4.493.001-.012c.783.285 1.763.504 2.862.645l-.006.379v.606l.006.38c-1.099.14-2.079.36-2.86.645a6 6 0 0 1-.003-2.643m6.59.806.26-.01.005.519-.006.52a26 26 0 0 0-1.988 0A24 24 0 0 1 7 8.69l.006-.518a26 26 0 0 0 1.73.009M8 2.879l-.077.14a5.6 5.6 0 0 0-.375.995 14 14 0 0 0-.408 2.158q.425.019.861.018.436 0 .86-.016a13.7 13.7 0 0 0-.407-2.16 6 6 0 0 0-.297-.835l-.078-.16zm-2.334.281.045-.019c-.23.694-.403 1.51-.521 2.412l-.055.453c-.877-.118-1.641-.288-2.225-.494A6.02 6.02 0 0 1 5.665 3.16m4.625-.019.05.158c.17.548.308 1.168.413 1.843l.058.411.054.453c.877-.118 1.642-.288 2.226-.493a6.03 6.03 0 0 0-2.536-2.254z"
61
+ },void 0,0,{fileName:hn,lineNumber:26,columnNumber:9},this)]},void 0,0,{fileName:hn,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:hn,lineNumber:11,columnNumber:5},this)}var pn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Groups.tsx";function fn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"GroupsIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:pn,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
62
+ d:"M2 14a3 3 0 0 1 3-3h6a3 3 0 0 1 3 3v1a1 1 0 1 1-2 0v-1a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v1a1 1 0 1 1-2 0zM0 8a2.5 2.5 0 0 1 2.5-2.5H3a1 1 0 0 1 0 2h-.5A.5.5 0 0 0 2 8v1.5a1 1 0 1 1-2 0zM16 8a2.5 2.5 0 0 0-2.5-2.5H13a1 1 0 1 0 0 2h.5a.5.5 0 0 1 .5.5v1.5a1 1 0 1 0 2 0zM8 8.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3m0 2a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7M12.5 4.25a2 2 0 1 0 0-4 2 2 0 0 0 0 4M3.5 4.25a2 2 0 1 0 0-4 2 2 0 0 0 0 4"},void 0,0,{fileName:pn,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:pn,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:pn,lineNumber:11,columnNumber:5},this)}var gn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Help.tsx";function vn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"HelpIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:gn,lineNumber:21,columnNumber:9},this),et("path",{
63
+ fill:"currentColor",d:"M13 4.5C13 1.983 10.734 0 8 0S3 1.983 3 4.5a1 1 0 0 0 2 0C5 3.151 6.316 2 8 2s3 1.151 3 2.5S9.684 7 8 7a1 1 0 0 0-1 1v1.5l.007.117A1 1 0 0 0 9 9.5v-.59c2.265-.415 4-2.208 4-4.41M10 14a2 2 0 1 0-4 0 2 2 0 0 0 4 0"},void 0,0,{fileName:gn,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:gn,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:gn,lineNumber:11,columnNumber:5},this)}var bn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Hide.tsx";function yn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"HideIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:bn,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
64
+ d:"m1.613.21.094.083 14 14a1 1 0 0 1-1.32 1.497l-.094-.083-14-14A1 1 0 0 1 1.613.21m.583 4.845a1 1 0 0 1 .292 1.384C2.165 6.935 2 7.46 2 8c0 2.123 2.628 4 6 4q.33 0 .657-.024a1 1 0 0 1 .147 1.994Q8.405 14 8 14c-4.36 0-8-2.6-8-6 0-.937.283-1.84.812-2.653a1 1 0 0 1 1.384-.292M16 8c0-3.4-3.64-6-8-6q-.405 0-.804.03a1 1 0 1 0 .147 1.994Q7.668 4 8 4c3.372 0 6 1.877 6 4 0 .539-.165 1.065-.488 1.561a1 1 0 1 0 1.676 1.092C15.718 9.84 16 8.937 16 8"},void 0,0,{fileName:bn,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:bn,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:bn,lineNumber:11,columnNumber:5},this)}var _n="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Highlight.tsx";function wn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"HighlightIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:_n,lineNumber:21,
65
+ columnNumber:9},this),et("path",{fill:"currentColor",d:"M13 1a1 1 0 0 0-1-1h-2l-.117.007a1 1 0 0 0-.75 1.493A1 1 0 0 0 9 2v6l.009.134a1 1 0 0 0 .125.365.996.996 0 0 0 .374 1.37A1 1 0 0 0 9.5 10v2l.006.114c.087.814 1.098 1.196 1.701.593l1-1 .087-.099A1 1 0 0 0 12.5 11l.001-1.134a1 1 0 0 0 .365-1.366A1 1 0 0 0 13 8V2l-.009-.134a1 1 0 0 0-.125-.365A1 1 0 0 0 13 1m0 14a1 1 0 0 0-1-1H1l-.117.007A1 1 0 0 0 1 16h11l.117-.007A1 1 0 0 0 13 15"},void 0,0,{fileName:_n,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:_n,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:_n,lineNumber:11,columnNumber:5},this)}var xn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Image.tsx";function kn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"ImageIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:xn,lineNumber:21,columnNumber:9
66
+ },this),et("path",{fill:"currentColor",d:"M15.995 1.85A2 2 0 0 0 14 0H2l-.15.005A2 2 0 0 0 0 2v12l.005.15A2 2 0 0 0 2 16h12l.15-.005A2 2 0 0 0 16 14V2zM2 2h12v12H2zm7.541 3.122.055.069 3.333 5.143a.432.432 0 0 1-.266.658l-.08.008H9.23a.93.93 0 0 0-.076-.98l-1.79-2.456 1.54-2.373a.41.41 0 0 1 .637-.069m-3.29 1.764-.062-.068a.41.41 0 0 0-.605.068l-2.5 3.428-.04.067c-.135.275.056.619.373.619h5l.076-.007a.432.432 0 0 0 .257-.679z"},void 0,0,{fileName:xn,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:xn,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:xn,lineNumber:11,columnNumber:5},this)}var Nn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Info.tsx";function Sn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"InfoIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Nn,lineNumber:21,columnNumber:9},this),et("path",{
67
+ fill:"currentColor",d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16M8 5.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M8 7a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0V8a1 1 0 0 0-1-1"},void 0,0,{fileName:Nn,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Nn,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Nn,lineNumber:11,columnNumber:5},this)}var An="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Leave.tsx";function En(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"LeaveIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:An,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
68
+ d:"M8 0c4.052 0 8 3.948 8 8s-3.948 8-8 8-8-3.948-8-8 3.948-8 8-8m0 2C5.052 2 2 5.052 2 8s3.052 6 6 6 6-3.052 6-6-3.052-6-6-6m2.707 4.707.08-.087c.778-.94-.58-2.241-1.494-1.327L8 6.585 6.707 5.293l-.094-.083a1 1 0 0 0-1.32 1.497L6.585 8 5.293 9.293l-.08.087c-.778.94.58 2.241 1.494 1.327L8 9.415l1.293 1.292.094.083a1 1 0 0 0 1.32-1.497L9.415 8z"},void 0,0,{fileName:An,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:An,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:An,lineNumber:11,columnNumber:5},this)}var Tn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Link.tsx";function Cn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"LinkIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Tn,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
69
+ d:"M15.004 6.108c1.412-1.466 1.29-3.735-.152-5.073-1.45-1.346-3.88-1.415-5.406 0l-.09.095L8.3 2.404l-.074.101a1 1 0 0 0 .205 1.307l.102.074a1 1 0 0 0 1.306-.205l1.005-1.211.091-.076c.748-.573 1.896-.507 2.558.107.66.613.694 1.645 0 2.29l-.08.082-3.077 3.592c-.805.723-1.856.713-2.655-.028a1 1 0 0 0-1.36 1.466c1.576 1.463 3.83 1.463 5.406 0l.06-.06 3.118-3.638zM9.733 7.51a1 1 0 0 0-.053-1.413c-1.576-1.463-3.83-1.463-5.406 0l-.08.082-3.099 3.615-.099.098c-1.412 1.466-1.29 3.735.152 5.073 1.45 1.346 3.88 1.415 5.406 0l.09-.095L7.7 13.596l.074-.101a1 1 0 0 0-.205-1.307l-.102-.074a1 1 0 0 0-1.306.205l-1.006 1.21-.09.077c-.748.573-1.896.507-2.558-.107a1.544 1.544 0 0 1 0-2.29l.08-.082 3.077-3.592c.805-.723 1.856-.713 2.655.028a1 1 0 0 0 1.413-.053"},void 0,0,{fileName:Tn,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Tn,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Tn,lineNumber:11,columnNumber:5},this)}
70
+ var Mn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/ListOrdered.tsx";function In(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"ListOrderedIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Mn,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
71
+ d:"m3.237 0 .052.008q.066.015.12.061a.25.25 0 0 1 .083.132l.006.052-.004 3.167.744.001.051.007a.3.3 0 0 1 .119.058q.067.054.086.132l.006.053-.001.595-.01.05a.278.278 0 0 1-.197.176l-.07.008H1.29l-.051-.008a.3.3 0 0 1-.12-.061.25.25 0 0 1-.084-.132l-.006-.052.001-.596.01-.05a.25.25 0 0 1 .077-.113.3.3 0 0 1 .12-.06l.069-.008.932.002.003-1.959-.796.629-.068.037a.3.3 0 0 1-.196-.002.25.25 0 0 1-.172-.179L1 1.881v-.587l.007-.089.015-.075a.35.35 0 0 1 .073-.132l.06-.059.83-.758.04-.036A1 1 0 0 1 2.139.07a.5.5 0 0 1 .183-.062L2.428 0zm-.46 5.5q.351 0 .66.101.311.102.544.288t.372.437q.14.256.14.551 0 .284-.145.542-.105.185-.258.34l-.108.1L2.71 8.932l1.52.001.053.006q.066.015.12.056.071.054.091.132l.007.054-.002.59-.01.05a.25.25 0 0 1-.083.113.3.3 0 0 1-.121.059L4.216 10H1.27l-.053-.007a.3.3 0 0 1-.122-.059.25.25 0 0 1-.089-.132L1 9.748v-.711l.004-.05a.3.3 0 0 1 .04-.115l.034-.043.035-.033L3.04 7.167l.036-.036a1 1 0 0 0 .08-.114.3.3 0 0 0 .055-.145.27.27 0 0 0-.099-.21q-.1-.093-.303-.094-.244 0-.369.093a.24.24 0 0 0-.103.147l-.006.064-.002.123-.01.052a.25.25 0 0 1-.084.112.3.3 0 0 1-.12.058l-.069.008h-.726l-.053-.007a.3.3 0 0 1-.121-.059.25.25 0 0 1-.09-.132l-.006-.054V6.87l.01-.137q.026-.216.135-.407.14-.25.379-.437.236-.185.544-.287.309-.1.658-.101m.617 6.103a2 2 0 0 0-.646-.103q-.34 0-.645.103a1.7 1.7 0 0 0-.533.286 1.5 1.5 0 0 0-.366.43q-.105.19-.132.402l-.008.135v.097l.006.052q.02.076.087.131a.3.3 0 0 0 .12.059l.052.006.712.001.067-.007a.3.3 0 0 0 .119-.059.25.25 0 0 0 .081-.111l.01-.051.002-.11.006-.065a.24.24 0 0 1 .098-.148q.12-.09.324-.09.212 0 .329.09c.07.053.103.12.103.213a.26.26 0 0 1-.104.222.45.45 0 0 1-.224.086l-.112.006h-.077l-.069.008a.3.3 0 0 0-.12.06.25.25 0 0 0-.079.111l-.01.05-.001.57.006.053q.02.077.087.132a.3.3 0 0 0 .12.058l.051.007h.1l.114.007a.54.54 0 0 1 .262.095c.08.06.12.14.12.253a.29.29 0 0 1-.12.252.6.6 0 0 1-.376.102q-.247-.001-.378-.101a.28.28 0 0 1-.112-.186l-.005-.077v-.047l-.006-.054a.24.24 0 0 0-.09-.133.3.3 0 0 0-.118-.056l-.051-.006-.708-.001-.07.007a.3.3 0 0 0-.12.06.25.25 0 0 0-.079.112l-.01.05-.001.078.009.148q.027.22.132.418.14.259.382.45.24.187.555.294.316.108.67.108t.67-.107.555-.296q.243-.19.384-.449.143-.264.143-.566 0-.28-.14-.538l-.075-.122-.057-.075a1 1 0 0 0-.131-.134l-.047-.035.063-.061q.11-.122.189-.269.123-.228.124-.484 0-.29-.134-.543a1.4 1.4 0 0 0-.364-.432 1.8 1.8 0 0 0-.534-.286M16 14a1 1 0 0 0-1-1H7l-.117.007A1 1 0 0 0 7 15h8l.117-.007A1 1 0 0 0 16 14m0-6a1 1 0 0 0-1-1H7l-.117.007A1 1 0 0 0 7 9h8l.117-.007A1 1 0 0 0 16 8m0-6a1 1 0 0 0-1-1H7l-.117.007A1 1 0 0 0 7 3h8l.117-.007A1 1 0 0 0 16 2"
72
+ },void 0,0,{fileName:Mn,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Mn,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Mn,lineNumber:11,columnNumber:5},this)}var zn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/ListUnordered.tsx";function Ln(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"ListUnorderedIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:zn,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M2 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4m0 6a2 2 0 1 1 0 4 2 2 0 0 1 0-4m2 8a2 2 0 1 0-4 0 2 2 0 0 0 4 0m12 0a1 1 0 0 0-1-1H7l-.117.007A1 1 0 0 0 7 15h8l.117-.007A1 1 0 0 0 16 14m0-6a1 1 0 0 0-1-1H7l-.117.007A1 1 0 0 0 7 9h8l.117-.007A1 1 0 0 0 16 8m0-6a1 1 0 0 0-1-1H7l-.117.007A1 1 0 0 0 7 3h8l.117-.007A1 1 0 0 0 16 2"},void 0,0,{fileName:zn,lineNumber:22,columnNumber:9},this)]},void 0,0,{
73
+ fileName:zn,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:zn,lineNumber:11,columnNumber:5},this)}var On="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/LockFilled.tsx";function Rn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"LockFilledIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:On,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M11.995 4.783C11.882 2.123 10.69 1 8 1 5.239 1 4 2.239 4 5v.5a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5V5l.005-.176C6.096 3.249 6.402 3 8 3c1.657 0 2 .343 2 2v.5a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5V5zm.998 3.1A1 1 0 0 0 12 7H4l-.117.007A1 1 0 0 0 3 8v6l.007.117A1 1 0 0 0 4 15h8l.117-.007A1 1 0 0 0 13 14V8z"},void 0,0,{fileName:On,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:On,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:On,lineNumber:11,
74
+ columnNumber:5},this)}var Pn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Logo.tsx";function Dn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"LogoIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Pn,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M13.83 0C14.476 0 15 .53 15 1.185V12.69c0 .654-.524 1.185-1.17 1.185H9.75L8 16l-1.75-2.125H2.17c-.646 0-1.17-.53-1.17-1.185V1.186C1 .53 1.524 0 2.17 0z"},void 0,0,{fileName:Pn,lineNumber:22,columnNumber:9},this),et("path",{fill:"#fff",d:"M4.785 2.133h-1.71v9.6h1.71V8.735c0-1.522.473-1.754.905-1.793l.228-.009.17.003c.51.02.979.15.979 1.199v3.598h1.71V7.598c0-1.865-1.152-2.463-2.29-2.463l-.39.003c-.753.017-.822.154-1.312 1.197zM11.889 9.6c-.573 0-1.037.477-1.037 1.067 0 .589.464 1.066 1.037 1.066s1.037-.477 1.037-1.066S12.462 9.6 11.889 9.6"},void 0,0,{
75
+ fileName:Pn,lineNumber:26,columnNumber:9},this)]},void 0,0,{fileName:Pn,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Pn,lineNumber:11,columnNumber:5},this)}var Fn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Mention.tsx";function Hn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"MentionIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Fn,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
76
+ d:"M8.195 16q-1.95 0-3.47-.53-1.522-.523-2.574-1.54-1.05-1.01-1.601-2.47T0 8.137q0-1.838.55-3.335.555-1.497 1.62-2.568Q3.232 1.156 4.767.578 6.307 0 8.275 0q1.821 0 3.251.53 1.436.529 2.433 1.509a6.4 6.4 0 0 1 1.521 2.319q.526 1.338.52 2.963a9.5 9.5 0 0 1-.196 2.057 5.1 5.1 0 0 1-.635 1.638q-.428.694-1.125 1.101-.697.402-1.687.457-.708.055-1.149-.104-.44-.158-.672-.469a1.7 1.7 0 0 1-.293-.736h-.074q-.146.366-.574.663a3.4 3.4 0 0 1-1.045.457 4.2 4.2 0 0 1-1.302.116 3.9 3.9 0 0 1-1.369-.335 3.5 3.5 0 0 1-1.143-.846q-.495-.554-.782-1.37-.28-.815-.287-1.886.006-1.058.3-1.844.299-.786.788-1.32.494-.537 1.1-.84a3.9 3.9 0 0 1 1.216-.39q.69-.105 1.308 0 .617.103 1.039.335.427.23.531.499h.086v-.682h1.913v5.94q.006.42.19.651a.6.6 0 0 0 .494.231q.423 0 .703-.37.287-.372.428-1.139.147-.766.147-1.954 0-1.144-.306-2.008-.3-.87-.843-1.479a4.4 4.4 0 0 0-1.253-.998 5.8 5.8 0 0 0-1.552-.56 8.2 8.2 0 0 0-1.712-.176q-1.521 0-2.658.462-1.137.458-1.895 1.284a5.4 5.4 0 0 0-1.136 1.942 7.7 7.7 0 0 0-.38 2.416q.008 1.442.404 2.556.403 1.108 1.186 1.862.782.755 1.93 1.145 1.15.39 2.641.389.703 0 1.375-.104.672-.097 1.216-.243.544-.14.874-.274l.605 1.765q-.385.219-1.045.408-.654.195-1.479.31Q9.063 16 8.195 16m-.28-5.502q.745 0 1.185-.286.446-.285.636-.846.195-.566.183-1.393-.006-.731-.19-1.236a1.4 1.4 0 0 0-.617-.773q-.434-.267-1.21-.268-.678 0-1.155.287a1.87 1.87 0 0 0-.721.803q-.245.51-.25 1.205.005.645.207 1.223.202.573.666.931.465.354 1.265.353"
77
+ },void 0,0,{fileName:Fn,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Fn,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Fn,lineNumber:11,columnNumber:5},this)}var Bn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/MenuCollapse.tsx";function $n(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","data-component":"MenuCollapseIcon",...e,children:et("path",{fill:"currentColor",d:"m8.54 4.205 6.23 5.87a.69.69 0 0 1 0 1.03l-.72.68a.8.8 0 0 1-1.09 0L8 7.135l-4.96 4.65a.8.8 0 0 1-1.09 0l-.73-.69a.69.69 0 0 1 0-1.02l6.24-5.87a.8.8 0 0 1 1.08 0"},void 0,0,{fileName:Bn,lineNumber:18,columnNumber:7},this)},void 0,0,{fileName:Bn,lineNumber:11,columnNumber:5},this)}var jn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/MenuExpand.tsx";function qn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16","data-component":"MenuExpandIcon",...e,children:et("path",{fill:"currentColor",
78
+ d:"M7.456 11.788 1.226 5.92a.695.695 0 0 1 0-1.025l.726-.684a.804.804 0 0 1 1.087-.001L8 8.861l4.961-4.65a.804.804 0 0 1 1.087.001l.727.684c.3.283.3.742 0 1.025l-6.23 5.867a.804.804 0 0 1-1.09 0z"},void 0,0,{fileName:jn,lineNumber:19,columnNumber:7},this)},void 0,0,{fileName:jn,lineNumber:11,columnNumber:5},this)}var Un="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Minus.tsx";function Gn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"MinusIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Un,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M14 8a1 1 0 0 0-1-1H3l-.117.007A1 1 0 0 0 3 9h10l.117-.007A1 1 0 0 0 14 8"},void 0,0,{fileName:Un,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Un,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Un,lineNumber:11,columnNumber:5},this)}
79
+ var Vn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Plus.tsx";function Wn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"PlusIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Vn,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M8.993 2.867 9 3v3.999L13 7a1 1 0 0 1 .117 1.993L13 9H9v4c0 1.287-1.864 1.332-1.993.133L7 13V9H3a1 1 0 0 1-.117-1.993L3 7h4V3c0-1.287 1.864-1.332 1.993-.133"},void 0,0,{fileName:Vn,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Vn,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Vn,lineNumber:11,columnNumber:5},this)}var Kn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/PointerDown.tsx";function Yn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"9","data-component":"PointerDownIcon",...e,children:et("path",{
80
+ stroke:"currentColor",d:"m15.5 0-7 8-8-8"},void 0,0,{fileName:Kn,lineNumber:18,columnNumber:7},this)},void 0,0,{fileName:Kn,lineNumber:11,columnNumber:5},this)}var Xn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/PointerUp.tsx";function Zn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"9","data-component":"PointerUpIcon",...e,children:et("path",{stroke:"currentColor",d:"m.5 9 7-8 8 8"},void 0,0,{fileName:Xn,lineNumber:18,columnNumber:7},this)},void 0,0,{fileName:Xn,lineNumber:11,columnNumber:5},this)}var Jn="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Profile.tsx";function Qn(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"ProfileIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:Jn,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
81
+ d:"M8 0a4 4 0 1 1 0 8 4 4 0 0 1 0-8m0 9c4.36 0 8 2.6 8 6a1 1 0 0 1-1.993.117L14 15c0-2.123-2.628-4-6-4s-6 1.877-6 4a1 1 0 1 1-2 0c0-3.4 3.64-6 8-6M6 4a2 2 0 1 1 4 0 2 2 0 0 1-4 0"},void 0,0,{fileName:Jn,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Jn,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Jn,lineNumber:11,columnNumber:5},this)}var er="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Radio.tsx";function tr(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"RadioIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:er,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8","clip-rule":"evenodd"},void 0,0,{fileName:er,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:er,lineNumber:20,columnNumber:7},this)},void 0,0,{
82
+ fileName:er,lineNumber:11,columnNumber:5},this)}var nr="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/RadioChecked.tsx";function rr(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"RadioCheckedIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:nr,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8","clip-rule":"evenodd"},void 0,0,{fileName:nr,lineNumber:22,columnNumber:9},this),et("path",{fill:"currentColor",d:"M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0"},void 0,0,{fileName:nr,lineNumber:27,columnNumber:9},this)]},void 0,0,{fileName:nr,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:nr,lineNumber:11,columnNumber:5},this)}var or="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Reply.tsx";function ir(e){return et("svg",{
83
+ xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"ReplyIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:or,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M7.707.293a1 1 0 0 1 .083 1.32l-.083.094L5.415 4H8a6 6 0 0 1 0 12 1 1 0 1 1 0-2 4 4 0 0 0 0-8H5.415l2.292 2.293a1 1 0 0 1 .083 1.32l-.083.094a1 1 0 0 1-1.32.083l-.094-.083-4-4a1 1 0 0 1-.083-1.32l.083-.094 4-4a1 1 0 0 1 1.414 0"},void 0,0,{fileName:or,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:or,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:or,lineNumber:11,columnNumber:5},this)}var ar="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Restricted.tsx";function sr(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"RestrictedIcon",...e,children:et("g",{
84
+ "fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:ar,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M8 0c1.682 0 3.346.68 4.717 1.766l.08.063.285.241.31.285.128.125.16.165.243.265.311.373C15.32 4.653 16 6.318 16 8c0 4.052-3.948 8-8 8-1.682 0-3.346-.68-4.717-1.766l-.056-.044a9 9 0 0 1-.322-.272l-.131-.118-.167-.156-.132-.13-.152-.156-.253-.276-.304-.365C.68 11.347 0 9.682 0 8c0-4.052 3.948-8 8-8m4.765 4.651L4.65 12.765C5.654 13.523 6.835 14 8 14c2.948 0 6-3.052 6-6 0-1.165-.477-2.346-1.235-3.349M2 8c0-2.948 3.052-6 6-6 1.165 0 2.347.477 3.35 1.236L3.236 11.35C2.476 10.347 2 9.165 2 8"},void 0,0,{fileName:ar,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:ar,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:ar,lineNumber:11,columnNumber:5},this)}var lr="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Search.tsx";function cr(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",
85
+ "aria-hidden":"true",viewBox:"0 0 16 16","data-component":"SearchIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:lr,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M12 6a6 6 0 1 0-2.525 4.892l4.818 4.815.094.083a1 1 0 0 0 1.32-1.497L10.89 9.474A5.97 5.97 0 0 0 12 6M2 6a4 4 0 1 1 6.961 2.69l-.15.155-.16.152A3.98 3.98 0 0 1 6 10a4 4 0 0 1-4-4"},void 0,0,{fileName:lr,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:lr,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:lr,lineNumber:11,columnNumber:5},this)}var ur="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Share.tsx";function dr(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"ShareIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:ur,lineNumber:21,columnNumber:9
86
+ },this),et("path",{fill:"currentColor",d:"M8.707.293 8.613.21 8.51.14a1 1 0 0 0-1.218.153l-4 4-.083.094a1 1 0 0 0 .083 1.32l.094.083a1 1 0 0 0 1.32-.083L7 3.415V11l.007.117A1 1 0 0 0 9 11V3.415l2.293 2.292.094.083a1 1 0 0 0 1.32-1.497zm7.286 9.59A1 1 0 0 0 15 9l-.117.007A1 1 0 0 0 14 10v4H2v-4l-.007-.117A1 1 0 0 0 0 10v5l.007.117A1 1 0 0 0 1 16h14l.117-.007A1 1 0 0 0 16 15v-5z"},void 0,0,{fileName:ur,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:ur,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:ur,lineNumber:11,columnNumber:5},this)}var hr="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/SocialFacebook.tsx";function mr(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"SocialFacebookIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:hr,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
87
+ d:"M15.999 8.049c0-4.445-3.582-8.049-8-8.049S0 3.604 0 8.049C0 12.066 2.925 15.396 6.75 16v-5.624H4.717V8.049H6.75V6.276c0-2.018 1.195-3.132 3.022-3.132.875 0 1.79.157 1.79.157v1.981h-1.008c-.994 0-1.304.62-1.304 1.257v1.51h2.219l-.355 2.327H9.25V16c3.825-.604 6.75-3.934 6.75-7.951z","clip-rule":"evenodd"},void 0,0,{fileName:hr,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:hr,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:hr,lineNumber:11,columnNumber:5},this)}var pr="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/SocialTwitter.tsx";function fr(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"SocialTwitterIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:pr,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",
88
+ d:"M15.969 3.049c-.59.259-1.22.436-1.884.516a3.3 3.3 0 0 0 1.442-1.815c-.634.37-1.336.64-2.084.79a3.28 3.28 0 0 0-5.59 2.988 9.3 9.3 0 0 1-6.76-3.418C.799 2.61.646 3.18.65 3.76c0 1.14.58 2.142 1.459 2.73a3.3 3.3 0 0 1-1.485-.41v.04a3.28 3.28 0 0 0 2.63 3.218 3.3 3.3 0 0 1-1.474.057 3.29 3.29 0 0 0 3.069 2.278A6.58 6.58 0 0 1 .78 13.076q-.39 0-.78-.044a9.33 9.33 0 0 0 5.038 1.472c6.036 0 9.332-4.997 9.332-9.323 0-.14 0-.28-.01-.42a6.6 6.6 0 0 0 1.64-1.7z","clip-rule":"evenodd"},void 0,0,{fileName:pr,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:pr,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:pr,lineNumber:11,columnNumber:5},this)}var gr="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Sort.tsx";function vr(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"SortIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{
89
+ fileName:gr,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M4.707.293 4.613.21a1 1 0 0 0-1.32.083l-3 3-.083.094a1 1 0 0 0 .083 1.32l.094.083a1 1 0 0 0 1.32-.083L3 3.415V8a1 1 0 1 0 2 0V3.415l1.293 1.292.094.083a1 1 0 0 0 1.32-1.497zM13 8a1 1 0 1 0-2 0v4.585l-1.293-1.292-.094-.083a1 1 0 0 0-1.32 1.497l3 3 .094.083a1 1 0 0 0 1.32-.083l3-3 .083-.094a1 1 0 0 0-.083-1.32l-.094-.083a1 1 0 0 0-1.32.083L13 12.585z"},void 0,0,{fileName:gr,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:gr,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:gr,lineNumber:11,columnNumber:5},this)}var br="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/SpinnerSpokes.tsx";function yr(e){return et("svg",{width:"16",height:"16",viewBox:"0 0 64 64","data-component":"SpinnerSpokesIcon",...e,children:et("g",{stroke:"currentColor","stroke-linecap":"round","stroke-width":"6",children:[et("path",{d:"M32 16V4",children:et("animate",{attributeName:"stroke-opacity",dur:"750ms",
90
+ repeatCount:"indefinite",values:"0;1;.8;.65;.45;.3;.15;0"},void 0,0,{fileName:br,lineNumber:20,columnNumber:11},this)},void 0,0,{fileName:br,lineNumber:19,columnNumber:9},this),et("path",{d:"m43.314 20.686 8.485-8.485",children:et("animate",{attributeName:"stroke-opacity",dur:"750ms",repeatCount:"indefinite",values:".15;0;1;.8;.65;.45;.3;.15"},void 0,0,{fileName:br,lineNumber:28,columnNumber:11},this)},void 0,0,{fileName:br,lineNumber:27,columnNumber:9},this),et("path",{d:"M48 32h12",children:et("animate",{attributeName:"stroke-opacity",dur:"750ms",repeatCount:"indefinite",values:".3;.15;0;1;.8;.65;.45;.3"},void 0,0,{fileName:br,lineNumber:36,columnNumber:11},this)},void 0,0,{fileName:br,lineNumber:35,columnNumber:9},this),et("path",{d:"m43.314 43.314 8.485 8.485",children:et("animate",{attributeName:"stroke-opacity",dur:"750ms",repeatCount:"indefinite",values:".45;.3;.15;0;1;.85;.65;.45"},void 0,0,{fileName:br,lineNumber:44,columnNumber:11},this)},void 0,0,{fileName:br,lineNumber:43,columnNumber:9
91
+ },this),et("path",{d:"M32 48v12",children:et("animate",{attributeName:"stroke-opacity",dur:"750ms",repeatCount:"indefinite",values:".65;.45;.3;.15;0;1;.8;.65;"},void 0,0,{fileName:br,lineNumber:52,columnNumber:11},this)},void 0,0,{fileName:br,lineNumber:51,columnNumber:9},this),et("path",{d:"m20.686 43.314-8.485 8.485",children:et("animate",{attributeName:"stroke-opacity",dur:"750ms",repeatCount:"indefinite",values:".8;.65;.45;.3;.15;0;1;.8"},void 0,0,{fileName:br,lineNumber:60,columnNumber:11},this)},void 0,0,{fileName:br,lineNumber:59,columnNumber:9},this),et("path",{d:"M16 32H4",children:et("animate",{attributeName:"stroke-opacity",dur:"750ms",repeatCount:"indefinite",values:"1;.85;.6;.45;.3;.15;0;1;"},void 0,0,{fileName:br,lineNumber:68,columnNumber:11},this)},void 0,0,{fileName:br,lineNumber:67,columnNumber:9},this),et("path",{d:"m20.686 20.686-8.485-8.485",children:et("animate",{attributeName:"stroke-opacity",dur:"750ms",repeatCount:"indefinite",values:"0;1;.8;.65;.45;.3;.15;0"},void 0,0,{fileName:br,
92
+ lineNumber:76,columnNumber:11},this)},void 0,0,{fileName:br,lineNumber:75,columnNumber:9},this)]},void 0,0,{fileName:br,lineNumber:18,columnNumber:7},this)},void 0,0,{fileName:br,lineNumber:11,columnNumber:5},this)}var _r="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Trash.tsx";function wr(e){return et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"TrashIcon",...e,children:et("g",{"fill-rule":"evenodd",children:[et("path",{fill:"none",d:"M0 0h16v16H0z"},void 0,0,{fileName:_r,lineNumber:21,columnNumber:9},this),et("path",{fill:"currentColor",d:"M16 1a1 1 0 0 0-1-1H1a1 1 0 1 0 0 2h14a1 1 0 0 0 1-1M14 4H2a1 1 0 0 0-.98 1.196l2 10A1 1 0 0 0 4 16h8a1 1 0 0 0 .98-.804l2-10A1 1 0 0 0 14 4m-1.22 2-1.6 8H4.819l-1.6-8z"},void 0,0,{fileName:_r,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:_r,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:_r,lineNumber:11,columnNumber:5},this)}
93
+ var xr="/home/runner/work/frontend-shared/frontend-shared/src/components/input/Button.tsx";function kr({children:e,classes:t,elementRef:n,expanded:r,pressed:o,title:i,icon:a,size:s="md",variant:l="secondary",unstyled:c=!1,role:u,...d}){const h=!c,m=h&&"custom"!==l,p=h&&"custom"!==s,f={"aria-label":i};return"tab"===u?f["aria-selected"]=o:(f["aria-pressed"]=o,f["aria-expanded"]=r),et("button",{role:null!=u?u:"button","data-component":"Button",type:"button",...f,...d,className:Ze({"focus-visible-ring transition-colors whitespace-nowrap flex items-center":h},m&&{"font-semibold rounded":!0,"text-grey-7 bg-grey-1 enabled:hover:text-grey-9 enabled:hover:bg-grey-2 aria-pressed:text-grey-9 aria-expanded:text-grey-9":"secondary"===l,"text-grey-1 bg-grey-7 enabled:hover:bg-grey-8 disabled:text-grey-4":"primary"===l},p&&{"p-2 gap-x-2":"md"===s,"p-1 gap-x-1":"xs"===s,"p-1.5 gap-x-1.5":"sm"===s,"p-2.5 gap-x-1.5":"lg"===s},t),ref:n,title:i,children:[a&&et(a,{className:"w-em h-em"},void 0,0,{fileName:xr,lineNumber:120,
94
+ columnNumber:16},this),e]},void 0,0,{fileName:xr,lineNumber:89,columnNumber:5},this)}var Nr="/home/runner/work/frontend-shared/frontend-shared/src/components/input/InputGroup.tsx";const Sr=Ze("input-group:border input-group:rounded-none","input-group:first:rounded-l input-group:last:rounded-r","input-group:ml-[-1px] input-group:first:ml-0","focus:z-1");function Ar({children:e,classes:t,elementRef:n,...r}){return et("div",{"data-component":"InputGroup",...r,ref:n,className:Ze("input-group","flex items-stretch w-full justify-center",t),children:e},void 0,0,{fileName:Nr,lineNumber:34,columnNumber:5},this)}var Er="/home/runner/work/frontend-shared/frontend-shared/src/components/input/IconButton.tsx";function Tr({children:e,classes:t,elementRef:n,pressed:r,expanded:o,icon:i,size:a="md",title:s,variant:l="secondary",unstyled:c=!1,...u}){const d=!c;return et(kr,{"data-component":"IconButton",...u,classes:Ze({"focus-visible-ring transition-colors rounded whitespace-nowrap":d,"flex items-center justify-center":d
95
+ },d&&Sr,d&&"custom"!==l&&{"text-grey-7 bg-transparent enabled:hover:text-grey-9 aria-pressed:text-brand aria-expanded:text-brand":"secondary"===l,"text-brand bg-transparent enabled:hover:text-grey-9 disabled:text-grey-7":"primary"===l,"text-grey-7 bg-grey-2 enabled:hover:text-grey-9 enabled:hover:bg-grey-3 disabled:text-grey-5 aria-pressed:bg-grey-3 aria-expanded:bg-grey-3":"dark"===l},d&&"custom"!==a&&{"gap-x-2 touch:min-w-touch-minimum touch:min-h-touch-minimum":!0,"p-2":"md"===a,"p-1":"xs"===a,"p-1.5":"sm"===a,"p-2.5":"lg"===a},t),elementRef:n,title:s,pressed:r,expanded:o,unstyled:!0,children:[i&&et(i,{className:"w-em h-em"},void 0,0,{fileName:Er,lineNumber:84,columnNumber:16},this),e]},void 0,0,{fileName:Er,lineNumber:49,columnNumber:5},this)}var Cr="/home/runner/work/frontend-shared/frontend-shared/src/components/input/CloseButton.tsx";function Mr({children:e,classes:t,elementRef:n,title:r,onClick:o,...i}){var a;const s=pe(rt);return et(Tr,{"data-component":"CloseButton",elementRef:n,icon:_t,
96
+ title:null!==(a=null!=r?r:null==s?void 0:s.title)&&void 0!==a?a:"Close",classes:t,...i,onClick:null!=o?o:null==s?void 0:s.onClose,children:e},void 0,0,{fileName:Cr,lineNumber:36,columnNumber:5},this)}var Ir="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/CardTitle.tsx";function zr({children:e,classes:t,elementRef:n,tagName:r="h1",variant:o="primary",...i}){const a=r;return et("div",{"data-component":"CardTitle",...i,className:Ze({"text-lg text-brand font-semibold":"primary"===o,"text-xl text-slate-7 font-normal":"secondary"===o},t),ref:n,children:et(a,{"data-testid":"card-title-heading",children:e},void 0,0,{fileName:Ir,lineNumber:45,columnNumber:7},this)},void 0,0,{fileName:Ir,lineNumber:33,columnNumber:5},this)}var Lr="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/CardHeader.tsx";function Or({children:e,classes:t,elementRef:n,fullWidth:r=!1,onClose:o,title:i,variant:a="primary",...s}){const l=pe(rt),c=null!=o?o:null==l?void 0:l.onClose;return et("div",{
97
+ "data-component":"CardHeader",...s,className:Ze("flex items-center gap-x-2 border-b py-2",{"bg-slate-0 border-slate-5 rounded-t-[inherit]":"secondary"===a,"mx-3":!r&&"primary"===a,"px-3":r||"secondary"===a},t),ref:n,children:[i&&et(zr,{variant:a,children:i},void 0,0,{fileName:Lr,lineNumber:69,columnNumber:17},this),e,et("div",{className:"grow"},void 0,0,{fileName:Lr,lineNumber:71,columnNumber:7},this),c&&et(Mr,{onClick:c,classes:Ze("-mr-2.5","text-[16px]")},void 0,0,{fileName:Lr,lineNumber:73,columnNumber:9},this)]},void 0,0,{fileName:Lr,lineNumber:54,columnNumber:5},this)}var Rr="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/Panel.tsx";function Pr({children:e,elementRef:t,buttons:n,fullWidthHeader:r=!1,icon:o,onClose:i,paddingSize:a="md",scrollable:s=!1,title:l,...c}){const u="flex flex-col min-h-0 h-full",d="none"===a?e:et(ht,{classes:u,"data-testid":"panel-content-wrapper",size:a,children:e},void 0,0,{fileName:Rr,lineNumber:81,columnNumber:7},this);return et(lt,{
98
+ "data-composite-component":"Panel",...c,classes:u,elementRef:t,children:[et(Or,{onClose:i,fullWidth:s||r,children:[o&&et(o,{className:"w-em h-em"},void 0,0,{fileName:Rr,lineNumber:97,columnNumber:18},this),et(zr,{children:l},void 0,0,{fileName:Rr,lineNumber:98,columnNumber:9},this)]},void 0,0,{fileName:Rr,lineNumber:96,columnNumber:7},this),s?et(at,{classes:Ze({"rounded-b-[inherit]":!n}),children:d},void 0,0,{fileName:Rr,lineNumber:101,columnNumber:9},this):et(x,{children:d},void 0),n&&et(ht,{"data-testid":"panel-buttons",children:et(ut,{children:n},void 0,0,{fileName:Rr,lineNumber:115,columnNumber:11},this)},void 0,0,{fileName:Rr,lineNumber:114,columnNumber:9},this)]},void 0,0,{fileName:Rr,lineNumber:90,columnNumber:5},this)}var Dr="/home/runner/work/frontend-shared/frontend-shared/src/components/feedback/Dialog.tsx"
99
+ ;function Fr({closeOnClickAway:e=!1,closeOnEscape:t=!1,closeOnFocusAway:n=!1,children:r,initialFocus:o="auto",restoreFocus:i=!1,transitionComponent:a,classes:s,elementRef:l,onClose:c,closeTitle:u,...d}){const h="custom"!==d.variant;const{buttons:m,icon:p,paddingSize:f="md",title:g="",scrollable:v=!0,...b}=h?d:{buttons:void 0,icon:void 0,paddingSize:void 0,title:void 0,scrollable:void 0,...d},y=Le(l),_=de(document.activeElement),[w,k]=se(!1),N=me((()=>{a?k(!1):null==c||c()}),[c,a]),S=me((()=>{if("manual"===o)return;var e;if("auto"===o)return void(null===(e=y.current)||void 0===e||e.focus());const t=null==o?void 0:o.current;var n;t&&!t.disabled?t.focus():null===(n=y.current)||void 0===n||n.focus()}),[o,y]);Ee(y,N,{enabled:e}),Ce(["Escape"],N,{enabled:t}),Te(y,N,{enabled:n});const A=fe(),E=he((()=>null!=a?a:x),[a]);ce((()=>{k(!0),a||S()}),[]),ue((()=>{const e=_.current;return()=>{i&&e&&e.focus()}}),[]),ue((()=>{var e;const t=null==y||null===(e=y.current)||void 0===e?void 0:e.querySelector("p");t&&(t.id=A,
100
+ y.current.setAttribute("aria-describedby",A))}),[A,y]);const T={onClose:c?N:void 0,title:u};return et(rt.Provider,{value:T,children:et(E,{direction:w?"in":"out",onTransitionEnd:e=>{"in"===e?S():null==c||c()},children:et("div",{"data-component":"Dialog",tabIndex:-1,role:"dialog",...b,className:Ze("flex flex-col",s),ref:y,children:h?et(Pr,{buttons:m,fullWidthHeader:!0,icon:p,paddingSize:f,title:g,scrollable:v,children:r},void 0,0,{fileName:Dr,lineNumber:257,columnNumber:13},this):et(x,{children:r},void 0)},void 0,0,{fileName:Dr,lineNumber:243,columnNumber:9},this)},void 0,0,{fileName:Dr,lineNumber:239,columnNumber:7},this)},void 0,0,{fileName:Dr,lineNumber:238,columnNumber:5},this)}var Hr="/home/runner/work/frontend-shared/frontend-shared/src/components/feedback/ModalDialog.tsx";function Br({children:e,disableCloseOnEscape:t=!1,disableFocusTrap:n=!1,disableRestoreFocus:r=!1,size:o="md",classes:i,elementRef:a,closeOnClickAway:s=!1,closeOnFocusAway:l=!1,initialFocus:c="auto",...u}){const d=Le(a)
101
+ ;return function(e,{enabled:t=!0,selector:n=Je}={}){const r=de(null);ce((()=>{if(!t)return()=>{};if(!e.current)throw new Error("Container ref not set");const o=e.current,i=()=>{const e=Array.from(o.querySelectorAll(n)).filter((e=>{return null!==e.offsetParent&&!("boolean"==typeof(t=e).disabled&&t.disabled);var t}));return document.activeElement===o&&e.unshift(o),e},a=(e=i(),t=-1,n=!1)=>{t<0&&(t=e.findIndex((e=>0===e.tabIndex)))<0&&(t=0);for(const[o,i]of e.entries())i.tabIndex=o===t?0:-1,o===t&&n&&(r.current=i,i.focus())},s=i(),l=s.indexOf(document.activeElement);a(s,l);const c=new Ne;c.add(o,"focusin",(e=>{const t=i(),n=t.indexOf(e.target);n>=0&&a(t,n)})),c.add(o,"keydown",(e=>{const t=i();let n=t.findIndex((e=>0===e.tabIndex));-1!==n&&t[n]!==o||!r.current||(n=t.indexOf(r.current));let s=!1;"Tab"===e.key&&e.shiftKey?(0===n?n=t.length-1:--n,s=!0):"Tab"===e.key&&(n===t.length-1?n=0:++n,s=!0),s&&(a(t,n,!0),e.preventDefault(),e.stopPropagation())}));const u=new MutationObserver((()=>{a()}));return u.observe(o,{
102
+ subtree:!0,attributes:!0,attributeFilter:["disabled"],childList:!0}),()=>{c.removeAll(),u.disconnect()}}),[e,t,n])}(d,{enabled:!n}),et(nt,{"data-composite-component":"ModalDialog",children:et(Fr,{"aria-modal":!0,...u,closeOnClickAway:s,closeOnFocusAway:l,closeOnEscape:!t,initialFocus:c,restoreFocus:!r,classes:Ze("flex flex-col","custom"!==o&&"max-w-[90vw] max-h-[90vh]","custom"!==o&&"tall:fixed tall:max-h-[80vh] tall:top-[10vh]",{"w-[30rem]":"sm"===o,"w-[36rem]":"md"===o,"w-[42rem]":"lg"===o},i),elementRef:d,"data-modal-size":o,children:e},void 0,0,{fileName:Hr,lineNumber:76,columnNumber:7},this)},void 0,0,{fileName:Hr,lineNumber:75,columnNumber:5},this)}var $r="/home/runner/work/frontend-shared/frontend-shared/src/util/prompts.tsx";async function jr({title:e="Confirm",message:t,confirmAction:n="Yes",cancelAction:r="Cancel",initialFocus:o="cancel"}){const i={current:null},a={current:null},s="cancel"===o?i:a,l=document.createElement("div");return l.setAttribute("data-testid","confirm-container"),
103
+ l.style.position="relative",l.style.zIndex="10",document.body.appendChild(l),new Promise((o=>{const c=e=>{$(null,l),l.remove(),o(e)};$(et(Br,{buttons:et(x,{children:[et(kr,{elementRef:i,"data-testid":"cancel-button",onClick:()=>c(!1),children:r},void 0,0,{fileName:$r,lineNumber:66,columnNumber:13},this),et(kr,{variant:"primary",elementRef:a,"data-testid":"confirm-button",onClick:()=>c(!0),children:n},void 0,0,{fileName:$r,lineNumber:73,columnNumber:13},this)]},void 0),initialFocus:s,title:e,onClose:()=>c(!1),children:t},void 0,0,{fileName:$r,lineNumber:63,columnNumber:7},this),l)}))}var qr="/home/runner/work/frontend-shared/frontend-shared/src/components/input/ToggleInput.tsx";function Ur({children:e,elementRef:t,containerRef:n,checked:r,icon:o,checkedIcon:i,disabled:a,onChange:s,id:l,type:c,containerClasses:u,...d}){const h=r?i:o;return et("label",{className:Ze("relative flex items-center gap-x-1.5",{"cursor-pointer":!a,"opacity-70":a},u),htmlFor:l,
104
+ "data-composite-component":"checkbox"===c?"Checkbox":"RadioButton",ref:n,children:[et("input",{...d,type:c,ref:t,className:Ze("peer","absolute w-em h-em","opacity-[.00001]",{"cursor-pointer":!a}),checked:r,disabled:a,id:l,onChange:s},void 0,0,{fileName:qr,lineNumber:66,columnNumber:7},this),et(h,{className:Ze("peer-focus-visible:ring","w-em h-em")},void 0,0,{fileName:qr,lineNumber:88,columnNumber:7},this),e]},void 0,0,{fileName:qr,lineNumber:51,columnNumber:5},this)}var Gr="/home/runner/work/frontend-shared/frontend-shared/src/components/input/Checkbox.tsx";function Vr({checked:e,defaultChecked:t=!1,icon:n=zt,checkedIcon:r=Ot,onChange:o,...i}){const a="boolean"==typeof e,[s,l]=se(t);return et(Ur,{icon:n,checkedIcon:r,type:"checkbox",checked:a?e:s,onChange:function(e){null==o||o.call(this,e),a||l(e.target.checked)},...i},void 0,0,{fileName:Gr,lineNumber:65,columnNumber:5},this)}var Wr="/home/runner/work/frontend-shared/frontend-shared/src/components/input/Input.tsx";function Kr({classes:e,feedback:t}){
105
+ return Ze("focus-visible-ring ring-inset border rounded w-full p-2","bg-grey-0 focus:bg-white disabled:bg-grey-1","placeholder:text-grey-6 disabled:placeholder:text-grey-7","touch:text-at-least-16px",{"ring-2":!!t,"ring-red-error":"error"===t,"ring-yellow-notice":"warning"===t},Sr,e)}function Yr({elementRef:e,type:t="text",classes:n,error:r,feedback:o,...i}){i.id||i["aria-label"]||console.warn("`Input` component should have either an `id` or an `aria-label` attribute");const a=Le(e);return r&&(o="error"),function(e,t){ue((()=>{var n;null===(n=e.current)||void 0===n||n.setCustomValidity(null!=t?t:"")}),[t,e])}(a,r),et("input",{"data-component":"Input",...i,ref:a,type:t,className:Kr({classes:n,feedback:o}),"aria-invalid":"error"===o},void 0,0,{fileName:Wr,lineNumber:73,columnNumber:5},this)}const Xr=j(null);var Zr="/home/runner/work/frontend-shared/frontend-shared/src/components/input/RadioGroup.tsx";function Jr({value:e,children:t,subtitle:n,disabled:r}){const o=pe(Xr)
106
+ ;if(!o)throw new Error("RadioGroup.Radio can only be used as RadioGroup child");const{selected:i,disabled:a=r,onChange:s}=o,l=!a&&i===e;return et("div",{role:"radio","aria-checked":l,"aria-disabled":a,className:Ze("focus-visible-ring rounded-lg px-3 py-2 flex-1 group",{"bg-grey-3/50":l,"hover:bg-grey-3/25":!l&&!a,"opacity-70":a,"cursor-pointer":!a}),"data-value":e,onClick:a?void 0:()=>s(e),onKeyDown:a?void 0:t=>{["Enter"," "].includes(t.key)&&(t.preventDefault(),s(e))},tabIndex:-1,children:[et("div",{className:"flex items-center gap-x-1.5",children:[l?et(rr,{},void 0,0,{fileName:Zr,lineNumber:68,columnNumber:23},this):et(tr,{},void 0,0,{fileName:Zr,lineNumber:68,columnNumber:46},this),t]},void 0,0,{fileName:Zr,lineNumber:67,columnNumber:7},this),n&&et("div",{className:Ze("pl-4 ml-1.5 mt-1 text-sm",{"text-grey-7":l,"text-grey-6 group-hover:text-grey-7":!l&&!a}),children:n},void 0,0,{fileName:Zr,lineNumber:72,columnNumber:9},this)]},void 0,0,{fileName:Zr,lineNumber:40,columnNumber:5},this)}
107
+ Jr.displayName="RadioGroup.Radio",Object.assign((function({direction:e="horizontal",children:t,selected:n,onChange:r,disabled:o,"aria-label":i,"aria-labelledby":a,name:s}){const l=de(null);return Ae(l,{loop:!1,selector:'[role="radio"]:not([aria-disabled="true"])',focusElement:e=>{r(e.dataset.value),e.focus()}}),et(Xr.Provider,{value:{selected:n,disabled:o,onChange:r},children:[et("div",{"aria-label":i,"aria-labelledby":a,ref:l,role:"radiogroup",className:Ze("w-full flex gap-1.5",{"flex-col":"vertical"===e}),children:t},void 0,0,{fileName:Zr,lineNumber:134,columnNumber:7},this),s&&et("input",{type:"hidden","data-testid":"hidden-input",name:s,value:n,disabled:o},void 0,0,{fileName:Zr,lineNumber:146,columnNumber:9},this)]},void 0,0,{fileName:Zr,lineNumber:131,columnNumber:5},this)}),{Radio:Jr,displayName:"RadioGroup"});var Qr="/home/runner/work/frontend-shared/frontend-shared/src/components/feedback/Popover.tsx";const eo=".15rem",to=8
108
+ ;function no({anchorElementRef:e,children:t,open:n,onClose:r,align:o="left",classes:i,variant:a="panel",onScroll:s,elementRef:l,asNativePopover:c=HTMLElement.prototype.hasOwnProperty("popover")}){const u=Le(l);return function(e,t,n,r,o){const i=me((()=>{const n=t.current,i=e.current,a=e=>{Object.assign(n.style,e);const t=Object.keys(e);return()=>t.map((e=>n.style[e]=""))},s=window.innerHeight,{top:l,bottom:c,left:u,height:d,width:h}=i.getBoundingClientRect(),m=s-c,{height:p,width:f}=n.getBoundingClientRect(),g=m<p&&l>m;if(!r)return a(g?{bottom:"100%",marginBottom:eo}:{top:"100%",marginTop:eo});const{top:v,width:b}=document.body.getBoundingClientRect(),y=Math.abs(v),_=(o?u+h:b-u)-to;let w=u;return f>_?w=o?to:w-(f-_):o&&f>h&&(w-=f-h),a({minWidth:`${h}px`,top:g?`calc(${y+l-p}px - ${eo})`:`calc(${y+l+d}px + ${eo})`,left:`${Math.max(to,w)}px`})}),[r,e,t,o]);ue((()=>{if(!n)return()=>{};const e=t.current;r&&e.togglePopover(!0);const o=i();if(!r)return o;const a=new Ne;a.add(document.body,"scroll",i,{capture:!0})
109
+ ;const s=new ResizeObserver(i);return s.observe(e),()=>{r&&(null==e||e.togglePopover(!1)),o(),a.removeAll(),s.disconnect()}}),[i,r,n,t])}(e,u,n,c,"right"===o),function(e,t,n,r,o){ce((()=>{if(!o)return()=>{};const t=e.current,r=e=>{"open"===e.oldState&&"closed"===e.newState&&n()};return t.addEventListener("toggle",r),()=>t.removeEventListener("toggle",r)}),[o,n,e]);const i=r&&!o;Ee(e,(e=>{e.composedPath().includes(t.current)||n()}),{enabled:i}),Ce(["Escape"],n,{enabled:i})}(u,e,r,n,c),function({popoverRef:e,open:t}){ue((()=>{const n=e.current,r=t?document.activeElement:null;return n&&r?()=>{const e=document.activeElement;e&&!n.contains(e)&&e!==document.body||r.focus()}:()=>{}}),[e,t])}({open:n,popoverRef:u}),et("div",{className:Ze("absolute z-5","panel"===a&&["max-h-80 overflow-y-auto overflow-x-hidden","rounded border bg-white shadow hover:shadow-md focus-within:shadow-md"],c&&["max-w-[calc(100%-16px)]","p-0 m-0"],!c&&{hidden:!n,"right-0":"right"===o,"min-w-full":!0},i),ref:u,popover:c&&"auto",onScroll:s,
110
+ "data-testid":"popover","data-component":"Popover",children:n&&t},void 0,0,{fileName:Qr,lineNumber:356,columnNumber:5},this)}const ro=j(null);var oo="/home/runner/work/frontend-shared/frontend-shared/src/components/input/Select.tsx";function io(e,t){return"function"==typeof e?e(t):e}function ao({value:e,children:t,disabled:n=!1,classes:r,elementRef:o,title:i}){const a=de(null),s=de(null),l=Le(o),c=e=>e.target===a.current||e.target===s.current,u=pe(ro);if(!u)throw new Error("Select.Option can only be used as Select or MultiSelect child");const{selectValue:d,value:h,multiple:m}=u,p=he((()=>!n&&(m?h.includes(e)||0===h.length&&void 0===e:h===e)),[h,n,m,e]),f=me((()=>{const t={closeListbox:!0};d(m?void 0!==e?[e]:[]:e,t)}),[m,d,e]),g=me((()=>{if(!m)return;const t={closeListbox:void 0===e};if(void 0===e)return void d([],t);const n=h.indexOf(e);if(-1===n)d([...h,e],t);else{const e=[...h];e.splice(n,1),d(e,t)}}),[h,m,d,e]);return et("li",{
111
+ className:Ze("w-full ring-inset outline-none rounded-none select-none","px-1 mb-1 first:mt-1 whitespace-nowrap group",{"text-grey-4":n,"cursor-pointer":!n},r),onClick:e=>{n||c(e)||f()},onKeyDown:e=>{n||(["Enter"," "].includes(e.key)&&!c(e)?(e.preventDefault(),f()):a.current&&"ArrowRight"===e.key&&(e.preventDefault(),a.current.focus()))},role:"option","aria-disabled":n,"aria-selected":p,tabIndex:p?0:-1,ref:l,title:i,children:et("div",{className:Ze("flex justify-between items-center","w-full rounded",{"hover:bg-grey-1 group-focus-visible:ring":!n,"bg-grey-1 hover:bg-grey-2":p}),children:[et("div",{className:Ze("py-2 pl-3",{truncate:"truncate"===u.listboxOverflow,"whitespace-normal":"wrap"===u.listboxOverflow}),children:io(t,{selected:p,disabled:n})},void 0,0,{fileName:oo,lineNumber:203,columnNumber:9},this),!m&&et("div",{className:"px-3",children:et(Mt,{className:Ze("text-grey-6 scale-125",{"opacity-0":!p})},void 0,0,{fileName:oo,lineNumber:213,columnNumber:13},this)},void 0,0,{fileName:oo,lineNumber:212,
112
+ columnNumber:11},this),m&&et(Vr,{containerClasses:Ze("self-stretch px-3","text-lg",{"text-grey-6":p,"text-grey-3 hover:text-grey-6":!p}),checked:p,checkedIcon:Ot,elementRef:a,containerRef:s,onChange:g,onKeyDown:e=>{var t;"ArrowLeft"===e.key&&(e.preventDefault(),null===(t=l.current)||void 0===t||t.focus())}},void 0,0,{fileName:oo,lineNumber:224,columnNumber:11},this)]},void 0,0,{fileName:oo,lineNumber:193,columnNumber:7},this)},void 0,0,{fileName:oo,lineNumber:146,columnNumber:5},this)}function so({buttonContent:e,value:t,onChange:n,children:r,disabled:o,elementRef:i,buttonId:a,buttonClasses:s,popoverClasses:l,containerClasses:c,onPopoverScroll:u,alignListbox:d="left",multiple:h,listboxOverflow:m="truncate","aria-label":p,"aria-labelledby":f,listboxAsPopover:g}){const v=de(null),b=de(null),[y,_]=se(!1),w=me((()=>_(!1)),[_]),x=fe(),k=Le(i),N=fe(),S=me(((e,t)=>{n(e),t.closeListbox&&w()}),[n,w]);return Te(v,w),Ae(b,{horizontal:!1,loop:!1,autofocus:!0,containerVisible:y,
113
+ selector:'[role="option"]:not([aria-disabled="true"])'}),et("div",{className:Ze("relative w-full border rounded",{"border-grey-5":y},Sr,c),ref:v,children:[et("button",{id:null!=a?a:N,className:Ze("focus-visible-ring transition-colors whitespace-nowrap","w-full flex items-center justify-between gap-x-2","bg-grey-0 disabled:bg-grey-1 disabled:text-grey-6","text-left","rounded-[inherit]",s),type:"button",role:"combobox",disabled:o,"aria-expanded":y,"aria-haspopup":"listbox","aria-controls":x,"aria-label":p,"aria-labelledby":f,ref:k,onClick:()=>_((e=>!e)),onKeyDown:e=>{"ArrowDown"!==e.key||y||(e.preventDefault(),_(!0))},"data-testid":"select-toggle-button",children:[et("div",{className:"pl-2 py-2 truncate grow",children:e},void 0,0,{fileName:oo,lineNumber:429,columnNumber:9},this),et("div",{className:"pr-2 py-2 text-grey-6",children:y?et($n,{},void 0,0,{fileName:oo,lineNumber:431,columnNumber:26},this):et(qn,{},void 0,0,{fileName:oo,lineNumber:431,columnNumber:49},this)},void 0,0,{fileName:oo,lineNumber:430,
114
+ columnNumber:9},this)]},void 0,0,{fileName:oo,lineNumber:396,columnNumber:7},this),et(ro.Provider,{value:{value:t,selectValue:S,multiple:h,listboxOverflow:m},children:et(no,{anchorElementRef:v,open:y,onClose:w,asNativePopover:g,align:d,classes:l,onScroll:u,children:et("ul",{role:"listbox",id:x,ref:b,"aria-multiselectable":h,"aria-labelledby":null!=a?a:N,"aria-orientation":"vertical",children:r},void 0,0,{fileName:oo,lineNumber:453,columnNumber:11},this)},void 0,0,{fileName:oo,lineNumber:444,columnNumber:9},this)},void 0,0,{fileName:oo,lineNumber:435,columnNumber:7},this)]},void 0,0,{fileName:oo,lineNumber:387,columnNumber:5},this)}ao.displayName="Select.Option";const lo=Object.assign((function(e){return so({...e,multiple:!1})}),{Option:ao,displayName:"Select"});Object.assign((function(e){return so({...e,multiple:!0})}),{Option:ao,displayName:"MultiSelect"}),j({}),j(null);var co="/home/runner/work/frontend-shared/frontend-shared/src/components/feedback/Spinner.tsx"
115
+ ;function uo({size:e="sm",color:t="text-light"}){return et(yr,{className:Ze({"text-color-text-light":"text-light"===t,"text-color-text":"text"===t,"text-color-text-inverted":"text-inverted"===t},{"w-em h-em":"sm"===e,"w-2em h-2em":"md"===e,"w-4em h-4em":"lg"===e}),"data-component":"Spinner"},void 0,0,{fileName:co,lineNumber:18,columnNumber:5},this)}var ho="/home/runner/work/frontend-shared/frontend-shared/src/components/feedback/Callout.tsx";function mo({children:e,classes:t,elementRef:n,icon:r,status:o="notice",size:i="md",variant:a="outlined",unstyled:s=!1,...l}){const c=!s,u=c&&"custom"!==a,d=c&&"custom"!==i;let h=r;if(!h)switch(o){case"success":h=Mt;break;case"error":h=_t;break;default:h=Nt}const m=u&&d;return et("div",{"data-component":"Callout",...l,ref:n,className:Ze(c&&"flex items-center border",u&&{"rounded border":!0,"shadow hover:shadow-md cursor-pointer":"raised"===a,"border-yellow-notice":"notice"===o,"border-green-success":"success"===o,"border-red-error":"error"===o},u&&{
116
+ "bg-yellow-notice":"notice"===o&&m,"bg-green-success":"success"===o&&m,"bg-red-error":"error"===o&&m,"bg-white":!m},t),children:[m&&et("div",{className:Ze({"p-2":"md"===i,"p-1.5":"sm"===i,"p-3":"lg"===i}),children:et(h,{"data-testid":"callout-icon",className:Ze("text-white",{"w-[1.25em] h-[1.25em]":"md"===i,"w-[0.85em] h-[0.85em]":"sm"===i,"w-[1.5em] h-[1.5em]":"lg"===i})},void 0,0,{fileName:ho,lineNumber:95,columnNumber:11},this)},void 0,0,{fileName:ho,lineNumber:88,columnNumber:9},this),et("div",{className:Ze(d&&{"p-2":"md"===i,"py-1.5 px-2":"sm"===i,"p-3":"lg"===i},c&&"grow",u&&"bg-white rounded-r"),children:e},void 0,0,{fileName:ho,lineNumber:105,columnNumber:7},this)]},void 0,0,{fileName:ho,lineNumber:64,columnNumber:5},this)}var po="/home/runner/work/frontend-shared/frontend-shared/src/components/feedback/ToastMessages.tsx";function fo({message:e,onDismiss:t}){return et(mo,{classes:Ze({"sr-only":e.visuallyHidden}),status:e.type,onClick:()=>t(e.id),variant:"raised",children:e.message},void 0,0,{
117
+ fileName:po,lineNumber:55,columnNumber:5},this)}const go=({direction:e,onTransitionEnd:t,children:n,transitionClasses:r={}})=>{const o="out"===e,i=de(null),a=he((()=>{const{transitionIn:e="animate-fade-in",transitionOut:t="animate-fade-out"}=r;return{[e]:!o,[t]:o}}),[o,r]);return et("div",{"data-testid":"animation-container",onAnimationEnd:n=>{n.target===i.current&&(null==t||t(null!=e?e:"in"))},ref:i,className:Ze("relative w-full container",a),children:n},void 0,0,{fileName:po,lineNumber:103,columnNumber:5},void 0)};function vo({messages:e,onMessageDismiss:t,transitionClasses:n,setTimeout_:r=setTimeout}){const[o,i]=se([]),a=de(new Map),s=me((e=>i((t=>[...t,e]))),[]),l=me((e=>{const t=r((()=>{s(e),a.current.delete(e)}),5e3);a.current.set(e,t)}),[s,r]),c=me(((e,n)=>{var r;const o=null===(r=n.autoDismiss)||void 0===r||r;"in"===e&&o&&l(n.id),"out"===e&&(t(n.id),i((e=>e.filter((e=>e!==n.id)))))}),[l,t]);return ue((()=>{const e=a.current;return()=>{e.forEach((e=>clearTimeout(e)))}}),[]),et("ul",{
118
+ "aria-live":"polite","aria-relevant":"additions",className:"w-full space-y-2","data-component":"ToastMessages",children:e.map((e=>{const t=o.includes(e.id);return et("li",{className:Ze({"mb-2":!e.visuallyHidden}),children:et(go,{direction:t?"out":"in",onTransitionEnd:t=>c(t,e),transitionClasses:n,children:et(fo,{message:e,onDismiss:s},void 0,0,{fileName:po,lineNumber:206,columnNumber:15},this)},void 0,0,{fileName:po,lineNumber:201,columnNumber:13},this)},e.id,0,{fileName:po,lineNumber:189,columnNumber:11},this)}))},void 0,0,{fileName:po,lineNumber:180,columnNumber:5},this)}var bo="/home/runner/work/frontend-shared/frontend-shared/src/components/navigation/Link.tsx";function yo({children:e,classes:t,elementRef:n,underline:r="none",unstyled:o=!1,variant:i="brand",...a}){const s=!o;return et("a",{"data-component":"Link",rel:"noopener noreferrer",...a,className:Ze(s&&{"focus-visible-ring rounded":!0,"no-underline hover:no-underline":"none"===r,"underline hover:underline":"always"===r,
119
+ "no-underline hover:underline":"hover"===r},s&&"custom"!==i&&{"text-brand hover:text-brand-dark":"brand"===i,"text-color-text-light hover:text-brand":"text-light"===i,"text-color-text hover:text-brand-dark":"text"===i},t),ref:n,children:e},void 0,0,{fileName:bo,lineNumber:37,columnNumber:5},this)}var _o="/home/runner/work/frontend-shared/frontend-shared/src/components/navigation/LinkButton.tsx";function wo({children:e,classes:t,elementRef:n,inline:r=!1,underline:o="none",variant:i="brand",unstyled:a=!1,...s}){const l=!a;return et(kr,{"data-component":"LinkButton",...s,elementRef:n,classes:Ze(l&&{"focus-visible-ring transition-colors whitespace-nowrap rounded":!0,inline:r,"flex items-center":!r},l&&{"no-underline hover:no-underline":"none"===o,"underline enabled:hover:underline":"always"===o,"no-underline enabled:hover:underline":"hover"===o},l&&"custom"!==i&&{"aria-pressed:font-semibold aria-expanded:font-semibold":!0,"text-brand enabled:hover:text-brand-dark":"brand"===i,
120
+ "text-color-text enabled:hover:text-brand-dark":"text"===i,"text-color-text-light enabled:hover:text-brand":"text-light"===i},t),unstyled:!0,children:e},void 0,0,{fileName:_o,lineNumber:40,columnNumber:5},this)}var xo="/home/runner/work/frontend-shared/frontend-shared/src/components/navigation/Pagination.tsx";function ko({children:e,invisible:t=!1,pressed:n=!1,onClick:r,title:o}){return et(kr,{classes:Ze("px-3.5 py-2.5 gap-x-1","font-semibold rounded","text-grey-7 enabled:hover:text-grey-9 enabled:hover:bg-grey-3","disabled:text-grey-5 aria-pressed:bg-grey-3 aria-expanded:bg-grey-3",t&&"invisible"),disabled:t,onClick:r,pressed:n,size:"custom",title:o,variant:"custom",children:e},void 0,0,{fileName:xo,lineNumber:24,columnNumber:5},this)}function No({currentPage:e,onChangePage:t,totalPages:n}){const r=e<n,o=e>1,i=function(e,t,{boundaryCount:n=1,siblingCount:r=1}={}){if(t<=1)return[];const o=[],i=t-(e=Math.max(1,Math.min(e,t)));let a=null;if((n=Math.max(n,1))+(r=Math.max(r,0))<e-1){for(let e=1;e<=n;e++)o.push(e)
121
+ ;a={index:o.length,count:e-r-n,value:e-r-1},o.push(null);for(let t=e-r;t<e;t++)o.push(t)}else for(let t=1;t<e;t++)o.push(t);o.push(e);let s=null;if(n+r<i){for(let t=e+1;t<=e+r;t++)o.push(t);s={index:o.length,count:t-n+1-(e+r),value:e+r+1},o.push(null);for(let e=t-n+1;e<=t;e++)o.push(e)}else for(let n=e+1;n<=t;n++)o.push(n);const l=Math.min(2*n+2*r+3,t);for(;o.length<l&&(null!==(c=s)&&void 0!==c&&c.count||null!==(u=a)&&void 0!==u&&u.count);){var c,u;s&&s.count>0?(o.splice(s.index,0,s.value),++s.index,++s.value,--s.count):a&&(o.splice(a.index+1,0,a.value),--a.value,--a.count)}return o}(e,n),a=(e,n)=>{t(e),n.blur()};return et("div",{className:"flex items-center text-md select-none","data-testid":"pagination-navigation",children:[et("div",{className:"mr-2",children:et(ko,{invisible:!o,title:"Go to previous page",onClick:t=>a(e-1,t.target),children:[et(gt,{},void 0,0,{fileName:xo,lineNumber:100,columnNumber:11},this),"prev"]},void 0,0,{fileName:xo,lineNumber:95,columnNumber:9},this)},void 0,0,{fileName:xo,
122
+ lineNumber:94,columnNumber:7},this),et("ul",{className:Ze("hidden","md:flex md:items-center md:justify-center md:gap-x-2","md:grow"),children:i.map(((t,n)=>et("li",{children:null===t?et("div",{className:"px-3 text-center","data-testid":"pagination-gap",children:"…"},void 0,0,{fileName:xo,lineNumber:130,columnNumber:15},this):et(ko,{title:`Go to page ${t}`,pressed:t===e,onClick:e=>a(t,e.target),children:t.toString()},`page-${n}`,0,{fileName:xo,lineNumber:134,columnNumber:15},this)},n,0,{fileName:xo,lineNumber:122,columnNumber:11},this)))},void 0,0,{fileName:xo,lineNumber:104,columnNumber:7},this),et("div",{className:Ze("ml-2 flex justify-end","grow md:grow-0"),children:et(ko,{invisible:!r,title:"Go to next page",onClick:t=>a(e+1,t.target),children:["next",et(bt,{},void 0,0,{fileName:xo,lineNumber:160,columnNumber:11},this)]},void 0,0,{fileName:xo,lineNumber:154,columnNumber:9},this)},void 0,0,{fileName:xo,lineNumber:146,columnNumber:7},this)]},void 0,0,{fileName:xo,lineNumber:90,columnNumber:5},this)}
123
+ var So="/home/runner/work/frontend-shared/frontend-shared/src/components/navigation/Tab.tsx";function Ao({children:e,classes:t,elementRef:n,icon:r,textContent:o,selected:i=!1,size:a="md",variant:s="text",unstyled:l=!1,...c}){const u=!l,d=u&&"custom"!==a;return et(kr,{"data-component":"Tab",...c,classes:Ze(d&&"gap-x-1.5",u&&"custom"!==s&&{"px-4 py-2":"tab"===s&&d,"font-semibold text-grey-7 rounded-t-lg border border-transparent border-b-0":"tab"===s,"aria-selected:text-color-text aria-selected:bg-white":"tab"===s,"aria-selected:border aria-selected:border-grey-3 aria-selected:border-b-0":"tab"===s,"enabled:hover:text-color-text disabled:text-grey-7/50":"tab"===s,"enabled:hover:text-brand-dark":"text"===s,"aria-selected:font-bold":"text"===s},t),elementRef:n,"aria-selected":i,role:"tab",variant:"custom",size:"custom",unstyled:l,children:[r&&et(r,{className:Ze("p-[0.125em] w-em h-em")},void 0,0,{fileName:So,lineNumber:79,columnNumber:9},this),et("span",{"data-content":o,"data-testid":"sizing-wrapper",
124
+ className:Ze({"before:content-[attr(data-content)] before:font-bold":o,"before:block before:invisible before:h-0 before:overflow-hidden":o}),children:e},void 0,0,{fileName:So,lineNumber:87,columnNumber:7},this)]},void 0,0,{fileName:So,lineNumber:50,columnNumber:5},this)}var Eo="/home/runner/work/frontend-shared/frontend-shared/src/components/navigation/TabList.tsx";function To({children:e,classes:t,elementRef:n,vertical:r=!1,...o}){const i=Le(n);return Ae(i,{selector:"button",horizontal:!0,vertical:r}),et("div",{"data-component":"TabList",...o,ref:i,className:Ze("flex focus-visible-ring",{"flex-col":r},t),role:"tablist","aria-orientation":r?"vertical":"horizontal",children:e},void 0,0,{fileName:Eo,lineNumber:45,columnNumber:5},this)}const Co=({children:e,direction:t="in",onTransitionEnd:n})=>{const r="in"===t,o=de(null),[i,a]=se(r?"auto":0),[s,l]=se(r);ce((()=>{if(r===(0!==i))return;const e=o.current;r?(e.style.display="",l(!0),a(e.scrollHeight)):(e.style.height=`${e.scrollHeight}px`,
125
+ e.getBoundingClientRect(),a(0))}),[i,r]);const c=me((e=>{e.target===o.current&&"height"===e.propertyName&&(r?a("auto"):l(!1),null==n||n(t))}),[a,r,n,t]);return et("div",{ontransitionend:c,ref:o,style:{display:s?"":"none",height:i,overflow:"auto"===i?"visible":"hidden",transition:"height 0.15s ease-in"},children:e},void 0,0,{fileName:"/home/runner/work/frontend-shared/frontend-shared/src/components/transition/Slider.tsx",lineNumber:80,columnNumber:5},void 0)};function Mo({services:e}){return Array.isArray(e)&&e[0]?e[0]:null}function Io(e){const t=Mo(e);return!!t?.authority&&t.authority!==e.authDomain}const zo={accentColor:"color",appBackgroundColor:"backgroundColor",ctaBackgroundColor:"backgroundColor",ctaTextColor:"color",selectionFontFamily:"fontFamily",annotationFontFamily:"fontFamily"};function Lo(e,t){const n={};if(!t.branding)return n;const{branding:r}=t;return e.forEach((e=>{const t=zo[e],o=r[e];t&&o&&(n[t]=o)})),n}const Oo=j({get(e){
126
+ throw new Error(`Missing ServiceContext provider to provide "${e}" prop`)}});function Ro(e,t){function n(n){const r=pe(Oo),o={};for(const e of t)e in n||(o[e]=r.get(e));const i={...o,...n};return et(e,{...i})}const r=e.displayName||e.name;return n.displayName=`withServices(${r})`,n}function Po(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Do=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),Fo=()=>Math.random().toString(36).substring(7).split("").join("."),Ho={INIT:`@@redux/INIT${Fo()}`,REPLACE:`@@redux/REPLACE${Fo()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Fo()}`};function Bo(e,t,n){if("function"!=typeof e)throw new Error(Po(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Po(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){
127
+ if("function"!=typeof n)throw new Error(Po(1));return n(Bo)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach(((e,t)=>{a.set(t,e)})))}function u(){if(l)throw new Error(Po(3));return o}function d(e){if("function"!=typeof e)throw new Error(Po(4));if(l)throw new Error(Po(5));let t=!0;c();const n=s++;return a.set(n,e),function(){if(t){if(l)throw new Error(Po(6));t=!1,c(),a.delete(n),i=null}}}function h(e){if(!function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e))throw new Error(Po(7));if(void 0===e.type)throw new Error(Po(8));if("string"!=typeof e.type)throw new Error(Po(17));if(l)throw new Error(Po(9));try{l=!0,o=r(o,e)}finally{l=!1}return(i=a).forEach((e=>{e()})),e}h({type:Ho.INIT});return{dispatch:h,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Po(10));r=e,h({type:Ho.REPLACE})},[Do]:function(){
128
+ const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Po(11));function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[Do](){return this}}}}}function $o(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}const r=Object.keys(n);let o;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:Ho.INIT}))throw new Error(Po(12));if(void 0===n(void 0,{type:Ho.PROBE_UNKNOWN_ACTION()}))throw new Error(Po(13))}))}(n)}catch(e){o=e}return function(e={},t){if(o)throw o;let i=!1;const a={};for(let o=0;o<r.length;o++){const s=r[o],l=n[s],c=e[s],u=l(c,t);if(void 0===u)throw t&&t.type,new Error(Po(14));a[s]=u,i=i||u!==c}return i=i||r.length!==Object.keys(e).length,i?a:e}}function jo(e,t){return function(...n){return t(e.apply(this,n))}}var qo,Uo=({dispatch:e,getState:t})=>n=>r=>"function"==typeof r?r(e,t,qo):n(r);function Go(e){return(t={},n)=>{const r=e[n.type];if(!r)return t;const o=r(t,n);return{
129
+ ...t,...o}}}function Vo(e,t){const n={};for(const[r,o]of Object.entries(e))n[r]=(...e)=>o(t(),...e);return n}function Wo(e,t){return Object.assign(e,t)}function Ko(e,t=[],n=[]){const r={};for(const n of e)r[n.namespace]=n.initialState(...t);const o={};for(const t of e)o[t.namespace]=Go(t.reducers);const i=function(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(Po(15))};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map((e=>e(a)));return i=function(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}(...s)(o.dispatch),{...o,dispatch:i}}}(...[Uo],...n);const a=Bo($o(o),r,i),s={};for(const t of e)Wo(s,t.actionCreators);const l=function(e,t){if("function"==typeof e)return jo(e,t);if("object"!=typeof e||null===e)throw new Error(Po(16));const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=jo(o,t))}return n}(s,a.dispatch);Object.assign(a,l);const c={};for(const t of e){const{namespace:e,selectors:n,rootSelectors:r}=t
130
+ ;if(Wo(c,Vo(n,(()=>a.getState()[e]))),r){Wo(c,Vo(r,a.getState))}}return Object.assign(a,c),a}function Yo(e,t,n){if(n&&"type"in n)throw new Error("Payload cannot contain a `type` field");return{type:t,...n}}function Xo(e,t){if(!(e instanceof Function)){const t=e;e=()=>t}return{initialState:e,...t}}function Zo(e){let t=0;return n=>r=>{if(!window.debug)return void n(r);++t;const o=r.type+" ("+t.toString()+")";console.group(o),console.log("Prev State:",e.getState()),console.log("Action:",r),n(r),console.log("Next State:",e.getState()),console.groupEnd()}}const Jo={API_REQUEST_STARTED:e=>({...e,activeApiRequests:e.activeApiRequests+1}),API_REQUEST_FINISHED(e){if(0===e.activeApiRequests)throw new Error("API_REQUEST_FINISHED action when no requests were active");return{...e,activeApiRequests:e.activeApiRequests-1}},ANNOTATION_SAVE_STARTED(e,t){const n=[];t.annotation.$tag&&!e.activeAnnotationSaveRequests.includes(t.annotation.$tag)&&n.push(t.annotation.$tag);const r=e.activeAnnotationSaveRequests.concat(n);return{
131
+ ...e,activeAnnotationSaveRequests:r}},ANNOTATION_SAVE_FINISHED(e,t){const n=e.activeAnnotationSaveRequests.filter((e=>e!==t.annotation.$tag));return{...e,activeAnnotationSaveRequests:n}},ANNOTATION_FETCH_STARTED:e=>({...e,activeAnnotationFetches:e.activeAnnotationFetches+1}),ANNOTATION_FETCH_FINISHED(e){if(0===e.activeAnnotationFetches)throw new Error("ANNOTATION_FETCH_FINISHED action when no annotation fetches were active");return{...e,hasFetchedAnnotations:!0,activeAnnotationFetches:e.activeAnnotationFetches-1}},SET_ANNOTATION_RESULT_COUNT:(e,t)=>({annotationResultCount:t.resultCount}),BEGIN_IMPORT:(e,t)=>({importsPending:e.importsPending+t.count,importsTotal:e.importsTotal+t.count}),COMPLETE_IMPORT(e,t){if(!e.importsPending)return e;const n=Math.max(e.importsPending-t.count,0);return{importsPending:n,importsTotal:n>0?e.importsTotal:0}}};const Qo=Xo({activeAnnotationSaveRequests:[],activeApiRequests:0,activeAnnotationFetches:0,hasFetchedAnnotations:!1,annotationResultCount:null,importsPending:0,
132
+ importsTotal:0},{reducers:Jo,namespace:"activity",actionCreators:{annotationFetchStarted:function(){return Yo(0,"ANNOTATION_FETCH_STARTED",void 0)},annotationFetchFinished:function(){return Yo(0,"ANNOTATION_FETCH_FINISHED",void 0)},annotationSaveStarted:function(e){return Yo(0,"ANNOTATION_SAVE_STARTED",{annotation:e})},annotationSaveFinished:function(e){return Yo(0,"ANNOTATION_SAVE_FINISHED",{annotation:e})},apiRequestStarted:function(){return Yo(0,"API_REQUEST_STARTED",void 0)},apiRequestFinished:function(){return Yo(0,"API_REQUEST_FINISHED",void 0)},beginImport:function(e){return Yo(0,"BEGIN_IMPORT",{count:e})},completeImport:function(e){return Yo(0,"COMPLETE_IMPORT",{count:e})},setAnnotationResultCount:function(e){return Yo(0,"SET_ANNOTATION_RESULT_COUNT",{resultCount:e})}},selectors:{hasFetchedAnnotations:function(e){return e.hasFetchedAnnotations},importsPending:function(e){return e.importsPending},importsTotal:function(e){return e.importsTotal},isLoading:function(e){
133
+ return e.activeApiRequests>0||!e.hasFetchedAnnotations},isFetchingAnnotations:function(e){return e.activeAnnotationFetches>0},isSavingAnnotation:function(e,t){return!!t.$tag&&e.activeAnnotationSaveRequests.includes(t.$tag)},annotationResultCount:function(e){return e.annotationResultCount}}});var ei=Symbol("NOT_FOUND");var ti=e=>Array.isArray(e)?e:[e];function ni(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const n=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}var ri=(e,t)=>e===t;var oi="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}},ii=0,ai=1;function si(){return{s:ii,v:void 0,o:null,p:null}}function li(e,t={}){let n=si();const{resultEqualityCheck:r}=t
134
+ ;let o,i=0;function a(){let t=n;const{length:a}=arguments;for(let e=0,n=a;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(n);void 0===r?(t=si(),e.set(n,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(n);void 0===r?(t=si(),e.set(n,t)):t=r}}const s=t;let l;if(t.s===ai)l=t.v;else if(l=e.apply(null,arguments),i++,r){const e=o?.deref?.()??o;null!=e&&r(e,l)&&(l=e,0!==i&&i--);o="object"==typeof l&&null!==l||"function"==typeof l?new oi(l):l}return s.s=ai,s.v=l,l}return a.clearCache=()=>{n=si(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function ci(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,i={},a=e.pop();"object"==typeof a&&(i=a,a=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)
135
+ }(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const s={...n,...i},{memoize:l,memoizeOptions:c=[],argsMemoize:u=li,argsMemoizeOptions:d=[]}=s,h=ti(c),m=ti(d),p=ni(e),f=l((function(){return r++,a.apply(null,arguments)}),...h),g=u((function(){o++;const e=function(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}(p,arguments);return t=f.apply(null,e),t}),...m);return Object.assign(g,{resultFunc:a,memoizedResultFunc:f,dependencies:p,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:l,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var ui=ci(li),di=Object.assign(((e,t=ui)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e)
136
+ ;const n=Object.keys(e);return t(n.map((t=>e[t])),((...e)=>e.reduce(((e,t,r)=>(e[n[r]]=t,e)),{})))}),{withTypes:()=>di});function hi(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function mi(e){if(!e)return null;const t=e.match(/^acct:([^@]+)@(.+)/);return t?{username:t[1],provider:t[2]}:null}function pi(e){const t=mi(e);return t?t.username:""}function fi(e,t){const n=mi(e);return!!n&&n.provider!==t}function gi(e){const t=e.uri;let n;try{n=new URL(t).hostname}catch{n=""}"localhost"===n&&(n="");let r=n;return e.document&&e.document.title&&(r=e.document.title[0]),{uri:t,domain:n,title:r}}function vi(e){let t=e.uri;return t&&0!==t.indexOf("http://")&&0!==t.indexOf("https://")&&(t=null),e.links&&e.links.incontext&&(t=e.links.incontext),t}function bi(e){const t=gi(e);let n="";if(t.uri&&0===t.uri.indexOf("file://")&&t.title){const e=t.uri.split("/"),r=e[e.length-1];r&&(n=r)}else t.domain&&t.domain!==t.title&&(n=t.domain);return n}function yi(e){let t=gi(e).title;return t.length>30&&(t=t.slice(0,30)+"…"),t}
137
+ function _i(e){return(e.references||[]).length>0}function wi(e){return!!e.id}function xi(e){return!e.id}function ki(e){let t=!1;return e.permissions?(e.permissions.read.forEach((e=>{const n=e.split(":");2===n.length&&"group"===n[0]&&(t=!0)})),t):t}function Ni(e){return!!(e.target&&e.target.length>0&&e.target[0].selector)}function Si(e){return Ni(e)&&void 0===e.$orphan&&!e.$anchorTimeout}function Ai(e){return!!e.hidden}function Ei(e){return!(!("$highlight"in e)||!e.$highlight)||!xi(e)&&!(Ci(e)||_i(e)||e.hidden||e.text||e.tags&&e.tags.length)}function Ti(e){return Ni(e)&&!0===e.$orphan}function Ci(e){return!Ni(e)&&!_i(e)}function Mi(e){return!(!Ni(e)||Ti(e))}function Ii(e){return _i(e)?"Reply":Ei(e)?"Highlight":Ci(e)?"Page note":"Annotation"}function zi(e){const t=e.target[0];if(!t?.selector)return{};let n,r,o,i;for(const e of t.selector)switch(e.type){case"TextPositionSelector":r=e.start;break;case"EPUBContentSelector":n=e.cfi;break;case"PageSelector":o=e.index;break;case"ShapeSelector":i=Li(e)}return{cfi:n,
138
+ charOffset:r,pageIndex:o,top:i}}function Li(e){const t=e.view?.top??0;switch(e.shape.type){case"rect":return Math.abs(t-e.shape.top);case"point":return Math.abs(t-e.shape.y);default:return}}function Oi(e){if(0===e.target.length)return null;const t=e.target[0];if(!t.selector)return null;const n=t.selector.find((e=>"TextQuoteSelector"===e.type));return n?n.exact:null}function Ri(e){const t=e.target[0]?.selector?.find((e=>"EPUBContentSelector"===e.type));return t?.cfi}function Pi(e){const t=e.target[0]?.selector?.find((e=>"PageSelector"===e.type));return t?.label}function Di(e,t){return e.reduce(((e,n)=>t(n)?e+1:e),0)}function Fi(e){const t={};return e.forEach((e=>t[e]=!0)),t}function Hi(e){return Object.keys(e).filter((t=>!0===e[t]))}function Bi(e){return Object.entries(e)}const $i={CHANGE_ROUTE:(e,{name:t,params:n})=>({name:t,params:n})};const ji=Xo({name:null,params:{}},{namespace:"route",reducers:$i,actionCreators:{changeRoute:function(e,t={}){return Yo(0,"CHANGE_ROUTE",{name:e,params:t})}},selectors:{
139
+ route:function(e){return e.name},routeParams:function(e){return e.params}}}),qi={features:{},preferences:{},userid:null};const Ui={UPDATE_PROFILE:(e,t)=>({profile:{...t.profile}})};const Gi=ui((e=>e.profile),(e=>e.features),((e,t)=>{const n={...e.features};for(const e of t)n[e]=!0;return n}));const Vi=Xo((function(e){return{defaultAuthority:e?.authDomain??"",features:e.features??[],profile:qi}}),{namespace:"session",reducers:Ui,actionCreators:{updateProfile:function(e){return Yo(0,"UPDATE_PROFILE",{profile:e})}},selectors:{defaultAuthority:function(e){return e.defaultAuthority},features:Gi,hasFetchedProfile:function(e){return e.profile!==qi},isFeatureEnabled:function(e,t){return Boolean(Gi(e)[t])},isLoggedIn:function(e){return null!==e.profile.userid},profile:function(e){return e.profile}}});function Wi(e,t){return e.find((e=>e.id===t))}function Ki(e,t){return e.find((e=>e.$tag===t))}function Yi(e,t,n){let r=e.$orphan;e.id||(r=!1);let o="other-content"
140
+ ;return e.user===n&&(o=Ei(e)?"user-highlights":"user-annotations"),Object.assign({},e,{$anchorTimeout:!1,$cluster:o,$tag:e.$tag||t,$orphan:r})}const Xi={ADD_ANNOTATIONS(e,t){const n=new Set,r=new Set,o=[],i=[],a=[];let s=e.nextTag;for(const i of t.annotations){let l;i.id&&(l=Wi(e.annotations,i.id)),!l&&i.$tag&&(l=Ki(e.annotations,i.$tag)),l?(a.push(Object.assign({},l,i)),i.id&&n.add(i.id),l.$tag&&r.add(l.$tag)):(o.push(Yi(i,"t"+s,t.currentUserId)),++s)}for(const t of e.annotations)n.has(t.id)||r.has(t.$tag)||i.push(t);return{annotations:o.concat(a).concat(i),nextTag:s}},CLEAR_ANNOTATIONS:()=>({annotations:[],highlighted:{},hovered:{}}),HOVER_ANNOTATIONS:(e,t)=>({hovered:Fi(t.tags)}),HIDE_ANNOTATION:(e,t)=>({annotations:e.annotations.map((e=>e.id!==t.id?e:{...e,hidden:!0}))}),HIGHLIGHT_ANNOTATIONS:(e,t)=>({highlighted:t.highlighted}),REMOVE_ANNOTATIONS:(e,t)=>({annotations:[...t.remainingAnnotations]}),UNHIDE_ANNOTATION:(e,t)=>({annotations:e.annotations.map((e=>e.id!==t.id?e:Object.assign({},e,{hidden:!1})))
141
+ }),UPDATE_ANCHOR_STATUS:(e,t)=>({annotations:e.annotations.map((e=>{if(!hi(t.statusUpdates,e.$tag))return e;const n=t.statusUpdates[e.$tag];return"timeout"===n?Object.assign({},e,{$anchorTimeout:!0}):Object.assign({},e,{$orphan:"orphan"===n})}))}),UPDATE_FLAG_STATUS:(e,t)=>({annotations:e.annotations.map((e=>{if(e.id&&e.id===t.id){if(e.flagged===t.isFlagged)return e;const n=Object.assign({},e,{flagged:t.isFlagged});if(n.moderation){const e=t.isFlagged?1:-1;n.moderation={...n.moderation,flagCount:n.moderation.flagCount+e}}return n}return e}))})};function Zi(e){return(t,n)=>{const r=function(e,t){const n=new Set,r=new Set;for(const e of t)e.id&&n.add(e.id),e.$tag&&r.add(e.$tag);return e.filter((e=>!(e.id&&n.has(e.id)||e.$tag&&r.has(e.$tag))))}(n().annotations.annotations,e);t(Yo(0,"REMOVE_ANNOTATIONS",{annotationsToRemove:e,remainingAnnotations:r}))}}function Ji(e){return Yo(0,"UPDATE_ANCHOR_STATUS",{statusUpdates:e})}const Qi=ui((e=>e.annotations),(e=>Di(e,Mi)))
142
+ ;const ea=ui((e=>e.hovered),(e=>Hi(e))),ta=ui((e=>e.highlighted),(e=>Hi(e)));const na=ui((e=>e.annotations),(e=>e.some(Si))),ra=ui((e=>e.annotations),(e=>e.filter((e=>xi(e)&&!Ei(e))))),oa=ui((e=>e.annotations),(e=>e.filter((e=>xi(e)&&Ei(e))))),ia=ui((e=>e.annotations),(e=>Di(e,Ci))),aa=ui((e=>e.annotations),(e=>Di(e,Ti))),sa=ui((e=>e.annotations),(e=>e.filter((e=>wi(e))))),la=ui((e=>e.annotations),(e=>{const t=new Map;return e.forEach((e=>{const{user:n}=e;if(t.has(n))return;const r=pi(n),o=e.user_info?.display_name??null;t.set(n,{userid:n,username:r,displayName:o})})),[...t.values()].sort(((e,t)=>{const n=e.username,r=t.username;return n.localeCompare(r,void 0,{sensitivity:"base"})}))})),ca=ui((e=>e.annotations),(e=>{const t=e.flatMap((e=>e.mentions??[])),n=new Set;return t.filter((({userid:e})=>{const t=n.has(e);return n.add(e),!t})).map((({display_name:e,...t})=>({displayName:e,...t})))})),ua=Xo({annotations:[],highlighted:{},hovered:{},nextTag:1},{namespace:"annotations",reducers:Xi,actionCreators:{
143
+ addAnnotations:function(e){return function(t,n){const r=e.filter((e=>!e.id||!Wi(n().annotations.annotations,e.id))),o=Vi.selectors.profile(n().session);if(t(Yo(0,"ADD_ANNOTATIONS",{annotations:e,currentAnnotationCount:n().annotations.annotations.length,currentUserId:o.userid})),"sidebar"!==ji.selectors.route(n().route))return;const i=r.filter(Si).map((e=>e.id));i.length>0&&setTimeout((()=>{const e=n().annotations.annotations,r=i.map((t=>t?Wi(e,t):null)).filter((e=>e&&Si(e))).reduce(((e,t)=>(e[t.$tag]="timeout",e)),{});t(Ji(r))}),500)}},clearAnnotations:function(){return Yo(0,"CLEAR_ANNOTATIONS",void 0)},hoverAnnotations:function(e){return Yo(0,"HOVER_ANNOTATIONS",{tags:e})},hideAnnotation:function(e){return Yo(0,"HIDE_ANNOTATION",{id:e})},highlightAnnotations:function(e){return Yo(0,"HIGHLIGHT_ANNOTATIONS",{highlighted:Fi(e)})},removeAnnotations:Zi,unhideAnnotation:function(e){return Yo(0,"UNHIDE_ANNOTATION",{id:e})},updateAnchorStatus:Ji,updateFlagStatus:function(e,t){return Yo(0,"UPDATE_FLAG_STATUS",{id:e,
144
+ isFlagged:t})}},selectors:{allAnnotations:function(e){return e.annotations},annotationCount:Qi,annotationExists:function(e,t){return e.annotations.some((e=>e.id===t))},findAnnotationByID:function(e,t){return Wi(e.annotations,t)},findIDsForTags:function(e,t){const n=[];for(const r of t){const t=Ki(e.annotations,r);t&&t.id&&n.push(t.id)}return n},hoveredAnnotations:ea,highlightedAnnotations:ta,isAnnotationHighlighted:function(e,t){return!!t?.id&&!0===e.highlighted[t.id]},isAnnotationHovered:function(e,t){return!0===e.hovered[t]},isWaitingToAnchorAnnotations:na,newAnnotations:ra,newHighlights:oa,noteCount:ia,orphanCount:aa,savedAnnotations:sa,usersWhoAnnotated:la,usersWhoWereMentioned:ca}}),da={SET_DEFAULT:(e,t)=>({[t.defaultKey]:t.value})};const ha=Xo({annotationPrivacy:null,focusedGroup:null},{namespace:"defaults",reducers:da,actionCreators:{setDefault:function(e,t){return Yo(0,"SET_DEFAULT",{defaultKey:e,value:t})}},selectors:{getDefault:function(e,t){return e[t]},getDefaults:function(e){return e}}})
145
+ ;const ma={UPDATE_DIRECT_LINKED_GROUP_FETCH_FAILED:(e,t)=>({directLinkedGroupFetchFailed:t.directLinkedGroupFetchFailed}),UPDATE_DIRECT_LINKED_GROUP_ID:(e,t)=>({directLinkedGroupId:t.directLinkedGroupId}),UPDATE_DIRECT_LINKED_ANNOTATION_ID:(e,t)=>({directLinkedAnnotationId:t.directLinkedAnnotationId}),CLEAR_DIRECT_LINKED_IDS:()=>({directLinkedAnnotationId:null,directLinkedGroupId:null}),CLEAR_SELECTION:()=>({directLinkedAnnotationId:null,directLinkedGroupId:null,directLinkedGroupFetchFailed:!1})};const pa=Xo((function(e){return{directLinkedGroupId:e.group||null,directLinkedAnnotationId:e.annotations||null,directLinkedGroupFetchFailed:!1}}),{namespace:"directLinked",reducers:ma,actionCreators:{setDirectLinkedGroupFetchFailed:function(){return Yo(0,"UPDATE_DIRECT_LINKED_GROUP_FETCH_FAILED",{directLinkedGroupFetchFailed:!0})},setDirectLinkedGroupId:function(e){return Yo(0,"UPDATE_DIRECT_LINKED_GROUP_ID",{directLinkedGroupId:e})},setDirectLinkedAnnotationId:function(e){
146
+ return Yo(0,"UPDATE_DIRECT_LINKED_ANNOTATION_ID",{directLinkedAnnotationId:e})},clearDirectLinkedGroupFetchFailed:function(){return Yo(0,"UPDATE_DIRECT_LINKED_GROUP_FETCH_FAILED",{directLinkedGroupFetchFailed:!1})},clearDirectLinkedIds:function(){return Yo(0,"CLEAR_DIRECT_LINKED_IDS",void 0)}},selectors:{directLinkedAnnotationId:function(e){return e.directLinkedAnnotationId},directLinkedGroupFetchFailed:function(e){return e.directLinkedGroupFetchFailed},directLinkedGroupId:function(e){return e.directLinkedGroupId}}});class fa{constructor(e,t){this.annotation={id:e.id,$tag:e.$tag},this.isPrivate=t.isPrivate,this.tags=t.tags,this.text=t.text}match(e){return this.annotation.$tag&&e.$tag===this.annotation.$tag||this.annotation.id&&e.id===this.annotation.id}isEmpty(){return!this.text&&0===this.tags.length}}const ga={DISCARD_ALL_DRAFTS:()=>({drafts:[]}),REMOVE_DRAFT:(e,t)=>({drafts:e.drafts.filter((e=>!e.match(t.annotation)))}),UPDATE_DRAFT(e,t){const n=e.drafts.filter((e=>!e.match(t.draft.annotation)))
147
+ ;return n.push(t.draft),{drafts:n}}};function va(e){return Yo(0,"REMOVE_DRAFT",{annotation:e})}function ba(e,t){const n=e.drafts;for(let e=0;e<n.length;e++){const r=n[e];if(r.match(t))return r}return null}function ya(e,t){const n=ba(e,t);return n?n.isEmpty()?null:n:null}const _a=ui((e=>e.drafts),(e=>e.filter((e=>!e.annotation.id)).map((e=>e.annotation)))),wa=Xo({drafts:[]},{namespace:"drafts",reducers:ga,actionCreators:{createDraft:function(e,t){return Yo(0,"UPDATE_DRAFT",{draft:new fa(e,t)})},deleteNewAndEmptyDrafts:function(){return(e,t)=>{const n=t().drafts.drafts.filter((e=>!e.annotation.id&&!ya(t().drafts,e.annotation))).map((t=>(e(va(t.annotation)),t.annotation)));e(Zi(n))}},discardAllDrafts:function(){return Yo(0,"DISCARD_ALL_DRAFTS",void 0)},removeDraft:va},selectors:{countDrafts:function(e){return e.drafts.length},getDraft:ba,getDraftIfNotEmpty:ya,unsavedAnnotations:_a}});function xa(e){const t={},n=e.user,r=n?.username||n?.userid||"";return n&&r&&(t.user={value:r,display:n.displayName||r}),
148
+ e.pages&&(t.page={value:e.pages,display:e.pages}),e.cfi&&(t.cfi={value:e.cfi.range,display:e.cfi.label}),t}const ka={CHANGE_FOCUS_MODE_USER(e,t){const n={...e.focusFilters},{user:r}=xa({user:t.user}),o=new Set(e.focusActive);return void 0!==r?(o.add("user"),n.user=r):(o.delete("user"),delete n.user),{focusActive:o,focusFilters:n}},SET_FILTER(e,t){const n={...e.filters,[t.filterName]:t.filterOption};return""===t.filterOption?.value&&delete n[t.filterName],{filters:n}},SET_FILTER_QUERY:(e,t)=>({query:t.query}),SET_FOCUS_MODE(e,t){let n=new Set(e.focusActive);if(void 0!==t.key){t.active??!n.has(t.key)?n.add(t.key):n.delete(t.key)}else{n=t.active??0===n.size?new Set(Object.keys(e.focusFilters)):new Set}return{focusActive:n}}};const Na=ui((e=>e.focusActive),(e=>e.focusFilters),((e,t)=>({active:e.size>0,configured:Object.values(t??{}).some((e=>void 0!==e)),displayName:t?.user?.display??"",contentRange:t?.cfi?.display,pageRange:t?.page?.display
149
+ }))),Sa=ui((e=>e.filters),(e=>e.focusActive),(e=>e.focusFilters),((e,t,n)=>{const r={};for(const e of t){const t=n[e];t&&(r[e]=t)}return Object.assign(r,e),r}));const Aa=ui((e=>Sa(e)),(e=>{const t={};for(const[n,r]of Object.entries(e))r&&(t[n]=r.value);return t}));const Ea=Xo((function(e){const t=xa(e.focus||{});return{filters:{},focusActive:new Set(Object.keys(t)),focusFilters:t,query:e.query||null}}),{namespace:"filters",reducers:ka,actionCreators:{changeFocusModeUser:function(e){return Yo(0,"CHANGE_FOCUS_MODE_USER",{user:e})},setFilter:function(e,t){return(n,r)=>{r().filters.focusFilters?.[e]&&n(Yo(0,"SET_FOCUS_MODE",{active:!1,key:e})),n(Yo(0,"SET_FILTER",{filterName:e,filterOption:t}))}},setFilterQuery:function(e){return Yo(0,"SET_FILTER_QUERY",{query:e})},toggleFocusMode:function({active:e,key:t}={}){return Yo(0,"SET_FOCUS_MODE",{active:e,key:t})}},selectors:{filterQuery:function(e){return e.query},focusState:Na,getFilter:function(e,t){return Sa(e)[t]},getFilters:Sa,getFilterValues:Aa,
150
+ getFocusActive:function(e){return e.focusActive},getFocusFilters:function(e){return e.focusFilters},hasAppliedFilter:function(e){const t=Sa(e);return Boolean(e.query||Object.keys(t).length)}}});var Ta,Ca;var Ma=t(Ca?Ta:(Ca=1,Ta=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var c=i[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(o=n?n.call(r,u,d,c):void 0)||void 0===o&&u!==d)return!1}return!0}));const Ia={CONNECT_FRAME(e,t){const n=e.frames.findIndex((e=>e.id===t.frame.id)),r=[...e.frames];return-1!==n?r[n]=t.frame:r.push(t.frame),{frames:r}},DESTROY_FRAME(e,t){const n=e.frames.filter((e=>e!==t.frame));return{frames:n}},UPDATE_FRAME_ANNOTATION_FETCH_STATUS:(e,t)=>({frames:e.frames.map((e=>e.uri&&e.uri===t.uri?Object.assign({},e,{
151
+ isAnnotationFetchComplete:t.isAnnotationFetchComplete}):e))}),SET_CONTENT_INFO:(e,t)=>({contentInfo:t.info})};const za=e=>e.find((e=>!e.id))||null,La=ui((e=>e.frames),za),Oa=ui((e=>e.frames),(e=>{const t=za(e);return t||(e.length>0?e[0]:null)}));const Ra=ci((function(e,t){const n="object"==typeof t?t:{equalityCheck:t},{equalityCheck:r=ri,maxSize:o=1,resultEqualityCheck:i}=n,a=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;const{length:r}=t;for(let o=0;o<r;o++)if(!e(t[o],n[o]))return!1;return!0}}(r);let s=0;const l=o<=1?function(e){let t;return{get:n=>t&&e(t.key,n)?t.value:ei,put(e,n){t={key:e,value:n}},getEntries:()=>t?[t]:[],clear(){t=void 0}}}(a):function(e,t){let n=[];function r(e){const r=n.findIndex((n=>t(e,n.key)));if(r>-1){const e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return ei}return{get:r,put:function(t,o){r(t)===ei&&(n.unshift({key:t,value:o}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(o,a);function c(){
152
+ let t=l.get(arguments);if(t===ei){if(t=e.apply(null,arguments),s++,i){const e=l.getEntries().find((e=>i(e.value,t)));e&&(t=e.value,0!==s&&s--)}l.put(arguments,t)}return t}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}),Ma),Pa=Ra((e=>e.frames.reduce(((e,t)=>e.concat(function(e){let t=[e.uri];return e.metadata&&e.metadata.documentFingerprint&&(t=e.metadata.link.map((e=>e.href))),e.metadata&&e.metadata.link&&e.metadata.link.forEach((e=>{e.href.startsWith("doi:")&&t.push(e.href)})),t}(t))),[])),(e=>e),{devModeChecks:{identityFunctionCheck:"never"}});const Da=Xo({frames:[],contentInfo:null},{namespace:"frames",reducers:Ia,actionCreators:{connectFrame:function(e){return Yo(0,"CONNECT_FRAME",{frame:e})},destroyFrame:function(e){return Yo(0,"DESTROY_FRAME",{frame:e})},setContentInfo:function(e){return Yo(0,"SET_CONTENT_INFO",{info:e})},updateFrameAnnotationFetchStatus:function(e,t){return Yo(0,"UPDATE_FRAME_ANNOTATION_FETCH_STATUS",{uri:e,
153
+ isAnnotationFetchComplete:t})}},selectors:{getContentInfo:function(e){return e.contentInfo},frames:function(e){return e.frames},mainFrame:La,defaultContentFrame:Oa,searchUris:Pa}}),Fa={FILTER_GROUPS(e,t){if(!t.filteredGroupIds?.length)return{filteredGroupIds:null};const n=e.groups.filter((e=>t.filteredGroupIds.includes(e.id)));if(!n.length)return{filteredGroupIds:null};let r=e.focusedGroupId;return r&&t.filteredGroupIds.includes(r)||(r=n[0].id),{filteredGroupIds:t.filteredGroupIds,focusedGroupId:r}},FOCUS_GROUP(e,t){const n=e.groups.find((e=>e.id===t.id));if(!n)return console.error(`Attempted to focus group ${t.id} which is not loaded`),{};return e.focusedGroupId===t.id?{focusedGroupId:t.id}:{focusedGroupId:t.id,focusedGroupMembers:{status:"not-loaded"}}},LOAD_GROUPS(e,t){const n=t.groups;let r=e.focusedGroupId;return null!==e.focusedGroupId&&n.find((t=>t.id===e.focusedGroupId))||(r=n.length>0?n[0].id:null),{focusedGroupId:r,groups:t.groups}},LOAD_FOCUSED_GROUP_MEMBERS(e,t){
154
+ if(!e.focusedGroupId)throw new Error("A group needs to be focused before loading its members");const{focusedGroupMembers:n}=t;return{focusedGroupMembers:n}},CLEAR_GROUPS:()=>({filteredGroupIds:null,focusedGroupId:null,groups:[],focusedGroupMembers:{status:"not-loaded"}})};function Ha(e){return e.filteredGroupIds?e.groups.filter((t=>e.filteredGroupIds?.includes(t.id))):e.groups}function Ba(e,t){return e.groups.find((e=>e.id===t))}const $a=ui((e=>Ha(e)),(e=>e.filter((e=>!e.isMember&&e.isScopedToUri)))),ja=ui((e=>Ha(e)),(e=>e.filter((e=>e.isScopedToUri)))),qa=ui((e=>Ha(e.groups)),(e=>Vi.selectors.isLoggedIn(e.session)),((e,t)=>t?e.filter((e=>e.isMember)):[])),Ua=ui((e=>Ha(e.groups)),(e=>qa(e)),(e=>$a(e.groups)),((e,t,n)=>e.filter((e=>!t.includes(e)&&!n.includes(e))))),Ga=Xo({filteredGroupIds:null,groups:[],focusedGroupId:null,focusedGroupMembers:{status:"not-loaded"}},{namespace:"groups",reducers:Fa,actionCreators:{filterGroups:function(e){return Yo(0,"FILTER_GROUPS",{filteredGroupIds:e})},
155
+ focusGroup:function(e){return Yo(0,"FOCUS_GROUP",{id:e})},loadGroups:function(e){return Yo(0,"LOAD_GROUPS",{groups:e})},startLoadingFocusedGroupMembers:function(){return Yo(0,"LOAD_FOCUSED_GROUP_MEMBERS",{focusedGroupMembers:{status:"loading"}})},loadFocusedGroupMembers:function(e){return Yo(0,"LOAD_FOCUSED_GROUP_MEMBERS",{focusedGroupMembers:null===e?{status:"not-loaded"}:{status:"loaded",members:e}})},clearGroups:function(){return Yo(0,"CLEAR_GROUPS",void 0)}},selectors:{allGroups:function(e){return e.groups},filteredGroups:Ha,filteredGroupIds:function(e){return e.filteredGroupIds},focusedGroup:function(e){return e.focusedGroupId?Ba(e,e.focusedGroupId)??null:null},focusedGroupId:function(e){return e.focusedGroupId},getFocusedGroupMembers:function(e){return e.focusedGroupMembers},getFeaturedGroups:$a,getGroup:Ba,getInScopeGroups:ja},rootSelectors:{getCurrentlyViewingGroups:Ua,getMyGroups:qa}});function Va(e,t){const n={};for(const r in t)if(hi(t,r)){const o=t[r],i=":"+r
156
+ ;-1!==e.indexOf(i)?e=e.replace(i,encodeURIComponent(String(o))):n[r]=o}return{url:e,unusedParams:n}}const Wa={UPDATE_LINKS:(e,t)=>({...t.links})};const Ka=Xo(null,{namespace:"links",reducers:Wa,actionCreators:{updateLinks:function(e){return Yo(0,"UPDATE_LINKS",{links:e})}},selectors:{getLink:function(e,t,n={}){if(!e)return"";const r=e[t];if(!r)throw new Error(`Unknown link "${t}"`);const{url:o,unusedParams:i}=Va(r,n),a=Object.keys(i);if(a.length>0)throw new Error(`Unused parameters: ${a.join(", ")}`);return o}}}),Ya={RECEIVE_REAL_TIME_UPDATES:(e,t)=>({pendingUpdates:{...t.pendingUpdates},pendingDeletions:{...t.pendingDeletions}}),CLEAR_PENDING_UPDATES:()=>({pendingUpdates:{},pendingDeletions:{}}),ADD_ANNOTATIONS(e,{annotations:t}){const n={...e.pendingUpdates};for(const e of t)e.id&&delete n[e.id];return{pendingUpdates:n}},REMOVE_ANNOTATIONS(e,{annotationsToRemove:t}){const n={...e.pendingUpdates},r={...e.pendingDeletions};for(const e of t)e.id&&(delete n[e.id],delete r[e.id]);return{pendingUpdates:n,
157
+ pendingDeletions:r}},FOCUS_GROUP:()=>({pendingUpdates:{},pendingDeletions:{}})};const Xa=ui((e=>e.pendingUpdates),(e=>e.pendingDeletions),((e,t)=>Object.keys(e).length+Object.keys(t).length));const Za=ui((e=>e.realTimeUpdates.pendingUpdates),(e=>Vi.selectors.profile(e.session)),(e=>ua.selectors.allAnnotations(e.annotations)),((e,{userid:t},n)=>{const r=Object.values(e),o=e=>!!e?.some((e=>e.userid===t));return r.filter((({mentions:e,id:t})=>{const r=o(e),i=n.find((e=>e.id===t));return i?r&&!o(i.mentions):r})).length})),Ja=Xo({pendingUpdates:{},pendingDeletions:{}},{namespace:"realTimeUpdates",reducers:Ya,actionCreators:{receiveRealTimeUpdates:function({updatedAnnotations:e=[],deletedAnnotations:t=[]}){return(n,r)=>{const o={...r().realTimeUpdates.pendingUpdates},i={...r().realTimeUpdates.pendingDeletions};e.forEach((e=>{const t=r().groups,n=r().route;e.group!==Ga.selectors.focusedGroupId(t)&&"sidebar"===ji.selectors.route(n)||(o[e.id]=e)})),t.forEach((e=>{const t=e.id;delete o[t];const n=r().annotations
158
+ ;ua.selectors.annotationExists(n,t)&&(i[t]=!0)})),n(Yo(0,"RECEIVE_REAL_TIME_UPDATES",{pendingUpdates:o,pendingDeletions:i}))}},clearPendingUpdates:function(){return Yo(0,"CLEAR_PENDING_UPDATES",void 0)}},selectors:{hasPendingDeletion:function(e,t){return hi(e.pendingDeletions,t)},hasPendingUpdates:function(e){return Object.keys(e.pendingUpdates).length>0},hasPendingUpdatesOrDeletions:function(e){return Xa(e)>0},pendingDeletions:function(e){return e.pendingDeletions},pendingUpdates:function(e){return e.pendingUpdates},pendingUpdateCount:Xa},rootSelectors:{pendingMentionCount:Za}}),Qa={annotation:"location",note:"oldest",orphan:"location"};function es(e){const t={};return e.annotations&&!e.query&&(t[e.annotations]=!0),t}function ts(e,t){return t===e?{}:{selectedTab:e,sortKey:Qa[e]}}const ns={CLEAR_ANNOTATION_FOCUS_REQUEST:()=>({focusRequest:null}),CLEAR_SELECTION:()=>({forcedVisible:{},selected:{}}),SELECT_ANNOTATIONS:(e,t)=>({selected:t.selection}),SELECT_TAB:(e,t)=>ts(t.tab,e.selectedTab),SET_EXPANDED(e,t){
159
+ const n={...e.expanded};return n[t.id]=t.expanded,{expanded:n}},SET_ANNOTATION_FOCUS_REQUEST:(e,t)=>({focusRequest:t.id}),SET_FORCED_VISIBLE:(e,t)=>({forcedVisible:{...e.forcedVisible,[t.id]:t.visible}}),SET_SORT_KEY:(e,t)=>({sortKey:t.key}),TOGGLE_SELECTED_ANNOTATIONS(e,t){const n={...e.selected};return t.toggleIds.forEach((e=>{n[e]=!n[e]})),{selected:n}},ADD_ANNOTATIONS(e,t){const n=t.annotations.filter((e=>!_i(e))),r=Di(t.annotations,Ci)===n.length;return 0===t.currentAnnotationCount&&r?ts("note",e.selectedTab):{}},CHANGE_FOCUS_MODE_USER:()=>({forcedVisible:{},selected:{}}),SET_FILTER:()=>({forcedVisible:{},selected:{},expanded:{}}),SET_FILTER_QUERY:()=>({forcedVisible:{},selected:{},expanded:{}}),SET_FOCUS_MODE:()=>({forcedVisible:{},selected:{}}),REMOVE_ANNOTATIONS(e,t){let n=e.selectedTab;"orphan"===n&&0===Di(t.remainingAnnotations,Ti)&&(n="annotation");const r=e=>(t.annotationsToRemove.forEach((t=>{t.id&&delete e[t.id],t.$tag&&delete e[t.$tag]})),e);return{...ts(n,e.selectedTab),expanded:r({
160
+ ...e.expanded}),forcedVisible:r({...e.forcedVisible}),selected:r({...e.selected})}}};function rs(){return Yo(0,"CLEAR_SELECTION",void 0)}function os(e){return e.expanded}const is=ui((e=>e.forcedVisible),(e=>Hi(e))),as=ui((e=>e.selected),(e=>Hi(e).length>0)),ss=ui((e=>e.selected),(e=>Hi(e)));function ls(e){return e.selectedTab}const cs=ui((e=>e),(e=>({expanded:os(e),forcedVisible:is(e),selected:ss(e),sortKey:us(e),selectedTab:ls(e)})));function us(e){return e.sortKey}const ds=ui((e=>e.selectedTab),(e=>{const t=["newest","oldest"];return"note"!==e&&t.push("location"),t})),hs=Xo((function(e){return{selected:es(e),expanded:es(e),forcedVisible:{},selectedTab:"annotation",sortKey:Qa.annotation,focusRequest:null}}),{namespace:"selection",reducers:ns,actionCreators:{clearAnnotationFocusRequest:function(){return Yo(0,"CLEAR_ANNOTATION_FOCUS_REQUEST",void 0)},clearSelection:rs,selectAnnotations:function(e){return t=>{t(rs()),t(Yo(0,"SELECT_ANNOTATIONS",{selection:Fi(e)}))}},selectTab:function(e){
161
+ return Yo(0,"SELECT_TAB",{tab:e})},setAnnotationFocusRequest:function(e){return Yo(0,"SET_ANNOTATION_FOCUS_REQUEST",{id:e})},setExpanded:function(e,t){return Yo(0,"SET_EXPANDED",{id:e,expanded:t})},setForcedVisible:function(e,t){return Yo(0,"SET_FORCED_VISIBLE",{id:e,visible:t})},setSortKey:function(e){return Yo(0,"SET_SORT_KEY",{key:e})},toggleSelectedAnnotations:function(e){return Yo(0,"TOGGLE_SELECTED_ANNOTATIONS",{toggleIds:e})}},selectors:{expandedMap:os,annotationFocusRequest:function(e){return e.focusRequest},forcedVisibleThreads:is,hasSelectedAnnotations:as,selectedAnnotations:ss,selectedTab:ls,selectionState:cs,sortKey:us,sortKeys:ds}}),ms={OPEN_SIDEBAR_PANEL:(e,t)=>({activePanelName:t.panelName}),CLOSE_SIDEBAR_PANEL(e,t){let n=e.activePanelName;return t.panelName===n&&(n=null),{activePanelName:n}},TOGGLE_SIDEBAR_PANEL(e,t){let n;const r=e.activePanelName===t.panelName,o=void 0!==t.panelState?t.panelState:!r;return n=o?t.panelName:r&&!o?null:e.activePanelName,{activePanelName:n}}};const ps=Xo({
162
+ activePanelName:null},{namespace:"sidebarPanels",reducers:ms,actionCreators:{openSidebarPanel:function(e){return Yo(0,"OPEN_SIDEBAR_PANEL",{panelName:e})},closeSidebarPanel:function(e){return Yo(0,"CLOSE_SIDEBAR_PANEL",{panelName:e})},toggleSidebarPanel:function(e,t){return Yo(0,"TOGGLE_SIDEBAR_PANEL",{panelName:e,panelState:t})}},selectors:{isSidebarPanelOpen:function(e,t){return e.activePanelName===t}}}),fs={ADD_MESSAGE:(e,t)=>({messages:e.messages.concat({...t.message})}),REMOVE_MESSAGE:(e,t)=>({messages:e.messages.filter((e=>e.id!==t.id))})};const gs=Xo({messages:[]},{namespace:"toastMessages",reducers:fs,actionCreators:{addToastMessage:function(e){return Yo(0,"ADD_MESSAGE",{message:e})},removeToastMessage:function(e){return Yo(0,"REMOVE_MESSAGE",{id:e})}},selectors:{getToastMessage:function(e,t){return e.messages.find((e=>e.id===t))},getToastMessages:function(e){return e.messages},hasToastMessage:function(e,t,n){return e.messages.some((e=>e.type===t&&e.message===n))}}}),vs={
163
+ SET_SIDEBAR_OPENED:(e,t)=>!0===t.opened?{sidebarHasOpened:!0}:{}};const bs=Xo({sidebarHasOpened:!1},{namespace:"viewer",reducers:vs,actionCreators:{setSidebarOpened:function(e){return Yo(0,"SET_SIDEBAR_OPENED",{opened:e})}},selectors:{hasSidebarOpened:function(e){return e.sidebarHasOpened}}});class ys{constructor(e,t,n,r){this.name=e,this.method=t,this.args=n,this.result=r}matches(e,t){return this.name===e&&this.args.every(((e,n)=>t[n]===e))}}function _s(e){return Ko([Qo,ua,ha,pa,wa,Ea,Da,Ka,Ga,Ja,ji,hs,Vi,ps,gs,bs],[e],[Zo])}function ws(){var e;return function(e){const[,t]=le((e=>e+1),0),n=de([]).current,r=de(null);if(!r.current){const t=new Map,o=(e,r)=>{const o=e[r];if("function"!=typeof o)return o;let i=t.get(r);return i||(i=(...t)=>{const i=n.find((e=>e.matches(r,t)));if(i)return i.result;const a=e.getState(),s=o.apply(e,t);return a===e.getState()&&n.push(new ys(r,o,t,s)),s},t.set(r,i),i)};r.current=new Proxy(e,{get:o})}return ue((()=>e.subscribe((()=>{
164
+ n.find((t=>t.method.apply(e,t.args)!==t.result))&&(n.splice(0,n.length),t(0))}))),[n,e]),r.current}((e="store",pe(Oo).get(e)))}function xs({errorType:e,onLoginRequest:t,showClearSelection:n=!1}){const r=ws(),o=r.isLoggedIn();return et("div",{className:"mb-4",children:et(Pr,{icon:sr,title:"annotation"===e?"Annotation unavailable":"Group unavailable",children:[et("p",{children:o?"group"===e?"The current URL links to a group, but that group cannot be found,\n or you do not have permission to view the annotations in that group.":"The current URL links to an annotation, but that annotation\n cannot be found, or you do not have permission to view it.":`The ${e} associated with the current URL is unavailable.\n You may need to log in to see it.`}),et("div",{className:"flex justify-end space-x-2",children:[n&&et(kr,{variant:o?"primary":void 0,onClick:()=>r.clearSelection(),children:"Show all annotations"}),!o&&et(kr,{variant:"primary",onClick:t,children:"Log in"})]})]})})}var ks,Ns
165
+ ;_s.$inject=["settings"];var Ss=function(){if(Ns)return ks;Ns=1;var t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,l="object"==typeof e&&e&&e.Object===Object&&e,c="object"==typeof self&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),d=Object.prototype.toString,h=Math.max,m=Math.min,p=function(){return u.Date.now()};function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&d.call(e)==n}(e))return t;if(f(e)){var l="function"==typeof e.valueOf?e.valueOf():e;e=f(l)?l+"":l}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var c=i.test(e);return c||a.test(e)?s(e.slice(2),c?2:8):o.test(e)?t:+e}return ks=function(e,t,n){var r,o,i,a,s,l,c=0,u=!1,d=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=r,i=o;return r=o=void 0,c=t,a=e.apply(i,n)}
166
+ function y(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function _(){var e=p();if(y(e))return w(e);s=setTimeout(_,function(e){var n=t-(e-l);return d?m(n,i-(e-c)):n}(e))}function w(e){return s=void 0,v&&r?b(e):(r=o=void 0,a)}function x(){var e=p(),n=y(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(_,t),u?b(e):a}(l);if(d)return s=setTimeout(_,t),b(l)}return void 0===s&&(s=setTimeout(_,t)),a}return t=g(t)||0,f(n)&&(u=!!n.leading,i=(d="maxWait"in n)?h(g(n.maxWait)||0,t):i,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=o=s=void 0},x.flush=function(){return void 0===s?a:w(p())},x},ks}(),As=t(Ss);const Es={defaultHeight:200,marginAbove:800,marginBelow:800};function Ts(e){const t=window.getComputedStyle(e);return e.getBoundingClientRect().height+(parseFloat(t.marginTop)+parseFloat(t.marginBottom))}function Cs(e,t){const n=e.visible===t;return e.children.reduce(((e,n)=>e+Cs(n,t)),n?1:0)}function Ms(e){return Cs(e,!1)}
167
+ function Is(e){return Cs(e,!0)}function zs(e){const t=e.filter((e=>!!e.annotation)).map((e=>e.annotation));if(t.length)return t;const n=[];if(e.forEach((e=>{e.children&&n.push(...e.children)})),n.length)return zs(n);throw new Error("Thread contains no annotations")}function Ls(e,t,n){const r=fi(e.user,t);return(n||r)&&e.user_info?.display_name?e.user_info.display_name:pi(e.user)}function Os(e){return/^http(s?):/i.test(e)}function Rs(e){return{read:[e],update:[e],delete:[e]}}function Ps(e,t){return Object.assign(Rs(e),{read:["group:"+t]})}function Ds(e,t,n){return"private"===function(e){switch(e){case"private":case"shared":return e;default:return"shared"}}(n)&&e?Rs(e):Ps(e,t)}function Fs(e){return e.read.some((e=>0===e.indexOf("group:")))}function Hs(e){return!Fs(e)}const Bs=(e=window.navigator.userAgent)=>e.indexOf("Mac OS")>=0,$s=(e=window.navigator,t="ontouchend"in document)=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(e.platform)||e.userAgent.includes("Mac")&&t
168
+ ;async function js(e,t=navigator){await t.clipboard.writeText(e)}function qs({classes:e,direction:t="up"}){return et("up"===t?Zn:Yn,{className:Ze("absolute inline z-2 text-grey-3 fill-white",e)})}function Us({label:e,icon:t,uri:n}){return et("li",{children:et(yo,{"aria-label":e,classes:"text-grey-6 hover:text-color-text",href:n,title:e,target:"_blank",variant:"custom",underline:"none",children:et(t,{className:"w-em h-em"})})})}function Gs({shareURI:e}){const t=encodeURIComponent(e);return et("div",{className:"pt-2 border-t",children:et("ul",{className:"flex flex-row gap-x-4 items-center justify-center",children:[et(Us,{icon:fr,label:"Tweet share link",uri:`https://twitter.com/intent/tweet?url=${t}&hashtags=annotated`}),et(Us,{icon:mr,label:"Share on Facebook",uri:`https://www.facebook.com/sharer/sharer.php?u=${t}`}),et(Us,{icon:Jt,label:"Share via email",uri:`mailto:?subject=${encodeURIComponent("Let's Annotate")}&body=${t}`})]})})}var Vs=Ro((function({annotation:e,toastMessenger:t,shareUri:n}){
169
+ const r=ws().getGroup(e.group),o=Hs(e.permissions),i=Os(e.uri),a=de(null),s=de(null),[l,c]=se(!1),u=de(l);if(Me(s,(()=>c(!1)),{enabled:l}),ce((()=>{u.current!==l&&(u.current=l,l&&!$s()&&(a.current?.focus(),a.current?.select()))}),[l]),!r)return null;const d=i,h="private"===r.type?et("span",{children:["Only members of the group ",et("em",{children:r.name})," may view this annotation."]}):et("span",{children:"Anyone using this link may view this annotation."}),m=o?et("span",{children:"Only you may view this annotation."}):h;return et("div",{className:"relative",ref:s,tabIndex:-1,children:[et(Tr,{icon:dr,title:"Share",onClick:()=>c(!l),expanded:l}),l&&et("div",{className:"absolute bottom-8 right-0 touch:bottom-touch-minimum",children:et(lt,{classes:Ze("w-96 max-w-[85vw]","space-y-2 p-2"),width:"custom",children:[et("h2",{className:"text-brand text-md font-medium",children:"Share this annotation"}),et("div",{className:Ze("flex w-full text-xs touch:text-base"),children:et(Ar,{children:[et(Yr,{
170
+ "aria-label":"Use this URL to share this annotation",type:"text",value:n,readOnly:!0,elementRef:a}),et(Tr,{icon:Ft,title:"Copy share link to clipboard",onClick:async()=>{try{await js(n),t.success("Copied share link to clipboard")}catch{t.error("Unable to copy link")}},variant:"dark"})]})}),et("div",{className:"text-base font-normal","data-testid":"share-details",children:et(x,i?{children:m}:{children:"This annotation cannot be shared in its original context because it was made on a document that is not available on the web. This link shares the annotation by itself."})}),d&&et(Gs,{shareURI:n}),et(qs,{direction:"down",classes:"bottom-[-8px] right-2 touch:right-[9px]"})]})})]})}),["toastMessenger"]);var Ws=Ro((function({annotation:e,annotationsService:t,onReply:n,settings:r,toastMessenger:o}){const i=ws(),a=i.profile(),s=i.isLoggedIn(),l=t=>function(e,t,n){return-1!==e[t].indexOf(n||"")}(e.permissions,t,a.userid),c=l("delete"),u=l("update"),d=function(e){const t=Mo(e);return!1!==t?.allowFlagging
171
+ }(r)&&!!a.userid&&a.userid!==e.user,h=function(e){const t=Mo(e);return!1!==t?.enableShareLinks}(r)&&function(e){return Os(e.uri)?e.links?.incontext??e.links?.html??null:e.links?.html??null}(e);return et("div",{className:"flex text-[16px]","data-testid":"annotation-action-bar",children:[u&&et(Tr,{icon:jt,title:"Edit",onClick:()=>{i.createDraft(e,{tags:e.tags,text:e.text,isPrivate:Hs(e.permissions)})}}),c&&et(Tr,{icon:wr,title:"Delete",onClick:async()=>{const n=Ii(e);if(await jr({title:`Delete ${n.toLowerCase()}?`,message:`Are you sure you want to delete this ${n.toLowerCase()}?`,confirmAction:"Delete"}))try{await t.delete(e),o.success(`${n} deleted`,{visuallyHidden:!0})}catch(e){o.error(e.message)}}}),et(Tr,{icon:ir,title:"Reply",onClick:()=>{s?n():i.openSidebarPanel("loginPrompt")}}),h&&et(Vs,{annotation:e,shareUri:h}),d&&!e.flagged&&et(Tr,{icon:sn,title:"Report this annotation to moderators",onClick:()=>{t.flag(e).catch((()=>o.error("Flagging annotation failed")))}}),d&&e.flagged&&et(Tr,{pressed:!0,icon:cn,
172
+ title:"Annotation has been reported to the moderators"})]})}),["annotationsService","settings","toastMessenger"]);function Ks({isCollapsed:e,setCollapsed:t,linkStyle:n}){return et("div",{className:Ze("absolute block right-0 bottom-0","w-20 bg-gradient-to-l from-white"),children:et("div",{className:"flex justify-end",children:et(wo,{variant:"text",onClick:()=>t(!e),expanded:!e,title:"Toggle visibility of full excerpt text",style:n,underline:"always",inline:!0,children:e?"More":"Less"})})})}const Ys=()=>{};var Xs=Ro((function({children:e,collapse:t=!1,collapsedHeight:n,inlineControls:r=!0,onCollapsibleChanged:o=Ys,onToggleCollapsed:i=Ys,overflowThreshold:a=0,settings:s={}}){const[l,c]=se(!0),u=de(null),[d,h]=se(0),m=me((()=>{const e=u.current.clientHeight;h(e);o(e>n+a)}),[n,o,a]);ue((()=>{const e=function(e,t){const n=new ResizeObserver((()=>t(e.clientWidth,e.clientHeight)));return n.observe(e),()=>n.disconnect()}(u.current,m);return m(),e}),[m]);const p=d>n+a,f=p&&(r?l:t),g={};0!==d&&(g["max-height"]=f?n:d)
173
+ ;const v=e=>r?c(e):i(e);return et("div",{"data-testid":"excerpt-container",className:Ze("relative overflow-hidden","transition-[max-height] ease-in duration-150"),style:g,children:[et("div",{className:Ze("inline-block w-full"),"data-testid":"excerpt-content",ref:u,children:e}),et("div",{"data-testid":"excerpt-expand",role:"presentation",onClick:()=>v(!1),className:Ze("transition-[opacity] duration-150 ease-linear","absolute w-full bottom-0 h-touch-minimum",{"bg-gradient-to-b from-excerpt-stop-1 via-excerpt-stop-2 to-excerpt-stop-3":!r&&f,"bg-none":r,"opacity-0 pointer-events-none":!f}),title:"Show the full excerpt"}),p&&r&&et(Ks,{isCollapsed:l,setCollapsed:v,linkStyle:Lo(["selectionFontFamily"],s)})]})}),["settings"]);const Zs=String.raw`[\s,.;:|?!'"\-()[\]{}]`,Js=new RegExp(`(^|${Zs})@([A-Za-z0-9_][A-Za-z0-9._]+[A-Za-z0-9_])(?=${Zs}|$)`,"g"),Qs=String.raw`[^\]^[]*`,el=new RegExp(`(^|${Zs})@\\[(${Qs})](?=${Zs}|$)`,"g");function tl(e,t){const n=document.createElement("a")
174
+ ;return n.setAttribute("data-hyp-mention",""),n.setAttribute("data-userid",e),n.textContent=t,n.outerHTML}const nl=/<a[^>]\bdata-hyp-mention\b[^>]*>@([^<]+)<\/a>/g;function rl(e,t,n){const r=e.textContent??"",o=t??r;if(e.hasAttribute("data-hyp-mention-type"))return[e,o];const i=t&&t.link?"link":t?"no-link":"invalid",a=document.createElement("link"===i?"a":"span");return a.setAttribute("data-hyp-mention",""),a.setAttribute("data-hyp-mention-type",i),a.textContent=t?"username"===n?`@${t.username}`:t.display_name?`@${t.display_name}`:r:r,"link"===i&&(a.setAttribute("href",t?.link??""),a.setAttribute("target","_blank")),"invalid"!==i&&a.setAttribute("data-userid",e.dataset.userid??""),e.replaceWith(a),[a,o]}function ol(e,t){const n=[...e.slice(0,t).matchAll(new RegExp(Zs,"g"))],r=n.length>0?Math.max(...n.map((e=>e.index))):-1,o=e.slice(t).search(new RegExp(Zs));return{start:r+1,end:-1===o?e.length:t+o}}function il(e){return`@[${e.replace(/[[\]]/g,"")}]`}function al(e,t=16/9){
175
+ const n=document.createElement("iframe");return n.src=e,n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",""),function(e,t){e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%";const n=document.createElement("div");return n.style.paddingBottom=1/t*100+"%",n.style.position="relative",n.appendChild(e),n}(n,t)}function sl(e){const t=/(\d+)([hms]?)/g,n={h:3600,m:60,s:1};let r,o=0;for(;null!==(r=t.exec(e));)if(r[2]){const e=r[2];o+=Number(r[1])*n[e]}else o+=+r[1];return o.toString()}function ll(e,t){const n=function(e){const t=["end","start","t"],n=new URLSearchParams(e.search),r=new URLSearchParams;for(const[e,o]of n)t.includes(e)&&("t"===e?r.append("start",sl(o)):r.append(e,o));r.sort();let o=r.toString();return o&&(o=`?${o}`),o}(t);return al(`https://www.youtube.com/embed/${e}${n}`)}function cl(e,t,n,{aspectRatio:r}={}){return o=>{if(o.hostname!==e)return null;const i=t.exec(o.pathname);if(!i)return null;const a=i[1];return al(n(a),r)}}
176
+ const ul=[function(e){if("www.youtube.com"!==e.hostname)return null;if(!/\/watch\/?/.test(e.pathname))return null;const t=/[&?]v=([^&#]+)/.exec(e.search);return t?ll(t[1],e):null},function(e){if("youtu.be"!==e.hostname)return null;const t=/^\/([^/]+)\/?$/.exec(e.pathname);return t?ll(t[1],e):null},cl("vimeo.com",/^\/([^/?#]+)\/?$/,(e=>`https://player.vimeo.com/video/${e}`)),cl("vimeo.com",/^\/channels\/[^/]+\/([^/?#]+)\/?$/,(e=>`https://player.vimeo.com/video/${e}`)),function(e){if("archive.org"!==e.hostname)return null;const t=/^\/(embed|details)\/(.+)/.exec(e.pathname);if(!t)return null;let n=t[2];const r=new URLSearchParams(e.search);let o=r.get("start"),i=r.get("end");if(!o){const e=n.match(/\/start\/([^/]+)/);e&&(o=e[1],n=n.replace(e[0],""))}if(!i){const e=n.match(/\/end\/([^/]+)/);e&&(i=e[1],n=n.replace(e[0],""))}const a=new URL(`https://archive.org/embed/${n}`);return o&&a.searchParams.append("start",o),i&&a.searchParams.append("end",i),al(a.href)},function(e){
177
+ return e.pathname.endsWith(".mp3")||e.pathname.endsWith(".ogg")||e.pathname.endsWith(".wav")?function(e){const t=document.createElement("audio");return t.controls=!0,t.src=e,t}(e.href):null}];function dl(e){if(e.href!==e.textContent)try{const t=encodeURI(e.textContent);if(e.href!==t)return null}catch{return null}const t=function(e){let t,n;for(n=0;n<ul.length;n++)if(t=ul[n](e),t)return t;return null}(e);return t&&e.parentElement.replaceChild(t,e),t}const{entries:hl,setPrototypeOf:ml,isFrozen:pl,getPrototypeOf:fl,getOwnPropertyDescriptor:gl}=Object;let{freeze:vl,seal:bl,create:yl}=Object,{apply:_l,construct:wl}="undefined"!=typeof Reflect&&Reflect;vl||(vl=function(e){return e}),bl||(bl=function(e){return e}),_l||(_l=function(e,t,n){return e.apply(t,n)}),wl||(wl=function(e,t){return new e(...t)})
178
+ ;const xl=Dl(Array.prototype.forEach),kl=Dl(Array.prototype.lastIndexOf),Nl=Dl(Array.prototype.pop),Sl=Dl(Array.prototype.push),Al=Dl(Array.prototype.splice),El=Dl(String.prototype.toLowerCase),Tl=Dl(String.prototype.toString),Cl=Dl(String.prototype.match),Ml=Dl(String.prototype.replace),Il=Dl(String.prototype.indexOf),zl=Dl(String.prototype.trim),Ll=Dl(Object.prototype.hasOwnProperty),Ol=Dl(RegExp.prototype.test),Rl=(Pl=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return wl(Pl,t)});var Pl;function Dl(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return _l(e,t,r)}}function Fl(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:El;ml&&ml(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(pl(t)||(t[r]=e),o=e)}e[o]=!0}return e}function Hl(e){for(let t=0;t<e.length;t++){Ll(e,t)||(e[t]=null)}return e}function Bl(e){
179
+ const t=yl(null);for(const[n,r]of hl(e)){Ll(e,n)&&(Array.isArray(r)?t[n]=Hl(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=Bl(r):t[n]=r)}return t}function $l(e,t){for(;null!==e;){const n=gl(e,t);if(n){if(n.get)return Dl(n.get);if("function"==typeof n.value)return Dl(n.value)}e=fl(e)}return function(){return null}}
180
+ const jl=vl(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ql=vl(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ul=vl(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Gl=vl(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Vl=vl(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Wl=vl(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Kl=vl(["#text"]),Yl=vl(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Xl=vl(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Zl=vl(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Jl=vl(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ql=bl(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ec=bl(/<%[\w\W]*|[\w\W]*%>/gm),tc=bl(/\$\{[\w\W]*/gm),nc=bl(/^data-[\-\w.\u00B7-\uFFFF]+$/),rc=bl(/^aria-[\-\w]+$/),oc=bl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ic=bl(/^(?:\w+script|data):/i),ac=bl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),sc=bl(/^html$/i),lc=bl(/^[a-z][.\w]*(-[.\w]+)+$/i)
181
+ ;var cc=Object.freeze({__proto__:null,ARIA_ATTR:rc,ATTR_WHITESPACE:ac,CUSTOM_ELEMENT:lc,DATA_ATTR:nc,DOCTYPE_NAME:sc,ERB_EXPR:ec,IS_ALLOWED_URI:oc,IS_SCRIPT_OR_DATA:ic,MUSTACHE_EXPR:Ql,TMPLIT_EXPR:tc});const uc=1,dc=3,hc=7,mc=8,pc=9,fc=function(){return"undefined"==typeof window?null:window};var gc,vc,bc=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fc();const n=t=>e(t);if(n.version="3.2.5",n.removed=[],!t||!t.document||t.document.nodeType!==pc||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:m,trustedTypes:p}=t,f=c.prototype,g=$l(f,"cloneNode"),v=$l(f,"remove"),b=$l(f,"nextSibling"),y=$l(f,"childNodes"),_=$l(f,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let w,x=""
182
+ ;const{implementation:k,createNodeIterator:N,createDocumentFragment:S,getElementsByTagName:A}=r,{importNode:E}=o;let T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof hl&&"function"==typeof _&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:C,ERB_EXPR:M,TMPLIT_EXPR:I,DATA_ATTR:z,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:P}=cc;let{IS_ALLOWED_URI:D}=cc,F=null;const H=Fl({},[...jl,...ql,...Ul,...Vl,...Kl]);let B=null;const $=Fl({},[...Yl,...Xl,...Zl,...Jl]);let j=Object.seal(yl(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}
183
+ })),q=null,U=null,G=!0,V=!0,W=!1,K=!0,Y=!1,X=!0,Z=!1,J=!1,Q=!1,ee=!1,te=!1,ne=!1,re=!0,oe=!1,ie=!0,ae=!1,se={},le=null;const ce=Fl({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const de=Fl({},["audio","video","img","source","image","track"]);let he=null;const me=Fl({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pe="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let ve=ge,be=!1,ye=null;const _e=Fl({},[pe,fe,ge],Tl);let we=Fl({},["mi","mo","mn","ms","mtext"]),xe=Fl({},["annotation-xml"]);const ke=Fl({},["title","style","font","a","script"]);let Ne=null;const Se=["application/xhtml+xml","text/html"];let Ae=null,Ee=null;const Te=r.createElement("form"),Ce=function(e){
184
+ return e instanceof RegExp||e instanceof Function},Me=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ee||Ee!==e){if(e&&"object"==typeof e||(e={}),e=Bl(e),Ne=-1===Se.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ae="application/xhtml+xml"===Ne?Tl:El,F=Ll(e,"ALLOWED_TAGS")?Fl({},e.ALLOWED_TAGS,Ae):H,B=Ll(e,"ALLOWED_ATTR")?Fl({},e.ALLOWED_ATTR,Ae):$,ye=Ll(e,"ALLOWED_NAMESPACES")?Fl({},e.ALLOWED_NAMESPACES,Tl):_e,he=Ll(e,"ADD_URI_SAFE_ATTR")?Fl(Bl(me),e.ADD_URI_SAFE_ATTR,Ae):me,ue=Ll(e,"ADD_DATA_URI_TAGS")?Fl(Bl(de),e.ADD_DATA_URI_TAGS,Ae):de,le=Ll(e,"FORBID_CONTENTS")?Fl({},e.FORBID_CONTENTS,Ae):ce,q=Ll(e,"FORBID_TAGS")?Fl({},e.FORBID_TAGS,Ae):{},U=Ll(e,"FORBID_ATTR")?Fl({},e.FORBID_ATTR,Ae):{},se=!!Ll(e,"USE_PROFILES")&&e.USE_PROFILES,G=!1!==e.ALLOW_ARIA_ATTR,V=!1!==e.ALLOW_DATA_ATTR,W=e.ALLOW_UNKNOWN_PROTOCOLS||!1,K=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,X=!1!==e.SAFE_FOR_XML,Z=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,
185
+ te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,oe=e.SANITIZE_NAMED_PROPS||!1,ie=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,D=e.ALLOWED_URI_REGEXP||oc,ve=e.NAMESPACE||ge,we=e.MATHML_TEXT_INTEGRATION_POINTS||we,xe=e.HTML_INTEGRATION_POINTS||xe,j=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(j.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(V=!1),te&&(ee=!0),se&&(F=Fl({},Kl),B=[],!0===se.html&&(Fl(F,jl),Fl(B,Yl)),!0===se.svg&&(Fl(F,ql),Fl(B,Xl),Fl(B,Jl)),!0===se.svgFilters&&(Fl(F,Ul),Fl(B,Xl),Fl(B,Jl)),!0===se.mathMl&&(Fl(F,Vl),Fl(B,Zl),Fl(B,Jl))),
186
+ e.ADD_TAGS&&(F===H&&(F=Bl(F)),Fl(F,e.ADD_TAGS,Ae)),e.ADD_ATTR&&(B===$&&(B=Bl(B)),Fl(B,e.ADD_ATTR,Ae)),e.ADD_URI_SAFE_ATTR&&Fl(he,e.ADD_URI_SAFE_ATTR,Ae),e.FORBID_CONTENTS&&(le===ce&&(le=Bl(le)),Fl(le,e.FORBID_CONTENTS,Ae)),ie&&(F["#text"]=!0),Z&&Fl(F,["html","head","body"]),F.table&&(Fl(F,["tbody"]),delete q.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Rl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Rl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,x=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){
187
+ return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(p,i)),null!==w&&"string"==typeof x&&(x=w.createHTML(""));vl&&vl(e),Ee=e}},Ie=Fl({},[...ql,...Ul,...Gl]),ze=Fl({},[...Vl,...Wl]),Le=function(e){Sl(n.removed,{element:e});try{_(e).removeChild(e)}catch(t){v(e)}},Oe=function(e,t){try{Sl(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Sl(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Re=function(e){let t=null,n=null;if(Q)e="<remove></remove>"+e;else{const t=Cl(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ne&&ve===ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=w?w.createHTML(e):e;if(ve===ge)try{t=(new m).parseFromString(o,Ne)}catch(e){}if(!t||!t.documentElement){t=k.createDocument(ve,"template",null);try{t.documentElement.innerHTML=be?x:o}catch(e){}}const i=t.body||t.documentElement
188
+ ;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ve===ge?A.call(t,Z?"html":"body")[0]:Z?t.documentElement:i},Pe=function(e){return N.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},De=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Fe=function(e){return"function"==typeof l&&e instanceof l};function He(e,t,r){xl(e,(e=>{e.call(n,t,r,Ee)}))}const Be=function(e){let t=null;if(He(T.beforeSanitizeElements,e,null),De(e))return Le(e),!0;const r=Ae(e.nodeName);if(He(T.uponSanitizeElement,e,{tagName:r,allowedTags:F}),e.hasChildNodes()&&!Fe(e.firstElementChild)&&Ol(/<[/\w!]/g,e.innerHTML)&&Ol(/<[/\w!]/g,e.textContent))return Le(e),!0
189
+ ;if(e.nodeType===hc)return Le(e),!0;if(X&&e.nodeType===mc&&Ol(/<[/\w]/g,e.data))return Le(e),!0;if(!F[r]||q[r]){if(!q[r]&&je(r)){if(j.tagNameCheck instanceof RegExp&&Ol(j.tagNameCheck,r))return!1;if(j.tagNameCheck instanceof Function&&j.tagNameCheck(r))return!1}if(ie&&!le[r]){const t=_(e)||e.parentNode,n=y(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const o=g(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,b(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ve,tagName:"template"});const n=El(e.tagName),r=El(t.tagName)
190
+ ;return!!ye[e.namespaceURI]&&(e.namespaceURI===fe?t.namespaceURI===ge?"svg"===n:t.namespaceURI===pe?"svg"===n&&("annotation-xml"===r||we[r]):Boolean(Ie[n]):e.namespaceURI===pe?t.namespaceURI===ge?"math"===n:t.namespaceURI===fe?"math"===n&&xe[r]:Boolean(ze[n]):e.namespaceURI===ge?!(t.namespaceURI===fe&&!xe[r])&&!(t.namespaceURI===pe&&!we[r])&&!ze[n]&&(ke[n]||!Ie[n]):!("application/xhtml+xml"!==Ne||!ye[e.namespaceURI]))}(e)?(Le(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!Ol(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===dc&&(t=e.textContent,xl([C,M,I],(e=>{t=Ml(t,e," ")})),e.textContent!==t&&(Sl(n.removed,{element:e.cloneNode()}),e.textContent=t)),He(T.afterSanitizeElements,e,null),!1):(Le(e),!0)},$e=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in r||n in Te))return!1;if(V&&!U[t]&&Ol(z,t));else if(G&&Ol(L,t));else if(!B[t]||U[t]){
191
+ if(!(je(e)&&(j.tagNameCheck instanceof RegExp&&Ol(j.tagNameCheck,e)||j.tagNameCheck instanceof Function&&j.tagNameCheck(e))&&(j.attributeNameCheck instanceof RegExp&&Ol(j.attributeNameCheck,t)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(t))||"is"===t&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&Ol(j.tagNameCheck,n)||j.tagNameCheck instanceof Function&&j.tagNameCheck(n))))return!1}else if(he[t]);else if(Ol(D,Ml(n,R,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Il(n,"data:")||!ue[e]){if(W&&!Ol(O,Ml(n,R,"")));else if(n)return!1}else;return!0},je=function(e){return"annotation-xml"!==e&&Cl(e,P)},qe=function(e){He(T.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||De(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:B,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:s,value:l}=i,c=Ae(a);let u="value"===a?l:zl(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,
192
+ r.forceKeepAttr=void 0,He(T.uponSanitizeAttribute,e,r),u=r.attrValue,!oe||"id"!==c&&"name"!==c||(Oe(a,e),u="user-content-"+u),X&&Ol(/((--!?|])>)|<\/(style|title)/i,u)){Oe(a,e);continue}if(r.forceKeepAttr)continue;if(Oe(a,e),!r.keepAttr)continue;if(!K&&Ol(/\/>/i,u)){Oe(a,e);continue}Y&&xl([C,M,I],(e=>{u=Ml(u,e," ")}));const d=Ae(e.nodeName);if($e(d,c,u)){if(w&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(s);else switch(p.getAttributeType(d,c)){case"TrustedHTML":u=w.createHTML(u);break;case"TrustedScriptURL":u=w.createScriptURL(u)}try{s?e.setAttributeNS(s,a,u):e.setAttribute(a,u),De(e)?Le(e):Nl(n.removed)}catch(e){}}}He(T.afterSanitizeAttributes,e,null)},Ue=function e(t){let n=null;const r=Pe(t);for(He(T.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)He(T.uponSanitizeShadowNode,n,null),Be(n),qe(n),n.content instanceof a&&e(n.content);He(T.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,s=null,c=null
193
+ ;if(be=!e,be&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Fe(e)){if("function"!=typeof e.toString)throw Rl("toString is not a function");if("string"!=typeof(e=e.toString()))throw Rl("dirty is not a string, aborting")}if(!n.isSupported)return e;if(J||Me(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ae(e.nodeName);if(!F[t]||q[t])throw Rl("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=Re("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===uc&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!ee&&!Y&&!Z&&-1===e.indexOf("<"))return w&&ne?w.createHTML(e):e;if(r=Re(e),!r)return ee?null:ne?x:""}r&&Q&&Le(r.firstChild);const u=Pe(ae?e:r);for(;s=u.nextNode();)Be(s),qe(s),s.content instanceof a&&Ue(s.content);if(ae)return e;if(ee){if(te)for(c=S.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(B.shadowroot||B.shadowrootmode)&&(c=E.call(o,c,!0)),c}let d=Z?r.outerHTML:r.innerHTML
194
+ ;return Z&&F["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Ol(sc,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),Y&&xl([C,M,I],(e=>{d=Ml(d,e," ")})),w&&ne?w.createHTML(d):d},n.setConfig=function(){Me(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},n.clearConfig=function(){Ee=null,J=!1},n.isValidAttribute=function(e,t,n){Ee||Me({});const r=Ae(e),o=Ae(t);return $e(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&Sl(T[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=kl(T[e],t);return-1===n?void 0:Al(T[e],n,1)[0]}return Nl(T[e])},n.removeHooks=function(e){T[e]=[]},n.removeAllHooks=function(){T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();var yc=function(){if(vc)return gc;vc=1;var e=/["'&<>]/;return gc=function(t){
195
+ var n,r=""+t,o=e.exec(r);if(!o)return r;var i="",a=0,s=0;for(a=o.index;a<r.length;a++){switch(r.charCodeAt(a)){case 34:n="&quot;";break;case 38:n="&amp;";break;case 39:n="&#39;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;default:continue}s!==a&&(i+=r.substring(s,a)),s=a+1,i+=n}return s!==a?i+r.substring(s,a):i},gc}(),_c=t(yc);class wc{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new wc(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class xc{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new xc(t,wc.range(this,e))}}class kc{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n,r,o="KaTeX parse error: "+e,i=t&&t.loc;if(i&&i.start<=i.end){var a=i.lexer.input;n=i.start,r=i.end,
196
+ n===a.length?o+=" at end of input: ":o+=" at position "+(n+1)+": ";var s=a.slice(n,r).replace(/[^]/g,"$&̲");o+=(n>15?"…"+a.slice(n-15,n):a.slice(0,n))+s+(r+15<a.length?a.slice(r,r+15)+"…":a.slice(r))}var l=new Error(o);return l.name="ParseError",l.__proto__=kc.prototype,l.position=n,null!=n&&null!=r&&(l.length=r-n),l.rawMessage=e,l}}kc.prototype.__proto__=Error.prototype;var Nc=/([A-Z])/g,Sc={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},Ac=/[&><"']/g;var Ec=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},Tc={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(Ac,(e=>Sc[e]))},hyphenate:function(e){return e.replace(Nc,"-$1").toLowerCase()},getBaseElem:Ec,isCharacterBox:function(e){var t=Ec(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){
197
+ var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}},Cc={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",
198
+ cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],
199
+ description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Mc(e){if(e.default)return e.default
200
+ ;var t=e.type,n=Array.isArray(t)?t[0]:t;if("string"!=typeof n)return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Ic{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},Cc)if(Cc.hasOwnProperty(t)){var n=Cc[t];this[t]=void 0!==e[t]?n.processor?n.processor(e[t]):e[t]:Mc(n)}}reportNonstrict(e,t,n){var r=this.strict;if("function"==typeof r&&(r=r(e,t,n)),r&&"ignore"!==r){if(!0===r||"error"===r)throw new kc("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n)
201
+ ;"warn"===r?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,n){var r=this.strict;if("function"==typeof r)try{r=r(e,t,n)}catch(e){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r||("warn"===r?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){var t=Tc.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}var n="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(n)}}class zc{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Lc[Oc[this.id]]}sub(){
202
+ return Lc[Rc[this.id]]}fracNum(){return Lc[Pc[this.id]]}fracDen(){return Lc[Dc[this.id]]}cramp(){return Lc[Fc[this.id]]}text(){return Lc[Hc[this.id]]}isTight(){return this.size>=2}}var Lc=[new zc(0,0,!1),new zc(1,0,!0),new zc(2,1,!1),new zc(3,1,!0),new zc(4,2,!1),new zc(5,2,!0),new zc(6,3,!1),new zc(7,3,!0)],Oc=[4,5,4,5,6,7,6,7],Rc=[5,5,5,5,7,7,7,7],Pc=[2,3,4,5,6,7,6,7],Dc=[3,3,5,5,7,7,7,7],Fc=[1,1,3,3,5,5,7,7],Hc=[0,1,2,3,2,3,2,3],Bc={DISPLAY:Lc[0],TEXT:Lc[2],SCRIPT:Lc[4],SCRIPTSCRIPT:Lc[6]},$c=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var jc=[];function qc(e){for(var t=0;t<jc.length;t+=2)if(e>=jc[t]&&e<=jc[t+1])return!0;return!1}$c.forEach((e=>e.blocks.forEach((e=>jc.push(...e)))));var Uc=80,Gc={
203
+ doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",
204
+ doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",
205
+ leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",
206
+ leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",
207
+ leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",
208
+ leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",
209
+ midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",
210
+ oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",
211
+ rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",
212
+ rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",
213
+ rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",
214
+ rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",
215
+ twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",
216
+ tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",
217
+ vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",
218
+ widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",
219
+ baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",
220
+ rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",
221
+ rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",
222
+ shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class Vc{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Tc.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e=>e.toText())).join("")}}var Wc={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],
223
+ 67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],
224
+ 8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],
225
+ 8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],
226
+ 8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],
227
+ 8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],
228
+ 8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],
229
+ 9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],
230
+ 57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],
231
+ 82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],
232
+ 61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],
233
+ 104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],
234
+ 39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],
235
+ 80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],
236
+ 119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],
237
+ 920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],
238
+ 8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],
239
+ 8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],
240
+ 8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],
241
+ 40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],
242
+ 75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],
243
+ 110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],
244
+ 729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],
245
+ 45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],
246
+ 81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],
247
+ 116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],
248
+ 926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],
249
+ 56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],
250
+ 98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],
251
+ 198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],
252
+ 8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],
253
+ 8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],
254
+ 8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],
255
+ 9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],
256
+ 55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],
257
+ 103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],
258
+ 947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],
259
+ 51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],
260
+ 90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],
261
+ 923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],
262
+ 966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],
263
+ 58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],
264
+ 101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],
265
+ 916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],
266
+ 52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],
267
+ 89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],
268
+ 160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],
269
+ 35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],
270
+ 79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],
271
+ 119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],
272
+ 66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],
273
+ 771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],
274
+ 41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},
275
+ "Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],
276
+ 8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],
277
+ 37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],
278
+ 79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],
279
+ 120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Kc={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],
280
+ quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Yc={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R",
281
+ "а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function Xc(e,t,n){if(!Wc[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),o=Wc[t][r];if(!o&&e[0]in Yc&&(r=Yc[e[0]].charCodeAt(0),o=Wc[t][r]),o||"text"!==n||qc(r)&&(o=Wc[t][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}var Zc={};var Jc=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Qc=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],eu=function(e,t){return t.size<2?e:Jc[e-1][t.size-1]};class tu{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,
282
+ this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||tu.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Qc[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new tu(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:eu(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,
283
+ textSize:e,sizeMultiplier:Qc[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=eu(tu.BASESIZE,e);return this.size===t&&this.textSize===tu.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==tu.BASESIZE?["sizing","reset-size"+this.size,"size"+tu.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!Zc[t=e>=5?0:e>=3?1:2]){var n=Zc[t]={
284
+ cssEmPerMu:Kc.quad[t]/18};for(var r in Kc)Kc.hasOwnProperty(r)&&(n[r]=Kc[r][t])}return Zc[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}tu.BASESIZE=6;var nu={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},ru={ex:!0,em:!0,mu:!0},ou=function(e){return"string"!=typeof e&&(e=e.unit),e in nu||e in ru||"ex"===e},iu=function(e,t){var n;if(e.unit in nu)n=nu[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var r;if(r=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=r.fontMetrics().xHeight;else{if("em"!==e.unit)throw new kc("Invalid unit: '"+e.unit+"'");n=r.fontMetrics().quad}r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},au=function(e){return+e.toFixed(4)+"em"},su=function(e){return e.filter((e=>e)).join(" ")},lu=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,
285
+ this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},cu=function(e){var t=document.createElement(e);for(var n in t.className=su(this.classes),this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var o=0;o<this.children.length;o++)t.appendChild(this.children[o].toNode());return t},uu=/[\s"'>/=\x00-\x1f]/,du=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Tc.escape(su(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=Tc.hyphenate(r)+":"+this.style[r]+";");for(var o in n&&(t+=' style="'+Tc.escape(n)+'"'),this.attributes)if(this.attributes.hasOwnProperty(o)){if(uu.test(o))throw new kc("Invalid attribute name '"+o+"'");t+=" "+o+'="'+Tc.escape(this.attributes[o])+'"'}t+=">";for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup()
286
+ ;return t+="</"+e+">"};class hu{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,lu.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Tc.contains(this.classes,e)}toNode(){return cu.call(this,"span")}toMarkup(){return du.call(this,"span")}}class mu{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,lu.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Tc.contains(this.classes,e)}toNode(){return cu.call(this,"a")}toMarkup(){return du.call(this,"a")}}class pu{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],
287
+ this.style=n}hasClass(e){return Tc.contains(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e='<img src="'+Tc.escape(this.src)+'" alt="'+Tc.escape(this.alt)+'"',t="";for(var n in this.style)this.style.hasOwnProperty(n)&&(t+=Tc.hyphenate(n)+":"+this.style[n]+";");return t&&(e+=' style="'+Tc.escape(t)+'"'),e+="'/>"}}var fu={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class gu{constructor(e,t,n,r,o,i,a,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=o||0,this.width=i||0,this.classes=a||[],this.style=s||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<$c.length;t++)for(var n=$c[t],r=0;r<n.blocks.length;r++){var o=n.blocks[r];if(e>=o[0]&&e<=o[1])return n.name
288
+ }return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=fu[this.text])}hasClass(e){return Tc.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var n in this.italic>0&&((t=document.createElement("span")).style.marginRight=au(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=su(this.classes)),this.style)this.style.hasOwnProperty(n)&&((t=t||document.createElement("span")).style[n]=this.style[n]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=Tc.escape(su(this.classes)),t+='"');var n="";for(var r in this.italic>0&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(n+=Tc.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+Tc.escape(n)+'"');var o=Tc.escape(this.text);return e?(t+=">",t+=o,t+="</span>"):o}}class vu{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],
289
+ this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+Tc.escape(this.attributes[t])+'"');e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>"}}class bu{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",Gc[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+Tc.escape(this.alternate)+'"/>':'<path d="'+Tc.escape(Gc[this.pathName])+'"/>'}}class yu{
290
+ constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+Tc.escape(this.attributes[t])+'"');return e+="/>"}}function _u(e){if(e instanceof gu)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var wu={bin:1,close:1,inner:1,open:1,punct:1,rel:1},xu={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ku={math:{},text:{}};function Nu(e,t,n,r,o,i){ku[e][o]={font:t,group:n,replace:r},i&&r&&(ku[e][r]=ku[e][o])}var Su="math",Au="text",Eu="main",Tu="ams",Cu="accent-token",Mu="bin",Iu="close",zu="inner",Lu="mathord",Ou="op-token",Ru="open",Pu="punct",Du="rel",Fu="spacing",Hu="textord";Nu(Su,Eu,Du,"≡","\\equiv",!0),Nu(Su,Eu,Du,"≺","\\prec",!0),
291
+ Nu(Su,Eu,Du,"≻","\\succ",!0),Nu(Su,Eu,Du,"∼","\\sim",!0),Nu(Su,Eu,Du,"⊥","\\perp"),Nu(Su,Eu,Du,"⪯","\\preceq",!0),Nu(Su,Eu,Du,"⪰","\\succeq",!0),Nu(Su,Eu,Du,"≃","\\simeq",!0),Nu(Su,Eu,Du,"∣","\\mid",!0),Nu(Su,Eu,Du,"≪","\\ll",!0),Nu(Su,Eu,Du,"≫","\\gg",!0),Nu(Su,Eu,Du,"≍","\\asymp",!0),Nu(Su,Eu,Du,"∥","\\parallel"),Nu(Su,Eu,Du,"⋈","\\bowtie",!0),Nu(Su,Eu,Du,"⌣","\\smile",!0),Nu(Su,Eu,Du,"⊑","\\sqsubseteq",!0),Nu(Su,Eu,Du,"⊒","\\sqsupseteq",!0),Nu(Su,Eu,Du,"≐","\\doteq",!0),Nu(Su,Eu,Du,"⌢","\\frown",!0),Nu(Su,Eu,Du,"∋","\\ni",!0),Nu(Su,Eu,Du,"∝","\\propto",!0),Nu(Su,Eu,Du,"⊢","\\vdash",!0),Nu(Su,Eu,Du,"⊣","\\dashv",!0),Nu(Su,Eu,Du,"∋","\\owns"),Nu(Su,Eu,Pu,".","\\ldotp"),Nu(Su,Eu,Pu,"⋅","\\cdotp"),Nu(Su,Eu,Hu,"#","\\#"),Nu(Au,Eu,Hu,"#","\\#"),Nu(Su,Eu,Hu,"&","\\&"),Nu(Au,Eu,Hu,"&","\\&"),Nu(Su,Eu,Hu,"ℵ","\\aleph",!0),Nu(Su,Eu,Hu,"∀","\\forall",!0),Nu(Su,Eu,Hu,"ℏ","\\hbar",!0),Nu(Su,Eu,Hu,"∃","\\exists",!0),Nu(Su,Eu,Hu,"∇","\\nabla",!0),Nu(Su,Eu,Hu,"♭","\\flat",!0),Nu(Su,Eu,Hu,"ℓ","\\ell",!0),
292
+ Nu(Su,Eu,Hu,"♮","\\natural",!0),Nu(Su,Eu,Hu,"♣","\\clubsuit",!0),Nu(Su,Eu,Hu,"℘","\\wp",!0),Nu(Su,Eu,Hu,"♯","\\sharp",!0),Nu(Su,Eu,Hu,"♢","\\diamondsuit",!0),Nu(Su,Eu,Hu,"ℜ","\\Re",!0),Nu(Su,Eu,Hu,"♡","\\heartsuit",!0),Nu(Su,Eu,Hu,"ℑ","\\Im",!0),Nu(Su,Eu,Hu,"♠","\\spadesuit",!0),Nu(Su,Eu,Hu,"§","\\S",!0),Nu(Au,Eu,Hu,"§","\\S"),Nu(Su,Eu,Hu,"¶","\\P",!0),Nu(Au,Eu,Hu,"¶","\\P"),Nu(Su,Eu,Hu,"†","\\dag"),Nu(Au,Eu,Hu,"†","\\dag"),Nu(Au,Eu,Hu,"†","\\textdagger"),Nu(Su,Eu,Hu,"‡","\\ddag"),Nu(Au,Eu,Hu,"‡","\\ddag"),Nu(Au,Eu,Hu,"‡","\\textdaggerdbl"),Nu(Su,Eu,Iu,"⎱","\\rmoustache",!0),Nu(Su,Eu,Ru,"⎰","\\lmoustache",!0),Nu(Su,Eu,Iu,"⟯","\\rgroup",!0),Nu(Su,Eu,Ru,"⟮","\\lgroup",!0),Nu(Su,Eu,Mu,"∓","\\mp",!0),Nu(Su,Eu,Mu,"⊖","\\ominus",!0),Nu(Su,Eu,Mu,"⊎","\\uplus",!0),Nu(Su,Eu,Mu,"⊓","\\sqcap",!0),Nu(Su,Eu,Mu,"∗","\\ast"),Nu(Su,Eu,Mu,"⊔","\\sqcup",!0),Nu(Su,Eu,Mu,"◯","\\bigcirc",!0),Nu(Su,Eu,Mu,"∙","\\bullet",!0),Nu(Su,Eu,Mu,"‡","\\ddagger"),Nu(Su,Eu,Mu,"≀","\\wr",!0),Nu(Su,Eu,Mu,"⨿","\\amalg"),Nu(Su,Eu,Mu,"&","\\And"),
293
+ Nu(Su,Eu,Du,"⟵","\\longleftarrow",!0),Nu(Su,Eu,Du,"⇐","\\Leftarrow",!0),Nu(Su,Eu,Du,"⟸","\\Longleftarrow",!0),Nu(Su,Eu,Du,"⟶","\\longrightarrow",!0),Nu(Su,Eu,Du,"⇒","\\Rightarrow",!0),Nu(Su,Eu,Du,"⟹","\\Longrightarrow",!0),Nu(Su,Eu,Du,"↔","\\leftrightarrow",!0),Nu(Su,Eu,Du,"⟷","\\longleftrightarrow",!0),Nu(Su,Eu,Du,"⇔","\\Leftrightarrow",!0),Nu(Su,Eu,Du,"⟺","\\Longleftrightarrow",!0),Nu(Su,Eu,Du,"↦","\\mapsto",!0),Nu(Su,Eu,Du,"⟼","\\longmapsto",!0),Nu(Su,Eu,Du,"↗","\\nearrow",!0),Nu(Su,Eu,Du,"↩","\\hookleftarrow",!0),Nu(Su,Eu,Du,"↪","\\hookrightarrow",!0),Nu(Su,Eu,Du,"↘","\\searrow",!0),Nu(Su,Eu,Du,"↼","\\leftharpoonup",!0),Nu(Su,Eu,Du,"⇀","\\rightharpoonup",!0),Nu(Su,Eu,Du,"↙","\\swarrow",!0),Nu(Su,Eu,Du,"↽","\\leftharpoondown",!0),Nu(Su,Eu,Du,"⇁","\\rightharpoondown",!0),Nu(Su,Eu,Du,"↖","\\nwarrow",!0),Nu(Su,Eu,Du,"⇌","\\rightleftharpoons",!0),Nu(Su,Tu,Du,"≮","\\nless",!0),Nu(Su,Tu,Du,"","\\@nleqslant"),Nu(Su,Tu,Du,"","\\@nleqq"),Nu(Su,Tu,Du,"⪇","\\lneq",!0),Nu(Su,Tu,Du,"≨","\\lneqq",!0),
294
+ Nu(Su,Tu,Du,"","\\@lvertneqq"),Nu(Su,Tu,Du,"⋦","\\lnsim",!0),Nu(Su,Tu,Du,"⪉","\\lnapprox",!0),Nu(Su,Tu,Du,"⊀","\\nprec",!0),Nu(Su,Tu,Du,"⋠","\\npreceq",!0),Nu(Su,Tu,Du,"⋨","\\precnsim",!0),Nu(Su,Tu,Du,"⪹","\\precnapprox",!0),Nu(Su,Tu,Du,"≁","\\nsim",!0),Nu(Su,Tu,Du,"","\\@nshortmid"),Nu(Su,Tu,Du,"∤","\\nmid",!0),Nu(Su,Tu,Du,"⊬","\\nvdash",!0),Nu(Su,Tu,Du,"⊭","\\nvDash",!0),Nu(Su,Tu,Du,"⋪","\\ntriangleleft"),Nu(Su,Tu,Du,"⋬","\\ntrianglelefteq",!0),Nu(Su,Tu,Du,"⊊","\\subsetneq",!0),Nu(Su,Tu,Du,"","\\@varsubsetneq"),Nu(Su,Tu,Du,"⫋","\\subsetneqq",!0),Nu(Su,Tu,Du,"","\\@varsubsetneqq"),Nu(Su,Tu,Du,"≯","\\ngtr",!0),Nu(Su,Tu,Du,"","\\@ngeqslant"),Nu(Su,Tu,Du,"","\\@ngeqq"),Nu(Su,Tu,Du,"⪈","\\gneq",!0),Nu(Su,Tu,Du,"≩","\\gneqq",!0),Nu(Su,Tu,Du,"","\\@gvertneqq"),Nu(Su,Tu,Du,"⋧","\\gnsim",!0),Nu(Su,Tu,Du,"⪊","\\gnapprox",!0),Nu(Su,Tu,Du,"⊁","\\nsucc",!0),Nu(Su,Tu,Du,"⋡","\\nsucceq",!0),Nu(Su,Tu,Du,"⋩","\\succnsim",!0),Nu(Su,Tu,Du,"⪺","\\succnapprox",!0),Nu(Su,Tu,Du,"≆","\\ncong",!0),
295
+ Nu(Su,Tu,Du,"","\\@nshortparallel"),Nu(Su,Tu,Du,"∦","\\nparallel",!0),Nu(Su,Tu,Du,"⊯","\\nVDash",!0),Nu(Su,Tu,Du,"⋫","\\ntriangleright"),Nu(Su,Tu,Du,"⋭","\\ntrianglerighteq",!0),Nu(Su,Tu,Du,"","\\@nsupseteqq"),Nu(Su,Tu,Du,"⊋","\\supsetneq",!0),Nu(Su,Tu,Du,"","\\@varsupsetneq"),Nu(Su,Tu,Du,"⫌","\\supsetneqq",!0),Nu(Su,Tu,Du,"","\\@varsupsetneqq"),Nu(Su,Tu,Du,"⊮","\\nVdash",!0),Nu(Su,Tu,Du,"⪵","\\precneqq",!0),Nu(Su,Tu,Du,"⪶","\\succneqq",!0),Nu(Su,Tu,Du,"","\\@nsubseteqq"),Nu(Su,Tu,Mu,"⊴","\\unlhd"),Nu(Su,Tu,Mu,"⊵","\\unrhd"),Nu(Su,Tu,Du,"↚","\\nleftarrow",!0),Nu(Su,Tu,Du,"↛","\\nrightarrow",!0),Nu(Su,Tu,Du,"⇍","\\nLeftarrow",!0),Nu(Su,Tu,Du,"⇏","\\nRightarrow",!0),Nu(Su,Tu,Du,"↮","\\nleftrightarrow",!0),Nu(Su,Tu,Du,"⇎","\\nLeftrightarrow",!0),Nu(Su,Tu,Du,"△","\\vartriangle"),Nu(Su,Tu,Hu,"ℏ","\\hslash"),Nu(Su,Tu,Hu,"▽","\\triangledown"),Nu(Su,Tu,Hu,"◊","\\lozenge"),Nu(Su,Tu,Hu,"Ⓢ","\\circledS"),Nu(Su,Tu,Hu,"®","\\circledR"),Nu(Au,Tu,Hu,"®","\\circledR"),Nu(Su,Tu,Hu,"∡","\\measuredangle",!0),
296
+ Nu(Su,Tu,Hu,"∄","\\nexists"),Nu(Su,Tu,Hu,"℧","\\mho"),Nu(Su,Tu,Hu,"Ⅎ","\\Finv",!0),Nu(Su,Tu,Hu,"⅁","\\Game",!0),Nu(Su,Tu,Hu,"‵","\\backprime"),Nu(Su,Tu,Hu,"▲","\\blacktriangle"),Nu(Su,Tu,Hu,"▼","\\blacktriangledown"),Nu(Su,Tu,Hu,"■","\\blacksquare"),Nu(Su,Tu,Hu,"⧫","\\blacklozenge"),Nu(Su,Tu,Hu,"★","\\bigstar"),Nu(Su,Tu,Hu,"∢","\\sphericalangle",!0),Nu(Su,Tu,Hu,"∁","\\complement",!0),Nu(Su,Tu,Hu,"ð","\\eth",!0),Nu(Au,Eu,Hu,"ð","ð"),Nu(Su,Tu,Hu,"╱","\\diagup"),Nu(Su,Tu,Hu,"╲","\\diagdown"),Nu(Su,Tu,Hu,"□","\\square"),Nu(Su,Tu,Hu,"□","\\Box"),Nu(Su,Tu,Hu,"◊","\\Diamond"),Nu(Su,Tu,Hu,"¥","\\yen",!0),Nu(Au,Tu,Hu,"¥","\\yen",!0),Nu(Su,Tu,Hu,"✓","\\checkmark",!0),Nu(Au,Tu,Hu,"✓","\\checkmark"),Nu(Su,Tu,Hu,"ℶ","\\beth",!0),Nu(Su,Tu,Hu,"ℸ","\\daleth",!0),Nu(Su,Tu,Hu,"ℷ","\\gimel",!0),Nu(Su,Tu,Hu,"ϝ","\\digamma",!0),Nu(Su,Tu,Hu,"ϰ","\\varkappa"),Nu(Su,Tu,Ru,"┌","\\@ulcorner",!0),Nu(Su,Tu,Iu,"┐","\\@urcorner",!0),Nu(Su,Tu,Ru,"└","\\@llcorner",!0),Nu(Su,Tu,Iu,"┘","\\@lrcorner",!0),Nu(Su,Tu,Du,"≦","\\leqq",!0),
297
+ Nu(Su,Tu,Du,"⩽","\\leqslant",!0),Nu(Su,Tu,Du,"⪕","\\eqslantless",!0),Nu(Su,Tu,Du,"≲","\\lesssim",!0),Nu(Su,Tu,Du,"⪅","\\lessapprox",!0),Nu(Su,Tu,Du,"≊","\\approxeq",!0),Nu(Su,Tu,Mu,"⋖","\\lessdot"),Nu(Su,Tu,Du,"⋘","\\lll",!0),Nu(Su,Tu,Du,"≶","\\lessgtr",!0),Nu(Su,Tu,Du,"⋚","\\lesseqgtr",!0),Nu(Su,Tu,Du,"⪋","\\lesseqqgtr",!0),Nu(Su,Tu,Du,"≑","\\doteqdot"),Nu(Su,Tu,Du,"≓","\\risingdotseq",!0),Nu(Su,Tu,Du,"≒","\\fallingdotseq",!0),Nu(Su,Tu,Du,"∽","\\backsim",!0),Nu(Su,Tu,Du,"⋍","\\backsimeq",!0),Nu(Su,Tu,Du,"⫅","\\subseteqq",!0),Nu(Su,Tu,Du,"⋐","\\Subset",!0),Nu(Su,Tu,Du,"⊏","\\sqsubset",!0),Nu(Su,Tu,Du,"≼","\\preccurlyeq",!0),Nu(Su,Tu,Du,"⋞","\\curlyeqprec",!0),Nu(Su,Tu,Du,"≾","\\precsim",!0),Nu(Su,Tu,Du,"⪷","\\precapprox",!0),Nu(Su,Tu,Du,"⊲","\\vartriangleleft"),Nu(Su,Tu,Du,"⊴","\\trianglelefteq"),Nu(Su,Tu,Du,"⊨","\\vDash",!0),Nu(Su,Tu,Du,"⊪","\\Vvdash",!0),Nu(Su,Tu,Du,"⌣","\\smallsmile"),Nu(Su,Tu,Du,"⌢","\\smallfrown"),Nu(Su,Tu,Du,"≏","\\bumpeq",!0),Nu(Su,Tu,Du,"≎","\\Bumpeq",!0),Nu(Su,Tu,Du,"≧","\\geqq",!0),
298
+ Nu(Su,Tu,Du,"⩾","\\geqslant",!0),Nu(Su,Tu,Du,"⪖","\\eqslantgtr",!0),Nu(Su,Tu,Du,"≳","\\gtrsim",!0),Nu(Su,Tu,Du,"⪆","\\gtrapprox",!0),Nu(Su,Tu,Mu,"⋗","\\gtrdot"),Nu(Su,Tu,Du,"⋙","\\ggg",!0),Nu(Su,Tu,Du,"≷","\\gtrless",!0),Nu(Su,Tu,Du,"⋛","\\gtreqless",!0),Nu(Su,Tu,Du,"⪌","\\gtreqqless",!0),Nu(Su,Tu,Du,"≖","\\eqcirc",!0),Nu(Su,Tu,Du,"≗","\\circeq",!0),Nu(Su,Tu,Du,"≜","\\triangleq",!0),Nu(Su,Tu,Du,"∼","\\thicksim"),Nu(Su,Tu,Du,"≈","\\thickapprox"),Nu(Su,Tu,Du,"⫆","\\supseteqq",!0),Nu(Su,Tu,Du,"⋑","\\Supset",!0),Nu(Su,Tu,Du,"⊐","\\sqsupset",!0),Nu(Su,Tu,Du,"≽","\\succcurlyeq",!0),Nu(Su,Tu,Du,"⋟","\\curlyeqsucc",!0),Nu(Su,Tu,Du,"≿","\\succsim",!0),Nu(Su,Tu,Du,"⪸","\\succapprox",!0),Nu(Su,Tu,Du,"⊳","\\vartriangleright"),Nu(Su,Tu,Du,"⊵","\\trianglerighteq"),Nu(Su,Tu,Du,"⊩","\\Vdash",!0),Nu(Su,Tu,Du,"∣","\\shortmid"),Nu(Su,Tu,Du,"∥","\\shortparallel"),Nu(Su,Tu,Du,"≬","\\between",!0),Nu(Su,Tu,Du,"⋔","\\pitchfork",!0),Nu(Su,Tu,Du,"∝","\\varpropto"),Nu(Su,Tu,Du,"◀","\\blacktriangleleft"),
299
+ Nu(Su,Tu,Du,"∴","\\therefore",!0),Nu(Su,Tu,Du,"∍","\\backepsilon"),Nu(Su,Tu,Du,"▶","\\blacktriangleright"),Nu(Su,Tu,Du,"∵","\\because",!0),Nu(Su,Tu,Du,"⋘","\\llless"),Nu(Su,Tu,Du,"⋙","\\gggtr"),Nu(Su,Tu,Mu,"⊲","\\lhd"),Nu(Su,Tu,Mu,"⊳","\\rhd"),Nu(Su,Tu,Du,"≂","\\eqsim",!0),Nu(Su,Eu,Du,"⋈","\\Join"),Nu(Su,Tu,Du,"≑","\\Doteq",!0),Nu(Su,Tu,Mu,"∔","\\dotplus",!0),Nu(Su,Tu,Mu,"∖","\\smallsetminus"),Nu(Su,Tu,Mu,"⋒","\\Cap",!0),Nu(Su,Tu,Mu,"⋓","\\Cup",!0),Nu(Su,Tu,Mu,"⩞","\\doublebarwedge",!0),Nu(Su,Tu,Mu,"⊟","\\boxminus",!0),Nu(Su,Tu,Mu,"⊞","\\boxplus",!0),Nu(Su,Tu,Mu,"⋇","\\divideontimes",!0),Nu(Su,Tu,Mu,"⋉","\\ltimes",!0),Nu(Su,Tu,Mu,"⋊","\\rtimes",!0),Nu(Su,Tu,Mu,"⋋","\\leftthreetimes",!0),Nu(Su,Tu,Mu,"⋌","\\rightthreetimes",!0),Nu(Su,Tu,Mu,"⋏","\\curlywedge",!0),Nu(Su,Tu,Mu,"⋎","\\curlyvee",!0),Nu(Su,Tu,Mu,"⊝","\\circleddash",!0),Nu(Su,Tu,Mu,"⊛","\\circledast",!0),Nu(Su,Tu,Mu,"⋅","\\centerdot"),Nu(Su,Tu,Mu,"⊺","\\intercal",!0),Nu(Su,Tu,Mu,"⋒","\\doublecap"),Nu(Su,Tu,Mu,"⋓","\\doublecup"),
300
+ Nu(Su,Tu,Mu,"⊠","\\boxtimes",!0),Nu(Su,Tu,Du,"⇢","\\dashrightarrow",!0),Nu(Su,Tu,Du,"⇠","\\dashleftarrow",!0),Nu(Su,Tu,Du,"⇇","\\leftleftarrows",!0),Nu(Su,Tu,Du,"⇆","\\leftrightarrows",!0),Nu(Su,Tu,Du,"⇚","\\Lleftarrow",!0),Nu(Su,Tu,Du,"↞","\\twoheadleftarrow",!0),Nu(Su,Tu,Du,"↢","\\leftarrowtail",!0),Nu(Su,Tu,Du,"↫","\\looparrowleft",!0),Nu(Su,Tu,Du,"⇋","\\leftrightharpoons",!0),Nu(Su,Tu,Du,"↶","\\curvearrowleft",!0),Nu(Su,Tu,Du,"↺","\\circlearrowleft",!0),Nu(Su,Tu,Du,"↰","\\Lsh",!0),Nu(Su,Tu,Du,"⇈","\\upuparrows",!0),Nu(Su,Tu,Du,"↿","\\upharpoonleft",!0),Nu(Su,Tu,Du,"⇃","\\downharpoonleft",!0),Nu(Su,Eu,Du,"⊶","\\origof",!0),Nu(Su,Eu,Du,"⊷","\\imageof",!0),Nu(Su,Tu,Du,"⊸","\\multimap",!0),Nu(Su,Tu,Du,"↭","\\leftrightsquigarrow",!0),Nu(Su,Tu,Du,"⇉","\\rightrightarrows",!0),Nu(Su,Tu,Du,"⇄","\\rightleftarrows",!0),Nu(Su,Tu,Du,"↠","\\twoheadrightarrow",!0),Nu(Su,Tu,Du,"↣","\\rightarrowtail",!0),Nu(Su,Tu,Du,"↬","\\looparrowright",!0),Nu(Su,Tu,Du,"↷","\\curvearrowright",!0),
301
+ Nu(Su,Tu,Du,"↻","\\circlearrowright",!0),Nu(Su,Tu,Du,"↱","\\Rsh",!0),Nu(Su,Tu,Du,"⇊","\\downdownarrows",!0),Nu(Su,Tu,Du,"↾","\\upharpoonright",!0),Nu(Su,Tu,Du,"⇂","\\downharpoonright",!0),Nu(Su,Tu,Du,"⇝","\\rightsquigarrow",!0),Nu(Su,Tu,Du,"⇝","\\leadsto"),Nu(Su,Tu,Du,"⇛","\\Rrightarrow",!0),Nu(Su,Tu,Du,"↾","\\restriction"),Nu(Su,Eu,Hu,"‘","`"),Nu(Su,Eu,Hu,"$","\\$"),Nu(Au,Eu,Hu,"$","\\$"),Nu(Au,Eu,Hu,"$","\\textdollar"),Nu(Su,Eu,Hu,"%","\\%"),Nu(Au,Eu,Hu,"%","\\%"),Nu(Su,Eu,Hu,"_","\\_"),Nu(Au,Eu,Hu,"_","\\_"),Nu(Au,Eu,Hu,"_","\\textunderscore"),Nu(Su,Eu,Hu,"∠","\\angle",!0),Nu(Su,Eu,Hu,"∞","\\infty",!0),Nu(Su,Eu,Hu,"′","\\prime"),Nu(Su,Eu,Hu,"△","\\triangle"),Nu(Su,Eu,Hu,"Γ","\\Gamma",!0),Nu(Su,Eu,Hu,"Δ","\\Delta",!0),Nu(Su,Eu,Hu,"Θ","\\Theta",!0),Nu(Su,Eu,Hu,"Λ","\\Lambda",!0),Nu(Su,Eu,Hu,"Ξ","\\Xi",!0),Nu(Su,Eu,Hu,"Π","\\Pi",!0),Nu(Su,Eu,Hu,"Σ","\\Sigma",!0),Nu(Su,Eu,Hu,"Υ","\\Upsilon",!0),Nu(Su,Eu,Hu,"Φ","\\Phi",!0),Nu(Su,Eu,Hu,"Ψ","\\Psi",!0),Nu(Su,Eu,Hu,"Ω","\\Omega",!0),Nu(Su,Eu,Hu,"A","Α"),
302
+ Nu(Su,Eu,Hu,"B","Β"),Nu(Su,Eu,Hu,"E","Ε"),Nu(Su,Eu,Hu,"Z","Ζ"),Nu(Su,Eu,Hu,"H","Η"),Nu(Su,Eu,Hu,"I","Ι"),Nu(Su,Eu,Hu,"K","Κ"),Nu(Su,Eu,Hu,"M","Μ"),Nu(Su,Eu,Hu,"N","Ν"),Nu(Su,Eu,Hu,"O","Ο"),Nu(Su,Eu,Hu,"P","Ρ"),Nu(Su,Eu,Hu,"T","Τ"),Nu(Su,Eu,Hu,"X","Χ"),Nu(Su,Eu,Hu,"¬","\\neg",!0),Nu(Su,Eu,Hu,"¬","\\lnot"),Nu(Su,Eu,Hu,"⊤","\\top"),Nu(Su,Eu,Hu,"⊥","\\bot"),Nu(Su,Eu,Hu,"∅","\\emptyset"),Nu(Su,Tu,Hu,"∅","\\varnothing"),Nu(Su,Eu,Lu,"α","\\alpha",!0),Nu(Su,Eu,Lu,"β","\\beta",!0),Nu(Su,Eu,Lu,"γ","\\gamma",!0),Nu(Su,Eu,Lu,"δ","\\delta",!0),Nu(Su,Eu,Lu,"ϵ","\\epsilon",!0),Nu(Su,Eu,Lu,"ζ","\\zeta",!0),Nu(Su,Eu,Lu,"η","\\eta",!0),Nu(Su,Eu,Lu,"θ","\\theta",!0),Nu(Su,Eu,Lu,"ι","\\iota",!0),Nu(Su,Eu,Lu,"κ","\\kappa",!0),Nu(Su,Eu,Lu,"λ","\\lambda",!0),Nu(Su,Eu,Lu,"μ","\\mu",!0),Nu(Su,Eu,Lu,"ν","\\nu",!0),Nu(Su,Eu,Lu,"ξ","\\xi",!0),Nu(Su,Eu,Lu,"ο","\\omicron",!0),Nu(Su,Eu,Lu,"π","\\pi",!0),Nu(Su,Eu,Lu,"ρ","\\rho",!0),Nu(Su,Eu,Lu,"σ","\\sigma",!0),Nu(Su,Eu,Lu,"τ","\\tau",!0),Nu(Su,Eu,Lu,"υ","\\upsilon",!0),
303
+ Nu(Su,Eu,Lu,"ϕ","\\phi",!0),Nu(Su,Eu,Lu,"χ","\\chi",!0),Nu(Su,Eu,Lu,"ψ","\\psi",!0),Nu(Su,Eu,Lu,"ω","\\omega",!0),Nu(Su,Eu,Lu,"ε","\\varepsilon",!0),Nu(Su,Eu,Lu,"ϑ","\\vartheta",!0),Nu(Su,Eu,Lu,"ϖ","\\varpi",!0),Nu(Su,Eu,Lu,"ϱ","\\varrho",!0),Nu(Su,Eu,Lu,"ς","\\varsigma",!0),Nu(Su,Eu,Lu,"φ","\\varphi",!0),Nu(Su,Eu,Mu,"∗","*",!0),Nu(Su,Eu,Mu,"+","+"),Nu(Su,Eu,Mu,"−","-",!0),Nu(Su,Eu,Mu,"⋅","\\cdot",!0),Nu(Su,Eu,Mu,"∘","\\circ",!0),Nu(Su,Eu,Mu,"÷","\\div",!0),Nu(Su,Eu,Mu,"±","\\pm",!0),Nu(Su,Eu,Mu,"×","\\times",!0),Nu(Su,Eu,Mu,"∩","\\cap",!0),Nu(Su,Eu,Mu,"∪","\\cup",!0),Nu(Su,Eu,Mu,"∖","\\setminus",!0),Nu(Su,Eu,Mu,"∧","\\land"),Nu(Su,Eu,Mu,"∨","\\lor"),Nu(Su,Eu,Mu,"∧","\\wedge",!0),Nu(Su,Eu,Mu,"∨","\\vee",!0),Nu(Su,Eu,Hu,"√","\\surd"),Nu(Su,Eu,Ru,"⟨","\\langle",!0),Nu(Su,Eu,Ru,"∣","\\lvert"),Nu(Su,Eu,Ru,"∥","\\lVert"),Nu(Su,Eu,Iu,"?","?"),Nu(Su,Eu,Iu,"!","!"),Nu(Su,Eu,Iu,"⟩","\\rangle",!0),Nu(Su,Eu,Iu,"∣","\\rvert"),Nu(Su,Eu,Iu,"∥","\\rVert"),Nu(Su,Eu,Du,"=","="),Nu(Su,Eu,Du,":",":"),
304
+ Nu(Su,Eu,Du,"≈","\\approx",!0),Nu(Su,Eu,Du,"≅","\\cong",!0),Nu(Su,Eu,Du,"≥","\\ge"),Nu(Su,Eu,Du,"≥","\\geq",!0),Nu(Su,Eu,Du,"←","\\gets"),Nu(Su,Eu,Du,">","\\gt",!0),Nu(Su,Eu,Du,"∈","\\in",!0),Nu(Su,Eu,Du,"","\\@not"),Nu(Su,Eu,Du,"⊂","\\subset",!0),Nu(Su,Eu,Du,"⊃","\\supset",!0),Nu(Su,Eu,Du,"⊆","\\subseteq",!0),Nu(Su,Eu,Du,"⊇","\\supseteq",!0),Nu(Su,Tu,Du,"⊈","\\nsubseteq",!0),Nu(Su,Tu,Du,"⊉","\\nsupseteq",!0),Nu(Su,Eu,Du,"⊨","\\models"),Nu(Su,Eu,Du,"←","\\leftarrow",!0),Nu(Su,Eu,Du,"≤","\\le"),Nu(Su,Eu,Du,"≤","\\leq",!0),Nu(Su,Eu,Du,"<","\\lt",!0),Nu(Su,Eu,Du,"→","\\rightarrow",!0),Nu(Su,Eu,Du,"→","\\to"),Nu(Su,Tu,Du,"≱","\\ngeq",!0),Nu(Su,Tu,Du,"≰","\\nleq",!0),Nu(Su,Eu,Fu," ","\\ "),Nu(Su,Eu,Fu," ","\\space"),Nu(Su,Eu,Fu," ","\\nobreakspace"),Nu(Au,Eu,Fu," ","\\ "),Nu(Au,Eu,Fu," "," "),Nu(Au,Eu,Fu," ","\\space"),Nu(Au,Eu,Fu," ","\\nobreakspace"),Nu(Su,Eu,Fu,null,"\\nobreak"),Nu(Su,Eu,Fu,null,"\\allowbreak"),Nu(Su,Eu,Pu,",",","),Nu(Su,Eu,Pu,";",";"),Nu(Su,Tu,Mu,"⊼","\\barwedge",!0),
305
+ Nu(Su,Tu,Mu,"⊻","\\veebar",!0),Nu(Su,Eu,Mu,"⊙","\\odot",!0),Nu(Su,Eu,Mu,"⊕","\\oplus",!0),Nu(Su,Eu,Mu,"⊗","\\otimes",!0),Nu(Su,Eu,Hu,"∂","\\partial",!0),Nu(Su,Eu,Mu,"⊘","\\oslash",!0),Nu(Su,Tu,Mu,"⊚","\\circledcirc",!0),Nu(Su,Tu,Mu,"⊡","\\boxdot",!0),Nu(Su,Eu,Mu,"△","\\bigtriangleup"),Nu(Su,Eu,Mu,"▽","\\bigtriangledown"),Nu(Su,Eu,Mu,"†","\\dagger"),Nu(Su,Eu,Mu,"⋄","\\diamond"),Nu(Su,Eu,Mu,"⋆","\\star"),Nu(Su,Eu,Mu,"◃","\\triangleleft"),Nu(Su,Eu,Mu,"▹","\\triangleright"),Nu(Su,Eu,Ru,"{","\\{"),Nu(Au,Eu,Hu,"{","\\{"),Nu(Au,Eu,Hu,"{","\\textbraceleft"),Nu(Su,Eu,Iu,"}","\\}"),Nu(Au,Eu,Hu,"}","\\}"),Nu(Au,Eu,Hu,"}","\\textbraceright"),Nu(Su,Eu,Ru,"{","\\lbrace"),Nu(Su,Eu,Iu,"}","\\rbrace"),Nu(Su,Eu,Ru,"[","\\lbrack",!0),Nu(Au,Eu,Hu,"[","\\lbrack",!0),Nu(Su,Eu,Iu,"]","\\rbrack",!0),Nu(Au,Eu,Hu,"]","\\rbrack",!0),Nu(Su,Eu,Ru,"(","\\lparen",!0),Nu(Su,Eu,Iu,")","\\rparen",!0),Nu(Au,Eu,Hu,"<","\\textless",!0),Nu(Au,Eu,Hu,">","\\textgreater",!0),Nu(Su,Eu,Ru,"⌊","\\lfloor",!0),Nu(Su,Eu,Iu,"⌋","\\rfloor",!0),
306
+ Nu(Su,Eu,Ru,"⌈","\\lceil",!0),Nu(Su,Eu,Iu,"⌉","\\rceil",!0),Nu(Su,Eu,Hu,"\\","\\backslash"),Nu(Su,Eu,Hu,"∣","|"),Nu(Su,Eu,Hu,"∣","\\vert"),Nu(Au,Eu,Hu,"|","\\textbar",!0),Nu(Su,Eu,Hu,"∥","\\|"),Nu(Su,Eu,Hu,"∥","\\Vert"),Nu(Au,Eu,Hu,"∥","\\textbardbl"),Nu(Au,Eu,Hu,"~","\\textasciitilde"),Nu(Au,Eu,Hu,"\\","\\textbackslash"),Nu(Au,Eu,Hu,"^","\\textasciicircum"),Nu(Su,Eu,Du,"↑","\\uparrow",!0),Nu(Su,Eu,Du,"⇑","\\Uparrow",!0),Nu(Su,Eu,Du,"↓","\\downarrow",!0),Nu(Su,Eu,Du,"⇓","\\Downarrow",!0),Nu(Su,Eu,Du,"↕","\\updownarrow",!0),Nu(Su,Eu,Du,"⇕","\\Updownarrow",!0),Nu(Su,Eu,Ou,"∐","\\coprod"),Nu(Su,Eu,Ou,"⋁","\\bigvee"),Nu(Su,Eu,Ou,"⋀","\\bigwedge"),Nu(Su,Eu,Ou,"⨄","\\biguplus"),Nu(Su,Eu,Ou,"⋂","\\bigcap"),Nu(Su,Eu,Ou,"⋃","\\bigcup"),Nu(Su,Eu,Ou,"∫","\\int"),Nu(Su,Eu,Ou,"∫","\\intop"),Nu(Su,Eu,Ou,"∬","\\iint"),Nu(Su,Eu,Ou,"∭","\\iiint"),Nu(Su,Eu,Ou,"∏","\\prod"),Nu(Su,Eu,Ou,"∑","\\sum"),Nu(Su,Eu,Ou,"⨂","\\bigotimes"),Nu(Su,Eu,Ou,"⨁","\\bigoplus"),Nu(Su,Eu,Ou,"⨀","\\bigodot"),Nu(Su,Eu,Ou,"∮","\\oint"),
307
+ Nu(Su,Eu,Ou,"∯","\\oiint"),Nu(Su,Eu,Ou,"∰","\\oiiint"),Nu(Su,Eu,Ou,"⨆","\\bigsqcup"),Nu(Su,Eu,Ou,"∫","\\smallint"),Nu(Au,Eu,zu,"…","\\textellipsis"),Nu(Su,Eu,zu,"…","\\mathellipsis"),Nu(Au,Eu,zu,"…","\\ldots",!0),Nu(Su,Eu,zu,"…","\\ldots",!0),Nu(Su,Eu,zu,"⋯","\\@cdots",!0),Nu(Su,Eu,zu,"⋱","\\ddots",!0),Nu(Su,Eu,Hu,"⋮","\\varvdots"),Nu(Au,Eu,Hu,"⋮","\\varvdots"),Nu(Su,Eu,Cu,"ˊ","\\acute"),Nu(Su,Eu,Cu,"ˋ","\\grave"),Nu(Su,Eu,Cu,"¨","\\ddot"),Nu(Su,Eu,Cu,"~","\\tilde"),Nu(Su,Eu,Cu,"ˉ","\\bar"),Nu(Su,Eu,Cu,"˘","\\breve"),Nu(Su,Eu,Cu,"ˇ","\\check"),Nu(Su,Eu,Cu,"^","\\hat"),Nu(Su,Eu,Cu,"⃗","\\vec"),Nu(Su,Eu,Cu,"˙","\\dot"),Nu(Su,Eu,Cu,"˚","\\mathring"),Nu(Su,Eu,Lu,"","\\@imath"),Nu(Su,Eu,Lu,"","\\@jmath"),Nu(Su,Eu,Hu,"ı","ı"),Nu(Su,Eu,Hu,"ȷ","ȷ"),Nu(Au,Eu,Hu,"ı","\\i",!0),Nu(Au,Eu,Hu,"ȷ","\\j",!0),Nu(Au,Eu,Hu,"ß","\\ss",!0),Nu(Au,Eu,Hu,"æ","\\ae",!0),Nu(Au,Eu,Hu,"œ","\\oe",!0),Nu(Au,Eu,Hu,"ø","\\o",!0),Nu(Au,Eu,Hu,"Æ","\\AE",!0),Nu(Au,Eu,Hu,"Œ","\\OE",!0),Nu(Au,Eu,Hu,"Ø","\\O",!0),Nu(Au,Eu,Cu,"ˊ","\\'"),
308
+ Nu(Au,Eu,Cu,"ˋ","\\`"),Nu(Au,Eu,Cu,"ˆ","\\^"),Nu(Au,Eu,Cu,"˜","\\~"),Nu(Au,Eu,Cu,"ˉ","\\="),Nu(Au,Eu,Cu,"˘","\\u"),Nu(Au,Eu,Cu,"˙","\\."),Nu(Au,Eu,Cu,"¸","\\c"),Nu(Au,Eu,Cu,"˚","\\r"),Nu(Au,Eu,Cu,"ˇ","\\v"),Nu(Au,Eu,Cu,"¨",'\\"'),Nu(Au,Eu,Cu,"˝","\\H"),Nu(Au,Eu,Cu,"◯","\\textcircled");var Bu={"--":!0,"---":!0,"``":!0,"''":!0};Nu(Au,Eu,Hu,"–","--",!0),Nu(Au,Eu,Hu,"–","\\textendash"),Nu(Au,Eu,Hu,"—","---",!0),Nu(Au,Eu,Hu,"—","\\textemdash"),Nu(Au,Eu,Hu,"‘","`",!0),Nu(Au,Eu,Hu,"‘","\\textquoteleft"),Nu(Au,Eu,Hu,"’","'",!0),Nu(Au,Eu,Hu,"’","\\textquoteright"),Nu(Au,Eu,Hu,"“","``",!0),Nu(Au,Eu,Hu,"“","\\textquotedblleft"),Nu(Au,Eu,Hu,"”","''",!0),Nu(Au,Eu,Hu,"”","\\textquotedblright"),Nu(Su,Eu,Hu,"°","\\degree",!0),Nu(Au,Eu,Hu,"°","\\degree"),Nu(Au,Eu,Hu,"°","\\textdegree",!0),Nu(Su,Eu,Hu,"£","\\pounds"),Nu(Su,Eu,Hu,"£","\\mathsterling",!0),Nu(Au,Eu,Hu,"£","\\pounds"),Nu(Au,Eu,Hu,"£","\\textsterling",!0),Nu(Su,Tu,Hu,"✠","\\maltese"),Nu(Au,Tu,Hu,"✠","\\maltese");for(var $u='0123456789/@."',ju=0;ju<14;ju++){
309
+ var qu=$u.charAt(ju);Nu(Su,Eu,Hu,qu,qu)}for(var Uu='0123456789!@*()-=+";:?/.,',Gu=0;Gu<25;Gu++){var Vu=Uu.charAt(Gu);Nu(Au,Eu,Hu,Vu,Vu)}for(var Wu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ku=0;Ku<52;Ku++){var Yu=Wu.charAt(Ku);Nu(Su,Eu,Lu,Yu,Yu),Nu(Au,Eu,Hu,Yu,Yu)}Nu(Su,Tu,Hu,"C","ℂ"),Nu(Au,Tu,Hu,"C","ℂ"),Nu(Su,Tu,Hu,"H","ℍ"),Nu(Au,Tu,Hu,"H","ℍ"),Nu(Su,Tu,Hu,"N","ℕ"),Nu(Au,Tu,Hu,"N","ℕ"),Nu(Su,Tu,Hu,"P","ℙ"),Nu(Au,Tu,Hu,"P","ℙ"),Nu(Su,Tu,Hu,"Q","ℚ"),Nu(Au,Tu,Hu,"Q","ℚ"),Nu(Su,Tu,Hu,"R","ℝ"),Nu(Au,Tu,Hu,"R","ℝ"),Nu(Su,Tu,Hu,"Z","ℤ"),Nu(Au,Tu,Hu,"Z","ℤ"),Nu(Su,Eu,Lu,"h","ℎ"),Nu(Au,Eu,Lu,"h","ℎ");for(var Xu="",Zu=0;Zu<52;Zu++){var Ju=Wu.charAt(Zu);Nu(Su,Eu,Lu,Ju,Xu=String.fromCharCode(55349,56320+Zu)),Nu(Au,Eu,Hu,Ju,Xu),Nu(Su,Eu,Lu,Ju,Xu=String.fromCharCode(55349,56372+Zu)),Nu(Au,Eu,Hu,Ju,Xu),Nu(Su,Eu,Lu,Ju,Xu=String.fromCharCode(55349,56424+Zu)),Nu(Au,Eu,Hu,Ju,Xu),Nu(Su,Eu,Lu,Ju,Xu=String.fromCharCode(55349,56580+Zu)),Nu(Au,Eu,Hu,Ju,Xu),Nu(Su,Eu,Lu,Ju,Xu=String.fromCharCode(55349,56684+Zu)),
310
+ Nu(Au,Eu,Hu,Ju,Xu),Nu(Su,Eu,Lu,Ju,Xu=String.fromCharCode(55349,56736+Zu)),Nu(Au,Eu,Hu,Ju,Xu),Nu(Su,Eu,Lu,Ju,Xu=String.fromCharCode(55349,56788+Zu)),Nu(Au,Eu,Hu,Ju,Xu),Nu(Su,Eu,Lu,Ju,Xu=String.fromCharCode(55349,56840+Zu)),Nu(Au,Eu,Hu,Ju,Xu),Nu(Su,Eu,Lu,Ju,Xu=String.fromCharCode(55349,56944+Zu)),Nu(Au,Eu,Hu,Ju,Xu),Zu<26&&(Nu(Su,Eu,Lu,Ju,Xu=String.fromCharCode(55349,56632+Zu)),Nu(Au,Eu,Hu,Ju,Xu),Nu(Su,Eu,Lu,Ju,Xu=String.fromCharCode(55349,56476+Zu)),Nu(Au,Eu,Hu,Ju,Xu))}Nu(Su,Eu,Lu,"k",Xu=String.fromCharCode(55349,56668)),Nu(Au,Eu,Hu,"k",Xu);for(var Qu=0;Qu<10;Qu++){var ed=Qu.toString();Nu(Su,Eu,Lu,ed,Xu=String.fromCharCode(55349,57294+Qu)),Nu(Au,Eu,Hu,ed,Xu),Nu(Su,Eu,Lu,ed,Xu=String.fromCharCode(55349,57314+Qu)),Nu(Au,Eu,Hu,ed,Xu),Nu(Su,Eu,Lu,ed,Xu=String.fromCharCode(55349,57324+Qu)),Nu(Au,Eu,Hu,ed,Xu),Nu(Su,Eu,Lu,ed,Xu=String.fromCharCode(55349,57334+Qu)),Nu(Au,Eu,Hu,ed,Xu)}for(var td="ÐÞþ",nd=0;nd<3;nd++){var rd=td.charAt(nd);Nu(Su,Eu,Lu,rd,rd),Nu(Au,Eu,Hu,rd,rd)}
311
+ var od=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],id=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],ad=function(e,t,n){
312
+ return ku[n][e]&&ku[n][e].replace&&(e=ku[n][e].replace),{value:e,metrics:Xc(e,t,n)}},sd=function(e,t,n,r,o){var i,a=ad(e,t,n),s=a.metrics;if(e=a.value,s){var l=s.italic;("text"===n||r&&"mathit"===r.font)&&(l=0),i=new gu(e,s.height,s.depth,l,s.skew,s.width,o)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+n+"'"),i=new gu(e,0,0,0,0,0,o);if(r){i.maxFontSize=r.sizeMultiplier,r.style.isTight()&&i.classes.push("mtight");var c=r.getColor();c&&(i.style.color=c)}return i},ld=(e,t)=>{if(su(e.classes)!==su(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var n=e.classes[0];if("mbin"===n||"mord"===n)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var o in t.style)if(t.style.hasOwnProperty(o)&&e.style[o]!==t.style[o])return!1;return!0},cd=function(e){for(var t=0,n=0,r=0,o=0;o<e.children.length;o++){var i=e.children[o];i.height>t&&(t=i.height),i.depth>n&&(n=i.depth),
313
+ i.maxFontSize>r&&(r=i.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},ud=function(e,t,n,r){var o=new hu(e,t,n,r);return cd(o),o},dd=(e,t,n,r)=>new hu(e,t,n,r),hd=function(e){var t=new Vc(e);return cd(t),t},md=function(e,t,n){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return r+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},pd={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",
314
+ fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},fd={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},gd={fontMap:pd,makeSymbol:sd,mathsym:function(e,t,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&ad(e,"Main-Bold",t).metrics?sd(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===ku[t][e].font?sd(e,"Main-Regular",t,n,r):sd(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},makeSpan:ud,makeSvgSpan:dd,makeLineSpan:function(e,t,n){var r=ud([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=au(r.height),r.maxFontSize=1,r},makeAnchor:function(e,t,n,r){var o=new mu(e,t,n,r);return cd(o),o},makeFragment:hd,wrapFragment:function(e,t){return e instanceof Vc?ud([],[e],t):e},makeVList:function(e,t){
315
+ for(var{children:n,depth:r}=function(e){if("individualShift"===e.positionType){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,o=r,i=1;i<t.length;i++){var a=-t[i].shift-o-t[i].elem.depth,s=a-(t[i-1].elem.height+t[i-1].elem.depth);o+=a,n.push({type:"kern",size:s}),n.push(t[i])}return{children:n,depth:r}}var l;if("top"===e.positionType){for(var c=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];c-="kern"===d.type?d.size:d.elem.height+d.elem.depth}l=c}else if("bottom"===e.positionType)l=-e.positionData;else{var h=e.children[0];if("elem"!==h.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-h.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-h.elem.depth}}return{children:e.children,depth:l}}(e),o=0,i=0;i<n.length;i++){var a=n[i];if("elem"===a.type){var s=a.elem;o=Math.max(o,s.maxFontSize,s.height)}}o+=2;var l=ud(["pstrut"],[]);l.style.height=au(o)
316
+ ;for(var c=[],u=r,d=r,h=r,m=0;m<n.length;m++){var p=n[m];if("kern"===p.type)h+=p.size;else{var f=p.elem,g=p.wrapperClasses||[],v=p.wrapperStyle||{},b=ud(g,[l,f],void 0,v);b.style.top=au(-o-h-f.depth),p.marginLeft&&(b.style.marginLeft=p.marginLeft),p.marginRight&&(b.style.marginRight=p.marginRight),c.push(b),h+=f.height+f.depth}u=Math.min(u,h),d=Math.max(d,h)}var y,_=ud(["vlist"],c);if(_.style.height=au(d),u<0){var w=ud([],[]),x=ud(["vlist"],[w]);x.style.height=au(-u);var k=ud(["vlist-s"],[new gu("​")]);y=[ud(["vlist-r"],[_,k]),ud(["vlist-r"],[x])]}else y=[ud(["vlist-r"],[_])];var N=ud(["vlist-t"],y);return 2===y.length&&N.classes.push("vlist-t2"),N.height=d,N.depth=-u,N},makeOrd:function(e,t,n){var r=e.mode,o=e.text,i=["mord"],a="math"===r||"text"===r&&t.font,s=a?t.font:t.fontFamily,l="",c="";if(55349===o.charCodeAt(0)&&([l,c]=function(e,t){var n=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,r="math"===t?0:1;if(119808<=n&&n<120484){var o=Math.floor((n-119808)/26);return[od[o][2],od[o][r]]}
317
+ if(120782<=n&&n<=120831){var i=Math.floor((n-120782)/10);return[id[i][2],id[i][r]]}if(120485===n||120486===n)return[od[0][2],od[0][r]];if(120486<n&&n<120782)return["",""];throw new kc("Unsupported character: "+e)}(o,r)),l.length>0)return sd(o,l,r,t,i.concat(c));if(s){var u,d;if("boldsymbol"===s){var h=function(e,t,n,r,o){return"textord"!==o&&ad(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(o,r,0,0,n);u=h.fontName,d=[h.fontClass]}else a?(u=pd[s].fontName,d=[s]):(u=md(s,t.fontWeight,t.fontShape),d=[s,t.fontWeight,t.fontShape]);if(ad(o,u,r).metrics)return sd(o,u,r,t,i.concat(d));if(Bu.hasOwnProperty(o)&&"Typewriter"===u.slice(0,10)){for(var m=[],p=0;p<o.length;p++)m.push(sd(o[p],u,r,t,i.concat(d)));return hd(m)}}if("mathord"===n)return sd(o,"Math-Italic",r,t,i.concat(["mathnormal"]));if("textord"===n){var f=ku[r][o]&&ku[r][o].font;if("ams"===f){var g=md("amsrm",t.fontWeight,t.fontShape)
318
+ ;return sd(o,g,r,t,i.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==f&&f){var v=md(f,t.fontWeight,t.fontShape);return sd(o,v,r,t,i.concat(v,t.fontWeight,t.fontShape))}var b=md("textrm",t.fontWeight,t.fontShape);return sd(o,b,r,t,i.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+n+" in makeOrd")},makeGlue:(e,t)=>{var n=ud(["mspace"],[],t),r=iu(e,t);return n.style.marginRight=au(r),n},staticSvg:function(e,t){var[n,r,o]=fd[e],i=new bu(n),a=new vu([i],{width:au(r),height:au(o),style:"width:"+au(r),viewBox:"0 0 "+1e3*r+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),s=dd(["overlay"],[a],t);return s.height=o,s.style.height=au(o),s.style.width=au(r),s},svgData:fd,tryCombineChars:e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof gu&&r instanceof gu&&ld(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e}},vd={number:3,unit:"mu"},bd={number:4,unit:"mu"},yd={number:5,unit:"mu"},_d={mord:{
319
+ mop:vd,mbin:bd,mrel:yd,minner:vd},mop:{mord:vd,mop:vd,mrel:yd,minner:vd},mbin:{mord:bd,mop:bd,mopen:bd,minner:bd},mrel:{mord:yd,mop:yd,mopen:yd,minner:yd},mopen:{},mclose:{mop:vd,mbin:bd,mrel:yd,minner:vd},mpunct:{mord:vd,mop:vd,mrel:yd,mopen:vd,mclose:vd,mpunct:vd,minner:vd},minner:{mord:vd,mop:vd,mbin:bd,mrel:yd,mopen:vd,mpunct:vd,minner:vd}},wd={mord:{mop:vd},mop:{mord:vd,mop:vd},mbin:{},mrel:{},mopen:{},mclose:{mop:vd},mpunct:{},minner:{mop:vd}},xd={},kd={},Nd={};function Sd(e){for(var{type:t,names:n,props:r,handler:o,htmlBuilder:i,mathmlBuilder:a}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:o},l=0;l<n.length;++l)xd[n[l]]=s;t&&(i&&(kd[t]=i),a&&(Nd[t]=a))}function Ad(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;Sd({type:t,names:[],props:{numArgs:0},handler(){
320
+ throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var Ed=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},Td=function(e){return"ordgroup"===e.type?e.body:[e]},Cd=gd.makeSpan,Md=["leftmost","mbin","mopen","mrel","mop","mpunct"],Id=["rightmost","mrel","mclose","mpunct"],zd={display:Bc.DISPLAY,text:Bc.TEXT,script:Bc.SCRIPT,scriptscript:Bc.SCRIPTSCRIPT},Ld={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Od=function(e,t,n,r){void 0===r&&(r=[null,null]);for(var o=[],i=0;i<e.length;i++){var a=Bd(e[i],t);if(a instanceof Vc){var s=a.children;o.push(...s)}else o.push(a)}if(gd.tryCombineChars(o),!n)return o;var l=t;if(1===e.length){var c=e[0];"sizing"===c.type?l=t.havingSize(c.size):"styling"===c.type&&(l=t.havingStyle(zd[c.style]))}var u=Cd([r[0]||"leftmost"],[],t),d=Cd([r[1]||"rightmost"],[],t),h="root"===n;return Rd(o,((e,t)=>{var n=t.classes[0],r=e.classes[0]
321
+ ;"mbin"===n&&Tc.contains(Id,r)?t.classes[0]="mord":"mbin"===r&&Tc.contains(Md,n)&&(e.classes[0]="mord")}),{node:u},d,h),Rd(o,((e,t)=>{var n=Fd(t),r=Fd(e),o=n&&r?e.hasClass("mtight")?wd[n][r]:_d[n][r]:null;if(o)return gd.makeGlue(o,l)}),{node:u},d,h),o},Rd=function e(t,n,r,o,i){o&&t.push(o);for(var a=0;a<t.length;a++){var s=t[a],l=Pd(s);if(l)e(l.children,n,r,null,i);else{var c=!s.hasClass("mspace");if(c){var u=n(s,r.node);u&&(r.insertAfter?r.insertAfter(u):(t.unshift(u),a++))}c?r.node=s:i&&s.hasClass("newline")&&(r.node=Cd(["leftmost"])),r.insertAfter=(e=>n=>{t.splice(e+1,0,n),a++})(a)}}o&&t.pop()},Pd=function(e){return e instanceof Vc||e instanceof mu||e instanceof hu&&e.hasClass("enclosing")?e:null},Dd=function e(t,n){var r=Pd(t);if(r){var o=r.children;if(o.length){if("right"===n)return e(o[o.length-1],"right");if("left"===n)return e(o[0],"left")}}return t},Fd=function(e,t){return e?(t&&(e=Dd(e,t)),Ld[e.classes[0]]||null):null},Hd=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses())
322
+ ;return Cd(t.concat(n))},Bd=function(e,t,n){if(!e)return Cd();if(kd[e.type]){var r=kd[e.type](e,t);if(n&&t.size!==n.size){r=Cd(t.sizingClasses(n),[r],t);var o=t.sizeMultiplier/n.sizeMultiplier;r.height*=o,r.depth*=o}return r}throw new kc("Got group of unknown type: '"+e.type+"'")};function $d(e,t){var n=Cd(["base"],e,t),r=Cd(["strut"]);return r.style.height=au(n.height+n.depth),n.depth&&(r.style.verticalAlign=au(-n.depth)),n.children.unshift(r),n}function jd(e,t){var n=null;1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body);var r,o=Od(e,t,"root");2===o.length&&o[1].hasClass("tag")&&(r=o.pop());for(var i,a=[],s=[],l=0;l<o.length;l++)if(s.push(o[l]),o[l].hasClass("mbin")||o[l].hasClass("mrel")||o[l].hasClass("allowbreak")){for(var c=!1;l<o.length-1&&o[l+1].hasClass("mspace")&&!o[l+1].hasClass("newline");)l++,s.push(o[l]),o[l].hasClass("nobreak")&&(c=!0);c||(a.push($d(s,t)),s=[])}else o[l].hasClass("newline")&&(s.pop(),s.length>0&&(a.push($d(s,t)),s=[]),a.push(o[l]));s.length>0&&a.push($d(s,t)),
323
+ n?((i=$d(Od(n,t,!0))).classes=["tag"],a.push(i)):r&&a.push(r);var u=Cd(["katex-html"],a);if(u.setAttribute("aria-hidden","true"),i){var d=i.children[0];d.style.height=au(u.height+u.depth),u.depth&&(d.style.verticalAlign=au(-u.depth))}return u}function qd(e){return new Vc(e)}class Ud{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=su(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof Gd&&this.children[n+1]instanceof Gd){
324
+ for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof Gd;)r+=this.children[++n].toText();e.appendChild(new Gd(r).toNode())}else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=Tc.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+Tc.escape(su(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map((e=>e.toText())).join("")}}class Gd{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Tc.escape(this.toText())}toText(){return this.text}}var Vd={MathNode:Ud,TextNode:Gd,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,
325
+ this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?"  ":e>=-.05556&&e<=-.05555?" ⁣":e>=-.1667&&e<=-.1666?" ⁣":e>=-.2223&&e<=-.2222?" ⁣":e>=-.2778&&e<=-.2777?" ⁣":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",au(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+au(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:qd},Wd=function(e,t,n){return!ku[t][e]||!ku[t][e].replace||55349===e.charCodeAt(0)||Bu.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(e=ku[t][e].replace),new Vd.TextNode(e)},Kd=function(e){return 1===e.length?e[0]:new Vd.MathNode("mrow",e)},Yd=function(e,t){if("texttt"===t.fontFamily)return"monospace"
326
+ ;if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var n=t.font;if(!n||"mathnormal"===n)return null;var r=e.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathsfit"===n)return"sans-serif-italic";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";var o=e.text;return Tc.contains(["\\imath","\\jmath"],o)?null:(ku[r][o]&&ku[r][o].replace&&(o=ku[r][o].replace),Xc(o,gd.fontMap[n].fontName,r)?gd.fontMap[n].variant:null)};function Xd(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){
327
+ var t=e.children[0];return t instanceof Gd&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var n=e.children[0];return n instanceof Gd&&","===n.text}return!1}var Zd=function(e,t,n){if(1===e.length){var r=Qd(e[0],t);return n&&r instanceof Ud&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var o,i=[],a=0;a<e.length;a++){var s=Qd(e[a],t);if(s instanceof Ud&&o instanceof Ud){if("mtext"===s.type&&"mtext"===o.type&&s.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...s.children);continue}if("mn"===s.type&&"mn"===o.type){o.children.push(...s.children);continue}if(Xd(s)&&"mn"===o.type){o.children.push(...s.children);continue}if("mn"===s.type&&Xd(o))s.children=[...o.children,...s.children],i.pop();else if(("msup"===s.type||"msub"===s.type)&&s.children.length>=1&&("mn"===o.type||Xd(o))){var l=s.children[0]
328
+ ;l instanceof Ud&&"mn"===l.type&&(l.children=[...o.children,...l.children],i.pop())}else if("mi"===o.type&&1===o.children.length){var c=o.children[0];if(c instanceof Gd&&"̸"===c.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var u=s.children[0];u instanceof Gd&&u.text.length>0&&(u.text=u.text.slice(0,1)+"̸"+u.text.slice(1),i.pop())}}}i.push(s),o=s}return i},Jd=function(e,t,n){return Kd(Zd(e,t,n))},Qd=function(e,t){if(!e)return new Vd.MathNode("mrow");if(Nd[e.type])return Nd[e.type](e,t);throw new kc("Got group of unknown type: '"+e.type+"'")};function eh(e,t,n,r,o){var i,a=Zd(e,n);i=1===a.length&&a[0]instanceof Ud&&Tc.contains(["mrow","mtable"],a[0].type)?a[0]:new Vd.MathNode("mrow",a);var s=new Vd.MathNode("annotation",[new Vd.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var l=new Vd.MathNode("semantics",[i,s]),c=new Vd.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var u=o?"katex":"katex-mathml"
329
+ ;return gd.makeSpan([u],[c])}var th=function(e){return new tu({style:e.displayMode?Bc.DISPLAY:Bc.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},nh=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=gd.makeSpan(n,[e])}return e},rh={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋",
330
+ "\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},oh={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],
331
+ "\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],
332
+ undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},ih=function(e,t,n,r,o){var i,a=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(i=gd.makeSpan(["stretchy",t],[],o),"fbox"===t){var s=o.color&&o.getColor();s&&(i.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new yu({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new yu({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new vu(l,{width:"100%",height:au(a)});i=gd.makeSvgSpan([],[c],o)}return i.height=a,i.style.height=au(a),i},ah=function(e){var t=new Vd.MathNode("mo",[new Vd.TextNode(rh[e.replace(/^\\/,"")])])
333
+ ;return t.setAttribute("stretchy","true"),t},sh=function(e,t){var{span:n,minWidth:r,height:o}=function(){var n=4e5,r=e.label.slice(1);if(Tc.contains(["widehat","widecheck","widetilde","utilde"],r)){var o,i,a,s="ordgroup"===(m=e.base).type?m.body.length:1;if(s>5)"widehat"===r||"widecheck"===r?(o=420,n=2364,a=.42,i=r+"4"):(o=312,n=2340,a=.34,i="tilde4");else{var l=[1,1,2,2,3,3][s];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][l],o=[0,239,300,360,420][l],a=[0,.24,.3,.3,.36,.42][l],i=r+l):(n=[0,600,1033,2339,2340][l],o=[0,260,286,306,312][l],a=[0,.26,.286,.3,.306,.34][l],i="tilde"+l)}var c=new bu(i),u=new vu([c],{width:"100%",height:au(a),viewBox:"0 0 "+n+" "+o,preserveAspectRatio:"none"});return{span:gd.makeSvgSpan([],[u],t),minWidth:0,height:a}}var d,h,m,p=[],f=oh[r],[g,v,b]=f,y=b/1e3,_=g.length;if(1===_)d=["hide-tail"],h=[f[3]];else if(2===_)d=["halfarrow-left","halfarrow-right"],h=["xMinYMin","xMaxYMin"];else{
334
+ if(3!==_)throw new Error("Correct katexImagesData or update code here to support\n "+_+" children.");d=["brace-left","brace-center","brace-right"],h=["xMinYMin","xMidYMin","xMaxYMin"]}for(var w=0;w<_;w++){var x=new bu(g[w]),k=new vu([x],{width:"400em",height:au(y),viewBox:"0 0 "+n+" "+b,preserveAspectRatio:h[w]+" slice"}),N=gd.makeSvgSpan([d[w]],[k],t);if(1===_)return{span:N,minWidth:v,height:y};N.style.height=au(y),p.push(N)}return{span:gd.makeSpan(["stretchy"],p,t),minWidth:v,height:y}}();return n.height=o,n.style.height=au(o),r>0&&(n.style.minWidth=au(r)),n};function lh(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function ch(e){var t=uh(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function uh(e){return e&&("atom"===e.type||xu.hasOwnProperty(e.type))?e:null}var dh=(e,t)=>{var n,r,o;e&&"supsub"===e.type?(n=(r=lh(e.base,"accent")).base,
335
+ e.base=n,o=function(e){if(e instanceof hu)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(Bd(e,t)),e.base=r):n=(r=lh(e,"accent")).base;var i=Bd(n,t.havingCrampedStyle()),a=0;if(r.isShifty&&Tc.isCharacterBox(n)){var s=Tc.getBaseElem(n);a=_u(Bd(s,t.havingCrampedStyle())).skew}var l,c="\\c"===r.label,u=c?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight);if(r.isStretchy)l=sh(r,t),l=gd.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+au(2*a)+")",marginLeft:au(2*a)}:void 0}]},t);else{var d,h;"\\vec"===r.label?(d=gd.staticSvg("vec",t),h=gd.svgData.vec[1]):((d=_u(d=gd.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,h=d.width,c&&(u+=d.depth)),l=gd.makeSpan(["accent-body"],[d]);var m="\\textcircled"===r.label;m&&(l.classes.push("accent-full"),u=i.height);var p=a;m||(p-=h/2),l.style.left=au(p),"\\textcircled"===r.label&&(l.style.top=".2em"),l=gd.makeVList({
336
+ positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-u},{type:"elem",elem:l}]},t)}var f=gd.makeSpan(["mord","accent"],[l],t);return o?(o.children[0]=f,o.height=Math.max(f.height,o.height),o.classes[0]="mord",o):f},hh=(e,t)=>{var n=e.isStretchy?ah(e.label):new Vd.MathNode("mo",[Wd(e.label,e.mode)]),r=new Vd.MathNode("mover",[Qd(e.base,t),n]);return r.setAttribute("accent","true"),r},mh=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));Sd({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{
337
+ var n=Ed(t[0]),r=!mh.test(e.funcName),o=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:o,base:n}},htmlBuilder:dh,mathmlBuilder:hh}),Sd({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:dh,mathmlBuilder:hh}),Sd({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:o}},htmlBuilder:(e,t)=>{
338
+ var n=Bd(e.base,t),r=sh(e,t),o="\\utilde"===e.label?.12:0,i=gd.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:n}]},t);return gd.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var n=ah(e.label),r=new Vd.MathNode("munder",[Qd(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var ph=e=>{var t=new Vd.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Sd({type:"xArrow",
339
+ names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:o}=e;return{type:"xArrow",mode:r.mode,label:o,body:t[0],below:n[0]}},htmlBuilder(e,t){var n,r=t.style,o=t.havingStyle(r.sup()),i=gd.wrapFragment(Bd(e.body,o,t),t),a="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(a+"-arrow-pad"),e.below&&(o=t.havingStyle(r.sub()),(n=gd.wrapFragment(Bd(e.below,o,t),t)).classes.push(a+"-arrow-pad"));var s,l=sh(e,t),c=-t.fontMetrics().axisHeight+.5*l.height,u=-t.fontMetrics().axisHeight-.5*l.height-.111
340
+ ;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(u-=i.depth),n){var d=-t.fontMetrics().axisHeight+n.height+.5*l.height+.111;s=gd.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:l,shift:c},{type:"elem",elem:n,shift:d}]},t)}else s=gd.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:l,shift:c}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),gd.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var n,r=ah(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var o=ph(Qd(e.body,t));if(e.below){var i=ph(Qd(e.below,t));n=new Vd.MathNode("munderover",[r,i,o])}else n=new Vd.MathNode("mover",[r,o])}else if(e.below){var a=ph(Qd(e.below,t));n=new Vd.MathNode("munder",[r,a])}else n=ph(),n=new Vd.MathNode("mover",[r,n]);return n}});var fh=gd.makeSpan;function gh(e,t){var n=Od(e.body,t,!0);return fh([e.mclass],n,t)}function vh(e,t){var n,r=Zd(e.body,t)
341
+ ;return"minner"===e.mclass?n=new Vd.MathNode("mpadded",r):"mord"===e.mclass?e.isCharacterBox?(n=r[0]).type="mi":n=new Vd.MathNode("mi",r):(e.isCharacterBox?(n=r[0]).type="mo":n=new Vd.MathNode("mo",r),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0em"):"minner"===e.mclass&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}Sd({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,o=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Td(o),isCharacterBox:Tc.isCharacterBox(o)}},htmlBuilder:gh,mathmlBuilder:vh});var bh=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};Sd({
342
+ type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:bh(t[0]),body:Td(t[1]),isCharacterBox:Tc.isCharacterBox(t[1])}}}),Sd({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var n,{parser:r,funcName:o}=e,i=t[1],a=t[0];n="\\stackrel"!==o?bh(i):"mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==o,body:Td(i)},l={type:"supsub",mode:a.mode,base:s,sup:"\\underset"===o?null:a,sub:"\\underset"===o?a:null};return{type:"mclass",mode:r.mode,mclass:n,body:[l],isCharacterBox:Tc.isCharacterBox(l)}},htmlBuilder:gh,mathmlBuilder:vh}),Sd({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:bh(t[0]),body:Td(t[0])}},htmlBuilder(e,t){var n=Od(e.body,t,!0),r=gd.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){
343
+ var n=Zd(e.body,t),r=new Vd.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var yh={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},_h=e=>"textord"===e.type&&"@"===e.text;function wh(e,t,n){var r=yh[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var o={type:"atom",text:r,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[t[0]],[]),n.callFunction("\\Big",[o],[]),n.callFunction("\\\\cdright",[t[1]],[])]};return n.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return n.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}Sd({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e
344
+ ;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=gd.wrapFragment(Bd(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=au(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Vd.MathNode("mrow",[Qd(e.label,t)]);return(n=new Vd.MathNode("mpadded",[n])).setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new Vd.MathNode("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),Sd({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=gd.wrapFragment(Bd(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:(e,t)=>new Vd.MathNode("mrow",[Qd(e.fragment,t)])}),Sd({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){
345
+ for(var{parser:n}=e,r=lh(t[0],"ordgroup").body,o="",i=0;i<r.length;i++){o+=lh(r[i],"textord").text}var a,s=parseInt(o);if(isNaN(s))throw new kc("\\@char has non-numeric argument "+o);if(s<0||s>=1114111)throw new kc("\\@char with invalid code point "+o);return s<=65535?a=String.fromCharCode(s):(s-=65536,a=String.fromCharCode(55296+(s>>10),56320+(1023&s))),{type:"textord",mode:n.mode,text:a}}});var xh=(e,t)=>{var n=Od(e.body,t.withColor(e.color),!1);return gd.makeFragment(n)},kh=(e,t)=>{var n=Zd(e.body,t.withColor(e.color)),r=new Vd.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};Sd({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=lh(t[0],"color-token").color,o=t[1];return{type:"color",mode:n.mode,color:r,body:Td(o)}},htmlBuilder:xh,mathmlBuilder:kh}),Sd({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){
346
+ var{parser:n,breakOnTokenText:r}=e,o=lh(t[0],"color-token").color;n.gullet.macros.set("\\current@color",o);var i=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:o,body:i}},htmlBuilder:xh,mathmlBuilder:kh}),Sd({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,o="["===r.gullet.future().text?r.parseSizeGroup(!0):null,i=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:i,size:o&&lh(o,"size").value}},htmlBuilder(e,t){var n=gd.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=au(iu(e.size,t)))),n},mathmlBuilder(e,t){var n=new Vd.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",au(iu(e.size,t)))),n}});var Nh={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef",
347
+ "\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Sh=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new kc("Expected a control sequence",e);return t},Ah=(e,t,n,r)=>{var o=e.gullet.macros.get(n.text);null==o&&(n.noexpand=!0,o={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,o,r)};Sd({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(Nh[r.text])return"\\global"!==n&&"\\\\globallong"!==n||(r.text=Nh[r.text]),lh(t.parseFunction(),"internal");throw new kc("Invalid token after macro prefix",r)}}),Sd({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),o=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new kc("Expected a control sequence",r)
348
+ ;for(var i,a=0,s=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){i=t.gullet.future(),s[a].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new kc('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new kc('Argument number "'+r.text+'" out of order');a++,s.push([])}else{if("EOF"===r.text)throw new kc("Expected a macro definition");s[a].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return i&&l.unshift(i),"\\edef"!==n&&"\\xdef"!==n||(l=t.gullet.expandTokens(l)).reverse(),t.gullet.macros.set(o,{tokens:l,numArgs:a,delimiters:s},n===Nh[n]),{type:"internal",mode:t.mode}}}),Sd({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Sh(t.gullet.popToken());t.gullet.consumeSpaces();var o=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t)
349
+ ;return Ah(t,r,o,"\\\\globallet"===n),{type:"internal",mode:t.mode}}}),Sd({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Sh(t.gullet.popToken()),o=t.gullet.popToken(),i=t.gullet.popToken();return Ah(t,r,i,"\\\\globalfuture"===n),t.gullet.pushToken(i),t.gullet.pushToken(o),{type:"internal",mode:t.mode}}});var Eh=function(e,t,n){var r=Xc(ku.math[e]&&ku.math[e].replace||e,t,n);if(!r)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return r},Th=function(e,t,n,r){var o=n.havingBaseStyle(t),i=gd.makeSpan(r.concat(o.sizingClasses(n)),[e],n),a=o.sizeMultiplier/n.sizeMultiplier;return i.height*=a,i.depth*=a,i.maxFontSize=o.sizeMultiplier,i},Ch=function(e,t,n){var r=t.havingBaseStyle(n),o=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=au(o),e.height-=o,e.depth+=o},Mh=function(e,t,n,r,o,i){var a=function(e,t,n,r){
350
+ return gd.makeSymbol(e,"Size"+t+"-Regular",n,r)}(e,t,o,r),s=Th(gd.makeSpan(["delimsizing","size"+t],[a],r),Bc.TEXT,r,i);return n&&Ch(s,r,Bc.TEXT),s},Ih=function(e,t,n){var r;return r="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:gd.makeSpan(["delimsizinginner",r],[gd.makeSpan([],[gd.makeSymbol(e,t,n)])])}},zh=function(e,t,n){var r=Wc["Size4-Regular"][e.charCodeAt(0)]?Wc["Size4-Regular"][e.charCodeAt(0)][4]:Wc["Size1-Regular"][e.charCodeAt(0)][4],o=new bu("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z"
351
+ ;case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),i=new vu([o],{width:au(r),height:au(t),style:"width:"+au(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),a=gd.makeSvgSpan([],[i],n);return a.height=t,a.style.height=au(t),a.style.width=au(r),{type:"elem",elem:a}},Lh={type:"kern",size:-.008},Oh=["|","\\lvert","\\rvert","\\vert"],Rh=["\\|","\\lVert","\\rVert","\\Vert"],Ph=function(e,t,n,r,o,i){var a,s,l,c,u="",d=0;a=l=c=e,s=null;var h="Size1-Regular";"\\uparrow"===e?l=c="⏐":"\\Uparrow"===e?l=c="‖":"\\downarrow"===e?a=l="⏐":"\\Downarrow"===e?a=l="‖":"\\updownarrow"===e?(a="\\uparrow",l="⏐",c="\\downarrow"):"\\Updownarrow"===e?(a="\\Uparrow",l="‖",c="\\Downarrow"):Tc.contains(Oh,e)?(l="∣",u="vert",d=333):Tc.contains(Rh,e)?(l="∥",u="doublevert",d=556):"["===e||"\\lbrack"===e?(a="⎡",l="⎢",c="⎣",h="Size4-Regular",
352
+ u="lbrack",d=667):"]"===e||"\\rbrack"===e?(a="⎤",l="⎥",c="⎦",h="Size4-Regular",u="rbrack",d=667):"\\lfloor"===e||"⌊"===e?(l=a="⎢",c="⎣",h="Size4-Regular",u="lfloor",d=667):"\\lceil"===e||"⌈"===e?(a="⎡",l=c="⎢",h="Size4-Regular",u="lceil",d=667):"\\rfloor"===e||"⌋"===e?(l=a="⎥",c="⎦",h="Size4-Regular",u="rfloor",d=667):"\\rceil"===e||"⌉"===e?(a="⎤",l=c="⎥",h="Size4-Regular",u="rceil",d=667):"("===e||"\\lparen"===e?(a="⎛",l="⎜",c="⎝",h="Size4-Regular",u="lparen",d=875):")"===e||"\\rparen"===e?(a="⎞",l="⎟",c="⎠",h="Size4-Regular",u="rparen",d=875):"\\{"===e||"\\lbrace"===e?(a="⎧",s="⎨",c="⎩",l="⎪",h="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(a="⎫",s="⎬",c="⎭",l="⎪",h="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(a="⎧",c="⎩",l="⎪",h="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(a="⎫",c="⎭",l="⎪",h="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(a="⎧",c="⎭",l="⎪",h="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(a="⎫",c="⎩",l="⎪",h="Size4-Regular")
353
+ ;var m=Eh(a,h,o),p=m.height+m.depth,f=Eh(l,h,o),g=f.height+f.depth,v=Eh(c,h,o),b=v.height+v.depth,y=0,_=1;if(null!==s){var w=Eh(s,h,o);y=w.height+w.depth,_=2}var x=p+b+y,k=x+Math.max(0,Math.ceil((t-x)/(_*g)))*_*g,N=r.fontMetrics().axisHeight;n&&(N*=r.sizeMultiplier);var S=k/2-N,A=[];if(u.length>0){var E=k-p-b,T=Math.round(1e3*k),C=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":
354
+ return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":
355
+ return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":
356
+ return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(u,Math.round(1e3*E)),M=new bu(u,C),I=(d/1e3).toFixed(3)+"em",z=(T/1e3).toFixed(3)+"em",L=new vu([M],{width:I,height:z,viewBox:"0 0 "+d+" "+T}),O=gd.makeSvgSpan([],[L],r);O.height=T/1e3,O.style.width=I,O.style.height=z,A.push({type:"elem",elem:O})}else{if(A.push(Ih(c,h,o)),A.push(Lh),null===s){
357
+ var R=k-p-b+.016;A.push(zh(l,R,r))}else{var P=(k-p-b-y)/2+.016;A.push(zh(l,P,r)),A.push(Lh),A.push(Ih(s,h,o)),A.push(Lh),A.push(zh(l,P,r))}A.push(Lh),A.push(Ih(a,h,o))}var D=r.havingBaseStyle(Bc.TEXT),F=gd.makeVList({positionType:"bottom",positionData:S,children:A},D);return Th(gd.makeSpan(["delimsizing","mult"],[F],D),Bc.TEXT,r,i)},Dh=.08,Fh=function(e,t,n,r,o){var i=function(e,t,n){t*=1e3;var r="";switch(e){case"sqrtMain":r=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,Uc);break
358
+ ;case"sqrtSize1":r=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,Uc);break;case"sqrtSize2":r=function(e,t){
359
+ return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,Uc);break;case"sqrtSize3":r=function(e,t){
360
+ return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,Uc);break;case"sqrtSize4":r=function(e,t){
361
+ return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,Uc);break;case"sqrtTall":r=function(e,t,n){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(n-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,Uc,n)}return r}(e,r,n),a=new bu(e,i),s=new vu([a],{width:"400em",height:au(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"})
362
+ ;return gd.makeSvgSpan(["hide-tail"],[s],o)},Hh=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Bh=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],$h=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],jh=[0,1.2,1.8,2.4,3],qh=[{type:"small",style:Bc.SCRIPTSCRIPT},{type:"small",style:Bc.SCRIPT},{type:"small",style:Bc.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Uh=[{type:"small",style:Bc.SCRIPTSCRIPT},{type:"small",style:Bc.SCRIPT},{type:"small",style:Bc.TEXT},{type:"stack"}],Gh=[{type:"small",style:Bc.SCRIPTSCRIPT},{type:"small",style:Bc.SCRIPT},{type:"small",style:Bc.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{
363
+ type:"stack"}],Vh=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Wh=function(e,t,n,r){for(var o=Math.min(2,3-r.style.size);o<n.length&&"stack"!==n[o].type;o++){var i=Eh(e,Vh(n[o]),"math"),a=i.height+i.depth;if("small"===n[o].type&&(a*=r.havingBaseStyle(n[o].style).sizeMultiplier),a>t)return n[o]}return n[n.length-1]},Kh=function(e,t,n,r,o,i){var a;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),a=Tc.contains($h,e)?qh:Tc.contains(Hh,e)?Gh:Uh;var s=Wh(e,t,a,r);return"small"===s.type?function(e,t,n,r,o,i){var a=gd.makeSymbol(e,"Main-Regular",o,r),s=Th(a,t,r,i);return n&&Ch(s,r,t),s}(e,s.style,n,r,o,i):"large"===s.type?Mh(e,s.size,n,r,o,i):Ph(e,t,n,r,o,i)},Yh={sqrtImage:function(e,t){
364
+ var n,r,o=t.havingBaseSizing(),i=Wh("\\surd",e*o.sizeMultiplier,Gh,o),a=o.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,c=0,u=0;return"small"===i.type?(e<1?a=1:e<1.4&&(a=.7),c=(1+s)/a,(n=Fh("sqrtMain",l=(1+s+Dh)/a,u=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",r=.833/a):"large"===i.type?(u=1080*jh[i.size],c=(jh[i.size]+s)/a,l=(jh[i.size]+s+Dh)/a,(n=Fh("sqrtSize"+i.size,l,u,s,t)).style.minWidth="1.02em",r=1/a):(l=e+s+Dh,c=e+s,u=Math.floor(1e3*e+s)+80,(n=Fh("sqrtTall",l,u,s,t)).style.minWidth="0.742em",r=1.056),n.height=c,n.style.height=au(l),{span:n,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*a}},sizedDelim:function(e,t,n,r,o){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),Tc.contains(Hh,e)||Tc.contains($h,e))return Mh(e,t,!1,n,r,o);if(Tc.contains(Bh,e))return Ph(e,jh[t],!1,n,r,o);throw new kc("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:jh,customSizedDelim:Kh,leftRightDelim:function(e,t,n,r,o,i){
365
+ var a=r.fontMetrics().axisHeight*r.sizeMultiplier,s=5/r.fontMetrics().ptPerEm,l=Math.max(t-a,n+a),c=Math.max(l/500*901,2*l-s);return Kh(e,c,!0,r,o,i)}},Xh={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}
366
+ },Zh=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Jh(e,t){var n=uh(e);if(n&&Tc.contains(Zh,n.text))return n;throw new kc(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Qh(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Sd({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=Jh(t[0],e);return{type:"delimsizing",
367
+ mode:e.parser.mode,size:Xh[e.funcName].size,mclass:Xh[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>"."===e.delim?gd.makeSpan([e.mclass]):Yh.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(Wd(e.delim,e.mode));var n=new Vd.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=au(Yh.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),Sd({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new kc("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Jh(t[0],e).text,color:n}}}),Sd({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Jh(t[0],e),r=e.parser;++r.leftrightDepth;var o=r.parseExpression(!1)
368
+ ;--r.leftrightDepth,r.expect("\\right",!1);var i=lh(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:o,left:n.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{Qh(e);for(var n,r,o=Od(e.body,t,!0,["mopen","mclose"]),i=0,a=0,s=!1,l=0;l<o.length;l++)o[l].isMiddle?s=!0:(i=Math.max(o[l].height,i),a=Math.max(o[l].depth,a));if(i*=t.sizeMultiplier,a*=t.sizeMultiplier,n="."===e.left?Hd(t,["mopen"]):Yh.leftRightDelim(e.left,i,a,t,e.mode,["mopen"]),o.unshift(n),s)for(var c=1;c<o.length;c++){var u=o[c].isMiddle;u&&(o[c]=Yh.leftRightDelim(u.delim,i,a,u.options,e.mode,[]))}if("."===e.right)r=Hd(t,["mclose"]);else{var d=e.rightColor?t.withColor(e.rightColor):t;r=Yh.leftRightDelim(e.right,i,a,d,e.mode,["mclose"])}return o.push(r),gd.makeSpan(["minner"],o,t)},mathmlBuilder:(e,t)=>{Qh(e);var n=Zd(e.body,t);if("."!==e.left){var r=new Vd.MathNode("mo",[Wd(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==e.right){var o=new Vd.MathNode("mo",[Wd(e.right,e.mode)])
369
+ ;o.setAttribute("fence","true"),e.rightColor&&o.setAttribute("mathcolor",e.rightColor),n.push(o)}return Kd(n)}}),Sd({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Jh(t[0],e);if(!e.parser.leftrightDepth)throw new kc("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if("."===e.delim)n=Hd(t,[]);else{n=Yh.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n="\\vert"===e.delim||"|"===e.delim?Wd("|","text"):Wd(e.delim,e.mode),r=new Vd.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var em=(e,t)=>{var n,r,o=gd.wrapFragment(Bd(e.body,t),t),i=e.label.slice(1),a=t.sizeMultiplier,s=0,l=Tc.isCharacterBox(e.body);if("sout"===i)(n=gd.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/a,s=-.5*t.fontMetrics().xHeight;else if("phase"===i){var c=iu({
370
+ number:.6,unit:"pt"},t),u=iu({number:.35,unit:"ex"},t);a/=t.havingBaseSizing().sizeMultiplier;var d=o.height+o.depth+c+u;o.style.paddingLeft=au(d/2+c);var h=Math.floor(1e3*d*a),m=function(e){return"M400000 "+e+" H0 L"+e/2+" 0 l65 45 L145 "+(e-80)+" H400000z"}(h),p=new vu([new bu("phase",m)],{width:"400em",height:au(h/1e3),viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});(n=gd.makeSvgSpan(["hide-tail"],[p],t)).style.height=au(d),s=o.depth+c+u}else{/cancel/.test(i)?l||o.classes.push("cancel-pad"):"angl"===i?o.classes.push("anglpad"):o.classes.push("boxpad");var f=0,g=0,v=0;/box/.test(i)?(v=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),g=f=t.fontMetrics().fboxsep+("colorbox"===i?0:v)):"angl"===i?(f=4*(v=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),g=Math.max(0,.25-o.depth)):g=f=l?.2:0,n=ih(o,i,f,g,t),/fbox|boxed|fcolorbox/.test(i)?(n.style.borderStyle="solid",n.style.borderWidth=au(v)):"angl"===i&&.049!==v&&(n.style.borderTopWidth=au(v),n.style.borderRightWidth=au(v)),
371
+ s=o.depth+g,e.backgroundColor&&(n.style.backgroundColor=e.backgroundColor,e.borderColor&&(n.style.borderColor=e.borderColor))}if(e.backgroundColor)r=gd.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:s},{type:"elem",elem:o,shift:0}]},t);else{var b=/cancel|phase/.test(i)?["svg-align"]:[];r=gd.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:n,shift:s,wrapperClasses:b}]},t)}return/cancel/.test(i)&&(r.height=o.height,r.depth=o.depth),/cancel/.test(i)&&!l?gd.makeSpan(["mord","cancel-lap"],[r],t):gd.makeSpan(["mord"],[r],t)},tm=(e,t)=>{var n=0,r=new Vd.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Qd(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":
372
+ r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label){var o=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+o+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};Sd({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:o}=e,i=lh(t[0],"color-token").color,a=t[1];return{type:"enclose",mode:r.mode,label:o,backgroundColor:i,body:a}},htmlBuilder:em,mathmlBuilder:tm}),Sd({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,
373
+ argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:o}=e,i=lh(t[0],"color-token").color,a=lh(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:r.mode,label:o,backgroundColor:a,borderColor:i,body:s}},htmlBuilder:em,mathmlBuilder:tm}),Sd({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}}),Sd({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,o=t[0];return{type:"enclose",mode:n.mode,label:r,body:o}},htmlBuilder:em,mathmlBuilder:tm}),Sd({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var nm={};function rm(e){for(var{type:t,names:n,props:r,handler:o,htmlBuilder:i,mathmlBuilder:a}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,
374
+ handler:o},l=0;l<n.length;++l)nm[n[l]]=s;i&&(kd[t]=i),a&&(Nd[t]=a)}var om={};function im(e,t){om[e]=t}function am(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for("\\relax"===n&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);"\\hline"===n||"\\hdashline"===n;)e.consume(),t.push("\\hdashline"===n),e.consumeSpaces(),n=e.fetch().text;return t}var sm=e=>{if(!e.parser.settings.displayMode)throw new kc("{"+e.envName+"} can be used only in display mode.")};function lm(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function cm(e,t,n){var{hskipBeforeAndAfter:r,addJot:o,cols:i,arraystretch:a,colSeparationType:s,autoTag:l,singleRow:c,emptySingleRow:u,maxNumCols:d,leqno:h}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var m=e.gullet.expandMacroAsText("\\arraystretch");if(null==m)a=1;else if(!(a=parseFloat(m))||a<0)throw new kc("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var p=[],f=[p],g=[],v=[],b=null!=l?[]:void 0;function y(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}
375
+ function _(){b&&(e.gullet.macros.get("\\df@tag")?(b.push(e.subparse([new xc("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):b.push(Boolean(l)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(y(),v.push(am(e));;){var w=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),w={type:"ordgroup",mode:e.mode,body:w},n&&(w={type:"styling",mode:e.mode,style:n,body:[w]}),p.push(w);var x=e.fetch().text;if("&"===x){if(d&&p.length===d){if(c||s)throw new kc("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===x){_(),1===p.length&&"styling"===w.type&&0===w.body[0].body.length&&(f.length>1||!u)&&f.pop(),v.length<f.length+1&&v.push([]);break}if("\\\\"!==x)throw new kc("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var k=void 0;" "!==e.gullet.future().text&&(k=e.parseSizeGroup(!0)),g.push(k?k.value:null),_(),v.push(am(e)),p=[],f.push(p),y()}}
376
+ return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:o,arraystretch:a,body:f,cols:i,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:v,colSeparationType:s,tags:b,leqno:h}}function um(e){return"d"===e.slice(0,1)?"display":"text"}var dm=function(e,t){var n,r,o=e.body.length,i=e.hLinesBeforeRow,a=0,s=new Array(o),l=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,d=5*u;e.colSeparationType&&"small"===e.colSeparationType&&(d=t.havingStyle(Bc.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var h="CD"===e.colSeparationType?iu({number:3,unit:"ex"},t):12*u,m=3*u,p=e.arraystretch*h,f=.7*p,g=.3*p,v=0;function b(e){for(var t=0;t<e.length;++t)t>0&&(v+=.25),l.push({pos:v,isDashed:e[t]})}for(b(i[0]),n=0;n<e.body.length;++n){var y=e.body[n],_=f,w=g;a<y.length&&(a=y.length);var x=new Array(y.length);for(r=0;r<y.length;++r){var k=Bd(y[r],t);w<k.depth&&(w=k.depth),_<k.height&&(_=k.height),x[r]=k}var N=e.rowGaps[n],S=0;N&&(S=iu(N,t))>0&&(w<(S+=g)&&(w=S),S=0),
377
+ e.addJot&&(w+=m),x.height=_,x.depth=w,v+=_,x.pos=v,v+=w+S,s[n]=x,b(i[n+1])}var A,E,T=v/2+t.fontMetrics().axisHeight,C=e.cols||[],M=[],I=[];if(e.tags&&e.tags.some((e=>e)))for(n=0;n<o;++n){var z=s[n],L=z.pos-T,O=e.tags[n],R=void 0;(R=!0===O?gd.makeSpan(["eqn-num"],[],t):!1===O?gd.makeSpan([],[],t):gd.makeSpan([],Od(O,t,!0),t)).depth=z.depth,R.height=z.height,I.push({type:"elem",elem:R,shift:L})}for(r=0,E=0;r<a||E<C.length;++r,++E){for(var P=C[E]||{},D=!0;"separator"===P.type;){if(D||((A=gd.makeSpan(["arraycolsep"],[])).style.width=au(t.fontMetrics().doubleRuleSep),M.push(A)),"|"!==P.separator&&":"!==P.separator)throw new kc("Invalid separator type: "+P.separator);var F="|"===P.separator?"solid":"dashed",H=gd.makeSpan(["vertical-separator"],[],t);H.style.height=au(v),H.style.borderRightWidth=au(c),H.style.borderRightStyle=F,H.style.margin="0 "+au(-c/2);var B=v-T;B&&(H.style.verticalAlign=au(-B)),M.push(H),P=C[++E]||{},D=!1}if(!(r>=a)){var $=void 0
378
+ ;(r>0||e.hskipBeforeAndAfter)&&0!==($=Tc.deflt(P.pregap,d))&&((A=gd.makeSpan(["arraycolsep"],[])).style.width=au($),M.push(A));var j=[];for(n=0;n<o;++n){var q=s[n],U=q[r];if(U){var G=q.pos-T;U.depth=q.depth,U.height=q.height,j.push({type:"elem",elem:U,shift:G})}}j=gd.makeVList({positionType:"individualShift",children:j},t),j=gd.makeSpan(["col-align-"+(P.align||"c")],[j]),M.push(j),(r<a-1||e.hskipBeforeAndAfter)&&0!==($=Tc.deflt(P.postgap,d))&&((A=gd.makeSpan(["arraycolsep"],[])).style.width=au($),M.push(A))}}if(s=gd.makeSpan(["mtable"],M),l.length>0){for(var V=gd.makeLineSpan("hline",t,c),W=gd.makeLineSpan("hdashline",t,c),K=[{type:"elem",elem:s,shift:0}];l.length>0;){var Y=l.pop(),X=Y.pos-T;Y.isDashed?K.push({type:"elem",elem:W,shift:X}):K.push({type:"elem",elem:V,shift:X})}s=gd.makeVList({positionType:"individualShift",children:K},t)}if(0===I.length)return gd.makeSpan(["mord"],[s],t);var Z=gd.makeVList({positionType:"individualShift",children:I},t);return Z=gd.makeSpan(["tag"],[Z],t),gd.makeFragment([s,Z])
379
+ },hm={c:"center ",l:"left ",r:"right "},mm=function(e,t){for(var n=[],r=new Vd.MathNode("mtd",[],["mtr-glue"]),o=new Vd.MathNode("mtd",[],["mml-eqn-num"]),i=0;i<e.body.length;i++){for(var a=e.body[i],s=[],l=0;l<a.length;l++)s.push(new Vd.MathNode("mtd",[Qd(a[l],t)]));e.tags&&e.tags[i]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(o):s.push(o)),n.push(new Vd.MathNode("mtr",s))}var c=new Vd.MathNode("mtable",n),u=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",au(u));var d="",h="";if(e.cols&&e.cols.length>0){var m=e.cols,p="",f=!1,g=0,v=m.length;"separator"===m[0].type&&(d+="top ",g=1),"separator"===m[m.length-1].type&&(d+="bottom ",v-=1);for(var b=g;b<v;b++)"align"===m[b].type?(h+=hm[m[b].align],f&&(p+="none "),f=!0):"separator"===m[b].type&&f&&(p+="|"===m[b].separator?"solid ":"dashed ",f=!1);c.setAttribute("columnalign",h.trim()),/[sd]/.test(p)&&c.setAttribute("columnlines",p.trim())}if("align"===e.colSeparationType){
380
+ for(var y=e.cols||[],_="",w=1;w<y.length;w++)_+=w%2?"0em ":"1em ";c.setAttribute("columnspacing",_.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var x="",k=e.hLinesBeforeRow;d+=k[0].length>0?"left ":"",d+=k[k.length-1].length>0?"right ":"";for(var N=1;N<k.length-1;N++)x+=0===k[N].length?"none ":k[N][0]?"dashed ":"solid ";return/[sd]/.test(x)&&c.setAttribute("rowlines",x.trim()),""!==d&&(c=new Vd.MathNode("menclose",[c])).setAttribute("notation",d.trim()),e.arraystretch&&e.arraystretch<1&&(c=new Vd.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},pm=function(e,t){-1===e.envName.indexOf("ed")&&sm(e);var n,r=[],o=e.envName.indexOf("at")>-1?"alignat":"align",i="split"===e.envName,a=cm(e.parser,{cols:r,addJot:!0,autoTag:i?void 0:lm(e.envName),emptySingleRow:!0,
381
+ colSeparationType:o,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},"display"),s=0,l={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",u=0;u<t[0].body.length;u++){c+=lh(t[0].body[u],"textord").text}n=Number(c),s=2*n}var d=!s;a.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var r=lh(e[t],"styling");lh(r.body[0],"ordgroup").body.unshift(l)}if(d)s<e.length&&(s=e.length);else{var o=e.length/2;if(n<o)throw new kc("Too many math in a row: expected "+n+", but got "+o,e[0])}}));for(var h=0;h<s;++h){var m="r",p=0;h%2==1?m="l":h>0&&d&&(p=1),r[h]={type:"align",align:m,pregap:p,postgap:0}}return a.colSeparationType=d?"align":"alignat",a};rm({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=(uh(t[0])?[t[0]]:lh(t[0],"ordgroup").body).map((function(e){var t=ch(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"}
382
+ ;throw new kc("Unknown column alignment: "+t,e)})),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return cm(e.parser,r,um(e.envName))},htmlBuilder:dm,mathmlBuilder:mm}),rm({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===e.envName.charAt(e.envName.length-1)){var o=e.parser;if(o.consumeSpaces(),"["===o.fetch().text){if(o.consume(),o.consumeSpaces(),n=o.fetch().text,-1==="lcr".indexOf(n))throw new kc("Expected l or c or r",o.nextToken);o.consume(),o.consumeSpaces(),o.expect("]"),o.consume(),r.cols=[{type:"align",align:n}]}}var i=cm(e.parser,r,um(e.envName)),a=Math.max(0,...i.body.map((e=>e.length)));return i.cols=new Array(a).fill({type:"align",align:n}),t?{
383
+ type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:dm,mathmlBuilder:mm}),rm({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=cm(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:dm,mathmlBuilder:mm}),rm({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=(uh(t[0])?[t[0]]:lh(t[0],"ordgroup").body).map((function(e){var t=ch(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new kc("Unknown column alignment: "+t,e)}));if(n.length>1)throw new kc("{subarray} can contain only one column");var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if((r=cm(e.parser,r,"script")).body.length>0&&r.body[0].length>1)throw new kc("{subarray} can contain only one column");return r},htmlBuilder:dm,mathmlBuilder:mm}),rm({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=cm(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{
384
+ type:"align",align:"l",pregap:0,postgap:0}]},um(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:dm,mathmlBuilder:mm}),rm({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:pm,htmlBuilder:dm,mathmlBuilder:mm}),rm({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Tc.contains(["gather","gather*"],e.envName)&&sm(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:lm(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return cm(e.parser,t,"display")},htmlBuilder:dm,mathmlBuilder:mm}),rm({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:pm,htmlBuilder:dm,mathmlBuilder:mm}),rm({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){sm(e);var t={autoTag:lm(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno}
385
+ ;return cm(e.parser,t,"display")},htmlBuilder:dm,mathmlBuilder:mm}),rm({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(sm(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if("&"!==n&&"\\\\"!==n){if("\\end"===n){0===t[t.length-1].length&&t.pop();break}throw new kc("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var r,o,i=[],a=[i],s=0;s<t.length;s++){for(var l=t[s],c={type:"styling",body:[],mode:"math",style:"display"},u=0;u<l.length;u++)if(_h(l[u])){i.push(c);var d=ch(l[u+=1]).text,h=new Array(2);if(h[0]={type:"ordgroup",mode:"math",body:[]},h[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(d)>-1);else{if(!("<>AV".indexOf(d)>-1))throw new kc('Expected one of "<>AV=|." after @',l[u]);for(var m=0;m<2;m++){for(var p=!0,f=u+1;f<l.length;f++){if(o=d,("mathord"===(r=l[f]).type||"atom"===r.type)&&r.text===o){p=!1,u=f;break
386
+ }if(_h(l[f]))throw new kc("Missing a "+d+" character to complete a CD arrow.",l[f]);h[m].body.push(l[f])}if(p)throw new kc("Missing a "+d+" character to complete a CD arrow.",l[u])}}var g={type:"styling",body:[wh(d,h,e)],mode:"math",style:"display"};i.push(g),c={type:"styling",body:[],mode:"math",style:"display"}}else c.body.push(l[u]);s%2==0?i.push(c):i.shift(),i=[],a.push(i)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}(e.parser)),htmlBuilder:dm,mathmlBuilder:mm}),im("\\nonumber","\\gdef\\@eqnsw{0}"),im("\\notag","\\nonumber"),Sd({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new kc(e.funcName+" valid only within array environment")}});var fm=nm;Sd({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,
387
+ argTypes:["text"]},handler(e,t){var{parser:n,funcName:r}=e,o=t[0];if("ordgroup"!==o.type)throw new kc("Invalid environment name",o);for(var i="",a=0;a<o.body.length;++a)i+=lh(o.body[a],"textord").text;if("\\begin"===r){if(!fm.hasOwnProperty(i))throw new kc("No such environment: "+i,o);var s=fm[i],{args:l,optArgs:c}=n.parseArguments("\\begin{"+i+"}",s),u={mode:n.mode,envName:i,parser:n},d=s.handler(u,l,c);n.expect("\\end",!1);var h=n.nextToken,m=lh(n.parseFunction(),"environment");if(m.name!==i)throw new kc("Mismatch: \\begin{"+i+"} matched by \\end{"+m.name+"}",h);return d}return{type:"environment",mode:n.mode,name:i,nameGroup:o}}});var gm=(e,t)=>{var n=e.font,r=t.withFont(n);return Bd(e.body,r)},vm=(e,t)=>{var n=e.font,r=t.withFont(n);return Qd(e.body,r)},bm={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Sd({type:"font",
388
+ names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=Ed(t[0]),i=r;return i in bm&&(i=bm[i]),{type:"font",mode:n.mode,font:i.slice(1),body:o}},htmlBuilder:gm,mathmlBuilder:vm}),Sd({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],o=Tc.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:bh(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:o}}}),Sd({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:o}=e,{mode:i}=n,a=n.parseExpression(!0,o);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:a}}},htmlBuilder:gm,mathmlBuilder:vm});var ym=(e,t)=>{var n=t
389
+ ;return"display"===e?n=n.id>=Bc.SCRIPT.id?n.text():Bc.DISPLAY:"text"===e&&n.size===Bc.DISPLAY.size?n=Bc.TEXT:"script"===e?n=Bc.SCRIPT:"scriptscript"===e&&(n=Bc.SCRIPTSCRIPT),n},_m=(e,t)=>{var n,r=ym(e.size,t.style),o=r.fracNum(),i=r.fracDen();n=t.havingStyle(o);var a=Bd(e.numer,n,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;a.height=a.height<s?s:a.height,a.depth=a.depth<l?l:a.depth}n=t.havingStyle(i);var c,u,d,h,m,p,f,g,v,b,y=Bd(e.denom,n,t);if(e.hasBarLine?(e.barSize?(u=iu(e.barSize,t),c=gd.makeLineSpan("frac-line",t,u)):c=gd.makeLineSpan("frac-line",t),u=c.height,d=c.height):(c=null,u=0,d=t.fontMetrics().defaultRuleThickness),r.size===Bc.DISPLAY.size||"display"===e.size?(h=t.fontMetrics().num1,m=u>0?3*d:7*d,p=t.fontMetrics().denom1):(u>0?(h=t.fontMetrics().num2,m=d):(h=t.fontMetrics().num3,m=3*d),p=t.fontMetrics().denom2),c){var _=t.fontMetrics().axisHeight;h-a.depth-(_+.5*u)<m&&(h+=m-(h-a.depth-(_+.5*u))),_-.5*u-(y.height-p)<m&&(p+=m-(_-.5*u-(y.height-p)))
390
+ ;var w=-(_-.5*u);f=gd.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:p},{type:"elem",elem:c,shift:w},{type:"elem",elem:a,shift:-h}]},t)}else{var x=h-a.depth-(y.height-p);x<m&&(h+=.5*(m-x),p+=.5*(m-x)),f=gd.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:p},{type:"elem",elem:a,shift:-h}]},t)}return n=t.havingStyle(r),f.height*=n.sizeMultiplier/t.sizeMultiplier,f.depth*=n.sizeMultiplier/t.sizeMultiplier,g=r.size===Bc.DISPLAY.size?t.fontMetrics().delim1:r.size===Bc.SCRIPTSCRIPT.size?t.havingStyle(Bc.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,v=null==e.leftDelim?Hd(t,["mopen"]):Yh.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(r),e.mode,["mopen"]),b=e.continued?gd.makeSpan([]):null==e.rightDelim?Hd(t,["mclose"]):Yh.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(r),e.mode,["mclose"]),gd.makeSpan(["mord"].concat(n.sizingClasses(t)),[v,gd.makeSpan(["mfrac"],[f]),b],t)},wm=(e,t)=>{var n=new Vd.MathNode("mfrac",[Qd(e.numer,t),Qd(e.denom,t)])
391
+ ;if(e.hasBarLine){if(e.barSize){var r=iu(e.barSize,t);n.setAttribute("linethickness",au(r))}}else n.setAttribute("linethickness","0px");var o=ym(e.size,t.style);if(o.size!==t.style.size){n=new Vd.MathNode("mstyle",[n]);var i=o.size===Bc.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",i),n.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var a=[];if(null!=e.leftDelim){var s=new Vd.MathNode("mo",[new Vd.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),a.push(s)}if(a.push(n),null!=e.rightDelim){var l=new Vd.MathNode("mo",[new Vd.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),a.push(l)}return Kd(a)}return n};Sd({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var n,{parser:r,funcName:o}=e,i=t[0],a=t[1],s=null,l=null,c="auto";switch(o){case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break
392
+ ;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,s="(",l=")";break;case"\\\\bracefrac":n=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":n=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(o){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:a,hasBarLine:n,leftDelim:s,rightDelim:l,size:c,barSize:null}},htmlBuilder:_m,mathmlBuilder:wm}),Sd({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=t[0],i=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:o,denom:i,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),Sd({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:n,funcName:r,token:o}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":
393
+ t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:o}}});var xm=["display","text","script","scriptscript"],km=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};Sd({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var n,{parser:r}=e,o=t[4],i=t[5],a=Ed(t[0]),s="atom"===a.type&&"open"===a.family?km(a.text):null,l=Ed(t[1]),c="atom"===l.type&&"close"===l.family?km(l.text):null,u=lh(t[2],"size"),d=null;n=!!u.isBlank||(d=u.value).number>0;var h="auto",m=t[3];if("ordgroup"===m.type){if(m.body.length>0){var p=lh(m.body[0],"textord");h=xm[Number(p.text)]}}else m=lh(m,"textord"),h=xm[Number(m.text)];return{type:"genfrac",mode:r.mode,numer:o,denom:i,continued:!1,hasBarLine:n,barSize:d,leftDelim:s,rightDelim:c,size:h}},htmlBuilder:_m,mathmlBuilder:wm}),Sd({type:"infix",names:["\\above"],
394
+ props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:o}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:lh(t[0],"size").value,token:o}}}),Sd({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=t[0],i=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(lh(t[1],"infix").size),a=t[2],s=i.number>0;return{type:"genfrac",mode:n.mode,numer:o,denom:a,continued:!1,hasBarLine:s,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:_m,mathmlBuilder:wm});var Nm=(e,t)=>{var n,r,o=t.style;"supsub"===e.type?(n=e.sup?Bd(e.sup,t.havingStyle(o.sup()),t):Bd(e.sub,t.havingStyle(o.sub()),t),r=lh(e.base,"horizBrace")):r=lh(e,"horizBrace");var i,a=Bd(r.base,t.havingBaseStyle(Bc.DISPLAY)),s=sh(r,t);if(r.isOver?(i=gd.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]
395
+ },t)).children[0].children[0].children[1].classes.push("svg-align"):(i=gd.makeVList({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[0].classes.push("svg-align"),n){var l=gd.makeSpan(["mord",r.isOver?"mover":"munder"],[i],t);i=r.isOver?gd.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},t):gd.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return gd.makeSpan(["mord",r.isOver?"mover":"munder"],[i],t)};Sd({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:Nm,mathmlBuilder:(e,t)=>{var n=ah(e.label);return new Vd.MathNode(e.isOver?"mover":"munder",[Qd(e.base,t),n])}}),Sd({
396
+ type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],o=lh(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:n.mode,href:o,body:Td(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=Od(e.body,t,!1);return gd.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Jd(e.body,t);return n instanceof Ud||(n=new Ud("mrow",[n])),n.setAttribute("href",e.href),n}}),Sd({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=lh(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var o=[],i=0;i<r.length;i++){var a=r[i];"~"===a&&(a="\\textasciitilde"),o.push({type:"textord",mode:"text",text:a})}var s={type:"text",mode:n.mode,font:"\\texttt",body:o};return{type:"href",mode:n.mode,href:r,body:Td(s)}}}),Sd({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],
397
+ allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:Td(t[0])}},htmlBuilder(e,t){var n=Od(e.body,t,!1);return gd.makeFragment(n)},mathmlBuilder:(e,t)=>new Vd.MathNode("mrow",Zd(e.body,t))}),Sd({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var n,{parser:r,funcName:o,token:i}=e,a=lh(t[0],"raw").string,s=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(o){case"\\htmlClass":l.class=a,n={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,n={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,n={command:"\\htmlStyle",style:a};break;case"\\htmlData":for(var c=a.split(","),u=0;u<c.length;u++){var d=c[u].split("=");if(2!==d.length)throw new kc("Error parsing key-value for \\htmlData");l["data-"+d[0].trim()]=d[1].trim()}n={command:"\\htmlData",attributes:l};break;default:
398
+ throw new Error("Unrecognized html command")}return r.settings.isTrusted(n)?{type:"html",mode:r.mode,attributes:l,body:Td(s)}:r.formatUnsupportedCmd(o)},htmlBuilder:(e,t)=>{var n=Od(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var o=gd.makeSpan(r,n,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&o.setAttribute(i,e.attributes[i]);return o},mathmlBuilder:(e,t)=>Jd(e.body,t)}),Sd({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:Td(t[0]),mathml:Td(t[1])}},htmlBuilder:(e,t)=>{var n=Od(e.html,t,!1);return gd.makeFragment(n)},mathmlBuilder:(e,t)=>Jd(e.mathml,t)});var Sm=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new kc("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]}
399
+ ;if(!ou(n))throw new kc("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};Sd({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,o={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},s="";if(n[0])for(var l=lh(n[0],"raw").string.split(","),c=0;c<l.length;c++){var u=l[c].split("=");if(2===u.length){var d=u[1].trim();switch(u[0].trim()){case"alt":s=d;break;case"width":o=Sm(d);break;case"height":i=Sm(d);break;case"totalheight":a=Sm(d);break;default:throw new kc("Invalid key: '"+u[0]+"' in \\includegraphics.")}}}var h=lh(t[0],"url").url;return""===s&&(s=(s=(s=h).replace(/^.*[\\/]/,"")).substring(0,s.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:h})?{type:"includegraphics",mode:r.mode,alt:s,width:o,height:i,totalheight:a,src:h}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=iu(e.height,t),r=0
400
+ ;e.totalheight.number>0&&(r=iu(e.totalheight,t)-n);var o=0;e.width.number>0&&(o=iu(e.width,t));var i={height:au(n+r)};o>0&&(i.width=au(o)),r>0&&(i.verticalAlign=au(-r));var a=new pu(e.src,e.alt,i);return a.height=n,a.depth=r,a},mathmlBuilder:(e,t)=>{var n=new Vd.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=iu(e.height,t),o=0;if(e.totalheight.number>0&&(o=iu(e.totalheight,t)-r,n.setAttribute("valign",au(-o))),n.setAttribute("height",au(r+o)),e.width.number>0){var i=iu(e.width,t);n.setAttribute("width",au(i))}return n.setAttribute("src",e.src),n}}),Sd({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,o=lh(t[0],"size");if(n.settings.strict){var i="m"===r[1],a="mu"===o.value.unit;i?(a||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+o.value.unit+" units"),
401
+ "math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:o.value}},htmlBuilder:(e,t)=>gd.makeGlue(e.dimension,t),mathmlBuilder(e,t){var n=iu(e.dimension,t);return new Vd.SpaceNode(n)}}),Sd({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:o}},htmlBuilder:(e,t)=>{var n;"clap"===e.alignment?(n=gd.makeSpan([],[Bd(e.body,t)]),n=gd.makeSpan(["inner"],[n],t)):n=gd.makeSpan(["inner"],[Bd(e.body,t)]);var r=gd.makeSpan(["fix"],[]),o=gd.makeSpan([e.alignment],[n,r],t),i=gd.makeSpan(["strut"]);return i.style.height=au(o.height+o.depth),o.depth&&(i.style.verticalAlign=au(-o.depth)),o.children.unshift(i),o=gd.makeSpan(["thinbox"],[o],t),gd.makeSpan(["mord","vbox"],[o],t)},mathmlBuilder:(e,t)=>{
402
+ var n=new Vd.MathNode("mpadded",[Qd(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),Sd({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,o=r.mode;r.switchMode("math");var i="\\("===n?"\\)":"$",a=r.parseExpression(!1,i);return r.expect(i),r.switchMode(o),{type:"styling",mode:r.mode,style:"text",body:a}}}),Sd({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new kc("Mismatched "+e.funcName)}});var Am=(e,t)=>{switch(t.style.size){case Bc.DISPLAY.size:return e.display;case Bc.TEXT.size:return e.text;case Bc.SCRIPT.size:return e.script;case Bc.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Sd({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Td(t[0]),text:Td(t[1]),
403
+ script:Td(t[2]),scriptscript:Td(t[3])}},htmlBuilder:(e,t)=>{var n=Am(e,t),r=Od(n,t,!1);return gd.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=Am(e,t);return Jd(n,t)}});var Em=(e,t,n,r,o,i,a)=>{e=gd.makeSpan([],[e]);var s,l,c,u=n&&Tc.isCharacterBox(n);if(t){var d=Bd(t,r.havingStyle(o.sup()),r);l={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var h=Bd(n,r.havingStyle(o.sub()),r);s={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-h.height)}}if(l&&s){var m=r.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+a;c=gd.makeVList({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:au(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:au(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(s){var p=e.height-a;c=gd.makeVList({positionType:"top",positionData:p,
404
+ children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:au(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},r)}else{if(!l)return e;var f=e.depth+a;c=gd.makeVList({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:au(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var g=[c];if(s&&0!==i&&!u){var v=gd.makeSpan(["mspace"],[],r);v.style.marginRight=au(i),g.unshift(v)}return gd.makeSpan(["mop","op-limits"],g,r)},Tm=["\\smallint"],Cm=(e,t)=>{var n,r,o,i=!1;"supsub"===e.type?(n=e.sup,r=e.sub,o=lh(e.base,"op"),i=!0):o=lh(e,"op");var a,s=t.style,l=!1;if(s.size===Bc.DISPLAY.size&&o.symbol&&!Tc.contains(Tm,o.name)&&(l=!0),o.symbol){var c=l?"Size2-Regular":"Size1-Regular",u="";if("\\oiint"!==o.name&&"\\oiiint"!==o.name||(u=o.name.slice(1),o.name="oiint"===u?"\\iint":"\\iiint"),a=gd.makeSymbol(o.name,c,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),u.length>0){
405
+ var d=a.italic,h=gd.staticSvg(u+"Size"+(l?"2":"1"),t);a=gd.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:h,shift:l?.08:0}]},t),o.name="\\"+u,a.classes.unshift("mop"),a.italic=d}}else if(o.body){var m=Od(o.body,t,!0);1===m.length&&m[0]instanceof gu?(a=m[0]).classes[0]="mop":a=gd.makeSpan(["mop"],m,t)}else{for(var p=[],f=1;f<o.name.length;f++)p.push(gd.mathsym(o.name[f],o.mode,t));a=gd.makeSpan(["mop"],p,t)}var g=0,v=0;return(a instanceof gu||"\\oiint"===o.name||"\\oiiint"===o.name)&&!o.suppressBaseShift&&(g=(a.height-a.depth)/2-t.fontMetrics().axisHeight,v=a.italic),i?Em(a,n,r,t,s,v,g):(g&&(a.style.position="relative",a.style.top=au(g)),a)},Mm=(e,t)=>{var n;if(e.symbol)n=new Ud("mo",[Wd(e.name,e.mode)]),Tc.contains(Tm,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new Ud("mo",Zd(e.body,t));else{n=new Ud("mi",[new Gd(e.name.slice(1))]);var r=new Ud("mo",[Wd("⁡","text")]);n=e.parentIsSupSub?new Ud("mrow",[n,r]):qd([n,r])}return n},Im={
406
+ "∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Sd({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=r;return 1===o.length&&(o=Im[o]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:o}},htmlBuilder:Cm,mathmlBuilder:Mm}),Sd({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Td(r)}},htmlBuilder:Cm,mathmlBuilder:Mm});var zm={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Sd({type:"op",
407
+ names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Cm,mathmlBuilder:Mm}),Sd({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Cm,mathmlBuilder:Mm}),Sd({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e,r=n;return 1===r.length&&(r=zm[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Cm,mathmlBuilder:Mm});var Lm=(e,t)=>{
408
+ var n,r,o,i,a=!1;if("supsub"===e.type?(n=e.sup,r=e.sub,o=lh(e.base,"operatorname"),a=!0):o=lh(e,"operatorname"),o.body.length>0){for(var s=o.body.map((e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=Od(s,t.withFont("mathrm"),!0),c=0;c<l.length;c++){var u=l[c];u instanceof gu&&(u.text=u.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}i=gd.makeSpan(["mop"],l,t)}else i=gd.makeSpan(["mop"],[],t);return a?Em(i,n,r,t,t.style,0,0):i};function Om(e,t,n){for(var r=Od(e,t,!1),o=t.sizeMultiplier/n.sizeMultiplier,i=0;i<r.length;i++){var a=r[i].classes.indexOf("sizing");a<0?Array.prototype.push.apply(r[i].classes,t.sizingClasses(n)):r[i].classes[a+1]==="reset-size"+t.size&&(r[i].classes[a+1]="reset-size"+n.size),r[i].height*=o,r[i].depth*=o}return gd.makeFragment(r)}Sd({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=t[0];return{type:"operatorname",mode:n.mode,body:Td(o),
409
+ alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:Lm,mathmlBuilder:(e,t)=>{for(var n=Zd(e.body,t.withFont("mathrm")),r=!0,o=0;o<n.length;o++){var i=n[o];if(i instanceof Vd.SpaceNode);else if(i instanceof Vd.MathNode)switch(i.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var a=i.children[0];1===i.children.length&&a instanceof Vd.TextNode?a.text=a.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break;default:r=!1}else r=!1}if(r){var s=n.map((e=>e.toText())).join("");n=[new Vd.TextNode(s)]}var l=new Vd.MathNode("mi",n);l.setAttribute("mathvariant","normal");var c=new Vd.MathNode("mo",[Wd("⁡","text")]);return e.parentIsSupSub?new Vd.MathNode("mrow",[l,c]):Vd.newDocumentFragment([l,c])}}),im("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Ad({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?gd.makeFragment(Od(e.body,t,!1)):gd.makeSpan(["mord"],Od(e.body,t,!0),t),mathmlBuilder:(e,t)=>Jd(e.body,t,!0)}),Sd({type:"overline",
410
+ names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=Bd(e.body,t.havingCrampedStyle()),r=gd.makeLineSpan("overline-line",t),o=t.fontMetrics().defaultRuleThickness,i=gd.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:r},{type:"kern",size:o}]},t);return gd.makeSpan(["mord","overline"],[i],t)},mathmlBuilder(e,t){var n=new Vd.MathNode("mo",[new Vd.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Vd.MathNode("mover",[Qd(e.body,t),n]);return r.setAttribute("accent","true"),r}}),Sd({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:Td(r)}},htmlBuilder:(e,t)=>{var n=Od(e.body,t.withPhantom(),!1);return gd.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=Zd(e.body,t);return new Vd.MathNode("mphantom",n)}}),Sd({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,
411
+ allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=gd.makeSpan([],[Bd(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r<n.children.length;r++)n.children[r].height=0,n.children[r].depth=0;return n=gd.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t),gd.makeSpan(["mord"],[n],t)},mathmlBuilder:(e,t)=>{var n=Zd(Td(e.body),t),r=new Vd.MathNode("mphantom",n),o=new Vd.MathNode("mpadded",[r]);return o.setAttribute("height","0px"),o.setAttribute("depth","0px"),o}}),Sd({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=gd.makeSpan(["inner"],[Bd(e.body,t.withPhantom())]),r=gd.makeSpan(["fix"],[]);return gd.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=Zd(Td(e.body),t),r=new Vd.MathNode("mphantom",n),o=new Vd.MathNode("mpadded",[r])
412
+ ;return o.setAttribute("width","0px"),o}}),Sd({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=lh(t[0],"size").value,o=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:o}},htmlBuilder(e,t){var n=Bd(e.body,t),r=iu(e.dy,t);return gd.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){var n=new Vd.MathNode("mpadded",[Qd(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}}),Sd({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),Sd({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,o=n[0],i=lh(t[0],"size"),a=lh(t[1],"size");return{type:"rule",mode:r.mode,shift:o&&lh(o,"size").value,width:i.value,height:a.value}},htmlBuilder(e,t){
413
+ var n=gd.makeSpan(["mord","rule"],[],t),r=iu(e.width,t),o=iu(e.height,t),i=e.shift?iu(e.shift,t):0;return n.style.borderRightWidth=au(r),n.style.borderTopWidth=au(o),n.style.bottom=au(i),n.width=r,n.height=o+i,n.depth=-i,n.maxFontSize=1.125*o*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=iu(e.width,t),r=iu(e.height,t),o=e.shift?iu(e.shift,t):0,i=t.color&&t.getColor()||"black",a=new Vd.MathNode("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",au(n)),a.setAttribute("height",au(r));var s=new Vd.MathNode("mpadded",[a]);return o>=0?s.setAttribute("height",au(o)):(s.setAttribute("height",au(o)),s.setAttribute("depth",au(-o))),s.setAttribute("voffset",au(o)),s}});var Rm=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];Sd({type:"sizing",names:Rm,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:o}=e,i=o.parseExpression(!1,n);return{type:"sizing",mode:o.mode,size:Rm.indexOf(r)+1,
414
+ body:i}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return Om(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=Zd(e.body,n),o=new Vd.MathNode("mstyle",r);return o.setAttribute("mathsize",au(n.sizeMultiplier)),o}}),Sd({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,o=!1,i=!1,a=n[0]&&lh(n[0],"ordgroup");if(a)for(var s="",l=0;l<a.body.length;++l){if("t"===(s=a.body[l].text))o=!0;else{if("b"!==s){o=!1,i=!1;break}i=!0}}else o=!0,i=!0;var c=t[0];return{type:"smash",mode:r.mode,body:c,smashHeight:o,smashDepth:i}},htmlBuilder:(e,t)=>{var n=gd.makeSpan([],[Bd(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r<n.children.length;r++)n.children[r].height=0;if(e.smashDepth&&(n.depth=0,n.children))for(var o=0;o<n.children.length;o++)n.children[o].depth=0;var i=gd.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t);return gd.makeSpan(["mord"],[i],t)},
415
+ mathmlBuilder:(e,t)=>{var n=new Vd.MathNode("mpadded",[Qd(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}}),Sd({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,o=n[0],i=t[0];return{type:"sqrt",mode:r.mode,body:i,index:o}},htmlBuilder(e,t){var n=Bd(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=gd.wrapFragment(n,t);var r=t.fontMetrics().defaultRuleThickness,o=r;t.style.id<Bc.TEXT.id&&(o=t.fontMetrics().xHeight);var i=r+o/4,a=n.height+n.depth+i+r,{span:s,ruleWidth:l,advanceWidth:c}=Yh.sqrtImage(a,t),u=s.height-l;u>n.height+n.depth+i&&(i=(i+u-n.height-n.depth)/2);var d=s.height-n.height-i-l;n.style.paddingLeft=au(c);var h=gd.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+d)},{type:"elem",elem:s},{type:"kern",size:l}]},t);if(e.index){
416
+ var m=t.havingStyle(Bc.SCRIPTSCRIPT),p=Bd(e.index,m,t),f=.6*(h.height-h.depth),g=gd.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:p}]},t),v=gd.makeSpan(["root"],[g]);return gd.makeSpan(["mord","sqrt"],[v,h],t)}return gd.makeSpan(["mord","sqrt"],[h],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new Vd.MathNode("mroot",[Qd(n,t),Qd(r,t)]):new Vd.MathNode("msqrt",[Qd(n,t)])}});var Pm={display:Bc.DISPLAY,text:Bc.TEXT,script:Bc.SCRIPT,scriptscript:Bc.SCRIPTSCRIPT};Sd({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:o}=e,i=o.parseExpression(!0,n),a=r.slice(1,r.length-5);return{type:"styling",mode:o.mode,style:a,body:i}},htmlBuilder(e,t){var n=Pm[e.style],r=t.havingStyle(n).withFont("");return Om(e.body,r,t)},mathmlBuilder(e,t){var n=Pm[e.style],r=t.havingStyle(n),o=Zd(e.body,r),i=new Vd.MathNode("mstyle",o),a={display:["0","true"],
417
+ text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",a[0]),i.setAttribute("displaystyle",a[1]),i}});Ad({type:"supsub",htmlBuilder(e,t){var n=function(e,t){var n=e.base;return n?"op"===n.type?n.limits&&(t.style.size===Bc.DISPLAY.size||n.alwaysHandleSupSub)?Cm:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(t.style.size===Bc.DISPLAY.size||n.limits)?Lm:null:"accent"===n.type?Tc.isCharacterBox(n.base)?dh:null:"horizBrace"===n.type&&!e.sub===n.isOver?Nm:null:null}(e,t);if(n)return n(e,t);var r,o,i,{base:a,sup:s,sub:l}=e,c=Bd(a,t),u=t.fontMetrics(),d=0,h=0,m=a&&Tc.isCharacterBox(a);if(s){var p=t.havingStyle(t.style.sup());r=Bd(s,p,t),m||(d=c.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(l){var f=t.havingStyle(t.style.sub());o=Bd(l,f,t),m||(h=c.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}i=t.style===Bc.DISPLAY?u.sup1:t.style.cramped?u.sup3:u.sup2;var g,v=t.sizeMultiplier,b=au(.5/u.ptPerEm/v),y=null;if(o){
418
+ var _=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof gu||_)&&(y=au(-c.italic))}if(r&&o){d=Math.max(d,i,r.depth+.25*u.xHeight),h=Math.max(h,u.sub2);var w=4*u.defaultRuleThickness;if(d-r.depth-(o.height-h)<w){h=w-(d-r.depth)+o.height;var x=.8*u.xHeight-(d-r.depth);x>0&&(d+=x,h-=x)}var k=[{type:"elem",elem:o,shift:h,marginRight:b,marginLeft:y},{type:"elem",elem:r,shift:-d,marginRight:b}];g=gd.makeVList({positionType:"individualShift",children:k},t)}else if(o){h=Math.max(h,u.sub1,o.height-.8*u.xHeight);var N=[{type:"elem",elem:o,marginLeft:y,marginRight:b}];g=gd.makeVList({positionType:"shift",positionData:h,children:N},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");d=Math.max(d,i,r.depth+.25*u.xHeight),g=gd.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:r,marginRight:b}]},t)}var S=Fd(c,"right")||"mord";return gd.makeSpan([S],[c,gd.makeSpan(["msupsub"],[g])],t)},mathmlBuilder(e,t){var n,r=!1
419
+ ;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(r=!0,n=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var o,i=[Qd(e.base,t)];if(e.sub&&i.push(Qd(e.sub,t)),e.sup&&i.push(Qd(e.sup,t)),r)o=n?"mover":"munder";else if(e.sub)if(e.sup){var a=e.base;o=a&&"op"===a.type&&a.limits&&t.style===Bc.DISPLAY||a&&"operatorname"===a.type&&a.alwaysHandleSupSub&&(t.style===Bc.DISPLAY||a.limits)?"munderover":"msubsup"}else{var s=e.base;o=s&&"op"===s.type&&s.limits&&(t.style===Bc.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===Bc.DISPLAY)?"munder":"msub"}else{var l=e.base;o=l&&"op"===l.type&&l.limits&&(t.style===Bc.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===Bc.DISPLAY)?"mover":"msup"}return new Vd.MathNode(o,i)}}),Ad({type:"atom",htmlBuilder:(e,t)=>gd.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){
420
+ var n=new Vd.MathNode("mo",[Wd(e.text,e.mode)]);if("bin"===e.family){var r=Yd(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false");return n}});var Dm={mi:"italic",mn:"normal",mtext:"normal"};Ad({type:"mathord",htmlBuilder:(e,t)=>gd.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var n=new Vd.MathNode("mi",[Wd(e.text,e.mode,t)]),r=Yd(e,t)||"italic";return r!==Dm[n.type]&&n.setAttribute("mathvariant",r),n}}),Ad({type:"textord",htmlBuilder:(e,t)=>gd.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var n,r=Wd(e.text,e.mode,t),o=Yd(e,t)||"normal";return n="text"===e.mode?new Vd.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new Vd.MathNode("mn",[r]):"\\prime"===e.text?new Vd.MathNode("mo",[r]):new Vd.MathNode("mi",[r]),o!==Dm[n.type]&&n.setAttribute("mathvariant",o),n}});var Fm={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Hm={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},
421
+ "\\nobreakspace":{className:"nobreak"}};Ad({type:"spacing",htmlBuilder(e,t){if(Hm.hasOwnProperty(e.text)){var n=Hm[e.text].className||"";if("text"===e.mode){var r=gd.makeOrd(e,t,"textord");return r.classes.push(n),r}return gd.makeSpan(["mspace",n],[gd.mathsym(e.text,e.mode,t)],t)}if(Fm.hasOwnProperty(e.text))return gd.makeSpan(["mspace",Fm[e.text]],[],t);throw new kc('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!Hm.hasOwnProperty(e.text)){if(Fm.hasOwnProperty(e.text))return new Vd.MathNode("mspace");throw new kc('Unknown type of space "'+e.text+'"')}return new Vd.MathNode("mtext",[new Vd.TextNode(" ")])}});var Bm=()=>{var e=new Vd.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};Ad({type:"tag",mathmlBuilder(e,t){var n=new Vd.MathNode("mtable",[new Vd.MathNode("mtr",[Bm(),new Vd.MathNode("mtd",[Jd(e.body,t)]),Bm(),new Vd.MathNode("mtd",[Jd(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var $m={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt",
422
+ "\\textnormal":"textrm"},jm={"\\textbf":"textbf","\\textmd":"textmd"},qm={"\\textit":"textit","\\textup":"textup"},Um=(e,t)=>{var n=e.font;return n?$m[n]?t.withTextFontFamily($m[n]):jm[n]?t.withTextFontWeight(jm[n]):"\\emph"===n?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(qm[n]):t};Sd({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,o=t[0];return{type:"text",mode:n.mode,body:Td(o),font:r}},htmlBuilder(e,t){var n=Um(e,t),r=Od(e.body,n,!0);return gd.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=Um(e,t);return Jd(e.body,n)}}),Sd({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){
423
+ var n=Bd(e.body,t),r=gd.makeLineSpan("underline-line",t),o=t.fontMetrics().defaultRuleThickness,i=gd.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:o},{type:"elem",elem:r},{type:"kern",size:3*o},{type:"elem",elem:n}]},t);return gd.makeSpan(["mord","underline"],[i],t)},mathmlBuilder(e,t){var n=new Vd.MathNode("mo",[new Vd.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Vd.MathNode("munder",[Qd(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}),Sd({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Bd(e.body,t),r=t.fontMetrics().axisHeight,o=.5*(n.height-r-(n.depth+r));return gd.makeVList({positionType:"shift",positionData:o,children:[{type:"elem",elem:n}]},t)},mathmlBuilder:(e,t)=>new Vd.MathNode("mpadded",[Qd(e.body,t)],["vcenter"])}),Sd({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){
424
+ throw new kc("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=Gm(e),r=[],o=t.havingStyle(t.style.text()),i=0;i<n.length;i++){var a=n[i];"~"===a&&(a="\\textasciitilde"),r.push(gd.makeSymbol(a,"Typewriter-Regular",e.mode,o,["mord","texttt"]))}return gd.makeSpan(["mord","text"].concat(o.sizingClasses(t)),gd.tryCombineChars(r),o)},mathmlBuilder(e,t){var n=new Vd.TextNode(Gm(e)),r=new Vd.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var Gm=e=>e.body.replace(/ /g,e.star?"␣":" "),Vm=xd,Wm="[ \r\n\t]",Km="(\\\\[a-zA-Z@]+)"+Wm+"*",Ym="[̀-ͯ]",Xm=new RegExp(Ym+"+$"),Zm="("+Wm+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿]"+Ym+"*|[\ud800-\udbff][\udc00-\udfff]"+Ym+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Km+"|\\\\[^\ud800-\udfff])";class Jm{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Zm,"g"),this.catcodes={"%":14,"~":13}}
425
+ setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new xc("EOF",new wc(this,t,t));var n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new kc("Unexpected character: '"+e[t]+"'",new xc(e[t],new wc(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[r]){var o=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===o?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=o+1,this.lex()}return new xc(r,new wc(this,t,this.tokenRegex.lastIndex))}}class Qm{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){
426
+ if(0===this.undefStack.length)throw new kc("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(void 0===n&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(e)&&(o[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var ep=om;im("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),im("\\expandafter",(function(e){var t=e.popToken()
427
+ ;return e.expandOnce(!0),{tokens:[t],numArgs:0}})),im("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),im("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),im("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),im("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),im("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var tp={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};im("\\char",(function(e){var t,n=e.popToken(),r="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])r=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new kc("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){
428
+ if(null==(r=tp[n.text])||r>=t)throw new kc("Invalid base-"+t+" digit "+n.text);for(var o;null!=(o=tp[e.future().text])&&o<t;)r*=t,r+=o,e.popToken()}return"\\@char{"+r+"}"}));var np=(e,t,n,r)=>{var o=e.consumeArg().tokens;if(1!==o.length)throw new kc("\\newcommand's first argument must be a macro name");var i=o[0].text,a=e.isDefined(i);if(a&&!t)throw new kc("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!a&&!n)throw new kc("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var s=0;if(1===(o=e.consumeArg().tokens).length&&"["===o[0].text){for(var l="",c=e.expandNextToken();"]"!==c.text&&"EOF"!==c.text;)l+=c.text,c=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new kc("Invalid number of arguments: "+l);s=parseInt(l),o=e.consumeArg().tokens}return a&&r||e.macros.set(i,{tokens:o,numArgs:s}),""};im("\\newcommand",(e=>np(e,!1,!0,!1))),im("\\renewcommand",(e=>np(e,!0,!1,!1))),im("\\providecommand",(e=>np(e,!0,!0,!0))),im("\\message",(e=>{
429
+ var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),im("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),im("\\show",(e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Vm[n],ku.math[n],ku.text[n]),""})),im("\\bgroup","{"),im("\\egroup","}"),im("~","\\nobreakspace"),im("\\lq","`"),im("\\rq","'"),im("\\aa","\\r a"),im("\\AA","\\r A"),im("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),im("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),im("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),im("ℬ","\\mathscr{B}"),im("ℰ","\\mathscr{E}"),im("ℱ","\\mathscr{F}"),im("ℋ","\\mathscr{H}"),im("ℐ","\\mathscr{I}"),im("ℒ","\\mathscr{L}"),im("ℳ","\\mathscr{M}"),im("ℛ","\\mathscr{R}"),im("ℭ","\\mathfrak{C}"),im("ℌ","\\mathfrak{H}"),im("ℨ","\\mathfrak{Z}"),im("\\Bbbk","\\Bbb{k}"),im("·","\\cdotp"),im("\\llap","\\mathllap{\\textrm{#1}}"),
430
+ im("\\rlap","\\mathrlap{\\textrm{#1}}"),im("\\clap","\\mathclap{\\textrm{#1}}"),im("\\mathstrut","\\vphantom{(}"),im("\\underbar","\\underline{\\text{#1}}"),im("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),im("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),im("\\ne","\\neq"),im("≠","\\neq"),im("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),im("∉","\\notin"),im("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),im("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),im("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),im("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),im("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),im("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),im("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),
431
+ im("⟂","\\perp"),im("‼","\\mathclose{!\\mkern-0.8mu!}"),im("∌","\\notni"),im("⌜","\\ulcorner"),im("⌝","\\urcorner"),im("⌞","\\llcorner"),im("⌟","\\lrcorner"),im("©","\\copyright"),im("®","\\textregistered"),im("️","\\textregistered"),im("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),im("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),im("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),im("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),im("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),im("⋮","\\vdots"),im("\\varGamma","\\mathit{\\Gamma}"),im("\\varDelta","\\mathit{\\Delta}"),im("\\varTheta","\\mathit{\\Theta}"),im("\\varLambda","\\mathit{\\Lambda}"),im("\\varXi","\\mathit{\\Xi}"),im("\\varPi","\\mathit{\\Pi}"),im("\\varSigma","\\mathit{\\Sigma}"),im("\\varUpsilon","\\mathit{\\Upsilon}"),im("\\varPhi","\\mathit{\\Phi}"),im("\\varPsi","\\mathit{\\Psi}"),im("\\varOmega","\\mathit{\\Omega}"),im("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),
432
+ im("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),im("\\boxed","\\fbox{$\\displaystyle{#1}$}"),im("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),im("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),im("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),im("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),im("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var rp={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb",
433
+ "\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};im("\\dots",(function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in rp?t=rp[n]:("\\not"===n.slice(0,4)||n in ku.math&&Tc.contains(["bin","rel"],ku.math[n].group))&&(t="\\dotsb"),t}));var op={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};im("\\dotso",(function(e){return e.future().text in op?"\\ldots\\,":"\\ldots"})),im("\\dotsc",(function(e){var t=e.future().text
434
+ ;return t in op&&","!==t?"\\ldots\\,":"\\ldots"})),im("\\cdots",(function(e){return e.future().text in op?"\\@cdots\\,":"\\@cdots"})),im("\\dotsb","\\cdots"),im("\\dotsm","\\cdots"),im("\\dotsi","\\!\\cdots"),im("\\dotsx","\\ldots\\,"),im("\\DOTSI","\\relax"),im("\\DOTSB","\\relax"),im("\\DOTSX","\\relax"),im("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),im("\\,","\\tmspace+{3mu}{.1667em}"),im("\\thinspace","\\,"),im("\\>","\\mskip{4mu}"),im("\\:","\\tmspace+{4mu}{.2222em}"),im("\\medspace","\\:"),im("\\;","\\tmspace+{5mu}{.2777em}"),im("\\thickspace","\\;"),im("\\!","\\tmspace-{3mu}{.1667em}"),im("\\negthinspace","\\!"),im("\\negmedspace","\\tmspace-{4mu}{.2222em}"),im("\\negthickspace","\\tmspace-{5mu}{.277em}"),im("\\enspace","\\kern.5em "),im("\\enskip","\\hskip.5em\\relax"),im("\\quad","\\hskip1em\\relax"),im("\\qquad","\\hskip2em\\relax"),im("\\tag","\\@ifstar\\tag@literal\\tag@paren"),im("\\tag@paren","\\tag@literal{({#1})}"),im("\\tag@literal",(e=>{
435
+ if(e.macros.get("\\df@tag"))throw new kc("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),im("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),im("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),im("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),im("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),im("\\newline","\\\\\\relax"),im("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ip=au(Wc["Main-Regular"]["T".charCodeAt(0)][1]-.7*Wc["Main-Regular"]["A".charCodeAt(0)][1]);im("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+ip+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),im("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+ip+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),im("\\hspace","\\@ifstar\\@hspacer\\@hspace"),
436
+ im("\\@hspace","\\hskip #1\\relax"),im("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),im("\\ordinarycolon",":"),im("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),im("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),im("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),im("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),im("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),im("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),im("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),im("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),
437
+ im("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),im("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),im("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),im("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),im("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),im("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),im("∷","\\dblcolon"),im("∹","\\eqcolon"),im("≔","\\coloneqq"),im("≕","\\eqqcolon"),im("⩴","\\Coloneqq"),im("\\ratio","\\vcentcolon"),im("\\coloncolon","\\dblcolon"),im("\\colonequals","\\coloneqq"),im("\\coloncolonequals","\\Coloneqq"),im("\\equalscolon","\\eqqcolon"),
438
+ im("\\equalscoloncolon","\\Eqqcolon"),im("\\colonminus","\\coloneq"),im("\\coloncolonminus","\\Coloneq"),im("\\minuscolon","\\eqcolon"),im("\\minuscoloncolon","\\Eqcolon"),im("\\coloncolonapprox","\\Colonapprox"),im("\\coloncolonsim","\\Colonsim"),im("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),im("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),im("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),im("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),im("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),im("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),im("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),im("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),im("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),im("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),im("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),im("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),
439
+ im("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),im("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),im("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),im("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),im("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),im("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),im("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),im("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),im("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),im("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),im("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),im("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),im("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),im("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),im("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),im("\\imath","\\html@mathml{\\@imath}{ı}"),im("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),im("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),
440
+ im("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),im("⟦","\\llbracket"),im("⟧","\\rrbracket"),im("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),im("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),im("⦃","\\lBrace"),im("⦄","\\rBrace"),im("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),im("⦵","\\minuso"),im("\\darr","\\downarrow"),im("\\dArr","\\Downarrow"),im("\\Darr","\\Downarrow"),im("\\lang","\\langle"),im("\\rang","\\rangle"),im("\\uarr","\\uparrow"),im("\\uArr","\\Uparrow"),im("\\Uarr","\\Uparrow"),im("\\N","\\mathbb{N}"),im("\\R","\\mathbb{R}"),im("\\Z","\\mathbb{Z}"),im("\\alef","\\aleph"),im("\\alefsym","\\aleph"),im("\\Alpha","\\mathrm{A}"),im("\\Beta","\\mathrm{B}"),im("\\bull","\\bullet"),im("\\Chi","\\mathrm{X}"),im("\\clubs","\\clubsuit"),im("\\cnums","\\mathbb{C}"),
441
+ im("\\Complex","\\mathbb{C}"),im("\\Dagger","\\ddagger"),im("\\diamonds","\\diamondsuit"),im("\\empty","\\emptyset"),im("\\Epsilon","\\mathrm{E}"),im("\\Eta","\\mathrm{H}"),im("\\exist","\\exists"),im("\\harr","\\leftrightarrow"),im("\\hArr","\\Leftrightarrow"),im("\\Harr","\\Leftrightarrow"),im("\\hearts","\\heartsuit"),im("\\image","\\Im"),im("\\infin","\\infty"),im("\\Iota","\\mathrm{I}"),im("\\isin","\\in"),im("\\Kappa","\\mathrm{K}"),im("\\larr","\\leftarrow"),im("\\lArr","\\Leftarrow"),im("\\Larr","\\Leftarrow"),im("\\lrarr","\\leftrightarrow"),im("\\lrArr","\\Leftrightarrow"),im("\\Lrarr","\\Leftrightarrow"),im("\\Mu","\\mathrm{M}"),im("\\natnums","\\mathbb{N}"),im("\\Nu","\\mathrm{N}"),im("\\Omicron","\\mathrm{O}"),im("\\plusmn","\\pm"),im("\\rarr","\\rightarrow"),im("\\rArr","\\Rightarrow"),im("\\Rarr","\\Rightarrow"),im("\\real","\\Re"),im("\\reals","\\mathbb{R}"),im("\\Reals","\\mathbb{R}"),im("\\Rho","\\mathrm{P}"),im("\\sdot","\\cdot"),im("\\sect","\\S"),im("\\spades","\\spadesuit"),
442
+ im("\\sub","\\subset"),im("\\sube","\\subseteq"),im("\\supe","\\supseteq"),im("\\Tau","\\mathrm{T}"),im("\\thetasym","\\vartheta"),im("\\weierp","\\wp"),im("\\Zeta","\\mathrm{Z}"),im("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),im("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),im("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),im("\\bra","\\mathinner{\\langle{#1}|}"),im("\\ket","\\mathinner{|{#1}\\rangle}"),im("\\braket","\\mathinner{\\langle{#1}\\rangle}"),im("\\Bra","\\left\\langle#1\\right|"),im("\\Ket","\\left|#1\\right\\rangle");var ap=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,o=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=t=>n=>{e&&(n.macros.set("|",a),o.length&&n.macros.set("\\|",s));var i=t;!t&&o.length&&("|"===n.future().text&&(n.popToken(),i=!0));return{tokens:i?o:r,numArgs:0}};t.macros.set("|",l(!1)),o.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,u=t.expandTokens([...i,...c,...n])
443
+ ;return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};im("\\bra@ket",ap(!1)),im("\\bra@set",ap(!0)),im("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),im("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),im("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),im("\\angln","{\\angl n}"),im("\\blue","\\textcolor{##6495ed}{#1}"),im("\\orange","\\textcolor{##ffa500}{#1}"),im("\\pink","\\textcolor{##ff00af}{#1}"),im("\\red","\\textcolor{##df0030}{#1}"),im("\\green","\\textcolor{##28ae7b}{#1}"),im("\\gray","\\textcolor{gray}{#1}"),im("\\purple","\\textcolor{##9d38bd}{#1}"),im("\\blueA","\\textcolor{##ccfaff}{#1}"),im("\\blueB","\\textcolor{##80f6ff}{#1}"),im("\\blueC","\\textcolor{##63d9ea}{#1}"),im("\\blueD","\\textcolor{##11accd}{#1}"),im("\\blueE","\\textcolor{##0c7f99}{#1}"),im("\\tealA","\\textcolor{##94fff5}{#1}"),im("\\tealB","\\textcolor{##26edd5}{#1}"),im("\\tealC","\\textcolor{##01d1c1}{#1}"),
444
+ im("\\tealD","\\textcolor{##01a995}{#1}"),im("\\tealE","\\textcolor{##208170}{#1}"),im("\\greenA","\\textcolor{##b6ffb0}{#1}"),im("\\greenB","\\textcolor{##8af281}{#1}"),im("\\greenC","\\textcolor{##74cf70}{#1}"),im("\\greenD","\\textcolor{##1fab54}{#1}"),im("\\greenE","\\textcolor{##0d923f}{#1}"),im("\\goldA","\\textcolor{##ffd0a9}{#1}"),im("\\goldB","\\textcolor{##ffbb71}{#1}"),im("\\goldC","\\textcolor{##ff9c39}{#1}"),im("\\goldD","\\textcolor{##e07d10}{#1}"),im("\\goldE","\\textcolor{##a75a05}{#1}"),im("\\redA","\\textcolor{##fca9a9}{#1}"),im("\\redB","\\textcolor{##ff8482}{#1}"),im("\\redC","\\textcolor{##f9685d}{#1}"),im("\\redD","\\textcolor{##e84d39}{#1}"),im("\\redE","\\textcolor{##bc2612}{#1}"),im("\\maroonA","\\textcolor{##ffbde0}{#1}"),im("\\maroonB","\\textcolor{##ff92c6}{#1}"),im("\\maroonC","\\textcolor{##ed5fa6}{#1}"),im("\\maroonD","\\textcolor{##ca337c}{#1}"),im("\\maroonE","\\textcolor{##9e034e}{#1}"),im("\\purpleA","\\textcolor{##ddd7ff}{#1}"),im("\\purpleB","\\textcolor{##c6b9fc}{#1}"),
445
+ im("\\purpleC","\\textcolor{##aa87ff}{#1}"),im("\\purpleD","\\textcolor{##7854ab}{#1}"),im("\\purpleE","\\textcolor{##543b78}{#1}"),im("\\mintA","\\textcolor{##f5f9e8}{#1}"),im("\\mintB","\\textcolor{##edf2df}{#1}"),im("\\mintC","\\textcolor{##e0e5cc}{#1}"),im("\\grayA","\\textcolor{##f6f7f7}{#1}"),im("\\grayB","\\textcolor{##f0f1f2}{#1}"),im("\\grayC","\\textcolor{##e3e5e6}{#1}"),im("\\grayD","\\textcolor{##d6d8da}{#1}"),im("\\grayE","\\textcolor{##babec2}{#1}"),im("\\grayF","\\textcolor{##888d93}{#1}"),im("\\grayG","\\textcolor{##626569}{#1}"),im("\\grayH","\\textcolor{##3b3e40}{#1}"),im("\\grayI","\\textcolor{##21242c}{#1}"),im("\\kaBlue","\\textcolor{##314453}{#1}"),im("\\kaGreen","\\textcolor{##71B307}{#1}");var sp={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class lp{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Qm(ep,t.macros),this.mode=n,
446
+ this.stack=[]}feed(e){this.lexer=new Jm(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:r,end:n}=this.consumeArg(["]"]))}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new xc("EOF",n.loc)),this.pushTokens(r),t.range(n,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r,o=this.future(),i=0,a=0;do{if(r=this.popToken(),t.push(r),"{"===r.text)++i;else if("}"===r.text){if(-1===--i)throw new kc("Extra }",r)
447
+ }else if("EOF"===r.text)throw new kc("Unexpected end of input in a macro argument, expected '"+(e&&n?e[a]:"}")+"'",r);if(e&&n)if((0===i||1===i&&"{"===e[a])&&r.text===e[a]){if(++a===e.length){t.splice(-a,a);break}}else a=0}while(0!==i||n);return"{"===o.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:o,end:r}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new kc("The length of delimiters doesn't match the number of args!");for(var n=t[0],r=0;r<n.length;r++){var o=this.popToken();if(n[r]!==o.text)throw new kc("Use of the macro doesn't match its definition",o)}}for(var i=[],a=0;a<e;a++)i.push(this.consumeArg(t&&t[a+1]).tokens);return i}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new kc("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(null==r||e&&r.unexpandable){
448
+ if(e&&null==r&&"\\"===n[0]&&!this.isDefined(n))throw new kc("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var o=r.tokens,i=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs)for(var a=(o=o.slice()).length-1;a>=0;--a){var s=o[a];if("#"===s.text){if(0===a)throw new kc("Incomplete placeholder at end of macro body",s);if("#"===(s=o[--a]).text)o.splice(a+1,1);else{if(!/^[1-9]$/.test(s.text))throw new kc("Not a valid argument number",s);o.splice(a,2,...i[+s.text-1])}}}return this.pushTokens(o),o.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new xc(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(!1===this.expandOnce(!0)){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(r)}
449
+ return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var n=this.lexer.catcodes[e];if(null!=n&&13!==n)return}var r="function"==typeof t?t(this):t;if("string"==typeof r){var o=0;if(-1!==r.indexOf("#"))for(var i=r.replace(/##/g,"");-1!==i.indexOf("#"+(o+1));)++o;for(var a=new Jm(r,this.settings),s=[],l=a.lex();"EOF"!==l.text;)s.push(l),l=a.lex();return s.reverse(),{tokens:s,numArgs:o}}return r}isDefined(e){return this.macros.has(e)||Vm.hasOwnProperty(e)||ku.math.hasOwnProperty(e)||ku.text.hasOwnProperty(e)||sp.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Vm.hasOwnProperty(e)&&!Vm[e].primitive}}var cp=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,up=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9",
450
+ "ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),dp={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{
451
+ text:"\\H"},"̧":{text:"\\c"}},hp={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř",
452
+ "ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï",
453
+ "Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ",
454
+ "ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class mp{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new lp(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new kc("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),
455
+ this.gullet.pushToken(new xc("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var r=this.fetch();if(-1!==mp.endOfExpression.indexOf(r.text))break;if(t&&r.text===t)break;if(e&&Vm[r.text]&&Vm[r.text].infix)break;var o=this.parseAtom(t);if(!o)break;"internal"!==o.type&&n.push(o)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var t,n=-1,r=0;r<e.length;r++)if("infix"===e[r].type){if(-1!==n)throw new kc("only one infix operator per group",e[r].token);n=r,t=e[r].replaceWith}if(-1!==n&&t){var o,i,a=e.slice(0,n),s=e.slice(n+1);return o=1===a.length&&"ordgroup"===a[0].type?a[0]:{type:"ordgroup",mode:this.mode,body:a},i=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},["\\\\abovefrac"===t?this.callFunction(t,[o,e[n],i],[]):this.callFunction(t,[o,i],[])]}return e}handleSupSubscript(e){
456
+ var t,n=this.fetch(),r=n.text;this.consume(),this.consumeSpaces();do{var o;t=this.parseGroup(e)}while("internal"===(null==(o=t)?void 0:o.type));if(!t)throw new kc("Expected group after '"+r+"'",n);return t}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t,n,r=this.parseGroup("atom",e);if("internal"===(null==r?void 0:r.type))return r;if("text"===this.mode)return r;for(;;){this.consumeSpaces();var o=this.fetch();if("\\limits"===o.text||"\\nolimits"===o.text){if(r&&"op"===r.type){var i="\\limits"===o.text;r.limits=i,r.alwaysHandleSupSub=!0}else{if(!r||"operatorname"!==r.type)throw new kc("Limit controls must follow a math operator",o);r.alwaysHandleSupSub&&(r.limits="\\limits"===o.text)}this.consume()}else if("^"===o.text){if(t)throw new kc("Double superscript",o);t=this.handleSupSubscript("superscript")
457
+ }else if("_"===o.text){if(n)throw new kc("Double subscript",o);n=this.handleSupSubscript("subscript")}else if("'"===o.text){if(t)throw new kc("Double superscript",o);var a={type:"textord",mode:this.mode,text:"\\prime"},s=[a];for(this.consume();"'"===this.fetch().text;)s.push(a),this.consume();"^"===this.fetch().text&&s.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:s}}else{if(!up[o.text])break;var l=cp.test(o.text),c=[];for(c.push(new xc(up[o.text])),this.consume();;){var u=this.fetch().text;if(!up[u])break;if(cp.test(u)!==l)break;c.unshift(new xc(up[u])),this.consume()}var d=this.subparse(c);l?n={type:"ordgroup",mode:"math",body:d}:t={type:"ordgroup",mode:"math",body:d}}}return t||n?{type:"supsub",mode:this.mode,base:r,sup:t,sub:n}:r}parseFunction(e,t){var n=this.fetch(),r=n.text,o=Vm[r];if(!o)return null;if(this.consume(),t&&"atom"!==t&&!o.allowedInArgument)throw new kc("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n)
458
+ ;if("text"===this.mode&&!o.allowedInText)throw new kc("Can't use function '"+r+"' in text mode",n);if("math"===this.mode&&!1===o.allowedInMath)throw new kc("Can't use function '"+r+"' in math mode",n);var{args:i,optArgs:a}=this.parseArguments(r,o);return this.callFunction(r,i,a,n,e)}callFunction(e,t,n,r,o){var i={funcName:e,parser:this,token:r,breakOnTokenText:o},a=Vm[e];if(a&&a.handler)return a.handler(i,t,n);throw new kc("No function handler for "+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(0===n)return{args:[],optArgs:[]};for(var r=[],o=[],i=0;i<n;i++){var a=t.argTypes&&t.argTypes[i],s=i<t.numOptionalArgs;(t.primitive&&null==a||"sqrt"===t.type&&1===i&&null==o[0])&&(a="primitive");var l=this.parseGroupOfType("argument to '"+e+"'",a,s);if(s)o.push(l);else{if(null==l)throw new kc("Null argument, please report this as a bug");r.push(l)}}return{args:r,optArgs:o}}parseGroupOfType(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":
459
+ return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":var r=this.parseArgumentGroup(n,"text");return null!=r?{type:"styling",mode:r.mode,body:[r],style:"text"}:null;case"raw":var o=this.parseStringGroup("raw",n);return null!=o?{type:"raw",mode:"text",string:o.text}:null;case"primitive":if(n)throw new kc("A primitive argument cannot be optional");var i=this.parseGroup(e);if(null==i)throw new kc("Expected group as "+e,this.fetch());return i;case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new kc("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(null==n)return null;for(var r,o="";"EOF"!==(r=this.fetch()).text;)o+=r.text,this.consume();return this.consume(),n.text=o,n}parseRegexGroup(e,t){for(var n,r=this.fetch(),o=r,i="";"EOF"!==(n=this.fetch()).text&&e.test(i+n.text);)i+=(o=n).text,this.consume()
460
+ ;if(""===i)throw new kc("Invalid "+t+": '"+r.text+"'",r);return r.range(o,i)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new kc("Invalid color: '"+t.text+"'",t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new kc("Invalid size: '"+t.text+"'",t);var o={number:+(r[1]+r[2]),unit:r[3]};if(!ou(o))throw new kc("Invalid unit: '"+o.unit+"'",t);return{type:"size",mode:this.mode,value:o,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e)
461
+ ;if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(null==n)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var i={type:"ordgroup",mode:this.mode,loc:n.loc,body:o};return t&&this.switchMode(r),i}parseGroup(e,t){var n,r=this.fetch(),o=r.text;if("{"===o||"\\begingroup"===o){this.consume();var i="{"===o?"}":"\\endgroup";this.gullet.beginGroup();var a=this.parseExpression(!1,i),s=this.fetch();this.expect(i),this.gullet.endGroup(),n={type:"ordgroup",mode:this.mode,loc:wc.range(r,s),body:a,semisimple:"\\begingroup"===o||void 0}}else if(null==(n=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===o[0]&&!sp.hasOwnProperty(o)){if(this.settings.throwOnError)throw new kc("Undefined control sequence: "+o,r)
462
+ ;n=this.formatUnsupportedCmd(o),this.consume()}return n}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n],o=r.text;"-"===o&&"-"===e[n+1].text&&(n+1<t&&"-"===e[n+2].text?(e.splice(n,3,{type:"textord",mode:"text",loc:wc.range(r,e[n+2]),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:wc.range(r,e[n+1]),text:"--"}),t-=1)),"'"!==o&&"`"!==o||e[n+1].text!==o||(e.splice(n,2,{type:"textord",mode:"text",loc:wc.range(r,e[n+1]),text:o+o}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r="*"===n.charAt(0);if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new kc("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:r}}
463
+ hp.hasOwnProperty(t[0])&&!ku[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=hp[t[0]]+t.slice(1));var o,i=Xm.exec(t);if(i&&("i"===(t=t.substring(0,i.index))?t="ı":"j"===t&&(t="ȷ")),ku[this.mode][t]){this.settings.strict&&"math"===this.mode&&td.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var a,s=ku[this.mode][t].group,l=wc.range(e);if(wu.hasOwnProperty(s)){var c=s;a={type:"atom",mode:this.mode,family:c,loc:l,text:t}}else a={type:s,mode:this.mode,loc:l,text:t};o=a}else{if(!(t.charCodeAt(0)>=128))return null
464
+ ;this.settings.strict&&(qc(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:wc.range(e),text:t}}if(this.consume(),i)for(var u=0;u<i[0].length;u++){var d=i[0][u];if(!dp[d])throw new kc("Unknown accent ' "+d+"'",e);var h=dp[d][this.mode]||dp[d].text;if(!h)throw new kc("Accent "+d+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:wc.range(e),label:h,isStretchy:!1,isShifty:!0,base:o}}return o}}mp.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var pp=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new mp(e,t);delete n.gullet.macros.current["\\df@tag"];var r=n.parse();if(delete n.gullet.macros.current["\\current@color"],
465
+ delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new kc("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new xc("\\df@tag")])}]}return r},fp=function(e,t,n){t.textContent="";var r=bp(e,n).toNode();t.appendChild(r)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),fp=function(){throw new kc("KaTeX doesn't work in quirks mode.")});var gp,vp=function(e,t,n){if(n.throwOnError||!(e instanceof kc))throw e;var r=gd.makeSpan(["katex-error"],[new gu(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+n.errorColor),r},bp=function(e,t){var n=new Ic(t);try{return function(e,t,n){var r,o=th(n);if("mathml"===n.output)return eh(e,t,o,n.displayMode,!0);if("html"===n.output){var i=jd(e,o);r=gd.makeSpan(["katex"],[i])}else{
466
+ var a=eh(e,t,o,n.displayMode,!1),s=jd(e,o);r=gd.makeSpan(["katex"],[a,s])}return nh(r,n)}(pp(e,n),e,n)}catch(t){return vp(t,e,n)}},yp={version:"0.16.22",render:fp,renderToString:function(e,t){return bp(e,t).toMarkup()},ParseError:kc,SETTINGS_SCHEMA:Cc,__parse:function(e,t){var n=new Ic(t);return pp(e,n)},__renderToDomTree:bp,__renderToHTMLTree:function(e,t){var n=new Ic(t);try{return function(e,t,n){var r=jd(e,th(n)),o=gd.makeSpan(["katex"],[r]);return nh(o,n)}(pp(e,n),0,n)}catch(t){return vp(t,e,n)}},__setFontMetrics:function(e,t){Wc[e]=t},__defineSymbol:Nu,__defineFunction:Sd,__defineMacro:im,__domTree:{Span:hu,Anchor:mu,SymbolNode:gu,SvgNode:vu,PathNode:bu,LineNode:yu}},_p={exports:{}},wp=_p.exports;var xp=(gp||(gp=1,function(e){(function(){function t(e){var t={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,
467
+ describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{
468
+ defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},
469
+ smartIndentationFix:{defaultValue:!1,describe:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,describe:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,describe:"Parses simple line breaks as <br> (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,
470
+ describe:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex: <div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,
471
+ describe:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(t));var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r].defaultValue);return n}var n={},r={},o={},i=t(!0),a="vanilla",s={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:t(!0),allOn:function(){
472
+ var e=t(!0),n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=!0);return n}()};function l(e,t){var r=t?"Error in "+t+" extension->":"Error in unnamed extension",o={valid:!0,error:""};n.helper.isArray(e)||(e=[e]);for(var i=0;i<e.length;++i){var a=r+" sub-extension "+i+": ",s=e[i];if("object"!=typeof s)return o.valid=!1,o.error=a+"must be an object, but "+typeof s+" given",o;if(!n.helper.isString(s.type))return o.valid=!1,o.error=a+'property "type" must be a string, but '+typeof s.type+" given",o;var l=s.type=s.type.toLowerCase();if("language"===l&&(l=s.type="lang"),"html"===l&&(l=s.type="output"),"lang"!==l&&"output"!==l&&"listener"!==l)return o.valid=!1,o.error=a+"type "+l+' is not recognized. Valid values: "lang/language", "output/html" or "listener"',o;if("listener"===l){if(n.helper.isUndefined(s.listeners))return o.valid=!1,o.error=a+'. Extensions of type "listener" must have a property called "listeners"',o}else if(n.helper.isUndefined(s.filter)&&n.helper.isUndefined(s.regex))return o.valid=!1,
473
+ o.error=a+l+' extensions must define either a "regex" property or a "filter" method',o;if(s.listeners){if("object"!=typeof s.listeners)return o.valid=!1,o.error=a+'"listeners" property must be an object but '+typeof s.listeners+" given",o;for(var c in s.listeners)if(s.listeners.hasOwnProperty(c)&&"function"!=typeof s.listeners[c])return o.valid=!1,o.error=a+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+c+" must be a function but "+typeof s.listeners[c]+" given",o}if(s.filter){if("function"!=typeof s.filter)return o.valid=!1,o.error=a+'"filter" must be a function, but '+typeof s.filter+" given",o}else if(s.regex){if(n.helper.isString(s.regex)&&(s.regex=new RegExp(s.regex,"g")),!(s.regex instanceof RegExp))return o.valid=!1,o.error=a+'"regex" property must either be a string or a RegExp object, but '+typeof s.regex+" given",o;if(n.helper.isUndefined(s.replace))return o.valid=!1,o.error=a+'"regex" extensions must implement a replace string or function',o}}return o}
474
+ function c(e,t){return"¨E"+t.charCodeAt(0)+"E"}n.helper={},n.extensions={},n.setOption=function(e,t){return i[e]=t,this},n.getOption=function(e){return i[e]},n.getOptions=function(){return i},n.resetOptions=function(){i=t(!0)},n.setFlavor=function(e){if(!s.hasOwnProperty(e))throw Error(e+" flavor was not found");n.resetOptions();var t=s[e];for(var r in a=e,t)t.hasOwnProperty(r)&&(i[r]=t[r])},n.getFlavor=function(){return a},n.getFlavorOptions=function(e){if(s.hasOwnProperty(e))return s[e]},n.getDefaultOptions=function(e){return t(e)},n.subParser=function(e,t){if(n.helper.isString(e)){if(void 0===t){if(r.hasOwnProperty(e))return r[e];throw Error("SubParser named "+e+" not registered!")}r[e]=t}},n.extension=function(e,t){if(!n.helper.isString(e))throw Error("Extension 'name' must be a string");if(e=n.helper.stdExtName(e),n.helper.isUndefined(t)){if(!o.hasOwnProperty(e))throw Error("Extension named "+e+" is not registered!");return o[e]}"function"==typeof t&&(t=t()),n.helper.isArray(t)||(t=[t]);var r=l(t,e)
475
+ ;if(!r.valid)throw Error(r.error);o[e]=t},n.getAllExtensions=function(){return o},n.removeExtension=function(e){delete o[e]},n.resetExtensions=function(){o={}},n.validateExtension=function(e){var t=l(e,null);return!!t.valid||(console.warn(t.error),!1)},n.hasOwnProperty("helper")||(n.helper={}),n.helper.isString=function(e){return"string"==typeof e||e instanceof String},n.helper.isFunction=function(e){return e&&"[object Function]"==={}.toString.call(e)},n.helper.isArray=function(e){return Array.isArray(e)},n.helper.isUndefined=function(e){return void 0===e},n.helper.forEach=function(e,t){if(n.helper.isUndefined(e))throw new Error("obj param is required");if(n.helper.isUndefined(t))throw new Error("callback param is required");if(!n.helper.isFunction(t))throw new Error("callback param must be a function/closure");if("function"==typeof e.forEach)e.forEach(t);else if(n.helper.isArray(e))for(var r=0;r<e.length;r++)t(e[r],r,e);else{
476
+ if("object"!=typeof e)throw new Error("obj does not seem to be an array or an iterable object");for(var o in e)e.hasOwnProperty(o)&&t(e[o],o,e)}},n.helper.stdExtName=function(e){return e.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()},n.helper.escapeCharactersCallback=c,n.helper.escapeCharacters=function(e,t,n){var r="(["+t.replace(/([\[\]\\])/g,"\\$1")+"])";n&&(r="\\\\"+r);var o=new RegExp(r,"g");return e=e.replace(o,c)},n.helper.unescapeHTMLEntities=function(e){return e.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")};var u=function(e,t,n,r){var o,i,a,s,l,c=r||"",u=c.indexOf("g")>-1,d=new RegExp(t+"|"+n,"g"+c.replace(/g/g,"")),h=new RegExp(t,c.replace(/g/g,"")),m=[];do{for(o=0;a=d.exec(e);)if(h.test(a[0]))o++||(s=(i=d.lastIndex)-a[0].length);else if(o&&!--o){l=a.index+a[0].length;var p={left:{start:s,end:i},match:{start:i,end:a.index},right:{start:a.index,end:l},wholeMatch:{start:s,end:l}};if(m.push(p),!u)return m}}while(o&&(d.lastIndex=i));return m}
477
+ ;n.helper.matchRecursiveRegExp=function(e,t,n,r){for(var o=u(e,t,n,r),i=[],a=0;a<o.length;++a)i.push([e.slice(o[a].wholeMatch.start,o[a].wholeMatch.end),e.slice(o[a].match.start,o[a].match.end),e.slice(o[a].left.start,o[a].left.end),e.slice(o[a].right.start,o[a].right.end)]);return i},n.helper.replaceRecursiveRegExp=function(e,t,r,o,i){if(!n.helper.isFunction(t)){var a=t;t=function(){return a}}var s=u(e,r,o,i),l=e,c=s.length;if(c>0){var d=[];0!==s[0].wholeMatch.start&&d.push(e.slice(0,s[0].wholeMatch.start));for(var h=0;h<c;++h)d.push(t(e.slice(s[h].wholeMatch.start,s[h].wholeMatch.end),e.slice(s[h].match.start,s[h].match.end),e.slice(s[h].left.start,s[h].left.end),e.slice(s[h].right.start,s[h].right.end))),h<c-1&&d.push(e.slice(s[h].wholeMatch.end,s[h+1].wholeMatch.start));s[c-1].wholeMatch.end<e.length&&d.push(e.slice(s[c-1].wholeMatch.end)),l=d.join("")}return l},n.helper.regexIndexOf=function(e,t,r){
478
+ if(!n.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";if(t instanceof RegExp==0)throw"InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";var o=e.substring(r||0).search(t);return o>=0?o+(r||0):o},n.helper.splitAtIndex=function(e,t){if(!n.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,t),e.substring(t)]},n.helper.encodeEmailAddress=function(e){var t=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e=e.replace(/./g,(function(e){if("@"===e)e=t[Math.floor(2*Math.random())](e);else{var n=Math.random();e=n>.9?t[2](e):n>.45?t[1](e):t[0](e)}return e})),e},n.helper.padEnd=function(e,t,n){return t>>=0,n=String(n||" "),e.length>t?String(e):((t-=e.length)>n.length&&(n+=n.repeat(t/n.length)),String(e)+n.slice(0,t))
479
+ },"undefined"==typeof console&&(console={warn:function(e){alert(e)},log:function(e){alert(e)},error:function(e){throw e}}),n.helper.regexes={asteriskDashAndColon:/([*_:~])/g},n.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",
480
+ artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️&zwj;♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴&zwj;♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱&zwj;♀️",blossom:"🌼",
481
+ blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇&zwj;♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",
482
+ checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",
483
+ confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷&zwj;♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨&zwj;❤️&zwj;👨",couple_with_heart_woman_woman:"👩&zwj;❤️&zwj;👩",couplekiss_man_man:"👨&zwj;❤️&zwj;💋&zwj;👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩&zwj;❤️&zwj;💋&zwj;👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯&zwj;♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",
484
+ deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁&zwj;🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",
485
+ factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨&zwj;👦",family_man_boy_boy:"👨&zwj;👦&zwj;👦",family_man_girl:"👨&zwj;👧",family_man_girl_boy:"👨&zwj;👧&zwj;👦",family_man_girl_girl:"👨&zwj;👧&zwj;👧",family_man_man_boy:"👨&zwj;👨&zwj;👦",family_man_man_boy_boy:"👨&zwj;👨&zwj;👦&zwj;👦",family_man_man_girl:"👨&zwj;👨&zwj;👧",family_man_man_girl_boy:"👨&zwj;👨&zwj;👧&zwj;👦",family_man_man_girl_girl:"👨&zwj;👨&zwj;👧&zwj;👧",family_man_woman_boy_boy:"👨&zwj;👩&zwj;👦&zwj;👦",family_man_woman_girl:"👨&zwj;👩&zwj;👧",family_man_woman_girl_boy:"👨&zwj;👩&zwj;👧&zwj;👦",family_man_woman_girl_girl:"👨&zwj;👩&zwj;👧&zwj;👧",family_woman_boy:"👩&zwj;👦",family_woman_boy_boy:"👩&zwj;👦&zwj;👦",family_woman_girl:"👩&zwj;👧",family_woman_girl_boy:"👩&zwj;👧&zwj;👦",family_woman_girl_girl:"👩&zwj;👧&zwj;👧",family_woman_woman_boy:"👩&zwj;👩&zwj;👦",family_woman_woman_boy_boy:"👩&zwj;👩&zwj;👦&zwj;👦",family_woman_woman_girl:"👩&zwj;👩&zwj;👧",
486
+ family_woman_woman_girl_boy:"👩&zwj;👩&zwj;👧&zwj;👦",family_woman_woman_girl_girl:"👩&zwj;👩&zwj;👧&zwj;👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️&zwj;♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍&zwj;♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",
487
+ funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️&zwj;♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂&zwj;♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇&zwj;♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",
488
+ high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",
489
+ last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨&zwj;🎨",man_astronaut:"👨&zwj;🚀",man_cartwheeling:"🤸&zwj;♂️",man_cook:"👨&zwj;🍳",man_dancing:"🕺",man_facepalming:"🤦&zwj;♂️",man_factory_worker:"👨&zwj;🏭",man_farmer:"👨&zwj;🌾",man_firefighter:"👨&zwj;🚒",man_health_worker:"👨&zwj;⚕️",man_in_tuxedo:"🤵",man_judge:"👨&zwj;⚖️",man_juggling:"🤹&zwj;♂️",man_mechanic:"👨&zwj;🔧",man_office_worker:"👨&zwj;💼",man_pilot:"👨&zwj;✈️",man_playing_handball:"🤾&zwj;♂️",
490
+ man_playing_water_polo:"🤽&zwj;♂️",man_scientist:"👨&zwj;🔬",man_shrugging:"🤷&zwj;♂️",man_singer:"👨&zwj;🎤",man_student:"👨&zwj;🎓",man_teacher:"👨&zwj;🏫",man_technologist:"👨&zwj;💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆&zwj;♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼&zwj;♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵&zwj;♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",
491
+ mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅&zwj;♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆&zwj;♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",
492
+ open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮&zwj;♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",
493
+ potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎&zwj;♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️&zwj;🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋&zwj;♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",
494
+ roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣&zwj;♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃&zwj;♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",
495
+ small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",
496
+ sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄&zwj;♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊&zwj;♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁&zwj;♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",
497
+ turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶&zwj;♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️&zwj;♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",
498
+ white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩&zwj;🎨",woman_astronaut:"👩&zwj;🚀",woman_cartwheeling:"🤸&zwj;♀️",woman_cook:"👩&zwj;🍳",woman_facepalming:"🤦&zwj;♀️",woman_factory_worker:"👩&zwj;🏭",woman_farmer:"👩&zwj;🌾",woman_firefighter:"👩&zwj;🚒",woman_health_worker:"👩&zwj;⚕️",woman_judge:"👩&zwj;⚖️",woman_juggling:"🤹&zwj;♀️",woman_mechanic:"👩&zwj;🔧",woman_office_worker:"👩&zwj;💼",woman_pilot:"👩&zwj;✈️",woman_playing_handball:"🤾&zwj;♀️",woman_playing_water_polo:"🤽&zwj;♀️",woman_scientist:"👩&zwj;🔬",woman_shrugging:"🤷&zwj;♀️",woman_singer:"👩&zwj;🎤",woman_student:"👩&zwj;🎓",woman_teacher:"👩&zwj;🏫",woman_technologist:"👩&zwj;💻",woman_with_turban:"👳&zwj;♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼&zwj;♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",
499
+ yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:'<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',showdown:"<span style=\"font-family: 'Anonymous Pro', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;\">S</span>"},n.Converter=function(e){var t={},r=[],c=[],u={},d=a,h={parsed:{},raw:"",format:""};function m(e,t){if(t=t||null,n.helper.isString(e)){if(t=e=n.helper.stdExtName(e),n.extensions[e])return console.warn("DEPRECATION WARNING: "+e+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),void function(e,t){"function"==typeof e&&(e=e(new n.Converter)),n.helper.isArray(e)||(e=[e]);var o=l(e,t);if(!o.valid)throw Error(o.error);for(var i=0;i<e.length;++i)switch(e[i].type){case"lang":r.push(e[i]);break;case"output":c.push(e[i]);break;default:
500
+ throw Error("Extension loader error: Type unrecognized!!!")}}(n.extensions[e],e);if(n.helper.isUndefined(o[e]))throw Error('Extension "'+e+'" could not be loaded. It was either not found or is not a valid extension.');e=o[e]}"function"==typeof e&&(e=e()),n.helper.isArray(e)||(e=[e]);var i=l(e,t);if(!i.valid)throw Error(i.error);for(var a=0;a<e.length;++a){switch(e[a].type){case"lang":r.push(e[a]);break;case"output":c.push(e[a])}if(e[a].hasOwnProperty("listeners"))for(var s in e[a].listeners)e[a].listeners.hasOwnProperty(s)&&p(s,e[a].listeners[s])}}function p(e,t){if(!n.helper.isString(e))throw Error("Invalid argument in converter.listen() method: name must be a string, but "+typeof e+" given");if("function"!=typeof t)throw Error("Invalid argument in converter.listen() method: callback must be a function, but "+typeof t+" given");u.hasOwnProperty(e)||(u[e]=[]),u[e].push(t)}!function(){for(var r in e=e||{},i)i.hasOwnProperty(r)&&(t[r]=i[r])
501
+ ;if("object"!=typeof e)throw Error("Converter expects the passed parameter to be an object, but "+typeof e+" was passed instead.");for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);t.extensions&&n.helper.forEach(t.extensions,m)}(),this._dispatch=function(e,t,n,r){if(u.hasOwnProperty(e))for(var o=0;o<u[e].length;++o){var i=u[e][o](e,t,this,n,r);i&&void 0!==i&&(t=i)}return t},this.listen=function(e,t){return p(e,t),this},this.makeHtml=function(e){if(!e)return e;var o={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions:r,outputModifiers:c,converter:this,ghCodeBlocks:[],metadata:{parsed:{},raw:"",format:""}};return e=(e=(e=(e=(e=e.replace(/¨/g,"¨T")).replace(/\$/g,"¨D")).replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/\u00A0/g,"&nbsp;"),t.smartIndentationFix&&(e=function(e){var t=e.match(/^\s*/)[0].length,n=new RegExp("^\\s{0,"+t+"}","gm");return e.replace(n,"")}(e)),e="\n\n"+e+"\n\n",
502
+ e=(e=n.subParser("detab")(e,t,o)).replace(/^[ \t]+$/gm,""),n.helper.forEach(r,(function(r){e=n.subParser("runExtension")(r,e,t,o)})),e=n.subParser("metadata")(e,t,o),e=n.subParser("hashPreCodeTags")(e,t,o),e=n.subParser("githubCodeBlocks")(e,t,o),e=n.subParser("hashHTMLBlocks")(e,t,o),e=n.subParser("hashCodeTags")(e,t,o),e=n.subParser("stripLinkDefinitions")(e,t,o),e=n.subParser("blockGamut")(e,t,o),e=n.subParser("unhashHTMLSpans")(e,t,o),e=(e=(e=n.subParser("unescapeSpecialChars")(e,t,o)).replace(/¨D/g,"$$")).replace(/¨T/g,"¨"),e=n.subParser("completeHTMLDocument")(e,t,o),n.helper.forEach(c,(function(r){e=n.subParser("runExtension")(r,e,t,o)})),h=o.metadata,e},this.makeMarkdown=this.makeMd=function(e,t){if(e=(e=(e=e.replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/>[ \t]+</,">¨NBSP;<"),!t){if(!window||!window.document)throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");t=window.document}var r=t.createElement("div")
503
+ ;r.innerHTML=e;var o={preList:function(e){for(var t=e.querySelectorAll("pre"),r=[],o=0;o<t.length;++o)if(1===t[o].childElementCount&&"code"===t[o].firstChild.tagName.toLowerCase()){var i=t[o].firstChild.innerHTML.trim(),a=t[o].firstChild.getAttribute("data-language")||"";if(""===a)for(var s=t[o].firstChild.className.split(" "),l=0;l<s.length;++l){var c=s[l].match(/^language-(.+)$/);if(null!==c){a=c[1];break}}i=n.helper.unescapeHTMLEntities(i),r.push(i),t[o].outerHTML='<precode language="'+a+'" precodenum="'+o.toString()+'"></precode>'}else r.push(t[o].innerHTML),t[o].innerHTML="",t[o].setAttribute("prenum",o.toString());return r}(r)};!function e(t){for(var n=0;n<t.childNodes.length;++n){var r=t.childNodes[n];3===r.nodeType?/\S/.test(r.nodeValue)||/^[ ]+$/.test(r.nodeValue)?(r.nodeValue=r.nodeValue.split("\n").join(" "),r.nodeValue=r.nodeValue.replace(/(\s)+/g,"$1")):(t.removeChild(r),--n):1===r.nodeType&&e(r)}}(r);for(var i=r.childNodes,a="",s=0;s<i.length;s++)a+=n.subParser("makeMarkdown.node")(i[s],o)
504
+ ;return a},this.setOption=function(e,n){t[e]=n},this.getOption=function(e){return t[e]},this.getOptions=function(){return t},this.addExtension=function(e,t){m(e,t=t||null)},this.useExtension=function(e){m(e)},this.setFlavor=function(e){if(!s.hasOwnProperty(e))throw Error(e+" flavor was not found");var n=s[e];for(var r in d=e,n)n.hasOwnProperty(r)&&(t[r]=n[r])},this.getFlavor=function(){return d},this.removeExtension=function(e){n.helper.isArray(e)||(e=[e]);for(var t=0;t<e.length;++t){for(var o=e[t],i=0;i<r.length;++i)r[i]===o&&r.splice(i,1);for(var a=0;a<c.length;++a)c[a]===o&&c.splice(a,1)}},this.getAllExtensions=function(){return{language:r,output:c}},this.getMetadata=function(e){return e?h.raw:h.parsed},this.getMetadataFormat=function(){return h.format},this._setMetadataPair=function(e,t){h.parsed[e]=t},this._setMetadataFormat=function(e){h.format=e},this._setMetadataRaw=function(e){h.raw=e}},n.subParser("anchors",(function(e,t,r){var o=function(e,o,i,a,s,l,c){if(n.helper.isUndefined(c)&&(c=""),
505
+ i=i.toLowerCase(),e.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)a="";else if(!a){if(i||(i=o.toLowerCase().replace(/ ?\n/g," ")),a="#"+i,n.helper.isUndefined(r.gUrls[i]))return e;a=r.gUrls[i],n.helper.isUndefined(r.gTitles[i])||(c=r.gTitles[i])}var u='<a href="'+(a=a.replace(n.helper.regexes.asteriskDashAndColon,n.helper.escapeCharactersCallback))+'"';return""!==c&&null!==c&&(u+=' title="'+(c=(c=c.replace(/"/g,"&quot;")).replace(n.helper.regexes.asteriskDashAndColon,n.helper.escapeCharactersCallback))+'"'),t.openLinksInNewWindow&&!/^#/.test(a)&&(u+=' rel="noopener noreferrer" target="¨E95Eblank"'),u+=">"+o+"</a>"}
506
+ ;return e=(e=(e=(e=(e=r.converter._dispatch("anchors.before",e,t,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,o)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,o)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,o)).replace(/\[([^\[\]]+)]()()()()()/g,o),t.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,(function(e,r,o,i,a){if("\\"===o)return r+i;if(!n.helper.isString(t.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var s=t.ghMentionsLink.replace(/\{u}/g,a),l="";return t.openLinksInNewWindow&&(l=' rel="noopener noreferrer" target="¨E95Eblank"'),r+'<a href="'+s+'"'+l+">"+i+"</a>"}))),e=r.converter._dispatch("anchors.after",e,t,r)}))
507
+ ;var d=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,h=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,m=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,p=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,f=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,g=function(e){return function(t,r,o,i,a,s,l){var c=o=o.replace(n.helper.regexes.asteriskDashAndColon,n.helper.escapeCharactersCallback),u="",d="",h=r||"",m=l||"";return/^www\./i.test(o)&&(o=o.replace(/^www\./i,"http://www.")),e.excludeTrailingPunctuationFromURLs&&s&&(u=s),e.openLinksInNewWindow&&(d=' rel="noopener noreferrer" target="¨E95Eblank"'),h+'<a href="'+o+'"'+d+">"+c+"</a>"+u+m}},v=function(e,t){return function(r,o,i){var a="mailto:";return o=o||"",i=n.subParser("unescapeSpecialChars")(i,e,t),e.encodeEmails?(a=n.helper.encodeEmailAddress(a+i),
508
+ i=n.helper.encodeEmailAddress(i)):a+=i,o+'<a href="'+a+'">'+i+"</a>"}};n.subParser("autoLinks",(function(e,t,n){return e=(e=(e=n.converter._dispatch("autoLinks.before",e,t,n)).replace(m,g(t))).replace(f,v(t,n)),e=n.converter._dispatch("autoLinks.after",e,t,n)})),n.subParser("simplifiedAutoLinks",(function(e,t,n){return t.simplifiedAutoLink?(e=n.converter._dispatch("simplifiedAutoLinks.before",e,t,n),e=(e=t.excludeTrailingPunctuationFromURLs?e.replace(h,g(t)):e.replace(d,g(t))).replace(p,v(t,n)),e=n.converter._dispatch("simplifiedAutoLinks.after",e,t,n)):e})),n.subParser("blockGamut",(function(e,t,r){return e=r.converter._dispatch("blockGamut.before",e,t,r),e=n.subParser("blockQuotes")(e,t,r),e=n.subParser("headers")(e,t,r),e=n.subParser("horizontalRule")(e,t,r),e=n.subParser("lists")(e,t,r),e=n.subParser("codeBlocks")(e,t,r),e=n.subParser("tables")(e,t,r),e=n.subParser("hashHTMLBlocks")(e,t,r),e=n.subParser("paragraphs")(e,t,r),e=r.converter._dispatch("blockGamut.after",e,t,r)})),
509
+ n.subParser("blockQuotes",(function(e,t,r){e=r.converter._dispatch("blockQuotes.before",e,t,r),e+="\n\n";var o=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(o=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=e.replace(o,(function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/¨0/g,"")).replace(/^[ \t]+$/gm,""),e=n.subParser("githubCodeBlocks")(e,t,r),e=(e=(e=n.subParser("blockGamut")(e,t,r)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,(function(e,t){var n=t;return n=(n=n.replace(/^ /gm,"¨0")).replace(/¨0/g,"")})),n.subParser("hashBlock")("<blockquote>\n"+e+"\n</blockquote>",t,r)})),e=r.converter._dispatch("blockQuotes.after",e,t,r)})),n.subParser("codeBlocks",(function(e,t,r){return e=r.converter._dispatch("codeBlocks.before",e,t,r),e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,(function(e,o,i){var a=o,s=i,l="\n";return a=n.subParser("outdent")(a,t,r),a=n.subParser("encodeCode")(a,t,r),
510
+ a=(a=(a=n.subParser("detab")(a,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(l=""),a="<pre><code>"+a+l+"</code></pre>",n.subParser("hashBlock")(a,t,r)+s}))).replace(/¨0/,""),e=r.converter._dispatch("codeBlocks.after",e,t,r)})),n.subParser("codeSpans",(function(e,t,r){return void 0===(e=r.converter._dispatch("codeSpans.before",e,t,r))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,(function(e,o,i,a){var s=a;return s=(s=s.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),s=o+"<code>"+(s=n.subParser("encodeCode")(s,t,r))+"</code>",s=n.subParser("hashHTMLSpans")(s,t,r)})),e=r.converter._dispatch("codeSpans.after",e,t,r)})),n.subParser("completeHTMLDocument",(function(e,t,n){if(!t.completeHTMLDocument)return e;e=n.converter._dispatch("completeHTMLDocument.before",e,t,n);var r="html",o="<!DOCTYPE HTML>\n",i="",a='<meta charset="utf-8">\n',s="",l="";for(var c in void 0!==n.metadata.parsed.doctype&&(o="<!DOCTYPE "+n.metadata.parsed.doctype+">\n",
511
+ "html"!==(r=n.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==r||(a='<meta charset="utf-8">')),n.metadata.parsed)if(n.metadata.parsed.hasOwnProperty(c))switch(c.toLowerCase()){case"doctype":break;case"title":i="<title>"+n.metadata.parsed.title+"</title>\n";break;case"charset":a="html"===r||"html5"===r?'<meta charset="'+n.metadata.parsed.charset+'">\n':'<meta name="charset" content="'+n.metadata.parsed.charset+'">\n';break;case"language":case"lang":s=' lang="'+n.metadata.parsed[c]+'"',l+='<meta name="'+c+'" content="'+n.metadata.parsed[c]+'">\n';break;default:l+='<meta name="'+c+'" content="'+n.metadata.parsed[c]+'">\n'}return e=o+"<html"+s+">\n<head>\n"+i+a+l+"</head>\n<body>\n"+e.trim()+"\n</body>\n</html>",e=n.converter._dispatch("completeHTMLDocument.after",e,t,n)})),n.subParser("detab",(function(e,t,n){return e=(e=(e=(e=n.converter._dispatch("detab.before",e,t,n)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"¨A¨B")).replace(/¨B(.+?)¨A/g,(function(e,t){
512
+ for(var n=t,r=4-n.length%4,o=0;o<r;o++)n+=" ";return n})),e=(e=e.replace(/¨A/g," ")).replace(/¨B/g,""),e=n.converter._dispatch("detab.after",e,t,n)})),n.subParser("ellipsis",(function(e,t,n){return t.ellipsis?(e=(e=n.converter._dispatch("ellipsis.before",e,t,n)).replace(/\.\.\./g,"…"),e=n.converter._dispatch("ellipsis.after",e,t,n)):e})),n.subParser("emoji",(function(e,t,r){return t.emoji?(e=(e=r.converter._dispatch("emoji.before",e,t,r)).replace(/:([\S]+?):/g,(function(e,t){return n.helper.emojis.hasOwnProperty(t)?n.helper.emojis[t]:e})),e=r.converter._dispatch("emoji.after",e,t,r)):e})),n.subParser("encodeAmpsAndAngles",(function(e,t,n){return e=(e=(e=(e=(e=n.converter._dispatch("encodeAmpsAndAngles.before",e,t,n)).replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;")).replace(/<(?![a-z\/?$!])/gi,"&lt;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;"),e=n.converter._dispatch("encodeAmpsAndAngles.after",e,t,n)})),n.subParser("encodeBackslashEscapes",(function(e,t,r){
513
+ return e=(e=(e=r.converter._dispatch("encodeBackslashEscapes.before",e,t,r)).replace(/\\(\\)/g,n.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|:-])/g,n.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeBackslashEscapes.after",e,t,r)})),n.subParser("encodeCode",(function(e,t,r){return e=(e=r.converter._dispatch("encodeCode.before",e,t,r)).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/([*_{}\[\]\\=~-])/g,n.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeCode.after",e,t,r)})),n.subParser("escapeSpecialCharsWithinTagAttributes",(function(e,t,r){return e=(e=(e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,t,r)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,(function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,n.helper.escapeCharactersCallback)}))).replace(/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,(function(e){return e.replace(/([\\`*_~=|])/g,n.helper.escapeCharactersCallback)})),
514
+ e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,t,r)})),n.subParser("githubCodeBlocks",(function(e,t,r){return t.ghCodeBlocks?(e=r.converter._dispatch("githubCodeBlocks.before",e,t,r),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,(function(e,o,i,a){var s=t.omitExtraWLInCodeBlocks?"":"\n";return a=n.subParser("encodeCode")(a,t,r),a="<pre><code"+(i?' class="'+i+" language-"+i+'"':"")+">"+(a=(a=(a=n.subParser("detab")(a,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+s+"</code></pre>",a=n.subParser("hashBlock")(a,t,r),"\n\n¨G"+(r.ghCodeBlocks.push({text:e,codeblock:a})-1)+"G\n\n"}))).replace(/¨0/,""),r.converter._dispatch("githubCodeBlocks.after",e,t,r)):e})),n.subParser("hashBlock",(function(e,t,n){return e=(e=n.converter._dispatch("hashBlock.before",e,t,n)).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(n.gHtmlBlocks.push(e)-1)+"K\n\n",e=n.converter._dispatch("hashBlock.after",e,t,n)})),n.subParser("hashCodeTags",(function(e,t,r){
515
+ return e=r.converter._dispatch("hashCodeTags.before",e,t,r),e=n.helper.replaceRecursiveRegExp(e,(function(e,o,i,a){var s=i+n.subParser("encodeCode")(o,t,r)+a;return"¨C"+(r.gHtmlSpans.push(s)-1)+"C"}),"<code\\b[^>]*>","</code>","gim"),e=r.converter._dispatch("hashCodeTags.after",e,t,r)})),n.subParser("hashElement",(function(e,t,n){return function(e,t){var r=t;return r=(r=(r=r.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),r="\n\n¨K"+(n.gHtmlBlocks.push(r)-1)+"K\n\n"}})),n.subParser("hashHTMLBlocks",(function(e,t,r){e=r.converter._dispatch("hashHTMLBlocks.before",e,t,r);var o=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],i=function(e,t,n,o){var i=e;return-1!==n.search(/\bmarkdown\b/)&&(i=n+r.converter.makeHtml(t)+o),"\n\n¨K"+(r.gHtmlBlocks.push(i)-1)+"K\n\n"}
516
+ ;t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,(function(e,t){return"&lt;"+t+"&gt;"})));for(var a=0;a<o.length;++a)for(var s,l=new RegExp("^ {0,3}(<"+o[a]+"\\b[^>]*>)","im"),c="<"+o[a]+"\\b[^>]*>",u="</"+o[a]+">";-1!==(s=n.helper.regexIndexOf(e,l));){var d=n.helper.splitAtIndex(e,s),h=n.helper.replaceRecursiveRegExp(d[1],i,c,u,"im");if(h===d[1])break;e=d[0].concat(h)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(e,t,r)),e=(e=n.helper.replaceRecursiveRegExp(e,(function(e){return"\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n"}),"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,n.subParser("hashElement")(e,t,r)),e=r.converter._dispatch("hashHTMLBlocks.after",e,t,r)})),n.subParser("hashHTMLSpans",(function(e,t,n){function r(e){return"¨C"+(n.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=n.converter._dispatch("hashHTMLSpans.before",e,t,n)).replace(/<[^>]+?\/>/gi,(function(e){return r(e)
517
+ }))).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,(function(e){return r(e)}))).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,(function(e){return r(e)}))).replace(/<[^>]+?>/gi,(function(e){return r(e)})),e=n.converter._dispatch("hashHTMLSpans.after",e,t,n)})),n.subParser("unhashHTMLSpans",(function(e,t,n){e=n.converter._dispatch("unhashHTMLSpans.before",e,t,n);for(var r=0;r<n.gHtmlSpans.length;++r){for(var o=n.gHtmlSpans[r],i=0;/¨C(\d+)C/.test(o);){var a=RegExp.$1;if(o=o.replace("¨C"+a+"C",n.gHtmlSpans[a]),10===i){console.error("maximum nesting of 10 spans reached!!!");break}++i}e=e.replace("¨C"+r+"C",o)}return e=n.converter._dispatch("unhashHTMLSpans.after",e,t,n)})),n.subParser("hashPreCodeTags",(function(e,t,r){return e=r.converter._dispatch("hashPreCodeTags.before",e,t,r),e=n.helper.replaceRecursiveRegExp(e,(function(e,o,i,a){var s=i+n.subParser("encodeCode")(o,t,r)+a;return"\n\n¨G"+(r.ghCodeBlocks.push({text:e,codeblock:s})-1)+"G\n\n"}),"^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^ {0,3}</code>\\s*</pre>","gim"),
518
+ e=r.converter._dispatch("hashPreCodeTags.after",e,t,r)})),n.subParser("headers",(function(e,t,r){e=r.converter._dispatch("headers.before",e,t,r);var o=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),i=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,a=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(i,(function(e,i){var a=n.subParser("spanGamut")(i,t,r),s=t.noHeaderId?"":' id="'+l(i)+'"',c="<h"+o+s+">"+a+"</h"+o+">";return n.subParser("hashBlock")(c,t,r)}))).replace(a,(function(e,i){var a=n.subParser("spanGamut")(i,t,r),s=t.noHeaderId?"":' id="'+l(i)+'"',c=o+1,u="<h"+c+s+">"+a+"</h"+c+">";return n.subParser("hashBlock")(u,t,r)}));var s=t.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;function l(e){var o,i;if(t.customizedHeaderId){var a=e.match(/\{([^{]+?)}\s*$/);a&&a[1]&&(e=a[1])}return o=e,
519
+ i=n.helper.isString(t.prefixHeaderId)?t.prefixHeaderId:!0===t.prefixHeaderId?"section-":"",t.rawPrefixHeaderId||(o=i+o),o=t.ghCompatibleHeaderId?o.replace(/ /g,"-").replace(/&amp;/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():t.rawHeaderId?o.replace(/ /g,"-").replace(/&amp;/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():o.replace(/[^\w]/g,"").toLowerCase(),t.rawPrefixHeaderId&&(o=i+o),r.hashLinkCounts[o]?o=o+"-"+r.hashLinkCounts[o]++:r.hashLinkCounts[o]=1,o}return e=e.replace(s,(function(e,i,a){var s=a;t.customizedHeaderId&&(s=a.replace(/\s?\{([^{]+?)}\s*$/,""));var c=n.subParser("spanGamut")(s,t,r),u=t.noHeaderId?"":' id="'+l(a)+'"',d=o-1+i.length,h="<h"+d+u+">"+c+"</h"+d+">";return n.subParser("hashBlock")(h,t,r)})),e=r.converter._dispatch("headers.after",e,t,r)})),n.subParser("horizontalRule",(function(e,t,r){e=r.converter._dispatch("horizontalRule.before",e,t,r);var o=n.subParser("hashBlock")("<hr />",t,r)
520
+ ;return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,o)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,o)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,o),e=r.converter._dispatch("horizontalRule.after",e,t,r)})),n.subParser("images",(function(e,t,r){function o(e,t,o,i,a,s,l,c){var u=r.gUrls,d=r.gTitles,h=r.gDimensions;if(o=o.toLowerCase(),c||(c=""),e.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)i="";else if(""===i||null===i){if(""!==o&&null!==o||(o=t.toLowerCase().replace(/ ?\n/g," ")),i="#"+o,n.helper.isUndefined(u[o]))return e;i=u[o],n.helper.isUndefined(d[o])||(c=d[o]),n.helper.isUndefined(h[o])||(a=h[o].width,s=h[o].height)}t=t.replace(/"/g,"&quot;").replace(n.helper.regexes.asteriskDashAndColon,n.helper.escapeCharactersCallback);var m='<img src="'+(i=i.replace(n.helper.regexes.asteriskDashAndColon,n.helper.escapeCharactersCallback))+'" alt="'+t+'"';return c&&n.helper.isString(c)&&(m+=' title="'+(c=c.replace(/"/g,"&quot;").replace(n.helper.regexes.asteriskDashAndColon,n.helper.escapeCharactersCallback))+'"'),
521
+ a&&s&&(m+=' width="'+(a="*"===a?"auto":a)+'"',m+=' height="'+(s="*"===s?"auto":s)+'"'),m+=" />"}return e=(e=(e=(e=(e=(e=r.converter._dispatch("images.before",e,t,r)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,o)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,(function(e,t,n,r,i,a,s,l){return o(e,t,n,r=r.replace(/\s/g,""),i,a,0,l)}))).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,o)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,o)).replace(/!\[([^\[\]]+)]()()()()()/g,o),e=r.converter._dispatch("images.after",e,t,r)})),n.subParser("italicsAndBold",(function(e,t,n){function r(e,t,n){return t+e+n}return e=n.converter._dispatch("italicsAndBold.before",e,t,n),
522
+ t.literalMidWordUnderscores?e=(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return r(t,"<strong><em>","</em></strong>")}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return r(t,"<strong>","</strong>")}))).replace(/\b_(\S[\s\S]*?)_\b/g,(function(e,t){return r(t,"<em>","</em>")})):(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?r(t,"<strong><em>","</em></strong>"):e})),e=e.replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?r(t,"<strong>","</strong>"):e})),e=e.replace(/_([^\s_][\s\S]*?)_/g,(function(e,t){return/\S$/.test(t)?r(t,"<em>","</em>"):e}))),t.literalMidWordAsterisks?e=(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"<strong><em>","</em></strong>")}))).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"<strong>","</strong>")}))).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"<em>","</em>")})):(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,(function(e,t){
523
+ return/\S$/.test(t)?r(t,"<strong><em>","</em></strong>"):e})),e=e.replace(/\*\*(\S[\s\S]*?)\*\*/g,(function(e,t){return/\S$/.test(t)?r(t,"<strong>","</strong>"):e})),e=e.replace(/\*([^\s*][\s\S]*?)\*/g,(function(e,t){return/\S$/.test(t)?r(t,"<em>","</em>"):e}))),e=n.converter._dispatch("italicsAndBold.after",e,t,n)})),n.subParser("lists",(function(e,t,r){function o(e,o){r.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var i=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,a=/\n[ \t]*\n(?!¨0)/.test(e+="¨0");return t.disableForced4SpacesIndentedSublists&&(i=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(i,(function(e,o,i,s,l,c,u){u=u&&""!==u.trim();var d=n.subParser("outdent")(l,t,r),h="";return c&&t.tasklists&&(h=' class="task-list-item" style="list-style-type: none;"',d=d.replace(/^[ \t]*\[(x|X| )?]/m,(function(){
524
+ var e='<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';return u&&(e+=" checked"),e+=">"}))),d=d.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,(function(e){return"¨A"+e})),o||d.search(/\n{2,}/)>-1?(d=n.subParser("githubCodeBlocks")(d,t,r),d=n.subParser("blockGamut")(d,t,r)):(d=(d=n.subParser("lists")(d,t,r)).replace(/\n$/,""),d=(d=n.subParser("hashHTMLBlocks")(d,t,r)).replace(/\n\n+/g,"\n\n"),d=a?n.subParser("paragraphs")(d,t,r):n.subParser("spanGamut")(d,t,r)),d="<li"+h+">"+(d=d.replace("¨A",""))+"</li>\n"}))).replace(/¨0/g,""),r.gListLevel--,o&&(e=e.replace(/\s+$/,"")),e}function i(e,t){if("ol"===t){var n=e.match(/^ *(\d+)\./);if(n&&"1"!==n[1])return' start="'+n[1]+'"'}return""}function a(e,n,r){var a=t.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,s=t.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,l="ul"===n?a:s,c="";if(-1!==e.search(l))!function t(u){var d=u.search(l),h=i(e,n)
525
+ ;-1!==d?(c+="\n\n<"+n+h+">\n"+o(u.slice(0,d),!!r)+"</"+n+">\n",l="ul"==(n="ul"===n?"ol":"ul")?a:s,t(u.slice(d))):c+="\n\n<"+n+h+">\n"+o(u,!!r)+"</"+n+">\n"}(e);else{var u=i(e,n);c="\n\n<"+n+u+">\n"+o(e,!!r)+"</"+n+">\n"}return c}return e=r.converter._dispatch("lists.before",e,t,r),e+="¨0",e=(e=r.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(e,t,n){return a(t,n.search(/[*+-]/g)>-1?"ul":"ol",!0)})):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(e,t,n,r){return a(n,r.search(/[*+-]/g)>-1?"ul":"ol",!1)}))).replace(/¨0/,""),e=r.converter._dispatch("lists.after",e,t,r)})),n.subParser("metadata",(function(e,t,n){if(!t.metadata)return e;function r(e){n.metadata.raw=e,(e=(e=e.replace(/&/g,"&amp;").replace(/"/g,"&quot;")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,(function(e,t,r){return n.metadata.parsed[t]=r,""}))}
526
+ return e=(e=(e=n.converter._dispatch("metadata.before",e,t,n)).replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,(function(e,t,n){return r(n),"¨M"}))).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,(function(e,t,o){return t&&(n.metadata.format=t),r(o),"¨M"})),e=e.replace(/¨M/g,""),e=n.converter._dispatch("metadata.after",e,t,n)})),n.subParser("outdent",(function(e,t,n){return e=(e=(e=n.converter._dispatch("outdent.before",e,t,n)).replace(/^(\t|[ ]{1,4})/gm,"¨0")).replace(/¨0/g,""),e=n.converter._dispatch("outdent.after",e,t,n)})),n.subParser("paragraphs",(function(e,t,r){for(var o=(e=(e=(e=r.converter._dispatch("paragraphs.before",e,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),i=[],a=o.length,s=0;s<a;s++){var l=o[s];l.search(/¨(K|G)(\d+)\1/g)>=0?i.push(l):l.search(/\S/)>=0&&(l=(l=n.subParser("spanGamut")(l,t,r)).replace(/^([ \t]*)/g,"<p>"),l+="</p>",i.push(l))}for(a=i.length,s=0;s<a;s++){for(var c="",u=i[s],d=!1;/¨(K|G)(\d+)\1/.test(u);){var h=RegExp.$1,m=RegExp.$2
527
+ ;c=(c="K"===h?r.gHtmlBlocks[m]:d?n.subParser("encodeCode")(r.ghCodeBlocks[m].text,t,r):r.ghCodeBlocks[m].codeblock).replace(/\$/g,"$$$$"),u=u.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/,c),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(u)&&(d=!0)}i[s]=u}return e=(e=(e=i.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),r.converter._dispatch("paragraphs.after",e,t,r)})),n.subParser("runExtension",(function(e,t,n,r){if(e.filter)t=e.filter(t,r.converter,n);else if(e.regex){var o=e.regex;o instanceof RegExp||(o=new RegExp(o,"g")),t=t.replace(o,e.replace)}return t})),n.subParser("spanGamut",(function(e,t,r){return e=r.converter._dispatch("spanGamut.before",e,t,r),e=n.subParser("codeSpans")(e,t,r),e=n.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,r),e=n.subParser("encodeBackslashEscapes")(e,t,r),e=n.subParser("images")(e,t,r),e=n.subParser("anchors")(e,t,r),e=n.subParser("autoLinks")(e,t,r),e=n.subParser("simplifiedAutoLinks")(e,t,r),e=n.subParser("emoji")(e,t,r),e=n.subParser("underline")(e,t,r),
528
+ e=n.subParser("italicsAndBold")(e,t,r),e=n.subParser("strikethrough")(e,t,r),e=n.subParser("ellipsis")(e,t,r),e=n.subParser("hashHTMLSpans")(e,t,r),e=n.subParser("encodeAmpsAndAngles")(e,t,r),t.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g,"<br />\n")):e=e.replace(/ +\n/g,"<br />\n"),e=r.converter._dispatch("spanGamut.after",e,t,r)})),n.subParser("strikethrough",(function(e,t,r){return t.strikethrough&&(e=(e=r.converter._dispatch("strikethrough.before",e,t,r)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,(function(e,o){return function(e){return t.simplifiedAutoLink&&(e=n.subParser("simplifiedAutoLinks")(e,t,r)),"<del>"+e+"</del>"}(o)})),e=r.converter._dispatch("strikethrough.after",e,t,r)),e})),n.subParser("stripLinkDefinitions",(function(e,t,r){var o=function(o,i,a,s,l,c,u){return i=i.toLowerCase(),e.toLowerCase().split(i).length-1<2?o:(a.match(/^data:.+?\/.+?;base64,/)?r.gUrls[i]=a.replace(/\s/g,""):r.gUrls[i]=n.subParser("encodeAmpsAndAngles")(a,t,r),c?c+u:(u&&(r.gTitles[i]=u.replace(/"|'/g,"&quot;")),
529
+ t.parseImgDimensions&&s&&l&&(r.gDimensions[i]={width:s,height:l}),""))};return e=(e=(e=(e+="¨0").replace(/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,o)).replace(/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,o)).replace(/¨0/,"")})),n.subParser("tables",(function(e,t,r){if(!t.tables)return e;function o(e,o){return"<td"+o+">"+n.subParser("spanGamut")(e,t,r)+"</td>\n"}function i(e){var i,a=e.split("\n");for(i=0;i<a.length;++i)/^ {0,3}\|/.test(a[i])&&(a[i]=a[i].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(a[i])&&(a[i]=a[i].replace(/\|[ \t]*$/,"")),a[i]=n.subParser("codeSpans")(a[i],t,r);var s,l,c,u,d=a[0].split("|").map((function(e){return e.trim()})),h=a[1].split("|").map((function(e){return e.trim()})),m=[],p=[],f=[],g=[];for(a.shift(),
530
+ a.shift(),i=0;i<a.length;++i)""!==a[i].trim()&&m.push(a[i].split("|").map((function(e){return e.trim()})));if(d.length<h.length)return e;for(i=0;i<h.length;++i)f.push((s=h[i],/^:[ \t]*--*$/.test(s)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(s)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(s)?' style="text-align:center;"':""));for(i=0;i<d.length;++i)n.helper.isUndefined(f[i])&&(f[i]=""),p.push((l=d[i],c=f[i],u=void 0,u="",l=l.trim(),(t.tablesHeaderId||t.tableHeaderId)&&(u=' id="'+l.replace(/ /g,"_").toLowerCase()+'"'),"<th"+u+c+">"+(l=n.subParser("spanGamut")(l,t,r))+"</th>\n"));for(i=0;i<m.length;++i){for(var v=[],b=0;b<p.length;++b)n.helper.isUndefined(m[i][b]),v.push(o(m[i][b],f[b]));g.push(v)}return function(e,t){for(var n="<table>\n<thead>\n<tr>\n",r=e.length,o=0;o<r;++o)n+=e[o];for(n+="</tr>\n</thead>\n<tbody>\n",o=0;o<t.length;++o){n+="<tr>\n";for(var i=0;i<r;++i)n+=t[o][i];n+="</tr>\n"}return n+"</tbody>\n</table>\n"}(p,g)}
531
+ return e=(e=(e=(e=r.converter._dispatch("tables.before",e,t,r)).replace(/\\(\|)/g,n.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,i)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,i),e=r.converter._dispatch("tables.after",e,t,r)})),n.subParser("underline",(function(e,t,r){return t.underline?(e=r.converter._dispatch("underline.before",e,t,r),t.literalMidWordUnderscores?e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return"<u>"+t+"</u>"}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return"<u>"+t+"</u>"})):(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?"<u>"+t+"</u>":e})),e=e.replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?"<u>"+t+"</u>":e}))),e=e.replace(/(_)/g,n.helper.escapeCharactersCallback),e=r.converter._dispatch("underline.after",e,t,r)):e})),
532
+ n.subParser("unescapeSpecialChars",(function(e,t,n){return e=(e=n.converter._dispatch("unescapeSpecialChars.before",e,t,n)).replace(/¨E(\d+)E/g,(function(e,t){var n=parseInt(t);return String.fromCharCode(n)})),e=n.converter._dispatch("unescapeSpecialChars.after",e,t,n)})),n.subParser("makeMarkdown.blockquote",(function(e,t){var r="";if(e.hasChildNodes())for(var o=e.childNodes,i=o.length,a=0;a<i;++a){var s=n.subParser("makeMarkdown.node")(o[a],t);""!==s&&(r+=s)}return r="> "+(r=r.trim()).split("\n").join("\n> ")})),n.subParser("makeMarkdown.codeBlock",(function(e,t){var n=e.getAttribute("language"),r=e.getAttribute("precodenum");return"```"+n+"\n"+t.preList[r]+"\n```"})),n.subParser("makeMarkdown.codeSpan",(function(e){return"`"+e.innerHTML+"`"})),n.subParser("makeMarkdown.emphasis",(function(e,t){var r="";if(e.hasChildNodes()){r+="*";for(var o=e.childNodes,i=o.length,a=0;a<i;++a)r+=n.subParser("makeMarkdown.node")(o[a],t);r+="*"}return r})),n.subParser("makeMarkdown.header",(function(e,t,r){
533
+ var o=new Array(r+1).join("#"),i="";if(e.hasChildNodes()){i=o+" ";for(var a=e.childNodes,s=a.length,l=0;l<s;++l)i+=n.subParser("makeMarkdown.node")(a[l],t)}return i})),n.subParser("makeMarkdown.hr",(function(){return"---"})),n.subParser("makeMarkdown.image",(function(e){var t="";return e.hasAttribute("src")&&(t+="!["+e.getAttribute("alt")+"](",t+="<"+e.getAttribute("src")+">",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t})),n.subParser("makeMarkdown.links",(function(e,t){var r="";if(e.hasChildNodes()&&e.hasAttribute("href")){var o=e.childNodes,i=o.length;r="[";for(var a=0;a<i;++a)r+=n.subParser("makeMarkdown.node")(o[a],t);r+="](",r+="<"+e.getAttribute("href")+">",e.hasAttribute("title")&&(r+=' "'+e.getAttribute("title")+'"'),r+=")"}return r})),n.subParser("makeMarkdown.list",(function(e,t,r){var o="";if(!e.hasChildNodes())return""
534
+ ;for(var i=e.childNodes,a=i.length,s=e.getAttribute("start")||1,l=0;l<a;++l)void 0!==i[l].tagName&&"li"===i[l].tagName.toLowerCase()&&(o+=("ol"===r?s.toString()+". ":"- ")+n.subParser("makeMarkdown.listItem")(i[l],t),++s);return(o+="\n\x3c!-- --\x3e\n").trim()})),n.subParser("makeMarkdown.listItem",(function(e,t){for(var r="",o=e.childNodes,i=o.length,a=0;a<i;++a)r+=n.subParser("makeMarkdown.node")(o[a],t);return/\n$/.test(r)?r=r.split("\n").join("\n ").replace(/^ {4}$/gm,"").replace(/\n\n+/g,"\n\n"):r+="\n",r})),n.subParser("makeMarkdown.node",(function(e,t,r){r=r||!1;var o="";if(3===e.nodeType)return n.subParser("makeMarkdown.txt")(e,t);if(8===e.nodeType)return"\x3c!--"+e.data+"--\x3e\n\n";if(1!==e.nodeType)return"";switch(e.tagName.toLowerCase()){case"h1":r||(o=n.subParser("makeMarkdown.header")(e,t,1)+"\n\n");break;case"h2":r||(o=n.subParser("makeMarkdown.header")(e,t,2)+"\n\n");break;case"h3":r||(o=n.subParser("makeMarkdown.header")(e,t,3)+"\n\n");break;case"h4":
535
+ r||(o=n.subParser("makeMarkdown.header")(e,t,4)+"\n\n");break;case"h5":r||(o=n.subParser("makeMarkdown.header")(e,t,5)+"\n\n");break;case"h6":r||(o=n.subParser("makeMarkdown.header")(e,t,6)+"\n\n");break;case"p":r||(o=n.subParser("makeMarkdown.paragraph")(e,t)+"\n\n");break;case"blockquote":r||(o=n.subParser("makeMarkdown.blockquote")(e,t)+"\n\n");break;case"hr":r||(o=n.subParser("makeMarkdown.hr")(e,t)+"\n\n");break;case"ol":r||(o=n.subParser("makeMarkdown.list")(e,t,"ol")+"\n\n");break;case"ul":r||(o=n.subParser("makeMarkdown.list")(e,t,"ul")+"\n\n");break;case"precode":r||(o=n.subParser("makeMarkdown.codeBlock")(e,t)+"\n\n");break;case"pre":r||(o=n.subParser("makeMarkdown.pre")(e,t)+"\n\n");break;case"table":r||(o=n.subParser("makeMarkdown.table")(e,t)+"\n\n");break;case"code":o=n.subParser("makeMarkdown.codeSpan")(e,t);break;case"em":case"i":o=n.subParser("makeMarkdown.emphasis")(e,t);break;case"strong":case"b":o=n.subParser("makeMarkdown.strong")(e,t);break;case"del":
536
+ o=n.subParser("makeMarkdown.strikethrough")(e,t);break;case"a":o=n.subParser("makeMarkdown.links")(e,t);break;case"img":o=n.subParser("makeMarkdown.image")(e,t);break;default:o=e.outerHTML+"\n\n"}return o})),n.subParser("makeMarkdown.paragraph",(function(e,t){var r="";if(e.hasChildNodes())for(var o=e.childNodes,i=o.length,a=0;a<i;++a)r+=n.subParser("makeMarkdown.node")(o[a],t);return r=r.trim()})),n.subParser("makeMarkdown.pre",(function(e,t){var n=e.getAttribute("prenum");return"<pre>"+t.preList[n]+"</pre>"})),n.subParser("makeMarkdown.strikethrough",(function(e,t){var r="";if(e.hasChildNodes()){r+="~~";for(var o=e.childNodes,i=o.length,a=0;a<i;++a)r+=n.subParser("makeMarkdown.node")(o[a],t);r+="~~"}return r})),n.subParser("makeMarkdown.strong",(function(e,t){var r="";if(e.hasChildNodes()){r+="**";for(var o=e.childNodes,i=o.length,a=0;a<i;++a)r+=n.subParser("makeMarkdown.node")(o[a],t);r+="**"}return r})),n.subParser("makeMarkdown.table",(function(e,t){
537
+ var r,o,i="",a=[[],[]],s=e.querySelectorAll("thead>tr>th"),l=e.querySelectorAll("tbody>tr");for(r=0;r<s.length;++r){var c=n.subParser("makeMarkdown.tableCell")(s[r],t),u="---";if(s[r].hasAttribute("style"))switch(s[r].getAttribute("style").toLowerCase().replace(/\s/g,"")){case"text-align:left;":u=":---";break;case"text-align:right;":u="---:";break;case"text-align:center;":u=":---:"}a[0][r]=c.trim(),a[1][r]=u}for(r=0;r<l.length;++r){var d=a.push([])-1,h=l[r].getElementsByTagName("td");for(o=0;o<s.length;++o){var m=" ";void 0!==h[o]&&(m=n.subParser("makeMarkdown.tableCell")(h[o],t)),a[d].push(m)}}var p=3;for(r=0;r<a.length;++r)for(o=0;o<a[r].length;++o){var f=a[r][o].length;f>p&&(p=f)}for(r=0;r<a.length;++r){for(o=0;o<a[r].length;++o)1===r?":"===a[r][o].slice(-1)?a[r][o]=n.helper.padEnd(a[r][o].slice(-1),p-1,"-")+":":a[r][o]=n.helper.padEnd(a[r][o],p,"-"):a[r][o]=n.helper.padEnd(a[r][o],p);i+="| "+a[r].join(" | ")+" |\n"}return i.trim()})),n.subParser("makeMarkdown.tableCell",(function(e,t){var r=""
538
+ ;if(!e.hasChildNodes())return"";for(var o=e.childNodes,i=o.length,a=0;a<i;++a)r+=n.subParser("makeMarkdown.node")(o[a],t,!0);return r.trim()})),n.subParser("makeMarkdown.txt",(function(e){var t=e.nodeValue;return t=(t=t.replace(/ +/g," ")).replace(/¨NBSP;/g," "),t=(t=(t=(t=(t=(t=(t=(t=(t=n.helper.unescapeHTMLEntities(t)).replace(/([*_~|`])/g,"\\$1")).replace(/^(\s*)>/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")})),e.exports?e.exports=n:this.showdown=n}).call(wp)}(_p)),_p.exports),kp=t(xp);const Np=bc(window);function Sp(){return[{type:"output",filter:function(e){return e.replace(/<a href=/g,'<a target="_blank" href=')}}]}let Ap;function Ep(e){return"{math:"+e.toString()+"}"}function Tp(e){const t=function(e){const t=[];let n=0,r=e;for(;;){const e=r.indexOf("$$",n),o=r.indexOf("\\(",n);if(-1===e&&-1===o)break;let i,a
539
+ ;if(-1!==e&&(-1===o||e<o)?(i=e,a=r.indexOf("$$",i+2)):(i=o,a=r.indexOf("\\)",i+2)),-1===a)break;a+=2;const s=t.length+1,l=Ep(s);let c;t.push({id:s,expression:r.slice(i+2,a-2),inline:-1!==o}),c=-1!==o?l:"\n\n"+l+"\n\n",r=r.slice(0,i)+c+r.slice(a),n=i+c.length}return{mathBlocks:t,content:r}}(e),n=Np.sanitize(function(e){return Ap||(Ap=new kp.Converter({extensions:[Sp],simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0})),Ap.makeHtml(e)}(t.content)),r=function(e,t){return t.reduce(((e,t)=>{let n;try{n=t.inline?yp.renderToString(t.expression):yp.renderToString(t.expression,{displayMode:!0})}catch{n=_c(t.expression)}return e.replace(Ep(t.id),n)}),e)}(n,t.mathBlocks);return r}function Cp({children:e,classes:t,...n}){return et("div",{dir:"auto",lang:"",className:Ze("StyledText",t),...n,children:e})}function Mp({content:e,mentionMode:t}){const n="username"===t;return et(x,{children:[et("div",{className:"px-3 py-2",children:et("div","string"==typeof e?{
540
+ "data-testid":"user-not-found",children:["No user with username ",et("span",{className:"font-bold",children:e})," ","exists"]}:{className:"flex flex-col gap-y-4",children:[et("div",{className:"flex flex-col gap-y-1.5",children:[n&&et("div",{"data-testid":"username",className:"text-md font-bold",children:["@",e.username]}),e.display_name&&et("div",{"data-testid":"display-name",className:Ze({"text-color-text-light":n,"text-md font-bold":!n}),children:e.display_name})]}),e.description&&et("div",{"data-testid":"description",className:"line-clamp-2",children:e.description}),e.joined&&et("div",{"data-testid":"joined",className:"text-color-text-light",children:["Joined"," ",et("b",{children:Ve(e.joined,{includeTime:!1})})]})]})}),et("div",{className:"px-3 py-2 border-t",children:et(yo,{variant:"text-light",classes:"flex gap-x-1 items-center",target:"_blank",href:n?"https://web.hypothes.is/help/mentions-for-the-hypothesis-web-app/":"https://web.hypothes.is/help/mentions-for-the-hypothesis-lms-app/",
541
+ "data-testid":"kb-article-link",children:[et(Sn,{className:"w-3 h-3"})," Learn more about @mentions"]})})]})}function Ip(e){const t=Math.floor(e.x),n=Math.floor(e.y),r=Math.ceil(e.right),o=Math.ceil(e.bottom);return new DOMRect(t,n,r-t,o-n)}function zp(e){const{markdown:t,classes:n,style:r,mentions:o=[],mentionsEnabled:i=!1,mentionMode:a,setTimeout_:s=setTimeout,clearTimeout_:l=clearTimeout}=e,c=he((()=>t?Tp(t):""),[t]),u=de(null),d=de(null),h=de(null),m=de(new Map),[p,f]=se(null),g=de(),v=me((e=>{g.current&&l(g.current);const t=()=>{f(e),g.current=null};null===e?t():g.current=s(t,400)}),[l,s]);return ce((()=>()=>{g.current&&l(g.current)}),[l]),ce((()=>{!function(e,{className:t}={}){const n=Array.from(e.getElementsByTagName("a"));for(const e of n){const n=dl(e);n&&(t?n.className=t:n.style.width="350px")}}(u.current,{className:"w-full md:w-[380px]"})}),[t]),ce((()=>{m.current=function(e,t,n){const r=e.querySelectorAll("[data-hyp-mention]"),o=new Map;for(const e of r){
542
+ const r=e,i=r.dataset.userid,a=i?t.find((e=>e.userid===i)):void 0;o.set(...rl(r,a,n))}return o}(u.current,o,a)}),[a,o]),ue((()=>{const e=d.current,t=h.current;if(!e||!t||!p)return()=>{};const n=n=>{const r=function(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),o=Math.max(e.right,t.right),i=Math.max(e.bottom,t.bottom);return DOMRect.fromRect({x:n,y:r,width:o-n,height:i-r})}(Ip(e.getBoundingClientRect()),Ip(t.getBoundingClientRect()));(function(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom})(r,n.clientX,n.clientY)||(v(null),d.current=null)};return document.body.addEventListener("mousemove",n),()=>{document.body.removeEventListener("mousemove",n)}}),[p,v]),et("div",{className:Ze("w-full break-anywhere cursor-text",{relative:i}),children:[et(Cp,{children:et("div",{className:n,"data-testid":"markdown-text",ref:u,dangerouslySetInnerHTML:{__html:c},style:r,onMouseEnterCapture:i?({target:e})=>{const t=e,n=m.current.get(t);n&&(v(n),d.current=t)}:void 0,onMouseLeaveCapture:({target:e})=>{const t=e
543
+ ;d.current!==t||p||(v(null),d.current=null)}})}),i&&et(no,{open:!!p,onClose:()=>v(null),anchorElementRef:d,classes:"!max-w-[75%]",elementRef:h,children:null!==p&&et(Mp,{content:p,mentionMode:a})})]})}function Lp({children:e}){return et("ul",{className:"flex flex-wrap gap-2 leading-none","aria-label":"Annotation tags",children:e})}function Op({href:e,onRemoveTag:t,tag:n}){return et("li",{className:"flex items-center border rounded bg-grey-0",children:[et("div",{className:"grow px-1.5 py-1 touch:p-2",children:e?et(yo,{variant:"text-light",href:e,lang:"",target:"_blank","aria-label":`Tag: ${n}`,title:`View annotations with tag: ${n}`,underline:"none",children:n}):et("span",{className:"text-color-text-light cursor-default","aria-label":`Tag: ${n}`,lang:"",children:n})}),t&&et("button",{className:Ze("px-1.5 py-1 touch:p-2","border-l rounded rounded-l-none","text-grey-6 hover:text-color-text hover:bg-grey-2","transition-colors duration-200","focus-visible-ring ring-inset"),onClick:()=>{t(n)},
544
+ title:`Remove tag: ${n}`,children:et(_t,{className:"font-base w-em h-em",title:`Remove ${n}`})})]})}function Rp({classes:e,setCollapsed:t,collapsed:n}){const r=n?"More":"Less";return et(kr,{classes:Ze("text-grey-7 font-normal",e),expanded:!n,onClick:()=>t(!n),title:`Toggle visibility of full annotation text: Show ${r}`,children:et("div",{className:"flex items-center gap-x-2",children:[et(n?en:Pt,{className:"w-3 h-3"}),et("div",{children:r})]})})}Np.addHook("afterSanitizeAttributes",(e=>{"target"in e&&e.setAttribute("target","_blank")}));var Pp=Ro((function({annotation:e,settings:t}){const[n,r]=se(!0),[o,i]=se(!1),a=ws(),s=a.defaultAuthority(),l=a.getDraft(e),c=a.isFeatureEnabled("at_mentions"),u=l?.tags??e.tags,d=l?.text??e.text,h=d.length>0,m=u.length>0,p=Lo(["annotationFontFamily"],t),f=he((()=>fi(e.user,s)),[e,s]),g=f?"display-name":"username",v=e=>a.getLink("search.tag",{tag:e});return et("div",{className:"space-y-4",children:[h&&et(Xs,{collapse:n,collapsedHeight:400,inlineControls:!1,
545
+ onCollapsibleChanged:i,onToggleCollapsed:r,overflowThreshold:20,children:et(zp,{markdown:d,classes:Ze({"p-redacted-text":Ai(e)}),style:p,mentions:e.mentions,mentionsEnabled:c,mentionMode:g})}),(o||m)&&et("div",{className:"flex flex-row gap-x-2",children:[et("div",{className:"grow",children:m&&et(Lp,{children:u.map((e=>et(Op,{tag:e,href:f?void 0:v(e)},e)))})}),o&&et("div",{children:et(Rp,{classes:Ze("-mt-3"),collapsed:n,setCollapsed:r})})]})]})}),["settings"]);let Dp,Fp=function(e){return e.ANCHOR_LINK="ANCHOR_LINK",e.IMAGE_LINK="IMAGE_LINK",e}({});function Hp(e,t,n,r){let o=e.selectionStart,i=e.selectionEnd;return o>=t+n?(o+=r.length-n,i+=r.length-n):i<=t||(o<=t&&i>=t+n?i+=r.length-n:o<t&&i<t+n?o=t:o<t+n&&i>t+n?i+=r.length-n:t<o&&t+n>i&&(o=t,i=t+n)),{text:e.text.slice(0,t)+r+e.text.slice(t+n),selectionStart:o,selectionEnd:i}}function Bp(e,t=Fp.ANCHOR_LINK){const n=e.text.slice(e.selectionStart,e.selectionEnd);let r,o="";if(t===Fp.IMAGE_LINK&&(o="!"),n.match(/[a-z]+:\/\/.*/)){const t="Description"
546
+ ;return r=Hp(e,e.selectionStart,n.length,o+"["+t+"]("+n+")"),r.selectionStart=e.selectionStart+o.length+1,r.selectionEnd=r.selectionStart+t.length,r}{const t=o+"["+n+"](",i="http://insert-your-link-here.com";return r=Hp(e,e.selectionStart,n.length,t+i+")"),r.selectionStart=e.selectionStart+t.length,r.selectionEnd=r.selectionStart+i.length,r}}function $p(e,t,n,r){void 0===n&&(n=t);const o=e.text.slice(e.selectionStart-t.length,e.selectionStart),i=e.text.slice(e.selectionEnd,e.selectionEnd+t.length);let a=e;return e.selectionStart===e.selectionEnd&&r&&(a=Hp(e,e.selectionStart,0,r),a.selectionStart=a.selectionEnd-r.length),o===t&&i===n?(a=Hp(a,a.selectionStart-t.length,t.length,""),a=Hp(a,a.selectionEnd,n.length,"")):(a=Hp(a,a.selectionStart,0,t),a=Hp(a,a.selectionEnd,0,n)),a}function jp(e,t){const n=e.indexOf("\n",t);return n<0?e.length:n}function qp(e,t,n,r){let o=function(e,t){const n=e.lastIndexOf("\n",t);return n<0?0:n+1}(e.text,t),i=jp(e.text,t),a=0;for(;i<=jp(e.text,n);){
547
+ const t=i===e.text.length,s=i-o,l=jp((e=r(e,o,i,a)).text,o)-o;if(n+=l-s,t)break;o=o+l+1,i=jp(e.text,o),a+=1}return e}function Up(e,t){const n=e.selectionStart,r=e.selectionEnd,o=e=>"function"==typeof t?t(e):t;let i=!0;return qp(e,n,r,((e,t,n,r)=>{const a=o(r);return e.text.slice(t,t+a.length)!==a&&(i=!1),e})),qp(e,n,r,i?(e,t,n,r)=>Hp(e,t,o(r).length,""):(e,t,n,r)=>{const i=o(r);return e.text.slice(t,t+i.length)===i?e:Hp(e,t,0,i)})}const Gp=!1;function Vp({user:e,usersListboxId:t,highlighted:n,mentionMode:r,onSelect:o,onHighlight:i}){const a="username"===r;return et("li",{id:`${t}-${e.username}`,className:Ze("flex justify-between items-center gap-x-2 rounded p-2","leading-tight",{"bg-grey-2":n}),onClick:e=>{e.stopPropagation(),o()},onMouseMove:i,role:"option","aria-selected":n,children:[a&&et("span",{className:"truncate","data-testid":`username-${e.username}`,children:e.username}),et("span",{className:Ze({"text-color-text-light":a}),children:e.displayName})]},e.username)}
548
+ function Wp({loadingUsers:e,users:t,onSelectUser:n,highlightedSuggestion:r,onHighlightSuggestion:o,usersListboxId:i,mentionMode:a,...s}){return et(no,{...s,classes:Ze("p-1",["!max-h-96"]),children:et("ul",{className:"flex-col gap-y-0.5",role:"listbox","aria-orientation":"vertical",id:i,children:e?et("li",{className:"italic p-2","data-testid":"suggestions-loading-indicator",children:"Loading suggestions…"}):et(x,{children:[t.map(((e,t)=>et(Vp,{user:e,highlighted:r===t,mentionMode:a,usersListboxId:i,onSelect:()=>n(e),onHighlight:()=>o(t)},e.username))),0===t.length&&et("li",{className:"italic p-2","data-testid":"suggestions-fallback",children:"No matches. You can still write the username"})]})})})}const Kp={bold:"b",image:"g",italic:"i",link:"l",list:"u",math:"m",numlist:"o",quote:"q"};function Yp({disabled:e=!1,icon:t,label:n,onClick:r,shortcutKey:o,title:i="",classes:a}){const s=he((()=>Bs()?"Cmd":"Ctrl"),[]);let l=i;o&&(l+=` (${s}-${o.toUpperCase()})`);const c={disabled:e,onClick:r,title:l};return n?et(kr,{
549
+ classes:Ze("p-1.5 text-grey-7 hover:text-grey-9",a),...c,size:"custom",variant:"custom",children:n}):et(Tr,{classes:Ze("px-2 py-2.5",a),...c,children:t&&et(t,{className:"w-[10px] h-[10px] touch:w-[13px] touch:h-[13px]"})})}function Xp({classes:e,containerRef:t,mentionsEnabled:n,usersForMentions:r,onEditText:o,onKeyDown:i,mentionMode:a,onInsertMentionSuggestion:s,...l}){const[c,u]=se(!1),[d,h]=se(),m=Le(t),[p,f]=se(0),g=de(null),v=he((()=>n?function(e,t,{mentionMode:n,maxUsers:r=10}){return void 0===e||"loading"===t.status?[]:t.users.filter((t=>{if(!e)return!0;const r=t.displayName??"";return("username"===n?`${t.username} ${r}`:r).match(new RegExp(e,"i"))})).slice(0,r)}(d,r,{mentionMode:a}):[]),[d,a,n,r]),b=me((e=>{if(!n)return;const{x:t,y:r}=function(e){Dp||(Dp=document.createElement("div"),document.body.append(Dp));try{const t=e.getBoundingClientRect(),n=window.getComputedStyle(e);Dp.style.font=n.font,Dp.style.padding=n.padding,Dp.style.whiteSpace="pre-wrap",Dp.style.wordWrap="break-word",
550
+ Dp.style.position="fixed",Gp||(Dp.style.visibility="hidden"),Dp.style.width=`${t.width}px`,Dp.style.height=`${t.height}px`,Dp.style.top=`${t.top}px`,Dp.style.left=`${t.left}px`;const r=e.selectionStart,o=document.createElement("span");o.style.display="inline-block",o.style.verticalAlign="bottom";const i=e.value.substring(0,r),a=e.value.slice(r),s="\nx";Dp.innerHTML="",Dp.append(i,o,a,s),Dp.style.overflowY="auto",Dp.scrollTop=e.scrollTop;const l=o.getBoundingClientRect();return{x:l.left-t.left,y:l.top-t.top}}finally{Dp.remove(),Dp=void 0}}(e);g.current&&(g.current.style.transform=`translate(${t}px, ${r}px)`);const o=function(e,t){const{start:n}=ol(e,t);return e.slice(n,t)}(e.value,e.selectionStart),i=o.startsWith("@");u(i),h(i?o.substring(1):void 0)}),[n]),y=me((e=>{const t=m.current,{value:n}=t,{start:r,end:i}=ol(n,t.selectionStart),l=`${n.slice(0,r)}${function(e,t){return"display-name"===t?il(e.displayName??""):`@${e.username}`}(e,a)} `,c=n.slice(i);t.value=`${l}${c}`,t.selectionStart=l.length,
551
+ t.selectionEnd=l.length,t.focus(),o(t.value),s?.(e),u(!1),f(0)}),[a,o,s,m]),_=fe(),w=he((()=>{if(!c)return{};const e=v[p],t=e?`${_}-${e.username}`:void 0;return{role:"combobox","aria-controls":_,"aria-expanded":!0,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":t}}),[p,c,v,_]);return et("div",{className:"relative",children:[et("textarea",{className:Ze("border rounded p-2","placeholder:text-grey-6 bg-grey-0","focus:bg-white focus:outline-none focus:shadow-focus-inner",e),onInput:e=>{const t=e.target;o(t.value),f(0),b(t)},...l,onKeyUp:e=>{c&&b(e.target)},onKeyDown:e=>{i?.(e),c&&0!==v.length&&("ArrowDown"===e.key?(e.preventDefault(),f((e=>Math.min(e+1,v.length-1)))):"ArrowUp"===e.key?(e.preventDefault(),f((e=>Math.max(e-1,0)))):"Enter"===e.key&&(e.preventDefault(),y(v[p])))},ref:m,...w}),et("div",{ref:g,className:"absolute top-0 left-0 w-0 h-0 pointer-events-none"}),n&&et(Wp,{open:c,onClose:()=>u(!1),anchorElementRef:g,loadingUsers:"loading"===r.status,users:v,
552
+ highlightedSuggestion:p,onHighlightSuggestion:f,onSelectUser:y,usersListboxId:_,mentionMode:a})]})}function Zp({isPreviewing:e,onCommand:t,onTogglePreview:n,showHelpLink:r,mentionsEnabled:o}){const i=de(null);return Ae(i),et("div",{className:Ze("flex flex-wrap w-full items-center","p-1 border-x border-t rounded-t bg-white","touch:h-auto touch:overflow-x-scroll touch:flex-nowrap touch:pb-2.5"),"data-testid":"markdown-toolbar",role:"toolbar","aria-label":"Markdown editor toolbar",ref:i,children:[et(Yp,{disabled:e,icon:Kt,onClick:()=>t("bold"),shortcutKey:Kp.bold,title:"Bold"}),et(Yp,{disabled:e,icon:Xt,onClick:()=>t("italic"),shortcutKey:Kp.italic,title:"Italic"}),et(Yp,{disabled:e,icon:Vt,onClick:()=>t("quote"),shortcutKey:Kp.quote,title:"Quote"}),et(Yp,{disabled:e,icon:Cn,onClick:()=>t("link"),shortcutKey:Kp.link,title:"Insert link"}),et(Yp,{disabled:e,icon:kn,onClick:()=>t("image"),shortcutKey:Kp.image,title:"Insert image"}),et(Yp,{disabled:e,icon:Ut,onClick:()=>t("math"),
553
+ title:"Insert math (LaTeX is supported)"}),et(Yp,{disabled:e,icon:In,onClick:()=>t("numlist"),shortcutKey:Kp.numlist,title:"Numbered list"}),et(Yp,{disabled:e,icon:Ln,onClick:()=>t("list"),shortcutKey:Kp.list,title:"Bulleted list"}),o&&et(Yp,{disabled:e,icon:Hn,onClick:()=>t("mention"),title:"Mention",classes:"!text-brand"}),et("div",{className:"grow flex justify-end",children:[r&&et(yo,{classes:"text-grey-7 hover:!text-grey-7",href:"https://web.hypothes.is/help/formatting-annotations-with-markdown/",target:"_blank",title:"Formatting help","aria-label":"Formatting help",underline:"none",variant:"custom",children:et("div",{className:Ze("flex justify-center items-center","touch:h-touch-minimum touch:w-touch-minimum","px-2 py-2.5 touch:p-0"),children:et(vn,{className:"w-2.5 h-2.5"})})}),et(Yp,{label:e?"Write":"Preview",onClick:n})]})]})}function Jp({mentionsEnabled:e=!1,label:t,onEditText:n=(()=>{}),text:r,textStyle:o={},showHelpLink:i=!0,usersForMentions:a,mentions:s,mentionMode:l,onInsertMentionSuggestion:c}){
554
+ const[u,d]=se(!1),h=de(null),m=he((()=>function({text:e,mentionMode:t,mentions:n=[]}){return e.replace(nl,((e,r)=>{const o=document.createElement("div");o.innerHTML=e;const i=o.querySelector("a[data-hyp-mention]")?.getAttribute("data-userid"),a=n.find((({original_userid:e})=>e===i));return"username"===t?`@${a?.username??r}`:il(a?.display_name||r)}))}({text:r,mentionMode:l,mentions:s})),[l,s,r]);ce((()=>{u||h.current?.focus()}),[u]);const p=e=>{h.current&&(!function(e,t){const n=e=>{const n=e({text:t.value,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd});t.value=n.text,t.selectionStart=n.selectionStart,t.selectionEnd=n.selectionEnd,t.focus()},r=e=>{const t=e.text.slice(0,e.selectionStart);return 0===t.length||"\n"===t.slice(-1)||"$$"===t.slice(-2)?$p(e,"$$","$$","Insert LaTeX"):$p(e,"\\(","\\)","Insert LaTeX")};switch(e){case"bold":n((e=>$p(e,"**","**","Bold")));break;case"italic":n((e=>$p(e,"*","*","Italic")));break;case"quote":n((e=>Up(e,"> ")));break;case"link":n((e=>Bp(e)));break;case"image":
555
+ n((e=>Bp(e,Fp.IMAGE_LINK)));break;case"math":n(r);break;case"numlist":n((e=>Up(e,(e=>`${e+1}. `))));break;case"list":n((e=>Up(e,"* ")));break;case"mention":n((e=>$p(e,"@","",""))),t.dispatchEvent(new KeyboardEvent("input",{key:"@"}))}}(e,h.current),n(h.current.value))};return et("div",{className:"leading-none",children:[et(Zp,{onCommand:p,isPreviewing:u,onTogglePreview:()=>d(!u),showHelpLink:i,mentionsEnabled:e}),u?et(zp,{markdown:r,classes:"border bg-grey-1 p-2",style:o,mentions:s,mentionsEnabled:e,mentionMode:l}):et(Xp,{"aria-label":t,placeholder:t,dir:"auto",classes:Ze("w-full min-h-[8em] resize-y","rounded-t-none","text-base touch:text-touch-base"),containerRef:h,onKeyDown:e=>{if(e.ctrlKey||e.metaKey)for(const[t,n]of Object.entries(Kp))n===e.key&&(e.stopPropagation(),e.preventDefault(),p(t))},onEditText:n,value:m,style:o,mentionsEnabled:e,usersForMentions:a,mentionMode:l,onInsertMentionSuggestion:c})]})}const Qp=e=>e
556
+ ;function ef({activeItem:e=-1,id:t,itemPrefixId:n,list:r,listFormatter:o=Qp,onSelectItem:i,open:a=!1}){const s=he((()=>r.map(((t,r)=>{const a=n?{id:`${n}${r}`}:{};return et("li",{role:"option","aria-selected":e===r,className:Ze("flex items-center","border-l-4 py-1 px-3 cursor-pointer hover:bg-grey-2","touch:h-touch-minimum",{"border-brand bg-grey-1":e===r,"border-transparent":e!==r}),onClick:()=>{i(t)},...a,children:o(t,r)},`AutocompleteList-${r}`)}))),[e,n,r,o,i]),l=t?{id:t}:{},c=0===r.length||!a;return et("div",{className:"relative",children:et("div",{className:Ze({hidden:c},"absolute top-[3px] z-3","min-w-[10em]"),"data-testid":"autocomplete-list-container",children:et(lt,{width:"auto",classes:"overflow-hidden",children:[et("ul",{tabIndex:-1,"aria-label":"Suggestions",role:"listbox",...l,children:s}),et(qs,{direction:"up",classes:"top-[-8px] left-2"})]})})})}let tf=0;var nf=Ro((function({onAddTag:e,onRemoveTag:t,onTagInput:n,tagList:r,tags:o}){
557
+ const i=de(),[a,s]=se([]),[l,c]=se(-1),[u,d]=se(!1),[h]=se((()=>(++tf,`TagEditor-${tf}`))),m=de(null);Me(m,(()=>d(!1)),{enabled:u});const p=()=>i.current.value.trim(),f=()=>p()&&p().length>0,g=()=>{i.current.value="",n?.("")},v=t=>{e(t)&&(d(!1),c(-1),g(),i.current.focus())},b=e=>{let t=l+e;t<-1?t=a.length-1:t>=a.length&&(t=-1),c(t)},y=l>=0?`${h}-AutocompleteList-item-${l}`:"";return et("div",{className:"space-y-4",children:[et(Lp,{children:r.map((e=>et(Op,{onRemoveTag:t,tag:e},e)))}),et("div",{id:h,"data-testid":"combobox-container",ref:m,children:[et(Yr,{onInput:()=>{n?.(p()),(()=>{if(f()){const e=o.filter(p());s(((e,t)=>{const n=[];for(const r of e)t.indexOf(r)<0&&n.push(r);return n.sort()})(e,r)),d(e.length>0)}else d(!1);c(-1)})()},onKeyDown:e=>{switch(e.key){case"ArrowUp":b(-1),e.preventDefault();break;case"ArrowDown":b(1),e.preventDefault();break;case"Escape":g(),e.preventDefault();break;case"Enter":case",":v(-1===l?p():a[l]),e.preventDefault();break;case"Tab":if(!f())break
558
+ ;-1!==l?v(a[l]):1===a.length?v(a[0]):v(p()),e.preventDefault()}},onFocus:()=>{f()&&d(!0)},elementRef:i,placeholder:"Add new tags",type:"text",autoComplete:"off","aria-autocomplete":"list","aria-activedescendant":y,"aria-controls":`${h}-AutocompleteList`,"aria-expanded":u,"aria-label":"Add tags",dir:"auto",role:"combobox",classes:Ze("text-base touch:text-touch-base")}),et(ef,{id:`${h}-AutocompleteList`,list:a,listFormatter:e=>{const t=p().toLowerCase(),n=e.toLowerCase().indexOf(t);if(-1===n)return et("span",{children:e});const r=e.slice(0,n),o=e.slice(n,n+t.length),i=e.slice(n+t.length);return et("span",{children:[et("strong",{children:r}),o,et("strong",{children:i})]})},open:u,onSelectItem:e=>{e&&v(e)},itemPrefixId:`${h}-AutocompleteList-item-`,activeItem:l})]})]})}),["tags"]);function rf(){return et("div",{className:"pt-2 border-t text-xs leading-none",children:et(yo,{href:"http://creativecommons.org/publicdomain/zero/1.0/",target:"_blank",
559
+ title:"View more information about the Creative Commons Public Domain dedication",underline:"none",variant:"text-light",children:et("div",{className:"flex items-center",children:[et(At,{className:"w-[10px] h-[10px]"}),et(Tt,{className:"w-[10px] h-[10px] ml-px"}),et("div",{className:"ml-1",children:"Annotations can be freely reused by anyone for any purpose."})]})})})}function of(e){return null!==e.offsetParent}function af({className:e,closeMenu:t,children:n,visible:r}){const o=de(null);ce((()=>{let e;return r&&(e=setTimeout((()=>{const e=o.current.querySelector('[role^="menuitem"]');e&&e.focus()}))),()=>{clearTimeout(e)}}),[r]);return et("div",{role:"menu",className:e,ref:o,onKeyDown:e=>{const n=Array.from(o.current.querySelectorAll('[role^="menuitem"]')).filter(of);let r=n.findIndex((e=>e.contains(document.activeElement))),i=!1;switch(e.key){case"ArrowLeft":case"Escape":t&&(t(e),i=!0);break;case"ArrowUp":r-=1,r<0&&(r=n.length-1),i=!0;break;case"ArrowDown":r+=1,r===n.length&&(r=0),i=!0;break;case"Home":r=0,
560
+ i=!0;break;case"End":r=n.length-1,i=!0}i&&r>=0&&(e.stopPropagation(),e.preventDefault(),n[r].focus())},children:n})}let sf=!1;const lf=()=>{};function cf({align:e="left",children:t,containerPositioned:n=!0,contentClass:r,defaultOpen:o=!1,disabled:i=!1,label:a,open:s,onOpenChanged:l,menuIndicator:c=!0,title:u}){let[d,h]=se(o);"boolean"==typeof s&&(d=s,h=l||lf);const m=de(d);ce((()=>{"function"==typeof l&&m.current!==d&&(m.current=d,l(d))}),[d,l]);const p=e=>{if("mousedown"===e.type)sf=!0;else if("click"===e.type&&sf)return sf=!1,e.stopPropagation(),void e.preventDefault();h(!d)},f=me((()=>h(!1)),[h]),g=de(null);Me(g,f,{enabled:d});const v=e=>e.stopPropagation();return et("div",{className:"relative","data-testid":"menu-container",ref:g,style:{position:n?"relative":"static"},onClick:v,onMouseDown:v,children:[et("button",{"aria-expanded":d?"true":"false","aria-haspopup":!0,className:Ze("focus-visible-ring","flex items-center justify-center rounded transition-colors",{"text-grey-7 hover:text-grey-9":!d,
561
+ "text-brand":d}),"data-testid":"menu-toggle-button",disabled:i,onMouseDown:p,onClick:p,"aria-label":u,title:u,children:et("span",{className:"flex items-center gap-x-1",children:[a,c&&et("span",{className:Ze({"rotate-180 text-color-text":d}),children:et(qn,{className:"w-2.5 h-2.5"})})]})}),d&&et("div",{className:Ze("focus-visible-ring","absolute top-[calc(100%+3px)] z-1","border shadow-intense rounded-lg overflow-hidden bg-white text-md",{"left-0":"left"===e,"right-0":"right"===e},r),"data-testid":"menu-content",role:"menu",tabIndex:-1,onClick:f,onKeyDown:e=>{const t=e.key;"Enter"!==t&&" "!==t||setTimeout((()=>{f()}))},children:et(af,{visible:!0,children:t})})]})}function uf({title:e,isExpanded:t,onToggleSubmenu:n}){const r=t?$n:qn;return et("div",{"data-testid":"submenu-toggle",role:"none",className:Ze("flex flex-col items-center justify-center w-10 h-10","text-grey-6 bg-grey-1","bg-clip-content border-[8px] border-transparent rounded-xl","group-hover:hover:text-grey-8",{"bg-grey-4":t,
562
+ "group-hover:bg-grey-3":!t}),onClick:n,title:e,children:et(r,{className:"w-3 h-3",viewBox:"0 0 16 16"})})}function df({href:e,icon:t,isDisabled:n,isExpanded:r,isSelected:o,isSubmenuItem:i,isSubmenuVisible:a,label:s,leftChannelContent:l,onClick:c,onToggleSubmenu:u,submenu:d,submenuToggleTitle:h}){const m=de(null);let p,f;const g="boolean"==typeof a,v="boolean"==typeof o;ce((()=>()=>{clearTimeout(p)}),[]);const b=e=>{switch(e.key){case"ArrowRight":u&&(e.stopPropagation(),e.preventDefault(),u(e));break;case"Enter":case" ":c&&c(e)}},y=t?et(t,{className:"h-3 w-3"}):null,_=i?null:y,w=i?y:null,k=!!w,N=et(x,{children:[(l||i||!!_)&&et("div",{className:"w-7 flex items-center justify-center","data-testid":"left-item-container",children:l??_}),et("span",{className:"flex items-center grow whitespace-nowrap px-1",children:s}),k&&et("div",{className:"w-8 flex items-center justify-center","data-testid":"right-item-container",children:w}),g&&et(uf,{title:h??("string"==typeof s?`Show actions for ${s}`:"Toggle submenu"),
563
+ isExpanded:a,onToggleSubmenu:u})]}),S=Ze("focus-visible-ring ring-inset","w-full min-w-[150px] flex items-center select-none","rounded-none",{"focus-visible:rounded-lg":!o,"focus-visible:rounded-r-lg":o,"cursor-pointer":!n},"group",{"min-h-[30px] font-normal":i,"min-h-[40px] font-medium":!i,"bg-grey-1":i||r,"hover:bg-grey-3":!n&&(i||r),"bg-white":!i&&!r,"hover:bg-grey-1":!n&&!i&&!r,"pr-1":!g},{"border-l-[4px] border-l-brand":o,"pl-[4px]":!o,"text-color-text-light":n,"text-color-text hover:text-color-text":!n});return f=e?et("a",{ref:m,className:S,"data-testid":"menu-item",href:e,target:"_blank",tabIndex:-1,rel:"noopener noreferrer",role:"menuitem",onKeyDown:b,children:N}):et("div",{ref:m,className:S,"data-testid":"menu-item",tabIndex:-1,onKeyDown:b,onClick:c,role:v?"menuitemradio":"menuitem","aria-checked":v?o:void 0,"aria-haspopup":g,"aria-expanded":g?a:void 0,children:N}),et(x,{children:[f,g&&et(Co,{direction:a?"in":"out",children:et(af,{closeMenu:e=>{u&&u(e),p=setTimeout((()=>{m.current.focus()}))},
564
+ visible:a,className:"border-y border-grey-3",children:d})})]})}var hf=Ro((function({group:e,isDisabled:t,isPrivate:n,onCancel:r,onSave:o,onSetPrivate:i,settings:a}){const s=Lo(["ctaTextColor","ctaBackgroundColor"],a),l=et("div",{className:"w-9 h-9 flex items-center justify-center text-color-text-inverted",style:s,children:et(qn,{className:"w-4 h-4"})});return et("div",{className:"flex flex-row gap-x-3",children:[et("div",{className:"flex relative",children:[et(kr,{classes:Ze("rounded-r-none"),"data-testid":"publish-control-button",style:s,onClick:o,disabled:t,size:"lg",variant:"primary",children:["Post to ",n?"Only Me":e.name]}),et("div",{className:Ze("flex flex-row rounded-r bg-grey-7 hover:bg-grey-8"),style:s,children:et(cf,{containerPositioned:!1,contentClass:Ze("min-w-full"),label:l,menuIndicator:!1,title:"Change annotation sharing setting",align:"left",children:[et(df,{icon:"open"===e.type?dn:fn,label:e.name,isSelected:!n,onClick:()=>i(!1)}),et(df,{icon:Rn,label:"Only Me",isSelected:n,onClick:()=>i(!0)
565
+ })]})})]}),et("div",{children:et(kr,{"data-testid":"cancel-button",onClick:r,size:"lg",children:[et(_t,{}),"Cancel"]})})]})}),["settings"]);var mf=Ro((function({annotation:e,draft:t,annotationsService:n,groups:r,settings:o,tags:i,toastMessenger:a}){const[s,l]=se(null),c=ws(),u=c.getGroup(e.group),d=he((()=>_i(e)),[e]),h=!t.isPrivate&&u&&"private"!==u.type,m=Mo(o)?.enableHelpPanel??!0,p=t.tags,f=t.text,g=!f&&!p.length,v=me((e=>{c.createDraft(t.annotation,{...t,tags:e})}),[t,c]),b=me((e=>{if(!e||p.indexOf(e)>=0)return!1;const t=[...p,e];return i.store(t),v(t),!0}),[v,p,i]),y=me((e=>{const t=[...p],n=t.indexOf(e);return n>=0&&(t.splice(n,1),v(t),!0)}),[v,p]),_=me((e=>{c.createDraft(t.annotation,{...t,text:e})}),[t,c]),w=me((n=>{c.createDraft(e,{...t,isPrivate:n}),d||c.setDefault("annotationPrivacy",n?"private":"shared")
566
+ }),[e,t,d,c]),x=c.defaultAuthority(),k=he((()=>fi(e.user,x)?"display-name":"username"),[e.user,x]),N=de(new Map("username"===k?[]:e.mentions?.filter((e=>!!e.display_name)).map((({userid:e,username:t,display_name:n})=>[n,{userid:e,username:t,displayName:n}])))),S=me((e=>{const{displayName:t}=e;t&&"display-name"===k&&N.current.set(t,e)}),[k]),A=async()=>{s&&b(s);const t=`${Ii(e)} ${wi(e)?"updated":"saved"}`;try{await n.save(e,"username"===k?{mentionMode:k}:{mentionMode:k,usersMap:N.current}),a.success(t,{visuallyHidden:!0}),N.current=new Map}catch{a.error("Saving annotation failed")}},E=me((()=>{c.removeDraft(e),N.current=new Map,wi(e)||c.removeAnnotations([e])}),[e,c]),T=Lo(["annotationFontFamily"],o),C=c.isFeatureEnabled("at_mentions"),M=c.usersWhoAnnotated(),I=c.usersWhoWereMentioned(),z=c.getFocusedGroupMembers(),L=he((()=>function({usersWhoAnnotated:e,usersWhoWereMentioned:t,focusedGroupMembers:n,mentionMode:r}){if("loaded"!==n.status)return{status:"loading"}
567
+ ;const o=n.members.map((({userid:e,username:t,display_name:n})=>({userid:e,username:t,displayName:n}))),i=new Set,a=[...e,...t,...o].filter((({userid:e})=>{const t=i.has(e);return i.add(e),!t})).sort(((e,t)=>{if("username"===r)return e.username.localeCompare(t.username);const n=e.displayName??"",o=t.displayName??"";return n.localeCompare(o,void 0,{sensitivity:"base"})||e.username.localeCompare(t.username)}));return{status:"loaded",users:a}}({usersWhoAnnotated:M,usersWhoWereMentioned:I,focusedGroupMembers:z,mentionMode:k})),[z,k,M,I]);return ce((()=>{C&&"not-loaded"===z.status&&r.loadFocusedGroupMembers()}),[z,r,C]),et("div",{"data-testid":"annotation-editor",className:"space-y-4",onKeyDown:e=>{const t=e.key;g||(e.metaKey||e.ctrlKey)&&"Enter"===t&&(e.stopPropagation(),e.preventDefault(),A())},children:[et(Jp,{textStyle:T,label:d?"Enter reply":"Enter comment",text:f,onEditText:_,mentionsEnabled:C,usersForMentions:L,showHelpLink:m,mentions:e.mentions,mentionMode:k,onInsertMentionSuggestion:S}),et(nf,{onAddTag:b,
568
+ onRemoveTag:y,onTagInput:l,tagList:p}),u&&et(hf,{group:u,isDisabled:g,isPrivate:t.isPrivate,onCancel:E,onSave:A,onSetPrivate:w}),h&&et(rf,{})]})}),["annotationsService","groups","settings","tags","toastMessenger"]);function pf({domain:e,link:t,title:n}){return et("div",{className:"flex gap-x-1",children:[et("div",{className:"text-color-text-light",children:['on "',t?et(yo,{href:t,target:"_blank",underline:"none",children:n}):et("span",{children:n}),'"']}),e&&et("span",{className:"text-color-text-light",children:["(",e,")"]})]})}function ff({group:e}){const t=e?.links.html;return et(x,{children:e&&t&&et(yo,{classes:Ze("text-color-text-light hover:text-color-text-light"),href:e.links.html,target:"_blank",underline:"hover",variant:"custom",children:et("div",{className:"flex items-baseline gap-x-1",children:["open"===e.type?et(dn,{className:"w-2.5 h-2.5"}):et(fn,{className:"w-2.5 h-2.5"}),et("span",{children:e.name})]})})})}
569
+ function gf({annotationCreated:e,annotationUpdated:t,annotationURL:n,withEditedTimestamp:r}){const[o,i]=se((()=>new Date)),a=he((()=>new Date(e)),[e]),s=he((()=>r&&new Date(t)),[t,r]),l=he((()=>({absolute:Ve(a,{includeWeekday:!0}),relative:Ge(a,o)})),[a,o]),c=he((()=>s?{absolute:Ve(s,{includeWeekday:!0}),relative:Ge(s,o)}:{}),[s,o]);ce((()=>Ue(s?t:e,(()=>i(new Date)))),[e,t,a,s,o]);const u=c&&c.relative!==l.relative?`edited ${c.relative}`:"edited";return et("div",{children:[r&&et("span",{className:"text-color-text-light text-xs italic","data-testid":"timestamp-edited",title:c.absolute,children:["(",u,")"," "]}),n?et(yo,{classes:"text-color-text-light hover:text-color-text-light",target:"_blank",title:l.absolute,href:n,underline:"hover",variant:"custom",children:l.relative}):et("span",{className:"color-text-color-light","data-testid":"timestamp-created",title:l.absolute,children:l.relative})]})}function vf({authorLink:e,displayName:t}){const n=et("h3",{className:"text-color-text font-bold",children:t})
570
+ ;return e?et(yo,{href:e,target:"_blank",underline:"none",variant:"custom",children:n}):et("div",{children:n})}var bf=Ro((function({annotation:e,isEditing:t,replyCount:n,threadIsCollapsed:r,settings:o}){const i=ws(),a=i.defaultAuthority(),s=i.isFeatureEnabled("client_display_names"),l=i.getLink("user",{user:e.user}),c=he((()=>Ls(e,a,s)),[e,a,s]),u=he((()=>function(e,t,n,r){return!fi(e.user,n)&&r?r:(t.usernameUrl&&`${t.usernameUrl}${pi(e.user)}`)??void 0}(e,o,a,l)),[e,o,a,l]),d=_i(e)&&r,h=e.links?.html||"",m=he((()=>function(e){if(!e.updated||!e.created||e.updated===e.created)return!1;const t=new Date(e.created).getTime(),n=new Date(e.updated).getTime();return!isNaN(t)&&!isNaN(n)&&n-t>2e3}(e)&&!d),[e,d]),p=function(e){return{domain:bi(e),titleText:yi(e),titleLink:vi(e)}}(e),f=h&&p.titleLink?p.titleLink:"",g="sidebar"!==i.route()&&p.titleText;let v;"sidebar"!==i.route()&&(v=i.getGroup(e.group));const b=Pi(e);return et("header",{children:[et("div",{className:"flex gap-x-1 items-center flex-wrap-reverse",
571
+ children:[Hs(e.permissions)&&!t&&et(Rn,{className:"w-[12px] h-[12px]",title:"This annotation is visible only to you"}),et(vf,{authorLink:u,displayName:c}),n>0&&d&&et(wo,{variant:"text-light",onClick:()=>i.setExpanded(e.id,!0),title:"Expand replies",underline:"hover",children:`${n} ${n>1?"replies":"reply"}`}),!t&&e.created&&et("div",{className:"flex justify-end grow",children:et(gf,{annotationCreated:e.created,annotationUpdated:e.updated,annotationURL:h,withEditedTimestamp:m})})]}),!_i(e)&&et("div",{className:"flex gap-x-1 items-baseline flex-wrap-reverse","data-testid":"extended-header-info",children:[v&&et(ff,{group:v}),!t&&Ei(e)&&et(wn,{title:"This is a highlight. Click 'edit' to add a note or tag.",className:"w-[10px] h-[10px] text-color-text-light"}),(g||b)&&et("span",{className:"flex",children:[g&&et(pf,{domain:p.domain,link:f,title:p.titleText}),b&&et("span",{className:"text-grey-6","data-testid":"page-number",children:[g&&", ","p. ",b]})]})]})]})}),["settings"])
572
+ ;var yf=Ro((function({quote:e,isHovered:t,isOrphan:n,settings:r}){return et(Xs,{collapsedHeight:35,inlineControls:!0,overflowThreshold:20,children:et(Cp,{classes:Ze({"p-redacted-text":n}),children:et("blockquote",{className:Ze("hover:border-l-blue-quote",{"border-l-blue-quote":t}),style:Lo(["selectionFontFamily"],r),children:e})})})}),["settings"]);function _f({onToggleReplies:e,replyCount:t,threadIsCollapsed:n}){const r=`${n?"Show replies":"Hide replies"} (${t})`;return et(kr,{classes:Ze("text-grey-7 enabled:hover:text-brand-dark","enabled:hover:underline"),onClick:e,title:r,variant:"custom",children:r})}function wf({alt:e,bitmap:t,classes:n,scale:r=1}){const o=de(null);return ue((()=>{o.current.getContext("2d").drawImage(t,0,0,t.width,t.height)}),[t]),et("canvas",{ref:o,width:t.width,height:t.height,role:"img","aria-label":e,className:n,style:{width:t.width/r+"px",height:t.height/r+"px"}})}var xf=Ro((function({tag:e,thumbnailService:t}){
573
+ const[n,r]=se((()=>t.get(e))),[o,i]=se(),a=he((()=>window.devicePixelRatio),[]);return ce((()=>{n||o||t.fetch(e,{maxWidth:196*a,devicePixelRatio:a}).then(r).catch((e=>i(e.message)))}),[o,a,e,n,t]),et("div",{className:"flex flex-row justify-center","data-testid":"thumbnail-container",children:[n&&et(wf,{alt:"annotated content thumbnail",bitmap:n,classes:"border rounded-md",scale:a}),!n&&!o&&et("span",{"data-testid":"placeholder",children:"Loading thumbnail..."}),!n&&o&&et("span",{"data-testid":"error",children:"Unable to render thumbnail"})]})}),["thumbnailService"]);function kf(){return et("div",{className:Ze("flex grow justify-end items-center gap-x-1","h-8 touch:h-touch-minimum"),"data-testid":"saving-message",children:[et("span",{className:"text-[16px] animate-fade-in-slow",children:et(uo,{size:"sm"})}),et("div",{className:"text-color-text-light font-medium",children:"Saving..."})]})}var Nf=Ro((function({annotation:e,isReply:t,onToggleReplies:n,replyCount:r,threadIsCollapsed:o,annotationsService:i}){
574
+ const a=ws(),s=Oi(e),l=a.getDraft(e),c=a.profile().userid,u=a.isAnnotationHovered(e.$tag),d=a.isSavingAnnotation(e),h=!!l&&!d,m=t&&o,p=!d&&!h&&wi(e),f=a.defaultAuthority(),g=a.isFeatureEnabled("client_display_names"),v=he((()=>Ls(e,f,g)),[e,f,g]),b=wi(e)?Ii(e):`New ${Ii(e).toLowerCase()}`,y=a.isAnnotationHighlighted(e)?" - Highlighted":"",_=he((()=>function(e){const t=e.target[0]?.selector?.find((e=>"ShapeSelector"===e.type));return t?.shape??null}(e)),[e]);return et("article",{className:"space-y-4","aria-label":`${b} by ${v}${y}`,children:[et(bf,{annotation:e,isEditing:h,replyCount:r,threadIsCollapsed:o}),_&&et(xf,{tag:e.$tag}),s&&et(yf,{quote:s,isHovered:u,isOrphan:Ti(e)}),!m&&!h&&et(Pp,{annotation:e}),h&&et(mf,{annotation:e,draft:l}),!m&&et("footer",{className:"flex items-center",children:[n&&et(_f,{onToggleReplies:n,replyCount:r,threadIsCollapsed:o}),d&&et(kf,{}),p&&et(ut,{classes:"grow",children:et(Ws,{annotation:e,onReply:()=>{wi(e)&&c&&i.reply(e,c)}})})]})]})}),["annotationsService"])
575
+ ;function Sf({isReply:e,replyCount:t,threadIsCollapsed:n,onToggleReplies:r}){return et("article",{className:"space-y-4","aria-label":(e?"Reply":"Annotation")+" with unavailable content",children:[et("div",{children:et("em",{children:"Message not available."})}),r&&et("footer",{className:"flex items-center",children:et(_f,{onToggleReplies:r,replyCount:t,threadIsCollapsed:n})})]})}var Af=Ro((function({annotation:e,api:t,toastMessenger:n}){const r=ws(),o=function(e){return e.moderation?e.moderation.flagCount:null}(e);return null!==o&&(o>0||e.hidden)?et("div",{className:Ze("flex gap-x-3 bg-grey-1 text-color-text font-semibold","rounded-t-lg overflow-hidden","mb-2 ",{"-mt-3 -ml-3 -mr-3":!_i(e),"-mr-3":_i(e)}),children:[et("div",{className:Ze("p-3 text-white",{"bg-red-error":!e.hidden,"bg-grey-6":e.hidden}),children:e.hidden?et(yn,{className:"w-em h-em"}):et(sn,{className:"w-em h-em"})}),et("div",{className:"self-center grow",children:[!e.hidden&&et("span",{
576
+ children:["Flagged for review by ",o," ",1===o?"user":"users"]}),e.hidden&&et("span",{children:"Hidden from users"})]}),et("div",{className:"self-center pr-2",children:et(kr,{classes:Ze("px-1.5 py-1","bg-slate-1 text-grey-7 bg-grey-2","enabled:hover:text-grey-9 enabled:hover:bg-grey-3 disabled:text-grey-5","aria-pressed:bg-grey-3 aria-expanded:bg-grey-3"),onClick:e.hidden?()=>{const o=e.id;t.annotation.unhide({id:o}).then((()=>{r.unhideAnnotation(o)})).catch((()=>{n.error("Failed to unhide annotation")}))}:()=>{const o=e.id;t.annotation.hide({id:o}).then((()=>{r.hideAnnotation(o)})).catch((()=>{n.error("Failed to hide annotation")}))},title:e.hidden?"Make this annotation visible to everyone":"Hide this annotation from non-moderators",size:"custom",variant:"custom",children:e.hidden?"Unhide":"Hide"})})]}):null}),["api","toastMessenger"]);function Ef({threadIsCollapsed:e,onToggleReplies:t}){const n=e?xt:qn,r=e?"Expand replies":"Collapse replies";return et("div",{className:Ze("cursor-auto",{"bg-thread-line":!e
577
+ }),"data-testid":"thread-collapse-channel",children:et("div",{className:Ze("bg-white"),children:et(kr,{classes:Ze("-mt-1 touch:min-w-[auto] touch:min-h-[auto] p-[6.5px]","text-grey-5 hover:text-grey-7"),"data-testid":"toggle-button",expanded:!e,title:r,onClick:t,size:"custom",variant:"custom",children:et(n,{className:"w-em h-em"})})})})}var Tf=Ro((function e({thread:t,threadsService:n}){const r=!!t.parent,o=t.children.filter((e=>Is(e)>0)),i=ws(),a=i.hasAppliedFilter(),s=t.annotation&&i.isSavingAnnotation(t.annotation),l=t.annotation&&!!i.getDraft(t.annotation)&&!s,c=me((()=>i.setExpanded(t.id,!!t.collapsed)),[i,t.id,t.collapsed]),u=!r&&!l&&!a&&t.replyCount>0,d=he((()=>t.visible&&et(x,{children:t.annotation?et(x,{children:[et(Af,{annotation:t.annotation}),et(Nf,{annotation:t.annotation,isReply:r,onToggleReplies:u?c:void 0,replyCount:t.replyCount,threadIsCollapsed:t.collapsed})]}):et(Sf,{isReply:r,onToggleReplies:u?c:void 0,replyCount:t.replyCount,threadIsCollapsed:t.collapsed})
578
+ })),[r,c,u,t.annotation,t.replyCount,t.collapsed,t.visible]);return et("section",{className:"flex","data-testid":"thread-container",children:[r&&et(Ef,{threadIsCollapsed:t.collapsed,onToggleReplies:c}),et("div",{className:Ze("grow max-w-full min-w-0"),"data-testid":"thread-content",children:[d,Ms(t)>0&&et("div",{className:"space-y-2",children:[!t.parent&&t.annotation&&et(bf,{annotation:t.annotation,isEditing:l,replyCount:t.replyCount,threadIsCollapsed:t.collapsed}),et("div",{children:et(kr,{"data-testid":"show-hidden-button",onClick:()=>n.forceVisible(t),children:["Show ",Ms(t)," more in conversation"]})})]}),!t.collapsed&&et("ul",{className:Ze("-ml-3"),"data-testid":"thread-children",children:o.map((t=>et("li",{className:Ze("mt-2","[text-align:start]"),children:et(e,{thread:t,threadsService:n})},t.id)))})]})]})}),["threadsService"]);var Cf=Ro((function({frameSync:e,thread:t}){
579
+ const n=ws(),r=t.annotation?.$tag??null,o=!(!r||!n.isAnnotationHovered(r)),i=he((()=>As((t=>e.hoverAnnotation(t)),10)),[e]),a=n.isAnnotationHighlighted(t.annotation),s=me((t=>{e.scrollToAnnotation(t)}),[e]),l=he((()=>et(Tf,{thread:t})),[t]),c=n.annotationFocusRequest(),u=de(null);return ce((()=>{c===t.id&&u.current&&(u.current.focus(),n.clearAnnotationFocusRequest())}),[c,n,t.id]),et(lt,{active:o,classes:Ze("cursor-pointer focus-visible-ring theme-clean:border-none",{"border-brand":a}),"data-testid":"thread-card",elementRef:u,tabIndex:-1,onClick:e=>{var n;(n=e.target).closest("button")||n.closest("a")||!t.annotation||s(t.annotation)},onMouseEnter:()=>i(t.annotation??null),onMouseLeave:()=>i(null),children:et(ht,{children:l})},t.id)}),["frameSync"]);const Mf=50;function If(){const e=document.querySelector(".js-thread-list-scroll-root");if(!e)throw new Error("Scroll container is missing");return e}function zf(e){return Math.max(e-e%Mf,0)}function Lf(e){const t=e.target[0]
580
+ ;if(t)return t.selector?.find((e=>"EPUBContentSelector"===e.type))}function Of(e){if(!e.annotation)return null;const t=Lf(e.annotation);return t?.cfi??null}function Rf({threads:e}){const[t,n]=se(0),[r,o]=se(0);ue((()=>{const e=new Ne,t=If();n(t.clientHeight),o(zf(t.scrollTop));const r=As((()=>{n(t.clientHeight),o(zf(t.scrollTop))}),10,{maxWait:100});return e.add(t,"scroll",r),e.add(window,"resize",r),()=>{e.removeAll(),r.cancel()}}),[]);const[i,a]=se((()=>new Map)),[s,l]=se(null),c=e,{offscreenLowerHeight:u,offscreenUpperHeight:d,visibleThreads:h}=he((()=>function(e,t,n,r,o=Es){const{defaultHeight:i,marginAbove:a,marginBelow:s}=o,l=[];let c=0,u=0,d=0;return e.forEach((e=>{const o=t.get(e.id)||i;c+o<n-a?u+=o:c<n+r+s?l.push(e):d+=o,c+=o})),{visibleThreads:l,offscreenUpperHeight:u,offscreenLowerHeight:d}}(c,i,r,t)),[c,i,r,t]),m=he((()=>{let t=null,n=null;const r=function(e){const t=new Map;for(const n of e){if(!n.annotation)continue;const e=Lf(n.annotation);e?.title&&t.set(e.cfi,e.title)}return t}(e),o=new Map
581
+ ;for(const i of e){const e=Of(i);if(!e||t===e)continue;t=e;const a=r.get(e)??"Untitled chapter";n!==a&&(n=a,o.set(i,a))}return o}),[e]),p=ws(),f=p.profile().userid,g=p.countDrafts()>0,v=p.highlightedAnnotations(),b=p.allAnnotations(),y=(()=>{const e=p.unsavedAnnotations();return e.length?e[e.length-1].$tag:null})();ce((()=>{y&&(p.setForcedVisible(y,!0),l(y))}),[p,y]);const _=he((()=>function(e,{highlightedAnnotations:t,currentUserId:n}){if(0===t.length)return null;const r=e.filter((e=>e.id&&t.includes(e.id))).sort(((e,t)=>t.updated===e.updated?0:t.updated>e.updated?1:-1));return(n?r.find((e=>e.mentions&&e.mentions.some((({userid:e})=>e===n)))):null)??r[0]??null}(b,{highlightedAnnotations:v,currentUserId:f})?.id),[b,f,v]);return ce((()=>{!g&&_&&l(_)}),[g,_]),ce((()=>{if(!s)return;const e=c.findIndex((e=>e.id===s));if(-1===e)return;l(null);const t=c.slice(0,e).reduce(((e,t)=>e+(e=>i.get(e.id)||Es.defaultHeight)(t)),0);If().scrollTop=t}),[s,c,i]),ce((()=>{a((e=>{const t=new Map;for(const{id:n}of h){
582
+ const r=document.getElementById(n);if(!r)return console.warn("ThreadList could not measure thread. Element not found."),e;const o=Ts(r);o!==e.get(n)&&t.set(n,o)}return 0===t.size?e:new Map([...e,...t])}))}),[h]),et("div",{children:[et("div",{style:{height:d}}),h.map((e=>et("div",{className:Ze("mb-3"),"data-testid":"thread-card-container",id:e.id,children:[m.get(e)&&et("h3",{className:"text-md text-grey-7 font-bold pt-3 pb-2",children:m.get(e)}),et(Cf,{thread:e})]},e.id))),et("div",{style:{height:u}})]})}const Pf={collapsed:!1,depth:0,visible:!0,replyCount:0};function Df(e){return e.id||e.$tag}function Ff(e,t,n){const r=e[n];return!(!r||r.parent===t)&&(!r.parent||Ff(e,t,r.parent))}function Hf(e,t,n){if(e[t].parent||!n.length)return;const r=n[n.length-1];e[r]||(e[r]={...Pf,children:[],id:r},Hf(e,r,n.slice(0,-1))),Ff(e,t,r)&&(e[t].parent=r,e[r].children.push(e[t]))}function Bf(e,t){return Object.assign({},t(e),{children:e.children.map((e=>Bf(e,t)))})}function $f(e,t,n){
583
+ const r=e.children.map((e=>$f(e,n,n))).slice().sort(t);return{...e,children:r}}function jf(e,t){const n=e.children.map((e=>jf(e,t+1))),r=n.reduce(((e,t)=>e+1+t.replyCount),0);return{...e,children:n,depth:t,replyCount:r}}function qf(e){return e.children.some((e=>e.visible||qf(e)))}const Uf=(e,t)=>e.annotation&&t.annotation?e.annotation.created<t.annotation.created?-1:e.annotation.created>t.annotation.created?1:0:0;function Gf(e,t){const n=t.selected.length>0,r=t.forcedVisible.length>0;let o=function(e){const t={};e.forEach((e=>{const n=Df(e);t[n]={...Pf,children:[],annotation:e,id:n}})),e.forEach((e=>{const n=(e.references||[]).filter((t=>t!==e.id));return Hf(t,Df(e),n)}));const n=[];for(const e in t)t[e].parent||(t[e].collapsed=!0,n.push(t[e]));return{...Pf,id:"root",children:n}}(e);if(n)o.children=o.children.filter((e=>{const n=t.selected.includes(e.id),o=r&&t.forcedVisible.includes(e.id);return n||o}));else if(t.threadFilterFn){const e=t.threadFilterFn
584
+ ;o.children=o.children.filter((n=>!(!r||!t.forcedVisible.includes(n.id))||e(n)))}return o.visible=!1,o=Bf(o,(e=>{if(n)return{...e,visible:!0};let o=e.visible;return t.filterFn&&(o=!(!r||!t.forcedVisible.includes(e.id))||!!e.annotation&&!!t.filterFn(e.annotation)),{...e,visible:o}})),o.children=o.children.filter((e=>e.visible||qf(e))),o=Bf(o,(e=>{const n={collapsed:e.collapsed};if(hi(t.expanded,e.id))n.collapsed=!t.expanded[e.id];else{const r=t.filterFn&&qf(e);n.collapsed=e.collapsed&&!r}return{...e,...n}})),o=$f(o,t.sortCompareFn,Uf),o=jf(o,-1),o}function Vf(e){const t=Wf(e),[n,r]=t.split("-",2);return[n,r??n]}function Wf(e){if(!e.includes("["))return e;let t="",n=!1,r=!1;for(const o of e)n||"^"!==o?(n||"["!==o?!n&&r&&"]"===o?r=!1:r||(t+=o):r=!0,n=!1):n=!0;return t}function Kf(e,t){const n=e=>function(e){const t=Wf(e),n=t.indexOf("!");return-1===n?t:t.slice(0,n)}(e).split("/").map((e=>{const t=parseInt(e,10);return Number.isNaN(t)?e:t}));return function(e,t){
585
+ for(let n=0;n<Math.min(e.length,t.length);n++)if(e[n]!==t[n]){if(typeof e[n]!=typeof t[n])return"number"==typeof e[n]?-1:1;if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return e.length-t.length}(n(e),n(t))}function Yf(e,t,n){return Kf(e,t)>=0&&Kf(e,n)<0}function Xf(e){if(!e)return null;const[t,n]=e.includes("-")?e.split("-"):[e,e];let r=null;if(t&&(r=parseInt(t),!Number.isInteger(r)))return null;let o=null;return n&&(o=parseInt(n),!Number.isInteger(o))?null:null===r||null===o?[r,o]:[Math.min(r,o),Math.max(r,o)]}let Zf=function(e){return e[e.Overlap=0]="Overlap",e[e.NoOverlap=1]="NoOverlap",e[e.Unknown=2]="Unknown",e}({});function Jf(e,t,n){return[e[0]??t,e[1]??n]}function Qf(e,t){const n=Xf(e),r=Xf(t);if(!n||!r)return e&&t&&e===t?Zf.Overlap:Zf.Unknown;const o=2**31,[i,a]=Jf(n,1,o),[s,l]=Jf(r,1,o);return i<=s?s<=a?Zf.Overlap:Zf.NoOverlap:i<=l?Zf.Overlap:Zf.NoOverlap}
586
+ const eg=/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u08FE\u0900-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C01-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C82\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D02\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1DC0-\u1DE6\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE26]/g
587
+ ;function tg(e){return function(e){return e.replace(eg,"")}((t=e,t.normalize("NFKD"))).toLowerCase();var t}class ng{constructor(e,t){this.term=t.normalize(e),this.matcher=t}matches(e){const t=this.matcher;return t.fieldValues(e).some((e=>t.matches(t.normalize(e),this.term)))}}class rg{constructor(e,t){this.operator=e,this.filters=t}matches(e){return"and"===this.operator?this.filters.every((t=>t.matches(e))):this.filters.some((t=>t.matches(e)))}}function og(e){return{fieldValues:e,matches:(e,t)=>e.includes(t),normalize:tg}}const ig={quote:og((e=>[Oi(e)??""])),cfi:{fieldValues:e=>[Ri(e)?.trim()??""],matches:(e,t)=>{const[n,r]=Vf(t);return Yf(e,n,r)},normalize:e=>Wf(e.trim())},page:{fieldValues:e=>[Pi(e)?.trim()??""],matches:(e,t)=>Qf(e,t)===Zf.Overlap,normalize:e=>e.trim()},since:{fieldValues:e=>[new Date(e.updated).valueOf()],matches:(e,t)=>(Date.now()-e)/1e3<=t,normalize:e=>e},tag:og((e=>e.tags)),text:og((e=>[e.text])),uri:og((e=>[e.uri])),user:og((e=>[e.user,e.user_info?.display_name??""]))}
588
+ ;function ag(e,t){const n=(e,t)=>new ng(t,ig[e]),r=Object.entries(t).filter((([,e])=>e.terms.length>0)).map((([e,t])=>{let r;if("any"===e){const e=["quote","text","tag","user"];r=t.terms.map((t=>new rg("or",e.map((e=>n(e,t))))))}else r=t.terms.map((t=>n(e,t)));return new rg(t.operator,r)})),o=new rg("and",r);return e.filter((e=>o.matches(e)))}const sg=["cfi","quote","page","since","tag","text","uri","user"],lg=["group","quote","tag","text","uri","user"];function cg(e,t){const n=e.slice(0,e.indexOf(":"));if(!n)return[null,e];if(t.includes(n)){return[n,e.slice(n.length+1)]}return[null,e]}function ug(e){const t=e.slice(0,1),n=e.slice(-1);return'"'!==t&&"'"!==t||t!==n||(e=e.slice(1,e.length-1)),e}function dg(e,t){const n=e.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g);return n?n.map(ug).filter((e=>e.length>0)).map((e=>{const[n,r]=cg(e,t);return n?n+":"+ug(r):e})):[]}function hg(e){const t={},n=e=>"tag"===e?"tags":e,r=dg(e,lg);for(const e of r){let[r,o]=cg(e,lg);r||(r="any",o=e);const i=n(r);t[i]?t[i].push(o):t[i]=[o]}
589
+ return t}function mg(e){return Ti(e)?"orphan":Ci(e)?"note":"annotation"}function pg(e){return zs([e]).reduce(((e,t)=>t.created>e?t.created:e),"")}function fg(e){return zs([e]).reduce(((e,t)=>(e||(e=t.created),t.created<e?t.created:e)),"")}function gg(e,t){return"number"==typeof e&&"number"==typeof t?Math.sign(e-t):void 0}function vg(e,t){return e===t?0:e<t?-1:1}function bg(e,t,n){switch(n.sortBy){case"newest":{const n=pg(e);return vg(pg(t),n)}case"oldest":return vg(fg(e),fg(t));case"location":return function(e,t){if(!e.annotation||!t.annotation)return function(e,t){return e.annotation||t.annotation?e.annotation?1:-1:0}(e,t);const n=zi(e.annotation),r=zi(t.annotation);if(n.cfi&&r.cfi){const e=Kf(n.cfi,r.cfi);if(0!==e)return Math.sign(e)}const o=gg(n.pageIndex,r.pageIndex);if(void 0!==o&&0!==o)return o;const i=gg(n.top,r.top);if(void 0!==i&&0!==i)return i;const a=gg(n.charOffset,r.charOffset);if(void 0!==a&&0!==a)return a;return vg(e.annotation.created,t.annotation.created)}(e,t);default:return 0}}
590
+ const yg=function(e){if(1!==e.length)throw new Error("Memoize input must be a function of one argument");let t,n;return function(r){return r===t||(t=r,n=e(r)),n}}((function(e){const t=e.selection,n={expanded:t.expanded,forcedVisible:t.forcedVisible,selected:t.selected,sortCompareFn:(e,n)=>bg(e,n,{sortBy:t.sortKey})};if(!!t.filterQuery||Object.keys(t.filters).length>0){const e=function(e,t={}){const n=e=>{const n=t[e];return"string"==typeof n?[n]:[]},r=n("cfi"),o=n("page"),i=n("quote"),a=n("tag"),s=n("text"),l=n("uri"),c=n("user"),u=[],d=[],h=dg(e,sg);for(const e of h){const t=e.slice(0,e.indexOf(":")),n=e.slice(t.length+1);switch(t){case"cfi":r.push(n);break;case"quote":i.push(n);break;case"page":o.push(n);break;case"since":{const t=86400,n={sec:1,min:60,hour:3600,day:t,week:7*t,month:30*t,year:365*t},r=e.slice(6).toLowerCase().match(/^(\d+)(sec|min|hour|day|week|month|year)?$/);if(r){const e=parseFloat(r[1]),t=r[2]||"sec";d.push(e*n[t])}}break;case"tag":a.push(n);break;case"text":s.push(n);break;case"uri":
591
+ l.push(n);break;case"user":c.push(n);break;default:u.push(e)}}return{any:{terms:u,operator:"and",filterReplies:!0},cfi:{terms:r,operator:"or",filterReplies:!1},quote:{terms:i,operator:"and",filterReplies:!1},page:{terms:o,operator:"or",filterReplies:!1},since:{terms:d,operator:"and",filterReplies:!0},tag:{terms:a,operator:"and",filterReplies:!0},text:{terms:s,operator:"and",filterReplies:!0},uri:{terms:l,operator:"or",filterReplies:!1},user:{terms:c,operator:"or",filterReplies:!0}}}(t.filterQuery||"",t.filters),r={},o={};for(const[t,n]of Object.entries(e))n.filterReplies?r[t]=n:o[t]=n;n.filterFn=e=>ag([e],r).length>0,Object.values(o).some((e=>e.terms.length>0))&&(n.threadFilterFn=e=>!!e.annotation&&ag([e.annotation],o).length>0)}const r=Gf(e.annotations,n),o={annotation:0,note:0,orphan:0};return e.showTabs&&(r.children=r.children.filter((e=>{if(!e.annotation)return!1;if(Si(e.annotation))return!1;const n=mg(e.annotation);return o[n]+=1,n===t.selectedTab}))),{tabCounts:o,rootThread:r}}));function _g(){
592
+ const e=ws(),t=e.allAnnotations(),n=e.filterQuery(),r=e.route(),o=e.selectionState(),i=e.getFilterValues(),a="sidebar"===r,s=he((()=>{const e={...o,filterQuery:n,filters:i};return{annotations:t,selection:e,showTabs:a}}),[t,n,o,i,a]);return yg(s)}var wg,xg,kg=Ro((function({loadAnnotationsService:e,onLogin:t}){const n=ws(),r=n.routeParams().id??"",{rootThread:o}=_g(),i=n.profile().userid,[a,s]=se(!1);return ce((()=>{s(!1),n.clearAnnotations(),e.loadThread(r).then((e=>{const t=e.filter((e=>0===(e.references||[]).length))[0];t&&(e.forEach((e=>e.id&&n.setExpanded(e.id,!0))),t.id!==r&&n.highlightAnnotations([r]))})).catch((()=>{s(!0)}))}),[r,i,e,n]),et(x,{children:[a&&et(xs,{errorType:"annotation",onLoginRequest:t}),et(Rf,{threads:o.children})]})}),["loadAnnotationsService"]);class Ng{constructor(e,t,n=window){const r="N/A";let o=r;e.userid&&(o=e.userid,e.displayName&&(o=`${e.displayName} (${o})`)),this.version="1.1627.0",this.userAgent=n.navigator.userAgent,this.urls=t.map((e=>e.uri)).join(", ")||r,
593
+ this.fingerprint=t[0]?.metadata?.documentFingerprint??r,this.account=o,this.timestamp=(new Date).toString();const i=t[0]?.segment;if(i){const e=[];if(i.cfi&&e.push(["CFI",i.cfi]),i.pages){const t=`${i.pages.start}-${i.pages.end}`;e.push(["Pages",t])}i.url&&e.push(["URL",i.url]),this.segment=e.map((([e,t])=>`${e}: ${t}`)).join(", ")}}asFormattedString(){return`Version: ${this.version}\nUser Agent: ${this.userAgent}\nURL: ${this.urls}\nFingerprint: ${this.fingerprint}\nAccount: ${this.account}\nDate: ${this.timestamp}\n`}asEncodedURLString(){return encodeURIComponent(this.asFormattedString())}}var Sg=function(){if(xg)return wg;xg=1;var e="complete",t="canceled";function n(e,t,n){e.self===e?e.scrollTo(t,n):(e.scrollLeft=t,e.scrollTop=n)}function r(t){var o=t._scrollSettings;if(o){var i=o.maxSynchronousAlignments,a=function(e,t){
594
+ var n,r,o,i,a,s,l,c=e.align,u=e.target.getBoundingClientRect(),d=c&&null!=c.left?c.left:.5,h=c&&null!=c.top?c.top:.5,m=c&&null!=c.leftOffset?c.leftOffset:0,p=c&&null!=c.topOffset?c.topOffset:0,f=d,g=h;if(e.isWindow(t))s=Math.min(u.width,t.innerWidth),l=Math.min(u.height,t.innerHeight),r=u.left+t.pageXOffset-t.innerWidth*f+s*f,o=u.top+t.pageYOffset-t.innerHeight*g+l*g,r-=m,o-=p,r=e.align.lockX?t.pageXOffset:r,o=e.align.lockY?t.pageYOffset:o,i=r-t.pageXOffset,a=o-t.pageYOffset;else{s=u.width,l=u.height,n=t.getBoundingClientRect();var v=u.left-(n.left-t.scrollLeft),b=u.top-(n.top-t.scrollTop);r=v+s*f-t.clientWidth*f,o=b+l*g-t.clientHeight*g,r-=m,o-=p,r=Math.max(Math.min(r,t.scrollWidth-t.clientWidth),0),o=Math.max(Math.min(o,t.scrollHeight-t.clientHeight),0),r=e.align.lockX?t.scrollLeft:r,o=e.align.lockY?t.scrollTop:o,i=r-t.scrollLeft,a=o-t.scrollTop}return{x:r,y:o,differenceX:i,differenceY:a}}(o,t),s=Date.now()-o.startTime,l=Math.min(1/o.time*s,1);if(o.endIterations>=i)return n(t,a.x,a.y),
595
+ t._scrollSettings=null,o.end(e);var c=1-o.ease(l);if(n(t,a.x-a.differenceX*c,a.y-a.differenceY*c),s>=o.time)return o.endIterations++,o.scrollAncestor&&r(o.scrollAncestor),void r(t);!function(e){if("requestAnimationFrame"in window)return window.requestAnimationFrame(e);setTimeout(e,16)}(r.bind(null,t))}}function o(e){return e.self===e}function i(e){return"pageXOffset"in e||(e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth)&&"hidden"!==getComputedStyle(e).overflow}function a(){return!0}function s(e){if(e.assignedSlot)return s(e.assignedSlot);if(e.parentElement)return"body"===e.parentElement.tagName.toLowerCase()?e.parentElement.ownerDocument.defaultView||e.parentElement.ownerDocument.ownerWindow:e.parentElement;if(e.getRootNode){var t=e.getRootNode();if(11===t.nodeType)return t.host}}return wg=function(n,l,c){if(n){"function"==typeof l&&(c=l,l=null),l||(l={}),l.time=isNaN(l.time)?1e3:l.time,l.ease=l.ease||function(e){return 1-Math.pow(1-e,e/2)},l.align=l.align||{}
596
+ ;var u=s(n),d=1,h=l.validTarget||a,m=l.isScrollable;l.debug&&(console.log("About to scroll to",n),u||console.error("Target did not have a parent, is it mounted in the DOM?"));for(var p=[];u;)if(l.debug&&console.log("Scrolling parent node",u),h(u,d)&&(m?m(u,i):i(u))&&(d++,p.push(u)),!(u=s(u))){f(e);break}return p.reduce(((e,i,a)=>function(e,n,i,a,s){var l,c=!n._scrollSettings,u=n._scrollSettings,d=Date.now(),h={passive:!0};function m(e){n._scrollSettings=null,n.parentElement&&n.parentElement._scrollSettings&&n.parentElement._scrollSettings.end(e),i.debug&&console.log("Scrolling ended with type",e,"for",n),s(e),l&&(n.removeEventListener("touchstart",l,h),n.removeEventListener("wheel",l,h))}u&&u.end(t);var p=i.maxSynchronousAlignments;return null==p&&(p=3),n._scrollSettings={startTime:d,endIterations:0,target:e,time:i.time,ease:i.ease,align:i.align,isWindow:i.isWindow||o,maxSynchronousAlignments:p,end:m,scrollAncestor:a},"cancellable"in i&&!i.cancellable||(l=m.bind(null,t),n.addEventListener("touchstart",l,h),
597
+ n.addEventListener("wheel",l,h)),c&&r(n),l}(n,i,l,p[a+1],f)),null)}function f(e){--d||c&&c(e)}},wg}(),Ag=t(Sg);function Eg({children:e,icon:t,panelName:n,title:r,variant:o="panel",onActiveChanged:i,initialFocus:a}){const s=ws(),l=s.isSidebarPanelOpen(n),c=de(null),u=de(l);ce((()=>{u.current!==l&&(u.current=l,l&&c.current&&Ag(c.current),i?.(l))}),[l,i]);const d=me((()=>{s.toggleSidebarPanel(n,!1)}),[s,n]);return et(x,{children:l&&et(Fr,{initialFocus:a,restoreFocus:!0,ref:c,classes:"mb-4",title:r,icon:t,onClose:d,transitionComponent:Co,variant:o,scrollable:!1,children:e})})}function Tg({commandName:e,icon:t}){return et("span",{className:"whitespace-nowrap","data-testid":"instruction",children:[et(t,{className:Ze("w-em h-em","mx-1 -mt-1","text-color-text-light inline"),"aria-hidden":!0}),et("em",{"data-testid":"command-name",children:e})]})}var Cg=Ro((function({settings:e}){const t=!Io(e);return et("ol",{className:"list-decimal pl-10 space-y-2",children:[et("li",{
598
+ children:["To create an annotation, select text and then select the"," ",et(Tg,{icon:pt,commandName:"Annotate"})," button."]}),et("li",{children:["To create a highlight (",et(yo,{href:"https://web.hypothes.is/help/why-are-highlights-private-by-default/",target:"_blank",underline:"always",children:"visible only to you"}),"), select text and then select the"," ",et(Tg,{icon:wn,commandName:"Highlight"})," button."]}),t&&et("li",{children:["To annotate in a private group, select the group from the groups dropdown. Don't see your group? Ask the group creator to send a"," ",et(yo,{href:"https://web.hypothes.is/help/how-to-join-a-private-group/",target:"_blank",underline:"always",children:"join link"}),"."]}),et("li",{children:["To reply to an annotation, select the"," ",et(Tg,{icon:ir,commandName:"Reply"})," button."]})]})}),["settings"]);function Mg({label:e,children:t,classes:n}){return et(x,{children:[et("dt",{className:"col-span-1 sm:text-right font-medium",children:e}),et("dd",{
599
+ className:Ze("col-span-1 sm:col-span-3 text-color-text-light break-words",n),children:t})]})}var Ig=Ro((function({toastMessenger:e,versionData:t}){return et("div",{className:"space-y-4",children:[et("dl",{className:"grid grid-cols-1 sm:grid-cols-4 sm:gap-x-2",children:[et(Mg,{label:"Version",children:t.version}),et(Mg,{label:"User Agent",children:t.userAgent}),et(Mg,{classes:Ze("break-all"),label:"URL",children:t.urls}),et(Mg,{label:"Fingerprint",children:t.fingerprint}),t.segment&&et(Mg,{label:"Segment",children:t.segment}),et(Mg,{label:"Account",children:t.account}),et(Mg,{label:"Date",children:t.timestamp})]}),et("div",{className:"flex items-center justify-center",children:et(kr,{onClick:async()=>{try{await js(t.asFormattedString()),e.success("Copied version info to clipboard")}catch{e.error("Unable to copy version info")}},icon:Ft,children:"Copy version details"})})]})}),["toastMessenger"]);function zg({children:e,closeTitle:t}){return et("div",{"data-testid":"tab-header",className:"flex items-center",
600
+ children:[et(Mr,{classes:Ze("order-last","text-[16px]","text-grey-6 hover:text-grey-7 hover:bg-grey-3/50","touch:!min-h-0"),title:t,variant:"custom",size:"sm"}),et(To,{classes:"grow gap-x-1 -mb-[1px] z-2",children:e})]})}function Lg({children:e,active:t,title:n,...r}){return et("div",{role:"tabpanel",...r,className:Ze("p-3 focus-visible-ring ring-inset",{hidden:!t}),hidden:!t,children:[n&&et(zr,{children:n}),et("div",{className:"space-y-3 pt-2",children:e})]})}function Og({linkText:e,url:t}){return et("div",{className:"flex-1 flex items-center justify-center border-r last-of-type:border-r-0 text-md font-medium",children:et(yo,{variant:"text-light",href:t,target:"_blank",underline:"none",children:et("div",{className:"flex items-center gap-x-2",children:[et("span",{children:e})," ",et(nn,{className:"w-3 h-3"})]})})})}var Rg=Ro((function({session:e}){
601
+ const t=ws(),n=t.frames(),r=t.mainFrame(),o=t.profile(),i=o.user_info?.display_name??pi(o.userid),a=fe(),s=fe(),l=fe(),c=fe(),u=!!t.profile().preferences.show_sidebar_tutorial,[d,h]=se("tutorial"),m=he((()=>{const e=[...n].sort(((e,t)=>e===r?-1:t===r?1:0));return new Ng({userid:o.userid,displayName:i},e)}),[o,i,n,r]),p=`https://web.hypothes.is/get-help/?sys_info=${m.asEncodedURLString()}`;return et(Eg,{title:"Help",panelName:"help",onActiveChanged:me((t=>{!t&&u&&e.dismissSidebarTutorial()}),[e,u]),variant:"custom",children:[et(zg,{closeTitle:"Close help panel",children:[et(Ao,{id:a,"aria-controls":s,variant:"tab",textContent:"Help",selected:"tutorial"===d,onClick:()=>h("tutorial"),"data-testid":"tutorial-tab",children:"Help"}),et(Ao,{id:l,"aria-controls":c,variant:"tab",textContent:"Version",selected:"versionInfo"===d,onClick:()=>h("versionInfo"),"data-testid":"version-info-tab",children:"Version"})]}),et(lt,{classes:Ze({"rounded-tl-none":"tutorial"===d}),children:[et("div",{className:"border-b",
602
+ children:[et(Lg,{id:s,"aria-labelledby":a,active:"tutorial"===d,title:"Getting started",children:et(Cg,{})}),et(Lg,{id:c,"aria-labelledby":l,active:"versionInfo"===d,title:"Version details",children:et(Ig,{versionData:m})})]}),et("div",{className:"flex items-center p-3",children:[et(Og,{linkText:"Help topics",url:"https://web.hypothes.is/help/"}),et(Og,{linkText:"New support ticket",url:p})]})]})]})}),["session"]);class Pg{#e=[];destroy(){this.#e=[]}on(e,t){this.#e.push({name:e,callback:t})}off(e,t){this.#e=this.#e.filter((n=>!(n.name===e&&n.callback===t)))}emit(e,...t){for(const n of this.#e){if(n.name!==e)continue;(0,n.callback)(...t)}}}class Dg extends Error{constructor(e){super(`Results size exceeds ${e}`)}}function Fg(e){return 0===e?50:200}class Hg extends Pg{constructor(e,{getPageSize:t=Fg,separateReplies:n=!0,incremental:r=!0,maxResults:o=null,sortBy:i="created",sortOrder:a="asc"}={}){super(),this._searchFn=e,this._getPageSize=t,this._separateReplies=n,this._incremental=r,this._maxResults=o,
603
+ this._sortBy=i,this._sortOrder=a,this._canceled=!1,this._expectedCount=null,this._fetchedCount=0,this._results=[]}async _getPage(e,t,n=0){const r={limit:this._getPageSize(n),sort:this._sortBy,order:this._sortOrder,_separate_replies:this._separateReplies,...e};t&&(r.search_after=t);try{const t=await this._searchFn(r);if(this._canceled)return;if(null===this._expectedCount&&(this._expectedCount=t.total,this.emit("resultCount",this._expectedCount)),this._maxResults&&t.total>this._maxResults)return this.emit("error",new Dg(this._maxResults)),void this.emit("end");const o=t.rows.concat(t.replies||[]);this._incremental?this.emit("results",o):this._results=this._results.concat(o),this._fetchedCount+=o.length;const i=this._fetchedCount<this._expectedCount||this._expectedCount>1e3;let a=null;o.length>0&&i&&(a=o[o.length-1][this._sortBy]),a?this._getPage(e,a,n+1):(this._incremental||this.emit("results",this._results),this.emit("end"))}catch(e){if(this._canceled)return;this.emit("error",e),this.emit("end")}}get(e){
604
+ this._expectedCount=null,this._fetchedCount=0,this._results=[],this._getPage(e)}cancel(){this._canceled=!0,this.emit("end")}}function Bg({defaultOption:e,icon:t,onSelect:n,options:r,selectedOption:o,title:i}){const a=[e,...r],s=o??e,l=et("span",{className:Ze("shrink-0 flex items-center gap-x-2","text-color-text font-bold text-md"),children:[t&&et(t,{className:"w-4 h-4"}),s.display]});return et(cf,{label:l,title:i,contentClass:Ze("max-h-[min(60vh,504px)] overflow-y-auto"),children:a.map((e=>et(df,{onClick:()=>n(e),isSelected:e.value===s.value,label:e.display},e.value)))})}function $g(){const e=ws(),t=e.getFilter("user"),n=function(){const e=ws(),t=e.allAnnotations(),n=e.getFocusFilters(),r=pi(e.profile().userid),o=e.defaultAuthority(),i=e.isFeatureEnabled("client_display_names");return he((()=>{const e={};if(t.forEach((t=>{const n=pi(t.user);e[n]=Ls(t,o,i)})),n.user){const t=pi(n.user.value)||n.user.value;e[t]=n.user.display}const a=Object.keys(e).map((t=>({display:t===r?`${e[t]} (Me)`:e[t],value:t})))
605
+ ;return a.sort(((e,t)=>r===e.value?-1:r===t.value?1:e.display.localeCompare(t.display))),a}),[t,r,o,i,n.user])}();return et(Bg,{defaultOption:{value:"",display:"Everybody"},icon:Qn,onSelect:t=>e.setFilter("user",t),options:n,selectedOption:t,title:"Filter by user"})}function jg({forcedVisibleCount:e,isFiltered:t,isLoading:n,resultCount:r}){const{rootThread:o}=_g(),i=n?r:Is(o),a=o.children.length>0,s=t&&e>0,l=i-e,c=o.children.length;return et("div",{className:"flex gap-x-1 leading-none",children:[n&&et(uo,{size:"sm"}),!n&&et("h2",{className:"font-bold",children:[!a&&et("span",{children:"No results"}),a&&t&&et("span",{children:[l," ",1===l?"result":"results"]}),a&&!t&&et("span",{children:[c," ",1===c?"thread":"threads"]})]}),s&&et("h3",{className:"italic font-normal",children:["(and ",e," more)"]}),!t&&a&&et("h3",{className:"italic font-normal",children:["(",i," ",1===i?"annotation":"annotations",")"]})]})}function qg({currentPage:e,isLoading:t,onChangePage:n,threads:r,pageSize:o=25}){
606
+ const{paginatedThreads:i,totalPages:a}=he((()=>{const t=r.filter((e=>Is(e)>0)),n=(e-1)*o,i=n+o,a=Math.ceil(t.length/o);return{paginatedThreads:t.slice(n,i),totalPages:a}}),[r,e,o]);return et(x,{children:[et(Rf,{threads:i}),!t&&et(No,{currentPage:e,onChangePage:n,totalPages:a})]})}function Ug(e,t,n){return 1===e?t:n}const Gg={alt:1,ctrl:2,meta:4,shift:8};function Vg(e,t,{rootElement:n=document.documentElement??void 0}={}){const r=n=>{(function(e,t){if(!(e instanceof KeyboardEvent))return!1;const n=t.split("+").map((e=>e.toLowerCase()));let r=0,o=null;for(const e of n){const t=Gg[e];if(t)r|=t;else{if(null!==o)throw new Error("Multiple non-modifier keys specified");o=e}}if(!o)throw new Error(`Invalid shortcut: ${t}`);return((e.ctrlKey?Gg.ctrl:0)|(e.metaKey?Gg.meta:0)|(e.altKey?Gg.alt:0)|(e.shiftKey?Gg.shift:0))===r&&e.key.toLowerCase()===o})(n,e)&&t(n)};return n?(n.addEventListener("keydown",r),()=>n.removeEventListener("keydown",r)):()=>{}}function Wg(e,t,{rootElement:n}={}){ce((()=>{if(e)return Vg(e,t,{
607
+ rootElement:n})}),[e,t,n])}function Kg({hidden:e,children:t}){return et("span",{className:Ze("group-hover:inline group-focus:inline",{hidden:e}),children:t})}function Yg({type:e,collapsed:t,count:n}){const r="updates"===e?"update":"mention",o="updates"===e?"updates":"mentions",i="updates"===e?Bt:Hn;return et("div",{className:Ze("flex gap-1.5 items-center px-2 py-1","border-l first:border-l-0 border-white/60"),children:[et(i,{className:"w-em h-em"}),et("div",{className:"flex gap-1",children:[et("span",{className:"font-bold",children:n}),et(Kg,{hidden:t,children:Ug(n,r,o)})]})]})}var Xg=Ro((function({streamer:e,analytics:t,setTimeout_:n=setTimeout,clearTimeout_:r=clearTimeout}){const o=ws(),i=o.pendingUpdateCount(),a=o.pendingMentionCount(),s=o.isFeatureEnabled("at_mentions"),l=o.hasPendingUpdatesOrDeletions(),c=me((()=>{e.applyPendingUpdates(),t.trackEvent("client.realtime.apply_updates")}),[t,e]),[u,d]=se(!1),h=de(null);return Wg("l",(()=>l&&c())),ce((()=>(l?h.current=n((()=>{d(!0),h.current=null
608
+ }),5e3):d(!1),()=>h.current&&r(h.current))),[r,l,n]),l?et("div",{role:"status",className:"absolute right-0 animate-updates-notification-slide-in",children:et(kr,{onClick:c,unstyled:!0,classes:Ze("flex items-center","rounded shadow-lg bg-gray-900 text-white","group focus-visible-ring"),"data-testid":"notification","data-collapsed":u,children:[et(Yg,{type:"updates",collapsed:u,count:i}),s&&a>0&&et(Yg,{type:"mentions",collapsed:u,count:a}),et("span",{className:"sr-only",children:"load them by pressing l"})]})}):null}),["streamer","analytics"]);var Zg=Ro((function({loadAnnotationsService:e,streamer:t}){const n=ws(),r=n.getFilterValues(),o=n.focusedGroup(),i=n.forcedVisibleThreads().length,a=n.hasAppliedFilter(),s=n.isLoading(),l=n.annotationResultCount(),{rootThread:c}=_g(),u=o?.name??"…",d=o?.id||n.directLinkedGroupId(),h=de(1),[m,p]=se(1),[f,g]=se(!1),v=e=>{e instanceof Dg&&g(!0)},b=n.hasFetchedProfile();ce((()=>{b&&t.connect({applyUpdatesImmediately:!1})}),[b,t]),ce((()=>{n.setSortKey("newest"),d&&e.load({
609
+ groupId:d,sortBy:"updated",sortOrder:"desc",maxResults:5e3,onError:v,streamFilterBy:"group"})}),[e,d,n]);const y=e=>{p(e)};ce((()=>{y(1)}),[r,o]);const _=de(null);return ue((()=>{m!==h.current&&(_.current&&Ag(_.current),h.current=m)}),[m]),et("div",{className:"grid gap-2 lg:grid-cols-2","data-testid":"notebook-container",children:[et("header",{className:"leading-none lg:col-span-2",ref:_,children:et("h1",{className:"text-xl font-bold","data-testid":"notebook-group-name",children:u})}),et("div",{className:"absolute w-full z-5 left-0 lg:top-8 top-5",children:et("div",{className:Ze("container flex flex-row-reverse relative","right-[4rem]"),children:et(Xg,{})})}),et("div",{className:"justify-self-start",children:et($g,{})}),et("div",{className:"flex items-center lg:justify-self-end text-md font-medium",children:et(jg,{forcedVisibleCount:i,isFiltered:a,isLoading:s,resultCount:l??0})}),et("div",{className:"lg:col-span-2",children:[f&&et("div",{className:"py-4","data-testid":"notebook-messages",children:et(Pr,{
610
+ title:"Too many results to show",children:[et("p",{children:["This preview of the Notebook can show"," ",et("strong",{children:["up to ",5e3," results"]})," at a time (there are"," ",l," to show here)."]}),et("p",{children:[et(yo,{href:"mailto:support@hypothes.is?subject=Hypothesis%20Notebook&body=Please%20notify%20me%20when%20the%20Hypothesis%20Notebook%20is%20updated%20to%20support%20more%20than%205000%20annotations",underline:"always",children:"Contact us"})," ","if you would like to be notified when support for more annotations is available."]})]})}),et(qg,{currentPage:m,isLoading:s,onChangePage:y,threads:c.children})]})]})}),["loadAnnotationsService","streamer"]);function Jg({classes:e,children:t,onClose:n=(()=>{}),...r}){return et("div",{className:Ze("flex items-center gap-x-1 py-1 px-2 rounded","bg-green-success/10 animate-pulse-fade-out",e),onAnimationEnd:n,...r,children:[et(Mt,{className:"text-green-success w-em h-em p-[0.125em]"}),et("div",{className:"text-sm",children:t})]})}function Qg(){
611
+ const e=ws(),[t,n]=se(!1),[r,o]=se(0);if(ce((()=>{let e;return t&&(e=setTimeout((()=>{n(!1),o((e=>e+1))}),1e3)),()=>{clearTimeout(e)}}),[t]),!e.isFeatureEnabled("client_user_profile"))return null;const i=r>0&&!t;return et(lt,{"data-testid":"profile-container",classes:"overflow-hidden",children:[et("div",{className:Ze("h-12","px-3 border-b flex items-center"),children:[et("div",{className:"grow",children:et("h1",{className:"text-xl text-slate-7 font-normal",children:"Notifications"})}),et("ul",{className:"sr-only","aria-live":"polite",children:i&&et("li",{children:"Notification preferences saved"},r)}),r>0&&et(Jg,{onClose:()=>o(0),children:"Saved"},r)]}),et(at,{children:et(ht,{size:"lg",children:et(Vr,{defaultChecked:!0,disabled:t,onChange:()=>n(!0),checkedIcon:t?yr:void 0,icon:t?yr:void 0,children:"Email me a daily summary of activity in my courses"})})})]})}function ev({annotations:e,getDisplayName:t,excludeReplies:n=!1}){const r=new Map;for(const o of e){if(n&&_i(o))continue;let e=r.get(o.user);e||(e={
612
+ userid:o.user,displayName:t(o),annotations:[]},r.set(o.user,e)),e.annotations.push(o)}const o=[...r.values()];return o.sort(((e,t)=>e.displayName.localeCompare(t.displayName))),o}function tv(e){return`${e.getFullYear()}-${`${e.getMonth()+1}`.padStart(2,"0")}-${`${e.getDate()}`.padStart(2,"0")}`}function nv({documentMetadata:e,groupName:t,date:n=new Date}){const r=[tv(n)];return e?.title?r.push(function(e,t){const n=Array.from(e);return n.length<=t?e:n.slice(0,t).join("")}(e.title,50)):r.push("Hypothesis"),t&&r.push(t.replace(/ /g,"-")),r.join("-")}function rv(){return et("div",{className:"flex flex-row items-center justify-center","data-testid":"loading-spinner",children:et(uo,{size:"md"})})}function ov({userAnnotations:e}){return et("div",{className:"flex gap-x-2",children:[e.displayName,et("div",{className:"rounded px-1 bg-grey-7 text-white",children:e.annotations.length})]})}const iv=[{value:"json",title:"JSON",description:"For import into another Hypothesis group or document"},{value:"txt",
613
+ title:"Plain text (TXT)",shortTitle:"Text",description:"For import into word processors as plain text"},{value:"html",title:"Rich text (HTML)",shortTitle:"HTML",description:"For import into word processors as rich text"},{value:"csv",title:"Table (CSV)",shortTitle:"CSV",description:"For import into a spreadsheet"}];var av=Ro((function({annotationsExporter:e,toastMessenger:t}){const n=ws(),r=n.focusedGroup(),o=r&&!n.isLoading(),i=n.defaultContentFrame(),a=n.savedAnnotations(),s=n.defaultAuthority(),l=n.isFeatureEnabled("client_display_names"),c=me((e=>Ls(e,s,l)),[s,l]),u=he((()=>ev({annotations:a,getDisplayName:c})),[a,c]),d=n.profile(),h=d.userid,m=he((()=>({annotations:a,displayName:"All annotations"})),[a]),[p,f]=se(h),g=he((()=>u.find((e=>e.userid===p))??m),[m,p,u]),[v,b]=se(iv[0]),y=fe(),_=fe(),w=n.countDrafts(),k=he((()=>nv({documentMetadata:i?.metadata,groupName:r?.name})),[i,r]),[N,S]=se(),A=me(((t,n)=>{const o=g?.annotations??a;switch(t){case"json":{const t=e.buildJSONExportContent(o,{profile:d})
614
+ ;return JSON.stringify(t,null,2)}case"txt":return e.buildTextExportContent(o,{groupName:r?.name,defaultAuthority:s,displayNamesEnabled:l});case"csv":return e.buildCSVExportContent(o,{separator:"file"===n?",":"\t",groupName:r?.name,defaultAuthority:s,displayNamesEnabled:l});case"html":return e.buildHTMLExportContent(o,{groupName:r?.name,defaultAuthority:s,displayNamesEnabled:l});default:throw new Error(`Invalid format: ${t}`)}}),[e,s,l,a,r?.name,d,g?.annotations]),E=me((e=>{e.preventDefault();try{const e=v.value,t=`${N??k}.${e}`,n=A(e,"file"),r=function(e){return{json:"application/json",txt:"text/plain",csv:"text/csv",html:"text/html"}[e]}(e);!function(e,t,n,r=document){const o=new Blob([e],{type:t}),i=URL.createObjectURL(o),a=r.createElement("a");a.setAttribute("href",i),a.setAttribute("download",n),a.style.visibility="hidden",r.body.appendChild(a),a.click(),r.body.removeChild(a),URL.revokeObjectURL(i)}(n,r,t)}catch(e){t.error(`Exporting annotations failed: ${e.message}`,{autoDismiss:!1})}
615
+ }),[A,N,k,v.value,t]),T=me((async()=>{const e=v.value,n=A(e,"clipboard");try{"html"===e?await async function(e,t=navigator,n=document){const r=["text/html","text/plain"];if(t.clipboard.write){const n=r.reduce(((t,n)=>(t[n]=new Blob([e],{type:n}),t)),{});await t.clipboard.write([new ClipboardItem(n)])}else{const t=t=>{r.forEach((n=>t.clipboardData?.setData(n,e))),t.preventDefault()};n.addEventListener("copy",t);try{n.execCommand("copy")}finally{n.removeEventListener("copy",t)}}}(n):await js(n),t.success("Annotations copied")}catch(e){t.error(`Copying annotations failed: ${e.message}`,{autoDismiss:!1})}}),[A,v.value,t]);return o?et("form",{className:"space-y-3",onSubmit:E,"data-testid":"export-form",children:[a.length>0?et(x,{children:[et("p",{className:"text-color-text-light",children:[et(yo,{variant:"text-light",underline:"always",href:"https://web.hypothes.is/help/exporting-and-importing-annotations-in-the-hypothesis-web-app/",target:"_blank",children:"Learn more"
616
+ })," ","about copying and exporting annotations."]}),et("div",{className:"flex flex-col gap-y-3",children:[et("label",{htmlFor:_,className:"font-medium",children:["Select which user","'","s annotations to export:"]}),et(lo,{value:p,onChange:f,buttonId:_,buttonContent:et(ov,{userAnnotations:g}),"data-testid":"user-select",children:[et(lo.Option,{value:void 0,children:et(ov,{userAnnotations:m})}),u.map((e=>et(lo.Option,{value:e.userid,children:et(ov,{userAnnotations:e})},e.userid)))]}),et("label",{"data-testid":"export-count",htmlFor:y,className:"font-medium",children:"Name of export file:"}),et("div",{className:"flex",children:[et(Yr,{classes:"grow","data-testid":"export-filename",id:y,defaultValue:k,value:N,onChange:e=>S(e.target.value),required:!0,maxLength:250}),et("div",{className:"grow-0 ml-2 min-w-[5rem]",children:et(lo,{"aria-label":"Export format",value:v,onChange:b,buttonContent:v.shortTitle??v.title,"data-testid":"export-format-select",alignListbox:"right",listboxOverflow:"wrap",
617
+ children:iv.map((e=>et(lo.Option,{value:e,children:et("div",{className:"flex-col gap-y-2",children:[et("div",{className:"font-bold","data-testid":"format-name",children:e.title}),et("div",{"data-testid":"format-description",children:e.description})]})},e.value)))})})]})]})]}):et("p",{"data-testid":"no-annotations-message",children:"There are no annotations available for export."}),w>0&&et("p",{"data-testid":"drafts-message",children:["You have ",w," unsaved"," ",Ug(w,"draft","drafts"),a.length>0&&et(x,{children:" that will not be included"}),"."]}),et(ut,{children:[et(kr,{"data-testid":"copy-button",icon:Ft,onClick:T,disabled:0===a.length,children:"Copy to clipboard"}),et(kr,{"data-testid":"export-button",variant:"primary",disabled:0===a.length,type:"submit",children:"Export"})]})]}):et(rv,{})}),["annotationsExporter","toastMessenger"]);function sv(e,t=new FileReader){const{promise:n,resolve:r,reject:o}=function(){let e,t;return{promise:new Promise(((n,r)=>{e=n,t=r})),resolve:e,reject:t}}()
618
+ ;return t.addEventListener("loadend",(e=>{try{const t=e.target?.result?.toString()??"",n=JSON.parse(t);r(n)}catch(e){o(e)}})),t.readAsText(e),n}function lv({size:e,value:t}){const n=e-4,r=Math.PI*n;return et("span",{className:"text-grey-3",role:"progressbar","aria-valuenow":t,style:{width:`${e}px`,height:`${e}px`,transform:"rotate(-90deg)"},children:et("svg",{viewBox:`0 0 ${e} ${e}`,children:et("circle",{cx:e/2,cy:e/2,r:n/2,fill:"none",stroke:"currentColor","stroke-width":2,style:{strokeDasharray:r,strokeDashoffset:r-r*(t/100)+"px",transitionDuration:"300ms",transitionProperty:"stroke-dashoffset"}})})})}function cv({onFileSelected:e,disabled:t,id:n}){const r=de(null),[o,i]=se(null);return et(kr,{variant:"custom",classes:Ze("w-full relative overflow-hidden border rounded","bg-grey-0 hover:bg-grey-0"),title:o?`${o}, Select a file`:"Select a file",onClick:()=>r.current?.click(),disabled:t,"data-testid":"file-input-proxy-button",children:[et("input",{ref:r,accept:".json",id:n,type:"file",disabled:t,
619
+ className:"invisible absolute w-0 h-0","aria-hidden":!0,"data-testid":"file-input",onChange:t=>{const n=t.target.files;i(n?.[0]?.name??null),null!==n&&n.length>0&&e(n[0])}}),et("div",{className:"max-w-full pr-10 truncate","data-testid":"filename-container",children:o??"Select a file"}),et("div",{className:"absolute right-0 h-full p-2 border-l bg-grey-2",children:et(on,{})})]})}var uv=Ro((function({importAnnotationsService:e}){const[t,n]=se(null),[r,o]=se(null),[i,a]=se(null),s=ws(),l=s.profile().userid,c=s.defaultAuthority(),u=s.isFeatureEnabled("client_display_names"),d=me((e=>Ls(e,c,u)),[c,u]),h=he((()=>r?ev({annotations:r,getDisplayName:d,excludeReplies:!0}):null),[r,d]),[m,p]=se(null),f=he((()=>h?.find((e=>e.userid===m))??null),[m,h]);let g;ce((()=>{l&&t&&(o(null),a(null),p(null),async function(e){let t;try{t=await sv(e)}catch{throw new Error("Not a valid JSON file")}if(null===(n=t)||"object"!=typeof n||!Array.isArray(t.annotations))throw new Error("Not a valid Hypothesis JSON file");var n
620
+ ;return t.annotations}(t).then((e=>{o(e);const t=e.some((e=>e.user===l));p(t?l:null)})).catch((e=>{a(e.message)})))}),[l,t]),f&&(g=async()=>{e.import(f.annotations)});const v=fe(),b=fe();if(!l)return et("p",{"data-testid":"log-in-message",children:"You must log in to import annotations."});const y=Boolean(s.focusedGroup()&&s.defaultContentFrame()&&s.hasFetchedAnnotations()&&!s.isFetchingAnnotations()&&g),_=t&&!r&&!i,w=s.importsPending(),k=s.importsTotal(),N=k-w,S=_||w>0,A=w>0?Math.round(N/k*100):null;return et(x,{children:[et("p",{className:"text-color-text-light mb-3",children:[et(yo,{variant:"text-light",underline:"always",href:"https://web.hypothes.is/help/exporting-and-importing-annotations/",target:"_blank",children:"Learn more"})," ","about importing annotations."]}),et("label",{htmlFor:v,className:"font-medium",children:"Select Hypothesis export file:"}),et(cv,{onFileSelected:n,disabled:S,id:v}),h&&et(x,{children:[et("label",{htmlFor:b,className:"block font-medium",
621
+ children:"Select which user's annotations to import:"}),et(lo,{value:f,onChange:e=>p(e?.userid??null),buttonId:b,buttonContent:f?et(ov,{userAnnotations:f}):et("span",{className:"text-grey-6",children:"Select a user..."}),children:h.map((e=>et(lo.Option,{value:e,children:et(ov,{userAnnotations:e})},e.userid)))})]}),i&&et("p",{"data-testid":"error-info",children:[et("b",{children:"Unable to find annotations to import:"})," ",i]}),et(ut,{children:[null!==A&&et("span",{"data-testid":"progress-text",className:"text-grey-6",children:[A,"% complete"]}),et(kr,{"data-testid":"import-button",disabled:!y||S,onClick:g,variant:"primary",children:[null!==A&&et(lv,{size:22,value:A}),"Import"]})]})]})}),["importAnnotationsService"]);var dv=Ro((function({toastMessenger:e}){const t=ws(),n=t.mainFrame(),r=t.focusedGroup(),o=r&&n,i=o&&(a=n.uri,s=r.id,Os(a)?`https://hyp.is/go?url=${encodeURIComponent(a)}&group=${s}`:null);var a,s;const l=me((async()=>{try{i&&(await js(i),e.success("Copied share link to clipboard"))}catch{
622
+ e.error("Unable to copy link")}}),[i,e]);return o?et("div",{className:"text-color-text-light space-y-3",children:i?et(x,{children:[et("div",{className:"text-color-text font-medium","data-testid":"sharing-intro",children:"private"===r.type?et("p",{children:"Use this link to share these annotations with other group members:"}):et("p",{children:"Use this link to share these annotations with anyone:"})}),et("div",{children:et(Ar,{children:[et(Yr,{"aria-label":"Use this URL to share these annotations",type:"text",value:i,readOnly:!0}),et(Tr,{icon:Ft,onClick:l,title:"Copy share link",variant:"dark"})]})}),et("p",{"data-testid":"sharing-details",children:["private"===r.type?et("span",{children:["Annotations in the private group ",et("em",{children:r.name})," ","are only visible to group members."]}):et("span",{children:["Anyone using this link may view the annotations in the group"," ",et("em",{children:r.name}),"."]})," ",et("span",{children:["Private (",et(Rn,{className:"inline w-[14px] h-[14px] -mt-0.5"
623
+ })," ",et("em",{children:"Only Me"}),") annotations are only visible to you."]})]}),et("div",{className:"text-[24px]",children:et(Gs,{shareURI:i})})]}):et("p",{"data-testid":"no-sharing",children:"These annotations cannot be shared because this document is not available on the web."})}):et(rv,{})}),["toastMessenger"]);function hv({shareTab:e}){const t=ws().focusedGroup(),n=t&&t.name||"...",r=`Share Annotations in ${n}`,o=e?"share":"export",[i,a]=se(o),s=i===o;return et(Eg,{title:r,panelName:"shareGroupAnnotations",variant:"custom",children:[et(zg,{closeTitle:"Close share panel",children:[e&&et(Ao,{id:"share-panel-tab","aria-controls":"share-panel",variant:"tab",selected:"share"===i,onClick:()=>a("share"),textContent:"Share",children:"Share"}),et(Ao,{id:"export-panel-tab","aria-controls":"export-panel",variant:"tab",selected:"export"===i,onClick:()=>a("export"),textContent:"Export",children:"Export"}),et(Ao,{id:"import-panel-tab","aria-controls":"import-panel",variant:"tab",selected:"import"===i,
624
+ onClick:()=>a("import"),textContent:"Import",children:"Import"})]}),et(lt,{classes:Ze({"rounded-tl-none":s}),children:[et(Lg,{id:"share-panel",active:"share"===i,"aria-labelledby":"share-panel-tab",title:r,children:et(dv,{})}),et(Lg,{id:"export-panel",active:"export"===i,"aria-labelledby":"export-panel-tab",title:`Export from ${n}`,children:et(av,{})}),et(Lg,{id:"import-panel",active:"import"===i,"aria-labelledby":"import-panel-tab",title:`Import into ${n}`,children:et(uv,{})})]})]})}function mv({onLogin:e}){const t=ws();return et("div",{className:"flex flex-col items-center m-6 space-y-6",children:[et("span",{className:"text-center",children:["This is a public annotation created with Hypothesis. ",et("br",{}),"To reply or make your own annotations on this document,"," ",et(yo,{variant:"text",href:t.getLink("signup"),target:"_blank",underline:"always",children:"create a free account"})," ","or"," ",et(wo,{inline:!0,variant:"text",onClick:e,underline:"always",children:"log in"}),"."]}),et("div",{
625
+ children:et(yo,{href:"https://hypothes.is","aria-label":"Hypothesis homepage",target:"_blank",title:"Hypothesis homepage",underline:"none",variant:"custom",children:et(Dn,{className:"w-16 h-16 text-grey-7"})})})]})}function pv({onLogin:e,onSignUp:t}){return ws().isLoggedIn()?null:et(Eg,{icon:sr,title:"Login needed",panelName:"loginPrompt",children:[et("p",{children:"Please log in to create annotations or highlights."}),et(ut,{children:[et(kr,{title:"Sign up",onClick:t,children:"Sign up"}),et(kr,{title:"Log in",variant:"primary",onClick:e,children:"Log in"})]})]})}const fv=e=>`${e}-tab`,gv=e=>`${e}-panel`;function vv({children:e,count:t,isWaitingToAnchor:n,isSelected:r,label:o,onSelect:i,name:a}){const s=()=>{r||i()},l=t>0?`${o} (${t} available)`:o;return et(wo,{classes:Ze("bg-transparent min-w-[5.25rem]",{"font-bold":r}),variant:"text",onClick:s,onMouseDown:s,pressed:!!r,role:"tab",id:fv(a),"aria-controls":gv(a),tabIndex:0,title:l,underline:"none",children:et(x,{children:[e,t>0&&!n&&et("span",{
626
+ className:"relative bottom-[3px] left-[2px] text-[10px]",children:t})]})})}var bv=Ro((function({annotationsService:e,isLoading:t,settings:n}){const{rootThread:r,tabCounts:o}=_g(),i=ws(),a=i.selectedTab(),s=o.note,l=o.annotation,c=o.orphan,u=i.isWaitingToAnchorAnnotations(),d=e=>{i.selectTab(e)},h="annotation"===a&&0===l&&!u,m="note"===a&&0===s,p=[];if(l>0){const e=Ug(l,"annotation","annotations");p.push(`${l} ${e}`)}if(s>0){const e=Ug(s,"note","notes");p.push(`${s} ${e}`)}if(c>0){const e=Ug(s,"orphan","orphans");p.push(`${c} ${e}`)}return et(x,{children:[et("div",{"aria-live":"polite",role:"status",className:"sr-only",children:p.join(", ")}),et("div",{className:Ze("space-y-3 pb-[9px]"),children:[et("div",{className:"flex gap-x-6 theme-clean:ml-[15px] mt-1",role:"tablist",children:[et(vv,{count:l,isWaitingToAnchor:u,isSelected:"annotation"===a,label:"Annotations",name:"annotation",onSelect:()=>d("annotation"),children:"Annotations"}),et(vv,{count:s,isWaitingToAnchor:u,isSelected:"note"===a,label:"Page notes",
627
+ name:"note",onSelect:()=>d("note"),children:"Page Notes"}),c>0&&et(vv,{count:c,isWaitingToAnchor:u,isSelected:"orphan"===a,label:"Orphans",name:"orphan",onSelect:()=>d("orphan"),children:"Orphans"})]}),et("div",{className:"space-y-3",role:"tabpanel",id:gv(a),"aria-labelledby":fv(a),children:["note"===a&&n.enableExperimentalNewNoteButton&&et("div",{className:"flex justify-end",children:et(kr,{"data-testid":"new-note-button",onClick:()=>e.createPageNote(),variant:"primary",style:Lo(["ctaBackgroundColor"],n),children:[et(Wn,{}),"New note"]})}),!t&&m&&et(lt,{"data-testid":"notes-unavailable-message",variant:"flat",children:et(ht,{classes:"text-center",children:"There are no page notes in this group."})}),!t&&h&&et(lt,{"data-testid":"annotations-unavailable-message",variant:"flat",children:et(ht,{classes:"text-center !space-y-1",children:[et("p",{children:"There are no annotations in this group."}),et("p",{children:["Create one by selecting some text and clicking the"," ",et(pt,{
628
+ className:"w-em h-em inline m-0.5 -mt-0.5",title:"Annotate"})," ","button."]})]})}),et(Rf,{threads:r.children})]})]})]})}),["annotationsService","settings"]);function yv({label:e,icon:t,description:n,active:r,disabled:o=!1,setActive:i,testId:a}){return et(kr,{"data-testid":a,classes:Ze({"font-medium rounded-lg py-1":!0,"text-grey-7 bg-grey-2":!r,"text-grey-1 bg-grey-7":r,"opacity-50":o}),disabled:o,onClick:()=>i(!r),pressed:r,variant:"custom",title:n,children:[t&&et(t,{className:"w-em h-em"}),et("span",{className:"max-w-36 truncate",children:e}),et("div",{className:Ze({"h-[2em] w-[1.5px] -mt-1 -mb-1":!0,"bg-grey-3":!r,"bg-grey-5":r})}),et(r?Gn:Wn,{className:"w-em h-em"})]})}function _v({children:e}){return et("div",{className:"mb-3",children:et(lt,{children:et(ht,{children:e})})})}function wv({withCardContainer:e=!1}){const t=ws(),n=t.selectedAnnotations().length,r=n>0,o=t.getFocusActive(),i=t.getFocusFilters(),a=Object.keys(i).length>0;if(!(r||a))return null;return et(e?_v:x,{children:et("div",{
629
+ className:"flex flex-row flex-wrap gap-2 items-center","data-testid":"filter-controls",children:[et("b",{children:"Filters"}),r&&et(yv,{label:`${n} selected`,description:`Show ${n} selected annotations`,active:!0,setActive:()=>t.clearSelection(),testId:"selection-toggle"}),i.user&&et(yv,{icon:Qn,label:`By ${i.user.display}`,description:`Show annotations by ${i.user.display}`,active:o.has("user"),disabled:r,setActive:()=>t.toggleFocusMode({key:"user"}),testId:"user-focus-toggle"}),i.page&&et(yv,{icon:on,label:`Pages ${i.page.display}`,description:`Show annotations on pages ${i.page.display}`,active:o.has("page"),disabled:r,setActive:()=>t.toggleFocusMode({key:"page"}),testId:"page-focus-toggle"}),i.cfi&&et(yv,{icon:on,label:"Selected chapter",description:"Show annotations on selected book chapter(s)",active:o.has("cfi"),disabled:r,setActive:()=>t.toggleFocusMode({key:"cfi"}),testId:"cfi-focus-toggle"})]})})}var xv=Ro((function({frameSync:e,onLogin:t,onSignUp:n,loadAnnotationsService:r,streamer:o}){
630
+ const i=ws(),a=i.focusedGroupId(),s=i.isLoading(),l=i.isLoggedIn(),c=i.directLinkedAnnotationId(),u=c?i.findAnnotationByID(c):void 0,d=u?mg(u):"annotation",h=i.searchUris(),m=i.hasSidebarOpened(),p=i.profile().userid,f=!(s||!c)&&!u,g=i.directLinkedGroupFetchFailed(),v=f||g,b=i.isSidebarPanelOpen("searchAnnotations"),y=!v&&!b,_=c&&!l&&!f&&!s,w=de(a);ce((()=>{if(!w.current||w.current!==a){if(w.current){const e=i.focusState().active;i.clearSelection(),e&&i.toggleFocusMode({active:!0})}w.current=a}a&&h.length&&r.load({groupId:a,uris:h})}),[i,r,a,p,h]),ce((()=>{u&&!1===u.$orphan?(e.hoverAnnotation(u),e.scrollToAnnotation(u),i.selectTab(d)):u&&i.selectTab(d)}),[d,e,u,i]);const x=i.hasFetchedProfile();return ce((()=>{x&&(m||l)&&o.connect({applyUpdatesImmediately:!1})}),[x,l,m,o]),et("div",{className:"relative",children:[et("h2",{className:"sr-only",children:"Annotations"}),et("div",{className:Ze("fixed z-10","right-[9px] top-12"),children:et(Xg,{})}),y&&et(wv,{withCardContainer:!0}),et(pv,{onLogin:t,onSignUp:n
631
+ }),f&&et(xs,{errorType:"annotation",onLoginRequest:t,showClearSelection:!0}),g&&et(xs,{errorType:"group",onLoginRequest:t}),!v&&et(bv,{isLoading:s}),_&&et(mv,{onLogin:t})]})}),["frameSync","loadAnnotationsService","streamer"]);var kv=Ro((function({api:e,toastMessenger:t}){const n=ws(),r=n.routeParams().q,o=me((async t=>{const r={_separate_replies:!0,offset:0,limit:20,...hg(t)};try{n.annotationFetchStarted();const t=await e.search(r);n.addAnnotations([...t.rows,...t.replies])}finally{n.annotationFetchFinished()}}),[e,n]);ce((()=>{n.setSortKey("newest"),n.clearAnnotations(),o(r??"").catch((e=>{t.error(`Unable to fetch annotations: ${e.message}`)}))}),[r,o,n,t]);const{rootThread:i}=_g();return et(Rf,{threads:i.children})}),["api","toastMessenger"]);var Nv=Ro((function({toastMessenger:e}){const t=ws().getToastMessages();return et("div",{className:Ze("z-10","absolute left-0 w-full"),children:et(vo,{messages:t,onMessageDismiss:t=>e.dismiss(t),transitionClasses:{
632
+ transitionIn:"motion-safe:animate-slide-in-from-right lg:animate-fade-in motion-reduce:animate-fade-in"}})})}),["toastMessenger"]);function Sv(e){return e.organization&&e.organization.name}const Av="__default__";function Ev(e){const t={};return e.forEach((e=>{if("object"!=typeof e.organization)return;const n=(r=e.organization).id===Av?Av:`${r.name.toLowerCase()}${r.id}`;var r;void 0===t[n]&&(t[n]={...e.organization,groups:[]}),function(e,t){const n=Object.assign({},e),r=t.groups;!r.length&&e.organization.logo&&(n.logo=e.organization.logo),r.push(n)}(e,t[n])})),t}function Tv(e){const t=Ev(e),n=[],r=[];return Object.keys(t).sort().forEach((e=>{e===Av?n.push(...t[e].groups):r.push(...t[e].groups)})),n.length&&r.push(...n),r}function Cv({heading:e,children:t}){return et(x,{children:[e&&et("h2",{className:"text-color-text-light p-3 leading-none uppercase",children:e}),et("ul",{className:"border-b",children:M(t).map((e=>et("li",{children:e},e.key)))})]})}function Mv({type:e}){return et("div",{
633
+ className:"text-color-text-light",title:"open"===e?"Public group":"restricted"===e?"Restricted group":"Private group","data-testid":"group-icon",children:["open"===e&&et(dn,{}),"restricted"===e&&et(mn,{}),"private"===e&&et(Rn,{})]})}var Iv=Ro((function({isExpanded:e,group:t,groups:n,onExpand:r,toastMessenger:o}){const i=t.links.html,a=i||t.canLeave,s=t.scopes&&!t.scopes.enforced||t.isScopedToUri,l=ws(),c=l.focusedGroupId(),u=t.id===c,d=t=>{t.stopPropagation(),t.preventDefault(),r(!e)},h="private"===t.type?"Copy invite link":"Copy activity link",m=t.logo?et("img",{className:"w-4 h-4",alt:Sv(t),src:t.logo}):et("span",{className:"sr-only",children:Sv(t)});return et(df,{isDisabled:!s,isExpanded:!!a&&e,isSelected:u,isSubmenuVisible:a?e:void 0,label:et("div",{className:"grow flex items-center justify-between gap-x-2",children:[t.name,et(Mv,{type:t.type})]}),leftChannelContent:m,onClick:s?()=>{l.clearDirectLinkedGroupFetchFailed(),l.clearDirectLinkedIds(),n.focus(t.id)}:d,onToggleSubmenu:d,
634
+ submenuToggleTitle:`Show actions for ${t.name}`,submenu:et(x,{children:[et("ul",{children:[i&&et("li",{children:et(df,{href:i,icon:nn,isSubmenuItem:!0,label:"View group activity"})}),i&&et("li",{children:et(df,{onClick:()=>(async e=>{try{await js(e),o.success(`Copied link for "${t.name}"`)}catch{o.error("Unable to copy link")}})(i),icon:Ft,isSubmenuItem:!0,label:h})}),t.canLeave&&et("li",{children:et(df,{icon:En,isSubmenuItem:!0,label:"Leave group",onClick:async()=>{const e=`Are you sure you want to leave the group "${t.name}"?`;await jr({title:"Leave group?",message:e,confirmAction:"Leave"})&&n.leave(t.id)}})})]}),!s&&et("p",{className:Ze("p-2 pl-9 bg-grey-1 hyphens-none"),"data-testid":"unselectable-group-note",children:"This group is restricted to specific URLs."})]})})}),["groups","toastMessenger"]);function zv({expandedGroup:e,onExpandGroup:t,groups:n,heading:r}){return et(Cv,{heading:r,children:n.map((n=>et(Iv,{isExpanded:n===e,onExpand:e=>t(e?n:null),group:n},n.id)))})}
635
+ var Lv=Ro((function({settings:e}){const t=ws(),n=t.getCurrentlyViewingGroups(),r=t.getFeaturedGroups(),o=t.getMyGroups(),i=t.focusedGroup(),a=t.profile().userid,s=t.importsPending()>0,l=he((()=>Tv(o)),[o]),c=he((()=>Tv(r)),[r]),u=he((()=>Tv(n)),[n]),d=t.defaultAuthority(),h=a&&!fi(a,d),m=t.getLink("groups.new"),[p,f]=se(null);let g;if(i){const t=i.organization.logo||function(e){const t=Mo(e);return t&&t.icon?t.icon:null}(e)||"",n=Sv(i)?Sv(i):"";g=et("span",{className:Ze("py-1"),children:et("span",{className:Ze("shrink-0 flex items-center gap-x-1 text-md text-color-text font-bold"),children:[t&&et("img",{className:Ze("relative top-[1px] w-4 h-4"),src:t,alt:n}),i.name]})})}else g=et("span",{children:"…"});return!!Io(e)&&n.length+r.length+o.length<2?g:et(cf,{align:"left",contentClass:"min-w-[250px]",disabled:s,label:g,onOpenChanged:()=>f(null),title:i?`Select group (now viewing: ${i.name})`:"Select group",children:[u.length>0&&et(zv,{expandedGroup:p,onExpandGroup:f,heading:"Currently Viewing",groups:u
636
+ }),c.length>0&&et(zv,{expandedGroup:p,onExpandGroup:f,heading:"Featured Groups",groups:c}),l.length>0&&et(zv,{expandedGroup:p,onExpandGroup:f,heading:"My Groups",groups:l}),h&&et(df,{icon:Wn,href:m,label:"Create new group"})]})}),["settings"]);const Ov={newest:"Newest",oldest:"Oldest",location:"Location"};function Rv(){const e=ws(),t=e.sortKey(),n=e.sortKeys().map((n=>et(df,{label:Ov[n],onClick:()=>e.setSortKey(n),isSelected:n===t},n))),r=et("span",{className:"p-1",children:et(vr,{})});return et("div",{"data-component":"SortMenu",children:et(cf,{label:r,title:`Sort by ${t}`,align:"right",menuIndicator:!1,children:n})})}function Pv({classes:e,...t}){return et(Tr,{...t,classes:Ze(e,"border border-transparent","aria-pressed:border-grey-3 aria-pressed:bg-grey-1")})}function Dv(e){return et(Pv,{size:"custom",classes:"touch:min-w-touch-minimum p-1",...e})}var Fv=Ro((function({dashboard:e,isMenuOpen:t,toastMessenger:n}){const[r,o]=se(),i=!r,a=me((()=>{
637
+ "string"!=typeof r?r&&n.error("Can't open dashboard: You must reload the page.",{autoDismiss:!1}):e.open(r)}),[r,e,n]);return ce((()=>(t&&e.getAuthToken().then(o).catch((e=>{console.warn("An error occurred while getting auth token",e),o(e)})),()=>o(void 0))),[e,t]),et(df,{label:"Open dashboard",isDisabled:i,onClick:a})}),["dashboard","toastMessenger"]);var Hv=Ro((function({frameSync:e,onLogout:t,settings:n}){const r=ws(),o=r.defaultAuthority(),i=r.profile(),a=fi(i.userid,o),s=Mo(n),l=pi(i.userid),c=i.user_info?.display_name??l,[u,d]=se(!1),h=e=>s&&!!s[e],m=!a||h("onProfileRequestProvided"),p=!a||h("onLogoutRequestProvided"),f=r.importsPending()>0,g=r.isFeatureEnabled("client_user_profile"),v=()=>{const t=r.focusedGroupId();t&&e.notifyHost("openNotebook",t)},b=()=>e.notifyHost("openProfile"),y=m&&!a?r.getLink("user",{user:l}):void 0,_=et("span",{className:"p-1",children:et(Qn,{})});return et("div",{"data-testid":"user-menu",onKeyDown:e=>{"n"===e.key?(v(),d(!1)):g&&"p"===e.key&&(b(),d(!1))},children:et(cf,{
638
+ label:_,title:c,align:"right",open:u,onOpenChanged:d,children:[et(Cv,{children:[et(df,{label:c,isDisabled:!m,href:y,onClick:m?()=>a&&e.notifyHost("profileRequested"):void 0}),!a&&et(df,{label:"Account settings",href:r.getLink("account.settings")}),g&&et(df,{label:"Your profile",onClick:()=>b()}),et(df,{label:"Open notebook",onClick:()=>v()})]}),n.dashboard?.showEntryPoint&&et(Cv,{children:et(Fv,{isMenuOpen:u})}),p&&et(Cv,{children:et(df,{isDisabled:f,label:"Log out",onClick:t})})]})})}),["frameSync","settings"]);function Bv(){const e=ws(),t=e.isLoading(),n=e.isSidebarPanelOpen("searchAnnotations"),r=me((()=>{e.toggleSidebarPanel("searchAnnotations")}),[e]);return function(e){const t=de(null),n=me((n=>{!n.metaKey&&!n.ctrlKey&&n.target instanceof HTMLElement&&["INPUT","TEXTAREA"].includes(n.target.tagName)||(t.current=document.activeElement,e.isSidebarPanelOpen("searchAnnotations")||(e.openSidebarPanel("searchAnnotations"),n.preventDefault(),n.stopPropagation()))}),[e]),r=Bs()?"meta":"ctrl";Wg("/",n),
639
+ Wg(`${r}+k`,n)}(e),et(x,{children:[t&&et(uo,{}),!t&&et(Dv,{icon:cr,expanded:n,pressed:n,onClick:r,title:"Search annotations"})]})}function $v({classes:e,disabled:t=!1,inputRef:n,onClearSearch:r,onKeyDown:o,onSearch:i,query:a}){const s=ws().isLoading(),l=Le(n),[c,u]=se(a),[d,h]=se(a);Wg("/",(e=>{document.activeElement!==l.current&&(e.preventDefault(),l.current?.focus())}));return a!==c&&(h(a),u(a)),et("form",{name:"searchForm",onSubmit:e=>{e.preventDefault(),(l.current?.value||c)&&i(l.current?.value??"")},className:Ze("space-y-3",e),children:et("div",{className:"relative",children:[et(Tr,{classes:"absolute left-0 text-[16px] top-[50%] translate-y-[-50%]",icon:cr,size:"lg",title:"Search",type:"submit",disabled:t}),et(Yr,{"aria-label":"Search annotations",classes:Ze("pl-8 pr-8","disabled:text-grey-6","text-base touch:text-touch-base"),"data-testid":"search-input",dir:"auto",name:"query",placeholder:s?"Loading…":"Search annotations…",disabled:t||s,elementRef:l,value:d||"",onInput:e=>h(e.target.value),onKeyDown:o
640
+ }),d&&et(Tr,{classes:"absolute right-0 text-[16px] top-[50%] translate-y-[-50%]",size:"lg",icon:_t,"data-testid":"clear-button",title:"Clear search",onClick:r,disabled:t})]})})}var jv=Ro((function({router:e}){const t=ws(),{q:n}=t.routeParams(),r=t=>{e.navigate("stream",{q:t})};return et($v,{query:n??"",onSearch:r,onClearSearch:()=>r("")})}),["router"]);function qv(e,t){const n=Mo(e);if(!n)return!0;switch(t){case"share":return n.enableShareImportExportPanel??!0;case"account":return n.enableAccountMenu??!0;case"help":return n.enableHelpPanel??!0;default:return!0}}var Uv=Ro((function({isSidebar:e,onLogin:t,onLogout:n,onSignUp:r,frameSync:o,settings:i}){const a=Lo(["accentColor"],i),s=ws(),l=s.isLoggedIn(),c=s.hasFetchedProfile(),u=s.isSidebarPanelOpen("help"),d=s.isSidebarPanelOpen("shareGroupAnnotations");return et("div",{className:Ze("absolute h-10 left-0 top-0 right-0 z-4","text-grey-7 border-b theme-clean:border-b-0 bg-white"),"data-testid":"top-bar",children:et("div",{
641
+ className:Ze("container flex items-center h-full","text-[16px]"),"data-testid":"top-bar-content",children:[et(e?Lv:jv,{}),et("div",{className:"grow flex items-center justify-end",children:[e&&et(x,{children:[et(Bv,{}),et(Rv,{}),qv(i,"share")&&et(Dv,{icon:dr,expanded:d,pressed:d,onClick:()=>{s.toggleSidebarPanel("shareGroupAnnotations")},title:"Share annotations on this page","data-testid":"share-icon-button"})]}),qv(i,"help")&&et(Dv,{icon:vn,expanded:u,pressed:u,onClick:()=>{const e=Mo(i);e&&e.onHelpRequestProvided?o.notifyHost("helpRequested"):s.toggleSidebarPanel("help")},title:"Help","data-testid":"help-icon-button"}),l?qv(i,"account")&&et(Hv,{onLogout:n}):et("div",{className:"flex items-center text-md font-medium space-x-1 pl-1","data-testid":"login-links",children:[!l&&!c&&et("span",{children:"⋯"}),!l&&c&&et(x,{children:[et(wo,{classes:"inline",onClick:r,style:a,underline:"none",children:"Sign up"}),et("div",{children:"/"}),et(wo,{classes:"inline",onClick:t,style:a,underline:"none",children:"Log in"})]
642
+ })]})]})]})})}),["frameSync","settings"]);function Gv(){const e=ws(),t=e.filterQuery(),n=de(null),r=e.hasSelectedAnnotations(),o=()=>{e.closeSidebarPanel("searchAnnotations")};return et(Eg,{panelName:"searchAnnotations",variant:"custom",title:"Search annotations",initialFocus:n,onActiveChanged:t=>{t||e.setFilterQuery(null)},children:et(lt,{children:et(ht,{children:[et("div",{className:"flex gap-x-3",children:et($v,{inputRef:n,classes:"grow",disabled:r,query:t||null,onClearSearch:o,onSearch:e.setFilterQuery,onKeyDown:e=>{"Escape"===e.key&&o()}})}),et(wv,{})]})})})}var Vv=Ro((function({auth:e,frameSync:t,settings:n,session:r,toastMessenger:o}){const i=ws(),a=i.profile(),s=i.route(),l="notebook"===s||"profile"===s,c=he((()=>Lo(["appBackgroundColor"],n)),[n]),u="clean"===n.theme,d="sidebar"===s;ce((()=>{(function(e,t,n){if(!e)return!1;if("object"!=typeof t.preferences||!t.preferences.show_sidebar_tutorial)return!1;const r=Mo(n);return!r?.onHelpRequestProvided&&!1!==r?.enableHelpPanel
643
+ })(d,a,n)&&i.openSidebarPanel("help")}),[d,a,n,i]);const h=Io(n),m=async()=>{if(Mo(n))t.notifyHost("loginRequested");else try{await e.login(),i.closeSidebarPanel("loginPrompt"),i.clearGroups(),r.reload()}catch(e){o.error(e.message)}},p=()=>{Mo(n)?t.notifyHost("signupRequested"):window.open(i.getLink("signup"))};return et("div",{className:Ze("h-full min-h-full overflow-auto","lg:pb-16 bg-grey-2","js-thread-list-scroll-root",{"theme-clean":u,"pt-[49px]":!l,"p-4 lg:p-12":l}),"data-testid":"hypothesis-app",style:c,children:[!l&&et(Uv,{onLogin:m,onSignUp:p,onLogout:async()=>{await(async()=>{const e=i.countDrafts();if(0===e)return!0;let t="";return 1===e?t="You have an unsaved annotation.\nDo you really want to discard this draft?":e>1&&(t="You have "+e+" unsaved annotations.\nDo you really want to discard these drafts?"),jr({title:"Discard drafts?",message:t,confirmAction:"Discard"})})()&&(i.clearGroups(),i.removeAnnotations(i.unsavedAnnotations()),i.discardAllDrafts(),
644
+ Mo(n)?t.notifyHost("logoutRequested"):r.logout())},isSidebar:d}),et("div",{className:"container",children:[et(Nv,{}),et(Rg,{}),et(Gv,{}),et(hv,{shareTab:!h}),s&&et("main",{children:["annotation"===s&&et(kg,{onLogin:m}),"notebook"===s&&et(Zg,{}),"profile"===s&&et(Qg,{}),"stream"===s&&et(kv,{}),"sidebar"===s&&et(xv,{onLogin:m,onSignUp:p})]})]})]})}),["auth","frameSync","session","settings","toastMessenger"]);function Wv({error:e}){return et("div",{className:Ze("m-2 mt-12"),children:et(Pr,{title:"Unable to start Hypothesis",children:e.message})})}function Kv(e){const t=e.toString(16);return 1===t.length?"0"+t:t}function Yv(e){const t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t).map(Kv).join("")}function Xv(e,t,n,r=[],o=2e3,i=window){const a=Yv(10),s={jsonrpc:"2.0",method:n,params:r,id:a};try{e.postMessage(s,t)}catch(e){return Promise.reject(e)}let l;const c=new Promise(((e,n)=>{l=r=>{if(r.origin!==t)return;if(!(r.data instanceof Object)||"2.0"!==r.data.jsonrpc||r.data.id!==a)return
645
+ ;const{error:o,result:i}=r.data;void 0!==o?n(o):void 0!==i?e(i):n(new Error("RPC reply had no result or error"))},i.addEventListener("message",l)})),u=[c];var d,h;return o&&u.push((d=o,h=`Request to ${t} timed out`,new Promise(((e,t)=>{setTimeout((()=>t(new Error(h))),d)})))),Promise.race(u).then((e=>(i.removeEventListener("message",l),e))).catch((e=>{throw i.removeEventListener("message",l),e}))}function Zv(e){const t=new URL(e).hash.slice(1),n=new URLSearchParams(t).get("config");return JSON.parse(n||"{}")}function Jv(e){if("string"==typeof e&&"false"===e.trim().toLocaleLowerCase())return!1;const t=Number(e);return isNaN(t)?"string"==typeof e:Boolean(t)}function Qv(e){return parseInt(e)}function eb(e){return e&&"function"==typeof e.toString?e.toString():""}function tb(e,t=window){let n=t;for(let t=0;t<e;t++){if(n===n.top)throw new Error("The target parent frame has exceeded the ancestor tree. Try reducing the `requestConfigFromFrame.ancestorLevel` value in the `hypothesisConfig`");n=n.parent}return n}
646
+ const nb=new Set;function rb(...e){const t=e.join();nb.has(t)||(console.warn(...e),nb.add(t))}var ob,ib;rb.reset=()=>{nb.clear()};var ab=t(ib?ob:(ib=1,ob=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}));function sb(e){const t=Mo(e);return!t||!!t.allowLeavingGroups}const lb="__world__";function cb(e,t,n,r){const o=t.find((e=>e.id===lb));o&&e.unshift(o);const i=e.map((e=>e.id));t=t.filter((e=>!i.includes(e.id))),t.forEach((e=>e.isMember=!1)),e.forEach((e=>e.isMember=!0));const a=e.concat(t);for(const e of a)e.canLeave=sb(r)&&e.isMember&&e.id!==lb;return a.forEach((e=>e.isScopedToUri=function(e,t){if(e.scopes&&e.scopes.uri_patterns.length>0&&t)return function(e,t){return t.some((t=>e.match(t.split("*").map(ab).join(".*"))))}(t,e.scopes.uri_patterns);return!0}(e,n))),a}let ub=[];const db=e=>({changeFocusModeUser:t=>{e.changeFocusModeUser(t);const n=t?.groups??[],r=function(e,t){return function(e,t){
647
+ return t.filter((t=>e.includes(t.id)||t.groupid&&e.includes(t.groupid)))}(e,t).map((e=>e.id))}(n,e.allGroups());n.length&&!r.length&&console.error("No matching groups found in list of filtered group IDs"),e.filterGroups(r)},showContentInfo:t=>{e.setContentInfo(t)}});function hb(e,t,n){const r=db(e);function o(e){const n=t.rpcAllowedOrigins||[];if(null==(o=e.data)||"object"!=typeof o||"2.0"!==o.jsonrpc)return;var o;if(!n.includes(e.origin))return void rb(`Ignoring JSON-RPC request from non-whitelisted origin ${e.origin}`);const i=e.data;e.source.postMessage(function(e){const t=r[e.method];if(void 0===t)return{jsonrpc:"2.0",id:e.id,error:{code:-32601,message:"Method not found"}};e.params?t(...e.params):t();return{jsonrpc:"2.0",result:"ok",id:e.id}}(i),e.origin)}ub.forEach((e=>{o(e)})),ub=[],window.removeEventListener("message",mb),n.addEventListener("message",o)}function mb(e){ub.push(e)}hb.$inject=["store","settings","$window"];class pb{constructor(e){this._api=e}trackEvent(e){
648
+ this._api.analytics.events.create({},{event:e}).catch((t=>console.warn(`Could not track event "${e}"`,t)))}}pb.$inject=["api"];class fb{constructor(e){this._rpc=e.rpc,this._reportConfig=e.reportActivity}reportActivity(e,t){if(!this._rpc||!this._reportConfig)return;let n;switch(e){case"create":n=new Date(t.created).toISOString();break;case"update":n=new Date(t.updated).toISOString();break;default:n=(new Date).toISOString()}const r={date:n,annotation:{id:t.id,isShared:Fs(t.permissions)}};this._reportConfig.events.includes(e)&&function(e,t,n,r=[]){const o={jsonrpc:"2.0",method:n,params:r};e.postMessage(o,t)}(this._rpc.targetFrame,this._rpc.origin,this._reportConfig.method,[e,r])}}fb.$inject=["settings"];class gb{constructor(e,t,n,r){this._activity=e,this._api=t,this._settings=n,this._store=r}_applyDraftChanges(e,t){const n={},r=this._store.getDraft(e),o=mi(this._store.profile().userid)?.provider??this._store.defaultAuthority(),i=this._store.isFeatureEnabled("at_mentions")
649
+ ;return r?(i?"username"===t.mentionMode?n.text=function(e,t){return e.replace(Js,((e,n,r)=>`${n}${tl(function(e,t){return`acct:${e}@${t}`}(r,t),`@${r}`)}`))}(r.text,o):n.text=function(e,t){return e.replace(el,((e,n,r)=>{const o=t.get(r);return o?`${n}${tl(o.userid,`@${r}`)}`:`${n}${il(r)}`}))}(r.text,t.usersMap):n.text=r.text,n.tags=r.tags,n.permissions=r.isPrivate?Rs(e.user):Ps(e.user,e.group),{...e,...n}):{...e}}annotationFromData(e,t=new Date){const n=this._store.getDefault("annotationPrivacy"),r=this._store.focusedGroupId(),o=this._store.profile();if(!r)throw new Error("Cannot create annotation without a group");const i=o.userid;if(!i)throw new Error("Cannot create annotation when logged out");const a=o.user_info,s=`s:${Yv(8)}`,l=Object.assign({created:t.toISOString(),group:r,permissions:Ds(i,r,n),tags:[],text:"",updated:t.toISOString(),user:i,user_info:a,$tag:s,hidden:!1,links:{},document:{title:""}},e);return Ei(l)&&(l.permissions=Rs(i)),this._settings.annotationMetadata&&(l.metadata={
650
+ ...this._settings.annotationMetadata}),l}create(e,t=new Date){const n=this.annotationFromData(e,t);this._store.addAnnotations([n]),this._store.deleteNewAndEmptyDrafts(),Ei(n)||this._store.createDraft(n,{tags:n.tags,text:n.text,isPrivate:!ki(n)}),Ci(n)?this._store.selectTab("note"):Mi(n)&&this._store.selectTab("annotation"),(n.references||[]).forEach((e=>{this._store.setExpanded(e,!0)}))}createPageNote(){const e=this._store.mainFrame();if(!this._store.isLoggedIn())return void this._store.openSidebarPanel("loginPrompt");if(!e)return;const t={target:[{source:e.uri}],uri:e.uri};this.create(t)}async delete(e){await this._api.annotation.delete({id:e.id}),this._activity.reportActivity("delete",e),this._store.removeAnnotations([e])}async flag(e){await this._api.annotation.flag({id:e.id}),this._activity.reportActivity("flag",e),this._store.updateFlagStatus(e.id,!0)}reply(e,t){const n={group:e.group,permissions:ki(e)?Ps(t,e.group):Rs(t),references:(e.references||[]).concat(e.id),target:[{source:e.target[0].source}],
651
+ uri:e.uri};this.create(n)}async save(e,t={mentionMode:"username"}){let n,r;const o=this._applyDraftChanges(e,t);let i;wi(e)?(n=this._api.annotation.update({id:e.id},o),r="update"):(n=this._api.annotation.create({},o),r="create"),this._store.annotationSaveStarted(e);try{i=await n,this._activity.reportActivity(r,i)}finally{this._store.annotationSaveFinished(e)}for(const[t,n]of Object.entries(e))if(t.startsWith("$")){i[t]=n}return this._store.removeDraft(e),this._store.addAnnotations([i]),i}}if(gb.$inject=["annotationActivity","api","settings","store"],"function"!=typeof Symbol){var vb=0;Symbol=function(e){return"@@"+e+ ++vb},Symbol.for=function(e){return"@@"+e}}
652
+ var bb=/^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,yb=/[\s\n\\/='"\0<>]/,_b=/^(xlink|xmlns|xml)([A-Z])/,wb=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,xb=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,kb=/["&<]/;function Nb(e){if(0===e.length||!1===kb.test(e))return e;for(var t=0,n=0,r="",o="";n<e.length;n++){switch(e.charCodeAt(n)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=o,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var Sb=function(e,t){return String(e).replace(/(\n+)/g,"$1"+(t||"\t"))},Ab=function(e,t,n){
653
+ return String(e).length>40||-1!==String(e).indexOf("\n")||-1!==String(e).indexOf("<")},Eb={},Tb=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),Cb=/[A-Z]/g;function Mb(e){var t="";for(var n in e){var r=e[n];if(null!=r&&""!==r){var o="-"==n[0]?n:Eb[n]||(Eb[n]=n.replace(Cb,"-$&").toLowerCase()),i=";";"number"!=typeof r||o.startsWith("--")||Tb.has(o)||(i="px;"),t=t+o+":"+r+i}}return t||void 0}function Ib(e,t){return Array.isArray(t)?t.reduce(Ib,e):null!=t&&!1!==t&&e.push(t),e}function zb(){this.__d=!0}function Lb(e,t){return{__v:e,context:t,props:e.props,
654
+ setState:zb,forceUpdate:zb,__d:!0,__h:new Array(0)}}function Ob(e,t){var n=e.contextType,r=n&&t[n.__c];return null!=n?r?r.props.value:n.__:t}var Rb=[],Pb=[];function Db(e,t,n,r){var i=o.__s;o.__s=!0;try{return Fb(e,t||{},n,r)}finally{o.__c&&o.__c(e,Pb),o.__s=i,Pb.length=0}}function Fb(e,t,n,r,i,a){if(null==e||"boolean"==typeof e)return"";if("object"!=typeof e)return"function"==typeof e?"":Nb(e+"");var s=n.pretty,l=s&&"string"==typeof s?s:"\t";if(Array.isArray(e)){for(var c="",u=0;u<e.length;u++)s&&u>0&&(c+="\n"),c+=Fb(e[u],t,n,r,i,a);return c}if(void 0!==e.constructor)return"";o.__b&&o.__b(e);var d,h=e.type,m=e.props,p=!1;if("function"==typeof h){if(p=!0,!n.shallow||!r&&!1!==n.renderRootComponent||h===x){if(h===x){var f=[];return Ib(f,e.props.children),Fb(f,t,n,!1!==n.shallowHighOrder,i,a)}var g,v=e.__c=Lb(e,t),b=o.__r;if(h.prototype&&"function"==typeof h.prototype.render){var y=Ob(h,t);(v=e.__c=new h(m,y)).__v=e,v._dirty=v.__d=!0,v.props=m,null==v.state&&(v.state={}),
655
+ null==v._nextState&&null==v.__s&&(v._nextState=v.__s=v.state),v.context=y,h.getDerivedStateFromProps?v.state=Object.assign({},v.state,h.getDerivedStateFromProps(v.props,v.state)):v.componentWillMount&&(v.componentWillMount(),v.state=v._nextState!==v.state?v._nextState:v.__s!==v.state?v.__s:v.state),b&&b(e),g=v.render(v.props,v.state,v.context)}else for(var _=Ob(h,t),w=0;v.__d&&w++<25;)v.__d=!1,b&&b(e),g=h.call(e.__c,m,_);v.getChildContext&&(t=Object.assign({},t,v.getChildContext()));var k=Fb(g,t,n,!1!==n.shallowHighOrder,i,a);return o.diffed&&o.diffed(e),k}h=(d=h).displayName||d!==Function&&d.name||Hb(d)}var N,S,A="<"+h;if(m){var E=Object.keys(m);n&&!0===n.sortAttributes&&E.sort();for(var T=0;T<E.length;T++){var C=E[T],M=m[C];if("children"!==C){if(!yb.test(C)&&(n&&n.allAttributes||"key"!==C&&"ref"!==C&&"__self"!==C&&"__source"!==C)){if("defaultValue"===C)C="value";else if("defaultChecked"===C)C="checked";else if("defaultSelected"===C)C="selected";else if("className"===C){if(void 0!==m.class)continue;C="class"
656
+ }else"acceptCharset"===C?C="accept-charset":"httpEquiv"===C?C="http-equiv":_b.test(C)?C=C.replace(_b,"$1:$2").toLowerCase():i?xb.test(C)&&(C="panose1"===C?"panose-1":C.replace(/([A-Z])/g,"-$1").toLowerCase()):wb.test(C)&&(C=C.toLowerCase());if("htmlFor"===C){if(m.for)continue;C="for"}"style"===C&&M&&"object"==typeof M&&(M=Mb(M)),"a"===C[0]&&"r"===C[1]&&"boolean"==typeof M&&(M=String(M));var I=n.attributeHook&&n.attributeHook(C,M,t,n,p);if(I||""===I)A+=I;else if("dangerouslySetInnerHTML"===C)S=M&&M.__html;else if("textarea"===h&&"value"===C)N=M;else if((M||0===M||""===M)&&"function"!=typeof M){if(!(!0!==M&&""!==M||(M=C,n&&n.xml))){A=A+" "+C;continue}if("value"===C){if("select"===h){a=M;continue}"option"===h&&a==M&&void 0===m.selected&&(A+=" selected")}A=A+" "+C+'="'+Nb(M+"")+'"'}}}else N=M}}if(s){var z=A.replace(/\n\s*/," ");z===A||~z.indexOf("\n")?s&&~A.indexOf("\n")&&(A+="\n"):A=z}if(A+=">",yb.test(h))throw new Error(h+" is not a valid HTML tag name in "+A)
657
+ ;var L,O=bb.test(h)||n.voidElements&&n.voidElements.test(h),R=[];if(S)s&&Ab(S)&&(S="\n"+l+Sb(S,l)),A+=S;else if(null!=N&&Ib(L=[],N).length){for(var P=s&&~A.indexOf("\n"),D=!1,F=0;F<L.length;F++){var H=L[F];if(null!=H&&!1!==H){var B=Fb(H,t,n,!0,"svg"===h||"foreignObject"!==h&&i,a);if(s&&!P&&Ab(B)&&(P=!0),B)if(s){var $=B.length>0&&"<"!=B[0];D&&$?R[R.length-1]+=B:R.push(B),D=$}else R.push(B)}}if(s&&P)for(var j=R.length;j--;)R[j]="\n"+l+Sb(R[j],l)}if(o.diffed&&o.diffed(e),R.length||S)A+=R.join("");else if(n&&n.xml)return A.substring(0,A.length-1)+" />";return!O||L||S?(s&&~A.indexOf("\n")&&(A+="\n"),A=A+"</"+h+">"):A=A.replace(/>$/," />"),A}function Hb(e){var t=(Function.prototype.toString.call(e).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!t){for(var n=-1,r=Rb.length;r--;)if(Rb[r]===e){n=r;break}n<0&&(n=Rb.push(e)-1),t="UnnamedComponent"+n}return t}const Bb=/(\\|\"|\')/g;var $b=function(e){return e.replace(Bb,"\\$1")}
658
+ ;const jb=Object.prototype.toString,qb=Date.prototype.toISOString,Ub=Error.prototype.toString,Gb=RegExp.prototype.toString,Vb=Symbol.prototype.toString,Wb=/^Symbol\((.*)\)(.*)$/,Kb=/\n/gi,Yb=Object.getOwnPropertySymbols||(e=>[]);function Xb(e){return"[object Array]"===e||"[object ArrayBuffer]"===e||"[object DataView]"===e||"[object Float32Array]"===e||"[object Float64Array]"===e||"[object Int8Array]"===e||"[object Int16Array]"===e||"[object Int32Array]"===e||"[object Uint8Array]"===e||"[object Uint8ClampedArray]"===e||"[object Uint16Array]"===e||"[object Uint32Array]"===e}function Zb(e){return""===e.name?"[Function anonymous]":"[Function "+e.name+"]"}function Jb(e){return Vb.call(e).replace(Wb,"Symbol($1)")}function Qb(e){return"["+Ub.call(e)+"]"}function ey(e){if(!0===e||!1===e)return""+e;if(void 0===e)return"undefined";if(null===e)return"null";const t=typeof e;if("number"===t)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===t)return'"'+$b(e)+'"';if("function"===t)return Zb(e)
659
+ ;if("symbol"===t)return Jb(e);const n=jb.call(e);return"[object WeakMap]"===n?"WeakMap {}":"[object WeakSet]"===n?"WeakSet {}":"[object Function]"===n||"[object GeneratorFunction]"===n?Zb(e,min):"[object Symbol]"===n?Jb(e):"[object Date]"===n?qb.call(e):"[object Error]"===n?Qb(e):"[object RegExp]"===n?Gb.call(e):"[object Arguments]"===n&&0===e.length?"Arguments []":Xb(n)&&0===e.length?e.constructor.name+" []":e instanceof Error&&Qb(e)}function ty(e,t,n,r,o,i,a,s,l,c){let u="";if(e.length){u+=o;const d=n+t;for(let n=0;n<e.length;n++)u+=d+oy(e[n],t,d,r,o,i,a,s,l,c),n<e.length-1&&(u+=","+r);u+=o+n}return"["+u+"]"}function ny(e,t,n,r,o,i,a,s,l,c){if((i=i.slice()).indexOf(e)>-1)return"[Circular]";i.push(e);const u=++s>a;if(!u&&e.toJSON&&"function"==typeof e.toJSON)return oy(e.toJSON(),t,n,r,o,i,a,s,l,c);const d=jb.call(e);return"[object Arguments]"===d?u?"[Arguments]":function(e,t,n,r,o,i,a,s,l,c){return(c?"":"Arguments ")+ty(e,t,n,r,o,i,a,s,l,c)
660
+ }(e,t,n,r,o,i,a,s,l,c):Xb(d)?u?"[Array]":function(e,t,n,r,o,i,a,s,l,c){return(c?"":e.constructor.name+" ")+ty(e,t,n,r,o,i,a,s,l,c)}(e,t,n,r,o,i,a,s,l,c):"[object Map]"===d?u?"[Map]":function(e,t,n,r,o,i,a,s,l,c){let u="Map {";const d=e.entries();let h=d.next();if(!h.done){u+=o;const e=n+t;for(;!h.done;)u+=e+oy(h.value[0],t,e,r,o,i,a,s,l,c)+" => "+oy(h.value[1],t,e,r,o,i,a,s,l,c),h=d.next(),h.done||(u+=","+r);u+=o+n}return u+"}"}(e,t,n,r,o,i,a,s,l,c):"[object Set]"===d?u?"[Set]":function(e,t,n,r,o,i,a,s,l,c){let u="Set {";const d=e.entries();let h=d.next();if(!h.done){u+=o;const e=n+t;for(;!h.done;)u+=e+oy(h.value[1],t,e,r,o,i,a,s,l,c),h=d.next(),h.done||(u+=","+r);u+=o+n}return u+"}"}(e,t,n,r,o,i,a,s,l,c):"object"==typeof e?u?"[Object]":function(e,t,n,r,o,i,a,s,l,c){let u=(c?"":e.constructor?e.constructor.name+" ":"Object ")+"{",d=Object.keys(e).sort();const h=Yb(e);if(h.length&&(d=d.filter((e=>!("symbol"==typeof e||"[object Symbol]"===jb.call(e)))).concat(h)),d.length){u+=o;const h=n+t
661
+ ;for(let n=0;n<d.length;n++){const m=d[n];u+=h+oy(m,t,h,r,o,i,a,s,l,c)+": "+oy(e[m],t,h,r,o,i,a,s,l,c),n<d.length-1&&(u+=","+r)}u+=o+n}return u+"}"}(e,t,n,r,o,i,a,s,l,c):void 0}function ry(e,t,n,r,o,i,a,s,l,c){let u,d=!1;for(let t=0;t<l.length;t++)if(u=l[t],u.test(e)){d=!0;break}return!!d&&u.print(e,(function(e){return oy(e,t,n,r,o,i,a,s,l,c)}),(function(e){const r=n+t;return r+e.replace(Kb,"\n"+r)}),{edgeSpacing:o,spacing:r})}function oy(e,t,n,r,o,i,a,s,l,c){return ey(e)||ry(e,t,n,r,o,i,a,s,l,c)||ny(e,t,n,r,o,i,a,s,l,c)}const iy={indent:2,min:!1,maxDepth:1/0,plugins:[]};function ay(e){return new Array(e+1).join(" ")}var sy=function(e,t){let n,r;t?(function(e){if(Object.keys(e).forEach((e=>{if(!iy.hasOwnProperty(e))throw new Error("prettyFormat: Invalid option: "+e)})),e.min&&void 0!==e.indent&&0!==e.indent)throw new Error("prettyFormat: Cannot run with min option and indent")}(t),t=function(e){const t={};return Object.keys(iy).forEach((n=>t[n]=e.hasOwnProperty(n)?e[n]:iy[n])),t.min&&(t.indent=0),t}(t)):t=iy
662
+ ;const o=t.min?" ":"\n",i=t.min?"":"\n";if(t&&t.plugins.length){n=ay(t.indent),r=[];var a=ry(e,n,"",o,i,r,t.maxDepth,0,t.plugins,t.min);if(a)return a}return ey(e)||(n||(n=ay(t.indent)),r||(r=[]),ny(e,n,"",o,i,r,t.maxDepth,0,t.plugins,t.min))},ly={test:function(e){return e&&"object"==typeof e&&"type"in e&&"props"in e&&"key"in e},print:function(e,t,n){return Db(e,ly.context,ly.opts,!0)}},cy={plugins:[ly]},uy={attributeHook:function(e,t,n,r,o){var i=typeof t;if("dangerouslySetInnerHTML"===e)return!1;if(null==t||"function"===i&&!r.functions)return"";if(r.skipFalseAttributes&&!o&&(!1===t||("class"===e||"style"===e)&&""===t))return"";var a="string"==typeof r.pretty?r.pretty:"\t";return"string"!==i?("function"!==i||r.functionNames?(ly.context=n,ly.opts=r,~(t=sy(t,cy)).indexOf("\n")&&(t=Sb("\n"+t,a)+"\n")):t="Function",Sb("\n"+e+"={"+t+"}",a)):"\n"+a+e+'="'+Nb(t)+'"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function dy(e,t){const n=new RegExp(`^ {${t}}`,"gm")
663
+ ;return e.replace(n,"")}function hy(e,...t){return n=function(e,...t){const n=e.join("").match(/^[ \t]*(?=\S)/gm),r=n?Math.min(...n.map((e=>e.length))):0;let o="";for(const[n,i]of t.entries())o+=dy(e[n],r),o+=i;return o+dy(e[e.length-1],r)}([...e],...t),n.replace(/^\s*\n|\n\s*$/g,"");var n}function my(e){const t={};for(const[n,r]of Object.entries(e))n.startsWith("$")||(t[n]=r);return t}function py(e){return`${e.getFullYear()}-${`${e.getMonth()+1}`.padStart(2,"0")}-${`${e.getDate()}`.padStart(2,"0")} ${`${e.getHours()}`.padStart(2,"0")}:${`${e.getMinutes()}`.padStart(2,"0")}`}class fy{buildJSONExportContent(e,{profile:t,now:n=new Date}){const r=new Ng(t,[]);return{export_date:n.toISOString(),export_userid:t.userid??"",client_version:r.version,annotations:e.map(my)}}buildTextExportContent(e,{groupName:t="",displayNamesEnabled:n=!1,defaultAuthority:r="",now:o=new Date}={}){const{uri:i,title:a,uniqueUsers:s,replies:l,extractUsername:c}=this._exportCommon(e,{displayNamesEnabled:n,defaultAuthority:r
664
+ }),u=e.map(((e,t)=>{const n=Pi(e),r=Oi(e);return hy`
665
+ Annotation ${t+1}:
666
+ ${[`Created at: ${py(new Date(e.created))}`,`Author: ${c(e)}`,n?`Page: ${n}`:void 0,`Type: ${Ii(e)}`,r?`Quote: "${r}"`:void 0,`Comment: ${e.text}`,e.tags.length>0?`Tags: ${e.tags.join(", ")}`:void 0].filter(Boolean).join("\n")}`}));return hy`
667
+ ${py(o)}
668
+ ${a}
669
+ ${i}
670
+ Group: ${t}
671
+ Total users: ${s.length}
672
+ Users: ${s.join(", ")}
673
+ Total annotations: ${e.length}
674
+ Total replies: ${l.length}
675
+
676
+ ${u.join("\n\n")}`}buildCSVExportContent(e,{groupName:t="",defaultAuthority:n="",displayNamesEnabled:r=!1,separator:o=","}={}){const{uri:i,extractUsername:a}=this._exportCommon(e,{displayNamesEnabled:r,defaultAuthority:n}),s=e=>[py(new Date(e.created)),a(e),Pi(e)??"",i,t,Ii(e),Oi(e)??"",e.text,e.tags.join(",")].map((e=>function(e,t){return new RegExp(`["\n\r${t}]`).test(e)?`"${e.replace(/"/g,'""')}"`:e}(e,o))).join(o);return`${["Created at","Author","Page","URL","Group","Type","Quote","Comment","Tags"].join(o)}\n${e.map((e=>s(e))).join("\n")}`}buildHTMLExportContent(e,{groupName:t="",displayNamesEnabled:n=!1,defaultAuthority:r="",now:o=new Date}={}){const{uri:i,title:a,uniqueUsers:s,replies:l,extractUsername:c}=this._exportCommon(e,{displayNamesEnabled:n,defaultAuthority:r});return function(e,t,n){var r=Object.assign({},uy,n||{});return r.jsx||(r.attributeHook=null),Db(e,t,r)}(et("html",{lang:"en",children:[et("head",{children:[et("title",{children:`Annotations on "${a}"`}),et("meta",{charSet:"UTF-8"})]
677
+ }),et("body",{children:[et("section",{children:[et("h1",{children:"Summary"}),et("p",{children:et("time",{dateTime:o.toISOString(),children:py(o)})}),et("p",{children:et("strong",{children:a})}),et("p",{children:et("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:i})}),et("table",{children:et("tbody",{style:{verticalAlign:"top"},children:[et("tr",{children:[et("td",{children:"Group:"}),et("td",{children:t})]}),et("tr",{children:[et("td",{children:"Total users:"}),et("td",{children:s.length})]}),et("tr",{children:[et("td",{children:"Users:"}),et("td",{children:s.join(", ")})]}),et("tr",{children:[et("td",{children:"Total annotations:"}),et("td",{children:e.length})]}),et("tr",{children:[et("td",{children:"Total replies:"}),et("td",{children:l.length})]})]})})]}),et("hr",{}),et("section",{children:[et("h1",{children:"Annotations"}),e.map(((e,t)=>{const n=Pi(e),r=Oi(e),o=Tp(e.text),i=o===`<p>${e.text}</p>`?e.text:o;return et("article",{children:[et("h2",{children:["Annotation ",t+1,":"]
678
+ }),et("table",{children:et("tbody",{style:{verticalAlign:"top"},children:[et("tr",{children:[et("td",{children:"Created at:"}),et("td",{children:et("time",{dateTime:e.created,children:py(new Date(e.created))})})]}),et("tr",{children:[et("td",{children:"Author:"}),et("td",{children:c(e)})]}),n&&et("tr",{children:[et("td",{children:"Page:"}),et("td",{children:n})]}),et("tr",{children:[et("td",{children:"Type:"}),et("td",{children:Ii(e)})]}),r&&et("tr",{children:[et("td",{children:"Quote:"}),et("td",{children:et("blockquote",{style:{margin:0},children:r})})]}),et("tr",{children:[et("td",{children:"Comment:"}),et("td",{dangerouslySetInnerHTML:{__html:i}})]}),e.tags.length>0&&et("tr",{children:[et("td",{children:"Tags:"}),et("td",{children:e.tags.join(", ")})]})]})})]},e.id)}))]})]})]}),{},{pretty:!0}).replace(/\t/g," ")}_exportCommon(e,{displayNamesEnabled:t,defaultAuthority:n}){const[r]=e;if(!r)throw new Error("No annotations to export");const o=e=>Ls(e,n,t),{uri:i,title:a}=gi(r);return{uri:i,title:a,
679
+ uniqueUsers:[...new Set(e.map((e=>o(e))).filter(Boolean))],replies:e.filter((e=>_i(e))),extractUsername:o}}}fy.$inject=[];class gy extends Error{constructor(e,t,n=""){let r="Network request failed";t&&(r+=` (${t.status})`),n&&(r+=`: ${n}`),super(r),this.url=e,this.response=t,this.reason=n}}async function vy(e,t){let n,r;try{n=await fetch(e,t)}catch(t){throw new gy(e,null,t.message)}if(204===n.status)return null;try{r=await n.json()}catch{throw new gy(e,n,"Failed to parse response")}if(!n.ok)throw new gy(e,n,r?.reason);return r}class by{constructor(e,t,n){this._clientId=null;const r=e.routes(),o=()=>this._clientId,i=e=>function(e,t,{getAccessToken:n,getClientId:r,onRequestStarted:o,onRequestFinished:i}){return async(a,s,l)=>{o();try{const[o,i]=await Promise.all([e,n()]),c=function(e,t){let n=e;const r=t.split(".");for(const[e,t]of r.entries()){const o=n[t];if(!o||"url"in o){if(o&&e===r.length-1)return o;break}n=o}return null}(o,t);if(!c)throw new Error(`Missing API route: ${t}`);const u={
680
+ "Content-Type":"application/json","Hypothesis-Client-Version":"1.1627.0"};i&&(u.Authorization="Bearer "+i);const d=r();d&&(u["X-Client-Id"]=d);const{url:h,unusedParams:m}=Va(c.url,a),p=new URL(h);for(const[e,t]of Object.entries(m)){const n=Array.isArray(t)?t:[t];for(const t of n)null!=t&&p.searchParams.append(e,t.toString())}return await vy(p.toString(),{body:s?JSON.stringify(my(s)):null,headers:u,method:c.method,signal:l})}finally{i()}}}(r,e,{getAccessToken:()=>t.getAccessToken(),getClientId:o,onRequestStarted:n.apiRequestStarted,onRequestFinished:n.apiRequestFinished});this.search=i("search"),this.annotation={create:i("annotation.create"),delete:i("annotation.delete"),get:i("annotation.read"),update:i("annotation.update"),flag:i("annotation.flag"),hide:i("annotation.hide"),unhide:i("annotation.unhide")},this.group={member:{delete:i("group.member.delete")},members:{read:i("group.members.read")},read:i("group.read")},this.groups={list:i("groups.read")},this.profile={groups:{read:i("profile.groups.read")},
681
+ read:i("profile.read"),update:i("profile.update")},this.analytics={events:{create:i("analytics.events.create")}}}setClientId(e){this._clientId=e}}by.$inject=["apiRoutes","auth","store"];var yy,_y,wy,xy,ky,Ny={};function Sy(){return wy||(wy=1,e=Ny,t=function(){if(_y)return yy;function e(e,t){"boolean"==typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}return _y=1,yy=e,e.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},e.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},e.prototype.retry=function(e){
682
+ if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=(new Date).getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(void 0===n){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1)}var r=this;return this._timer=setTimeout((function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout((function(){r._operationTimeoutCb(r._attempts)}),r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)}),n),this._options.unref&&this._timer.unref(),!0},e.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout((function(){n._operationTimeoutCb()}),n._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},
683
+ e.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},e.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},e.prototype.start=e.prototype.try,e.prototype.errors=function(){return this._errors},e.prototype.attempts=function(){return this._attempts},e.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var o=this._errors[r],i=o.message,a=(e[i]||0)+1;e[i]=a,a>=n&&(t=o,n=a)}return t},yy}(),e.operation=function(n){var r=e.timeouts(n);return new t(r,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],o=0;o<t.retries;o++)r.push(this.createTimeout(o,t))
684
+ ;return e&&e.forever&&!r.length&&r.push(this.createTimeout(o,t)),r.sort((function(e,t){return e-t})),r},e.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*Math.max(t.minTimeout,1)*Math.pow(t.factor,e));return r=Math.min(r,t.maxTimeout)},e.wrap=function(t,n,r){if(n instanceof Array&&(r=n,n=null),!r)for(var o in r=[],t)"function"==typeof t[o]&&r.push(o);for(var i=0;i<r.length;i++){var a=r[i],s=t[a];t[a]=function(r){var o=e.operation(n),i=Array.prototype.slice.call(arguments,1),a=i.pop();i.push((function(e){o.retry(e)||(e&&(arguments[0]=o.mainError()),a.apply(this,arguments))})),o.attempt((function(){r.apply(t,i)}))}.bind(t,s),t[a].options=n}}),Ny;var e,t}var Ay=t(ky?xy:(ky=1,xy=Sy()));function Ey(e,t){return new Promise(((n,r)=>{const o=Ay.operation(t);o.attempt((async()=>{try{const t=await e();o.retry(),n(t)}catch(e){o.retry(e)||r(e)}}))}))}function Ty(e){return Ey((()=>vy(e)))}class Cy{constructor(e){this._apiURL=e.apiUrl,this._routeCache=null,this._linkCache=null}routes(){
685
+ return this._routeCache||(this._routeCache=Ty(this._apiURL).then((e=>e.links))),this._routeCache}links(){return this._linkCache||(this._linkCache=this.routes().then((async e=>Ty(e.links.url)))),this._linkCache}}Cy.$inject=["settings"];class My extends Error{constructor(e,t){super(e),this.cause=t}}class Iy{constructor(e){this.clientId=e.clientId,this.tokenEndpoint=e.tokenEndpoint,this.authorizationEndpoint=e.authorizationEndpoint,this.revokeEndpoint=e.revokeEndpoint}exchangeAuthCode(e){return this._getAccessToken({client_id:this.clientId,grant_type:"authorization_code",code:e})}exchangeGrantToken(e){return this._getAccessToken({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:e})}refreshToken(e){return this._getAccessToken({grant_type:"refresh_token",refresh_token:e})}async revokeToken(e){try{await this._formPost(this.revokeEndpoint,{token:e})}catch(e){throw new My("Failed to revoke access token",e)}}authorize(e){const t=Yv(16),n=new Promise(((n,r)=>{
686
+ e.addEventListener("message",(function o(i){if("object"!=typeof i.data)return;const a=i.data;a.state===t&&("authorization_response"===a.type&&n(i.data),"authorization_canceled"===a.type&&r(new Error("Authorization window was closed")),e.removeEventListener("message",o))}))})),r=new URL(this.authorizationEndpoint);r.searchParams.set("client_id",this.clientId),r.searchParams.set("origin",e.location.origin),r.searchParams.set("response_mode","web_message"),r.searchParams.set("response_type","code"),r.searchParams.set("state",t);const o=`left=${e.screen.width/2-237.5},top=${e.screen.height/2-215},width=475,height=430`;if(!e.open(r.toString(),"Log in to Hypothesis",o))throw new Error("Failed to open login window");return n.then((e=>e.code))}async _formPost(e,t){const n=new URLSearchParams;for(const[e,r]of Object.entries(t))n.set(e,r);n.sort();return vy(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n.toString()})}async _getAccessToken(e){let t;try{
687
+ t=await this._formPost(this.tokenEndpoint,e)}catch(e){throw new My("Failed to fetch access token",e)}return{accessToken:t.access_token,expiresAt:Date.now()+1e3*(t.expires_in-10),refreshToken:t.refresh_token}}}class zy extends Pg{constructor(e,t,n,r,o){super(),this._authCode=null,this._client=null,this._tokenInfoPromise=null,this._apiRoutes=t,this._localStorage=n,this._settings=r,this._toastMessenger=o,this._window=e,this._listenForTokenStorageEvents()}_listenForTokenStorageEvents(){this._window.addEventListener("storage",(({key:e})=>{e===this._storageKey()&&(this._tokenInfoPromise=null,this.emit("oauthTokensChanged"))}))}_loadToken(){const e=this._localStorage.getObject(this._storageKey());return(e=>!!e&&"object"==typeof e&&"accessToken"in e&&"string"==typeof e.accessToken&&"refreshToken"in e&&"string"==typeof e.refreshToken&&"expiresAt"in e&&"number"==typeof e.expiresAt)(e)?{accessToken:e.accessToken,refreshToken:e.refreshToken,expiresAt:e.expiresAt}:null}async _oauthClient(){
688
+ if(this._client)return this._client;const e=await this._apiRoutes.links();var t,n;return this._client=new Iy({clientId:this._settings.oauthClientId,authorizationEndpoint:e["oauth.authorize"],revokeEndpoint:e["oauth.revoke"],tokenEndpoint:(t="token",n=this._settings.apiUrl,new URL(t,n).href)}),this._client}async _exchangeAuthCodeForToken(e){const t=await this._oauthClient(),n=await t.exchangeAuthCode(e);return this._saveToken(n),n}async _exchangeGrantToken(e){const t=await this._oauthClient();try{return await t.exchangeGrantToken(e)}catch(e){throw this._toastMessenger.error("Hypothesis login lost: You must reload the page to annotate.",{autoDismiss:!1}),e}}_getGrantToken(){return Mo(this._settings)?.grantToken}_storageKey(){let e=new URL(this._settings.apiUrl).hostname;return e=e.replace(/\./g,"%2E"),`hypothesis.oauth.${e}.token`}_saveToken(e){this._localStorage.setObject(this._storageKey(),e)}async _refreshAccessToken(e,t){const n=await this._oauthClient();let r;try{if(r=await n.refreshToken(e),
689
+ Date.now()>r.expiresAt)throw new Error("Refreshed token expired in the past")}catch{return null}return t.persist&&this._saveToken(r),r}async getAccessToken(){if(!this._tokenInfoPromise){const e=this._getGrantToken();void 0!==e?this._tokenInfoPromise=e?this._exchangeGrantToken(e):Promise.resolve(null):this._authCode?(this._tokenInfoPromise=this._exchangeAuthCodeForToken(this._authCode),this._authCode=null):this._tokenInfoPromise=Promise.resolve(this._loadToken())}const e=this._tokenInfoPromise,t=await this._tokenInfoPromise;if(!t)return null;if(e!==this._tokenInfoPromise)return this.getAccessToken();if(Date.now()>t.expiresAt){const e=this._getGrantToken();return this._tokenInfoPromise=this._refreshAccessToken(t.refreshToken,{persist:void 0===e}),this.getAccessToken()}return t.accessToken}async login(){const e=await this._oauthClient(),t=await e.authorize(this._window);this._authCode=t,this._tokenInfoPromise=null}async logout(){const[e,t]=await Promise.all([this._tokenInfoPromise,this._oauthClient()])
690
+ ;e&&await t.revokeToken(e.accessToken),this._tokenInfoPromise=null,this._localStorage.removeItem(this._storageKey())}}zy.$inject=["$window","apiRoutes","localStorage","settings","toastMessenger"];class Ly{constructor(e,t,n){this._annotationsService=e,this._toastMessenger=t,this._store=n,this._saving=new Set,this._failed=new Set}init(){const e=e=>!this._saving.has(e)&&!this._failed.has(e);this._store.subscribe((()=>{this._store.newHighlights().forEach((t=>{const n=t.$tag;e(n)&&(this._saving.add(n),Ey((()=>this._annotationsService.save(t))).then((()=>{this._toastMessenger.success(`Highlighted "${Oi(t)}"`,{visuallyHidden:!0})})).catch((()=>{this._failed.add(n)})).finally((()=>{this._saving.delete(n)})))}))}))}isSaving(){return this._saving.size>0}}Ly.$inject=["annotationsService","toastMessenger","store"];class Oy{constructor(e){this._rpc=e.rpc,this._dashboardConfig=e.dashboard}async getAuthToken(){
691
+ if(this._rpc&&this._dashboardConfig)return Xv(this._rpc.targetFrame,this._rpc.origin,this._dashboardConfig.authTokenRPCMethod)}open(e,t=document){if(!this._rpc||!this._dashboardConfig)throw new Error("Dashboard cannot be opened due to missing configuration");const n=t.createElement("form");n.action=this._dashboardConfig.entryPointURL,n.target="_blank",n.method="POST";const r=t.createElement("input");r.type="hidden",r.name=this._dashboardConfig.authFieldName,r.value=e,n.append(r),t.body.append(n),n.submit(),n.remove()}}function Ry(e){if(null===e||"object"!=typeof e)return!1;for(const t of["frame1","frame2","type","requestId"])if("string"!=typeof e[t])return!1;return!0}Oy.$inject=["settings"];class Py extends Error{constructor(e){super(e)}}class Dy{constructor({hostFrame:e,source:t,sourceId:n}){this._hostFrame=e,this._source=t,this._sourceId=n,this._listeners=new Ne}destroy(){this._listeners.removeAll()}async discover(e){const t=Yv(6);return new Promise(((n,r)=>{const o=()=>{this._hostFrame.postMessage({
692
+ frame1:this._source,frame2:e,type:"request",requestId:t,sourceId:this._sourceId},"*")},i=setInterval(o,250),a=setTimeout((()=>{clearInterval(i),r(new Py(`Unable to establish ${this._source}-${e} communication channel`))}),2e4),s=this._listeners.add(window,"message",(o=>{const{data:l,ports:c}=o;Ry(l)&&l.requestId===t&&"request"!==l.type&&(clearInterval(i),clearTimeout(a),this._listeners.remove(s),"string"==typeof l.error?r(new Py(l.error)):c.length>0?n(c[0]):r(new Py(`${this._source}-${e} port request failed`)))}));o()}))}}function Fy(e){const t=t=>{const{data:n}=t;if(n&&"hypothesis-error"===n?.type){const{context:t,error:r}=n;e(r instanceof Error?r:function(e){const t=new Error(e.message);return t.stack=e.stack,t}(r),t)}};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)}const Hy="1.0.0",By="frame-rpc";function $y(e,t=[],n=-1){return{protocol:By,version:Hy,arguments:t,method:e,sequence:n}}function jy(e,t,n=[],r=-1){e.postMessage($y(t,n,r))}class qy{
693
+ constructor({userAgent:e=navigator.userAgent,currentWindow:t=window,forceUnloadListener:n=!1}={}){this._port=null,this._methods=new Map,this._sequence=1,this._callbacks=new Map,this._listeners=new Ne,"onclose"in MessagePort.prototype&&!n||this._listeners.add(t,"unload",(n=>{n instanceof CustomEvent||this._port&&(jy(this._port,"close"),t!==t.parent&&function(e){const t=e.match(/\bAppleWebKit\/([0-9]+)\b/);if(!t)return!1;if(parseInt(t[1])<=537)return!1;const n=e.match(/\bVersion\/([0-9]+)\b/);return!!n&&!(parseInt(n[1])>=16)}(e)&&t.parent.postMessage({type:"hypothesisPortClosed"},"*",[this._port]))})),this._pendingCalls=[],this._destroyed=!1,this._receivedCloseEvent=!1}on(e,t){if(this._port)throw new Error("Cannot add a method handler after a port is connected");this._methods.set(e,t)}connect(e){this._port=e,this._listeners.add(e,"message",(e=>this._handle(e))),this._listeners.add(e,"close",(()=>{e.dispatchEvent(new MessageEvent("message",{data:$y("close")}))})),e.start(),jy(e,"connect")
694
+ ;for(const[e,t]of this._pendingCalls)this.call(e,...t);this._pendingCalls=[]}destroy(){this._port&&(jy(this._port,"close"),this._port.close()),this._destroyed=!0,this._listeners.removeAll()}call(e,...t){if(this._port||this._pendingCalls.push([e,t]),!this._port||this._destroyed)return;const n=this._sequence++,r=t[t.length-1];"function"==typeof r&&(this._callbacks.set(n,r),t=t.slice(0,-1)),jy(this._port,e,t,n)}_parseMessage({data:e}){return e&&"object"==typeof e?e.protocol!==By||e.version!==Hy?null:Array.isArray(e.arguments)?e:null:null}_handle(e){const t=this._parseMessage(e),n=this._port;if(t&&n)if("method"in t){if("close"===t.method){if(this._receivedCloseEvent)return;this._receivedCloseEvent=!0}const e=this._methods.get(t.method);if(!e)return;const r=(...e)=>{const r={arguments:e,protocol:By,response:t.sequence,version:Hy};n.postMessage(r)};e(...t.arguments,r)}else if("response"in t){const e=this._callbacks.get(t.response);this._callbacks.delete(t.response),e&&e(...t.arguments)}}}function Uy(e,t){
695
+ const n=e.target[0].selector?.find((e=>"EPUBContentSelector"===e.type));return!n||Boolean(t.url&&n.url===t.url||t.cfi&&n.cfi&&Wf(n.cfi)===Wf(t.cfi))}function Gy(e,t,n,r){let o=t();return e((()=>{const e=t();if(r?r(e,o):e===o)return;const i=o;o=e,n(e,i)}))}function Vy({$cluster:e,$tag:t,target:n,uri:r}){return{$cluster:e,$tag:t,target:n,uri:r}}function Wy(e,t){const n=e.find((e=>e.uri===t.uri));if(n)return n;const r=e.find((e=>null===e.id));return r||(e[0]??null)}class Ky{constructor(e,t,n,r){this._window=e,this._annotationsService=t,this._store=n,this._toastMessenger=r,this._portFinder=new Dy({hostFrame:this._window.parent,source:"sidebar"}),this._listeners=new Ne,this._hostRPC=new qy,this._guestRPC=new Map,this._inFrame=new Set,this._highlightsVisible=!1,this._pendingScrollToTag=null,this._pendingHoverTag=null,this._pendingAnchorStatusUpdates=new Map,this._scheduleAnchorStatusUpdate=As((()=>{const e=Object.fromEntries(this._pendingAnchorStatusUpdates.entries());this._store.updateAnchorStatus(e),
696
+ this._pendingAnchorStatusUpdates.clear()}),10),this._sidebarIsOpen=!1,this._setupSyncToGuests(),this._setupHostEvents(),this._setupFeatureFlagSync(),this._setupToastMessengerEvents()}_setupSyncToGuests(){let e=0;const t=(t,n,r)=>{let o=0;const i=new Set,a=[];t.forEach((e=>{_i(e)||(ki(e)&&++o,i.add(e.$tag),this._inFrame.has(e.$tag)||a.push(e))}));const s=r.filter((e=>!i.has(e.$tag)));if(a.length>0){const e=new Map,t=[];for(const r of a){const o=Wy(n,r);if(!o||o.segment&&!Uy(r,o.segment)){t.push(r.$tag);continue}const i=e.get(o.id)??[];i.push(r),e.set(o.id,i)}t.length>0&&this._updateAnchorStatus(t,"anchored");for(const[t,n]of e){const e=this._guestRPC.get(t);e&&e.call("loadAnnotations",n.map(Vy))}a.forEach((e=>{this._inFrame.add(e.$tag)}))}s.forEach((e=>{this._guestRPC.forEach((t=>t.call("deleteAnnotation",e.$tag))),this._inFrame.delete(e.$tag)})),n.length>0&&n.every((e=>e.isAnnotationFetchComplete))&&(0!==o&&o===e||(this._hostRPC.call("publicAnnotationCountChanged",o),e=o))}
697
+ ;Gy(this._store.subscribe,(()=>[this._store.allAnnotations(),this._store.frames()]),(([e,n],[r])=>t(e,n,r)),Ma),Gy(this._store.subscribe,(()=>this._store.getContentInfo()),(e=>{this._guestRPC.forEach((t=>{t.call("showContentInfo",e)}))}))}_updateAnchorStatus(e,t){const n=Array.isArray(e)?e:[e];for(const e of n)this._pendingAnchorStatusUpdates.set(e,t);this._scheduleAnchorStatusUpdate()}_connectGuest(e,t){const n=new qy;this._guestRPC.set(t,n),n.on("documentInfoChanged",(e=>{const r=this._store.getFocusFilters();if(e.segmentInfo&&Object.keys(r).length>0){const t=function(e,t){if(e.cfi&&t.cfi){const[n,r]=Vf(t.cfi.value);return Yf(e.cfi,n,r)}if(e.pages&&t.page)return Qf(`${e.pages.start}-${e.pages.end}`,t.page.value)===Zf.Overlap;return!0}(e.segmentInfo,r);n.call("setOutsideAssignmentNoticeVisible",!t)}this._store.connectFrame({id:t,metadata:e.metadata,uri:e.uri,segment:e.segmentInfo,persistent:e.persistent})})),n.on("close",(()=>{const e=this._store.frames().find((e=>e.id===t))
698
+ ;e&&!e.persistent&&this._store.destroyFrame(e),this._inFrame.clear(),n.destroy(),this._guestRPC.delete(t)})),n.on("createAnnotation",(e=>{const t=this._store.isLoggedIn(),n=null!==this._store.focusedGroup();if(!t||!n)return this._hostRPC.call("openSidebar"),t||this._store.openSidebarPanel("loginPrompt"),void this._guestRPC.forEach((t=>t.call("deleteAnnotation",e.$tag)));this._inFrame.add(e.$tag),e.$highlight||this._hostRPC.call("openSidebar"),this._hostRPC.call("showHighlights"),this._annotationsService.create(e)})),n.on("syncAnchoringStatus",(({$tag:e,$orphan:t})=>{this._inFrame.add(e),this._updateAnchorStatus(e,t?"orphan":"anchored"),e===this._pendingHoverTag&&(this._pendingHoverTag=null,n.call("hoverAnnotations",[e])),this._pendingScrollToTag&&e===this._pendingScrollToTag&&(this._pendingScrollToTag=null,n.call("scrollToAnnotation",e))})),n.on("showAnnotations",((e,t=!1)=>{const n=this._store.findIDsForTags(e);this._store.selectAnnotations(n),this._store.selectTab("annotation"),
699
+ n.length>0&&t&&(this._store.setAnnotationFocusRequest(n[0]),window.focus())})),n.on("hoverAnnotations",(e=>{this._store.hoverAnnotations(e||[])})),n.on("toggleAnnotationSelection",(e=>{this._store.toggleSelectedAnnotations(this._store.findIDsForTags(e))})),n.on("openSidebar",(()=>{this._hostRPC.call("openSidebar")})),n.on("closeSidebar",(()=>{this._hostRPC.call("closeSidebar")})),n.connect(e),n.call("setHighlightsVisible",this._highlightsVisible),n.call("featureFlagsUpdated",this._store.features());const r=this._store.getContentInfo();r&&n.call("showContentInfo",r)}_setupHostEvents(){this._hostRPC.on("sidebarOpened",(()=>{this._sidebarIsOpen=!0,this._store.setSidebarOpened(!0)})),this._hostRPC.on("sidebarClosed",(()=>{this._sidebarIsOpen=!1})),this._hostRPC.on("setHighlightsVisible",(e=>{this._highlightsVisible=e,this._guestRPC.forEach((t=>t.call("setHighlightsVisible",e)))}))}_setupFeatureFlagSync(){const e=()=>this._store.features(),t=e=>{this._hostRPC.call("featureFlagsUpdated",e)
700
+ ;for(const t of this._guestRPC.values())t.call("featureFlagsUpdated",e)};t(e()),Gy(this._store.subscribe,e,t)}_setupToastMessengerEvents(){this._toastMessenger.on("toastMessageAdded",(e=>{e.visuallyHidden&&!this._sidebarIsOpen&&this.notifyHost("toastMessageAdded",e)})),this._toastMessenger.on("toastMessageDismissed",(e=>{this.notifyHost("toastMessageDismissed",e)}))}async connect(){const e=await this._portFinder.discover("host");this._hostRPC.connect(e),this._listeners.add(e,"message",(e=>{const{data:t,ports:n}=e,r=t;Ry(r)&&function(e,t){return!!Ry(e)&&JSON.stringify(e,Object.keys(t).sort())===JSON.stringify(t,Object.keys(t).sort())}(r,{frame1:"guest",frame2:"sidebar",type:"offer"})&&this._connectGuest(n[0],r.sourceId??null)}))}notifyHost(e,...t){this._hostRPC.call(e,...t)}hoverAnnotation(e){this._pendingHoverTag=null;const t=e?[e.$tag]:[];if(this._store.hoverAnnotations(t),!e)return void this._guestRPC.forEach((e=>e.call("hoverAnnotations",[])));const n=Wy(this._store.frames(),e)
701
+ ;!n||n.segment&&!Uy(e,n.segment)?this._pendingHoverTag=e.$tag:this._guestRPC.forEach((e=>e.call("hoverAnnotations",t)))}scrollToAnnotation(e){const t=Wy(this._store.frames(),e);if(!t)return;const n=this._guestRPC.get(t?.id);return n?t.segment&&!Uy(e,t.segment)?(this._pendingScrollToTag=e.$tag,void n.call("navigateToSegment",Vy(e))):void n.call("scrollToAnnotation",e.$tag):void 0}async requestThumbnail(e,t={}){const n=this._guestRPC.get(null);if(!n)throw new Error("No guest connected");return new Promise(((r,o)=>{n.call("renderThumbnail",e,t,(e=>{e.ok?r(e.value):o(new Error(e.error))}))}))}destroy(){this._portFinder.destroy(),this._listeners.removeAll()}}Ky.$inject=["$window","annotationsService","store","toastMessenger"];const Yy={id:"__default__",name:"__DEFAULT__",
702
+ logo:"data:image/svg+xml;utf8,"+encodeURIComponent('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg width="24px" height="28px" viewBox="0 0 24 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <rect fill="#ffffff" stroke="none" width="17.14407" height="16.046612" x="3.8855932" y="3.9449153" />\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <path d="M0,2.00494659 C0,0.897645164 0.897026226,0 2.00494659,0 L21.9950534,0 C23.1023548,0 24,0.897026226 24,2.00494659 L24,21.9950534 C24,23.1023548 23.1029738,24 21.9950534,24 L2.00494659,24 C0.897645164,24 0,23.1029738 0,21.9950534 L0,2.00494659 Z M9,24 L12,28 L15,24 L9,24 Z M7.00811294,4 L4,4 L4,20 L7.00811294,20 L7.00811294,15.0028975 C7.00811294,12.004636 8.16824717,12.0097227 9,12 C10,12.0072451 11.0189302,12.0606714 11.0189302,14.003477 L11.0189302,20 L14.0270431,20 L14.0270431,13.1087862 C14.0270433,10 12,9.00309038 10,9.00309064 C8.01081726,9.00309091 8,9.00309086 7.00811294,11.0019317 L7.00811294,4 Z M19,19.9869002 C20.1045695,19.9869002 21,19.0944022 21,17.9934501 C21,16.892498 20.1045695,16 19,16 C17.8954305,16 17,16.892498 17,17.9934501 C17,19.0944022 17.8954305,19.9869002 19,19.9869002 Z" fill="currentColor"></path>\n </g>\n</svg>')
703
+ };const Xy=["organization","scopes"];class Zy{_focusedMembersController=null;constructor(e,t,n,r,o){this._store=e,this._api=t,this._auth=n,this._settings=r,this._toastMessenger=o,this._serviceConfig=Mo(r),this._reloadSetUp=!1}_mainURI(){return this._store.defaultContentFrame()?.uri??null}async _filterGroups(e,t,n,r){if(r){const t=e.find((e=>e.id===r));t&&!t.isScopedToUri&&t.scopes&&t.scopes.enforced&&(e=e.filter((e=>e.id!==r)),this._store.setDirectLinkedGroupFetchFailed(),r=null)}if(t)return e;const o=e.some((e=>e.id!==lb&&e.isScopedToUri));return o?r===lb||n===lb?e:e.filter((e=>e.id!==lb)):e}_setupAutoReload(){this._reloadSetUp||(this._reloadSetUp=!0,Gy(this._store.subscribe,(()=>this._mainURI()),(()=>this.load())),Gy(this._store.subscribe,(()=>[this._store.hasFetchedProfile(),this._store.profile().userid]),((e,[t])=>{t&&this.load()}),Ma))}_addGroupsToStore(e,t){!function(e){e.forEach((e=>{e.organization&&"object"==typeof e.organization||(e.organization=Yy)}))}(e)
704
+ ;const n=0===this._store.allGroups().length,r=this._store.getDefault("focusedGroup");this._store.loadGroups(e),n&&(t&&e.some((e=>e.id===t))?this.focus(t):r&&e.some((e=>e.id===r))&&this.focus(r))}_fetchGroup(e){return this._api.group.read({id:e,expand:Xy})}async _loadGroupsForUserAndDocument(){const e=()=>function(e,t){const n=t(e);return null!==n?Promise.resolve(n):new Promise((n=>{const r=e.subscribe((()=>{const o=t(e);null!==o&&(r(),n(o))}))}))}(this._store,(()=>this._mainURI()));let t=null;"sidebar"===this._store.route()&&(t=await e()),this._setupAutoReload();const n=this._store.directLinkedAnnotationId();let r=null;n&&(r=this._api.annotation.get({id:n}).catch((()=>null)));const o=this._store.directLinkedGroupId();let i=null;o&&(i=this._fetchGroup(o).then((e=>(this._store.clearDirectLinkedGroupFetchFailed(),e))).catch((()=>(this._store.setDirectLinkedGroupFetchFailed(),null))));const a={expand:Xy},s=this._serviceConfig?.authority;s&&(a.authority=s),t&&(a.document_uri=t)
705
+ ;const[l,c,u,d,h]=await Promise.all([this._api.profile.groups.read({expand:Xy}),this._api.groups.list(a),this._auth.getAccessToken(),r,i]);h&&!c.some((e=>e.id===h.id))&&c.push(h);let m=null;if(d){m=d.group;const e=l.concat(c).find((e=>e.id===d.group));if(!e)try{const e=await this._fetchGroup(d.group);c.push(e)}catch{this._toastMessenger.error("Unable to fetch group for linked annotation")}}const p=null!==u,f=await this._filterGroups(cb(l,c,t,this._settings),p,m,o),g=m||o||null;return this._addGroupsToStore(f,g),f}async _loadServiceSpecifiedGroups(e){const t=await this._api.profile.groups.read({expand:Xy});let n=null;const r=async e=>{try{return await this._fetchGroup(e)}catch(e){return n=e,null}},o=await Promise.all(e.map((e=>t.find((t=>t.id===e||t.groupid===e))||r(e)))),i=o.filter((e=>null!==e)),a=this._store.directLinkedGroupId();return this._addGroupsToStore(i,a),n&&this._toastMessenger.error(`Unable to fetch groups: ${n.message}`,{autoDismiss:!1}),i}async load(){const e=this._serviceConfig?.groups
706
+ ;if(Array.isArray(e)||(t=e,"function"==typeof t?.then)){let t=[];try{t=await e}catch(e){this._toastMessenger.error(`Unable to fetch group configuration: ${e.message}`)}return this._loadServiceSpecifiedGroups(t)}return this._loadGroupsForUserAndDocument();var t}focus(e){const t=this._store.focusedGroupId();this._store.focusGroup(e);const n=this._store.focusedGroupId();if(t!==n&&null!==t&&n){this._focusedMembersController?.abort();const e=this._store.newAnnotations().filter((e=>!_i(e))).map((e=>({...e,group:n})));e.length&&this._store.addAnnotations(e),this._store.setDefault("focusedGroup",n)}}leave(e){return this._api.group.member.delete({pubid:e,userid:"me"})}async loadFocusedGroupMembers(){const e=this._store.focusedGroupId();if(!e)return;this._focusedMembersController?.abort(),this._focusedMembersController=new AbortController;const{signal:t}=this._focusedMembersController;this._store.startLoadingFocusedGroupMembers();const n=await this._fetchAllMembers(e,t)
707
+ ;this._store.loadFocusedGroupMembers(t?.aborted?null:n)}async _fetchAllMembers(e,t){const n=await this._fetchMembers({groupId:e,signal:t}),r=Math.min(Math.ceil(n.meta.page.total/100),10);let o=n.data;for(let n=2;n<=r&&!t?.aborted;n++){const r=await this._fetchMembers({groupId:e,page:n,signal:t});o=o.concat(r.data)}return o}_fetchMembers({groupId:e,page:t=1,signal:n}){return this._api.group.members.read({pubid:e,"page[number]":t,"page[size]":100},void 0,n)}}Zy.$inject=["store","api","auth","settings","toastMessenger"];const Jy="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Qy=globalThis,e_="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,t_="9.13.0";function n_(){return r_(Qy),Qy}function r_(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||t_,t[t_]=t[t_]||{}}function o_(e,t,n=Qy){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[t_]=r[t_]||{};return o[e]||(o[e]=t())}const i_=["debug","info","warn","error","log","assert","trace"],a_={};function s_(e){if(!("console"in Qy))return e()
708
+ ;const t=Qy.console,n={},r=Object.keys(a_);r.forEach((e=>{const r=a_[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}const l_=o_("logger",(function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return e_?i_.forEach((n=>{t[n]=(...t)=>{e&&s_((()=>{Qy.console[n](`Sentry Logger [${n}]:`,...t)}))}})):i_.forEach((e=>{t[e]=()=>{}})),t})),c_=50,u_="?",d_=/\(error: (.*)\)/,h_=/captureMessage|captureException/;function m_(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0,r=0)=>{const o=[],i=e.split("\n");for(let e=n;e<i.length;e++){const n=i[e];if(n.length>1024)continue;const a=d_.test(n)?n.replace(d_,"$1"):n;if(!a.match(/\S*Error: /)){for(const e of t){const t=e(a);if(t){o.push(t);break}}if(o.length>=c_+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(p_(t).function||"")&&t.pop();t.reverse(),h_.test(p_(t).function||"")&&(t.pop(),h_.test(p_(t).function||"")&&t.pop());return t.slice(0,c_).map((e=>({...e,
709
+ filename:e.filename||p_(t).filename,function:e.function||u_})))}(o.slice(r))}}function p_(e){return e[e.length-1]||{}}const f_="<anonymous>";function g_(e){try{return e&&"function"==typeof e&&e.name||f_}catch(e){return f_}}function v_(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch(e){return}}}const b_={},y_={};function __(e,t){b_[e]=b_[e]||[],b_[e].push(t)}function w_(e,t){if(!y_[e]){y_[e]=!0;try{t()}catch(t){e_&&l_.error(`Error while instrumenting ${e}`,t)}}}function x_(e,t){const n=e&&b_[e];if(n)for(const r of n)try{r(t)}catch(t){e_&&l_.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${g_(r)}\nError:`,t)}}let k_=null;function N_(){k_=Qy.onerror,Qy.onerror=function(e,t,n,r,o){return x_("error",{column:r,error:o,line:n,msg:e,url:t}),!!k_&&k_.apply(this,arguments)},Qy.onerror.__SENTRY_INSTRUMENTED__=!0}let S_=null;function A_(){S_=Qy.onunhandledrejection,Qy.onunhandledrejection=function(e){
710
+ return x_("unhandledrejection",e),!S_||S_.apply(this,arguments)},Qy.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const E_=1e3;function T_(){return Date.now()/E_}const C_=function(){const{performance:e}=Qy;if(!e?.now)return T_;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/E_}(),M_=Object.prototype.toString;function I_(e){switch(M_.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return $_(e,Error)}}function z_(e,t){return M_.call(e)===`[object ${t}]`}function L_(e){return z_(e,"ErrorEvent")}function O_(e){return z_(e,"DOMError")}function R_(e){return z_(e,"String")}function P_(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function D_(e){return null===e||P_(e)||"object"!=typeof e&&"function"!=typeof e}function F_(e){return z_(e,"Object")}function H_(e){return"undefined"!=typeof Event&&$_(e,Event)}function B_(e){
711
+ return Boolean(e?.then&&"function"==typeof e.then)}function $_(e,t){try{return e instanceof t}catch(e){return!1}}function j_(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const q_=Qy,U_=80;function G_(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let i=0,a=0;const s=" > ",l=s.length;let c;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||U_;for(;n&&i++<r&&(c=V_(n,u),!("html"===c||i>1&&a+o.length*l+c.length>=d));)o.push(c),a+=c.length,n=n.parentNode;return o.reverse().join(s)}catch(e){return"<unknown>"}}function V_(e,t){const n=e,r=[];if(!n?.tagName)return"";if(q_.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const o=t?.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(o?.length)o.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else{n.id&&r.push(`#${n.id}`)
712
+ ;const e=n.className;if(e&&R_(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const i=["aria-label","type","name","title","alt"];for(const e of i){const t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join("")}function W_(){try{return q_.document.location.href}catch(e){return""}}function K_(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function Y_(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{j_(r)?n.push("[VueViewModel]"):n.push(String(r))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)}function X_(e,t,n=!1){return!!R_(e)&&(z_(t,"RegExp")?t.test(e):!!R_(t)&&(n?e===t:e.includes(t)))}function Z_(e,t=[],n=!1){return t.some((t=>X_(e,t,n)))}function J_(e,t,n){if(!(t in e))return;const r=e[t];if("function"!=typeof r)return;const o=n(r);"function"==typeof o&&ew(o,r);try{e[t]=o}catch{e_&&l_.log(`Failed to replace method "${t}" in object`,e)}}function Q_(e,t,n){try{Object.defineProperty(e,t,{value:n,
713
+ writable:!0,configurable:!0})}catch(n){e_&&l_.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function ew(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Q_(e,"__sentry_original__",t)}catch(e){}}function tw(e){return e.__sentry_original__}function nw(e){if(I_(e))return{message:e.message,name:e.name,stack:e.stack,...ow(e)};if(H_(e)){const t={type:e.type,target:rw(e.target),currentTarget:rw(e.currentTarget),...ow(e)};return"undefined"!=typeof CustomEvent&&$_(e,CustomEvent)&&(t.detail=e.detail),t}return e}function rw(e){try{return t=e,"undefined"!=typeof Element&&$_(t,Element)?G_(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}var t}function ow(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function iw(e=function(){const e=Qy;return e.crypto||e.msCrypto}()){let t=()=>16*Math.random();try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"");e?.getRandomValues&&(t=()=>{
714
+ const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&t())>>e/4).toString(16)))}function aw(e){return e.exception?.values?.[0]}function sw(e){const{message:t,event_id:n}=e;if(t)return t;const r=aw(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function lw(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function cw(e,t){const n=aw(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r?.data,...t.data};n.mechanism.data=e}}function uw(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{Q_(e,"__sentry_captured__",!0)}catch(e){}return!1}var dw;function hw(e){return new pw((t=>{t(e)}))}function mw(e){return new pw(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"
715
+ }(dw||(dw={}));class pw{constructor(e){this._state=dw.PENDING,this._handlers=[],this._runExecutor(e)}then(e,t){return new pw(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new pw(((t,n)=>{let r,o;return this.then((t=>{o=!1,r=t,e&&e()}),(t=>{o=!0,r=t,e&&e()})).then((()=>{o?n(r):t(r)}))}))}_executeHandlers(){if(this._state===dw.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===dw.RESOLVED&&e[1](this._value),this._state===dw.REJECTED&&e[2](this._value),e[0]=!0)}))}_runExecutor(e){const t=(e,t)=>{this._state===dw.PENDING&&(B_(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(dw.RESOLVED,e)},r=e=>{t(dw.REJECTED,e)};try{e(n,r)}catch(e){r(e)}}}function fw(e){const t=C_(),n={sid:iw(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,
716
+ toJSON:()=>function(e){return{sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}(n)};return e&&gw(n,e),n}function gw(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||C_(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:iw()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{
717
+ const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function vw(){return iw()}function bw(){return iw().substring(16)}function yw(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=yw(r[e],t[e],n-1));return r}const _w="_sentrySpan";function ww(e,t){t?Q_(e,_w,t):delete e[_w]}function xw(e){return e[_w]}class kw{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:vw(),sampleRand:Math.random()}}clone(){const e=new kw
718
+ ;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,ww(e,xw(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&gw(this._session,{user:e}),
719
+ this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this
720
+ ;const t="function"==typeof e?e(this):e,n=t instanceof kw?t.getScopeData():F_(t)?e:void 0,{tags:r,extra:o,user:i,contexts:a,level:s,fingerprint:l=[],propagationContext:c}=n||{};return this._tags={...this._tags,...r},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),s&&(this._level=s),l.length&&(this._fingerprint=l),c&&(this._propagationContext=c),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,ww(this,void 0),this._attachments=[],this.setPropagationContext({traceId:vw(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:T_(),...e,message:e.message?K_(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),
721
+ this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:xw(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=yw(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t?.event_id||iw()
722
+ ;if(!this._client)return l_.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n?.event_id||iw();if(!this._client)return l_.warn("No client configured on scope - will not capture message!"),r;const o=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureEvent(e,t){const n=t?.event_id||iw();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(l_.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}class Nw{constructor(e,t){let n,r;n=e||new kw,r=t||new kw,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{
723
+ n=e(t)}catch(e){throw this._popScope(),e}return B_(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Sw(){const e=r_(n_());return e.stack=e.stack||new Nw(o_("defaultCurrentScope",(()=>new kw)),o_("defaultIsolationScope",(()=>new kw)))}function Aw(e){return Sw().withScope(e)}function Ew(e,t){const n=Sw();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function Tw(e){return Sw().withScope((()=>e(Sw().getIsolationScope())))}function Cw(e){const t=r_(e);return t.acs?t.acs:{withIsolationScope:Tw,withScope:Aw,withSetScope:Ew,withSetIsolationScope:(e,t)=>Tw(t),getCurrentScope:()=>Sw().getScope(),
724
+ getIsolationScope:()=>Sw().getIsolationScope()}}function Mw(){return Cw(n_()).getCurrentScope()}function Iw(){return Cw(n_()).getIsolationScope()}function zw(){return Mw().getClient()}function Lw(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,i={trace_id:n,span_id:o||bw()};return r&&(i.parent_span_id=r),i}const Ow="sentry.source",Rw="sentry.sample_rate",Pw="sentry.op",Dw="sentry.origin",Fw="sentry.profile_id",Hw="sentry.exclusive_time",Bw=0,$w=1,jw="_sentryScope",qw="_sentryIsolationScope";function Uw(e){return{scope:e[jw],isolationScope:e[qw]}}const Gw="sentry-",Vw=/^sentry-/;function Ww(e){const t=function(e){if(!e||!R_(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce(((e,t)=>{const n=Kw(t);return Object.entries(n).forEach((([t,n])=>{e[t]=n})),e}),{});return Kw(e)}(e);if(!t)return;const n=Object.entries(t).reduce(((e,[t,n])=>{if(t.match(Vw)){e[t.slice(Gw.length)]=n}return e}),{});return Object.keys(n).length>0?n:void 0}function Kw(e){
725
+ return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(t&&n&&(e[t]=n),e)),{})}const Yw=1;let Xw=!1;function Zw(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:tx(e).parent_span_id,i=Uw(e).scope;return{parent_span_id:o,span_id:r?i?.getPropagationContext().propagationSpanId||bw():t,trace_id:n}}function Jw(e){return e&&e.length>0?e.map((({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:o})=>({span_id:e,trace_id:t,sampled:n===Yw,attributes:o,...r}))):void 0}function Qw(e){return"number"==typeof e?ex(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ex(e.getTime()):C_()}function ex(e){return e>9999999999?e/1e3:e}function tx(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:o,name:i,endTime:a,parentSpanId:s,status:l,links:c}=e;return{span_id:t,
726
+ trace_id:n,data:r,description:i,parent_span_id:s,start_timestamp:Qw(o),timestamp:Qw(a)||void 0,status:nx(l),op:r[Pw],origin:r[Dw],links:Jw(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function nx(e){if(e&&e.code!==Bw)return e.code===$w?"ok":e.message||"unknown_error"}const rx="_sentryRootSpan";function ox(e){return e[rx]||e}function ix(){Xw||(s_((()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")})),Xw=!0)}const ax="production",sx="_frozenDsc";function lx(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||ax,release:n.release,public_key:r,trace_id:e};return t.emit("createDsc",o),o}function cx(e){const t=zw();if(!t)return{};const n=ox(e),r=tx(n),o=r.data,i=n.spanContext().traceState,a=i?.get("sentry.sample_rate")??o[Rw];function s(e){return"number"!=typeof a&&"string"!=typeof a||(e.sample_rate=`${a}`),e}const l=n[sx];if(l)return s(l)
727
+ ;const c=i?.get("sentry.dsc"),u=c&&Ww(c);if(u)return s(u);const d=lx(e.spanContext().traceId,t),h=o[Ow],m=r.description;return"url"!==h&&m&&(d.transaction=m),function(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||zw()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}()&&(d.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return t===Yw}(n)),d.sample_rand=i?.get("sentry.sample_rand")??Uw(n).scope?.getPropagationContext().sampleRand.toString()),s(d),t.emit("createDsc",d,n),d}const ux=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function dx(e,t=!1){const{host:n,path:r,pass:o,port:i,projectId:a,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${a}`}function hx(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function mx(e){const t="string"==typeof e?function(e){const t=ux.exec(e)
728
+ ;if(!t)return void s_((()=>{console.error(`Invalid Sentry Dsn: ${e}`)}));const[n,r,o="",i="",a="",s=""]=t.slice(1);let l="",c=s;const u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){const e=c.match(/^\d+/);e&&(c=e[0])}return hx({host:i,pass:o,path:l,projectId:c,port:a,protocol:n,publicKey:r})}(e):hx(e);if(t&&function(e){if(!e_)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(l_.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(l_.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(l_.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(l_.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function px(e,t=100,n=1/0){try{return gx("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function fx(e,t=3,n=102400){const r=px(e,t);return o=r,function(e){return~-encodeURI(e).split(/%..|./).length
729
+ }(JSON.stringify(o))>n?fx(e,t-1,n):r;var o}function gx(e,t,n=1/0,r=1/0,o=function(){const e=new WeakSet;function t(t){return!!e.has(t)||(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}()){const[i,a]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const s=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(j_(t))return"[VueViewModel]";if(F_(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${g_(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=function(e){const t=Object.getPrototypeOf(e)
730
+ ;return t?.constructor?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const l="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===l)return s.replace("object ","");if(i(t))return"[Circular ~]";const c=t;if(c&&"function"==typeof c.toJSON)try{return gx("",c.toJSON(),l-1,r,o)}catch(e){}const u=Array.isArray(t)?[]:{};let d=0;const h=nw(t);for(const e in h){if(!Object.prototype.hasOwnProperty.call(h,e))continue;if(d>=r){u[e]="[MaxProperties ~]";break}const t=h[e];u[e]=gx(e,t,l-1,r,o),d++}return a(t),u}function vx(e,t=[]){return[e,t]}function bx(e,t){const[n,r]=e;return[n,[...r,t]]}function yx(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function _x(e){const t=r_(Qy)
731
+ ;return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function wx(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[_x(r),e]:r.push("string"==typeof e?_x(e):e)}for(const e of n){const[t,n]=e;if(o(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(px(n))}o(e)}}return"string"==typeof r?r:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(r)}function xx(e){const t="string"==typeof e.data?_x(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const kx={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",
732
+ check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",otel_log:"log_item"};function Nx(e){return kx[e]}function Sx(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ax(e,t,n,r){const o=Sx(n),i=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n?.sdk);const a=function(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:dx(r)},...o&&{trace:o}}}(e,o,r,t);delete e.sdkProcessingMetadata;return vx(a,[[{type:i},e]])}function Ex(e,t,n,r=0){return new pw(((o,i)=>{const a=e[r];if(null===t||"function"!=typeof a)o(t);else{const s=a({...t},n);Jy&&a.id&&null===s&&l_.log(`Event processor "${a.id}" dropped event`),
733
+ B_(s)?s.then((t=>Ex(e,t,n,r+1).then(o))).then(null,i):Ex(e,s,n,r+1).then(o).then(null,i)}}))}let Tx,Cx,Mx;function Ix(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:i,level:a,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra});Object.keys(r).length&&(e.tags={...r,...e.tags});Object.keys(o).length&&(e.user={...o,...e.user});Object.keys(i).length&&(e.contexts={...i,...e.contexts});a&&(e.level=a);s&&"transaction"!==e.type&&(e.transaction=s)}(e,t),r&&function(e,t){e.contexts={trace:Zw(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:cx(t),...e.sdkProcessingMetadata};const n=ox(t),r=tx(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint.length||delete e.fingerprint}(e,n),function(e,t){
734
+ const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,i)}function zx(e,t){const{extra:n,tags:r,user:o,contexts:i,level:a,sdkProcessingMetadata:s,breadcrumbs:l,fingerprint:c,eventProcessors:u,attachments:d,propagationContext:h,transactionName:m,span:p}=t;Lx(e,"extra",n),Lx(e,"tags",r),Lx(e,"user",o),Lx(e,"contexts",i),e.sdkProcessingMetadata=yw(e.sdkProcessingMetadata,s,2),a&&(e.level=a),m&&(e.transactionName=m),p&&(e.span=p),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...h}}function Lx(e,t,n){e[t]=yw(e[t],n,1)}function Ox(e,t,n,r,o,i){const{normalizeDepth:a=3,normalizeMaxBreadth:s=1e3}=e,l={...t,event_id:t.event_id||n.event_id||iw(),timestamp:t.timestamp||T_()},c=n.integrations||e.integrations.map((e=>e.name))
735
+ ;!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:i=250}=t;e.environment=e.environment||n||ax,!e.release&&r&&(e.release=r);!e.dist&&o&&(e.dist=o);const a=e.request;a?.url&&(a.url=K_(a.url,i))}(l,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(l,c),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=Qy._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return Mx&&n.length===Cx||(Cx=n.length,Mx=n.reduce(((n,r)=>{Tx||(Tx={});const o=Tx[r];if(o)n[o[0]]=o[1];else{const o=e(r);for(let e=o.length-1;e>=0;e--){const i=o[e],a=i?.filename,s=t[r];if(a&&s){n[a]=s,Tx[r]=[a,s];break}}}return n}),{})),Mx}(t);e.exception?.values?.forEach((e=>{e.stacktrace?.frames?.forEach((e=>{e.filename&&(e.debug_id=n[e.filename])}))}))}(l,e.stackParser);const u=function(e,t){if(!t)return e;const n=e?e.clone():new kw;return n.update(t),n}(r,n.captureContext);n.mechanism&&cw(l,n.mechanism)
736
+ ;const d=o?o.getEventProcessors():[],h=o_("globalScope",(()=>new kw)).getScopeData();if(i){zx(h,i.getScopeData())}if(u){zx(h,u.getScopeData())}const m=[...n.attachments||[],...h.attachments];m.length&&(n.attachments=m),Ix(l,h);return Ex([...d,...h.eventProcessors],l,n).then((e=>(e&&function(e){const t={};if(e.exception?.values?.forEach((e=>{e.stacktrace?.frames?.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))})),0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach((([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})}))}(e),"number"==typeof a&&a>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:px(e.data,t,n)}})))},...e.user&&{user:px(e.user,t,n)},...e.contexts&&{contexts:px(e.contexts,t,n)},...e.extra&&{extra:px(e.extra,t,n)}}
737
+ ;e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=px(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:px(e.data,t,n)}}))));e.contexts?.flags&&r.contexts&&(r.contexts.flags=px(e.contexts.flags,3,n));return r}(e,a,s):e)))}function Rx(e){if(e)return function(e){return e instanceof kw||"function"==typeof e}(e)||function(e){return Object.keys(e).some((e=>Px.includes(e)))}(e)?{captureContext:e}:e}const Px=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Dx(e,t){return Mw().captureException(e,Rx(t))}function Fx(e,t){return Mw().captureEvent(e,t)}function Hx(e,t){Iw().setExtra(e,t)}function Bx(e){const t=Iw(),n=Mw(),{userAgent:r}=Qy.navigator||{},o=fw({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),i=t.getSession();return"ok"===i?.status&&gw(i,{status:"exited"}),$x(),t.setSession(o),o}function $x(){const e=Iw(),t=Mw().getSession()||e.getSession();t&&function(e,t){
738
+ let n={};"ok"===e.status&&(n={status:"exited"}),gw(e,n)}(t),jx(),e.setSession()}function jx(){const e=Iw(),t=zw(),n=e.getSession();n&&t&&t.captureSession(n)}function qx(e=!1){e?$x():jx()}const Ux="7";function Gx(e,t,n){return t||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:Ux};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}const Vx=[];function Wx(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach((e=>{e.isDefaultInstance=!0})),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.values(t)}(r)}function Kx(e,t){
739
+ for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Yx(e,t,n){if(n[t.name])Jy&&l_.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===Vx.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),Vx.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}Jy&&l_.log(`Integration installed: ${t.name}`)}}function Xx(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch(e){}return t}
740
+ const Zx="Not capturing exception because it's already been captured.",Jx="Discarded session because of missing or non-string release",Qx=Symbol.for("SentryInternalError"),ek=Symbol.for("SentryDoNotSendEventError");function tk(e){return{message:e,[Qx]:!0}}function nk(e){return{message:e,[ek]:!0}}function rk(e){return!!e&&"object"==typeof e&&Qx in e}function ok(e){return!!e&&"object"==typeof e&&ek in e}class ik{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=mx(e.dsn):Jy&&l_.warn("No DSN provided, client will not send events."),this._dsn){const t=Gx(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){const r=iw();if(uw(e))return Jy&&l_.log(Zx),r;const o={event_id:r,...t}
741
+ ;return this._process(this.eventFromException(e,o).then((e=>this._captureEvent(e,o,n)))),o.event_id}captureMessage(e,t,n,r){const o={event_id:iw(),...n},i=P_(e)?e:String(e),a=D_(e)?this.eventFromMessage(i,t,o):this.eventFromException(e,o);return this._process(a.then((e=>this._captureEvent(e,o,r)))),o.event_id}captureEvent(e,t,n){const r=iw();if(t?.originalException&&uw(t.originalException))return Jy&&l_.log(Zx),r;const o={event_id:r,...t},i=e.sdkProcessingMetadata||{},a=i.capturedSpanScope,s=i.capturedSpanIsolationScope;return this._process(this._captureEvent(e,o,a||n,s)),o.event_id}captureSession(e){this.sendSession(e),gw(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):hw(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit("close"),e)))}
742
+ getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];Yx(this,e,this._integrations),t||Kx(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=Ax(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=bx(n,xx(e));const r=this.sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const{release:t,environment:n=ax}=this._options;if("aggregates"in e){const r=e.attrs||{};if(!r.release&&!t)return void(Jy&&l_.warn(Jx));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(Jy&&l_.warn(Jx));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=function(e,t,n,r){const o=Sx(n)
743
+ ;return vx({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:dx(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){const r=`${e}:${t}`;Jy&&l_.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach((e=>e(...t)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(Jy&&l_.error("Error while sending envelope:",e),e))):(Jy&&l_.error("Transport disabled"),hw({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach((t=>{t&&Yx(e,t,n)})),n}(this,e),Kx(this,e)}_updateSessionFromEvent(e,t){
744
+ let n="fatal"===t.level,r=!1;const o=t.exception?.values;if(o){r=!0;for(const e of o){const t=e.mechanism;if(!1===t?.handled){n=!0;break}}}const i="ok"===e.status;(i&&0===e.errors||i&&n)&&(gw(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new pw((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const o=this.getOptions(),i=Object.keys(this._integrations);return!t.integrations&&i?.length&&(t.integrations=i),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Ox(o,e,t,n,this,r).then((e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:Lw(n),...e.contexts};const r=function(e,t){const n=t.getPropagationContext();return n.dsc||lx(n.traceId,e)}(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:r,
745
+ ...e.sdkProcessingMetadata},e}))}_captureEvent(e,t={},n=Mw(),r=Iw()){return Jy&&ak(e)&&l_.log(`Captured error event \`${Xx(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then((e=>e.event_id),(e=>{Jy&&(ok(e)?l_.log(e.message):rk(e)?l_.warn(e.message):l_.warn(e))}))}_processEvent(e,t,n,r){const o=this.getOptions(),{sampleRate:i}=o,a=sk(e),s=ak(e),l=e.type||"error",c=`before send for type \`${l}\``,u=void 0===i?void 0:function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}(i);if(s&&"number"==typeof u&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error"),mw(nk(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));const d="replay_event"===l?"replay":l;return this._prepareEvent(e,t,n,r).then((e=>{if(null===e)throw this.recordDroppedEvent("event_processor",d),nk("An event processor returned `null`, will not send event.");if(t.data&&!0===t.data.__sentry__)return e
746
+ ;const n=function(e,t,n,r){const{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:a}=t;let s=n;if(ak(s)&&o)return o(s,r);if(sk(s)){if(a){const e=a(function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:i,data:a,op:s}=e.contexts?.trace??{};return{data:a??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:a?.[Fw],exclusive_time:a?.[Hw],measurements:e.measurements,is_segment:!0}}(s));if(e?s=yw(n,{type:"transaction",timestamp:(l=e).timestamp,start_timestamp:l.start_timestamp,transaction:l.description,contexts:{trace:{trace_id:l.trace_id,span_id:l.span_id,parent_span_id:l.parent_span_id,op:l.op,status:l.status,origin:l.origin,data:{...l.data,...l.profile_id&&{[Fw]:l.profile_id},...l.exclusive_time&&{[Hw]:l.exclusive_time}}}},measurements:l.measurements}):ix(),s.spans){const e=[];for(const t of s.spans){const n=a(t);n?e.push(n):(ix(),e.push(t))}s.spans=e}}if(i){if(s.spans){
747
+ const e=s.spans.length;s.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(s,r)}}var l;return s}(0,o,e,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(B_(e))return e.then((e=>{if(!F_(e)&&null!==e)throw tk(n);return e}),(e=>{throw tk(`${t} rejected with ${e}`)}));if(!F_(e)&&null!==e)throw tk(n);return e}(n,c)})).then((o=>{if(null===o){if(this.recordDroppedEvent("before_send",d),a){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw nk(`${c} returned \`null\`, will not send event.`)}const i=n.getSession()||r.getSession();if(s&&i&&this._updateSessionFromEvent(i,o),a){const e=(o.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(o.spans?o.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const l=o.transaction_info;if(a&&l&&o.transaction!==e.transaction){const e="custom";o.transaction_info={...l,source:e}}return this.sendEvent(o,t),o})).then(null,(e=>{if(ok(e)||rk(e))throw e
748
+ ;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),tk(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}}))}_flushOutcomes(){Jy&&l_.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(Jy&&l_.log("No outcomes to send"));if(!this._dsn)return void(Jy&&l_.log("No dsn provided, will not send outcomes"));Jy&&l_.log("Sending outcomes:",e);const t=(n=e,vx((r=this._options.tunnel&&dx(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:T_(),discarded_events:n}]]));var n,r;this.sendEnvelope(t)}}function ak(e){return void 0===e.type}function sk(e){return"transaction"===e.type}function lk(e){return[{type:"otel_log"
749
+ },e]}const ck=new WeakMap;function uk(e,t){const n=ck.get(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=dx(r)),vx(o,e.map(lk))}(n,r._metadata,r.tunnel,e.getDsn());n.length=0,e.emit("flushLogs"),e.sendEnvelope(o)}function dk(e,t){!0===t.debug&&(Jy?l_.enable():s_((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})));Mw().update(t.initialScope);const n=new e(t);return function(e){Mw().setClient(e)}(n),n.init(),n}const hk=Symbol.for("SentryBufferFullError");function mk(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return mw(hk);const o=r();return-1===t.indexOf(o)&&t.push(o),o.then((()=>n(o))).then(null,(()=>n(o).then(null,(()=>{})))),o},drain:function(e){return new pw(((n,r)=>{let o=t.length;if(!o)return n(!0);const i=setTimeout((()=>{e&&e>0&&n(!1)}),e)
750
+ ;t.forEach((e=>{hw(e).then((()=>{--o||(clearTimeout(i),n(!0))}),r)}))}))}}}const pk=6e4;function fk(e,{statusCode:t,headers:n},r=Date.now()){const o={...e},i=n?.["x-sentry-rate-limits"],a=n?.["retry-after"];if(i)for(const e of i.trim().split(",")){const[t,n,,,i]=e.split(":",5),a=parseInt(t,10),s=1e3*(isNaN(a)?60:a);if(n)for(const e of n.split(";"))"metric_bucket"===e&&i&&!i.split(";").includes("custom")||(o[e]=r+s);else o.all=r+s}else a?o.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?pk:r-t}(a,r):429===t&&(o.all=r+6e4);return o}const gk=64;function vk(e,t,n=mk(e.bufferSize||gk)){let r={};return{send:function(o){const i=[];if(yx(o,((t,n)=>{const o=Nx(n);!function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,o)?i.push(t):e.recordDroppedEvent("ratelimit_backoff",o)})),0===i.length)return hw({});const a=vx(o[0],i),s=t=>{yx(a,((n,r)=>{e.recordDroppedEvent(t,Nx(r))}))};return n.add((()=>t({body:wx(a)
751
+ }).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&Jy&&l_.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=fk(r,e),e)),(e=>{throw s("network_error"),Jy&&l_.error("Encountered error running transport request:",e),e})))).then((e=>e),(e=>{if(e===hk)return Jy&&l_.error("Skipped sending event because buffer is full."),s("queue_overflow"),hw({});throw e}))},flush:e=>n.drain(e)}}function bk(e){void 0===e.user?.ip_address&&(e.user={...e.user,ip_address:"{{auto}}"})}function yk(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}const _k=100;function wk(e,t){const n=zw(),r=Iw();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=_k}=n.getOptions();if(i<=0)return;const a={timestamp:T_(),...e},s=o?s_((()=>o(a,t))):a;null!==s&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,i))}let xk;const kk=new WeakMap,Nk=()=>({name:"FunctionToString",setupOnce(){
752
+ xk=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=tw(this),n=kk.has(zw())&&void 0!==t?t:this;return xk.apply(n,e)}}catch{}},setup(e){kk.set(e,!0)}}),Sk=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],Ak=(e={})=>{let t;return{name:"EventFilters",setup(n){const r=n.getOptions();t=Tk(e,r)},processEvent(n,r,o){if(!t){const n=o.getOptions();t=Tk(e,n)}return function(e,t){
753
+ if(e.type){if("transaction"===e.type&&function(e,t){if(!t?.length)return!1;const n=e.transaction;return!!n&&Z_(n,t)}(e,t.ignoreTransactions))return Jy&&l_.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${sw(e)}`),!0}else{if(function(e,t){if(!t?.length)return!1;return Xx(e).some((e=>Z_(e,t)))}(e,t.ignoreErrors))return Jy&&l_.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${sw(e)}`),!0;if(function(e){if(!e.exception?.values?.length)return!1;return!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))}(e))return Jy&&l_.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${sw(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=Ck(e);return!!n&&Z_(n,t)}(e,t.denyUrls))return Jy&&l_.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${sw(e)}.\nUrl: ${Ck(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=Ck(e);return!n||Z_(n,t)
754
+ }(e,t.allowUrls))return Jy&&l_.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${sw(e)}.\nUrl: ${Ck(e)}`),!0}return!1}(n,t)?null:n}}},Ek=(e={})=>({...Ak(e),name:"InboundFilters"});function Tk(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Sk],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Ck(e){try{const t=[...e.exception?.values??[]].reverse().find((e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length)),n=t?.stacktrace?.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch(t){return Jy&&l_.error(`Cannot extract url for event ${sw(e)}`),null}}function Mk(e,t,n,r,o,i){if(!o.exception?.values||!i||!$_(i.originalException,Error))return
755
+ ;const a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=Ik(e,t,r,i.originalException,n,o.exception.values,a,0))}function Ik(e,t,n,r,o,i,a,s){if(i.length>=n+1)return i;let l=[...i];if($_(r[o],Error)){zk(a,s);const i=e(t,r[o]),c=l.length;Lk(i,o,c,s),l=Ik(e,t,n,r[o],o,[i,...l],i,c)}return Array.isArray(r.errors)&&r.errors.forEach(((r,i)=>{if($_(r,Error)){zk(a,s);const c=e(t,r),u=l.length;Lk(c,`errors[${i}]`,u,s),l=Ik(e,t,n,r,o,[c,...l],c,u)}})),l}function zk(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function Lk(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Ok(){"console"in Qy&&i_.forEach((function(e){e in Qy.console&&J_(Qy.console,e,(function(t){return a_[e]=t,function(...t){x_("console",{args:t,level:e});const n=a_[e]
756
+ ;n?.apply(Qy.console,t)}}))}))}function Rk(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Pk=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!Fk(e,t))return!1;if(!Dk(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=Hk(t),r=Hk(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Fk(e,t))return!1;if(!Dk(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return Jy&&l_.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}};function Dk(e,t){let n=v_(e),r=v_(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],o=n[e];if(t.filename!==o.filename||t.lineno!==o.lineno||t.colno!==o.colno||t.function!==o.function)return!1}return!0}function Fk(e,t){
757
+ let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(e){return!1}}function Hk(e){return e.exception?.values&&e.exception.values[0]}function Bk(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function $k(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const jk=Qy;function qk(){if(!("fetch"in jk))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function Uk(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Gk(e,t){const n="fetch";__(n,e),w_(n,(()=>function(e,t=!1){if(t&&!function(){if("string"==typeof EdgeRuntime)return!0;if(!qk())return!1;if(Uk(jk.fetch))return!0;let e=!1;const t=jk.document;if(t&&"function"==typeof t.createElement)try{
758
+ const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Uk(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){e_&&l_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}())return;J_(Qy,"fetch",(function(e){return function(...t){const n=new Error,{method:r,url:o}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Wk(t),method:Vk(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Wk(t),method:Vk(t,"method")?String(t.method).toUpperCase():"GET"}}(t),i={args:t,fetchData:{method:r,url:o},startTimestamp:1e3*C_(),virtualError:n,headers:Kk(t)};return x_("fetch",{...i}),e.apply(Qy,t).then((async e=>(x_("fetch",{...i,endTimestamp:1e3*C_(),response:e}),e)),(e=>{if(x_("fetch",{...i,endTimestamp:1e3*C_(),error:e}),I_(e)&&void 0===e.stack&&(e.stack=n.stack,Q_(e,"framesToPop",1)),
759
+ e instanceof TypeError&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const t=new URL(i.fetchData.url);e.message=`${e.message} (${t.host})`}catch{}throw e}))}}))}(0,t)))}function Vk(e,t){return!!e&&"object"==typeof e&&!!e[t]}function Wk(e){return"string"==typeof e?e:e?Vk(e,"url")?e.url:e.toString?e.toString():"":""}function Kk(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(r=t,"undefined"!=typeof Request&&$_(r,Request))return new Headers(t.headers)}catch{}var r}const Yk=Qy;let Xk=0;function Zk(){return Xk>0}function Jk(e,t={}){if(!function(e){return"function"==typeof e}(e))return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(tw(e))return e}catch(t){return e}const n=function(...n){try{const r=n.map((e=>Jk(e,t)));return e.apply(this,r)}catch(e){throw Xk++,setTimeout((()=>{Xk--})),function(...e){const t=Cw(n_());if(2===e.length){const[n,r]=e
760
+ ;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}((r=>{r.addEventProcessor((e=>(t.mechanism&&(lw(e,void 0),cw(e,t.mechanism)),e.extra={...e.extra,arguments:n},e))),Dx(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}ew(n,e),Q_(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function Qk(e,t){const n=nN(e,t),r={type:iN(t),value:aN(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function eN(e,t,n,r){const o=zw(),i=o?.getOptions().normalizeDepth,a=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}return}(t),s={__serialized__:fx(t,i)};if(a)return{exception:{values:[Qk(e,a)]},extra:s};const l={exception:{values:[{type:H_(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:cN(t,{isUnhandledRejection:r})}]},extra:s
761
+ };if(n){const t=nN(e,n);t.length&&(l.exception.values[0].stacktrace={frames:t})}return l}function tN(e,t){return{exception:{values:[Qk(e,t)]}}}function nN(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&rN.test(e.message))return 1;return 0}(t),o=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,o)}catch(e){}return[]}const rN=/Minified React error #\d+;/i;function oN(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function iN(e){const t=e?.name;if(!t&&oN(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function aN(e){const t=e?.message;return oN(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function sN(e,t,n,r,o){let i;if(L_(t)&&t.error){return tN(e,t.error)}if(O_(t)||z_(t,"DOMException")){const o=t
762
+ ;if("stack"in t)i=tN(e,t);else{const t=o.name||(O_(o)?"DOMError":"DOMException"),a=o.message?`${t}: ${o.message}`:t;i=lN(e,a,n,r),lw(i,a)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}if(I_(t))return tN(e,t);if(F_(t)||H_(t)){return i=eN(e,t,n,o),cw(i,{synthetic:!0}),i}return i=lN(e,t,n,r),lw(i,`${t}`),cw(i,{synthetic:!0}),i}function lN(e,t,n,r){const o={};if(r&&n){const r=nN(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),cw(o,{synthetic:!0})}if(P_(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}function cN(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(nw(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return K_(r,t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:K_(r,t)}return""}(e),r=t?"promise rejection":"exception"
763
+ ;if(L_(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(H_(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}class uN extends ik{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};!function(e,t,n=[t],r="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map((e=>({name:`${r}:@sentry/${e}`,version:t_}))),version:t_}),e._metadata=o}(t,"browser",["browser"],Yk.SENTRY_SDK_SOURCE||"npm"),super(t);const n=this,{sendDefaultPii:r,_experiments:o}=n._options,i=o?.enableLogs;t.sendClientReports&&Yk.document&&Yk.document.addEventListener("visibilitychange",(()=>{"hidden"===Yk.document.visibilityState&&(this._flushOutcomes(),i&&uk(n))})),i&&(n.on("flush",(()=>{uk(n)})),n.on("afterCaptureLog",(()=>{n._logFlushIdleTimeout&&clearTimeout(n._logFlushIdleTimeout),
764
+ n._logFlushIdleTimeout=setTimeout((()=>{uk(n)}),5e3)}))),r&&(n.on("postprocessEvent",bk),n.on("beforeSendSession",yk))}eventFromException(e,t){return function(e,t,n,r){const o=sN(e,t,n?.syntheticException||void 0,r);return cw(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),hw(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const i=lN(e,t,r?.syntheticException||void 0,o);return i.level=n,r?.event_id&&(i.event_id=r.event_id),hw(i)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}}const dN="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,hN=Qy,mN=1e3;let pN,fN,gN,vN;function bN(){if(!hN.document)return;const e=x_.bind(null,"dom"),t=yN(e,!0);hN.document.addEventListener("click",t,!1),hN.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=hN,r=n[t]?.prototype
765
+ ;r?.hasOwnProperty?.("addEventListener")&&(J_(r,"addEventListener",(function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},i=r[n]=r[n]||{refCount:0};if(!i.handler){const r=yN(e);i.handler=r,t.call(this,n,r,o)}i.refCount++}catch(e){}return t.call(this,n,r,o)}})),J_(r,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},o=n[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}})))}))}function yN(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch(e){return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return
766
+ ;Q_(n,"_sentryCaptured",!0),r&&!r._sentryId&&Q_(r,"_sentryId",iw());const o="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==fN)return!1;try{if(!e.target||e.target._sentryId!==gN)return!1}catch(e){}return!0}(n)){e({event:n,name:o,global:t}),fN=n.type,gN=r?r._sentryId:void 0}clearTimeout(pN),pN=hN.setTimeout((()=>{gN=void 0,fN=void 0}),mN)}}function _N(e){const t="history";__(t,e),w_(t,wN)}function wN(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=vN,o=String(n);if(vN=o,r===o)return e.apply(this,t);x_("history",{from:r,to:o})}return e.apply(this,t)}}hN.addEventListener("popstate",(()=>{const e=hN.location.href,t=vN;if(vN=e,t===e)return;x_("history",{from:t,to:e})})),"history"in jk&&jk.history&&(J_(hN.history,"pushState",e),J_(hN.history,"replaceState",e))}const xN={};function kN(e){xN[e]=void 0}const NN="__sentry_xhr_v3__";function SN(){if(!hN.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){
767
+ const r=new Error,o=1e3*C_(),i=R_(n[0])?n[0].toUpperCase():void 0,a=function(e){if(R_(e))return e;try{return e.toString()}catch{}return}(n[1]);if(!i||!a)return e.apply(t,n);t[NN]={method:i,url:a,request_headers:{}},"POST"===i&&a.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const s=()=>{const e=t[NN];if(e&&4===t.readyState){try{e.status_code=t.status}catch(e){}x_("xhr",{endTimestamp:1e3*C_(),startTimestamp:o,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(s(),e.apply(t,n))}):t.addEventListener("readystatechange",s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,o]=n,i=t[NN];return i&&R_(r)&&R_(o)&&(i.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[NN];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return x_("xhr",{startTimestamp:1e3*C_(),xhr:t}),e.apply(t,n)}})}function AN(e,t=function(e){
768
+ const t=xN[e];if(t)return t;let n=hN[e];if(Uk(n))return xN[e]=n.bind(hN);const r=hN.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const o=t.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(t)}catch(t){dN&&l_.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?xN[e]=n.bind(hN):n}("fetch")){let n=0,r=0;return vk(e,(function(o){const i=o.body.length;n+=i,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return kN("fetch"),mw("No fetch implementation available");try{return t(e.url,a).then((e=>(n-=i,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return kN("fetch"),n-=i,r--,mw(e)}}))}function EN(e,t,n,r){const o={filename:e,function:"<anonymous>"===t?u_:t,in_app:!0};return void 0!==n&&(o.lineno=n),
769
+ void 0!==r&&(o.colno=r),o}const TN=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,CN=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,MN=/\((\S*)(?::(\d+))(?::(\d+))\)/,IN=[30,e=>{const t=TN.exec(e);if(t){const[,e,n,r]=t;return EN(e,u_,+n,+r)}const n=CN.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=MN.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=PN(n[1]||u_,n[2]);return EN(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],zN=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,LN=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ON=[50,e=>{const t=zN.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=LN.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||u_;return[n,e]=PN(n,e),EN(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],RN=m_(...[IN,ON]),PN=(e,t)=>{
770
+ const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:u_,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},DN="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,FN=1024,HN=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){const t="console";__(t,e),w_(t,Ok)}(function(e){return function(t){if(zw()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:Rk(t.level),message:Y_(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${Y_(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}wk(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(zw()!==e)return;let r,o,i="object"==typeof t?t.serializeAttribute:void 0,a="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0
771
+ ;a&&a>FN&&(DN&&l_.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=FN),"string"==typeof i&&(i=[i]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=G_(t,{keyAttrs:i,maxStringLength:a}),o=function(e){if(!q_.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}(t)}catch(e){r="<unknown>"}if(0===r.length)return;const s={category:`ui.${n.name}`,message:r};o&&(s.data={"ui.component_name":o}),wk(s,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),__("dom",n),w_("dom",bN)),t.xhr&&function(e){__("xhr",e),w_("xhr",SN)}(function(e){return function(t){if(zw()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[NN];if(!n||!r||!o)return;const{method:i,url:a,status_code:s,body:l}=o,c={method:i,url:a,status_code:s},u={
772
+ xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:c,type:"http",level:$k(s)};e.emit("beforeOutgoingRequestBreadcrumb",d,u),wk(d,u)}}(e)),t.fetch&&Gk(function(e){return function(t){if(zw()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.fetchData.method,t.fetchData.url,t.error){const o=t.fetchData,i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:o,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,i),wk(a,i)}else{const o=t.response,i={...t.fetchData,status_code:o?.status};t.fetchData.request_body_size,t.fetchData.response_body_size,o?.status;const a={input:t.args,response:o,startTimestamp:n,endTimestamp:r},s={category:"fetch",data:i,type:"http",level:$k(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",s,a),wk(s,a)}}}(e)),t.history&&_N(function(e){return function(t){if(zw()!==e)return;let n=t.from,r=t.to;const o=Bk(Yk.location.href)
773
+ ;let i=n?Bk(n):void 0;const a=Bk(r);i?.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),wk({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){zw()===e&&wk({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:sw(t)},{event:t})}}(e))}}};const BN=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],$N=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,
774
+ setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&J_(Yk,"setTimeout",jN),t.setInterval&&J_(Yk,"setInterval",jN),t.requestAnimationFrame&&J_(Yk,"requestAnimationFrame",qN),t.XMLHttpRequest&&"XMLHttpRequest"in Yk&&J_(XMLHttpRequest.prototype,"send",UN);const e=t.eventTarget;if(e){(Array.isArray(e)?e:BN).forEach(GN)}}}};function jN(e){return function(...t){const n=t[0];return t[0]=Jk(n,{mechanism:{data:{function:g_(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function qN(e){return function(t){return e.apply(this,[Jk(t,{mechanism:{data:{function:"requestAnimationFrame",handler:g_(e)},handled:!1,type:"instrument"}})])}}function UN(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&J_(n,e,(function(t){const n={mechanism:{data:{function:e,handler:g_(t)},handled:!1,type:"instrument"}},r=tw(t);return r&&(n.mechanism.data.handler=g_(r)),Jk(t,n)}))})),e.apply(this,t)}}function GN(e){
775
+ const t=Yk,n=t[e]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(J_(n,"addEventListener",(function(t){return function(n,r,o){try{"function"==typeof r.handleEvent&&(r.handleEvent=Jk(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:g_(r),target:e},handled:!1,type:"instrument"}}))}catch{}return t.apply(this,[n,Jk(r,{mechanism:{data:{function:"addEventListener",handler:g_(r),target:e},handled:!1,type:"instrument"}}),o])}})),J_(n,"removeEventListener",(function(e){return function(t,n,r){try{const o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch(e){}return e.call(this,t,n,r)}})))}const VN=()=>({name:"BrowserSession",setupOnce(){void 0!==Yk.document?(Bx({ignoreDuration:!0}),qx(),_N((({from:e,to:t})=>{void 0!==e&&e!==t&&(Bx({ignoreDuration:!0}),qx())}))):DN&&l_.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),WN=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){
776
+ t.onerror&&(!function(e){!function(e){const t="error";__(t,e),w_(t,N_)}((t=>{const{stackParser:n,attachStacktrace:r}=YN();if(zw()!==e||Zk())return;const{msg:o,url:i,line:a,column:s,error:l}=t,c=function(e,t,n,r){const o=e.exception=e.exception||{},i=o.values=o.values||[],a=i[0]=i[0]||{},s=a.stacktrace=a.stacktrace||{},l=s.frames=s.frames||[],c=r,u=n,d=R_(t)&&t.length>0?t:W_();0===l.length&&l.push({colno:c,filename:d,function:u_,in_app:!0,lineno:u});return e}(sN(n,l||o,void 0,r,!1),i,a,s);c.level="error",Fx(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})}))}(e),KN("onerror")),t.onunhandledrejection&&(!function(e){!function(e){const t="unhandledrejection";__(t,e),w_(t,A_)}((t=>{const{stackParser:n,attachStacktrace:r}=YN();if(zw()!==e||Zk())return;const o=function(e){if(D_(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),i=D_(o)?{exception:{values:[{type:"UnhandledRejection",
777
+ value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:sN(n,o,void 0,r,!0);i.level="error",Fx(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(e),KN("onunhandledrejection"))}}};function KN(e){DN&&l_.log(`Global Handler attached: ${e}`)}function YN(){const e=zw();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const XN=()=>({name:"HttpContext",preprocessEvent(e){if(!Yk.navigator&&!Yk.location&&!Yk.document)return;const t=e.request?.url||W_(),{referrer:n}=Yk.document||{},{userAgent:r}=Yk.navigator||{},o={...e.request?.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:o};e.request=i}}),ZN=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){Mk(Qk,o.getOptions().stackParser,n,t,e,r)}}};function JN(e){const t={};for(const n of Object.getOwnPropertyNames(e)){const r=n;void 0!==e[r]&&(t[r]=e[r])}return t}function QN(e={}){const t=function(e={}){return{
778
+ defaultIntegrations:[Ek(),Nk(),$N(),HN(),WN(),ZN(),Pk(),XN(),VN()],release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Yk.SENTRY_RELEASE?.id,sendClientReports:!0,...JN(e)}}(e);if(!t.skipBrowserExtensionCheck&&function(){const e=void 0!==Yk.window&&Yk;if(!e)return!1;const t=e[e.chrome?"chrome":"browser"],n=t?.runtime?.id,r=W_()||"",o=!!n&&Yk===Yk.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some((e=>r.startsWith(`${e}//`))),i=void 0!==e.nw;return!!n&&!o&&!i}())return void(DN&&s_((()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")})));DN&&!qk()&&l_.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.");const n={...t,stackParser:(r=t.stackParser||RN,Array.isArray(r)?m_(...r):r),integrations:Wx(t),transport:t.transport||AN};var r;return dk(uN,n)}let eS=0
779
+ ;function tS(e,t){Dx(e,{tags:{context:t}})}function nS(e){!function(e){Iw().setUser(e)}(e)}class rS{constructor(e,t,n){this._store=e,this._annotationsService=t,this._toastMessenger=n}async import(e){this._store.beginImport(e.length);const t=this._store.profile().userid;if(!t)throw new Error("Cannot import when logged out");const n=this._store.focusedGroupId();if(!n)throw new Error("Cannot import when no group is selected");const r=this._store.allAnnotations(),o=this._store.defaultContentFrame(),i=async e=>{const i=r.find((t=>function(e,t){return e.text===t.text&&!!function(e,t){return e.length===t.length&&e.every(((e,n)=>t[n]===e))}(e.tags,t.tags)&&Oi(e)===Oi(t)}(e,t)));if(i)return{type:"duplicate",annotation:i};try{const r=function(e,t){return{target:e.target,tags:e.tags,text:e.text,uri:t?.uri??e.uri,document:t?.metadata??e.document,extra:{source:"import",original_id:e.id}}}(e,o),i=this._annotationsService.annotationFromData(r);i.permissions=Fs(e.permissions)?Ps(t,n):Rs(t);return{type:"import",
780
+ annotation:await this._annotationsService.save(i)}}catch(e){return tS(e,"annotation-import"),{type:"error",error:e}}},a=[],s=e.map(((e,t)=>({ann:e,index:t}))),l=[];for(;s.length>0;){const e=s.shift(),t=i(e.ann).then((t=>{this._store.completeImport(1),a[e.index]=t})).then((()=>{const e=l.indexOf(t);-1!==e&&l.splice(e,1)}));l.push(t),l.length>=5&&await Promise.race(l)}await Promise.all(l);const{messageType:c,message:u}=function(e){const t=e.filter((e=>"error"===e.type)),n=t.length>0?`${t.length} imports failed (${t[0].error.message})`:"",r=e.filter((e=>"import"===e.type)).length,o=r>0?`${r} annotations imported`:"",i=e.filter((e=>"duplicate"===e.type)).length,a=i>0?`${i} duplicates skipped`:"";let s;return s=0===t.length?r>0?"success":"notice":r>0?"notice":"error",{messageType:s,message:[o,n,a].filter((e=>e.length>0)).join(", ")}}(a);return"success"===c?this._toastMessenger.success(u):"notice"===c?this._toastMessenger.notice(u,{autoDismiss:!1}):"error"===c&&this._toastMessenger.error(u,{autoDismiss:!1}),a}}
781
+ rS.$inject=["store","annotationsService","toastMessenger"];class oS{constructor(e,t,n,r){this._api=e,this._store=t,this._streamer=n,this._streamFilter=r,this._searchClient=null}load({groupId:e,uris:t,onError:n,maxResults:r,sortBy:o,sortOrder:i,streamFilterBy:a="uri"}){if(this._store.removeAnnotations(this._store.savedAnnotations()),this._searchClient&&this._searchClient.cancel(),"group"===a)this._streamFilter.resetFilter().addClause("/group","equals",e,!0),this._streamer.setConfig("filter",{filter:this._streamFilter.getFilter()});else t&&t.length>0&&(this._streamFilter.resetFilter().addClause("/uri","one_of",t),this._streamer.setConfig("filter",{filter:this._streamFilter.getFilter()}));const s={incremental:!0,separateReplies:!1,maxResults:r,sortBy:o,sortOrder:i};this._searchClient=new Hg(this._api.search,s),this._searchClient.on("resultCount",(e=>{this._store.setAnnotationResultCount(e)})),this._searchClient.on("results",(e=>{e.length&&this._store.addAnnotations(e)})),this._searchClient.on("error",(e=>{
782
+ "function"==typeof n?n(e):console.error(e)})),this._searchClient.on("end",(()=>{this._searchClient=null,t&&t.length>0&&this._store.frames().forEach((e=>{t.indexOf(e.uri)>=0&&this._store.updateFrameAnnotationFetchStatus(e.uri,!0)})),this._store.annotationFetchFinished()})),this._store.annotationFetchStarted(),this._searchClient.get({group:e,uri:t})}async loadThread(e){let t,n;this._store.clearAnnotations();try{this._store.annotationFetchStarted(),t=await this._api.annotation.get({id:e}),_i(t)&&(t=await this._api.annotation.get({id:t.references[0]})),n=await this._api.search({references:t.id})}finally{this._store.annotationFetchFinished()}const r=[t,...n.rows];if(this._store.addAnnotations(r),!_i(t)){const e=t.id;this._streamFilter.addClause("/references","one_of",e,!0).addClause("/id","equals",e,!0),this._streamer.setConfig("filter",{filter:this._streamFilter.getFilter()}),this._streamer.connect()}return r}}oS.$inject=["api","store","streamer","streamFilter"];class iS{constructor(){this._store=new Map}
783
+ getItem(e){return this._store.get(e)??null}setItem(e,t){this._store.set(e,t)}removeItem(e){this._store.delete(e)}}class aS{constructor(e){const t="hypothesis.testKey";try{this._storage=e.localStorage,e.localStorage.setItem(t,t),e.localStorage.getItem(t),e.localStorage.removeItem(t)}catch{this._storage=new iS}}getItem(e){return this._storage.getItem(e)}getObject(e){const t=this._storage.getItem(e);return t?JSON.parse(t):null}setItem(e,t){this._storage.setItem(e,t)}setObject(e,t){const n=JSON.stringify(t);this._storage.setItem(e,n)}removeItem(e){this._storage.removeItem(e)}}aS.$inject=["$window"];const sS={annotationPrivacy:"hypothesis.privacy",focusedGroup:"hypothesis.groups.focus"};class lS{constructor(e,t){this._storage=e,this._store=t}init(){for(const[e,t]of Bi(sS)){const n=this._storage.getItem(t);this._store.setDefault(e,n)}Gy(this._store.subscribe,(()=>this._store.getDefaults()),((e,t)=>{for(const[n,r]of Bi(e))t[n]!==r&&n in sS&&this._storage.setItem(sS[n],r)}))}}lS.$inject=["localStorage","store"]
784
+ ;class cS{constructor(e,t){this._window=e,this._store=t,this._didRegisterPopstateListener=!1}currentRoute(){const e=this._window.location.pathname.slice(1).split("/"),t=new URLSearchParams(this._window.location.search),n={};for(const[e,r]of t)n[e]=r;"client"===e[0]&&e.shift();let r;switch(e[0].replace(/\.html$/,"")){case"a":r="annotation",n.id=e[1]||"";break;case"notebook":r="notebook";break;case"user-profile":r="profile";break;case"stream":r="stream";break;default:r="sidebar"}return{route:r,params:n}}routeUrl(e,t={}){let n;const r={...t};switch(e){case"annotation":{const e=t.id;delete r.id,n=`/a/${e}`}break;case"notebook":n="/notebook";break;case"profile":n="/user-profile";break;case"stream":n="/stream";break;default:throw new Error(`Cannot generate URL for route "${e}"`)}let o=!1;const i=new URLSearchParams;for(const[e,t]of Object.entries(r))o=!0,i.set(e,t);return o&&(n+="?"+i.toString()),n}sync(){const{route:e,params:t}=this.currentRoute();this._store.changeRoute(e,t),
785
+ this._didRegisterPopstateListener||(this._window.addEventListener("popstate",(()=>{this.sync()})),this._didRegisterPopstateListener=!0)}navigate(e,t){this._window.history.pushState({},"",this.routeUrl(e,t)),this.sync()}}cS.$inject=["$window","store"];class uS{constructor(e,t){this._apiRoutes=e,this._store=t}async init(){try{const e=await this._apiRoutes.links();this._store.updateLinks(e)}catch(e){console.warn(`Failed to fetch Hypothesis links: ${e.message}`)}}}uS.$inject=["apiRoutes","store"];class dS{constructor(e,t,n,r,o){this._api=t,this._auth=n,this._store=e,this._toastMessenger=o,this._authority=Mo(r)?.authority??null,this._lastLoad=null,this._lastLoadTime=null,n.on("oauthTokensChanged",(()=>this.reload()))}load(){return(!this._lastLoad||!this._lastLoadTime||Date.now()-this._lastLoadTime>3e5)&&(this._lastLoadTime=Date.now(),this._lastLoad=Ey((()=>{const e=this._authority?{authority:this._authority}:{};return this._api.profile.read(e)})).then((e=>(this.update(e),this._lastLoadTime=Date.now(),
786
+ e))).catch((e=>{throw this._lastLoadTime=null,e}))),this._lastLoad}async dismissSidebarTutorial(){const e=await this._api.profile.update({},{preferences:{show_sidebar_tutorial:!1}});this.update(e)}update(e){const t=this._store.profile(),n=e.userid!==t.userid;return this._store.updateProfile(e),this._lastLoad=Promise.resolve(e),this._lastLoadTime=Date.now(),n&&(e.userid?nS({id:e.userid}):nS(null)),e}async logout(){try{return await this._auth.logout(),this.reload()}catch(e){throw this._toastMessenger.error("Log out failed"),new Error(e)}}reload(){return this._lastLoad=null,this._lastLoadTime=null,this.load()}}dS.$inject=["store","api","auth","settings","toastMessenger"];class hS{constructor(){this._filter={match_policy:"include_any",clauses:[],actions:{create:!0,update:!0,delete:!0}}}addClause(e,t,n,r=!1){return this._filter.clauses.push({field:e,operator:t,value:n,case_sensitive:r}),this}getFilter(){return this._filter}resetFilter(){return this._filter={match_policy:"include_any",clauses:[],actions:{create:!0,
787
+ update:!0,delete:!0}},this}}class mS extends Pg{constructor(e){super(),this._messageQueue=[],this._socket=new WebSocket(e),this._socket.onopen=e=>{this.sendMessages(),this.emit("open",e)},this._socket.onclose=e=>{if(1e3===e.code||1001===e.code)return void this.emit("close",e);const t=new Error(`WebSocket closed abnormally, code: ${e.code}`);console.warn(t),this.emit("disconnect")},this._socket.onerror=e=>{this.emit("error",e)},this._socket.onmessage=e=>{this.emit("message",e)}}close(){this._socket.close(1e3)}send(e){this._messageQueue.push(e),this.isConnected()&&this.sendMessages()}isConnected(){return this._socket.readyState===WebSocket.OPEN}sendMessages(){for(;this._messageQueue.length>0;){const e=JSON.stringify(this._messageQueue.shift());this._socket.send(e)}}}class pS{constructor(e,t,n,r,o,i){this._auth=n,this._groups=r,this._session=o,this._store=e,this._websocketURL=t.links().then((e=>e.websocket)),this.clientId=Yv(32),this._socket=null,this._updateImmediately=!0,this._configMessages={},
788
+ this._reconnectionAttempts=0,this._reconnectSetUp=!1,this._window=i}applyPendingUpdates(){const e=Object.values(this._store.pendingUpdates());e.length&&(this._store.addAnnotations(e),this._store.highlightAnnotations(e.map((({id:e})=>e)).filter(Boolean)),this._window.setTimeout((()=>this._store.highlightAnnotations([])),5e3));const t=Object.keys(this._store.pendingDeletions()).map((e=>({id:e})));t.length&&this._store.removeAnnotations(t),this._store.clearPendingUpdates()}_handleSocketError(e,t){rb("Error connecting to H push notification service:",t);const n=new URL(e).hostname;-1!==["localhost","127.0.0.1"].indexOf(n)&&rb("Check that your H service is configured to allow WebSocket connections from "+window.location.origin)}_handleSocketMessage(e){const t=JSON.parse(e.data);if(t)if("annotation-notification"===t.type){const e=t.payload;switch(t.options.action){case"create":case"update":case"past":this._store.receiveRealTimeUpdates({updatedAnnotations:e});break;case"delete":this._store.receiveRealTimeUpdates({
789
+ deletedAnnotations:e})}this._updateImmediately&&this.applyPendingUpdates()}else if("session-change"===t.type)this._session.update(t.model),this._groups.load();else if("whoyouare"===t.type){const e=this._store.profile().userid;t.userid!==e&&console.warn('WebSocket user ID "%s" does not match logged-in ID "%s"',t.userid,e)}else rb("Received unsupported notification",t.type)}_sendClientConfig(e){Object.keys(this._configMessages).forEach((t=>{this._configMessages[t]&&e.send(this._configMessages[t])}))}setConfig(e,t){this._configMessages[e]=t,this._socket?.isConnected()&&this._socket.send(t)}async _reconnect(){const e=await this._websocketURL;if(!e)return;let t,n;this._socket?.close();try{t=await this._auth.getAccessToken()}catch(e){throw console.error("Failed to fetch token for WebSocket authentication",e),e}if(t){const r=new URL(e);r.searchParams.set("access_token",t),n=r.toString()}else n=e;const r=new mS(n);r.on("open",(()=>{this._reconnectionAttempts=0,this._sendClientConfig(r)})),r.on("disconnect",(()=>{
790
+ if(++this._reconnectionAttempts,this._reconnectionAttempts<10){const e=1e3*2**this._reconnectionAttempts;setTimeout((()=>this._reconnect()),e)}else console.error("Gave up trying to reconnect to Hypothesis real time update service")})),r.on("error",(t=>this._handleSocketError(e,t))),r.on("message",(e=>this._handleSocketMessage(e))),this._socket=r,this.setConfig("client-id",{messageType:"client_id",value:this.clientId}),this.setConfig("auth-check",{type:"whoami",id:1})}async connect(e={}){this._updateImmediately=e.applyUpdatesImmediately??!0,this._reconnectSetUp||(this._reconnectSetUp=!0,Gy(this._store.subscribe,(()=>this._store.profile().userid),(()=>this._reconnect()))),this._socket||await this._reconnect()}}pS.$inject=["store","apiRoutes","auth","groups","session","$window"];const fS="hypothesis.user.tags.list",gS="hypothesis.user.tags.map";class vS{constructor(e){this._storage=e}filter(e,t=null){const n=this._storage.getObject(fS)||[];let r=0;return n.filter((n=>{if(null!==t&&r>=t)return!1
791
+ ;const o=n.split(/\W+/),i=new RegExp(`^${ab(e)}`,"i");return!(!o.some((e=>e.match(i)))&&!n.match(i))&&(++r,!0)}))}store(e){const t=this._storage.getObject(gS)||{};e.forEach((e=>{t[e]?(t[e].count+=1,t[e].updated=Date.now()):t[e]={text:e,count:1,updated:Date.now()}})),this._storage.setObject(gS,t);const n=Object.keys(t).sort(((e,n)=>t[e].count!==t[n].count?t[n].count-t[e].count:e.localeCompare(n)));this._storage.setObject(fS,n)}}vS.$inject=["localStorage"];class bS{constructor(e){this._store=e}forceVisible(e){e.children.forEach((e=>{this.forceVisible(e)})),e.visible||this._store.setForcedVisible(e.id,!0)}}bS.$inject=["store"];class yS{#t=(()=>new Map)();#n;constructor(e){this.#n=e}async fetch(e,t={}){const n=this.#t.get(e);if(n)return n;const r=await this.#n.requestThumbnail(e,t);return this.#t.set(e,r),r}get(e){return this.#t.get(e)??null}}yS.$inject=["frameSync"];class _S extends Pg{constructor(e,t){super(),this._store=e,this._window=t,this._delayedMessageQueue=[],this._window.addEventListener("focus",(()=>{
792
+ this._delayedMessageQueue.forEach((({type:e,messageText:t,options:n})=>this._addMessage(e,t,n))),this._delayedMessageQueue=[]}))}dismiss(e){this._store.getToastMessage(e)&&(this._store.removeToastMessage(e),this.emit("toastMessageDismissed",e))}_addMessage(e,t,{autoDismiss:n=!0,visuallyHidden:r=!1,delayed:o=!1}={}){if(this._store.hasToastMessage(e,t))return;if(o&&!this._window.document.hasFocus()){const o={autoDismiss:n,visuallyHidden:r};return void this._delayedMessageQueue.push({type:e,messageText:t,options:o})}const i={type:e,id:Yv(10),message:t,visuallyHidden:r,autoDismiss:n};this._store.addToastMessage(i),this.emit("toastMessageAdded",i)}error(e,t){this._addMessage("error",e,t)}success(e,t){this._addMessage("success",e,t)}notice(e,t){this._addMessage("notice",e,t)}}_S.$inject=["store","$window"];const wS=function(e){for(var t={},n=e.querySelectorAll("script.js-hypothesis-config"),r=0;r<n.length;r++){var o=void 0;try{o=JSON.parse(n[r].textContent||"")}catch(e){
793
+ console.warn("Could not parse settings from js-hypothesis-config tags",e),o={}}Object.assign(t,o)}return t}(document),xS=function(e){const{version:t,origin:n}=Zv(e.location.href);return"1.1627.0"!==t?(console.warn(`The Hypothesis sidebar is using a different version (1.1627.0) than the host page (${t}). It may not work.`),!1):"null"===e.origin?(console.warn("Hypothesis has been loaded in a sandboxed frame. This is not supported."),!1):e.origin===n||(console.warn(`The Hypothesis sidebar is running in a different origin (${e.origin}) than expected (${n}). It may not work.`),!1)}(window);function kS(e,t){e.setClientId(t.clientId)}function NS(e){e.sync()}function SS(e,t){e.load(),t.load()}function AS(e,t,n){e.init(),t.init(),n.init()}function ES(e,t,n){"sidebar"===t.route()&&e.connect().catch((()=>{n.error("Hypothesis failed to connect to the web page. Try reloading the page.",{autoDismiss:!1})}))}wS.sentry&&xS&&function(e){const t=function(){const e=import.meta.url;return e?new URL(e).origin:null
794
+ }(),n=t?[t]:void 0;QN({dsn:e.dsn,environment:e.environment,allowUrls:n,ignoreErrors:["Network request failed","Object Not Found Matching Id"],release:"1.1627.0",beforeSend:(e,t)=>{if(eS>=5)return rb("Client-side Sentry quota reached. No further Sentry events will be sent"),null;++eS;try{const n=t&&t.originalException;n instanceof Event&&(e.extra||(e.extra={}),Object.assign(e.extra,{type:n.type,detail:n.detail,isTrusted:n.isTrusted}))}catch{}return e}});try{Hx("host_config",Zv(window.location.href))}catch{}Hx("loaded_scripts",Array.from(document.querySelectorAll("script")).filter((e=>!e.type||e.type.match(/javascript|module/))).map((e=>e.src||"<inline>"))),Fy(((e,t)=>{tS(e,t)}))}(wS.sentry),document.body.addEventListener("click",(e=>{const t=e.target;"A"===t.tagName&&"_blank"===t.target&&(t.rel="noopener")})),kS.$inject=["api","streamer"],NS.$inject=["router"],SS.$inject=["groups","session"],AS.$inject=["autosaveService","persistedDefaults","serviceURL"],ES.$inject=["frameSync","store","toastMessenger"]
795
+ ;const TS=document.querySelector("hypothesis-app");!function(e=window){e.addEventListener("message",mb)}(),async function(e,t=window){const n=function(e){const t=Zv(e.location.href),n=["annotations","group","query","appType","openSidebar","showHighlights","services","branding","enableExperimentalNewNoteButton","focus","requestConfigFromFrame","theme","usernameUrl"],r={openSidebar:Jv,requestConfigFromFrame:e=>{if("string"==typeof e)return e;const t=function(e){return"object"==typeof e&&null!==e?e:{}}(e);return{origin:eb(t.origin),ancestorLevel:Qv(t.ancestorLevel)}}},o={};for(const[e,i]of Object.entries(t))n.includes(e)&&null!==i&&(r[e]?o[e]=r[e](i):o[e]=i);return o}(window),r=function(e,t){const n=e.requestConfigFromFrame;if(!n)return null;if("number"!=typeof n.ancestorLevel||"string"!=typeof n.origin)throw new Error("Improper `requestConfigFromFrame` object. Both `ancestorLevel` and `origin` need to be specified");return{targetFrame:tb(n.ancestorLevel,t),origin:n.origin}}(n,t);let o;if(r){
796
+ const e=await async function(e,t){return{...await Xv(t.targetFrame,t.origin,"requestConfig",[],3e3),...e.group?{group:e.group}:{}}}(n,r);o=function(e,t){const n=e.services;return Array.isArray(n)?(n.forEach(((e,n)=>{"$rpc:requestGroups"===e.groups&&(e.groups=Xv(t.targetFrame,t.origin,"requestGroups",[n],0).catch((()=>{throw new Error("Unable to fetch groups")})))})),e):e}(e,r)}else o=n;const i={...e,...o};return r&&(i.rpc=r),i.apiUrl=function(e){const t=Mo(e);if(!t)return e.apiUrl;if(t.apiUrl)return t.apiUrl;throw new Error("Service should contain an apiUrl value.")}(i),i}(wS).then((e=>{!function(e,t){const n=new V
797
+ ;n.register("analytics",pb).register("annotationsExporter",fy).register("annotationsService",gb).register("annotationActivity",fb).register("api",by).register("apiRoutes",Cy).register("auth",zy).register("autosaveService",Ly).register("dashboard",Oy).register("frameSync",Ky).register("groups",Zy).register("importAnnotationsService",rS).register("loadAnnotationsService",oS).register("localStorage",aS).register("persistedDefaults",lS).register("router",cS).register("serviceURL",uS).register("session",dS).register("streamer",pS).register("streamFilter",hS).register("tags",vS).register("threadsService",bS).register("thumbnailService",yS).register("toastMessenger",_S).register("store",{factory:_s}),n.register("$window",{value:window}).register("settings",{value:e}),n.run(NS),n.run(AS),n.run(kS),n.run(SS),n.run(hb),n.run(ES),$(et(Oo.Provider,{value:n,children:et(Vv,{})}),t)}(e,TS)})).catch((e=>function(e,t){console.error("Failed to start Hypothesis client: ",e),$(et(Wv,{error:e}),t)}(e,TS)));
798
+ //# sourceMappingURL=sidebar.bundle.js.map