@browserless.io/browserless 2.2.0-beta-8 → 2.3.0-beta-1

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 (1342) hide show
  1. package/CHANGELOG.md +21 -2
  2. package/bin/browserless.js +26 -15
  3. package/bin/scaffold/README.md +8 -7
  4. package/build/browserless.d.ts +6 -1
  5. package/build/browserless.js +45 -26
  6. package/build/browsers/chrome.cdp.d.ts +6 -0
  7. package/build/browsers/chrome.cdp.js +6 -0
  8. package/build/browsers/chrome.playwright.d.ts +6 -0
  9. package/build/browsers/chrome.playwright.js +6 -0
  10. package/build/browsers/{cdp-chromium.d.ts → chromium.cdp.d.ts} +3 -2
  11. package/build/browsers/{cdp-chromium.js → chromium.cdp.js} +16 -10
  12. package/build/browsers/{playwright-chromium.d.ts → chromium.playwright.d.ts} +3 -2
  13. package/build/browsers/{playwright-chromium.js → chromium.playwright.js} +6 -5
  14. package/build/browsers/{playwright-firefox.d.ts → firefox.playwright.d.ts} +2 -2
  15. package/build/browsers/{playwright-firefox.js → firefox.playwright.js} +4 -4
  16. package/build/browsers/index.d.ts +20 -10
  17. package/build/browsers/index.js +110 -11
  18. package/build/browsers/{playwright-webkit.d.ts → webkit.playwright.d.ts} +2 -2
  19. package/build/browsers/{playwright-webkit.js → webkit.playwright.js} +4 -4
  20. package/build/data/selectors.json +1 -1
  21. package/build/exports.core.d.ts +24 -0
  22. package/build/exports.core.js +26 -0
  23. package/build/exports.d.ts +38 -22
  24. package/build/exports.js +44 -24
  25. package/build/hooks.d.ts +4 -5
  26. package/build/hooks.js +4 -6
  27. package/build/http.d.ts +22 -1
  28. package/build/http.js +21 -0
  29. package/build/router.js +19 -3
  30. package/build/routes/{chromium/http/content-post.body.json → chrome/http/content.post.body.json} +8 -8
  31. package/build/routes/chrome/http/content.post.d.ts +7 -0
  32. package/build/routes/chrome/http/content.post.js +6 -0
  33. package/build/routes/{chromium/http/scrape-post.body.json → chrome/http/download.post.body.json} +9 -56
  34. package/build/routes/chrome/http/download.post.d.ts +7 -0
  35. package/build/routes/chrome/http/download.post.js +6 -0
  36. package/build/routes/{chromium/http/download-post.response.json → chrome/http/download.post.response.json} +1 -0
  37. package/build/routes/{chromium/http/screenshot-post.body.json → chrome/http/function.post.body.json} +9 -99
  38. package/build/routes/chrome/http/function.post.d.ts +7 -0
  39. package/build/routes/chrome/http/function.post.js +6 -0
  40. package/build/routes/{management/http/sessions-get.response.json → chrome/http/function.post.query.json} +26 -68
  41. package/build/routes/{chromium/http/function-post.response.json → chrome/http/function.post.response.json} +1 -0
  42. package/build/routes/chrome/http/json-list.get.d.ts +1 -0
  43. package/build/routes/chrome/http/json-list.get.js +1 -0
  44. package/build/routes/chrome/http/json-list.get.response.json +4 -0
  45. package/build/routes/chrome/http/json-new.put.d.ts +1 -0
  46. package/build/routes/chrome/http/json-new.put.js +1 -0
  47. package/build/routes/chrome/http/json-new.put.response.json +4 -0
  48. package/build/routes/chrome/http/json-protocol.get.d.ts +1 -0
  49. package/build/routes/chrome/http/json-protocol.get.js +1 -0
  50. package/build/routes/chrome/http/json-protocol.get.response.json +4 -0
  51. package/build/routes/chrome/http/json-version.get.d.ts +1 -0
  52. package/build/routes/chrome/http/json-version.get.js +1 -0
  53. package/build/routes/chrome/http/json-version.get.response.json +4 -0
  54. package/build/routes/{chromium/http/pdf-post.body.json → chrome/http/pdf.post.body.json} +9 -153
  55. package/build/routes/chrome/http/pdf.post.d.ts +7 -0
  56. package/build/routes/chrome/http/pdf.post.js +6 -0
  57. package/build/routes/{chromium/http/download-post.query.json → chrome/http/pdf.post.query.json} +69 -6
  58. package/build/routes/chrome/http/performance.post.body.json +510 -0
  59. package/build/routes/chrome/http/performance.post.d.ts +7 -0
  60. package/build/routes/chrome/http/performance.post.js +6 -0
  61. package/build/routes/chrome/http/performance.post.query.json +183 -0
  62. package/build/routes/{chromium/http/performance.response.json → chrome/http/performance.post.response.json} +1 -3
  63. package/build/routes/chrome/http/scrape.post.body.json +510 -0
  64. package/build/routes/chrome/http/scrape.post.d.ts +7 -0
  65. package/build/routes/chrome/http/scrape.post.js +6 -0
  66. package/build/routes/chrome/http/scrape.post.query.json +183 -0
  67. package/build/routes/chrome/http/scrape.post.response.json +5 -0
  68. package/build/routes/chrome/http/screenshot.post.body.json +510 -0
  69. package/build/routes/chrome/http/screenshot.post.d.ts +7 -0
  70. package/build/routes/chrome/http/screenshot.post.js +6 -0
  71. package/build/routes/chrome/http/screenshot.post.query.json +183 -0
  72. package/build/routes/chrome/tests/content.spec.js +311 -0
  73. package/build/routes/chrome/tests/download.spec.js +67 -0
  74. package/build/routes/chrome/tests/function.spec.d.ts +1 -0
  75. package/build/routes/chrome/tests/function.spec.js +245 -0
  76. package/build/routes/chrome/tests/json-version.spec.d.ts +1 -0
  77. package/build/routes/chrome/tests/json-version.spec.js +37 -0
  78. package/build/routes/chrome/tests/page-websocket.spec.d.ts +1 -0
  79. package/build/routes/chrome/tests/page-websocket.spec.js +97 -0
  80. package/build/routes/chrome/tests/pdf.spec.d.ts +1 -0
  81. package/build/routes/chrome/tests/pdf.spec.js +333 -0
  82. package/build/routes/chrome/tests/performance.spec.d.ts +1 -0
  83. package/build/routes/chrome/tests/performance.spec.js +124 -0
  84. package/build/routes/chrome/tests/scrape.spec.d.ts +1 -0
  85. package/build/routes/chrome/tests/scrape.spec.js +354 -0
  86. package/build/routes/chrome/tests/screenshot.spec.d.ts +1 -0
  87. package/build/routes/chrome/tests/screenshot.spec.js +339 -0
  88. package/build/routes/chrome/tests/websocket.spec.d.ts +1 -0
  89. package/build/routes/chrome/tests/websocket.spec.js +371 -0
  90. package/build/routes/chrome/ws/browser.d.ts +6 -0
  91. package/build/routes/chrome/ws/browser.js +5 -0
  92. package/build/routes/chrome/ws/browser.query.json +183 -0
  93. package/build/routes/chrome/ws/cdp.d.ts +7 -0
  94. package/build/routes/chrome/ws/cdp.js +6 -0
  95. package/build/routes/chrome/ws/cdp.query.json +183 -0
  96. package/build/routes/chrome/ws/page.d.ts +6 -0
  97. package/build/routes/chrome/ws/page.js +5 -0
  98. package/build/routes/chrome/ws/page.query.json +183 -0
  99. package/build/routes/chrome/ws/playwright.d.ts +7 -0
  100. package/build/routes/chrome/ws/playwright.js +6 -0
  101. package/build/routes/chrome/ws/playwright.query.json +183 -0
  102. package/build/routes/chromium/http/content.post.body.json +510 -0
  103. package/build/routes/chromium/http/content.post.d.ts +1 -0
  104. package/build/routes/chromium/http/content.post.js +1 -0
  105. package/build/routes/chromium/http/content.post.query.json +183 -0
  106. package/build/routes/chromium/http/content.post.response.json +5 -0
  107. package/build/routes/chromium/http/download.post.body.json +510 -0
  108. package/build/routes/chromium/http/download.post.d.ts +1 -0
  109. package/build/routes/chromium/http/download.post.js +1 -0
  110. package/build/routes/chromium/http/download.post.query.json +183 -0
  111. package/build/routes/chromium/http/download.post.response.json +5 -0
  112. package/build/routes/chromium/http/function.post.body.json +510 -0
  113. package/build/routes/chromium/http/function.post.d.ts +1 -0
  114. package/build/routes/chromium/http/function.post.js +1 -0
  115. package/build/routes/chromium/http/function.post.query.json +183 -0
  116. package/build/routes/chromium/http/function.post.response.json +5 -0
  117. package/build/routes/chromium/http/json-list.get.d.ts +1 -0
  118. package/build/routes/chromium/http/json-list.get.js +1 -0
  119. package/build/routes/chromium/http/json-list.get.response.json +4 -0
  120. package/build/routes/chromium/http/json-new.put.d.ts +1 -0
  121. package/build/routes/chromium/http/json-new.put.js +1 -0
  122. package/build/routes/chromium/http/json-new.put.response.json +4 -0
  123. package/build/routes/chromium/http/json-protocol.get.d.ts +1 -0
  124. package/build/routes/chromium/http/json-protocol.get.js +1 -0
  125. package/build/routes/chromium/http/json-protocol.get.response.json +4 -0
  126. package/build/routes/chromium/http/json-version.get.d.ts +1 -0
  127. package/build/routes/chromium/http/json-version.get.js +1 -0
  128. package/build/routes/chromium/http/json-version.get.response.json +4 -0
  129. package/build/routes/chromium/http/pdf.post.body.json +510 -0
  130. package/build/routes/chromium/http/pdf.post.d.ts +1 -0
  131. package/build/routes/chromium/http/pdf.post.js +1 -0
  132. package/build/routes/chromium/http/pdf.post.query.json +183 -0
  133. package/build/routes/chromium/http/pdf.post.response.json +5 -0
  134. package/build/routes/chromium/http/performance.post.body.json +510 -0
  135. package/build/routes/chromium/http/performance.post.d.ts +1 -0
  136. package/build/routes/chromium/http/performance.post.js +1 -0
  137. package/build/routes/chromium/http/performance.post.query.json +183 -0
  138. package/build/routes/chromium/http/performance.post.response.json +5 -0
  139. package/build/routes/chromium/http/scrape.post.body.json +510 -0
  140. package/build/routes/chromium/http/scrape.post.d.ts +1 -0
  141. package/build/routes/chromium/http/scrape.post.js +1 -0
  142. package/build/routes/chromium/http/scrape.post.query.json +183 -0
  143. package/build/routes/chromium/http/scrape.post.response.json +5 -0
  144. package/build/routes/chromium/http/screenshot.post.body.json +510 -0
  145. package/build/routes/chromium/http/screenshot.post.d.ts +1 -0
  146. package/build/routes/chromium/http/screenshot.post.js +1 -0
  147. package/build/routes/chromium/http/screenshot.post.query.json +183 -0
  148. package/build/routes/chromium/http/screenshot.post.response.json +5 -0
  149. package/build/routes/chromium/tests/content.spec.js +16 -16
  150. package/build/routes/chromium/tests/download.spec.js +3 -3
  151. package/build/routes/chromium/tests/function.spec.js +10 -10
  152. package/build/routes/chromium/tests/page-websocket.spec.d.ts +1 -0
  153. package/build/routes/chromium/tests/page-websocket.spec.js +97 -0
  154. package/build/routes/chromium/tests/pdf.spec.js +16 -16
  155. package/build/routes/chromium/tests/performance.spec.js +7 -7
  156. package/build/routes/chromium/tests/scrape.spec.js +15 -15
  157. package/build/routes/chromium/tests/screenshot.spec.js +17 -17
  158. package/build/routes/chromium/tests/websocket.spec.js +31 -37
  159. package/build/routes/chromium/ws/browser.d.ts +1 -16
  160. package/build/routes/chromium/ws/browser.js +1 -10
  161. package/build/routes/chromium/ws/browser.query.json +69 -6
  162. package/build/routes/chromium/ws/cdp.d.ts +1 -0
  163. package/build/routes/chromium/ws/cdp.js +1 -0
  164. package/build/routes/chromium/ws/cdp.query.json +183 -0
  165. package/build/routes/chromium/ws/page.d.ts +1 -16
  166. package/build/routes/chromium/ws/page.js +1 -10
  167. package/build/routes/chromium/ws/page.query.json +69 -6
  168. package/build/routes/chromium/ws/playwright.d.ts +1 -0
  169. package/build/routes/chromium/ws/playwright.js +1 -0
  170. package/build/routes/chromium/ws/playwright.query.json +183 -0
  171. package/build/routes/firefox/ws/playwright.d.ts +20 -0
  172. package/build/routes/firefox/ws/{playwright-firefox.js → playwright.js} +4 -4
  173. package/build/routes/firefox/ws/playwright.query.json +183 -0
  174. package/build/routes/management/http/config.get.response.json +4 -0
  175. package/build/routes/management/http/metrics-total.get.response.json +4 -0
  176. package/build/routes/management/http/metrics.get.response.json +4 -0
  177. package/build/routes/management/http/sessions.get.response.json +4 -0
  178. package/build/routes/management/http/{static-get.js → static.get.js} +9 -9
  179. package/build/routes/webkit/ws/{playwright-webkit.d.ts → playwright.d.ts} +5 -5
  180. package/build/routes/webkit/ws/{playwright-webkit.js → playwright.js} +4 -4
  181. package/build/routes/webkit/ws/playwright.query.json +183 -0
  182. package/build/{routes/chromium/ws/cdp-chromium.d.ts → shared/browser.ws.d.ts} +4 -4
  183. package/build/shared/browser.ws.js +12 -0
  184. package/build/{routes/chromium/ws/playwright-chromium.d.ts → shared/chromium.playwright.ws.d.ts} +4 -4
  185. package/build/{routes/chromium/ws/playwright-chromium.js → shared/chromium.playwright.ws.js} +6 -3
  186. package/build/shared/chromium.ws.d.ts +16 -0
  187. package/build/shared/chromium.ws.js +10 -0
  188. package/build/{routes/chromium/http/content-post.d.ts → shared/content.http.d.ts} +3 -3
  189. package/build/{routes/chromium/http/content-post.js → shared/content.http.js} +3 -3
  190. package/build/{routes/chromium/http/download-post.d.ts → shared/download.http.d.ts} +3 -3
  191. package/build/{routes/chromium/http/download-post.js → shared/download.http.js} +4 -4
  192. package/build/{routes/chromium/http/function-post.d.ts → shared/function.http.d.ts} +3 -3
  193. package/build/{routes/chromium/http/function-post.js → shared/function.http.js} +4 -4
  194. package/build/{routes/chromium/http/json-new.d.ts → shared/json-list.http.d.ts} +2 -3
  195. package/build/{routes/chromium/http/json-list.js → shared/json-list.http.js} +5 -8
  196. package/build/{routes/chromium/http/json-list.d.ts → shared/json-new.http.d.ts} +2 -3
  197. package/build/shared/json-new.http.js +34 -0
  198. package/build/{routes/chromium/http/json-protocol-get.js → shared/json-protocol.http.js} +2 -2
  199. package/build/{routes/chromium/http/json-version-get.js → shared/json-version.http.js} +3 -3
  200. package/build/shared/page.ws.d.ts +16 -0
  201. package/build/shared/page.ws.js +13 -0
  202. package/build/{routes/chromium/http/pdf-post.d.ts → shared/pdf.http.d.ts} +3 -3
  203. package/build/{routes/chromium/http/pdf-post.js → shared/pdf.http.js} +3 -3
  204. package/build/{routes/chromium/http/performance.d.ts → shared/performance.http.d.ts} +3 -3
  205. package/build/{routes/chromium/http/performance.js → shared/performance.http.js} +4 -4
  206. package/build/{routes/chromium/http/scrape-post.d.ts → shared/scrape.http.d.ts} +3 -3
  207. package/build/{routes/chromium/http/scrape-post.js → shared/scrape.http.js} +3 -3
  208. package/build/{routes/chromium/http/screenshot-post.d.ts → shared/screenshot.http.d.ts} +3 -3
  209. package/build/{routes/chromium/http/screenshot-post.js → shared/screenshot.http.js} +3 -3
  210. package/build/shared/utils/performance/child.d.ts +1 -0
  211. package/build/{routes/chromium → shared}/utils/performance/main.js +2 -2
  212. package/build/shared/utils/performance/types.js +1 -0
  213. package/build/shim.js +2 -1
  214. package/build/types.d.ts +10 -8
  215. package/build/utils.d.ts +8 -3
  216. package/build/utils.js +24 -11
  217. package/docker/base/Dockerfile +1 -1
  218. package/docker/chrome/Dockerfile +6 -4
  219. package/docker/chromium/.dockerignore +16 -0
  220. package/docker/chromium/Dockerfile +42 -0
  221. package/docker/firefox/Dockerfile +3 -1
  222. package/docker/multi/Dockerfile +15 -1
  223. package/docker/webkit/Dockerfile +3 -1
  224. package/extensions/ublock/3p-filters.html +1 -1
  225. package/extensions/ublock/_locales/ar/messages.json +4 -0
  226. package/extensions/ublock/_locales/az/messages.json +4 -0
  227. package/extensions/ublock/_locales/be/messages.json +4 -0
  228. package/extensions/ublock/_locales/bg/messages.json +5 -1
  229. package/extensions/ublock/_locales/bn/messages.json +4 -0
  230. package/extensions/ublock/_locales/br_FR/messages.json +6 -2
  231. package/extensions/ublock/_locales/bs/messages.json +4 -0
  232. package/extensions/ublock/_locales/ca/messages.json +4 -0
  233. package/extensions/ublock/_locales/cs/messages.json +4 -0
  234. package/extensions/ublock/_locales/cv/messages.json +4 -0
  235. package/extensions/ublock/_locales/cy/messages.json +1294 -0
  236. package/extensions/ublock/_locales/da/messages.json +4 -0
  237. package/extensions/ublock/_locales/de/messages.json +5 -1
  238. package/extensions/ublock/_locales/el/messages.json +4 -0
  239. package/extensions/ublock/_locales/en/messages.json +4 -0
  240. package/extensions/ublock/_locales/en_GB/messages.json +4 -0
  241. package/extensions/ublock/_locales/eo/messages.json +9 -5
  242. package/extensions/ublock/_locales/es/messages.json +4 -0
  243. package/extensions/ublock/_locales/et/messages.json +4 -0
  244. package/extensions/ublock/_locales/eu/messages.json +8 -4
  245. package/extensions/ublock/_locales/fa/messages.json +4 -0
  246. package/extensions/ublock/_locales/fi/messages.json +4 -0
  247. package/extensions/ublock/_locales/fil/messages.json +4 -0
  248. package/extensions/ublock/_locales/fr/messages.json +4 -0
  249. package/extensions/ublock/_locales/fy/messages.json +4 -0
  250. package/extensions/ublock/_locales/gl/messages.json +4 -0
  251. package/extensions/ublock/_locales/gu/messages.json +4 -0
  252. package/extensions/ublock/_locales/he/messages.json +4 -0
  253. package/extensions/ublock/_locales/hi/messages.json +4 -0
  254. package/extensions/ublock/_locales/hr/messages.json +4 -0
  255. package/extensions/ublock/_locales/hu/messages.json +4 -0
  256. package/extensions/ublock/_locales/hy/messages.json +4 -0
  257. package/extensions/ublock/_locales/id/messages.json +5 -1
  258. package/extensions/ublock/_locales/it/messages.json +4 -0
  259. package/extensions/ublock/_locales/ja/messages.json +4 -0
  260. package/extensions/ublock/_locales/ka/messages.json +34 -30
  261. package/extensions/ublock/_locales/kk/messages.json +4 -0
  262. package/extensions/ublock/_locales/kn/messages.json +4 -0
  263. package/extensions/ublock/_locales/ko/messages.json +4 -0
  264. package/extensions/ublock/_locales/ku/messages.json +4 -0
  265. package/extensions/ublock/_locales/lt/messages.json +4 -0
  266. package/extensions/ublock/_locales/lv/messages.json +4 -0
  267. package/extensions/ublock/_locales/mk/messages.json +4 -0
  268. package/extensions/ublock/_locales/ml/messages.json +4 -0
  269. package/extensions/ublock/_locales/mr/messages.json +4 -0
  270. package/extensions/ublock/_locales/ms/messages.json +13 -9
  271. package/extensions/ublock/_locales/nb/messages.json +4 -0
  272. package/extensions/ublock/_locales/nl/messages.json +4 -0
  273. package/extensions/ublock/_locales/no/messages.json +4 -0
  274. package/extensions/ublock/_locales/oc/messages.json +4 -0
  275. package/extensions/ublock/_locales/pa/messages.json +4 -0
  276. package/extensions/ublock/_locales/pl/messages.json +5 -1
  277. package/extensions/ublock/_locales/pt_BR/messages.json +4 -0
  278. package/extensions/ublock/_locales/pt_PT/messages.json +4 -0
  279. package/extensions/ublock/_locales/ro/messages.json +5 -1
  280. package/extensions/ublock/_locales/ru/messages.json +4 -0
  281. package/extensions/ublock/_locales/si/messages.json +4 -0
  282. package/extensions/ublock/_locales/sk/messages.json +4 -0
  283. package/extensions/ublock/_locales/sl/messages.json +4 -0
  284. package/extensions/ublock/_locales/so/messages.json +4 -0
  285. package/extensions/ublock/_locales/sq/messages.json +4 -0
  286. package/extensions/ublock/_locales/sr/messages.json +4 -0
  287. package/extensions/ublock/_locales/sv/messages.json +4 -0
  288. package/extensions/ublock/_locales/sw/messages.json +4 -0
  289. package/extensions/ublock/_locales/ta/messages.json +4 -0
  290. package/extensions/ublock/_locales/te/messages.json +4 -0
  291. package/extensions/ublock/_locales/th/messages.json +12 -8
  292. package/extensions/ublock/_locales/tr/messages.json +4 -0
  293. package/extensions/ublock/_locales/uk/messages.json +4 -0
  294. package/extensions/ublock/_locales/ur/messages.json +4 -0
  295. package/extensions/ublock/_locales/vi/messages.json +4 -0
  296. package/extensions/ublock/_locales/zh_CN/messages.json +6 -2
  297. package/extensions/ublock/_locales/zh_TW/messages.json +6 -2
  298. package/extensions/ublock/assets/assets.json +11 -11
  299. package/extensions/ublock/assets/resources/scriptlets.js +660 -378
  300. package/extensions/ublock/assets/thirdparties/easylist/easylist.txt +7173 -3455
  301. package/extensions/ublock/assets/thirdparties/easylist/easyprivacy.txt +18829 -1918
  302. package/extensions/ublock/assets/thirdparties/pgl.yoyo.org/as/serverlist +21 -26
  303. package/extensions/ublock/assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat +118 -46
  304. package/extensions/ublock/assets/thirdparties/urlhaus-filter/urlhaus-filter-online.txt +710 -1117
  305. package/extensions/ublock/assets/ublock/badlists.txt +0 -4
  306. package/extensions/ublock/assets/ublock/badware.min.txt +116 -105
  307. package/extensions/ublock/assets/ublock/filters.min.txt +1443 -1097
  308. package/extensions/ublock/assets/ublock/privacy.min.txt +50 -31
  309. package/extensions/ublock/assets/ublock/quick-fixes.min.txt +97 -108
  310. package/extensions/ublock/assets/ublock/unbreak.min.txt +64 -21
  311. package/extensions/ublock/css/1p-filters.css +4 -0
  312. package/extensions/ublock/css/3p-filters.css +6 -4
  313. package/extensions/ublock/css/common.css +1 -1
  314. package/extensions/ublock/css/fa-icons.css +1 -0
  315. package/extensions/ublock/css/logger-ui.css +72 -52
  316. package/extensions/ublock/css/popup-fenix.css +1 -1
  317. package/extensions/ublock/img/fontawesome/fontawesome-defs.svg +1 -0
  318. package/extensions/ublock/js/3p-filters.js +3 -3
  319. package/extensions/ublock/js/assets.js +7 -4
  320. package/extensions/ublock/js/background.js +1 -3
  321. package/extensions/ublock/js/benchmarks.js +1 -0
  322. package/extensions/ublock/js/broadcast.js +12 -0
  323. package/extensions/ublock/js/click2load.js +2 -3
  324. package/extensions/ublock/js/codemirror/ubo-static-filtering.js +1 -0
  325. package/extensions/ublock/js/commands.js +10 -0
  326. package/extensions/ublock/js/contentscript-extra.js +13 -11
  327. package/extensions/ublock/js/contentscript.js +0 -31
  328. package/extensions/ublock/js/contextmenu.js +5 -1
  329. package/extensions/ublock/js/dyna-rules.js +83 -52
  330. package/extensions/ublock/js/fa-icons.js +1 -0
  331. package/extensions/ublock/js/filtering-context.js +0 -2
  332. package/extensions/ublock/js/i18n.js +1 -5
  333. package/extensions/ublock/js/logger-ui.js +71 -38
  334. package/extensions/ublock/js/logger.js +18 -14
  335. package/extensions/ublock/js/messaging.js +17 -5
  336. package/extensions/ublock/js/popup-fenix.js +6 -6
  337. package/extensions/ublock/js/scriptlet-filtering-core.js +14 -12
  338. package/extensions/ublock/js/scriptlet-filtering.js +149 -53
  339. package/extensions/ublock/js/scriptlets/scriptlet-loglevel-1.js +49 -0
  340. package/extensions/ublock/js/scriptlets/scriptlet-loglevel-2.js +49 -0
  341. package/extensions/ublock/js/scriptlets/should-inject-contentscript.js +1 -1
  342. package/extensions/ublock/js/static-dnr-filtering.js +4 -2
  343. package/extensions/ublock/js/static-filtering-parser.js +14 -8
  344. package/extensions/ublock/js/static-net-filtering.js +32 -30
  345. package/extensions/ublock/js/storage.js +18 -4
  346. package/extensions/ublock/js/traffic.js +3 -3
  347. package/extensions/ublock/js/ublock.js +1 -1
  348. package/extensions/ublock/js/vapi-background.js +15 -7
  349. package/extensions/ublock/logger-ui.html +18 -10
  350. package/extensions/ublock/manifest.json +4 -1
  351. package/extensions/ublock/web_accessible_resources/chartbeat.js +3 -0
  352. package/package.json +12 -12
  353. package/scripts/build-function.js +1 -1
  354. package/scripts/build-open-api.js +21 -11
  355. package/scripts/build-schemas.js +2 -3
  356. package/scripts/clean.js +6 -1
  357. package/scripts/install-debugger.js +20 -0
  358. package/scripts/install-devtools.js +40 -0
  359. package/src/browserless.ts +72 -45
  360. package/src/browsers/chrome.cdp.ts +10 -0
  361. package/src/browsers/chrome.playwright.ts +10 -0
  362. package/src/browsers/{cdp-chromium.ts → chromium.cdp.ts} +20 -13
  363. package/src/browsers/{playwright-chromium.ts → chromium.playwright.ts} +7 -6
  364. package/src/browsers/{playwright-firefox.ts → firefox.playwright.ts} +5 -5
  365. package/src/browsers/index.ts +160 -23
  366. package/src/browsers/{playwright-webkit.ts → webkit.playwright.ts} +5 -5
  367. package/src/exports.core.ts +26 -0
  368. package/src/exports.ts +48 -24
  369. package/src/hooks.ts +4 -12
  370. package/src/http.ts +21 -0
  371. package/src/router.ts +25 -5
  372. package/src/routes/chrome/http/content.post.ts +14 -0
  373. package/src/routes/chrome/http/download.post.ts +14 -0
  374. package/src/routes/chrome/http/function.post.ts +14 -0
  375. package/src/routes/chrome/http/json-list.get.ts +1 -0
  376. package/src/routes/chrome/http/json-new.put.ts +1 -0
  377. package/src/routes/chrome/http/json-protocol.get.ts +1 -0
  378. package/src/routes/chrome/http/json-version.get.ts +1 -0
  379. package/src/routes/chrome/http/pdf.post.ts +14 -0
  380. package/src/routes/chrome/http/performance.post.ts +14 -0
  381. package/src/routes/chrome/http/scrape.post.ts +14 -0
  382. package/src/routes/chrome/http/screenshot.post.ts +14 -0
  383. package/src/routes/chrome/tests/content.spec.ts +375 -0
  384. package/src/routes/chrome/tests/download.spec.ts +77 -0
  385. package/src/routes/chrome/tests/function.spec.ts +282 -0
  386. package/src/routes/chrome/tests/json-version.spec.ts +52 -0
  387. package/src/routes/chrome/tests/page-websocket.spec.ts +129 -0
  388. package/src/routes/chrome/tests/pdf.spec.ts +380 -0
  389. package/src/routes/chrome/tests/performance.spec.ts +155 -0
  390. package/src/routes/chrome/tests/scrape.spec.ts +417 -0
  391. package/src/routes/chrome/tests/screenshot.spec.ts +387 -0
  392. package/src/routes/chrome/tests/websocket.spec.ts +491 -0
  393. package/src/routes/chrome/ws/browser.ts +8 -0
  394. package/src/routes/chrome/ws/cdp.ts +12 -0
  395. package/src/routes/chrome/ws/page.ts +8 -0
  396. package/src/routes/chrome/ws/playwright.ts +12 -0
  397. package/src/routes/chromium/http/content.post.ts +6 -0
  398. package/src/routes/chromium/http/download.post.ts +6 -0
  399. package/src/routes/chromium/http/function.post.ts +6 -0
  400. package/src/routes/chromium/http/json-list.get.ts +1 -0
  401. package/src/routes/chromium/http/json-new.put.ts +1 -0
  402. package/src/routes/chromium/http/json-protocol.get.ts +1 -0
  403. package/src/routes/chromium/http/json-version.get.ts +1 -0
  404. package/src/routes/chromium/http/pdf.post.ts +6 -0
  405. package/src/routes/chromium/http/performance.post.ts +6 -0
  406. package/src/routes/chromium/http/scrape.post.ts +6 -0
  407. package/src/routes/chromium/http/screenshot.post.ts +6 -0
  408. package/src/routes/chromium/tests/content.spec.ts +36 -28
  409. package/src/routes/chromium/tests/download.spec.ts +3 -3
  410. package/src/routes/chromium/tests/function.spec.ts +18 -15
  411. package/src/routes/chromium/tests/page-websocket.spec.ts +129 -0
  412. package/src/routes/chromium/tests/pdf.spec.ts +31 -26
  413. package/src/routes/chromium/tests/performance.spec.ts +46 -34
  414. package/src/routes/chromium/tests/scrape.spec.ts +23 -20
  415. package/src/routes/chromium/tests/screenshot.spec.ts +24 -24
  416. package/src/routes/chromium/tests/websocket.spec.ts +31 -40
  417. package/src/routes/chromium/ws/browser.ts +1 -29
  418. package/src/routes/chromium/ws/cdp.ts +1 -0
  419. package/src/routes/chromium/ws/page.ts +1 -29
  420. package/src/routes/chromium/ws/playwright.ts +4 -0
  421. package/src/routes/firefox/ws/{playwright-firefox.ts → playwright.ts} +8 -6
  422. package/src/routes/management/http/{static-get.ts → static.get.ts} +15 -10
  423. package/src/routes/webkit/ws/{playwright-webkit.ts → playwright.ts} +5 -5
  424. package/src/shared/browser.ws.ts +34 -0
  425. package/src/{routes/chromium/ws/playwright-chromium.ts → shared/chromium.playwright.ws.ts} +7 -4
  426. package/src/{routes/chromium/ws/cdp-chromium.ts → shared/chromium.ws.ts} +6 -6
  427. package/src/{routes/chromium/http/content-post.ts → shared/content.http.ts} +4 -4
  428. package/src/{routes/chromium/http/download-post.ts → shared/download.http.ts} +4 -4
  429. package/src/{routes/chromium/http/function-post.ts → shared/function.http.ts} +4 -4
  430. package/src/shared/json-list.http.ts +35 -0
  431. package/src/{routes/chromium/http/json-new.ts → shared/json-new.http.ts} +23 -7
  432. package/src/{routes/chromium/http/json-protocol-get.ts → shared/json-protocol.http.ts} +3 -5
  433. package/src/{routes/chromium/http/json-version-get.ts → shared/json-version.http.ts} +4 -5
  434. package/src/shared/page.ws.ts +35 -0
  435. package/src/{routes/chromium/http/pdf-post.ts → shared/pdf.http.ts} +4 -4
  436. package/src/{routes/chromium/http/performance.ts → shared/performance.http.ts} +4 -4
  437. package/src/{routes/chromium/http/scrape-post.ts → shared/scrape.http.ts} +4 -4
  438. package/src/{routes/chromium/http/screenshot-post.ts → shared/screenshot.http.ts} +4 -4
  439. package/src/{routes/chromium → shared}/utils/function/handler.ts +2 -2
  440. package/src/{routes/chromium → shared}/utils/performance/main.ts +2 -4
  441. package/src/shim.ts +2 -1
  442. package/src/types.ts +27 -20
  443. package/src/utils.ts +32 -14
  444. package/static/devtools/Images/accelerometer-back.svg +1 -0
  445. package/static/devtools/Images/accelerometer-bottom.png +0 -0
  446. package/static/devtools/Images/accelerometer-front.svg +1 -0
  447. package/static/devtools/Images/accelerometer-left.png +0 -0
  448. package/static/devtools/Images/accelerometer-right.png +0 -0
  449. package/static/devtools/Images/accelerometer-top.png +0 -0
  450. package/static/devtools/Images/baseline-icon.svg +1 -0
  451. package/static/devtools/Images/breaking_change_icon.svg +1 -0
  452. package/static/devtools/Images/checkboxCheckmark.svg +1 -0
  453. package/static/devtools/Images/checker.png +0 -0
  454. package/static/devtools/Images/chevrons.svg +1 -0
  455. package/static/devtools/Images/chromeDisabledSelect.png +0 -0
  456. package/static/devtools/Images/chromeDisabledSelect_2x.png +0 -0
  457. package/static/devtools/Images/chromeLeft.avif +0 -0
  458. package/static/devtools/Images/chromeMiddle.avif +0 -0
  459. package/static/devtools/Images/chromeRight.avif +0 -0
  460. package/static/devtools/Images/chromeSelect.svg +1 -0
  461. package/static/devtools/Images/chromeSelectDark.svg +1 -0
  462. package/static/devtools/Images/cssoverview_icons_2x.avif +0 -0
  463. package/static/devtools/Images/dropdown_7x6_icon.svg +1 -0
  464. package/static/devtools/Images/elements_panel_icon.svg +1 -0
  465. package/static/devtools/Images/errorWave.svg +1 -0
  466. package/static/devtools/Images/error_icon.svg +1 -0
  467. package/static/devtools/Images/feedback_thin_16x16_icon.svg +1 -0
  468. package/static/devtools/Images/flex-align-content-center-icon.svg +1 -0
  469. package/static/devtools/Images/flex-align-content-end-icon.svg +1 -0
  470. package/static/devtools/Images/flex-align-content-space-around-icon.svg +1 -0
  471. package/static/devtools/Images/flex-align-content-space-between-icon.svg +1 -0
  472. package/static/devtools/Images/flex-align-content-space-evenly-icon.svg +1 -0
  473. package/static/devtools/Images/flex-align-content-start-icon.svg +1 -0
  474. package/static/devtools/Images/flex-align-content-stretch-icon.svg +1 -0
  475. package/static/devtools/Images/flex-align-items-center-icon.svg +1 -0
  476. package/static/devtools/Images/flex-align-items-flex-end-icon.svg +1 -0
  477. package/static/devtools/Images/flex-align-items-flex-start-icon.svg +1 -0
  478. package/static/devtools/Images/flex-align-items-stretch-icon.svg +1 -0
  479. package/static/devtools/Images/flex-align-self-center-icon.svg +1 -0
  480. package/static/devtools/Images/flex-align-self-flex-end-icon.svg +1 -0
  481. package/static/devtools/Images/flex-align-self-flex-start-icon.svg +1 -0
  482. package/static/devtools/Images/flex-align-self-stretch-icon.svg +1 -0
  483. package/static/devtools/Images/flex-direction-icon.svg +1 -0
  484. package/static/devtools/Images/flex-justify-content-center-icon.svg +1 -0
  485. package/static/devtools/Images/flex-justify-content-flex-end-icon.svg +1 -0
  486. package/static/devtools/Images/flex-justify-content-flex-start-icon.svg +1 -0
  487. package/static/devtools/Images/flex-justify-content-space-around-icon.svg +1 -0
  488. package/static/devtools/Images/flex-justify-content-space-between-icon.svg +1 -0
  489. package/static/devtools/Images/flex-justify-content-space-evenly-icon.svg +1 -0
  490. package/static/devtools/Images/ic_checkmark_16x16.svg +3 -0
  491. package/static/devtools/Images/ic_delete_filter.svg +1 -0
  492. package/static/devtools/Images/ic_delete_list.svg +1 -0
  493. package/static/devtools/Images/ic_info_black_18dp.svg +1 -0
  494. package/static/devtools/Images/ic_page_next_16x16_icon.svg +1 -0
  495. package/static/devtools/Images/ic_page_prev_16x16_icon.svg +1 -0
  496. package/static/devtools/Images/ic_redo_16x16_icon.svg +1 -0
  497. package/static/devtools/Images/ic_show_node_16x16.svg +4 -0
  498. package/static/devtools/Images/ic_suggest_color.svg +6 -0
  499. package/static/devtools/Images/ic_undo_16x16_icon.svg +1 -0
  500. package/static/devtools/Images/ic_warning_black_18dp.svg +1 -0
  501. package/static/devtools/Images/issue-text-icon.svg +1 -0
  502. package/static/devtools/Images/largeIcons.svg +1 -0
  503. package/static/devtools/Images/lighthouse_logo.svg +1 -0
  504. package/static/devtools/Images/link_icon.svg +1 -0
  505. package/static/devtools/Images/mediumIcons.svg +1 -0
  506. package/static/devtools/Images/navigationControls.png +0 -0
  507. package/static/devtools/Images/navigationControls_2x.png +0 -0
  508. package/static/devtools/Images/network_panel_icon.svg +1 -0
  509. package/static/devtools/Images/nodeIcon.avif +0 -0
  510. package/static/devtools/Images/node_search_icon.svg +1 -0
  511. package/static/devtools/Images/popoverArrows.png +0 -0
  512. package/static/devtools/Images/profileGroupIcon.png +0 -0
  513. package/static/devtools/Images/profileIcon.png +0 -0
  514. package/static/devtools/Images/profileSmallIcon.png +0 -0
  515. package/static/devtools/Images/radioDot-dark-theme.png +0 -0
  516. package/static/devtools/Images/radioDot.png +0 -0
  517. package/static/devtools/Images/refresh_12x12_icon.svg +1 -0
  518. package/static/devtools/Images/resizeDiagonal.svg +1 -0
  519. package/static/devtools/Images/resizeHorizontal.svg +1 -0
  520. package/static/devtools/Images/resizeVertical.svg +1 -0
  521. package/static/devtools/Images/resourceCSSIcon.png +0 -0
  522. package/static/devtools/Images/resourceDocumentIcon.png +0 -0
  523. package/static/devtools/Images/resourceDocumentIconSmall.png +0 -0
  524. package/static/devtools/Images/resourceJSIcon.png +0 -0
  525. package/static/devtools/Images/resourcePlainIcon.png +0 -0
  526. package/static/devtools/Images/resourcePlainIconSmall.png +0 -0
  527. package/static/devtools/Images/resourcesTimeGraphIcon.avif +0 -0
  528. package/static/devtools/Images/searchNext.png +0 -0
  529. package/static/devtools/Images/searchPrev.png +0 -0
  530. package/static/devtools/Images/securityIcons.svg +1 -0
  531. package/static/devtools/Images/settings_14x14_icon.svg +1 -0
  532. package/static/devtools/Images/smallIcons.svg +1 -0
  533. package/static/devtools/Images/sources_panel_icon.svg +1 -0
  534. package/static/devtools/Images/speech.png +0 -0
  535. package/static/devtools/Images/toolbarResizerVertical.png +0 -0
  536. package/static/devtools/Images/touchCursor.png +0 -0
  537. package/static/devtools/Images/touchCursor_2x.png +0 -0
  538. package/static/devtools/Images/treeoutlineTriangles.svg +1 -0
  539. package/static/devtools/Images/warning_icon.svg +1 -0
  540. package/static/devtools/Images/whatsnew.avif +0 -0
  541. package/static/devtools/Tests.js +1654 -0
  542. package/static/devtools/accessibility/accessibility-legacy.js +1 -0
  543. package/static/devtools/accessibility/accessibility-meta.js +1 -0
  544. package/static/devtools/accessibility/accessibility.js +1 -0
  545. package/static/devtools/accessibility/accessibility_module.js +1 -0
  546. package/static/devtools/accessibility_test_runner/accessibility_test_runner.js +77 -0
  547. package/static/devtools/accessibility_test_runner/accessibility_test_runner_module.js +0 -0
  548. package/static/devtools/animation/animation-legacy.js +1 -0
  549. package/static/devtools/animation/animation-meta.js +1 -0
  550. package/static/devtools/animation/animation.js +1 -0
  551. package/static/devtools/animation/animation_module.js +1 -0
  552. package/static/devtools/application_test_runner/AppcacheTestRunner.js +220 -0
  553. package/static/devtools/application_test_runner/CacheStorageTestRunner.js +286 -0
  554. package/static/devtools/application_test_runner/IndexedDBTestRunner.js +476 -0
  555. package/static/devtools/application_test_runner/ResourceTreeTestRunner.js +99 -0
  556. package/static/devtools/application_test_runner/ResourcesTestRunner.js +167 -0
  557. package/static/devtools/application_test_runner/ServiceWorkersTestRunner.js +131 -0
  558. package/static/devtools/application_test_runner/application_test_runner.js +10 -0
  559. package/static/devtools/application_test_runner/application_test_runner_module.js +0 -0
  560. package/static/devtools/axe_core_test_runner/axe_core_test_runner.js +174 -0
  561. package/static/devtools/axe_core_test_runner/axe_core_test_runner_module.js +0 -0
  562. package/static/devtools/bindings/bindings-legacy.js +1 -0
  563. package/static/devtools/bindings/bindings.js +1 -0
  564. package/static/devtools/bindings_test_runner/AutomappingTestRunner.js +130 -0
  565. package/static/devtools/bindings_test_runner/BindingsTestRunner.js +238 -0
  566. package/static/devtools/bindings_test_runner/IsolatedFilesystemTestRunner.js +287 -0
  567. package/static/devtools/bindings_test_runner/OverridesTestRunner.js +26 -0
  568. package/static/devtools/bindings_test_runner/PersistenceTestRunner.js +109 -0
  569. package/static/devtools/bindings_test_runner/bindings_test_runner.js +9 -0
  570. package/static/devtools/bindings_test_runner/bindings_test_runner_module.js +0 -0
  571. package/static/devtools/browser_debugger/browser_debugger-legacy.js +1 -0
  572. package/static/devtools/browser_debugger/browser_debugger-meta.js +1 -0
  573. package/static/devtools/browser_debugger/browser_debugger.js +1 -0
  574. package/static/devtools/browser_debugger/browser_debugger_module.js +1 -0
  575. package/static/devtools/browser_sdk/browser_sdk-meta.js +1 -0
  576. package/static/devtools/browser_sdk/browser_sdk.js +1 -0
  577. package/static/devtools/changes/changes-legacy.js +1 -0
  578. package/static/devtools/changes/changes-meta.js +1 -0
  579. package/static/devtools/changes/changes.js +1 -0
  580. package/static/devtools/changes/changes_module.js +1 -0
  581. package/static/devtools/client_variations/client_variations.js +1 -0
  582. package/static/devtools/client_variations/client_variations_module.js +0 -0
  583. package/static/devtools/cm/cm.js +1 -0
  584. package/static/devtools/cm/cm_module.js +1 -0
  585. package/static/devtools/cm_headless/cm_headless.js +1 -0
  586. package/static/devtools/color_picker/color_picker-legacy.js +1 -0
  587. package/static/devtools/color_picker/color_picker.js +1 -0
  588. package/static/devtools/color_picker/color_picker_module.js +1 -0
  589. package/static/devtools/common/common-legacy.js +1 -0
  590. package/static/devtools/common/common.js +1 -0
  591. package/static/devtools/component_helpers/component_helpers.js +1 -0
  592. package/static/devtools/components/components-legacy.js +1 -0
  593. package/static/devtools/components/components.js +1 -0
  594. package/static/devtools/console/console-legacy.js +1 -0
  595. package/static/devtools/console/console-meta.js +1 -0
  596. package/static/devtools/console/console.js +6 -0
  597. package/static/devtools/console/console_module.js +1 -0
  598. package/static/devtools/console_counters/console_counters-legacy.js +1 -0
  599. package/static/devtools/console_counters/console_counters.js +1 -0
  600. package/static/devtools/console_test_runner/console_test_runner.js +696 -0
  601. package/static/devtools/console_test_runner/console_test_runner_module.js +0 -0
  602. package/static/devtools/cookie_table/cookie_table-legacy.js +1 -0
  603. package/static/devtools/cookie_table/cookie_table.js +1 -0
  604. package/static/devtools/cookie_table/cookie_table_module.js +1 -0
  605. package/static/devtools/coverage/coverage-legacy.js +1 -0
  606. package/static/devtools/coverage/coverage-meta.js +1 -0
  607. package/static/devtools/coverage/coverage.js +1 -0
  608. package/static/devtools/coverage/coverage_module.js +1 -0
  609. package/static/devtools/coverage_test_runner/coverage_test_runner.js +151 -0
  610. package/static/devtools/coverage_test_runner/coverage_test_runner_module.js +0 -0
  611. package/static/devtools/cpu_profiler_test_runner/cpu_profiler_test_runner.js +72 -0
  612. package/static/devtools/cpu_profiler_test_runner/cpu_profiler_test_runner_module.js +0 -0
  613. package/static/devtools/css_overview/css_overview-meta.js +1 -0
  614. package/static/devtools/css_overview/css_overview.js +146 -0
  615. package/static/devtools/css_overview/css_overview_module.js +1 -0
  616. package/static/devtools/data_grid/data_grid-legacy.js +1 -0
  617. package/static/devtools/data_grid/data_grid.js +1 -0
  618. package/static/devtools/data_grid/data_grid_module.js +1 -0
  619. package/static/devtools/data_grid_test_runner/data_grid_test_runner.js +78 -0
  620. package/static/devtools/data_grid_test_runner/data_grid_test_runner_module.js +0 -0
  621. package/static/devtools/developer_resources/developer_resources-legacy.js +1 -0
  622. package/static/devtools/developer_resources/developer_resources-meta.js +1 -0
  623. package/static/devtools/developer_resources/developer_resources.js +1 -0
  624. package/static/devtools/developer_resources/developer_resources_module.js +1 -0
  625. package/static/devtools/device_mode_test_runner/device_mode_test_runner.js +45 -0
  626. package/static/devtools/device_mode_test_runner/device_mode_test_runner_module.js +0 -0
  627. package/static/devtools/devtools_app.html +20 -0
  628. package/static/devtools/devtools_app.js +1 -0
  629. package/static/devtools/devtools_compatibility.js +1546 -0
  630. package/static/devtools/diff/diff-legacy.js +1 -0
  631. package/static/devtools/diff/diff.js +1 -0
  632. package/static/devtools/diff/diff_module.js +0 -0
  633. package/static/devtools/dom_extension/dom_extension.js +1 -0
  634. package/static/devtools/elements/elements-legacy.js +1 -0
  635. package/static/devtools/elements/elements-meta.js +1 -0
  636. package/static/devtools/elements/elements.js +469 -0
  637. package/static/devtools/elements/elements_module.js +1 -0
  638. package/static/devtools/elements_test_runner/EditDOMTestRunner.js +78 -0
  639. package/static/devtools/elements_test_runner/ElementsPanelShadowSelectionOnRefreshTestRunner.js +39 -0
  640. package/static/devtools/elements_test_runner/ElementsTestRunner.js +1280 -0
  641. package/static/devtools/elements_test_runner/SetOuterHTMLTestRunner.js +115 -0
  642. package/static/devtools/elements_test_runner/StylesUpdateLinksTestRunner.js +134 -0
  643. package/static/devtools/elements_test_runner/elements_test_runner.js +9 -0
  644. package/static/devtools/elements_test_runner/elements_test_runner_module.js +0 -0
  645. package/static/devtools/emulated_devices/emulated_devices_module.js +0 -0
  646. package/static/devtools/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
  647. package/static/devtools/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
  648. package/static/devtools/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
  649. package/static/devtools/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
  650. package/static/devtools/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
  651. package/static/devtools/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
  652. package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
  653. package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
  654. package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
  655. package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
  656. package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
  657. package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
  658. package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
  659. package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
  660. package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
  661. package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
  662. package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
  663. package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
  664. package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
  665. package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
  666. package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
  667. package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
  668. package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
  669. package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
  670. package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
  671. package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
  672. package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
  673. package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
  674. package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
  675. package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
  676. package/static/devtools/emulated_devices/optimized/iPad-landscape.avif +0 -0
  677. package/static/devtools/emulated_devices/optimized/iPad-portrait.avif +0 -0
  678. package/static/devtools/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
  679. package/static/devtools/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
  680. package/static/devtools/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
  681. package/static/devtools/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
  682. package/static/devtools/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
  683. package/static/devtools/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
  684. package/static/devtools/emulation/emulation-legacy.js +1 -0
  685. package/static/devtools/emulation/emulation-meta.js +1 -0
  686. package/static/devtools/emulation/emulation.js +1 -0
  687. package/static/devtools/event_listeners/event_listeners-legacy.js +1 -0
  688. package/static/devtools/event_listeners/event_listeners.js +1 -0
  689. package/static/devtools/event_listeners/event_listeners_module.js +1 -0
  690. package/static/devtools/extensions/extensions-legacy.js +1 -0
  691. package/static/devtools/extensions/extensions.js +1 -0
  692. package/static/devtools/extensions_test_runner/ExtensionsNetworkTestRunner.js +27 -0
  693. package/static/devtools/extensions_test_runner/ExtensionsTestRunner.js +68 -0
  694. package/static/devtools/extensions_test_runner/extensions_test_runner.js +6 -0
  695. package/static/devtools/extensions_test_runner/extensions_test_runner_module.js +0 -0
  696. package/static/devtools/formatter/formatter-legacy.js +1 -0
  697. package/static/devtools/formatter/formatter.js +1 -0
  698. package/static/devtools/formatter/formatter_module.js +0 -0
  699. package/static/devtools/formatter_worker/FormatterActions.js +1 -0
  700. package/static/devtools/formatter_worker/formatter_worker-entrypoint.js +1 -0
  701. package/static/devtools/formatter_worker/formatter_worker.js +1 -0
  702. package/static/devtools/har_importer/har_importer-legacy.js +1 -0
  703. package/static/devtools/har_importer/har_importer.js +1 -0
  704. package/static/devtools/har_importer/har_importer_module.js +0 -0
  705. package/static/devtools/heap_profiler_test_runner/heap_profiler_test_runner.js +740 -0
  706. package/static/devtools/heap_profiler_test_runner/heap_profiler_test_runner_module.js +0 -0
  707. package/static/devtools/heap_snapshot_model/heap_snapshot_model-legacy.js +1 -0
  708. package/static/devtools/heap_snapshot_model/heap_snapshot_model.js +1 -0
  709. package/static/devtools/heap_snapshot_model/heap_snapshot_model_module.js +0 -0
  710. package/static/devtools/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js +1 -0
  711. package/static/devtools/heap_snapshot_worker/heap_snapshot_worker-legacy.js +1 -0
  712. package/static/devtools/heap_snapshot_worker/heap_snapshot_worker.js +1 -0
  713. package/static/devtools/heap_snapshot_worker/heap_snapshot_worker_module.js +0 -0
  714. package/static/devtools/help/help-legacy.js +1 -0
  715. package/static/devtools/help/help-meta.js +1 -0
  716. package/static/devtools/help/help.js +1 -0
  717. package/static/devtools/help/help_module.js +1 -0
  718. package/static/devtools/host/host-legacy.js +1 -0
  719. package/static/devtools/host/host.js +1 -0
  720. package/static/devtools/i18n/i18n.js +1 -0
  721. package/static/devtools/i18n/i18n_locales-tsconfig.json +8 -0
  722. package/static/devtools/i18n/locales/en-US.json +3566 -0
  723. package/static/devtools/inline_editor/inline_editor-legacy.js +1 -0
  724. package/static/devtools/inline_editor/inline_editor.js +203 -0
  725. package/static/devtools/inline_editor/inline_editor_module.js +1 -0
  726. package/static/devtools/input/input-legacy.js +1 -0
  727. package/static/devtools/input/input-meta.js +1 -0
  728. package/static/devtools/input/input.js +1 -0
  729. package/static/devtools/input/input_module.js +1 -0
  730. package/static/devtools/inspector.html +20 -0
  731. package/static/devtools/inspector.js +1 -0
  732. package/static/devtools/inspector_main/inspector_main-legacy.js +1 -0
  733. package/static/devtools/inspector_main/inspector_main-meta.js +1 -0
  734. package/static/devtools/inspector_main/inspector_main.js +1 -0
  735. package/static/devtools/integration_test_runner.html +14 -0
  736. package/static/devtools/integration_test_runner.js +2 -0
  737. package/static/devtools/issues/issues-legacy.js +1 -0
  738. package/static/devtools/issues/issues-meta.js +1 -0
  739. package/static/devtools/issues/issues.js +67 -0
  740. package/static/devtools/issues/issues_module.js +1 -0
  741. package/static/devtools/javascript_metadata/javascript_metadata-legacy.js +1 -0
  742. package/static/devtools/javascript_metadata/javascript_metadata.js +1 -0
  743. package/static/devtools/javascript_metadata/javascript_metadata_module.js +0 -0
  744. package/static/devtools/js_app.html +20 -0
  745. package/static/devtools/js_app.js +1 -0
  746. package/static/devtools/js_main/js_main-legacy.js +1 -0
  747. package/static/devtools/js_main/js_main.js +1 -0
  748. package/static/devtools/js_profiler/js_profiler-meta.js +1 -0
  749. package/static/devtools/js_profiler/js_profiler.js +1 -0
  750. package/static/devtools/js_profiler/js_profiler_module.js +0 -0
  751. package/static/devtools/layer_viewer/layer_viewer-legacy.js +1 -0
  752. package/static/devtools/layer_viewer/layer_viewer.js +1 -0
  753. package/static/devtools/layer_viewer/layer_viewer_module.js +1 -0
  754. package/static/devtools/layers/layers-legacy.js +1 -0
  755. package/static/devtools/layers/layers-meta.js +1 -0
  756. package/static/devtools/layers/layers.js +1 -0
  757. package/static/devtools/layers/layers_module.js +0 -0
  758. package/static/devtools/layers_test_runner/layers_test_runner.js +156 -0
  759. package/static/devtools/layers_test_runner/layers_test_runner_module.js +0 -0
  760. package/static/devtools/lighthouse/lighthouse-legacy.js +1 -0
  761. package/static/devtools/lighthouse/lighthouse-meta.js +1 -0
  762. package/static/devtools/lighthouse/lighthouse.js +70 -0
  763. package/static/devtools/lighthouse/lighthouse_module.js +1 -0
  764. package/static/devtools/lighthouse_test_runner/lighthouse_test_runner.js +136 -0
  765. package/static/devtools/lighthouse_test_runner/lighthouse_test_runner_module.js +0 -0
  766. package/static/devtools/lighthouse_worker/LighthouseService.js +195 -0
  767. package/static/devtools/lighthouse_worker/lighthouse_worker.js +6 -0
  768. package/static/devtools/lighthouse_worker.js +1 -0
  769. package/static/devtools/linear_memory_inspector/linear_memory_inspector-legacy.js +1 -0
  770. package/static/devtools/linear_memory_inspector/linear_memory_inspector-meta.js +1 -0
  771. package/static/devtools/linear_memory_inspector/linear_memory_inspector.js +399 -0
  772. package/static/devtools/linear_memory_inspector/linear_memory_inspector_module.js +0 -0
  773. package/static/devtools/main/main-legacy.js +1 -0
  774. package/static/devtools/main/main.js +1 -0
  775. package/static/devtools/media/media-legacy.js +1 -0
  776. package/static/devtools/media/media-meta.js +1 -0
  777. package/static/devtools/media/media.js +1 -0
  778. package/static/devtools/media/media_module.js +1 -0
  779. package/static/devtools/mobile_throttling/mobile_throttling-legacy.js +1 -0
  780. package/static/devtools/mobile_throttling/mobile_throttling-meta.js +1 -0
  781. package/static/devtools/mobile_throttling/mobile_throttling.js +1 -0
  782. package/static/devtools/ndb_app.html +20 -0
  783. package/static/devtools/ndb_app.js +1 -0
  784. package/static/devtools/network/network-legacy.js +1 -0
  785. package/static/devtools/network/network-meta.js +1 -0
  786. package/static/devtools/network/network.js +72 -0
  787. package/static/devtools/network/network_module.js +1 -0
  788. package/static/devtools/network_test_runner/network_test_runner.js +280 -0
  789. package/static/devtools/network_test_runner/network_test_runner_module.js +0 -0
  790. package/static/devtools/node_app.html +20 -0
  791. package/static/devtools/node_app.js +1 -0
  792. package/static/devtools/node_debugger/node_debugger-meta.js +1 -0
  793. package/static/devtools/node_debugger/node_debugger.js +1 -0
  794. package/static/devtools/node_debugger/node_debugger_module.js +0 -0
  795. package/static/devtools/node_main/node_main-legacy.js +1 -0
  796. package/static/devtools/node_main/node_main-meta.js +1 -0
  797. package/static/devtools/node_main/node_main.js +1 -0
  798. package/static/devtools/object_ui/object_ui-legacy.js +1 -0
  799. package/static/devtools/object_ui/object_ui.js +3 -0
  800. package/static/devtools/object_ui/object_ui_module.js +1 -0
  801. package/static/devtools/perf_ui/perf_ui-legacy.js +1 -0
  802. package/static/devtools/perf_ui/perf_ui.js +152 -0
  803. package/static/devtools/perf_ui/perf_ui_module.js +1 -0
  804. package/static/devtools/performance_monitor/performance_monitor-legacy.js +1 -0
  805. package/static/devtools/performance_monitor/performance_monitor-meta.js +1 -0
  806. package/static/devtools/performance_monitor/performance_monitor.js +1 -0
  807. package/static/devtools/performance_monitor/performance_monitor_module.js +1 -0
  808. package/static/devtools/performance_test_runner/TimelineDataTestRunner.js +5375 -0
  809. package/static/devtools/performance_test_runner/TimelineTestRunner.js +446 -0
  810. package/static/devtools/performance_test_runner/performance_test_runner.js +6 -0
  811. package/static/devtools/performance_test_runner/performance_test_runner_module.js +0 -0
  812. package/static/devtools/persistence/persistence-legacy.js +1 -0
  813. package/static/devtools/persistence/persistence-meta.js +1 -0
  814. package/static/devtools/persistence/persistence.js +1 -0
  815. package/static/devtools/platform/platform.js +1 -0
  816. package/static/devtools/profiler/profiler-legacy.js +1 -0
  817. package/static/devtools/profiler/profiler-meta.js +1 -0
  818. package/static/devtools/profiler/profiler.js +8 -0
  819. package/static/devtools/profiler/profiler_module.js +1 -0
  820. package/static/devtools/protocol_client/protocol_client-legacy.js +1 -0
  821. package/static/devtools/protocol_client/protocol_client.js +1 -0
  822. package/static/devtools/protocol_monitor/protocol_monitor-legacy.js +1 -0
  823. package/static/devtools/protocol_monitor/protocol_monitor-meta.js +1 -0
  824. package/static/devtools/protocol_monitor/protocol_monitor.js +1 -0
  825. package/static/devtools/protocol_monitor/protocol_monitor_module.js +1 -0
  826. package/static/devtools/quick_open/quick_open-legacy.js +1 -0
  827. package/static/devtools/quick_open/quick_open.js +1 -0
  828. package/static/devtools/quick_open/quick_open_module.js +1 -0
  829. package/static/devtools/recorder/recorder.js +1 -0
  830. package/static/devtools/resources/resources-legacy.js +1 -0
  831. package/static/devtools/resources/resources-meta.js +1 -0
  832. package/static/devtools/resources/resources.js +28 -0
  833. package/static/devtools/resources/resources_module.js +1 -0
  834. package/static/devtools/root/root-legacy.js +1 -0
  835. package/static/devtools/root/root.js +1 -0
  836. package/static/devtools/screencast/screencast-legacy.js +1 -0
  837. package/static/devtools/screencast/screencast.js +1 -0
  838. package/static/devtools/sdk/sdk-legacy.js +1 -0
  839. package/static/devtools/sdk/sdk.js +2 -0
  840. package/static/devtools/sdk_test_runner/sdk_test_runner.js +297 -0
  841. package/static/devtools/sdk_test_runner/sdk_test_runner_module.js +0 -0
  842. package/static/devtools/search/search-legacy.js +1 -0
  843. package/static/devtools/search/search.js +1 -0
  844. package/static/devtools/search/search_module.js +1 -0
  845. package/static/devtools/security/security-legacy.js +1 -0
  846. package/static/devtools/security/security-meta.js +1 -0
  847. package/static/devtools/security/security.js +1 -0
  848. package/static/devtools/security/security_module.js +1 -0
  849. package/static/devtools/security_test_runner/security_test_runner.js +32 -0
  850. package/static/devtools/security_test_runner/security_test_runner_module.js +0 -0
  851. package/static/devtools/services/services-legacy.js +1 -0
  852. package/static/devtools/services/services.js +1 -0
  853. package/static/devtools/settings/settings-legacy.js +1 -0
  854. package/static/devtools/settings/settings-meta.js +1 -0
  855. package/static/devtools/settings/settings.js +1 -0
  856. package/static/devtools/settings/settings_module.js +1 -0
  857. package/static/devtools/shell.js +1 -0
  858. package/static/devtools/snippets/snippets-legacy.js +1 -0
  859. package/static/devtools/snippets/snippets.js +1 -0
  860. package/static/devtools/snippets/snippets_module.js +0 -0
  861. package/static/devtools/source_frame/source_frame-legacy.js +1 -0
  862. package/static/devtools/source_frame/source_frame.js +1 -0
  863. package/static/devtools/source_frame/source_frame_module.js +1 -0
  864. package/static/devtools/sources/sources-legacy.js +1 -0
  865. package/static/devtools/sources/sources-meta.js +1 -0
  866. package/static/devtools/sources/sources.js +13 -0
  867. package/static/devtools/sources/sources_module.js +1 -0
  868. package/static/devtools/sources_test_runner/AutocompleteTestRunner.js +46 -0
  869. package/static/devtools/sources_test_runner/DebuggerTestRunner.js +895 -0
  870. package/static/devtools/sources_test_runner/EditorTestRunner.js +237 -0
  871. package/static/devtools/sources_test_runner/LiveEditTestRunner.js +33 -0
  872. package/static/devtools/sources_test_runner/SearchTestRunner.js +158 -0
  873. package/static/devtools/sources_test_runner/SourcesTestRunner.js +173 -0
  874. package/static/devtools/sources_test_runner/sources_test_runner.js +10 -0
  875. package/static/devtools/sources_test_runner/sources_test_runner_module.js +0 -0
  876. package/static/devtools/startup/startup.js +1 -0
  877. package/static/devtools/test_runner/test_runner.js +1 -0
  878. package/static/devtools/text_editor/text_editor-legacy.js +1 -0
  879. package/static/devtools/text_editor/text_editor.js +1 -0
  880. package/static/devtools/text_editor/text_editor_module.js +1 -0
  881. package/static/devtools/text_utils/text_utils-legacy.js +1 -0
  882. package/static/devtools/text_utils/text_utils.js +1 -0
  883. package/static/devtools/theme_support/theme_support.js +1 -0
  884. package/static/devtools/third_party/acorn/acorn-tsconfig.json +8 -0
  885. package/static/devtools/third_party/acorn/acorn.js +1 -0
  886. package/static/devtools/third_party/acorn/package/dist/acorn.d.ts +209 -0
  887. package/static/devtools/third_party/acorn/package/dist/acorn.mjs +5261 -0
  888. package/static/devtools/third_party/acorn/package/dist/acorn.mjs.d.ts +2 -0
  889. package/static/devtools/third_party/acorn/package/dist/acorn.mjs.map +1 -0
  890. package/static/devtools/third_party/acorn-loose/acorn-loose-tsconfig.json +8 -0
  891. package/static/devtools/third_party/acorn-loose/package/dist/acorn-loose.d.ts +16 -0
  892. package/static/devtools/third_party/acorn-loose/package/dist/acorn-loose.mjs +1418 -0
  893. package/static/devtools/third_party/axe-core/axe.js +16423 -0
  894. package/static/devtools/third_party/chromium/chromium-tsconfig.json +8 -0
  895. package/static/devtools/third_party/chromium/client-variations/ClientVariations.d.ts +13 -0
  896. package/static/devtools/third_party/chromium/client-variations/ClientVariations.js +27 -0
  897. package/static/devtools/third_party/codemirror/codemirror-tsconfig.json +72 -0
  898. package/static/devtools/third_party/codemirror/package/addon/comment/comment.d.ts +4 -0
  899. package/static/devtools/third_party/codemirror/package/addon/comment/comment.js +211 -0
  900. package/static/devtools/third_party/codemirror/package/addon/edit/closebrackets.d.ts +1 -0
  901. package/static/devtools/third_party/codemirror/package/addon/edit/closebrackets.js +201 -0
  902. package/static/devtools/third_party/codemirror/package/addon/edit/matchbrackets.d.ts +1 -0
  903. package/static/devtools/third_party/codemirror/package/addon/edit/matchbrackets.js +158 -0
  904. package/static/devtools/third_party/codemirror/package/addon/fold/brace-fold.d.ts +1 -0
  905. package/static/devtools/third_party/codemirror/package/addon/fold/brace-fold.js +105 -0
  906. package/static/devtools/third_party/codemirror/package/addon/fold/foldcode.d.ts +1 -0
  907. package/static/devtools/third_party/codemirror/package/addon/fold/foldcode.js +157 -0
  908. package/static/devtools/third_party/codemirror/package/addon/fold/foldgutter.d.ts +1 -0
  909. package/static/devtools/third_party/codemirror/package/addon/fold/foldgutter.js +163 -0
  910. package/static/devtools/third_party/codemirror/package/addon/mode/multiplex.d.ts +1 -0
  911. package/static/devtools/third_party/codemirror/package/addon/mode/multiplex.js +131 -0
  912. package/static/devtools/third_party/codemirror/package/addon/mode/overlay.d.ts +1 -0
  913. package/static/devtools/third_party/codemirror/package/addon/mode/overlay.js +90 -0
  914. package/static/devtools/third_party/codemirror/package/addon/mode/simple.d.ts +1 -0
  915. package/static/devtools/third_party/codemirror/package/addon/mode/simple.js +216 -0
  916. package/static/devtools/third_party/codemirror/package/addon/runmode/runmode-standalone.d.ts +1 -0
  917. package/static/devtools/third_party/codemirror/package/addon/runmode/runmode-standalone.js +333 -0
  918. package/static/devtools/third_party/codemirror/package/addon/selection/active-line.d.ts +1 -0
  919. package/static/devtools/third_party/codemirror/package/addon/selection/active-line.js +72 -0
  920. package/static/devtools/third_party/codemirror/package/addon/selection/mark-selection.d.ts +1 -0
  921. package/static/devtools/third_party/codemirror/package/addon/selection/mark-selection.js +119 -0
  922. package/static/devtools/third_party/codemirror/package/lib/codemirror.d.ts +1 -0
  923. package/static/devtools/third_party/codemirror/package/lib/codemirror.js +9800 -0
  924. package/static/devtools/third_party/codemirror/package/mode/clike/clike.d.ts +4 -0
  925. package/static/devtools/third_party/codemirror/package/mode/clike/clike.js +935 -0
  926. package/static/devtools/third_party/codemirror/package/mode/clojure/clojure.d.ts +4 -0
  927. package/static/devtools/third_party/codemirror/package/mode/clojure/clojure.js +292 -0
  928. package/static/devtools/third_party/codemirror/package/mode/coffeescript/coffeescript.d.ts +4 -0
  929. package/static/devtools/third_party/codemirror/package/mode/coffeescript/coffeescript.js +359 -0
  930. package/static/devtools/third_party/codemirror/package/mode/css/css.d.ts +1 -0
  931. package/static/devtools/third_party/codemirror/package/mode/css/css.js +864 -0
  932. package/static/devtools/third_party/codemirror/package/mode/htmlembedded/htmlembedded.d.ts +1 -0
  933. package/static/devtools/third_party/codemirror/package/mode/htmlembedded/htmlembedded.js +37 -0
  934. package/static/devtools/third_party/codemirror/package/mode/htmlmixed/htmlmixed.d.ts +1 -0
  935. package/static/devtools/third_party/codemirror/package/mode/htmlmixed/htmlmixed.js +153 -0
  936. package/static/devtools/third_party/codemirror/package/mode/javascript/javascript.d.ts +1 -0
  937. package/static/devtools/third_party/codemirror/package/mode/javascript/javascript.js +942 -0
  938. package/static/devtools/third_party/codemirror/package/mode/jsx/jsx.d.ts +4 -0
  939. package/static/devtools/third_party/codemirror/package/mode/jsx/jsx.js +148 -0
  940. package/static/devtools/third_party/codemirror/package/mode/livescript/livescript.d.ts +4 -0
  941. package/static/devtools/third_party/codemirror/package/mode/livescript/livescript.js +280 -0
  942. package/static/devtools/third_party/codemirror/package/mode/markdown/markdown.d.ts +1 -0
  943. package/static/devtools/third_party/codemirror/package/mode/markdown/markdown.js +886 -0
  944. package/static/devtools/third_party/codemirror/package/mode/php/php.d.ts +1 -0
  945. package/static/devtools/third_party/codemirror/package/mode/php/php.js +234 -0
  946. package/static/devtools/third_party/codemirror/package/mode/python/python.d.ts +1 -0
  947. package/static/devtools/third_party/codemirror/package/mode/python/python.js +399 -0
  948. package/static/devtools/third_party/codemirror/package/mode/shell/shell.d.ts +1 -0
  949. package/static/devtools/third_party/codemirror/package/mode/shell/shell.js +168 -0
  950. package/static/devtools/third_party/codemirror/package/mode/wast/wast.d.ts +1 -0
  951. package/static/devtools/third_party/codemirror/package/mode/wast/wast.js +41 -0
  952. package/static/devtools/third_party/codemirror/package/mode/xml/xml.d.ts +1 -0
  953. package/static/devtools/third_party/codemirror/package/mode/xml/xml.js +413 -0
  954. package/static/devtools/third_party/i18n/bundle-tsconfig.json +8 -0
  955. package/static/devtools/third_party/i18n/i18n.d.ts +108 -0
  956. package/static/devtools/third_party/i18n/i18n.js +4336 -0
  957. package/static/devtools/third_party/lighthouse/lighthouse-dt-bundle.d.ts +1 -0
  958. package/static/devtools/third_party/lighthouse/lighthouse-dt-bundle.js +1140 -0
  959. package/static/devtools/third_party/lighthouse/lighthouse-tsconfig.json +10 -0
  960. package/static/devtools/third_party/lighthouse/locales/ar-XB.json +2066 -0
  961. package/static/devtools/third_party/lighthouse/locales/ar.json +2066 -0
  962. package/static/devtools/third_party/lighthouse/locales/bg.json +2066 -0
  963. package/static/devtools/third_party/lighthouse/locales/ca.json +2066 -0
  964. package/static/devtools/third_party/lighthouse/locales/cs.json +2066 -0
  965. package/static/devtools/third_party/lighthouse/locales/da.json +2066 -0
  966. package/static/devtools/third_party/lighthouse/locales/de.json +2066 -0
  967. package/static/devtools/third_party/lighthouse/locales/el.json +2066 -0
  968. package/static/devtools/third_party/lighthouse/locales/en-GB.json +2066 -0
  969. package/static/devtools/third_party/lighthouse/locales/en-US.json +2297 -0
  970. package/static/devtools/third_party/lighthouse/locales/en-XA.json +2066 -0
  971. package/static/devtools/third_party/lighthouse/locales/en-XL.json +2297 -0
  972. package/static/devtools/third_party/lighthouse/locales/es-419.json +2066 -0
  973. package/static/devtools/third_party/lighthouse/locales/es.json +2066 -0
  974. package/static/devtools/third_party/lighthouse/locales/fi.json +2066 -0
  975. package/static/devtools/third_party/lighthouse/locales/fil.json +2066 -0
  976. package/static/devtools/third_party/lighthouse/locales/fr.json +2066 -0
  977. package/static/devtools/third_party/lighthouse/locales/he.json +2066 -0
  978. package/static/devtools/third_party/lighthouse/locales/hi.json +2066 -0
  979. package/static/devtools/third_party/lighthouse/locales/hr.json +2066 -0
  980. package/static/devtools/third_party/lighthouse/locales/hu.json +2066 -0
  981. package/static/devtools/third_party/lighthouse/locales/id.json +2066 -0
  982. package/static/devtools/third_party/lighthouse/locales/it.json +2066 -0
  983. package/static/devtools/third_party/lighthouse/locales/ja.json +2066 -0
  984. package/static/devtools/third_party/lighthouse/locales/ko.json +2066 -0
  985. package/static/devtools/third_party/lighthouse/locales/lt.json +2066 -0
  986. package/static/devtools/third_party/lighthouse/locales/lv.json +2066 -0
  987. package/static/devtools/third_party/lighthouse/locales/nl.json +2066 -0
  988. package/static/devtools/third_party/lighthouse/locales/no.json +2066 -0
  989. package/static/devtools/third_party/lighthouse/locales/pl.json +2066 -0
  990. package/static/devtools/third_party/lighthouse/locales/pt-PT.json +2066 -0
  991. package/static/devtools/third_party/lighthouse/locales/pt.json +2066 -0
  992. package/static/devtools/third_party/lighthouse/locales/ro.json +2066 -0
  993. package/static/devtools/third_party/lighthouse/locales/ru.json +2066 -0
  994. package/static/devtools/third_party/lighthouse/locales/sk.json +2066 -0
  995. package/static/devtools/third_party/lighthouse/locales/sl.json +2066 -0
  996. package/static/devtools/third_party/lighthouse/locales/sr-Latn.json +2066 -0
  997. package/static/devtools/third_party/lighthouse/locales/sr.json +2066 -0
  998. package/static/devtools/third_party/lighthouse/locales/sv.json +2066 -0
  999. package/static/devtools/third_party/lighthouse/locales/ta.json +2066 -0
  1000. package/static/devtools/third_party/lighthouse/locales/te.json +2066 -0
  1001. package/static/devtools/third_party/lighthouse/locales/th.json +2066 -0
  1002. package/static/devtools/third_party/lighthouse/locales/tr.json +2066 -0
  1003. package/static/devtools/third_party/lighthouse/locales/uk.json +2066 -0
  1004. package/static/devtools/third_party/lighthouse/locales/vi.json +2066 -0
  1005. package/static/devtools/third_party/lighthouse/locales/zh-HK.json +2066 -0
  1006. package/static/devtools/third_party/lighthouse/locales/zh-TW.json +2066 -0
  1007. package/static/devtools/third_party/lighthouse/locales/zh.json +2066 -0
  1008. package/static/devtools/third_party/lighthouse/report-assets/report-generator.d.ts +1 -0
  1009. package/static/devtools/third_party/lighthouse/report-assets/report-generator.js +167 -0
  1010. package/static/devtools/third_party/lighthouse/report-assets/report.d.ts +1 -0
  1011. package/static/devtools/third_party/lighthouse/report-assets/report.js +5032 -0
  1012. package/static/devtools/third_party/lit-html/lit-html-tsconfig.json +22 -0
  1013. package/static/devtools/third_party/lit-html/lit-html.js +120 -0
  1014. package/static/devtools/third_party/lit-html/package/directives/class-map.d.ts +28 -0
  1015. package/static/devtools/third_party/lit-html/package/directives/class-map.js +101 -0
  1016. package/static/devtools/third_party/lit-html/package/directives/class-map.js.map +1 -0
  1017. package/static/devtools/third_party/lit-html/package/directives/if-defined.d.ts +22 -0
  1018. package/static/devtools/third_party/lit-html/package/directives/if-defined.js +37 -0
  1019. package/static/devtools/third_party/lit-html/package/directives/if-defined.js.map +1 -0
  1020. package/static/devtools/third_party/lit-html/package/directives/live.d.ts +38 -0
  1021. package/static/devtools/third_party/lit-html/package/directives/live.js +73 -0
  1022. package/static/devtools/third_party/lit-html/package/directives/live.js.map +1 -0
  1023. package/static/devtools/third_party/lit-html/package/directives/repeat.d.ts +37 -0
  1024. package/static/devtools/third_party/lit-html/package/directives/repeat.js +415 -0
  1025. package/static/devtools/third_party/lit-html/package/directives/repeat.js.map +1 -0
  1026. package/static/devtools/third_party/lit-html/package/directives/style-map.d.ts +36 -0
  1027. package/static/devtools/third_party/lit-html/package/directives/style-map.js +78 -0
  1028. package/static/devtools/third_party/lit-html/package/directives/style-map.js.map +1 -0
  1029. package/static/devtools/third_party/lit-html/package/lib/default-template-processor.d.ts +39 -0
  1030. package/static/devtools/third_party/lit-html/package/lib/default-template-processor.js +52 -0
  1031. package/static/devtools/third_party/lit-html/package/lib/default-template-processor.js.map +1 -0
  1032. package/static/devtools/third_party/lit-html/package/lib/directive.d.ts +59 -0
  1033. package/static/devtools/third_party/lit-html/package/lib/directive.js +63 -0
  1034. package/static/devtools/third_party/lit-html/package/lib/directive.js.map +1 -0
  1035. package/static/devtools/third_party/lit-html/package/lib/dom.d.ts +29 -0
  1036. package/static/devtools/third_party/lit-html/package/lib/dom.js +44 -0
  1037. package/static/devtools/third_party/lit-html/package/lib/dom.js.map +1 -0
  1038. package/static/devtools/third_party/lit-html/package/lib/part.d.ts +46 -0
  1039. package/static/devtools/third_party/lit-html/package/lib/part.js +23 -0
  1040. package/static/devtools/third_party/lit-html/package/lib/part.js.map +1 -0
  1041. package/static/devtools/third_party/lit-html/package/lib/parts.d.ts +148 -0
  1042. package/static/devtools/third_party/lit-html/package/lib/parts.js +476 -0
  1043. package/static/devtools/third_party/lit-html/package/lib/parts.js.map +1 -0
  1044. package/static/devtools/third_party/lit-html/package/lib/render.d.ts +33 -0
  1045. package/static/devtools/third_party/lit-html/package/lib/render.js +43 -0
  1046. package/static/devtools/third_party/lit-html/package/lib/render.js.map +1 -0
  1047. package/static/devtools/third_party/lit-html/package/lib/template-factory.d.ts +57 -0
  1048. package/static/devtools/third_party/lit-html/package/lib/template-factory.js +48 -0
  1049. package/static/devtools/third_party/lit-html/package/lib/template-factory.js.map +1 -0
  1050. package/static/devtools/third_party/lit-html/package/lib/template-instance.d.ts +30 -0
  1051. package/static/devtools/third_party/lit-html/package/lib/template-instance.js +134 -0
  1052. package/static/devtools/third_party/lit-html/package/lib/template-instance.js.map +1 -0
  1053. package/static/devtools/third_party/lit-html/package/lib/template-result.d.ts +42 -0
  1054. package/static/devtools/third_party/lit-html/package/lib/template-result.js +131 -0
  1055. package/static/devtools/third_party/lit-html/package/lib/template-result.js.map +1 -0
  1056. package/static/devtools/third_party/lit-html/package/lib/template.d.ts +92 -0
  1057. package/static/devtools/third_party/lit-html/package/lib/template.js +215 -0
  1058. package/static/devtools/third_party/lit-html/package/lib/template.js.map +1 -0
  1059. package/static/devtools/third_party/lit-html/package/lit-html.d.ts +42 -0
  1060. package/static/devtools/third_party/lit-html/package/lit-html.js +59 -0
  1061. package/static/devtools/third_party/lit-html/package/lit-html.js.map +1 -0
  1062. package/static/devtools/third_party/marked/marked-tsconfig.json +8 -0
  1063. package/static/devtools/third_party/marked/marked.js +1 -0
  1064. package/static/devtools/third_party/marked/package/lib/marked.esm.d.ts +1 -0
  1065. package/static/devtools/third_party/marked/package/lib/marked.esm.js +2584 -0
  1066. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts +53 -0
  1067. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts.map +1 -0
  1068. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.js +64 -0
  1069. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.d.ts +176 -0
  1070. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.d.ts.map +1 -0
  1071. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.js +356 -0
  1072. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts +21 -0
  1073. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts.map +1 -0
  1074. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +81 -0
  1075. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +423 -0
  1076. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts.map +1 -0
  1077. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +516 -0
  1078. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts +39 -0
  1079. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -0
  1080. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +76 -0
  1081. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.d.ts +26 -0
  1082. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -0
  1083. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.js +30 -0
  1084. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +120 -0
  1085. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts.map +1 -0
  1086. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js +266 -0
  1087. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.d.ts +22 -0
  1088. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.d.ts.map +1 -0
  1089. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.js +15 -0
  1090. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +72 -0
  1091. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -0
  1092. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +60 -0
  1093. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts +181 -0
  1094. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts.map +1 -0
  1095. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js +316 -0
  1096. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts +174 -0
  1097. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -0
  1098. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +647 -0
  1099. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts +53 -0
  1100. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts.map +1 -0
  1101. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.js +77 -0
  1102. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts +33 -0
  1103. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts.map +1 -0
  1104. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.js +873 -0
  1105. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts +76 -0
  1106. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts.map +1 -0
  1107. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.js +92 -0
  1108. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.d.ts +25 -0
  1109. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.d.ts.map +1 -0
  1110. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.js +33 -0
  1111. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts +34 -0
  1112. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts.map +1 -0
  1113. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js +37 -0
  1114. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts +59 -0
  1115. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts.map +1 -0
  1116. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.js +15 -0
  1117. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts +89 -0
  1118. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -0
  1119. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js +109 -0
  1120. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.d.ts +82 -0
  1121. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.d.ts.map +1 -0
  1122. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.js +83 -0
  1123. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +189 -0
  1124. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts.map +1 -0
  1125. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.js +313 -0
  1126. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts +60 -0
  1127. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts.map +1 -0
  1128. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.js +66 -0
  1129. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +735 -0
  1130. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -0
  1131. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +962 -0
  1132. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +276 -0
  1133. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -0
  1134. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +421 -0
  1135. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts +128 -0
  1136. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -0
  1137. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js +150 -0
  1138. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +322 -0
  1139. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts.map +1 -0
  1140. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js +463 -0
  1141. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +439 -0
  1142. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -0
  1143. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +724 -0
  1144. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts +62 -0
  1145. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts.map +1 -0
  1146. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js +145 -0
  1147. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +80 -0
  1148. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -0
  1149. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +262 -0
  1150. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts +152 -0
  1151. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts.map +1 -0
  1152. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.js +31 -0
  1153. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts +910 -0
  1154. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts.map +1 -0
  1155. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +1343 -0
  1156. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Product.d.ts +21 -0
  1157. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Product.d.ts.map +1 -0
  1158. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Product.js +15 -0
  1159. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +135 -0
  1160. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts.map +1 -0
  1161. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js +133 -0
  1162. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PuppeteerViewport.d.ts +24 -0
  1163. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PuppeteerViewport.d.ts.map +1 -0
  1164. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PuppeteerViewport.js +0 -0
  1165. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts +66 -0
  1166. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts.map +1 -0
  1167. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js +157 -0
  1168. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.d.ts +61 -0
  1169. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.d.ts.map +1 -0
  1170. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.js +72 -0
  1171. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +98 -0
  1172. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts.map +1 -0
  1173. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js +137 -0
  1174. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.d.ts +28 -0
  1175. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.d.ts.map +1 -0
  1176. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.js +43 -0
  1177. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts +47 -0
  1178. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts.map +1 -0
  1179. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.js +94 -0
  1180. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.d.ts +40 -0
  1181. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.d.ts.map +1 -0
  1182. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.js +403 -0
  1183. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +102 -0
  1184. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts.map +1 -0
  1185. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js +109 -0
  1186. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.d.ts +22 -0
  1187. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.d.ts.map +1 -0
  1188. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.js +24 -0
  1189. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.d.ts +17 -0
  1190. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.d.ts.map +1 -0
  1191. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.js +20 -0
  1192. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts +66 -0
  1193. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts.map +1 -0
  1194. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +288 -0
  1195. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts +17 -0
  1196. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts.map +1 -0
  1197. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/environment.js +16 -0
  1198. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.d.ts +18 -0
  1199. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.d.ts.map +1 -0
  1200. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.js +39 -0
  1201. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.d.ts +18 -0
  1202. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.d.ts.map +1 -0
  1203. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.js +22 -0
  1204. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts +132 -0
  1205. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts.map +1 -0
  1206. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +468 -0
  1207. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts +40 -0
  1208. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -0
  1209. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +197 -0
  1210. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +42 -0
  1211. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -0
  1212. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.js +0 -0
  1213. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts +16 -0
  1214. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts.map +1 -0
  1215. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +469 -0
  1216. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts +29 -0
  1217. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -0
  1218. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js +34 -0
  1219. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts +31 -0
  1220. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts.map +1 -0
  1221. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js +61 -0
  1222. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts +156 -0
  1223. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts.map +1 -0
  1224. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +183 -0
  1225. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts +18 -0
  1226. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts.map +1 -0
  1227. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js +151 -0
  1228. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.d.ts +18 -0
  1229. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.d.ts.map +1 -0
  1230. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.js +23 -0
  1231. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node.d.ts +18 -0
  1232. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node.d.ts.map +1 -0
  1233. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node.js +22 -0
  1234. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +22 -0
  1235. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts.map +1 -0
  1236. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +19 -0
  1237. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/web.d.ts +18 -0
  1238. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/web.d.ts.map +1 -0
  1239. package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/web.js +22 -0
  1240. package/static/devtools/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.d.ts +22 -0
  1241. package/static/devtools/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.d.ts.map +1 -0
  1242. package/static/devtools/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.js +53 -0
  1243. package/static/devtools/third_party/puppeteer/puppeteer-tsconfig.json +58 -0
  1244. package/static/devtools/third_party/puppeteer/puppeteer.js +1 -0
  1245. package/static/devtools/third_party/wasmparser/package/dist/esm/WasmDis.js +1595 -0
  1246. package/static/devtools/third_party/wasmparser/package/dist/esm/WasmParser.js +3120 -0
  1247. package/static/devtools/third_party/wasmparser/wasmparser-tsconfig.json +9 -0
  1248. package/static/devtools/timeline/timeline-legacy.js +1 -0
  1249. package/static/devtools/timeline/timeline-meta.js +1 -0
  1250. package/static/devtools/timeline/timeline.js +1 -0
  1251. package/static/devtools/timeline/timeline_module.js +1 -0
  1252. package/static/devtools/timeline_model/timeline_model-legacy.js +1 -0
  1253. package/static/devtools/timeline_model/timeline_model.js +1 -0
  1254. package/static/devtools/timeline_model/timeline_model_module.js +0 -0
  1255. package/static/devtools/toolbox.html +20 -0
  1256. package/static/devtools/toolbox.js +1 -0
  1257. package/static/devtools/toolbox_bootstrap/toolbox_bootstrap.js +1 -0
  1258. package/static/devtools/ui/components/components.js +378 -0
  1259. package/static/devtools/ui/ui-legacy.js +1 -0
  1260. package/static/devtools/ui/ui.js +3 -0
  1261. package/static/devtools/ui/utils/utils.js +1 -0
  1262. package/static/devtools/wasmparser_worker/wasmparser_worker-entrypoint.js +1 -0
  1263. package/static/devtools/wasmparser_worker/wasmparser_worker.js +1 -0
  1264. package/static/devtools/web_audio/graph_visualizer/graph_visualizer.js +1 -0
  1265. package/static/devtools/web_audio/web_audio-legacy.js +1 -0
  1266. package/static/devtools/web_audio/web_audio-meta.js +1 -0
  1267. package/static/devtools/web_audio/web_audio.js +23 -0
  1268. package/static/devtools/web_audio/web_audio_module.js +1 -0
  1269. package/static/devtools/webauthn/webauthn-legacy.js +1 -0
  1270. package/static/devtools/webauthn/webauthn-meta.js +1 -0
  1271. package/static/devtools/webauthn/webauthn.js +6 -0
  1272. package/static/devtools/webauthn/webauthn_module.js +1 -0
  1273. package/static/devtools/worker_app.html +20 -0
  1274. package/static/devtools/worker_app.js +1 -0
  1275. package/static/devtools/worker_main/worker_main-legacy.js +1 -0
  1276. package/static/devtools/worker_main/worker_main.js +1 -0
  1277. package/static/devtools/worker_service/worker_service.js +1 -0
  1278. package/static/devtools/workspace/workspace-legacy.js +1 -0
  1279. package/static/devtools/workspace/workspace.js +1 -0
  1280. package/static/devtools/workspace_diff/workspace_diff-legacy.js +1 -0
  1281. package/static/devtools/workspace_diff/workspace_diff.js +1 -0
  1282. package/static/devtools/workspace_diff/workspace_diff_module.js +0 -0
  1283. package/static/docs/swagger.json +3294 -2185
  1284. package/static/function/client.js +1037 -992
  1285. package/build/routes/chromium/http/download-post.body.json +0 -32
  1286. package/build/routes/chromium/http/function-post.body.json +0 -32
  1287. package/build/routes/chromium/http/function-post.query.json +0 -120
  1288. package/build/routes/chromium/http/json-list.response.json +0 -52
  1289. package/build/routes/chromium/http/json-new.js +0 -23
  1290. package/build/routes/chromium/http/json-new.response.json +0 -44
  1291. package/build/routes/chromium/http/json-protocol-get.response.json +0 -6
  1292. package/build/routes/chromium/http/json-version-get.response.json +0 -37
  1293. package/build/routes/chromium/http/pdf-post.query.json +0 -120
  1294. package/build/routes/chromium/http/performance.body.json +0 -26
  1295. package/build/routes/chromium/http/performance.query.json +0 -120
  1296. package/build/routes/chromium/http/scrape-post.response.json +0 -309
  1297. package/build/routes/chromium/http/screenshot-post.query.json +0 -120
  1298. package/build/routes/chromium/utils/cdp.d.ts +0 -2
  1299. package/build/routes/chromium/utils/cdp.js +0 -14
  1300. package/build/routes/chromium/ws/cdp-chromium.js +0 -10
  1301. package/build/routes/chromium/ws/cdp-chromium.query.json +0 -120
  1302. package/build/routes/chromium/ws/playwright-chromium.query.json +0 -100
  1303. package/build/routes/firefox/ws/playwright-firefox.d.ts +0 -16
  1304. package/build/routes/firefox/ws/playwright-firefox.query.json +0 -100
  1305. package/build/routes/management/http/config-get.response.json +0 -107
  1306. package/build/routes/management/http/metrics-get.response.json +0 -94
  1307. package/build/routes/management/http/metrics-total-get.response.json +0 -72
  1308. package/build/routes/webkit/ws/playwright-webkit.query.json +0 -100
  1309. package/src/routes/chromium/http/json-list.ts +0 -50
  1310. package/src/routes/chromium/utils/cdp.ts +0 -19
  1311. package/build/routes/{chromium/http/content-post.query.json → chrome/http/content.post.query.json} +0 -0
  1312. package/build/routes/{chromium/http/content-post.response.json → chrome/http/content.post.response.json} +0 -0
  1313. package/build/routes/{chromium/http/scrape-post.query.json → chrome/http/download.post.query.json} +0 -0
  1314. package/build/routes/{chromium/http/pdf-post.response.json → chrome/http/pdf.post.response.json} +0 -0
  1315. package/build/routes/{chromium/http/screenshot-post.response.json → chrome/http/screenshot.post.response.json} +0 -0
  1316. package/build/routes/{chromium/utils/performance/child.d.ts → chrome/tests/content.spec.d.ts} +0 -0
  1317. package/build/routes/{chromium/utils/performance/types.js → chrome/tests/download.spec.d.ts} +0 -0
  1318. package/build/routes/management/http/{config-get.d.ts → config.get.d.ts} +0 -0
  1319. package/build/routes/management/http/{config-get.js → config.get.js} +0 -0
  1320. package/build/routes/management/http/{metrics-total-get.d.ts → metrics-total.get.d.ts} +0 -0
  1321. package/build/routes/management/http/{metrics-total-get.js → metrics-total.get.js} +0 -0
  1322. package/build/routes/management/http/{metrics-get.d.ts → metrics.get.d.ts} +0 -0
  1323. package/build/routes/management/http/{metrics-get.js → metrics.get.js} +0 -0
  1324. package/build/routes/management/http/{sessions-get.d.ts → sessions.get.d.ts} +0 -0
  1325. package/build/routes/management/http/{sessions-get.js → sessions.get.js} +0 -0
  1326. package/build/routes/management/http/{static-get.d.ts → static.get.d.ts} +0 -0
  1327. package/build/{routes/chromium/http/json-protocol-get.d.ts → shared/json-protocol.http.d.ts} +1 -1
  1328. package/build/{routes/chromium/http/json-version-get.d.ts → shared/json-version.http.d.ts} +1 -1
  1329. /package/build/{routes/chromium → shared}/utils/function/client.d.ts +0 -0
  1330. /package/build/{routes/chromium → shared}/utils/function/client.js +0 -0
  1331. /package/build/{routes/chromium → shared}/utils/function/handler.d.ts +0 -0
  1332. /package/build/{routes/chromium → shared}/utils/function/handler.js +0 -0
  1333. /package/build/{routes/chromium → shared}/utils/performance/child.js +0 -0
  1334. /package/build/{routes/chromium → shared}/utils/performance/main.d.ts +0 -0
  1335. /package/build/{routes/chromium → shared}/utils/performance/types.d.ts +0 -0
  1336. /package/src/routes/management/http/{config-get.ts → config.get.ts} +0 -0
  1337. /package/src/routes/management/http/{metrics-total-get.ts → metrics-total.get.ts} +0 -0
  1338. /package/src/routes/management/http/{metrics-get.ts → metrics.get.ts} +0 -0
  1339. /package/src/routes/management/http/{sessions-get.ts → sessions.get.ts} +0 -0
  1340. /package/src/{routes/chromium → shared}/utils/function/client.ts +0 -0
  1341. /package/src/{routes/chromium → shared}/utils/performance/child.ts +0 -0
  1342. /package/src/{routes/chromium → shared}/utils/performance/types.ts +0 -0
@@ -0,0 +1 @@
1
+ var e,t,n;e=self,t=function(){var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=r||i||o,a=l&&(r?document.documentMode||6:+(o||i)[1]),s=!o&&/WebKit\//.test(e),u=s&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),f=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=d&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),m=/Android/.test(e),v=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),x=/win/i.test(t),w=f&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(f=!1,s=!0);var C=y&&(u||f&&(null==w||w<12.11)),S=n||l&&a>=9;function k(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var L,T=function(e,t){var n=e.className,r=k(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function A(e,t){return M(e).appendChild(t)}function O(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function N(e,t,n,r){var i=O(e,t,n,r);return i.setAttribute("role","presentation"),i}function D(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function P(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function W(e,t){var n=e.className;k(t).test(n)||(e.className+=(n?" ":"")+t)}function H(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!k(n[r]).test(t)&&(t+=" "+n[r]);return t}L=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var F=function(e){e.select()};function E(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function R(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function I(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,l=i||0;;){var a=e.indexOf("\t",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}g?F=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(F=function(e){try{e.select()}catch(e){}});var z=function(){this.id=null,this.f=null,this.time=0,this.handler=E(this.onTimeout,this)};function B(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}z.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},z.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var G={toString:function(){return"CodeMirror.Pass"}},U={scroll:!1},j={origin:"*mouse"},V={origin:"+move"};function K(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var l=o-r;if(o==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var X=[""];function _(e){for(;X.length<=e;)X.push(q(X)+" ");return X[e]}function q(e){return e[e.length-1]}function Y(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function $(){}function Z(e,t){var n;return Object.create?n=Object.create(e):($.prototype=e,n=new $),t&&R(t,n),n}var Q=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function J(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Q.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&J(e))||t.test(e):J(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,n){for(;(n<0?t>0:t<e.length)&&re(e.charAt(t));)t+=n;return t}function oe(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var le=null;function ae(e,t,n){var r;le=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:le=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:le=i)}return null!=r?r:le}var se=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(l,a){var s="ltr"==a?"L":"R";if(0==l.length||"ltr"==a&&!e.test(l))return!1;for(var u,c=l.length,f=[],d=0;d<c;++d)f.push((u=l.charCodeAt(d))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":8204==u?"b":"L");for(var h=0,p=s;h<c;++h){var g=f[h];"m"==g?f[h]=p:p=g}for(var m=0,v=s;m<c;++m){var y=f[m];"1"==y&&"r"==v?f[m]="n":n.test(y)&&(v=y,"r"==y&&(f[m]="R"))}for(var b=1,x=f[0];b<c-1;++b){var w=f[b];"+"==w&&"1"==x&&"1"==f[b+1]?f[b]="1":","!=w||x!=f[b+1]||"1"!=x&&"n"!=x||(f[b]=x),x=w}for(var C=0;C<c;++C){var S=f[C];if(","==S)f[C]="N";else if("%"==S){var k=void 0;for(k=C+1;k<c&&"%"==f[k];++k);for(var L=C&&"!"==f[C-1]||k<c&&"1"==f[k]?"1":"N",T=C;T<k;++T)f[T]=L;C=k-1}}for(var M=0,A=s;M<c;++M){var O=f[M];"L"==A&&"1"==O?f[M]="L":n.test(O)&&(A=O)}for(var N=0;N<c;++N)if(t.test(f[N])){var D=void 0;for(D=N+1;D<c&&t.test(f[D]);++D);for(var P="L"==(N?f[N-1]:s),W=P==("L"==(D<c?f[D]:s))?P?"L":"R":s,H=N;H<D;++H)f[H]=W;N=D-1}for(var F,E=[],R=0;R<c;)if(r.test(f[R])){var I=R;for(++R;R<c&&r.test(f[R]);++R);E.push(new o(0,I,R))}else{var z=R,B=E.length,G="rtl"==a?1:0;for(++R;R<c&&"L"!=f[R];++R);for(var U=z;U<R;)if(i.test(f[U])){z<U&&(E.splice(B,0,new o(1,z,U)),B+=G);var j=U;for(++U;U<R&&i.test(f[U]);++U);E.splice(B,0,new o(2,j,U)),B+=G,z=U}else++U;z<R&&E.splice(B,0,new o(1,z,R))}return"ltr"==a&&(1==E[0].level&&(F=l.match(/^\s+/))&&(E[0].from=F[0].length,E.unshift(new o(0,0,F[0].length))),1==q(E).level&&(F=l.match(/\s+$/))&&(q(E).to-=F[0].length,E.push(new o(0,c-F[0].length,c)))),"rtl"==a?E.reverse():E}}();function ue(e,t){var n=e.order;return null==n&&(n=e.order=se(e.text,t)),n}var ce=[],fe=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||ce).concat(n)}};function de(e,t){return e._handlers&&e._handlers[t]||ce}function he(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=B(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function pe(e,t){var n=de(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function ge(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),pe(e,n||t.type,e,t),we(t)||t.codemirrorIgnore}function me(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==B(n,t[r])&&n.push(t[r])}function ve(e,t){return de(e,t).length>0}function ye(e){e.prototype.on=function(e,t){fe(this,e,t)},e.prototype.off=function(e,t){he(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ce(e){be(e),xe(e)}function Se(e){return e.target||e.srcElement}function ke(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Le,Te,Me=function(){if(l&&a<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Ae(e){if(null==Le){var t=O("span","​");A(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Le=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&a<8))}var n=Le?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Oe(e){if(null!=Te)return Te;var t=A(e,document.createTextNode("AخA")),n=L(t,0,1).getBoundingClientRect(),r=L(t,1,2).getBoundingClientRect();return M(e),!(!n||n.left==n.right)&&(Te=r.right-n.right<3)}var Ne,De=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Pe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},We="oncopy"in(Ne=O("div"))||(Ne.setAttribute("oncopy","return;"),"function"==typeof Ne.oncopy),He=null,Fe={},Ee={};function Re(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fe[e]=t}function Ie(e){if("string"==typeof e&&Ee.hasOwnProperty(e))e=Ee[e];else if(e&&"string"==typeof e.name&&Ee.hasOwnProperty(e.name)){var t=Ee[e.name];"string"==typeof t&&(t={name:t}),(e=Z(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ie("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ie("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function ze(e,t){t=Ie(t);var n=Fe[t.name];if(!n)return ze(e,"text/plain");var r=n(e,t);if(Be.hasOwnProperty(t.name)){var i=Be[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var Be={};function Ge(e,t){R(t,Be.hasOwnProperty(e)?Be[e]:Be[e]={})}function Ue(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function je(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ve(e,t,n){return!e.startState||e.startState(t,n)}var Ke=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Xe(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function _e(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function qe(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Ye(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function $e(e){if(null==e.parent)return null;for(var t=e.parent,n=B(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function Ze(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var l=0;l<e.lines.length;++l){var a=e.lines[l].height;if(t<a)break;t-=a}return n+l}function Qe(e,t){return t>=e.first&&t<e.first+e.size}function Je(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function et(e,t,n){if(void 0===n&&(n=null),!(this instanceof et))return new et(e,t,n);this.line=e,this.ch=t,this.sticky=n}function tt(e,t){return e.line-t.line||e.ch-t.ch}function nt(e,t){return e.sticky==t.sticky&&0==tt(e,t)}function rt(e){return et(e.line,e.ch)}function it(e,t){return tt(e,t)<0?t:e}function ot(e,t){return tt(e,t)<0?e:t}function lt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function at(e,t){if(t.line<e.first)return et(e.first,0);var n=e.first+e.size-1;return t.line>n?et(n,Xe(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Xe(e,t.line).text.length)}function st(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=at(e,t[r]);return n}Ke.prototype.eol=function(){return this.pos>=this.string.length},Ke.prototype.sol=function(){return this.pos==this.lineStart},Ke.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ke.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ke.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ke.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ke.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ke.prototype.skipToEnd=function(){this.pos=this.string.length},Ke.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ke.prototype.backUp=function(e){this.pos-=e},Ke.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=I(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?I(this.string,this.lineStart,this.tabSize):0)},Ke.prototype.indentation=function(){return I(this.string,null,this.tabSize)-(this.lineStart?I(this.string,this.lineStart,this.tabSize):0)},Ke.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ke.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ke.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ke.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ke.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ut=function(e,t){this.state=e,this.lookAhead=t},ct=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ft(e,t,n,r){var i=[e.state.modeGen],o={};xt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var l=n.state,a=function(r){n.baseTokens=i;var a=e.state.overlays[r],s=1,u=0;n.state=!0,xt(e,t.text,a.mode,n,(function(e,t){for(var n=s;u<e;){var r=i[s];r>e&&i.splice(s,1,e,i[s+1],r),s+=2,u=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;n<s;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=l,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)a(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function dt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=ht(e,$e(t)),i=t.text.length>e.options.maxHighlightLength&&Ue(e.doc.mode,r.state),o=ft(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ht(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ct(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,l=n?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>l;--a){if(a<=o.first)return o.first;var s=Xe(o,a-1),u=s.stateAfter;if(u&&(!n||a+(u instanceof ut?u.lookAhead:0)<=o.modeFrontier))return a;var c=I(s.text,null,e.options.tabSize);(null==i||r>c)&&(i=a-1,r=c)}return i}(e,t,n),l=o>r.first&&Xe(r,o-1).stateAfter,a=l?ct.fromSaved(r,l,o):new ct(r,Ve(r.mode),o);return r.iter(o,t,(function(n){pt(e,n.text,a);var r=a.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?a.save():null,a.nextLine()})),n&&(r.modeFrontier=a.line),a}function pt(e,t,n,r){var i=e.doc.mode,o=new Ke(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&gt(i,n.state);!o.eol();)mt(i,o,n.state),o.start=o.pos}function gt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=je(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function mt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=je(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ct.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ct.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ct.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ct.fromSaved=function(e,t,n){return t instanceof ut?new ct(e,Ue(e.mode,t.state),n,t.lookAhead):new ct(e,Ue(e.mode,t),n)},ct.prototype.save=function(e){var t=!1!==e?Ue(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ut(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var i,o,l=e.doc,a=l.mode,s=Xe(l,(t=at(l,t)).line),u=ht(e,t.line,n),c=new Ke(s.text,e.options.tabSize,u);for(r&&(o=[]);(r||c.pos<t.ch)&&!c.eol();)c.start=c.pos,i=mt(a,c,u.state),r&&o.push(new vt(c,i,Ue(l.mode,u.state)));return r?o:new vt(c,i,u.state)}function bt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function xt(e,t,n,r,i,o,l){var a=n.flattenSpans;null==a&&(a=e.options.flattenSpans);var s,u=0,c=null,f=new Ke(t,e.options.tabSize,r),d=e.options.addModeClass&&[null];for(""==t&&bt(gt(n,r.state),o);!f.eol();){if(f.pos>e.options.maxHighlightLength?(a=!1,l&&pt(e,t,r,f.pos),f.pos=t.length,s=null):s=bt(mt(n,f,r.state,d),o),d){var h=d[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!a||c!=s){for(;u<f.start;)i(u=Math.min(f.start,u+5e3),c);c=s}f.start=f.pos}for(;u<f.pos;){var p=Math.min(f.pos,u+5e3);i(p,c),u=p}}var wt=!1,Ct=!1;function St(e,t,n){this.marker=e,this.from=t,this.to=n}function kt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Lt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Tt(e,t){if(t.full)return null;var n=Qe(e,t.from.line)&&Xe(e,t.from.line).markedSpans,r=Qe(e,t.to.line)&&Xe(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,l=0==tt(t.from,t.to),a=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==l.type&&(!n||!o.marker.insertLeft)){var a=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new St(l,o.from,a?null:o.to))}}return r}(n,i,l),s=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.to||(l.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!n||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new St(l,a?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,l),u=1==t.text.length,c=q(t.text).length+(u?i:0);if(a)for(var f=0;f<a.length;++f){var d=a[f];if(null==d.to){var h=kt(s,d.marker);h?u&&(d.to=null==h.to?null:h.to+c):d.to=i}}if(s)for(var p=0;p<s.length;++p){var g=s[p];null!=g.to&&(g.to+=c),null==g.from?kt(a,g.marker)||(g.from=c,u&&(a||(a=[])).push(g)):(g.from+=c,u&&(a||(a=[])).push(g))}a&&(a=Mt(a)),s&&s!=a&&(s=Mt(s));var m=[a];if(!u){var v,y=t.text.length-2;if(y>0&&a)for(var b=0;b<a.length;++b)null==a[b].to&&(v||(v=[])).push(new St(a[b].marker,null,null));for(var x=0;x<y;++x)m.push(v);m.push(s)}return m}function Mt(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function At(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Ot(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Nt(e){return e.inclusiveLeft?-1:0}function Dt(e){return e.inclusiveRight?1:0}function Pt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=tt(r.from,i.from)||Nt(e)-Nt(t);if(o)return-o;var l=tt(r.to,i.to)||Dt(e)-Dt(t);return l||t.id-e.id}function Wt(e,t){var n,r=Ct&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Pt(n,i.marker)<0)&&(n=i.marker);return n}function Ht(e){return Wt(e,!0)}function Ft(e){return Wt(e,!1)}function Et(e,t){var n,r=Ct&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Pt(n,o.marker)<0)&&(n=o.marker)}return n}function Rt(e,t,n,r,i){var o=Xe(e,t),l=Ct&&o.markedSpans;if(l)for(var a=0;a<l.length;++a){var s=l[a];if(s.marker.collapsed){var u=s.marker.find(0),c=tt(u.from,n)||Nt(s.marker)-Nt(i),f=tt(u.to,r)||Dt(s.marker)-Dt(i);if(!(c>=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?tt(u.to,n)>=0:tt(u.to,n)>0)||c>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?tt(u.from,r)<=0:tt(u.from,r)<0)))return!0}}}function It(e){for(var t;t=Ht(e);)e=t.find(-1,!0).line;return e}function zt(e,t){var n=Xe(e,t),r=It(n);return n==r?t:$e(r)}function Bt(e,t){if(t>e.lastLine())return t;var n,r=Xe(e,t);if(!Gt(e,r))return t;for(;n=Ft(r);)r=n.find(1,!0).line;return $e(r)+1}function Gt(e,t){var n=Ct&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Ut(e,t,r))return!0}}function Ut(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Ut(e,r.line,kt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Ut(e,t,i))return!0}function jt(e){for(var t=0,n=(e=It(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var l=0;l<o.children.length;++l){var a=o.children[l];if(a==n)break;t+=a.height}return t}function Vt(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Ht(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=Ft(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function Kt(e){var t=e.display,n=e.doc;t.maxLine=Xe(n,n.first),t.maxLineLength=Vt(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=Vt(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Xt=function(e,t,n){this.text=e,Ot(this,t),this.height=n?n(this):1};function _t(e){e.parent=null,At(e)}Xt.prototype.lineNo=function(){return $e(this)},ye(Xt);var qt={},Yt={};function $t(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Yt:qt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Zt(e,t){var n=N("span",null,null,s?"padding-right: .1px":null),r={pre:N("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=Jt,Oe(e.display.measure)&&(l=ue(o,e.doc.direction))&&(r.addToken=en(r.addToken,l)),r.map=[],nn(o,r,dt(e,o,t!=e.display.externalMeasured&&$e(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=H(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=H(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ae(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var a=r.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return pe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=H(r.pre.className,r.textClass||"")),r}function Qt(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Jt(e,t,n,r,i,o,s){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}(t,e.trailingSpace):t,f=e.cm.state.specialChars,d=!1;if(f.test(t)){u=document.createDocumentFragment();for(var h=0;;){f.lastIndex=h;var p=f.exec(t),g=p?p.index-h:t.length-h;if(g){var m=document.createTextNode(c.slice(h,h+g));l&&a<9?u.appendChild(O("span",[m])):u.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!p)break;h+=g+1;var v=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=u.appendChild(O("span",_(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((v=u.appendChild(O("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),l&&a<9?u.appendChild(O("span",[v])):u.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),l&&a<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||r||i||d||o||s){var x=n||"";r&&(x+=r),i&&(x+=i);var w=O("span",[u],x,o);if(s)for(var C in s)s.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&w.setAttribute(C,s[C]);return e.content.appendChild(w)}e.content.appendChild(u)}}function en(e,t){return function(n,r,i,o,l,a,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=n.pos,c=u+r.length;;){for(var f=void 0,d=0;d<t.length&&!((f=t[d]).to>u&&f.from<=u);d++);if(f.to>=c)return e(n,r,i,o,l,a,s);e(n,r.slice(0,f.to-u),i,o,null,a,s),o=null,r=r.slice(f.to-u),u=f.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var l,a,s,u,c,f,d,h=i.length,p=0,g=1,m="",v=0;;){if(v==p){s=u=c=a="",d=null,f=null,v=1/0;for(var y=[],b=void 0,x=0;x<r.length;++x){var w=r[x],C=w.marker;if("bookmark"==C.type&&w.from==p&&C.widgetNode)y.push(C);else if(w.from<=p&&(null==w.to||w.to>p||C.collapsed&&w.to==p&&w.from==p)){if(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,u=""),C.className&&(s+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&w.from==p&&(c+=" "+C.startStyle),C.endStyle&&w.to==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var S in C.attributes)(d||(d={}))[S]=C.attributes[S];C.collapsed&&(!f||Pt(f.marker,C)<0)&&(f=w)}else w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k<b.length;k+=2)b[k+1]==v&&(u+=" "+b[k]);if(!f||f.from==p)for(var L=0;L<y.length;++L)tn(t,0,y[L]);if(f&&(f.from||0)==p){if(tn(t,(null==f.to?h+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(p>=h)break;for(var T=Math.min(h,v);;){if(m){var M=p+m.length;if(!f){var A=M>T?m.slice(0,T-p):m;t.addToken(t,A,l?l+s:s,c,p+A.length==v?u:"",a,d)}if(M>=T){m=m.slice(T-p),p=T;break}p=M,c=""}m=i.slice(o,o=n[g++]),l=$t(n[g++],t.cm.options)}}else for(var O=1;O<n.length;O+=2)t.addToken(t,i.slice(o,o=n[O]),$t(n[O+1],t.cm.options))}function rn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Ft(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?$e(q(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Gt(e,t)}function on(e,t,n){for(var r,i=[],o=t;o<n;o=r){var l=new rn(e.doc,Xe(e.doc,o),o);r=o+l.size,i.push(l)}return i}var ln=null,an=null;function sn(e,t){var n=de(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);ln?r=ln.delayedCallbacks:an?r=an:(r=an=[],setTimeout(un,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},l=0;l<n.length;++l)o(l)}}function un(){var e=an;an=null;for(var t=0;t<e.length;++t)e[t]()}function cn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?hn(e,t):"gutter"==o?gn(e,t,n,r):"class"==o?pn(e,t):"widget"==o&&mn(e,t,r)}t.changes=null}function fn(e){return e.node==e.text&&(e.node=O("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),l&&a<8&&(e.node.style.zIndex=2)),e.node}function dn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Zt(e,t)}function hn(e,t){var n=t.text.className,r=dn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,pn(e,t)):n&&(t.text.className=n)}function pn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=fn(t);t.background=r.insertBefore(O("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?fn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function gn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=fn(t);t.gutterBackground=O("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var l=fn(t),a=t.gutter=O("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(a),l.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(O("div",Je(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var u=e.display.gutterSpecs[s].className,c=o.hasOwnProperty(u)&&o[u];c&&a.appendChild(O("div",[c],"CodeMirror-gutter-elt","left: "+r.gutterLeft[u]+"px; width: "+r.gutterWidth[u]+"px"))}}}function mn(e,t,n){t.alignable&&(t.alignable=null);for(var r=k("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);yn(e,t,n)}function vn(e,t,n,r){var i=dn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),pn(e,t),gn(e,t,n,r),yn(e,t,r),t.node}function yn(e,t,n){if(bn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)bn(e,t.rest[r],t,n,!1)}function bn(e,t,n,r,i){if(t.widgets)for(var o=fn(n),l=0,a=t.widgets;l<a.length;++l){var s=a[l],u=O("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),xn(s,u,n,r),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),sn(s,"redraw")}}function xn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function wn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!D(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),A(t.display.measure,O("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Cn(e,t){for(var n=Se(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Sn(e){return e.lineSpace.offsetTop}function kn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ln(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=A(e.measure,O("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Tn(e){return 50-e.display.nativeBarWidth}function Mn(e){return e.display.scroller.clientWidth-Tn(e)-e.display.barWidth}function An(e){return e.display.scroller.clientHeight-Tn(e)-e.display.barHeight}function On(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if($e(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Nn(e,t,n,r){return Wn(e,Pn(e,t),n,r)}function Dn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[cr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Pn(e,t){var n=$e(t),r=Dn(e,n);r&&!r.text?r=null:r&&r.changes&&(cn(e,r,n,or(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=$e(t=It(t)),r=e.display.externalMeasured=new rn(e.doc,t,n);r.lineN=n;var i=r.built=Zt(e,r);return r.text=i.pre,A(e.display.lineMeasure,i.pre),r}(e,t));var i=On(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Wn(e,t,n,r,i){t.before&&(n=-1);var o,s=n+(r||"");return t.cache.hasOwnProperty(s)?o=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&Mn(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),a=0;a<l.length-1;a++){var s=l[a],u=l[a+1];Math.abs(s.bottom-u.bottom)>2&&o.push((s.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=En(t.map,n,r),s=o.node,u=o.start,c=o.end,f=o.collapse;if(3==s.nodeType){for(var d=0;d<4;d++){for(;u&&re(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c<o.coverEnd&&re(t.line.text.charAt(o.coverStart+c));)++c;if((i=l&&a<9&&0==u&&c==o.coverEnd-o.coverStart?s.parentNode.getBoundingClientRect():Rn(L(s,u,c).getClientRects(),r)).left||i.right||0==u)break;c=u,u-=1,f="right"}l&&a<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=He)return He;var t=A(e,O("span","x")),n=t.getBoundingClientRect(),r=L(t,0,1).getBoundingClientRect();return He=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var h;u>0&&(f=r="right"),i=e.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==r?h.length-1:0]:s.getBoundingClientRect()}if(l&&a<9&&!u&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+ir(e.display),top:p.top,bottom:p.bottom}:Fn}for(var g=i.top-t.rect.top,m=i.bottom-t.rect.top,v=(g+m)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var x=b?y[b-1]:0,w=y[b],C={left:("right"==f?i.right:i.left)-t.rect.left,right:("left"==f?i.left:i.right)-t.rect.left,top:x,bottom:w};return i.left||i.right||(C.bogus=!0),e.options.singleCursorHeightPerLine||(C.rtop=g,C.rbottom=m),C}(e,t,n,r)).bogus||(t.cache[s]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Hn,Fn={left:0,right:0,top:0,bottom:0};function En(e,t,n){for(var r,i,o,l,a,s,u=0;u<e.length;u+=3)if(a=e[u],s=e[u+1],t<a?(i=0,o=1,l="left"):t<s?o=1+(i=t-a):(u==e.length-3||t==s&&e[u+3]>t)&&(i=(o=s-a)-1,t>=s&&(l="right")),null!=i){if(r=e[u+2],a==s&&n==(r.insertLeft?"left":"right")&&(l=n),"left"==n&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],l="left";if("right"==n&&i==s-a)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)r=e[(u+=3)+2],l="right";break}return{node:r,start:i,end:o,collapse:l,coverStart:a,coverEnd:s}}function Rn(e,t){var n=Fn;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function In(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function zn(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)In(e.display.view[t])}function Bn(e){zn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Gn(){return c&&m?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Un(){return c&&m?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function jn(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=wn(e.widgets[n]));return t}function Vn(e,t,n,r,i){if(!i){var o=jn(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var l=jt(t);if("local"==r?l+=Sn(e.display):l-=e.display.viewOffset,"page"==r||"window"==r){var a=e.display.lineSpace.getBoundingClientRect();l+=a.top+("window"==r?0:Un());var s=a.left+("window"==r?0:Gn());n.left+=s,n.right+=s}return n.top+=l,n.bottom+=l,n}function Kn(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=Gn(),i-=Un();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:r-l.left,top:i-l.top}}function Xn(e,t,n,r,i){return r||(r=Xe(e.doc,t.line)),Vn(e,r,Nn(e,r,t.ch,i),n)}function _n(e,t,n,r,i,o){function l(t,l){var a=Wn(e,i,t,l?"right":"left",o);return l?a.left=a.right:a.right=a.left,Vn(e,r,a,n)}r=r||Xe(e.doc,t.line),i||(i=Pn(e,r));var a=ue(r,e.doc.direction),s=t.ch,u=t.sticky;if(s>=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l("before"==u?s-1:s,"before"==u);function c(e,t,n){return l(n?e-1:e,1==a[t].level!=n)}var f=ae(a,s,u),d=le,h=c(s,f,"before"==u);return null!=d&&(h.other=c(s,d,"before"!=u)),h}function qn(e,t){var n=0;t=at(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=Xe(e.doc,t.line),i=jt(r)+Sn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Yn(e,t,n,r,i){var o=et(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function $n(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Yn(r.first,0,null,-1,-1);var i=Ze(r,n),o=r.first+r.size-1;if(i>o)return Yn(r.first+r.size-1,Xe(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=Xe(r,i);;){var a=er(e,l,i,t,n),s=Et(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=Xe(r,i=u.line)}}function Zn(e,t,n,r){r-=jn(t);var i=t.text.length,o=oe((function(t){return Wn(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=oe((function(t){return Wn(e,n,t).top>r}),o,i)}}function Qn(e,t,n,r){return n||(n=Pn(e,t)),Zn(e,t,n,Vn(e,t,Wn(e,n,r),"line").top)}function Jn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=jt(t);var o=Pn(e,t),l=jn(t),a=0,s=t.text.length,u=!0,c=ue(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?nr:tr)(e,t,n,o,c,r,i);a=(u=1!=f.level)?f.from:f.to-1,s=u?f.to:f.from-1}var d,h,p=null,g=null,m=oe((function(t){var n=Wn(e,o,t);return n.top+=l,n.bottom+=l,!!Jn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,g=n),!0)}),a,s),v=!1;if(g){var y=r-g.left<g.right-r,b=y==u;m=p+(b?0:1),h=b?"after":"before",d=y?g.left:g.right}else{u||m!=s&&m!=a||m++,h=0==m?"after":m==t.text.length?"before":Wn(e,o,m-(u?1:0)).bottom+l<=i==u?"after":"before";var x=_n(e,et(n,m,h),"line",t,o);d=x.left,v=i<x.top?-1:i>=x.bottom?1:0}return Yn(n,m=ie(t.text,m,1),h,v,r-d)}function tr(e,t,n,r,i,o,l){var a=oe((function(a){var s=i[a],u=1!=s.level;return Jn(_n(e,et(n,u?s.to:s.from,u?"before":"after"),"line",t,r),o,l,!0)}),0,i.length-1),s=i[a];if(a>0){var u=1!=s.level,c=_n(e,et(n,u?s.from:s.to,u?"after":"before"),"line",t,r);Jn(c,o,l,!0)&&c.top>l&&(s=i[a-1])}return s}function nr(e,t,n,r,i,o,l){var a=Zn(e,t,r,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,d=0;d<i.length;d++){var h=i[d];if(!(h.from>=u||h.to<=s)){var p=Wn(e,r,1!=h.level?Math.min(u,h.to)-1:Math.max(s,h.from)).right,g=p<o?o-p+1e9:p-o;(!c||f>g)&&(c=h,f=g)}}return c||(c=i[i.length-1]),c.from<s&&(c={from:s,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Hn){Hn=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Hn.appendChild(document.createTextNode("x")),Hn.appendChild(O("br"));Hn.appendChild(document.createTextNode("x"))}A(e.measure,Hn);var n=Hn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),M(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),n=O("pre",[t],"CodeMirror-line-like");A(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function or(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;n[a]=o.offsetLeft+o.clientLeft+i,r[a]=o.clientWidth}return{fixedPos:lr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function lr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ar(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(Gt(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(o+=i.widgets[l].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function sr(e){var t=e.doc,n=ar(e);t.iter((function(e){var t=n(e);t!=e.height&&Ye(e,t)}))}function ur(e,t,n,r){var i=e.display;if(!n&&"true"==Se(t).getAttribute("cm-not-content"))return null;var o,l,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,l=t.clientY-a.top}catch(e){return null}var s,u=$n(e,o,l);if(r&&u.xRel>0&&(s=Xe(e.doc,u.line).text).length==u.ch){var c=I(s,s.length,e.options.tabSize)-s.length;u=et(u.line,Math.max(0,Math.round((o-Ln(e.display).left)/ir(e.display))-c))}return u}function cr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function fr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ct&&zt(e.doc,t)<i.viewTo&&hr(e);else if(n<=i.viewFrom)Ct&&Bt(e.doc,n+r)>i.viewFrom?hr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)hr(e);else if(t<=i.viewFrom){var o=pr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):hr(e)}else if(n>=i.viewTo){var l=pr(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):hr(e)}else{var a=pr(e,t,t,-1),s=pr(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(on(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):hr(e)}var u=i.externalMeasured;u&&(n<u.lineN?u.lineN+=r:t<u.lineN+u.size&&(i.externalMeasured=null))}function dr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[cr(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==B(l,n)&&l.push(n)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pr(e,t,n,r){var i,o=cr(e,t),l=e.display.view;if(!Ct||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=e.display.viewFrom,s=0;s<o;s++)a+=l[s].size;if(a!=t){if(r>0){if(o==l.length-1)return null;i=a+l[o].size-t,o++}else i=a-t;t+=i,n+=i}for(;zt(e.doc,n)!=n;){if(o==(r<0?0:l.length-1))return null;n+=r*l[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function gr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function mr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function vr(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),l=0;l<n.sel.ranges.length;l++)if(t||l!=n.sel.primIndex){var a=n.sel.ranges[l];if(!(a.from().line>=e.display.viewTo||a.to().line<e.display.viewFrom)){var s=a.empty();(s||e.options.showCursorWhenSelecting)&&yr(e,a.head,i),s||xr(e,a,o)}}return r}function yr(e,t,n){var r=_n(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(O("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function br(e,t){return e.top-t.top||e.left-t.left}function xr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),l=Ln(e.display),a=l.left,s=Math.max(r.sizerWidth,Mn(e)-r.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?s-e:n)+"px;\n height: "+(r-t)+"px"))}function f(t,n,r){var o,l,f=Xe(i,t),d=f.text.length;function h(n,r){return Xn(e,et(t,n),"div",f,r)}function p(t,n,r){var i=Qn(e,f,null,t),o="ltr"==n==("after"==r)?"left":"right";return h("after"==r?i.begin:i.end-(/\s/.test(f.text.charAt(i.end-1))?2:1),o)[o]}var g=ue(f,i.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<n&&l.to>t||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),1==l.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(g,n||0,null==r?d:r,(function(e,t,i,f){var m="ltr"==i,v=h(e,m?"left":"right"),y=h(t-1,m?"right":"left"),b=null==n&&0==e,x=null==r&&t==d,w=0==f,C=!g||f==g.length-1;if(y.top-v.top<=3){var S=(u?x:b)&&C,k=(u?b:x)&&w?a:(m?v:y).left,L=S?s:(m?y:v).right;c(k,v.top,L-k,v.bottom)}else{var T,M,A,O;m?(T=u&&b&&w?a:v.left,M=u?s:p(e,i,"before"),A=u?a:p(t,i,"after"),O=u&&x&&C?s:y.right):(T=u?p(e,i,"before"):a,M=!u&&b&&w?s:v.right,A=!u&&x&&C?a:y.left,O=u?p(t,i,"after"):s),c(T,v.top,M-T,v.bottom),v.bottom<y.top&&c(a,v.bottom,null,y.top),c(A,y.top,O-A,y.bottom)}(!o||br(v,o)<0)&&(o=v),br(y,o)<0&&(o=y),(!l||br(v,l)<0)&&(l=v),br(y,l)<0&&(l=y)})),{start:o,end:l}}var d=t.from(),h=t.to();if(d.line==h.line)f(d.line,d.ch,h.ch);else{var p=Xe(i,d.line),g=Xe(i,h.line),m=It(p)==It(g),v=f(d.line,d.ch,m?p.text.length+1:null).end,y=f(h.line,m?0:null,h.ch).start;m&&(v.top<y.top-2?(c(v.right,v.top,null,v.bottom),c(a,y.top,y.left,y.bottom)):c(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&c(a,v.bottom,null,y.top)}n.appendChild(o)}function wr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Lr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Cr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||kr(e))}function Sr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Lr(e))}),100)}function kr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(pe(e,"focus",e,t),e.state.focused=!0,W(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),wr(e))}function Lr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(pe(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Tr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],o=e.options.lineWrapping,s=void 0,u=0;if(!i.hidden){if(l&&a<8){var c=i.node.offsetTop+i.node.offsetHeight;s=c-n,n=c}else{var f=i.node.getBoundingClientRect();s=f.bottom-f.top,!o&&i.text.firstChild&&(u=i.text.firstChild.getBoundingClientRect().right-f.left-1)}var d=i.line.height-s;if((d>.005||d<-.005)&&(Ye(i.line,s),Mr(i.line),i.rest))for(var h=0;h<i.rest.length;h++)Mr(i.rest[h]);if(u>e.display.sizerWidth){var p=Math.ceil(u/ir(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Mr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Ar(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Sn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=Ze(t,r),l=Ze(t,i);if(n&&n.ensure){var a=n.ensure.from.line,s=n.ensure.to.line;a<o?(o=a,l=Ze(t,jt(Xe(t,a))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=l&&(o=Ze(t,jt(Xe(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function Or(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=An(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+kn(n),s=t.top<r,u=t.bottom>a-r;if(t.top<i)l.scrollTop=s?0:t.top;else if(t.bottom>i+o){var c=Math.min(t.top,(u?a:t.bottom)-o);c!=i&&(l.scrollTop=c)}var f=e.options.fixedGutter?0:n.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-f,h=Mn(e)-n.gutters.offsetWidth,p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?l.scrollLeft=0:t.left<d?l.scrollLeft=Math.max(0,t.left+f-(p?0:10)):t.right>h+d-3&&(l.scrollLeft=t.right+(p?0:10)-h),l}function Nr(e,t){null!=t&&(Wr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Dr(e){Wr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Pr(e,t,n){null==t&&null==n||Wr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Wr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Hr(e,qn(e,t.from),qn(e,t.to),t.margin))}function Hr(e,t,n,r){var i=Or(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Pr(e,i.scrollLeft,i.scrollTop)}function Fr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||si(e,{top:t}),Er(e,t,!0),n&&si(e),ri(e,100))}function Er(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Rr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,fi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ir(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+kn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Tn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var zr=function(e,t,n){this.cm=n;var r=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),fe(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),fe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,l&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};zr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},zr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},zr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},zr.prototype.zeroWidthHack=function(){var e=y&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new z,this.disableVert=new z},zr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},zr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Br=function(){};function Gr(e,t){t||(t=Ir(e));var n=e.display.barWidth,r=e.display.barHeight;Ur(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Tr(e),Ur(e,Ir(e)),n=e.display.barWidth,r=e.display.barHeight}function Ur(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Br.prototype.update=function(){return{bottom:0,right:0}},Br.prototype.setScrollLeft=function(){},Br.prototype.setScrollTop=function(){},Br.prototype.clear=function(){};var jr={native:zr,null:Br};function Vr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new jr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),fe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Rr(e,t):Fr(e,t)}),e),e.display.scrollbars.addClass&&W(e.display.wrapper,e.display.scrollbars.addClass)}var Kr=0;function Xr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Kr},t=e.curOp,ln?ln.ops.push(t):t.ownsGroup=ln={ops:[t],delayedCallbacks:[]}}function _r(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(n)}finally{ln=null,t(n)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)qr(t[n]);for(var r=0;r<t.length;r++)Yr(t[r]);for(var i=0;i<t.length;i++)$r(t[i]);for(var o=0;o<t.length;o++)Zr(t[o]);for(var l=0;l<t.length;l++)Qr(t[l])}(e)}))}function qr(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Tn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Tn(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&Kt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new oi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Yr(e){e.updatedDisplay=e.mustUpdate&&li(e.cm,e.update)}function $r(e){var t=e.cm,n=t.display;e.updatedDisplay&&Tr(t),e.barMeasure=Ir(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Nn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Tn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Mn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Zr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Rr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==P();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Gr(t,e.barMeasure),e.updatedDisplay&&ci(t,e.barMeasure),e.selectionChanged&&wr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Cr(e.cm)}function Qr(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&ai(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Er(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Rr(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!ge(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=O("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Sn(e.display))+"px;\n height: "+(t.bottom-t.top+Tn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var l=!1,a=_n(e,t),s=n&&n!=t?_n(e,n):a,u=Or(e,i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(Fr(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(Rr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(l=!0)),!l)break}return i}(t,at(r,e.scrollToPos.from),at(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var l=0;l<i.length;++l)i[l].lines.length||pe(i[l],"hide");if(o)for(var a=0;a<o.length;++a)o[a].lines.length&&pe(o[a],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&pe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Jr(e,t){if(e.curOp)return t();Xr(e);try{return t()}finally{_r(e)}}function ei(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Xr(e);try{return t.apply(e,arguments)}finally{_r(e)}}}function ti(e){return function(){if(this.curOp)return e.apply(this,arguments);Xr(this);try{return e.apply(this,arguments)}finally{_r(this)}}}function ni(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Xr(t);try{return e.apply(this,arguments)}finally{_r(t)}}}function ri(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,E(ii,e))}function ii(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ht(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?Ue(t.mode,r.state):null,s=ft(e,o,r,!0);a&&(r.state=a),o.styles=s.styles;var u=o.styleClasses,c=s.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),d=0;!f&&d<l.length;++d)f=l[d]!=o.styles[d];f&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&pt(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Jr(e,(function(){for(var t=0;t<i.length;t++)dr(e,i[t],"text")}))}}var oi=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Ar(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Mn(e),this.force=n,this.dims=or(e),this.events=[]};function li(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return hr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==gr(e))return!1;di(e)&&(hr(e),t.dims=or(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>l&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),Ct&&(o=zt(e.doc,o),l=Bt(e.doc,l));var a=o!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(cr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(on(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,cr(e,n)))),r.viewTo=n}(e,o,l),n.viewOffset=jt(Xe(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=gr(e);if(!a&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=P();if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return u>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function a(t){var n=t.nextSibling;return s&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,f=0;f<u.length;f++){var d=u[f];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;l!=d.node;)l=a(l);var h=i&&null!=t&&t<=c&&d.lineNumber;d.changes&&(B(d.changes,"gutter")>-1&&(h=!1),cn(e,d,c,n)),h&&(M(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Je(e.options,c)))),l=d.node.nextSibling}else{var p=vn(e,d,c,n);o.insertBefore(p,l)}c+=d.size}for(;l;)l=a(l)}(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=P()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(c),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ri(e,400)),n.updateLineNumbers=null,!0}function ai(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Mn(e))r&&(t.visible=Ar(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+kn(e.display)-An(e),n.top)}),t.visible=Ar(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!li(e,t))break;Tr(e);var i=Ir(e);mr(e),Gr(e,i),ci(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function si(e,t){var n=new oi(e,t);if(li(e,n)){Tr(e),ai(e,n);var r=Ir(e);mr(e),Gr(e,r),ci(e,r),n.finish()}}function ui(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ci(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Tn(e)+"px"}function fi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=lr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",l=0;l<n.length;l++)if(!n[l].hidden){e.options.fixedGutter&&(n[l].gutter&&(n[l].gutter.style.left=o),n[l].gutterBackground&&(n[l].gutterBackground.style.left=o));var a=n[l].alignable;if(a)for(var s=0;s<a.length;s++)a[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function di(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=Je(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(O("div",[O("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,l=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-l)+1,r.lineNumWidth=r.lineNumInnerWidth+l,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",ui(e.display),!0}return!1}function hi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],l=null;if("string"!=typeof o&&(l=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:l})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function pi(e){var t=e.gutters,n=e.gutterSpecs;M(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,l=i.style,a=t.appendChild(O("div",null,"CodeMirror-gutter "+o));l&&(a.style.cssText=l),"CodeMirror-linenumbers"==o&&(e.lineGutter=a,a.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",ui(e)}function gi(e){pi(e.display),fr(e),fi(e)}function mi(e,t,r,i){var o=this;this.input=r,o.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=N("div",null,"CodeMirror-code"),o.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=O("div",null,"CodeMirror-cursors"),o.measure=O("div",null,"CodeMirror-measure"),o.lineMeasure=O("div",null,"CodeMirror-measure"),o.lineSpace=N("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var u=N("div",[o.lineSpace],"CodeMirror-lines");o.mover=O("div",[u],null,"position: relative"),o.sizer=O("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=O("div",null,null,"position: absolute; height: 50px; width: 1px;"),o.gutters=O("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=O("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=O("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),l&&a<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),s||n&&v||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=hi(i.gutters,i.lineNumbers),pi(o),r.init(o)}oi.prototype.signal=function(e,t){ve(e,t)&&this.events.push(arguments)},oi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)pe.apply(null,this.events[e])};var vi=0,yi=null;function bi(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function xi(e){var t=bi(e);return t.x*=yi,t.y*=yi,t}function wi(e,t){var r=bi(t),i=r.x,o=r.y,l=e.display,a=l.scroller,u=a.scrollWidth>a.clientWidth,c=a.scrollHeight>a.clientHeight;if(i&&u||o&&c){if(o&&y&&s)e:for(var d=t.target,h=l.view;d!=a;d=d.parentNode)for(var p=0;p<h.length;p++)if(h[p].node==d){e.display.currentWheelTarget=d;break e}if(i&&!n&&!f&&null!=yi)return o&&c&&Fr(e,Math.max(0,a.scrollTop+o*yi)),Rr(e,Math.max(0,a.scrollLeft+i*yi)),(!o||o&&c)&&be(t),void(l.wheelStartX=null);if(o&&null!=yi){var g=o*yi,m=e.doc.scrollTop,v=m+l.wrapper.clientHeight;g<0?m=Math.max(0,m+g-50):v=Math.min(e.doc.height,v+g+50),si(e,{top:m,bottom:v})}vi<20&&(null==l.wheelStartX?(l.wheelStartX=a.scrollLeft,l.wheelStartY=a.scrollTop,l.wheelDX=i,l.wheelDY=o,setTimeout((function(){if(null!=l.wheelStartX){var e=a.scrollLeft-l.wheelStartX,t=a.scrollTop-l.wheelStartY,n=t&&l.wheelDY&&t/l.wheelDY||e&&l.wheelDX&&e/l.wheelDX;l.wheelStartX=l.wheelStartY=null,n&&(yi=(yi*vi+n)/(vi+1),++vi)}}),200)):(l.wheelDX+=i,l.wheelDY+=o))}}l?yi=-.53:n?yi=15:c?yi=-.7:d&&(yi=-1/3);var Ci=function(e,t){this.ranges=e,this.primIndex=t};Ci.prototype.primary=function(){return this.ranges[this.primIndex]},Ci.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!nt(n.anchor,r.anchor)||!nt(n.head,r.head))return!1}return!0},Ci.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Si(rt(this.ranges[t].anchor),rt(this.ranges[t].head));return new Ci(e,this.primIndex)},Ci.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Ci.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(tt(t,r.from())>=0&&tt(e,r.to())<=0)return n}return-1};var Si=function(e,t){this.anchor=e,this.head=t};function ki(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=B(t,i);for(var o=1;o<t.length;o++){var l=t[o],a=t[o-1],s=tt(a.to(),l.from());if(r&&!l.empty()?s>0:s>=0){var u=ot(a.from(),l.from()),c=it(a.to(),l.to()),f=a.empty()?l.from()==l.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new Si(f?c:u,f?u:c))}}return new Ci(t,n)}function Li(e,t){return new Ci([new Si(e,t||e)],0)}function Ti(e){return e.text?et(e.from.line+e.text.length-1,q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Mi(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Ti(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Ti(t).ch-t.to.ch),et(n,r)}function Ai(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Si(Mi(i.anchor,t),Mi(i.head,t)))}return ki(e.cm,n,e.sel.primIndex)}function Oi(e,t,n){return e.line==t.line?et(n.line,e.ch-t.ch+n.ch):et(n.line+(e.line-t.line),e.ch)}function Ni(e){e.doc.mode=ze(e.options,e.doc.modeOption),Di(e)}function Di(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ri(e,100),e.state.modeGen++,e.curOp&&fr(e)}function Pi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==q(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Wi(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),At(e),Ot(e,n);var i=r?r(e):1;i!=e.height&&Ye(e,i)}(e,n,i,r),sn(e,"change",e,t)}function l(e,t){for(var n=[],o=e;o<t;++o)n.push(new Xt(u[o],i(o),r));return n}var a=t.from,s=t.to,u=t.text,c=Xe(e,a.line),f=Xe(e,s.line),d=q(u),h=i(u.length-1),p=s.line-a.line;if(t.full)e.insert(0,l(0,u.length)),e.remove(u.length,e.size-u.length);else if(Pi(e,t)){var g=l(0,u.length-1);o(f,f.text,h),p&&e.remove(a.line,p),g.length&&e.insert(a.line,g)}else if(c==f)if(1==u.length)o(c,c.text.slice(0,a.ch)+d+c.text.slice(s.ch),h);else{var m=l(1,u.length-1);m.push(new Xt(d+c.text.slice(s.ch),h,r)),o(c,c.text.slice(0,a.ch)+u[0],i(0)),e.insert(a.line+1,m)}else if(1==u.length)o(c,c.text.slice(0,a.ch)+u[0]+f.text.slice(s.ch),i(0)),e.remove(a.line+1,p);else{o(c,c.text.slice(0,a.ch)+u[0],i(0)),o(f,d+f.text.slice(s.ch),h);var v=l(1,u.length-1);p>1&&e.remove(a.line+1,p-1),e.insert(a.line+1,v)}sn(e,"change",e,t)}function Hi(e,t,n){!function e(r,i,o){if(r.linked)for(var l=0;l<r.linked.length;++l){var a=r.linked[l];if(a.doc!=i){var s=o&&a.sharedHist;n&&!s||(t(a.doc,s),e(a.doc,r,s))}}}(e,null,!0)}function Fi(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,sr(e),Ni(e),Ei(e),e.options.lineWrapping||Kt(e),e.options.mode=t.modeOption,fr(e)}function Ei(e){("rtl"==e.doc.direction?W:T)(e.display.lineDiv,"CodeMirror-rtl")}function Ri(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Ii(e,t){var n={from:rt(t.from),to:Ti(t),text:_e(e,t.from,t.to)};return ji(e,n,t.from.line,t.to.line+1),Hi(e,(function(e){return ji(e,n,t.from.line,t.to.line+1)}),!0),n}function zi(e){for(;e.length&&q(e).ranges;)e.pop()}function Bi(e,t,n,r){var i=e.history;i.undone.length=0;var o,l,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(zi(e.done),q(e.done)):e.done.length&&!q(e.done).ranges?q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),q(e.done)):void 0}(i,i.lastOp==r)))l=q(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,l.to)?l.to=Ti(t):o.changes.push(Ii(e,t));else{var s=q(i.done);for(s&&s.ranges||Ui(e.sel,i.done),o={changes:[Ii(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,l||pe(e,"historyAdded")}function Gi(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,q(i.done),t))?i.done[i.done.length-1]=t:Ui(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&zi(i.undone)}function Ui(e,t){var n=q(t);n&&n.ranges&&n.equals(e)||t.push(e)}function ji(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Vi(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Ki(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Vi(n[i]));return r}(e,t),r=Tt(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],l=r[i];if(o&&l)e:for(var a=0;a<l.length;++a){for(var s=l[a],u=0;u<o.length;++u)if(o[u].marker==s.marker)continue e;o.push(s)}else l&&(n[i]=l)}return n}function Xi(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?Ci.prototype.deepCopy.call(o):o);else{var l=o.changes,a=[];r.push({changes:a});for(var s=0;s<l.length;++s){var u=l[s],c=void 0;if(a.push({from:u.from,to:u.to,text:u.text}),t)for(var f in u)(c=f.match(/^spans_(\d+)$/))&&B(t,Number(c[1]))>-1&&(q(a)[f]=u[f],delete u[f])}}}return r}function _i(e,t,n,r){if(r){var i=e.anchor;if(n){var o=tt(t,i)<0;o!=tt(n,i)<0?(i=t,t=n):o!=tt(t,n)<0&&(t=n)}return new Si(i,t)}return new Si(n||t,t)}function qi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Ji(e,new Ci([_i(e.sel.primary(),t,n,i)],0),r)}function Yi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=_i(e.sel.ranges[o],t[o],null,i);Ji(e,ki(e.cm,r,e.sel.primIndex),n)}function $i(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Ji(e,ki(e.cm,i,e.sel.primIndex),r)}function Zi(e,t,n,r){Ji(e,Li(t,n),r)}function Qi(e,t,n){var r=e.history.done,i=q(r);i&&i.ranges?(r[r.length-1]=t,eo(e,t,n)):Ji(e,t,n)}function Ji(e,t,n){eo(e,t,n),Gi(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function eo(e,t,n){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Si(at(e,t[n].anchor),at(e,t[n].head))},origin:n&&n.origin};return pe(e,"beforeSelectionChange",e,r),e.cm&&pe(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?ki(e.cm,r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(tt(t.primary().head,e.sel.primary().head)<0?-1:1);to(e,ro(e,t,r,!0)),n&&!1===n.scroll||!e.cm||Dr(e.cm)}function to(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,me(e.cm)),sn(e,"cursorActivity",e))}function no(e){to(e,ro(e,e.sel,null,!1))}function ro(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],a=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=oo(e,l.anchor,a&&a.anchor,n,r),u=oo(e,l.head,a&&a.head,n,r);(i||s!=l.anchor||u!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Si(s,u))}return i?ki(e.cm,i,t.primIndex):t}function io(e,t,n,r,i){var o=Xe(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var a=o.markedSpans[l],s=a.marker,u="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,c="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==a.from||(u?a.from<=t.ch:a.from<t.ch))&&(null==a.to||(c?a.to>=t.ch:a.to>t.ch))){if(i&&(pe(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!s.atomic)continue;if(n){var f=s.find(r<0?1:-1),d=void 0;if((r<0?c:u)&&(f=lo(e,f,-r,f&&f.line==t.line?o:null)),f&&f.line==t.line&&(d=tt(f,n))&&(r<0?d<0:d>0))return io(e,f,t,r,i)}var h=s.find(r<0?-1:1);return(r<0?u:c)&&(h=lo(e,h,r,h.line==t.line?o:null)),h?io(e,h,t,r,i):null}}return t}function oo(e,t,n,r,i){var o=r||1,l=io(e,t,n,o,i)||!i&&io(e,t,n,o,!0)||io(e,t,n,-o,i)||!i&&io(e,t,n,-o,!0);return l||(e.cantEdit=!0,et(e.first,0))}function lo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?at(e,et(t.line-1)):null:n>0&&t.ch==(r||Xe(e,t.line)).text.length?t.line<e.first+e.size-1?et(t.line+1,0):null:new et(t.line,t.ch+n)}function ao(e){e.setSelection(et(e.firstLine(),0),et(e.lastLine()),U)}function so(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=at(e,t)),n&&(r.to=at(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),pe(e,"beforeChange",e,r),e.cm&&pe(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function uo(e,t,n){if(e.cm){if(!e.cm.curOp)return ei(e.cm,uo)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))||(t=so(e,t,!0))){var r=wt&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=B(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var l=r[o],a=l.find(0),s=0;s<i.length;++s){var u=i[s];if(!(tt(u.to,a.from)<0||tt(u.from,a.to)>0)){var c=[s,1],f=tt(u.from,a.from),d=tt(u.to,a.to);(f<0||!l.inclusiveLeft&&!f)&&c.push({from:u.from,to:a.from}),(d>0||!l.inclusiveRight&&!d)&&c.push({from:a.to,to:u.to}),i.splice.apply(i,c),s+=c.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)co(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else co(e,t)}}function co(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Ai(e,t);Bi(e,t,n,e.cm?e.cm.curOp.id:NaN),po(e,t,n,Tt(e,t));var r=[];Hi(e,(function(e,n){n||-1!=B(r,e.history)||(yo(e.history,t),r.push(e.history)),po(e,t,null,Tt(e,t))}))}}function fo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,l=e.sel,a="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,u=0;u<a.length&&(i=a[u],n?!i.ranges||i.equals(e.sel):i.ranges);u++);if(u!=a.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=a.pop()).ranges){if(r)return void a.push(i);break}if(Ui(i,s),n&&!i.equals(e.sel))return void Ji(e,i,{clearRedo:!1});l=i}var c=[];Ui(l,s),s.push({changes:c,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var f=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),d=function(n){var r=i.changes[n];if(r.origin=t,f&&!so(e,r,!1))return a.length=0,{};c.push(Ii(e,r));var o=n?Ai(e,r):q(a);po(e,r,o,Ki(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Ti(r)});var l=[];Hi(e,(function(e,t){t||-1!=B(l,e.history)||(yo(e.history,r),l.push(e.history)),po(e,r,null,Ki(e,r))}))},h=i.changes.length-1;h>=0;--h){var p=d(h);if(p)return p.v}}}}function ho(e,t){if(0!=t&&(e.first+=t,e.sel=new Ci(Y(e.sel.ranges,(function(e){return new Si(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){fr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)dr(e.cm,r,"gutter")}}function po(e,t,n,r){if(e.cm&&!e.cm.curOp)return ei(e.cm,po)(e,t,n,r);if(t.to.line<e.first)ho(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ho(e,i),t={from:et(e.first,0),to:et(t.to.line+i,t.to.ch),text:[q(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:et(o,Xe(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=_e(e,t.from,t.to),n||(n=Ai(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=$e(It(Xe(r,o.line))),r.iter(s,l.line+1,(function(e){if(e==i.maxLine)return a=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&me(e),Wi(r,t,n,ar(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,(function(e){var t=Vt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)})),a&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=Xe(e,r).stateAfter;if(i&&(!(i instanceof ut)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,o.line),ri(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?fr(e):o.line!=l.line||1!=t.text.length||Pi(e.doc,t)?fr(e,o.line,l.line+1,u):dr(e,o.line,"text");var c=ve(e,"changes"),f=ve(e,"change");if(f||c){var d={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};f&&sn(e,"change",e,d),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}(e.cm,t,r):Wi(e,t,r),eo(e,n,U),e.cantEdit&&oo(e,et(e.firstLine(),0))&&(e.cantEdit=!1)}}function go(e,t,n,r,i){var o;r||(r=n),tt(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),uo(e,{from:n,to:r,text:t,origin:i})}function mo(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function vo(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var a=0;a<o.ranges.length;a++)mo(o.ranges[a].anchor,t,n,r),mo(o.ranges[a].head,t,n,r)}else{for(var s=0;s<o.changes.length;++s){var u=o.changes[s];if(n<u.from.line)u.from=et(u.from.line+r,u.from.ch),u.to=et(u.to.line+r,u.to.ch);else if(t<=u.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}}function yo(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;vo(e.done,n,r,i),vo(e.undone,n,r,i)}function bo(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=Xe(e,lt(e,t)):i=$e(t),null==i?null:(r(o,i)&&e.cm&&dr(e.cm,i,n),o)}function xo(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function wo(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}Si.prototype.from=function(){return ot(this.anchor,this.head)},Si.prototype.to=function(){return it(this.anchor,this.head)},Si.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},xo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,_t(i),sn(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},wo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),l=r.height;if(r.removeInner(e,o),this.height-=l-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof xo))){var a=[];this.collapse(a),this.children=[new xo(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var l=i.lines.length%25+25,a=l;a<i.lines.length;){var s=new xo(i.lines.slice(a,a+=25));i.height-=s.height,this.children.splice(++r,0,s),s.parent=this}i.lines=i.lines.slice(0,l),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new wo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=B(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new wo(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e);if(i.iterN(e,l,n))return!0;if(0==(t-=l))break;e=0}else e-=o}}};var Co=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function So(e,t,n){jt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Nr(e,n)}Co.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=$e(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=wn(this);Ye(n,Math.max(0,n.height-o)),e&&(Jr(e,(function(){So(e,n,-o),dr(e,r,"widget")})),sn(e,"lineWidgetCleared",e,this,r))}},Co.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=wn(this)-t;i&&(Gt(this.doc,r)||Ye(r,r.height+i),n&&Jr(n,(function(){n.curOp.forceUpdate=!0,So(n,r,i),sn(n,"lineWidgetChanged",n,e,$e(r))})))},ye(Co);var ko=0,Lo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ko};function To(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,i){(r=R(r)).shared=!1;var o=[To(e,t,n,r,i)],l=o[0],a=r.widgetNode;return Hi(e,(function(e){a&&(r.widgetNode=a.cloneNode(!0)),o.push(To(e,at(e,t),at(e,n),r,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;l=q(o)})),new Mo(o,l)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return ei(e.cm,To)(e,t,n,r,i);var o=new Lo(e,i),l=tt(t,n);if(r&&R(r,o,!1),l>0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=N("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Rt(e,t.line,t,n,o)||t.line!=n.line&&Rt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ct=!0}o.addToHistory&&Bi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,s=t.line,u=e.cm;if(e.iter(s,n.line+1,(function(e){u&&o.collapsed&&!u.options.lineWrapping&&It(e)==u.display.maxLine&&(a=!0),o.collapsed&&s!=t.line&&Ye(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new St(o,s==t.line?t.ch:null,s==n.line?n.ch:null)),++s})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){Gt(e,t)&&Ye(t,0)})),o.clearOnEnter&&fe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(wt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ko,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)fr(u,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=n.line;c++)dr(u,c,"text");o.atomic&&no(u.doc),sn(u,"markerAdded",u,o)}return o}Lo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Xr(e),ve(this,"clear")){var n=this.find();n&&sn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var l=this.lines[o],a=kt(l.markedSpans,this);e&&!this.collapsed?dr(e,$e(l),"text"):e&&(null!=a.to&&(i=$e(l)),null!=a.from&&(r=$e(l))),l.markedSpans=Lt(l.markedSpans,a),null==a.from&&this.collapsed&&!Gt(this.doc,l)&&e&&Ye(l,rr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=It(this.lines[s]),c=Vt(u);c>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&fr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&no(e.doc)),e&&sn(e,"markerCleared",e,this,r,i),t&&_r(e),this.parent&&this.parent.clear()}},Lo.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],l=kt(o.markedSpans,this);if(null!=l.from&&(n=et(t?o:$e(o),l.from),-1==e))return n;if(null!=l.to&&(r=et(t?o:$e(o),l.to),1==e))return r}return n&&{from:n,to:r}},Lo.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Jr(r,(function(){var i=t.line,o=$e(t.line),l=Dn(r,o);if(l&&(In(l),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Gt(n.doc,i)&&null!=n.height){var a=n.height;n.height=null;var s=wn(n)-a;s&&Ye(i,i.height+s)}sn(r,"markerChanged",r,e)}))},Lo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=B(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Lo.prototype.detachLine=function(e){if(this.lines.splice(B(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ye(Lo);var Mo=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Ao(e){return e.findMarks(et(e.first,0),e.clipPos(et(e.lastLine())),(function(e){return e.parent}))}function Oo(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];Hi(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==B(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}Mo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();sn(this,"clear")}},Mo.prototype.find=function(e,t){return this.primary.find(e,t)},ye(Mo);var No=0,Do=function(e,t,n,r,i){if(!(this instanceof Do))return new Do(e,t,n,r,i);null==n&&(n=0),wo.call(this,[new xo([new Xt("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=et(n,0);this.sel=Li(o),this.history=new Ri(null),this.id=++No,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Wi(this,{from:o,to:o,text:e}),Ji(this,Li(o),U)};Do.prototype=Z(wo.prototype,{constructor:Do,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=qe(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:ni((function(e){var t=et(this.first,0),n=this.first+this.size-1;uo(this,{from:t,to:et(n,Xe(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Pr(this.cm,0,0),Ji(this,Li(t),U)})),replaceRange:function(e,t,n,r){go(this,e,t=at(this,t),n=n?at(this,n):t,r)},getRange:function(e,t,n){var r=_e(this,at(this,e),at(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Qe(this,e))return Xe(this,e)},getLineNumber:function(e){return $e(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Xe(this,e)),It(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return at(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ni((function(e,t,n){Zi(this,at(this,"number"==typeof e?et(e,t||0):e),null,n)})),setSelection:ni((function(e,t,n){Zi(this,at(this,e),at(this,t||e),n)})),extendSelection:ni((function(e,t,n){qi(this,at(this,e),t&&at(this,t),n)})),extendSelections:ni((function(e,t){Yi(this,st(this,e),t)})),extendSelectionsBy:ni((function(e,t){Yi(this,st(this,Y(this.sel.ranges,e)),t)})),setSelections:ni((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Si(at(this,e[i].anchor),at(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Ji(this,ki(this.cm,r,t),n)}})),addSelection:ni((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Si(at(this,e),at(this,t||e))),Ji(this,ki(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=_e(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=_e(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:ni((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var l=i.ranges[o];r[o]={from:l.from(),to:l.to(),text:this.splitLines(e[o]),origin:n}}for(var a=t&&"end"!=t&&function(e,t,n){for(var r=[],i=et(e.first,0),o=i,l=0;l<t.length;l++){var a=t[l],s=Oi(a.from,i,o),u=Oi(Ti(a),i,o);if(i=a.to,o=u,"around"==n){var c=e.sel.ranges[l],f=tt(c.head,c.anchor)<0;r[l]=new Si(f?u:s,f?s:u)}else r[l]=new Si(s,s)}return new Ci(r,e.sel.primIndex)}(this,r,t),s=r.length-1;s>=0;s--)uo(this,r[s]);a?Qi(this,a):this.cm&&Dr(this.cm)})),undo:ni((function(){fo(this,"undo")})),redo:ni((function(){fo(this,"redo")})),undoSelection:ni((function(){fo(this,"undo",!0)})),redoSelection:ni((function(){fo(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Ri(this.history.maxGeneration),Hi(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Xi(this.history.done),undone:Xi(this.history.undone)}},setHistory:function(e){var t=this.history=new Ri(this.history.maxGeneration);t.done=Xi(e.done.slice(0),null,!0),t.undone=Xi(e.undone.slice(0),null,!0)},setGutterMarker:ni((function(e,t,n){return bo(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&te(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:ni((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&bo(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,te(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!Qe(this,e))return null;if(t=e,!(e=Xe(this,e)))return null}else if(null==(t=$e(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:ni((function(e,t,n){return bo(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(k(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:ni((function(e,t,n){return bo(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(k(n));if(!o)return!1;var l=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&l!=i.length?" ":"")+i.slice(l)||null}return!0}))})),addLineWidget:ni((function(e,t,n){return function(e,t,n,r){var i=new Co(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),bo(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!Gt(e,t)){var r=jt(t)<e.scrollTop;Ye(t,t.height+wn(i)),r&&Nr(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&sn(o,"lineWidgetAdded",o,i,"number"==typeof t?t:$e(t)),i}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return To(this,at(this,e),at(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return To(this,e=at(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Xe(this,(e=at(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=at(this,e),t=at(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var l=o.markedSpans;if(l)for(var a=0;a<l.length;a++){var s=l[a];null!=s.to&&i==e.line&&e.ch>=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),at(this,et(n,t))},indexFromPos:function(e){var t=(e=at(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Do(qe(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Do(qe(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(tt(o,l)){var a=To(e,o,l,r.primary,r.primary.type);r.markers.push(a),a.parent=r}}}(r,Ao(this)),r},unlinkDoc:function(e){if(e instanceof Ml&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Oo(Ao(this));break}if(e.history==this.history){var n=[e.id];Hi(e,(function(e){return n.push(e.id)}),!0),e.history=new Ri(null),e.history.done=Xi(this.history.done,n),e.history.undone=Xi(this.history.undone,n)}},iterLinkedDocs:function(e){Hi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):De(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:ni((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Jr(t=this.cm,(function(){Ei(t),fr(t)})))}))}),Do.prototype.eachLine=Do.prototype.iter;var Po=0;function Wo(e){var t=this;if(Ho(t),!ge(t,e)&&!Cn(t.display,e)){be(e),l&&(Po=+new Date);var n=ur(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,s=function(){++a==i&&ei(t,(function(){var e={from:n=at(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};uo(t.doc,e),Qi(t.doc,Li(at(t.doc,n),at(t.doc,Ti(e))))}))()},u=function(e,n){if(t.options.allowDropFileTypes&&-1==B(t.options.allowDropFileTypes,e.type))s();else{var r=new FileReader;r.onerror=function(){return s()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),s()},r.readAsText(e)}},c=0;c<r.length;c++)u(r[c],c);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),eo(t.doc,Li(n,n)),d)for(var h=0;h<d.length;++h)go(t.doc,"",d[h].anchor,d[h].head,"drag");t.replaceSelection(f,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ho(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Fo(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Eo=!1;function Ro(){var e;Eo||(fe(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Fo(Io)}),100))})),fe(window,"blur",(function(){return Fo(Lr)})),Eo=!0)}function Io(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var zo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Bo=0;Bo<10;Bo++)zo[Bo+48]=zo[Bo+96]=String(Bo);for(var Go=65;Go<=90;Go++)zo[Go]=String.fromCharCode(Go);for(var Uo=1;Uo<=12;Uo++)zo[Uo+111]=zo[Uo+63235]="F"+Uo;var jo={};function Vo(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var l=0;l<o.length-1;l++){var a=o[l];if(/^(cmd|meta|m)$/i.test(a))i=!0;else if(/^a(lt)?$/i.test(a))t=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else{if(!/^s(hift)?$/i.test(a))throw new Error("Unrecognized modifier name: "+a);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Ko(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Y(n.split(" "),Vo),o=0;o<i.length;o++){var l=void 0,a=void 0;o==i.length-1?(a=i.join(" "),l=r):(a=i.slice(0,o+1).join(" "),l="...");var s=t[a];if(s){if(s!=l)throw new Error("Inconsistent bindings for "+a)}else t[a]=l}delete e[n]}for(var u in t)e[u]=t[u];return e}function Xo(e,t,n,r){var i=(t=$o(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Xo(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var l=Xo(e,t.fallthrough[o],n,r);if(l)return l}}}function _o(e){var t="string"==typeof e?e:zo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function qo(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(C?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(C?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Yo(e,t){if(f&&34==e.keyCode&&e.char)return!1;var n=zo[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),qo(n,e,t))}function $o(e){return"string"==typeof e?jo[e]:e}function Zo(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&tt(o.from,q(r).to)<=0;){var l=r.pop();if(tt(l.from,o.from)<0){o.from=l.from;break}}r.push(o)}Jr(e,(function(){for(var t=r.length-1;t>=0;t--)go(e.doc,"",r[t].from,r[t].to,"+delete");Dr(e)}))}function Qo(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Jo(e,t,n){var r=Qo(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function el(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ue(n,t.doc.direction);if(o){var l,a=i<0?q(o):o[0],s=i<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==t.doc.direction){var u=Pn(t,n);l=i<0?n.text.length-1:0;var c=Wn(t,u,l).top;l=oe((function(e){return Wn(t,u,e).top==c}),i<0==(1==a.level)?a.from:a.to-1,l),"before"==s&&(l=Qo(n,l,1))}else l=i<0?a.to:a.from;return new et(r,l,s)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}jo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},jo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},jo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},jo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},jo.default=y?jo.macDefault:jo.pcDefault;var tl={selectAll:ao,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),U)},killLine:function(e){return Zo(e,(function(t){if(t.empty()){var n=Xe(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:et(t.head.line+1,0)}:{from:t.head,to:et(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Zo(e,(function(t){return{from:et(t.from().line,0),to:at(e.doc,et(t.to().line+1,0))}}))},delLineLeft:function(e){return Zo(e,(function(e){return{from:et(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Zo(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Zo(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(et(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(et(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return nl(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return rl(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=Xe(e.doc,t),r=function(e){for(var t;t=Ft(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=$e(r)),el(!0,e,n,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),V)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),V)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?rl(e,t.head):r}),V)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),l=I(e.getLine(o.line),o.ch,r);t.push(_(r-l%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Jr(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=Xe(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new et(i.line,i.ch-1)),i.ch>0)i=new et(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Xe(e.doc,i.line-1).text;l&&(i=new et(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),et(i.line-1,l.length-1),i,"+transpose"))}n.push(new Si(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Jr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Dr(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function nl(e,t){var n=Xe(e.doc,t),r=It(n);return r!=n&&(t=$e(r)),el(!0,e,r,t,1)}function rl(e,t){var n=nl(e,t.line),r=Xe(e.doc,n.line),i=ue(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),l=t.line==n.line&&t.ch<=o&&t.ch;return et(n.line,l?0:o,n.sticky)}return n}function il(e,t,n){if("string"==typeof t&&!(t=tl[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=G}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}var ol=new z;function ll(e,t,n,r){var i=e.state.keySeq;if(i){if(_o(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:ol.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),al(e,i+" "+t,n,r))return!0}return al(e,t,n,r)}function al(e,t,n,r){var i=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Xo(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Xo(t,e.options.extraKeys,n,e)||Xo(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&sn(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(be(n),wr(e)),!!i}function sl(e,t){var n=Yo(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?ll(e,"Shift-"+n,t,(function(t){return il(e,t,!0)}))||ll(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return il(e,t)})):ll(e,n,t,(function(t){return il(e,t)})))}var ul=null;function cl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=P(),ge(t,e)))){l&&a<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=sl(t,e);f&&(ul=i?r:null,i||88!=r||We||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!y&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(T(t,"CodeMirror-crosshair"),he(document,"keyup",n),he(document,"mouseover",n))}W(t,"CodeMirror-crosshair"),fe(document,"keyup",n),fe(document,"mouseover",n)}(t)}}function fl(e){16==e.keyCode&&(this.doc.sel.shift=!1),ge(this,e)}function dl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Cn(t.display,e)||ge(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(f&&n==ul)return ul=null,void be(e);if(!f||e.which&&!(e.which<10)||!sl(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(function(e,t,n){return ll(e,"'"+n+"'",t,(function(t){return il(e,t,!0)}))}(t,e,i)||t.display.input.onKeyPress(e))}}}var hl,pl,gl=function(e,t,n){this.time=e,this.pos=t,this.button=n};function ml(e){var t=this,n=t.display;if(!(ge(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Cn(n,e))s||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!bl(t,e)){var r=ur(t,e),i=ke(e),o=r?function(e,t){var n=+new Date;return pl&&pl.compare(n,e,t)?(hl=pl=null,"triple"):hl&&hl.compare(n,e,t)?(pl=new gl(n,e,t),hl=null,"double"):(hl=new gl(n,e,t),pl=null,"single")}(r,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&function(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),ll(e,qo(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=tl[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=G}finally{e.state.suppressEdits=!1}return r}))}(t,i,r,o,e)||(1==i?r?function(e,t,n,r){l?setTimeout(E(Cr,e),0):e.curOp.focus=P();var i,o=function(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=b?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=y?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(y?n.altKey:n.ctrlKey)),i}(e,n,r),u=e.doc.sel;e.options.dragDrop&&Me&&!e.isReadOnly()&&"single"==n&&(i=u.contains(t))>-1&&(tt((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,u=ei(e,(function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Sr(e)),he(i.wrapper.ownerDocument,"mouseup",u),he(i.wrapper.ownerDocument,"mousemove",c),he(i.scroller,"dragstart",f),he(i.scroller,"drop",u),o||(be(t),r.addNew||qi(e.doc,n,null,null,r.extend),s&&!d||l&&9==a?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return o=!0};s&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,fe(i.wrapper.ownerDocument,"mouseup",u),fe(i.wrapper.ownerDocument,"mousemove",c),fe(i.scroller,"dragstart",f),fe(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}(e,r,t,o):function(e,t,n,r){l&&Sr(e);var i=e.display,o=e.doc;be(t);var a,s,u=o.sel,c=u.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new Si(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new Si(n,n)),n=ur(e,t,!0,!0),s=-1;else{var f=vl(e,n,r.unit);a=r.extend?_i(a,f.anchor,f.head,r.extend):f}r.addNew?-1==s?(s=c.length,Ji(o,ki(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Ji(o,ki(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):$i(o,s,a,j):(s=0,Ji(o,new Ci([a],0),j),u=o.sel);var d=n;function h(t){if(0!=tt(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],l=e.options.tabSize,c=I(Xe(o,n.line).text,n.ch,l),f=I(Xe(o,t.line).text,t.ch,l),h=Math.min(c,f),p=Math.max(c,f),g=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=m;g++){var v=Xe(o,g).text,y=K(v,h,l);h==p?i.push(new Si(et(g,y),et(g,y))):v.length>y&&i.push(new Si(et(g,y),et(g,K(v,p,l))))}i.length||i.push(new Si(n,n)),Ji(o,ki(e,u.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,x=a,w=vl(e,t,r.unit),C=x.anchor;tt(w.anchor,C)>0?(b=w.head,C=ot(x.from(),w.anchor)):(b=w.anchor,C=it(x.to(),w.head));var S=u.ranges.slice(0);S[s]=function(e,t){var n=t.anchor,r=t.head,i=Xe(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var o=ue(i);if(!o)return t;var l=ae(o,n.ch,n.sticky),a=o[l];if(a.from!=n.ch&&a.to!=n.ch)return t;var s,u=l+(a.from==n.ch==(1!=a.level)?0:1);if(0==u||u==o.length)return t;if(r.line!=n.line)s=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ae(o,r.ch,r.sticky),f=c-l||(r.ch-n.ch)*(1==a.level?-1:1);s=c==u-1||c==u?f<0:f>0}var d=o[u+(s?-1:0)],h=s==(1==d.level),p=h?d.from:d.to,g=h?"after":"before";return n.ch==p&&n.sticky==g?t:new Si(new et(n.line,p,g),r)}(e,new Si(at(o,C),b)),Ji(o,ki(e,S,s),j)}}var p=i.wrapper.getBoundingClientRect(),g=0;function m(t){var n=++g,l=ur(e,t,!0,"rectangle"==r.unit);if(l)if(0!=tt(l,d)){e.curOp.focus=P(),h(l);var a=Ar(i,o);(l.line>=a.to||l.line<a.from)&&setTimeout(ei(e,(function(){g==n&&m(t)})),150)}else{var s=t.clientY<p.top?-20:t.clientY>p.bottom?20:0;s&&setTimeout(ei(e,(function(){g==n&&(i.scroller.scrollTop+=s,m(t))})),50)}}function v(t){e.state.selectingText=!1,g=1/0,t&&(be(t),i.input.focus()),he(i.wrapper.ownerDocument,"mousemove",y),he(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=ei(e,(function(e){0!==e.buttons&&ke(e)?m(e):v(e)})),b=ei(e,v);e.state.selectingText=b,fe(i.wrapper.ownerDocument,"mousemove",y),fe(i.wrapper.ownerDocument,"mouseup",b)}(e,r,t,o)}(t,r,o,e):Se(e)==n.scroller&&be(e):2==i?(r&&qi(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(S?t.display.input.onContextMenu(e):Sr(t)))}}function vl(e,t,n){if("char"==n)return new Si(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Si(et(t.line,0),at(e.doc,et(t.line+1,0)));var r=n(e,t);return new Si(r.from,r.to)}function yl(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!ve(e,n))return we(t);o-=a.top-l.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var u=l.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=i)return pe(e,n,e,Ze(e.doc,o),e.display.gutterSpecs[s].className,t),we(t)}}function bl(e,t){return yl(e,t,"gutterClick",!0)}function xl(e,t){Cn(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&yl(e,t,"gutterContextMenu",!1)}(e,t)||ge(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function wl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Bn(e)}gl.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var Cl={toString:function(){return"CodeMirror.Init"}},Sl={},kl={};function Ll(e,t,n){if(!t!=!(n&&n!=Cl)){var r=e.display.dragFunctions,i=t?fe:he;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Tl(e){e.options.lineWrapping?(W(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),Kt(e)),sr(e),fr(e),Bn(e),setTimeout((function(){return Gr(e)}),100)}function Ml(e,t){var n=this;if(!(this instanceof Ml))return new Ml(e,t);this.options=t=t?R(t):{},R(Sl,t,!1);var r=t.value;"string"==typeof r?r=new Do(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ml.inputStyles[t.inputStyle](this),o=this.display=new mi(e,r,i,t);for(var u in o.wrapper.CodeMirror=this,wl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Vr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new z,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),l&&a<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;fe(t.scroller,"mousedown",ei(e,ml)),fe(t.scroller,"dblclick",l&&a<11?ei(e,(function(t){if(!ge(e,t)){var n=ur(e,t);if(n&&!bl(e,t)&&!Cn(e.display,t)){be(t);var r=e.findWordAt(n);qi(e.doc,r.anchor,r.head)}}})):function(t){return ge(e,t)||be(t)}),fe(t.scroller,"contextmenu",(function(t){return xl(e,t)})),fe(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||xl(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function s(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}fe(t.scroller,"touchstart",(function(i){if(!ge(e,i)&&!o(i)&&!bl(e,i)){t.input.ensurePolled(),clearTimeout(n);var l=+new Date;t.activeTouch={start:l,moved:!1,prev:l-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),fe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),fe(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Cn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,l=e.coordsChar(t.activeTouch,"page");o=!r.prev||s(r,r.prev)?new Si(l,l):!r.prev.prev||s(r,r.prev.prev)?e.findWordAt(l):new Si(et(l.line,0),at(e.doc,et(l.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),be(n)}i()})),fe(t.scroller,"touchcancel",i),fe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Fr(e,t.scroller.scrollTop),Rr(e,t.scroller.scrollLeft,!0),pe(e,"scroll",e))})),fe(t.scroller,"mousewheel",(function(t){return wi(e,t)})),fe(t.scroller,"DOMMouseScroll",(function(t){return wi(e,t)})),fe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ge(e,t)||Ce(t)},over:function(t){ge(e,t)||(function(e,t){var n=ur(e,t);if(n){var r=document.createDocumentFragment();yr(e,n,r),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),A(e.display.dragCursor,r)}}(e,t),Ce(t))},start:function(t){return function(e,t){if(l&&(!e.state.draggingText||+new Date-Po<100))Ce(t);else if(!ge(e,t)&&!Cn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var n=O("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}(e,t)},drop:ei(e,Wo),leave:function(t){ge(e,t)||Ho(e)}};var u=t.input.getField();fe(u,"keyup",(function(t){return fl.call(e,t)})),fe(u,"keydown",ei(e,cl)),fe(u,"keypress",ei(e,dl)),fe(u,"focus",(function(t){return kr(e,t)})),fe(u,"blur",(function(t){return Lr(e,t)}))}(this),Ro(),Xr(this),this.curOp.forceUpdate=!0,Fi(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&kr(n)}),20):Lr(this),kl)kl.hasOwnProperty(u)&&kl[u](this,t[u],Cl);di(this),t.finishInit&&t.finishInit(this);for(var c=0;c<Al.length;++c)Al[c](this);_r(this),s&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Ml.defaults=Sl,Ml.optionHandlers=kl;var Al=[];function Ol(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=ht(e,t).state:n="prev");var l=e.options.tabSize,a=Xe(o,t),s=I(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n&&((u=o.mode.indent(i,a.text.slice(c.length),a.text))==G||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?I(Xe(o,t-1).text,null,l):0:"add"==n?u=s+e.options.indentUnit:"subtract"==n?u=s-e.options.indentUnit:"number"==typeof n&&(u=s+n),u=Math.max(0,u);var f="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(u/l);h;--h)d+=l,f+="\t";if(d<u&&(f+=_(u-d)),f!=c)return go(o,f,et(t,0),et(t,c.length),"+input"),a.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var g=o.sel.ranges[p];if(g.head.line==t&&g.head.ch<c.length){var m=et(t,c.length);$i(o,p,new Si(m,m));break}}}Ml.defineInitHook=function(e){return Al.push(e)};var Nl=null;function Dl(e){Nl=e}function Pl(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var l=+new Date-200,a="paste"==i||e.state.pasteIncoming>l,s=De(t),u=null;if(a&&r.ranges.length>1)if(Nl&&Nl.text.join("\n")==t){if(r.ranges.length%Nl.text.length==0){u=[];for(var c=0;c<Nl.text.length;c++)u.push(o.splitLines(Nl.text[c]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=Y(s,(function(e){return[e]})));for(var f=e.curOp.updateInput,d=r.ranges.length-1;d>=0;d--){var h=r.ranges[d],p=h.from(),g=h.to();h.empty()&&(n&&n>0?p=et(p.line,p.ch-n):e.state.overwrite&&!a?g=et(g.line,Math.min(Xe(o,g.line).text.length,g.ch+q(s).length)):a&&Nl&&Nl.lineWise&&Nl.text.join("\n")==s.join("\n")&&(p=g=et(p.line,0)));var m={from:p,to:g,text:u?u[d%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};uo(e.doc,m),sn(e,"inputRead",e,m)}t&&!a&&Hl(e,t),Dr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Wl(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Jr(t,(function(){return Pl(t,n,0,null,"paste")})),!0}function Hl(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){l=Ol(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Xe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Ol(e,i.head.line,"smart"));l&&sn(e,"electricInput",e,i.head.line)}}}function Fl(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:et(i,0),head:et(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function El(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Rl(){var e=O("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=O("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),El(e),t}function Il(e,t,n,r,i){var o=t,l=n,a=Xe(e,t.line),s=i&&"rtl"==e.direction?-n:n;function u(o){var l,u;if("codepoint"==r){var c=a.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(c))l=null;else{var f=n>0?c>=55296&&c<56320:c>=56320&&c<57343;l=new et(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(f?2:1))),-n)}}else l=i?function(e,t,n,r){var i=ue(t,e.doc.direction);if(!i)return Jo(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ae(i,n.ch,n.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(r>0?l.to>n.ch:l.from<n.ch))return Jo(t,n,r);var a,s=function(e,n){return Qo(t,e instanceof et?e.ch:e,n)},u=function(n){return e.options.lineWrapping?(a=a||Pn(e,t),Qn(e,t,a,n)):{begin:0,end:t.text.length}},c=u("before"==n.sticky?s(n,-1):n.ch);if("rtl"==e.doc.direction||1==l.level){var f=1==l.level==r<0,d=s(n,f?1:-1);if(null!=d&&(f?d<=l.to&&d<=c.end:d>=l.from&&d>=c.begin)){var h=f?"before":"after";return new et(n.line,d,h)}}var p=function(e,t,r){for(var o=function(e,t){return t?new et(n.line,s(e,1),"before"):new et(n.line,e,"after")};e>=0&&e<i.length;e+=t){var l=i[e],a=t>0==(1!=l.level),u=a?r.begin:s(r.end,-1);if(l.from<=u&&u<l.to)return o(u,a);if(u=a?l.from:s(l.to,-1),r.begin<=u&&u<r.end)return o(u,a)}},g=p(o+r,r,c);if(g)return g;var m=r>0?c.end:s(c.begin,-1);return null==m||r>0&&m==t.text.length||!(g=p(r>0?0:i.length-1,r,u(m)))?null:g}(e.cm,a,t,n):Jo(a,t,n);if(null==l){if(o||(u=t.line+s)<e.first||u>=e.first+e.size||(t=new et(u,t.ch,t.sticky),!(a=Xe(e,u))))return!1;t=el(i,e.cm,a,t.line,s)}else t=l;return!0}if("char"==r||"codepoint"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var c=null,f="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||u(!h);h=!1){var p=a.text.charAt(t.ch)||"\n",g=ee(p,d)?"w":f&&"\n"==p?"n":!f||/\s/.test(p)?null:"p";if(!f||h||g||(g="s"),c&&c!=g){n<0&&(n=1,u(),t.sticky="after");break}if(g&&(c=g),n>0&&!u(!h))break}var m=oo(e,t,o,l,!0);return nt(o,m)&&(m.hitSide=!0),m}function zl(e,t,n,r){var i,o,l=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(s-.5*rr(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=$n(e,a,i)).outside;){if(n<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*n}return o}var Bl=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Gl(e,t){var n=Dn(e,t.line);if(!n||n.hidden)return null;var r=Xe(e.doc,t.line),i=On(n,r,t.line),o=ue(r,e.doc.direction),l="left";o&&(l=ae(o,t.ch)%2?"right":"left");var a=En(i.map,t.ch,l);return a.offset="right"==a.collapse?a.end:a.start,a}function Ul(e,t){return t&&(e.bad=!0),e}function jl(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Ul(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return Vl(o,t,n)}}function Vl(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!D(r,t))return Ul(et($e(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?q(e.rest):e.line;return Ul(et($e(o),o.text.length),i)}var l=3==t.nodeType?t:null,a=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,n&&(n=l.nodeValue.length));a.parentNode!=r;)a=a.parentNode;var s=e.measure,u=s.maps;function c(t,n,r){for(var i=-1;i<(u?u.length:0);i++)for(var o=i<0?s.map:u[i],l=0;l<o.length;l+=3){var a=o[l+2];if(a==t||a==n){var c=$e(i<0?e.line:e.rest[i]),f=o[l]+r;return(r<0||a!=t)&&(f=o[l+(r?1:0)]),et(c,f)}}}var f=c(l,a,n);if(f)return Ul(f,i);for(var d=a.nextSibling,h=l?l.nodeValue.length-n:0;d;d=d.nextSibling){if(f=c(d,d.firstChild,0))return Ul(et(f.line,f.ch-h),i);h+=d.textContent.length}for(var p=a.previousSibling,g=n;p;p=p.previousSibling){if(f=c(p,p.firstChild,-1))return Ul(et(f.line,f.ch+g),i);g+=p.textContent.length}}Bl.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function l(e){if(o(e)&&!ge(r,e)){if(r.somethingSelected())Dl({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Fl(r);Dl({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,U),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var l=Nl.text.join("\n");if(e.clipboardData.setData("Text",l),e.clipboardData.getData("Text")==l)return void e.preventDefault()}var a=Rl(),s=a.firstChild;r.display.lineSpace.insertBefore(a,r.display.lineSpace.firstChild),s.value=Nl.text.join("\n");var u=document.activeElement;F(s),setTimeout((function(){r.display.lineSpace.removeChild(a),u.focus(),u==i&&n.showPrimarySelection()}),50)}}El(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),fe(i,"paste",(function(e){!o(e)||ge(r,e)||Wl(e,r)||a<=11&&setTimeout(ei(r,(function(){return t.updateFromDOM()})),20)})),fe(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),fe(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),fe(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),fe(i,"touchstart",(function(){return n.forceCompositionEnd()})),fe(i,"input",(function(){t.composing||t.readFromDOMSoon()})),fe(i,"copy",l),fe(i,"cut",l)},Bl.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Bl.prototype.prepareSelection=function(){var e=vr(this.cm,!1);return e.focus=document.activeElement==this.div,e},Bl.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Bl.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Bl.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var l=jl(t,e.anchorNode,e.anchorOffset),a=jl(t,e.focusNode,e.focusOffset);if(!l||l.bad||!a||a.bad||0!=tt(ot(l,a),i)||0!=tt(it(l,a),o)){var s=t.display.view,u=i.line>=t.display.viewFrom&&Gl(t,i)||{node:s[0].measure.map[2],offset:0},c=o.line<t.display.viewTo&&Gl(t,o);if(!c){var f=s[s.length-1].measure,d=f.maps?f.maps[f.maps.length-1]:f.map;c={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(u&&c){var h,p=e.rangeCount&&e.getRangeAt(0);try{h=L(u.node,u.offset,c.offset,c.node)}catch(e){}h&&(!n&&t.state.focused?(e.collapse(u.node,u.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),p&&null==e.anchorNode?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Bl.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Bl.prototype.showMultipleSelections=function(e){A(this.cm.display.cursorDiv,e.cursors),A(this.cm.display.selectionDiv,e.selection)},Bl.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Bl.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return D(this.div,t)},Bl.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Bl.prototype.blur=function(){this.div.blur()},Bl.prototype.getField=function(){return this.div},Bl.prototype.supportsTouch=function(){return!0},Bl.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Jr(this.cm,(function(){return e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}))},Bl.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Bl.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(m&&c&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=jl(t,e.anchorNode,e.anchorOffset),r=jl(t,e.focusNode,e.focusOffset);n&&r&&Jr(t,(function(){Ji(t.doc,Li(n,r),U),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Bl.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),l=o.from(),a=o.to();if(0==l.ch&&l.line>r.firstLine()&&(l=et(l.line-1,Xe(r.doc,l.line-1).length)),a.ch==Xe(r.doc,a.line).text.length&&a.line<r.lastLine()&&(a=et(a.line+1,0)),l.line<i.viewFrom||a.line>i.viewTo-1)return!1;l.line==i.viewFrom||0==(e=cr(r,l.line))?(t=$e(i.view[0].line),n=i.view[0].node):(t=$e(i.view[e].line),n=i.view[e-1].node.nextSibling);var s,u,c=cr(r,a.line);if(c==i.view.length-1?(s=i.viewTo-1,u=i.lineDiv.lastChild):(s=$e(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;for(var f=r.doc.splitLines(function(e,t,n,r,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(e){return function(t){return t.id==e}}function c(){l&&(o+=a,s&&(o+=a),l=s=!1)}function f(e){e&&(c(),o+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void f(n);var o,h=t.getAttribute("cm-marker");if(h){var p=e.findMarks(et(r,0),et(i+1,0),u(+h));return void(p.length&&(o=p[0].find(0))&&f(_e(e.doc,o.from,o.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;g&&c();for(var m=0;m<t.childNodes.length;m++)d(t.childNodes[m]);/^(pre|p)$/i.test(t.nodeName)&&(s=!0),g&&(l=!0)}else 3==t.nodeType&&f(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;d(t),t!=n;)t=t.nextSibling,s=!1;return o}(r,n,u,t,s)),d=_e(r.doc,et(t,0),et(s,Xe(r.doc,s).text.length));f.length>1&&d.length>1;)if(q(f)==q(d))f.pop(),d.pop(),s--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var h=0,p=0,g=f[0],m=d[0],v=Math.min(g.length,m.length);h<v&&g.charCodeAt(h)==m.charCodeAt(h);)++h;for(var y=q(f),b=q(d),x=Math.min(y.length-(1==f.length?h:0),b.length-(1==d.length?h:0));p<x&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==f.length&&1==d.length&&t==l.line)for(;h&&h>l.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)h--,p++;f[f.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(h).replace(/\u200b+$/,"");var w=et(t,h),C=et(s,d.length?q(d).length-p:0);return f.length>1||f[0]||tt(w,C)?(go(r.doc,f,w,C,"+input"),!0):void 0},Bl.prototype.ensurePolled=function(){this.forceCompositionEnd()},Bl.prototype.reset=function(){this.forceCompositionEnd()},Bl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Bl.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Bl.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Jr(this.cm,(function(){return fr(e.cm)}))},Bl.prototype.setUneditable=function(e){e.contentEditable="false"},Bl.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Pl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Bl.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Bl.prototype.onContextMenu=function(){},Bl.prototype.resetPosition=function(){},Bl.prototype.needsContentAttribute=!0;var Kl=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new z,this.hasSelection=!1,this.composing=null};Kl.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ge(r,e)){if(r.somethingSelected())Dl({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Fl(r);Dl({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,U):(n.prevInput="",i.value=t.text.join("\n"),F(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),fe(i,"input",(function(){l&&a>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),fe(i,"paste",(function(e){ge(r,e)||Wl(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),fe(i,"cut",o),fe(i,"copy",o),fe(e.scroller,"paste",(function(t){if(!Cn(e,t)&&!ge(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),fe(e.lineSpace,"selectstart",(function(t){Cn(e,t)||be(t)})),fe(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),fe(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Kl.prototype.createField=function(e){this.wrapper=Rl(),this.textarea=this.wrapper.firstChild},Kl.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Kl.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var i=_n(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},Kl.prototype.showSelection=function(e){var t=this.cm.display;A(t.cursorDiv,e.cursors),A(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Kl.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&F(this.textarea),l&&a>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",l&&a>=9&&(this.hasSelection=null))}},Kl.prototype.getField=function(){return this.textarea},Kl.prototype.supportsTouch=function(){return!1},Kl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||P()!=this.textarea))try{this.textarea.focus()}catch(e){}},Kl.prototype.blur=function(){this.textarea.blur()},Kl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Kl.prototype.receivedFocus=function(){this.slowPoll()},Kl.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Kl.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Kl.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Pe(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(l&&a>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,u=Math.min(r.length,i.length);s<u&&r.charCodeAt(s)==i.charCodeAt(s);)++s;return Jr(t,(function(){Pl(t,i.slice(s),r.length-s,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Kl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Kl.prototype.onKeyPress=function(){l&&a>=9&&(this.hasSelection=null),this.fastPoll()},Kl.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=ur(n,e),u=r.scroller.scrollTop;if(o&&!f){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ei(n,Ji)(n.doc,Li(o),U);var c,d=i.style.cssText,h=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(c=window.scrollY),r.input.focus(),s&&window.scrollTo(null,c),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),l&&a>=9&&m(),S){Ce(e);var g=function(){he(window,"mouseup",g),setTimeout(v,20)};fe(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,i.style.cssText=d,l&&a<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart)){(!l||l&&a<9)&&m();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?ei(n,ao)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Kl.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Kl.prototype.setUneditable=function(){},Kl.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Cl&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Cl,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Ni(e)}),!0),n("indentUnit",2,Ni,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Di(e),Bn(e),fr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(et(r,o))}r++}));for(var i=n.length-1;i>=0;i--)go(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Cl&&e.refresh()})),n("specialCharPlaceholder",Qt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){wl(e),gi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=$o(t),i=n!=Cl&&$o(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Tl,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=hi(t,e.options.lineNumbers),gi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?lr(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Gr(e)}),!0),n("scrollbarStyle","native",(function(e){Vr(e),Gr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=hi(e.options.gutters,t),gi(e)}),!0),n("firstLineNumber",1,gi,!0),n("lineNumberFormatter",(function(e){return e}),gi,!0),n("showCursorWhenSelecting",!1,mr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Lr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Ll),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,mr,!0),n("singleCursorHeightPerLine",!0,mr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Di,!0),n("addModeClass",!1,Di,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Di,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Ml),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ei(this,t[e])(this,n,i),pe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"]($o(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:ti((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,fr(this)})),removeOverlay:ti((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void fr(this)}})),indentLine:ti((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Qe(this.doc,e)&&Ol(this,e,t,n)})),indentSelection:ti((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Ol(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Dr(this));else{var o=i.from(),l=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var s=a;s<n;++s)Ol(this,s,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[r].from().ch>0&&$i(this.doc,r,new Si(o,u[r].to()),U)}}})),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=at(this.doc,e);var t,n=dt(this,Xe(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var l=r+i>>1;if((l?n[2*l-1]:0)>=o)i=l;else{if(!(n[2*l+1]<o)){t=n[2*l+2];break}r=l+1}}var a=t?t.indexOf("overlay "):-1;return a<0?t:0==a?null:t.slice(0,a-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var l=0;l<o[t].length;l++){var a=i[o[t][l]];a&&r.push(a)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var s=0;s<i._global.length;s++){var u=i._global[s];u.pred(o,this)&&-1==B(r,u.val)&&r.push(u.val)}return r},getStateAfter:function(e,t){var n=this.doc;return ht(this,(e=lt(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return _n(this,null==e?n.head:"object"==typeof e?at(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Xn(this,at(this.doc,e),t||"page")},coordsChar:function(e,t){return $n(this,(e=Kn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Kn(this,{top:e,left:0},t||"page").top,Ze(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),r=Xe(this.doc,e)}else r=e;return Vn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-jt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,l,a,s=this.display,u=(e=_n(this,at(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),s.sizer.appendChild(t),"over"==r)u=e.top;else if("above"==r||"near"==r){var f=Math.max(s.wrapper.clientHeight,this.doc.height),d=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>f)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=f&&(u=e.bottom),c+t.offsetWidth>d&&(c=d-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=s.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(s.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),n&&(o=this,l={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(a=Or(o,l)).scrollTop&&Fr(o,a.scrollTop),null!=a.scrollLeft&&Rr(o,a.scrollLeft))},triggerOnKeyDown:ti(cl),triggerOnKeyPress:ti(dl),triggerOnKeyUp:fl,triggerOnMouseDown:ti(ml),execCommand:function(e){if(tl.hasOwnProperty(e))return tl[e].call(null,this)},triggerElectric:ti((function(e){Hl(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=at(this.doc,e),l=0;l<t&&!(o=Il(this.doc,o,i,n,r)).hitSide;++l);return o},moveH:ti((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Il(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),V)})),deleteH:ti((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Zo(this,(function(n){var i=Il(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var l=at(this.doc,e),a=0;a<t;++a){var s=_n(this,l,"div");if(null==o?o=s.left:s.left=o,(l=zl(this,s,i,n)).hitSide)break}return l},moveV:ti((function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(l){if(o)return e<0?l.from():l.to();var a=_n(n,l.head,"div");null!=l.goalColumn&&(a.left=l.goalColumn),i.push(a.left);var s=zl(n,a,e,t);return"page"==t&&l==r.sel.primary()&&Nr(n,Xn(n,s,"div").top-a.top),s}),V),i.length)for(var l=0;l<r.sel.ranges.length;l++)r.sel.ranges[l].goalColumn=i[l]})),findWordAt:function(e){var t=Xe(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),l=ee(o,i)?function(e){return ee(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ee(e)};n>0&&l(t.charAt(n-1));)--n;for(;r<t.length&&l(t.charAt(r));)++r}return new Si(et(e.line,n),et(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?W(this.display.cursorDiv,"CodeMirror-overwrite"):T(this.display.cursorDiv,"CodeMirror-overwrite"),pe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==P()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ti((function(e,t){Pr(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Tn(this)-this.display.barHeight,width:e.scrollWidth-Tn(this)-this.display.barWidth,clientHeight:An(this),clientWidth:Mn(this)}},scrollIntoView:ti((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:et(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Wr(e),e.curOp.scrollToPos=t}(this,e):Hr(this,e.from,e.to,e.margin)})),setSize:ti((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&zn(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){dr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,pe(this,"refresh",this)})),operation:function(e){return Jr(this,e)},startOperation:function(){return Xr(this)},endOperation:function(){return _r(this)},refresh:ti((function(){var e=this.display.cachedTextHeight;fr(this),this.curOp.forceUpdate=!0,Bn(this),Pr(this,this.doc.scrollLeft,this.doc.scrollTop),ui(this.display),(null==e||Math.abs(e-rr(this.display))>.5||this.options.lineWrapping)&&sr(this),pe(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Fi(this,e),Bn(this),this.display.input.reset(),Pr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(Ml);var Xl="iter insert remove copy getEditor constructor".split(" ");for(var _l in Do.prototype)Do.prototype.hasOwnProperty(_l)&&B(Xl,_l)<0&&(Ml.prototype[_l]=function(e){return function(){return e.apply(this.doc,arguments)}}(Do.prototype[_l]));return ye(Do),Ml.inputStyles={textarea:Kl,contenteditable:Bl},Ml.defineMode=function(e){Ml.defaults.mode||"null"==e||(Ml.defaults.mode=e),Re.apply(this,arguments)},Ml.defineMIME=function(e,t){Ee[e]=t},Ml.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ml.defineMIME("text/plain","null"),Ml.defineExtension=function(e,t){Ml.prototype[e]=t},Ml.defineDocExtension=function(e,t){Do.prototype[e]=t},Ml.fromTextArea=function(e,t){if((t=t?R(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=P();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(fe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(he(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var a=Ml((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return a},function(e){e.off=he,e.on=fe,e.wheelEventPixels=xi,e.Doc=Do,e.splitLines=De,e.countColumn=I,e.findColumn=K,e.isWordChar=J,e.Pass=G,e.signal=pe,e.Line=Xt,e.changeEnd=Ti,e.scrollbarModel=jr,e.Pos=et,e.cmpPos=tt,e.modes=Fe,e.mimeModes=Ee,e.resolveMode=Ie,e.getMode=ze,e.modeExtensions=Be,e.extendMode=Ge,e.copyState=Ue,e.startState=Ve,e.innerMode=je,e.commands=tl,e.keyMap=jo,e.keyName=Yo,e.isModifierKey=_o,e.lookupKey=Xo,e.normalizeKeyMap=Ko,e.StringStream=Ke,e.SharedTextMarker=Mo,e.TextMarker=Lo,e.LineWidget=Co,e.e_preventDefault=be,e.e_stopPropagation=xe,e.e_stop=Ce,e.addClass=W,e.contains=D,e.rmClass=T,e.keyNames=zo}(Ml),Ml.version="5.59.1",Ml},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).CodeMirror=t(),n=function(e){var t={},n=/[^\s\u00a0]/,r=e.Pos,i=e.cmpPos;function o(e){var t=e.search(n);return-1==t?0:t}function l(e,t){var n=e.getMode();return!1!==n.useInnerComments&&n.innerMode?e.getModeAt(t):n}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",(function(e){e||(e=t);for(var n=this,i=1/0,o=this.listSelections(),l=null,a=o.length-1;a>=0;a--){var s=o[a].from(),u=o[a].to();s.line>=i||(u.line>=i&&(u=r(i,0)),i=s.line,null==l?n.uncomment(s,u,e)?l="un":(n.lineComment(s,u,e),l="line"):"un"==l?n.uncomment(s,u,e):n.lineComment(s,u,e))}})),e.defineExtension("lineComment",(function(e,i,a){a||(a=t);var s=this,u=l(s,e),c=s.getLine(e.line);if(null!=c&&(f=e,d=c,!/\bstring\b/.test(s.getTokenTypeAt(r(f.line,0)))||/^[\'\"\`]/.test(d))){var f,d,h=a.lineComment||u.lineComment;if(h){var p=Math.min(0!=i.ch||i.line==e.line?i.line+1:i.line,s.lastLine()+1),g=null==a.padding?" ":a.padding,m=a.commentBlankLines||e.line==i.line;s.operation((function(){if(a.indent){for(var t=null,i=e.line;i<p;++i){var l=(u=s.getLine(i)).slice(0,o(u));(null==t||t.length>l.length)&&(t=l)}for(i=e.line;i<p;++i){var u=s.getLine(i),c=t.length;(m||n.test(u))&&(u.slice(0,c)!=t&&(c=o(u)),s.replaceRange(t+h+g,r(i,0),r(i,c)))}}else for(i=e.line;i<p;++i)(m||n.test(s.getLine(i)))&&s.replaceRange(h+g,r(i,0))}))}else(a.blockCommentStart||u.blockCommentStart)&&(a.fullLines=!0,s.blockComment(e,i,a))}})),e.defineExtension("blockComment",(function(e,o,a){a||(a=t);var s=this,u=l(s,e),c=a.blockCommentStart||u.blockCommentStart,f=a.blockCommentEnd||u.blockCommentEnd;if(c&&f){if(!/\bcomment\b/.test(s.getTokenTypeAt(r(e.line,0)))){var d=Math.min(o.line,s.lastLine());d!=e.line&&0==o.ch&&n.test(s.getLine(d))&&--d;var h=null==a.padding?" ":a.padding;e.line>d||s.operation((function(){if(0!=a.fullLines){var t=n.test(s.getLine(d));s.replaceRange(h+f,r(d)),s.replaceRange(c+h,r(e.line,0));var l=a.blockCommentLead||u.blockCommentLead;if(null!=l)for(var p=e.line+1;p<=d;++p)(p!=d||t)&&s.replaceRange(l+h,r(p,0))}else{var g=0==i(s.getCursor("to"),o),m=!s.somethingSelected();s.replaceRange(f,o),g&&s.setSelection(m?o:s.getCursor("from"),o),s.replaceRange(c,e)}}))}}else(a.lineComment||u.lineComment)&&0!=a.fullLines&&s.lineComment(e,o,a)})),e.defineExtension("uncomment",(function(e,i,o){o||(o=t);var a,s=this,u=l(s,e),c=Math.min(0!=i.ch||i.line==e.line?i.line:i.line-1,s.lastLine()),f=Math.min(e.line,c),d=o.lineComment||u.lineComment,h=[],p=null==o.padding?" ":o.padding;e:if(d){for(var g=f;g<=c;++g){var m=s.getLine(g),v=m.indexOf(d);if(v>-1&&!/comment/.test(s.getTokenTypeAt(r(g,v+1)))&&(v=-1),-1==v&&n.test(m))break e;if(v>-1&&n.test(m.slice(0,v)))break e;h.push(m)}if(s.operation((function(){for(var e=f;e<=c;++e){var t=h[e-f],n=t.indexOf(d),i=n+d.length;n<0||(t.slice(i,i+p.length)==p&&(i+=p.length),a=!0,s.replaceRange("",r(e,n),r(e,i)))}})),a)return!0}var y=o.blockCommentStart||u.blockCommentStart,b=o.blockCommentEnd||u.blockCommentEnd;if(!y||!b)return!1;var x=o.blockCommentLead||u.blockCommentLead,w=s.getLine(f),C=w.indexOf(y);if(-1==C)return!1;var S=c==f?w:s.getLine(c),k=S.indexOf(b,c==f?C+y.length:0),L=r(f,C+1),T=r(c,k+1);if(-1==k||!/comment/.test(s.getTokenTypeAt(L))||!/comment/.test(s.getTokenTypeAt(T))||s.getRange(L,T,"\n").indexOf(b)>-1)return!1;var M=w.lastIndexOf(y,e.ch),A=-1==M?-1:w.slice(0,e.ch).indexOf(b,M+y.length);if(-1!=M&&-1!=A&&A+b.length!=e.ch)return!1;A=S.indexOf(b,i.ch);var O=S.slice(i.ch).lastIndexOf(y,A-i.ch);return M=-1==A||-1==O?-1:i.ch+O,(-1==A||-1==M||M==i.ch)&&(s.operation((function(){s.replaceRange("",r(c,k-(p&&S.slice(k-p.length,k)==p?p.length:0)),r(c,k+b.length));var e=C+y.length;if(p&&w.slice(e,e+p.length)==p&&(e+=p.length),s.replaceRange("",r(f,C),r(f,e)),x)for(var t=f+1;t<=c;++t){var i=s.getLine(t),o=i.indexOf(x);if(-1!=o&&!n.test(i.slice(0,o))){var l=o+x.length;p&&i.slice(l,l+p.length)==p&&(l+=p.length),s.replaceRange("",r(t,o),r(t,l))}}})),!0)}))},"object"==typeof exports&&"object"==typeof module?n(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,l){l&&l!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:function(t){var i=a(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),l=t.listSelections(),s=0;s<l.length;s++){if(!l[s].empty())return e.Pass;var u=c(t,l[s].head);if(!u||o.indexOf(u)%2!=0)return e.Pass}for(s=l.length-1;s>=0;s--){var f=l[s].head;t.replaceRange("",n(f.line,f.ch-1),n(f.line,f.ch+1),"+delete")}},Enter:function(t){var n=a(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),l=0;l<o.length;l++){if(!o[l].empty())return e.Pass;var u=c(t,o[l].head);if(!u||i.indexOf(u)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),s(t,-1),o=t.listSelections();for(var n=0;n<o.length;n++){var r=o[n].head.line;t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)}}))}};function o(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";i[r]||(i[r]=l(n))}}function l(t){return function(i){return function(t,i){var o=a(t);if(!o||t.getOption("disableInput"))return e.Pass;var l=r(o,"pairs"),c=l.indexOf(i);if(-1==c)return e.Pass;for(var d,h=r(o,"closeBefore"),p=r(o,"triples"),g=l.charAt(c+1)==i,m=t.listSelections(),v=c%2==0,y=0;y<m.length;y++){var b,x=m[y],w=x.head,C=t.getRange(w,n(w.line,w.ch+1));if(v&&!x.empty())b="surround";else if(!g&&v||C!=i)if(g&&w.ch>1&&p.indexOf(i)>=0&&t.getRange(n(w.line,w.ch-2),w)==i+i){if(w.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(w.line,w.ch-2))))return e.Pass;b="addFour"}else if(g){var S=0==w.ch?" ":t.getRange(n(w.line,w.ch-1),w);if(e.isWordChar(C)||S==i||e.isWordChar(S))return e.Pass;b="both"}else{if(!v||!(0===C.length||/\s/.test(C)||h.indexOf(C)>-1))return e.Pass;b="both"}else b=g&&f(t,w)?"both":p.indexOf(i)>=0&&t.getRange(w,n(w.line,w.ch+3))==i+i+i?"skipThree":"skip";if(d){if(d!=b)return e.Pass}else d=b}var k=c%2?l.charAt(c-1):i,L=c%2?i:l.charAt(c+1);t.operation((function(){if("skip"==d)s(t,1);else if("skipThree"==d)s(t,3);else if("surround"==d){for(var e=t.getSelections(),n=0;n<e.length;n++)e[n]=k+e[n]+L;t.replaceSelections(e,"around"),e=t.listSelections().slice();for(n=0;n<e.length;n++)e[n]=u(e[n]);t.setSelections(e)}else"both"==d?(t.replaceSelection(k+L,null),t.triggerElectric(k+L),s(t,-1)):"addFour"==d&&(t.replaceSelection(k+k+k+k,"before"),s(t,1))}))}(i,t)}}function a(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function s(e,t){for(var n=[],r=e.listSelections(),i=0,o=0;o<r.length;o++){var l=r[o];l.head==e.getCursor()&&(i=o);var a={line:l.head.line,ch:l.head.ch+t};n.push({anchor:a,head:a})}e.setSelections(n,i)}function u(t){var r=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(r?-1:1)),head:new n(t.head.line,t.head.ch+(r?1:-1))}}function c(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function f(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var a=e.getLineHandle(t.line),s=t.ch-1,u=o&&o.afterCursor;null==u&&(u=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=i(o),f=!u&&s>=0&&c.test(a.text.charAt(s))&&r[a.text.charAt(s)]||c.test(a.text.charAt(s+1))&&r[a.text.charAt(++s)];if(!f)return null;var d=">"==f.charAt(1)?1:-1;if(o&&o.strict&&d>0!=(s==t.ch))return null;var h=e.getTokenTypeAt(n(t.line,s+1)),p=l(e,n(t.line,s+(d>0?1:0)),d,h||null,o);return null==p?null:{from:n(t.line,s),to:p&&p.pos,match:p&&p.ch==f.charAt(0),forward:d>0}}function l(e,t,o,l,a){for(var s=a&&a.maxScanLineLength||1e4,u=a&&a.maxScanLines||1e3,c=[],f=i(a),d=o>0?Math.min(t.line+u,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-u),h=t.line;h!=d;h+=o){var p=e.getLine(h);if(p){var g=o>0?0:p.length-1,m=o>0?p.length:-1;if(!(p.length>s))for(h==t.line&&(g=t.ch-(o<0?1:0));g!=m;g+=o){var v=p.charAt(g);if(f.test(v)&&(void 0===l||e.getTokenTypeAt(n(h,g+1))==l)){var y=r[v];if(y&&">"==y.charAt(1)==o>0)c.push(v);else{if(!c.length)return{pos:n(h,g),ch:v};c.pop()}}}}}return h-o!=(o>0?e.lastLine():e.firstLine())&&null}function a(e,r,i){for(var l=e.state.matchBrackets.maxHighlightLineLength||1e3,a=[],s=e.listSelections(),u=0;u<s.length;u++){var c=s[u].empty()&&o(e,s[u].head,i);if(c&&e.getLine(c.from.line).length<=l){var f=c.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";a.push(e.markText(c.from,n(c.from.line,c.from.ch+1),{className:f})),c.to&&e.getLine(c.to.line).length<=l&&a.push(e.markText(c.to,n(c.to.line,c.to.ch+1),{className:f}))}}if(a.length){t&&e.state.focused&&e.focus();var d=function(){e.operation((function(){for(var e=0;e<a.length;e++)a[e].clear()}))};if(!r)return d;setTimeout(d,800)}}function s(e){e.operation((function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=a(e,!1,e.state.matchBrackets)}))}function u(e){e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)}e.defineOption("matchBrackets",!1,(function(t,n,r){r&&r!=e.Init&&(t.off("cursorActivity",s),t.off("focus",s),t.off("blur",u),u(t)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",s),t.on("focus",s),t.on("blur",u))})),e.defineExtension("matchBrackets",(function(){a(this,!0)})),e.defineExtension("findMatchingBracket",(function(e,t,n){return(n||"boolean"==typeof t)&&(n?(n.strict=t,t=n):t=t?{strict:!0}:null),o(this,e,t)})),e.defineExtension("scanForBracket",(function(e,t,n,r){return l(this,e,t,n,r)}))})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){e.multiplexingMode=function(t){var n=Array.prototype.slice.call(arguments,1);function r(e,t,n,r){if("string"==typeof t){var i=e.indexOf(t,n);return r&&i>-1?i+t.length:i}var o=t.exec(n?e.slice(n):e);return o?o.index+n+(r?o[0].length:0):-1}return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner)}},token:function(i,o){if(o.innerActive){var l=o.innerActive;u=i.string;if(!l.close&&i.sol())return o.innerActive=o.inner=null,this.token(i,o);if((f=l.close?r(u,l.close,i.pos,l.parseDelimiters):-1)==i.pos&&!l.parseDelimiters)return i.match(l.close),o.innerActive=o.inner=null,l.delimStyle&&l.delimStyle+" "+l.delimStyle+"-close";f>-1&&(i.string=u.slice(0,f));var a=l.mode.token(i,o.inner);return f>-1&&(i.string=u),f==i.pos&&l.parseDelimiters&&(o.innerActive=o.inner=null),l.innerStyle&&(a=a?a+" "+l.innerStyle:l.innerStyle),a}for(var s=1/0,u=i.string,c=0;c<n.length;++c){var f,d=n[c];if((f=r(u,d.open,i.pos))==i.pos){d.parseDelimiters||i.match(d.open),o.innerActive=d;var h=0;if(t.indent){var p=t.indent(o.outer,"","");p!==e.Pass&&(h=p)}return o.inner=e.startState(d.mode,h),d.delimStyle&&d.delimStyle+" "+d.delimStyle+"-open"}-1!=f&&f<s&&(s=f)}s!=1/0&&(i.string=u.slice(0,s));var g=t.token(i,o.outer);return s!=1/0&&(i.string=u),g},indent:function(n,r,i){var o=n.innerActive?n.innerActive.mode:t;return o.indent?o.indent(n.innerActive?n.inner:n.outer,r,i):e.Pass},blankLine:function(r){var i=r.innerActive?r.innerActive.mode:t;if(i.blankLine&&i.blankLine(r.innerActive?r.inner:r.outer),r.innerActive)"\n"===r.innerActive.close&&(r.innerActive=r.inner=null);else for(var o=0;o<n.length;++o){var l=n[o];"\n"===l.open&&(r.innerActive=l,r.inner=e.startState(l.mode,i.indent?i.indent(r.outer,"",""):0))}},electricChars:t.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:t}}}}})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){e.overlayMode=function(t,n,r){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)<e.start)&&(i.streamSeen=e,i.basePos=i.overlayPos=e.start),e.start==i.basePos&&(i.baseCur=t.token(e,i.base),i.basePos=e.pos),e.start==i.overlayPos&&(e.pos=e.start,i.overlayCur=n.token(e,i.overlay),i.overlayPos=e.pos),e.pos=Math.min(i.basePos,i.overlayPos),null==i.overlayCur?i.baseCur:null!=i.baseCur&&i.overlay.combineTokens||r&&null==i.overlay.combineTokens?i.baseCur+" "+i.overlayCur:i.overlayCur},indent:t.indent&&function(e,n,r){return t.indent(e.base,n,r)},electricChars:t.electricChars,innerMode:function(e){return{state:e.base,mode:t}},blankLine:function(e){var i,o;return t.blankLine&&(i=t.blankLine(e.base)),n.blankLine&&(o=n.blankLine(e.overlay)),null==o?i:r&&null!=i?i+" "+o:o}}}})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){function t(e,t){if(!e.hasOwnProperty(t))throw new Error("Undefined state "+t+" in simple mode")}function n(e,t){if(!e)return/(?:)/;var n="";return e instanceof RegExp?(e.ignoreCase&&(n="i"),e=e.source):e=String(e),new RegExp((!1===t?"":"^")+"(?:"+e+")",n)}function r(e,r){(e.next||e.push)&&t(r,e.next||e.push),this.regex=n(e.regex),this.token=function(e){if(!e)return null;if(e.apply)return e;if("string"==typeof e)return e.replace(/\./g," ");for(var t=[],n=0;n<e.length;n++)t.push(e[n]&&e[n].replace(/\./g," "));return t}(e.token),this.data=e}function i(e,t){return function(n,r){if(r.pending){var i=r.pending.shift();return 0==r.pending.length&&(r.pending=null),n.pos+=i.text.length,i.token}if(r.local){if(r.local.end&&n.match(r.local.end)){var o=r.local.endToken||null;return r.local=r.localState=null,o}var a;o=r.local.mode.token(n,r.localState);return r.local.endScan&&(a=r.local.endScan.exec(n.current()))&&(n.pos=n.start+a.index),o}for(var s=e[r.state],u=0;u<s.length;u++){var c=s[u],f=(!c.data.sol||n.sol())&&n.match(c.regex);if(f){c.data.next?r.state=c.data.next:c.data.push?((r.stack||(r.stack=[])).push(r.state),r.state=c.data.push):c.data.pop&&r.stack&&r.stack.length&&(r.state=r.stack.pop()),c.data.mode&&l(t,r,c.data.mode,c.token),c.data.indent&&r.indent.push(n.indentation()+t.indentUnit),c.data.dedent&&r.indent.pop();var d=c.token;if(d&&d.apply&&(d=d(f)),f.length>2&&c.token&&"string"!=typeof c.token){r.pending=[];for(var h=2;h<f.length;h++)f[h]&&r.pending.push({text:f[h],token:c.token[h-1]});return n.backUp(f[0].length-(f[1]?f[1].length:0)),d[0]}return d&&d.join?d[0]:d}}return n.next(),null}}function o(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=0;for(var r in e)if(e.hasOwnProperty(r)){if(!t.hasOwnProperty(r)||!o(e[r],t[r]))return!1;n++}for(var r in t)t.hasOwnProperty(r)&&n--;return 0==n}function l(t,r,i,l){var a;if(i.persistent)for(var s=r.persistentStates;s&&!a;s=s.next)(i.spec?o(i.spec,s.spec):i.mode==s.mode)&&(a=s);var u=a?a.mode:i.mode||e.getMode(t,i.spec),c=a?a.state:e.startState(u);i.persistent&&!a&&(r.persistentStates={mode:u,spec:i.spec,state:c,next:r.persistentStates}),r.localState=c,r.local={mode:u,end:i.end&&n(i.end),endScan:i.end&&!1!==i.forceEnd&&n(i.end,!1),endToken:l&&l.join?l[l.length-1]:l}}function a(t,n){return function(r,i,o){if(r.local&&r.local.mode.indent)return r.local.mode.indent(r.localState,i,o);if(null==r.indent||r.local||n.dontIndentStates&&function(e,t){for(var n=0;n<t.length;n++)if(t[n]===e)return!0}(r.state,n.dontIndentStates)>-1)return e.Pass;var l=r.indent.length-1,a=t[r.state];e:for(;;){for(var s=0;s<a.length;s++){var u=a[s];if(u.data.dedent&&!1!==u.data.dedentIfLineStart){var c=u.regex.exec(i);if(c&&c[0]){l--,(u.next||u.push)&&(a=t[u.next||u.push]),i=i.slice(c[0].length);continue e}}}break}return l<0?0:r.indent[l]}}e.defineSimpleMode=function(t,n){e.defineMode(t,(function(t){return e.simpleMode(t,n)}))},e.simpleMode=function(n,o){t(o,"start");var l={},s=o.meta||{},u=!1;for(var c in o)if(c!=s&&o.hasOwnProperty(c))for(var f=l[c]=[],d=o[c],h=0;h<d.length;h++){var p=d[h];f.push(new r(p,o)),(p.indent||p.dedent)&&(u=!0)}var g={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:u?[]:null}},copyState:function(t){var n={state:t.state,pending:t.pending,local:t.local,localState:null,indent:t.indent&&t.indent.slice(0)};t.localState&&(n.localState=e.copyState(t.local.mode,t.localState)),t.stack&&(n.stack=t.stack.slice(0));for(var r=t.persistentStates;r;r=r.next)n.persistentStates={mode:r.mode,spec:r.spec,state:r.state==t.localState?n.localState:e.copyState(r.mode,r.state),next:n.persistentStates};return n},token:i(l,n),innerMode:function(e){return e.local&&{mode:e.local.mode,state:e.localState}},indent:a(l,s)};if(s)for(var m in s)s.hasOwnProperty(m)&&(g[m]=s[m]);return g}})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){var t="CodeMirror-activeline",n="CodeMirror-activeline-background",r="CodeMirror-activeline-gutter";function i(e){for(var i=0;i<e.state.activeLines.length;i++)e.removeLineClass(e.state.activeLines[i],"wrap",t),e.removeLineClass(e.state.activeLines[i],"background",n),e.removeLineClass(e.state.activeLines[i],"gutter",r)}function o(e,o){for(var l=[],a=0;a<o.length;a++){var s=o[a],u=e.getOption("styleActiveLine");if("object"==typeof u&&u.nonEmpty?s.anchor.line==s.head.line:s.empty()){var c=e.getLineHandleVisualStart(s.head.line);l[l.length-1]!=c&&l.push(c)}}(function(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0})(e.state.activeLines,l)||e.operation((function(){i(e);for(var o=0;o<l.length;o++)e.addLineClass(l[o],"wrap",t),e.addLineClass(l[o],"background",n),e.addLineClass(l[o],"gutter",r);e.state.activeLines=l}))}function l(e,t){o(e,t.ranges)}e.defineOption("styleActiveLine",!1,(function(t,n,r){var a=r!=e.Init&&r;n!=a&&(a&&(t.off("beforeSelectionChange",l),i(t),delete t.state.activeLines),n&&(t.state.activeLines=[],o(t,t.listSelections()),t.on("beforeSelectionChange",l)))}))})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){function t(e){e.state.markedSelection&&e.operation((function(){!function(e){if(!e.somethingSelected())return l(e);if(e.listSelections().length>1)return a(e);var t=e.getCursor("start"),n=e.getCursor("end"),r=e.state.markedSelection;if(!r.length)return o(e,t,n);var s=r[0].find(),u=r[r.length-1].find();if(!s||!u||n.line-t.line<=8||i(t,u.to)>=0||i(n,s.from)<=0)return a(e);for(;i(t,s.from)>0;)r.shift().clear(),s=r[0].find();i(t,s.from)<0&&(s.to.line-t.line<8?(r.shift().clear(),o(e,t,s.to,0)):o(e,t,s.from,0));for(;i(n,u.to)<0;)r.pop().clear(),u=r[r.length-1].find();i(n,u.to)>0&&(n.line-u.from.line<8?(r.pop().clear(),o(e,u.from,n)):o(e,u.to,n))}(e)}))}function n(e){e.state.markedSelection&&e.state.markedSelection.length&&e.operation((function(){l(e)}))}e.defineOption("styleSelectedText",!1,(function(r,i,o){var s=o&&o!=e.Init;i&&!s?(r.state.markedSelection=[],r.state.markedSelectionStyle="string"==typeof i?i:"CodeMirror-selectedtext",a(r),r.on("cursorActivity",t),r.on("change",n)):!i&&s&&(r.off("cursorActivity",t),r.off("change",n),l(r),r.state.markedSelection=r.state.markedSelectionStyle=null)}));var r=e.Pos,i=e.cmpPos;function o(e,t,n,o){if(0!=i(t,n))for(var l=e.state.markedSelection,a=e.state.markedSelectionStyle,s=t.line;;){var u=s==t.line?t:r(s,0),c=s+8,f=c>=n.line,d=f?n:r(c,0),h=e.markText(u,d,{className:a});if(null==o?l.push(h):l.splice(o++,0,h),f)break;s=c}}function l(e){for(var t=e.state.markedSelection,n=0;n<t.length;++n)t[n].clear();t.length=0}function a(e){l(e);for(var t=e.listSelections(),n=0;n<t.length;n++)o(e,t[n].from(),t[n].to())}})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){function t(t,n,i,o){if(i&&i.call){var l=i;i=null}else l=r(t,i,"rangeFinder");"number"==typeof n&&(n=e.Pos(n,0));var a=r(t,i,"minFoldSize");function s(e){var r=l(t,n);if(!r||r.to.line-r.from.line<a)return null;for(var i=t.findMarksAt(r.from),s=0;s<i.length;++s)if(i[s].__isFold&&"fold"!==o){if(!e)return null;r.cleared=!0,i[s].clear()}return r}var u=s(!0);if(r(t,i,"scanUp"))for(;!u&&n.line>t.firstLine();)n=e.Pos(n.line-1,0),u=s(!1);if(u&&!u.cleared&&"unfold"!==o){var c=function(e,t,n){var i=r(e,t,"widget");"function"==typeof i&&(i=i(n.from,n.to));if("string"==typeof i){var o=document.createTextNode(i);(i=document.createElement("span")).appendChild(o),i.className="CodeMirror-foldmarker"}else i&&(i=i.cloneNode(!0));return i}(t,i,u);e.on(c,"mousedown",(function(t){f.clear(),e.e_preventDefault(t)}));var f=t.markText(u.from,u.to,{replacedWith:c,clearOnEnter:r(t,i,"clearOnEnter"),__isFold:!0});f.on("clear",(function(n,r){e.signal(t,"unfold",t,n,r)})),e.signal(t,"fold",t,u.from,u.to)}}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",(function(e,n,r){t(this,e,n,r)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0})),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")},e.commands.foldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),null,"fold")}))},e.commands.unfoldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),null,"unfold")}))},e.registerHelper("fold","combine",(function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t,n);if(i)return i}}})),e.registerHelper("fold","auto",(function(e,t){for(var n=e.getHelpers(t,"fold"),r=0;r<n.length;r++){var i=n[r](e,t);if(i)return i}}));var n={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function r(e,t,r){if(t&&void 0!==t[r])return t[r];var i=e.options.foldOptions;return i&&void 0!==i[r]?i[r]:n[r]}e.defineOption("foldOptions",null),e.defineExtension("foldOption",(function(e,t){return r(this,e,t)}))})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],e):e(CodeMirror)}((function(e){e.defineOption("foldGutter",!1,(function(t,r,i){i&&i!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",s),t.off("changes",u),t.off("viewportChange",c),t.off("fold",f),t.off("unfold",f),t.off("swapDoc",u)),r&&(t.state.foldGutter=new n(function(e){!0===e&&(e={});null==e.gutter&&(e.gutter="CodeMirror-foldgutter");null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open");null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded");return e}(r)),a(t),t.on("gutterClick",s),t.on("changes",u),t.on("viewportChange",c),t.on("fold",f),t.on("unfold",f),t.on("swapDoc",u))}));var t=e.Pos;function n(e){this.options=e,this.from=this.to=0}function r(e,n){for(var r=e.findMarks(t(n,0),t(n+1,0)),i=0;i<r.length;++i)if(r[i].__isFold){var o=r[i].find(-1);if(o&&o.line===n)return r[i]}}function i(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function o(e,n,o){var a=e.state.foldGutter.options,s=n-1,u=e.foldOption(a,"minFoldSize"),c=e.foldOption(a,"rangeFinder"),f="string"==typeof a.indicatorFolded&&l(a.indicatorFolded),d="string"==typeof a.indicatorOpen&&l(a.indicatorOpen);e.eachLine(n,o,(function(n){++s;var o=null,l=n.gutterMarkers;if(l&&(l=l[a.gutter]),r(e,s)){if(f&&l&&f.test(l.className))return;o=i(a.indicatorFolded)}else{var h=t(s,0),p=c&&c(e,h);if(p&&p.to.line-p.from.line>=u){if(d&&l&&d.test(l.className))return;o=i(a.indicatorOpen)}}(o||l)&&e.setGutterMarker(n,a.gutter,o)}))}function l(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function a(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation((function(){o(e,t.from,t.to)})),n.from=t.from,n.to=t.to)}function s(e,n,i){var o=e.state.foldGutter;if(o){var l=o.options;if(i==l.gutter){var a=r(e,n);a?a.clear():e.foldCode(t(n,0),l)}}}function u(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){a(e)}),n.foldOnChangeTimeSpan||600)}}function c(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?a(e):e.operation((function(){n.from<t.from&&(o(e,n.from,t.from),t.from=n.from),n.to>t.to&&(o(e,t.to,n.to),t.to=n.to)}))}),n.updateViewportTimeSpan||400)}}function f(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r<n.to&&o(e,r,r+1)}}})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){e.registerHelper("fold","brace",(function(t,n){var r,i=n.line,o=t.getLine(i);function l(l){for(var a=n.ch,s=0;;){var u=a<=0?-1:o.lastIndexOf(l,a-1);if(-1!=u){if(1==s&&u<n.ch)break;if(r=t.getTokenTypeAt(e.Pos(i,u+1)),!/^(comment|string)/.test(r))return u+1;a=u-1}else{if(1==s)break;s=1,a=o.length}}}var a="{",s="}",u=l("{");if(null==u&&(a="[",s="]",u=l("[")),null!=u){var c,f,d=1,h=t.lastLine();e:for(var p=i;p<=h;++p)for(var g=t.getLine(p),m=p==i?u:0;;){var v=g.indexOf(a,m),y=g.indexOf(s,m);if(v<0&&(v=g.length),y<0&&(y=g.length),(m=Math.min(v,y))==g.length)break;if(t.getTokenTypeAt(e.Pos(p,m+1))==r)if(m==v)++d;else if(!--d){c=p,f=m;break e}++m}if(null!=c&&i!=c)return{from:e.Pos(i,u),to:e.Pos(c,f)}}})),e.registerHelper("fold","import",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var i=n,o=Math.min(t.lastLine(),n+10);i<=o;++i){var l=t.getLine(i).indexOf(";");if(-1!=l)return{startCh:r.end,end:e.Pos(i,l)}}}var i,o=n.line,l=r(o);if(!l||r(o-1)||(i=r(o-2))&&i.end.line==o-1)return null;for(var a=l.end;;){var s=r(a.line+1);if(null==s)break;a=s.end}return{from:t.clipPos(e.Pos(o,l.startCh+1)),to:a}})),e.registerHelper("fold","include",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var i=n.line,o=r(i);if(null==o||null!=r(i-1))return null;for(var l=i;;){if(null==r(l+1))break;++l}return{from:e.Pos(i,o+1),to:t.clipPos(e.Pos(l))}}))}));
@@ -0,0 +1 @@
1
+ import*as RootModule from'../root/root.js';RootModule.Runtime.cachedResources.set("cm/codemirror.css","/* The rest of this file contains styles related to the mechanics of\n the editor. You probably shouldn't touch them. */\n\n.CodeMirror {\n position: relative;\n overflow: hidden;\n background: var(--color-background);\n}\n\n.CodeMirror-scroll {\n overflow: scroll !important; /* Things will break if this is overridden */\n /* 50px is the magic margin used to hide the element's real scrollbars */\n /* See overflow: hidden in .CodeMirror */\n margin-bottom: -50px; margin-right: -50px;\n padding-bottom: 50px;\n height: 100%;\n outline: none; /* Prevent dragging from highlighting the element */\n position: relative;\n}\n.CodeMirror-sizer {\n position: relative;\n border-right: 50px solid transparent;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n before actual scrolling happens, thus preventing shaking and\n flickering artifacts. */\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n position: absolute;\n z-index: 6;\n display: none;\n outline: none;\n}\n.CodeMirror-vscrollbar {\n right: 0; top: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n.CodeMirror-hscrollbar {\n bottom: 0; left: 0;\n overflow-y: hidden;\n overflow-x: scroll;\n}\n.CodeMirror-scrollbar-filler {\n right: 0; bottom: 0;\n}\n.CodeMirror-gutter-filler {\n left: 0; bottom: 0;\n}\n\n.CodeMirror-gutters {\n position: absolute; left: 0; top: 0;\n min-height: 100%;\n z-index: 3;\n}\n.CodeMirror-gutter {\n white-space: normal;\n height: 100%;\n display: inline-block;\n vertical-align: top;\n margin-bottom: -50px;\n}\n.CodeMirror-gutter-wrapper {\n position: absolute;\n z-index: 4;\n background: none !important;\n border: none !important;\n}\n.CodeMirror-gutter-background {\n position: absolute;\n top: 0; bottom: 0;\n z-index: 4;\n}\n.CodeMirror-gutter-elt {\n position: absolute;\n cursor: default;\n z-index: 4;\n}\n.CodeMirror-gutter-wrapper ::selection { background-color: transparent }\n.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }\n\n.CodeMirror-lines {\n cursor: text;\n min-height: 1px; /* prevents collapsing before first draw */\n}\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n /* Reset some styles that the rest of the page might have set */\n -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;\n border-width: 0;\n background: transparent;\n font-family: inherit;\n font-size: inherit;\n margin: 0;\n white-space: pre;\n word-wrap: normal;\n line-height: inherit;\n color: inherit;\n z-index: 2;\n position: relative;\n overflow: visible;\n -webkit-tap-highlight-color: transparent;\n -webkit-font-variant-ligatures: contextual;\n font-variant-ligatures: contextual;\n}\n.CodeMirror-wrap pre.CodeMirror-line,\n.CodeMirror-wrap pre.CodeMirror-line-like {\n word-wrap: break-word;\n white-space: pre-wrap;\n word-break: normal;\n}\n\n.CodeMirror-linebackground {\n position: absolute;\n left: 0; right: 0; top: 0; bottom: 0;\n z-index: 0;\n}\n\n.CodeMirror-linewidget {\n position: relative;\n z-index: 2;\n padding: 0.1px; /* Force widget margins to stay inside of the container */\n}\n\n.CodeMirror-widget {}\n\n.CodeMirror-rtl pre { direction: rtl; }\n\n.CodeMirror-code {\n outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n}\n\n.CodeMirror-measure {\n position: absolute;\n width: 100%;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n}\n\n.CodeMirror-cursor {\n position: absolute;\n pointer-events: none;\n}\n.CodeMirror-measure pre { position: static; }\n\ndiv.CodeMirror-cursors {\n visibility: hidden;\n position: relative;\n z-index: 3;\n}\ndiv.CodeMirror-dragcursors {\n visibility: visible;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n visibility: visible;\n}\n\n.CodeMirror-selected { background: #d9d9d9; }\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n.CodeMirror-crosshair { cursor: crosshair; }\n.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n\n.cm-searching {\n background-color: #ffa;\n background-color: rgba(255, 255, 0, .4);\n}\n\n/* Used to force a border model for a node */\n.cm-force-border { padding-right: .1px; }\n\n@media print {\n /* Hide the cursor when printing */\n .CodeMirror div.CodeMirror-cursors {\n visibility: hidden;\n }\n}\n\n/* See issue #2901 */\n.cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\nspan.CodeMirror-selectedtext { background: none; }\n\n/*# sourceURL=cm/codemirror.css */");
@@ -0,0 +1 @@
1
+ !function(){function t(t,e,r){for(var n in e||(e={}),t)!t.hasOwnProperty(n)||!1===r&&e.hasOwnProperty(n)||(e[n]=t[n]);return e}function e(t,e,r,n,i){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var o=n||0,s=i||0;;){var a=t.indexOf("\t",o);if(a<0||a>=e)return s+(e-o);s+=a-o,s+=r-s%r,o=a+1}}function r(){}var n=function(t,e,r){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};n.prototype.eol=function(){return this.pos>=this.string.length},n.prototype.sol=function(){return this.pos==this.lineStart},n.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},n.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},n.prototype.eat=function(t){var e=this.string.charAt(this.pos);if("string"==typeof t?e==t:e&&(t.test?t.test(e):t(e)))return++this.pos,e},n.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},n.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},n.prototype.skipToEnd=function(){this.pos=this.string.length},n.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},n.prototype.backUp=function(t){this.pos-=t},n.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=e(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?e(this.string,this.lineStart,this.tabSize):0)},n.prototype.indentation=function(){return e(this.string,null,this.tabSize)-(this.lineStart?e(this.string,this.lineStart,this.tabSize):0)},n.prototype.match=function(t,e,r){if("string"!=typeof t){var n=this.string.slice(this.pos).match(t);return n&&n.index>0?null:(n&&!1!==e&&(this.pos+=n[0].length),n)}var i=function(t){return r?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},n.prototype.current=function(){return this.string.slice(this.start,this.pos)},n.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},n.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},n.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var i={},o={};function s(e){if("string"==typeof e&&o.hasOwnProperty(e))e=o[e];else if(e&&"string"==typeof e.name&&o.hasOwnProperty(e.name)){var n=o[e.name];"string"==typeof n&&(n={name:n}),i=n,a=e,Object.create?p=Object.create(i):(r.prototype=i,p=new r),a&&t(a,p),(e=p).name=n.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return s("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return s("application/json")}var i,a,p;return"string"==typeof e?{name:e}:e||{name:"null"}}var a={};var p,l={__proto__:null,modes:i,mimeModes:o,defineMode:function(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),i[t]=e},defineMIME:function(t,e){o[t]=e},resolveMode:s,getMode:function t(e,r){r=s(r);var n=i[r.name];if(!n)return t(e,"text/plain");var o=n(e,r);if(a.hasOwnProperty(r.name)){var p=a[r.name];for(var l in p)p.hasOwnProperty(l)&&(o.hasOwnProperty(l)&&(o["_"+l]=o[l]),o[l]=p[l])}if(o.name=r.name,r.helperType&&(o.helperType=r.helperType),r.modeProps)for(var u in r.modeProps)o[u]=r.modeProps[u];return o},modeExtensions:a,extendMode:function(e,r){t(r,a.hasOwnProperty(e)?a[e]:a[e]={})},copyState:function(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var r={};for(var n in e){var i=e[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r},innerMode:function(t,e){for(var r;t.innerMode&&(r=t.innerMode(e))&&r.mode!=t;)e=r.state,t=r.mode;return r||{mode:t,state:e}},startState:function(t,e,r){return!t.startState||t.startState(e,r)}},u="undefined"!=typeof globalThis?globalThis:window;for(var h in u.CodeMirror={},CodeMirror.StringStream=n,l)CodeMirror[h]=l[h];CodeMirror.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),CodeMirror.defineMIME("text/plain","null"),CodeMirror.registerHelper=CodeMirror.registerGlobalHelper=Math.min,CodeMirror.splitLines=function(t){return t.split(/\r?\n|\r/)},CodeMirror.defaults={indentUnit:2},p=function(t){t.runMode=function(e,r,n,i){var o=t.getMode(t.defaults,r),s=i&&i.tabSize||t.defaults.tabSize;if(n.appendChild){var a=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<9),p=n,l=0;p.innerHTML="",n=function(t,e){if("\n"==t)return p.appendChild(document.createTextNode(a?"\r":t)),void(l=0);for(var r="",n=0;;){var i=t.indexOf("\t",n);if(-1==i){r+=t.slice(n),l+=t.length-n;break}l+=i-n,r+=t.slice(n,i);var o=s-l%s;l+=o;for(var u=0;u<o;++u)r+=" ";n=i+1}if(e){var h=p.appendChild(document.createElement("span"));h.className="cm-"+e.replace(/ +/g," cm-"),h.appendChild(document.createTextNode(r))}else p.appendChild(document.createTextNode(r))}}for(var u=t.splitLines(e),h=i&&i.state||t.startState(o),f=0,c=u.length;f<c;++f){f&&n("\n");var d=new t.StringStream(u[f],null,{lookAhead:function(t){return u[f+t]},baseToken:function(){}});for(!d.string&&o.blankLine&&o.blankLine(h);!d.eol();){var m=o.token(d,h);n(d.current(),m,f,d.start,h),d.start=d.pos}}}},"object"==typeof exports&&"object"==typeof module?p(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],p):p(CodeMirror)}();
@@ -0,0 +1 @@
1
+ import{ContrastDetails as r,ContrastInfo as o,ContrastOverlay as e,Spectrum as t}from"./color_picker.js";self.ColorPicker=self.ColorPicker||{},ColorPicker=ColorPicker||{},ColorPicker.ContrastDetails=r.ContrastDetails,ColorPicker.ContrastDetails.Events=r.Events,ColorPicker.ContrastDetails.Swatch=r.Swatch,ColorPicker.ContrastInfo=o.ContrastInfo,ColorPicker.ContrastInfo.Events=o.Events,ColorPicker.ContrastOverlay=e.ContrastOverlay,ColorPicker.ContrastRatioLineBuilder=e.ContrastRatioLineBuilder,ColorPicker.Spectrum=t.Spectrum,ColorPicker.Spectrum.PaletteGenerator=t.PaletteGenerator,ColorPicker.Spectrum.Swatch=t.Swatch,ColorPicker.Spectrum.Events=t.Events,ColorPicker.Spectrum._ChangeSource=t.ChangeSource;