@mdn/fred 2.0.2 → 2.1.0

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 (186) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/components/about-tabs/element.css +3 -2
  3. package/components/scrim-inline/element.css +0 -7
  4. package/components/scrim-inline/global.css +10 -0
  5. package/components/social-image/README.md +16 -0
  6. package/components/social-image/sandbox.js +23 -0
  7. package/components/social-image/server.css +28 -0
  8. package/components/social-image/server.js +13 -0
  9. package/l10n/fluent.js +8 -7
  10. package/out/service-worker.js +1 -1
  11. package/out/service-worker.js.map +1 -1
  12. package/out/static/client/5183.ed3575d7370b617c.js +64 -0
  13. package/out/static/client/5183.ed3575d7370b617c.js.map +1 -0
  14. package/out/static/client/7047.7084b7bcf9a47b7b.js +9 -0
  15. package/out/static/client/7047.7084b7bcf9a47b7b.js.map +1 -0
  16. package/out/static/client/{8292.88217634072b2959.js → 8292.5a4929a466c7b3ca.js} +2 -2
  17. package/out/static/client/{8292.88217634072b2959.js.map → 8292.5a4929a466c7b3ca.js.map} +1 -1
  18. package/out/static/client/{index.a7f592ef6e4f2a0e.js → index.0e1f202766cdb426.js} +3 -3
  19. package/out/static/client/{index.a7f592ef6e4f2a0e.js.map → index.0e1f202766cdb426.js.map} +1 -1
  20. package/out/static/client/{runtime.14f0bbf7912ff6c2.js → runtime.076e84c93222dfd0.js} +2 -2
  21. package/out/static/client/{runtime.14f0bbf7912ff6c2.js.map → runtime.076e84c93222dfd0.js.map} +1 -1
  22. package/out/static/client/stats.json +319 -283
  23. package/out/static/client/styles-a11y-menu.bf24a870a8a4969f.js +1 -0
  24. package/out/static/client/styles-advertising.9f2b7bddc08575fc.js +1 -0
  25. package/out/static/client/styles-article-footer.aa9f8d240980b0f4.js +1 -0
  26. package/out/static/client/styles-banner.e738836bac789a8b.js +1 -0
  27. package/out/static/client/styles-baseline-indicator.c062716f3d033dd8.js +1 -0
  28. package/out/static/client/styles-blog-index.818261c8123bc042.js +1 -0
  29. package/out/static/client/styles-blog-post.96ce1680245bbc86.js +1 -0
  30. package/out/static/client/styles-breadcrumbs-bar.ed7d1440bdccf98f.js +1 -0
  31. package/out/static/client/styles-breadcrumbs.7599a269dc584d75.js +1 -0
  32. package/out/static/client/styles-button.de6a7b9b7548d84b.js +1 -0
  33. package/out/static/client/styles-content-section.a8bd7fde04898354.js +1 -0
  34. package/out/static/client/styles-contributor-spotlight.adad2e813e1667fe.js +1 -0
  35. package/out/static/client/styles-curriculum-about.eefa128bb415258c.js +1 -0
  36. package/out/static/client/styles-curriculum-default.a2692218d2b1a1f9.js +1 -0
  37. package/out/static/client/styles-curriculum-landing.2d51b8fce8f12b8d.js +1 -0
  38. package/out/static/client/styles-curriculum-module.f4ae8920ee1c92ff.js +1 -0
  39. package/out/static/client/styles-curriculum-overview.2d7c17b0f0b9bd92.js +1 -0
  40. package/out/static/client/styles-featured-articles.c54e8f6b90567441.js +1 -0
  41. package/out/static/client/styles-footer.cff8d2b7669e06a9.js +1 -0
  42. package/out/static/client/styles-generic-about.b31b672a5d394108.js +1 -0
  43. package/out/static/client/styles-generic-community.f7e5df670c7aeaf3.js +1 -0
  44. package/out/static/client/styles-generic-content.1a9e4b87d8a12a85.js +1 -0
  45. package/out/static/client/styles-generic-layout.76e37948146a2f39.js +1 -0
  46. package/out/static/client/styles-generic-sidebar.c07d266d1382c357.js +1 -0
  47. package/out/static/client/styles-generic-toc.342bb77a42e3cc84.js +1 -0
  48. package/out/static/client/{styles-global.e813b635d036a38b.css → styles-global.63980d9c69df1f6a.css} +2 -2
  49. package/out/static/client/{styles-global.e813b635d036a38b.css.map → styles-global.63980d9c69df1f6a.css.map} +1 -1
  50. package/out/static/client/styles-global.c2e6118d3b833b4a.js +1 -0
  51. package/out/static/client/styles-heading-anchor.79390408a0c88875.js +1 -0
  52. package/out/static/client/styles-homepage-body.20c015a218d0bc96.js +1 -0
  53. package/out/static/client/styles-homepage-contributor-spotlight.21f37f11b3bd4bda.js +1 -0
  54. package/out/static/client/styles-homepage-footer.24e66b627b59d99f.js +1 -0
  55. package/out/static/client/styles-homepage-header.1a75fa94f8bab5a0.js +1 -0
  56. package/out/static/client/styles-homepage-hero.f1bf55f1be2d516d.js +1 -0
  57. package/out/static/client/styles-homepage.cd5bf6213bc06b4e.js +1 -0
  58. package/out/static/client/styles-latest-news.0f32a584ef1ed171.js +1 -0
  59. package/out/static/client/styles-left-sidebar.d7d52289da7ba969.js +1 -0
  60. package/out/static/client/styles-logo.1ff82941fc133017.js +1 -0
  61. package/out/static/client/styles-mandala.2a99de27a8c19d02.js +1 -0
  62. package/out/static/client/styles-menu.13c3394ada0512ef.js +1 -0
  63. package/out/static/client/styles-navigation.f857f577084aa7ef.js +1 -0
  64. package/out/static/client/styles-not-found.0bdc6a72643ebe34.js +1 -0
  65. package/out/static/client/styles-observatory-landing.e709efc8103ee08c.js +1 -0
  66. package/out/static/client/styles-observatory-results.e098740504c0c0f0.js +1 -0
  67. package/out/static/client/styles-page-layout.2ab75fc5b95edf1b.js +1 -0
  68. package/out/static/client/styles-pagination.667a2af3eaebe782.js +1 -0
  69. package/out/static/client/styles-playground.c1339745dabdf1f6.js +1 -0
  70. package/out/static/client/styles-recent-contributions.706333df420f227c.js +1 -0
  71. package/out/static/client/styles-reference-layout.6eaaea648e7e4dce.js +1 -0
  72. package/out/static/client/styles-reference-toc.dcb67aadb5032e3f.js +1 -0
  73. package/out/static/client/styles-sandbox.c14203f7b76d9e70.js +1 -0
  74. package/out/static/client/styles-site-search.ba674569591c3348.js +1 -0
  75. package/out/static/client/styles-social-image.47d082e57762bfb4.css +2 -0
  76. package/out/static/client/styles-social-image.47d082e57762bfb4.css.map +1 -0
  77. package/out/static/client/styles-social-image.f457942a12584899.js +1 -0
  78. package/out/static/client/styles-translation-banner.c0bf41a60bc2fe87.js +1 -0
  79. package/out/static/client/styles-writer-toolbar.e7438b6d8e7c99f4.js +1 -0
  80. package/out/static/client/{styles.519e2a3b2b0392d7.js → styles.cbf2ca4b84823096.js} +2 -2
  81. package/out/static/client/{styles.519e2a3b2b0392d7.js.map → styles.cbf2ca4b84823096.js.map} +1 -1
  82. package/out/static/legacy/{145.f57152daa80bc354.js → 145.e71ec0c1d16bfeb6.js} +2 -2
  83. package/out/static/legacy/{145.f57152daa80bc354.js.map → 145.e71ec0c1d16bfeb6.js.map} +1 -1
  84. package/out/static/legacy/{2439.db04dec0f2bfe008.js → 2439.152ddc8eff5390cc.js} +2 -2
  85. package/out/static/legacy/{2439.db04dec0f2bfe008.js.map → 2439.152ddc8eff5390cc.js.map} +1 -1
  86. package/out/static/legacy/{2569.2ed6f988d52f6cb2.js → 2569.41b52dfae9ff5dbd.js} +2 -2
  87. package/out/static/legacy/{2569.2ed6f988d52f6cb2.js.map → 2569.41b52dfae9ff5dbd.js.map} +1 -1
  88. package/out/static/legacy/{3097.5ee3eace96d8c3ea.js → 3097.89f8c27a39d2d759.js} +2 -2
  89. package/out/static/legacy/{3097.5ee3eace96d8c3ea.js.map → 3097.89f8c27a39d2d759.js.map} +1 -1
  90. package/out/static/legacy/{4624.5f395686fe61b4a3.js → 4624.831090754998070f.js} +2 -2
  91. package/out/static/legacy/{4624.5f395686fe61b4a3.js.map → 4624.831090754998070f.js.map} +1 -1
  92. package/out/static/legacy/{4944.dff54c3109113729.js → 4944.d5de2520acb6bc03.js} +2 -2
  93. package/out/static/legacy/{4944.dff54c3109113729.js.map → 4944.d5de2520acb6bc03.js.map} +1 -1
  94. package/out/static/legacy/{4968.12b8af0a52d054ac.js → 4968.c5c0429688b49438.js} +2 -2
  95. package/out/static/legacy/{4968.12b8af0a52d054ac.js.map → 4968.c5c0429688b49438.js.map} +1 -1
  96. package/out/static/legacy/{652.702c9f7893508b7f.js → 652.984bbafca5a127d6.js} +2 -2
  97. package/out/static/legacy/{652.702c9f7893508b7f.js.map → 652.984bbafca5a127d6.js.map} +1 -1
  98. package/out/static/legacy/{6542.8f8dc41c1b7b4f3d.js → 6542.9ae1d636a2097c7a.js} +2 -2
  99. package/out/static/legacy/{6542.8f8dc41c1b7b4f3d.js.map → 6542.9ae1d636a2097c7a.js.map} +1 -1
  100. package/out/static/legacy/{6786.d37ed4aa6d7a5c1a.js → 6786.c180a40232e02d98.js} +3 -3
  101. package/out/static/legacy/{6786.d37ed4aa6d7a5c1a.js.map → 6786.c180a40232e02d98.js.map} +1 -1
  102. package/out/static/legacy/{8292.88217634072b2959.js → 8292.5a4929a466c7b3ca.js} +2 -2
  103. package/out/static/legacy/{8292.88217634072b2959.js.map → 8292.5a4929a466c7b3ca.js.map} +1 -1
  104. package/out/static/legacy/{8315.525575601119f224.js → 8315.732f4f8af2f04044.js} +2 -2
  105. package/out/static/legacy/{8315.525575601119f224.js.map → 8315.732f4f8af2f04044.js.map} +1 -1
  106. package/out/static/legacy/{8769.d63b4369d16f3391.js → 8769.c0eb10a75d355ed3.js} +2 -2
  107. package/out/static/legacy/{8769.d63b4369d16f3391.js.map → 8769.c0eb10a75d355ed3.js.map} +1 -1
  108. package/out/static/legacy/{9380.d18451f1d350375d.js → 9380.2e09c0a94dc10112.js} +2 -2
  109. package/out/static/legacy/{9380.d18451f1d350375d.js.map → 9380.2e09c0a94dc10112.js.map} +1 -1
  110. package/out/static/legacy/asset-manifest.json +20 -20
  111. package/out/static/legacy/{index.0b85877f879160b2.js → index.5e65b9f52e86ad40.js} +5 -5
  112. package/out/static/legacy/{index.0b85877f879160b2.js.LICENSE.txt → index.5e65b9f52e86ad40.js.LICENSE.txt} +1 -1
  113. package/out/static/legacy/{index.0b85877f879160b2.js.map → index.5e65b9f52e86ad40.js.map} +1 -1
  114. package/out/static/legacy/{index.645247acbde1c666.html → index.6838304b64f32836.html} +1 -1
  115. package/out/static/legacy/stats.json +14 -14
  116. package/out/static/legacy/{yari.46e28128e98126d7.js → yari.c8f274d3a31b194e.js} +6 -6
  117. package/out/static/legacy/{yari.46e28128e98126d7.js.LICENSE.txt → yari.c8f274d3a31b194e.js.LICENSE.txt} +1 -1
  118. package/out/static/legacy/{yari.46e28128e98126d7.js.map → yari.c8f274d3a31b194e.js.map} +1 -1
  119. package/out/static/ssr/8292.js +1 -1
  120. package/out/static/ssr/8292.js.map +1 -1
  121. package/out/static/ssr/index.js +149 -142
  122. package/out/static/ssr/index.js.map +1 -1
  123. package/out/static/ssr/stats.json +4 -4
  124. package/out/twitter-card-summary.46ac2375.png +0 -0
  125. package/package.json +16 -15
  126. package/public/twitter-card-summary.46ac2375.png +0 -0
  127. package/server.js +12 -1
  128. package/out/static/client/5183.e4104aeffa888fd3.js +0 -64
  129. package/out/static/client/5183.e4104aeffa888fd3.js.map +0 -1
  130. package/out/static/client/7047.5a3c9165bf33e8ef.js +0 -9
  131. package/out/static/client/7047.5a3c9165bf33e8ef.js.map +0 -1
  132. package/out/static/client/styles-a11y-menu.49f604eb400e3a1b.js +0 -1
  133. package/out/static/client/styles-advertising.206d401ac1918107.js +0 -1
  134. package/out/static/client/styles-article-footer.bf7a12a8f26de9d8.js +0 -1
  135. package/out/static/client/styles-banner.045fd9429c0b4559.js +0 -1
  136. package/out/static/client/styles-baseline-indicator.1a9a989c5eed2bd0.js +0 -1
  137. package/out/static/client/styles-blog-index.07075fbe70ea701a.js +0 -1
  138. package/out/static/client/styles-blog-post.f096d7b72acc54c7.js +0 -1
  139. package/out/static/client/styles-breadcrumbs-bar.b6d2903779905507.js +0 -1
  140. package/out/static/client/styles-breadcrumbs.7b6a3fca16762395.js +0 -1
  141. package/out/static/client/styles-button.68557b262acc04d5.js +0 -1
  142. package/out/static/client/styles-content-section.8b58198fcbb512cd.js +0 -1
  143. package/out/static/client/styles-contributor-spotlight.65897b7d1c3de5e6.js +0 -1
  144. package/out/static/client/styles-curriculum-about.013603624423e8b7.js +0 -1
  145. package/out/static/client/styles-curriculum-default.8d3cc74e416d99c0.js +0 -1
  146. package/out/static/client/styles-curriculum-landing.95ce2c9c6203fda2.js +0 -1
  147. package/out/static/client/styles-curriculum-module.6bd730e94b6ab4b0.js +0 -1
  148. package/out/static/client/styles-curriculum-overview.31fd536067fb14e7.js +0 -1
  149. package/out/static/client/styles-featured-articles.122a3779cde55236.js +0 -1
  150. package/out/static/client/styles-footer.fedc4476f04ebc15.js +0 -1
  151. package/out/static/client/styles-generic-about.7e63ff8a4b7851ef.js +0 -1
  152. package/out/static/client/styles-generic-community.dae09a544431e63d.js +0 -1
  153. package/out/static/client/styles-generic-content.16d08aa39ea401b9.js +0 -1
  154. package/out/static/client/styles-generic-layout.3e4f2f4951ea186b.js +0 -1
  155. package/out/static/client/styles-generic-sidebar.b2e094fc3c0756ab.js +0 -1
  156. package/out/static/client/styles-generic-toc.cd70dab26a1241d4.js +0 -1
  157. package/out/static/client/styles-global.339e7f9a94da6256.js +0 -1
  158. package/out/static/client/styles-heading-anchor.0deb48e0e151aba3.js +0 -1
  159. package/out/static/client/styles-homepage-body.cb1b213bec93efdd.js +0 -1
  160. package/out/static/client/styles-homepage-contributor-spotlight.1a2acbf06be6d425.js +0 -1
  161. package/out/static/client/styles-homepage-footer.3435c9576666f4a5.js +0 -1
  162. package/out/static/client/styles-homepage-header.6a6b4ebaf675e721.js +0 -1
  163. package/out/static/client/styles-homepage-hero.de64115a608af810.js +0 -1
  164. package/out/static/client/styles-homepage.09583f85e229d2de.js +0 -1
  165. package/out/static/client/styles-latest-news.d7d8beb1f187d6f5.js +0 -1
  166. package/out/static/client/styles-left-sidebar.62e4bdb34c86bc43.js +0 -1
  167. package/out/static/client/styles-logo.15608a14aefd9e51.js +0 -1
  168. package/out/static/client/styles-mandala.18c6e16ec318e10a.js +0 -1
  169. package/out/static/client/styles-menu.8011e6627accb1f3.js +0 -1
  170. package/out/static/client/styles-navigation.507be0a6a4278751.js +0 -1
  171. package/out/static/client/styles-not-found.5abe16a37f65b63a.js +0 -1
  172. package/out/static/client/styles-observatory-landing.2bda92fc6d68c4fc.js +0 -1
  173. package/out/static/client/styles-observatory-results.090bb92b82d036eb.js +0 -1
  174. package/out/static/client/styles-page-layout.ca4cbe58578a57eb.js +0 -1
  175. package/out/static/client/styles-pagination.cacd3f49e3de0552.js +0 -1
  176. package/out/static/client/styles-playground.1c172c9a3a8d9b79.js +0 -1
  177. package/out/static/client/styles-recent-contributions.45d4f26778c7ba5b.js +0 -1
  178. package/out/static/client/styles-reference-layout.d26c1e2e7b6dcf90.js +0 -1
  179. package/out/static/client/styles-reference-toc.bb1b05755fbc1108.js +0 -1
  180. package/out/static/client/styles-sandbox.a14cc003eeaa8914.js +0 -1
  181. package/out/static/client/styles-site-search.76d1310c8fe1b8fb.js +0 -1
  182. package/out/static/client/styles-translation-banner.c9804ae977f28550.js +0 -1
  183. package/out/static/client/styles-writer-toolbar.e88f55bfa22d6f0e.js +0 -1
  184. /package/out/static/client/{5183.e4104aeffa888fd3.js.LICENSE.txt → 5183.ed3575d7370b617c.js.LICENSE.txt} +0 -0
  185. /package/out/static/client/{index.a7f592ef6e4f2a0e.js.LICENSE.txt → index.0e1f202766cdb426.js.LICENSE.txt} +0 -0
  186. /package/out/static/legacy/{6786.d37ed4aa6d7a5c1a.js.LICENSE.txt → 6786.c180a40232e02d98.js.LICENSE.txt} +0 -0
@@ -1,3 +1,3 @@
1
- /*! For license information please see 6786.d37ed4aa6d7a5c1a.js.LICENSE.txt */
2
- export const __rspack_esm_id="6786";export const __rspack_esm_ids=["6786"];export const __webpack_modules__={92849(e){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},o=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),l=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!l)return!1;for(r in e);return void 0===r||t.call(e,r)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;else if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,f=arguments[0],p=1,d=arguments.length,h=!1;for("boolean"==typeof f&&(h=f,f=arguments[1]||{},p=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});p<d;++p)if(t=arguments[p],null!=t)for(n in t)r=s(f,n),f!==(i=s(t,n))&&(h&&i&&(o(i)||(u=l(i)))?(u?(u=!1,c=r&&l(r)?r:[]):c=r&&o(r)?r:{},a(f,{name:n,newValue:e(h,c,i)})):void 0!==i&&a(f,{name:n,newValue:i}));return f}},19788(e){var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g;function u(e){return e?e.replace(s,""):""}e.exports=function(e,s){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];s=s||{};var c=1,f=1;function p(e){var t=e.match(n);t&&(c+=t.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function d(){var e={line:c,column:f};return function(t){return t.position=new h(e),y(r),t}}function h(e){this.start=e,this.end={line:c,column:f},this.source=s.source}h.prototype.content=e;var m=[];function g(t){var n=Error(s.source+":"+c+":"+f+": "+t);if(n.reason=t,n.filename=s.source,n.line=c,n.column=f,n.source=e,s.silent)m.push(n);else throw n}function y(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function v(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=d();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return f+=2,p(r),e=e.slice(n),f+=2,t({type:"comment",comment:r})}}y(r);var k,x=[];for(v(x);k=function(){var e=d(),n=y(i);if(n){if(b(),!y(l))return g("property missing ':'");var r=y(o),s=e({type:"declaration",property:u(n[0].replace(t,"")),value:r?u(r[0].replace(t,"")):""});return y(a),s}}();)!1!==k&&(x.push(k),v(x));return x}},29698(e,t){var n=Symbol.for("react.transitional.element");function r(e,t,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),"key"in t)for(var l in r={},t)"key"!==l&&(r[l]=t[l]);else r=t;return{$$typeof:n,type:e,key:i,ref:void 0!==(t=r.ref)?t:null,props:r}}t.Fragment=Symbol.for("react.fragment"),t.jsx=r,t.jsxs=r},74848(e,t,n){e.exports=n(29698)},35229(e,t,n){var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(51133)),i=n(98917);function l(e,t){var n={};return e&&"string"==typeof e&&(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}l.default=l,e.exports=l},98917(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,i=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){var u;return(void 0===t&&(t={}),!(u=e)||i.test(u)||n.test(u))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(o,s):e.replace(l,s)).replace(r,a))}},51133(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,i.default)(e),l="function"==typeof t;return r.forEach(function(e){if("declaration"===e.type){var r=e.property,i=e.value;l?t(r,i,e):i&&((n=n||{})[r]=i)}}),n};var i=r(n(19788))},62074(e,t,n){n.d(t,{G:()=>v,_:()=>m});var r=n(96540),i=n(97478),l=n(31256),o=n(5438),a=n(49351),s=n(79428),u=n(1086),c=n(2181),f=n(96540);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return p(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){var t=e.gleanContext,n=e.item,r=n.id,i=n.key,l=n.lang,o=e.unqueue,u=(0,c.db)(),p=(0,s.Ed)().setHighlightedQueueExample,d=function(){var e,t=document.getElementById(r);return null==t||null==(e=t.parentElement)?void 0:e.parentElement},h=function(e){p&&(e?p(r):p(null))},m=function(){var e=d(),t=((null==e?void 0:e.getBoundingClientRect().top)||0)+window.scrollY-130;window.scrollTo({top:t,behavior:"smooth"})};return f.createElement("li",{key:i,onMouseEnter:function(){return h(!0)},onMouseLeave:function(){return h(!1)}},f.createElement("button",{className:"queue-ref",onClick:function(){u("".concat(t,": queue item -> ").concat(r)),m()}},"Example ",i+1),f.createElement("code",null,l),f.createElement(a.$,{type:"action",buttonType:"reset",icon:"trash",onClickHandler:function(){u("".concat(t,": queue dequeue -> ").concat(r)),o()}}))}function m(e){var t=e.gleanContext,n=void 0===t?u.aE:t,p=e.standalone,m=(0,o.Ym)(),y=(0,o.hX)(),b=(0,c.db)(),k=(0,s.Ed)(),x=k.queue,w=k.setQueue,E=(0,r.useCallback)(function(){var e=g();w(e.filter(function(e){return e.checked}).map(function(t){return v(t,e)}))},[w]);return(0,r.useEffect)(function(){var e=x.map(function(e){return e.id}),t=d(document.querySelectorAll(".playlist > input:checked")),n=!0,r=!1,i=void 0;try{for(var l,o=t[Symbol.iterator]();!(n=(l=o.next()).done);n=!0){var a=l.value;a.checked=e.includes(a.id)}}catch(e){r=!0,i=e}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}},[x]),(0,r.useEffect)(function(){y||(window.playQueue=E)},[E,y]),x.length?f.createElement("div",{className:"play-queue-container ".concat(void 0!==p&&p?"standalone":"")},f.createElement("aside",null,f.createElement("details",{className:"play-queue",open:!0},f.createElement("summary",null,f.createElement("div",null,"Queue")),f.createElement("div",{className:"play-queue-inner"},f.createElement("ul",null,x.map(function(e){return f.createElement(h,{gleanContext:n,key:e.key,item:e,unqueue:function(){return w(function(t){return t.filter(function(t){return t.id!==e.id})})}})})),f.createElement(a.$,{type:"secondary",extraClasses:"play-button",onClickHandler:function(e){b("".concat(n,": queue play ").concat(x.length));var t,r=(0,i.cb)();sessionStorage.setItem(l.FX,JSON.stringify(r));var o=new URL(null==(t=window)?void 0:t.location.href);o.pathname="/".concat(m,"/play"),o.hash="",o.search="",window.open(o,"_blank")}},"Play"))))):null}function g(){return d(document.querySelectorAll(".playlist > input"))}var y={javascript:"js"};function v(e,t){var n,r,i,l,o,a,s=(null!=(n=HTMLInputElement)&&"u">typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](e):e instanceof n)?e:document.getElementById(e);null!=t||(t=g());var u=t.indexOf(s),c=s.id,f=null!=(r=null==s||null==(a=s.closest(".example-header"))||null==(o=a.querySelector(".language-name"))||null==(l=o.textContent)?void 0:l.toLowerCase())?r:"";return{key:u,id:c,lang:null!=(i=y[f])?i:f}}},73215(e,t,n){n.r(t),n.d(t,{AIHelpInner:()=>lv,RoleIcon:()=>lb,default:()=>ld});var r,i,l,o,a,s,u,c,f,p,d,h,m,g,y,v,b={};n.r(b),n.d(b,{boolean:()=>T,booleanish:()=>L,commaOrSpaceSeparated:()=>j,commaSeparated:()=>R,number:()=>F,overloadedBoolean:()=>M,spaceSeparated:()=>N});var k={};n.r(k),n.d(k,{attentionMarkers:()=>tq,contentInitial:()=>tN,disable:()=>tU,document:()=>tF,flow:()=>tj,flowInitial:()=>tR,insideSpan:()=>tH,string:()=>t_,text:()=>tz});var x=n(96540);let w=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,E=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,S={};function C(e,t){return((t||S).jsx?E:w).test(e)}let I=/[ \t\n\f\r]/g;function A(e){return""===e.replace(I,"")}let Schema=class Schema{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};function D(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Schema(n,r,t)}function P(e){return e.toLowerCase()}Schema.prototype.normal={},Schema.prototype.property={},Schema.prototype.space=void 0;let Info=class Info{constructor(e,t){this.attribute=t,this.property=e}};Info.prototype.attribute="",Info.prototype.booleanish=!1,Info.prototype.boolean=!1,Info.prototype.commaOrSpaceSeparated=!1,Info.prototype.commaSeparated=!1,Info.prototype.defined=!1,Info.prototype.mustUseProperty=!1,Info.prototype.number=!1,Info.prototype.overloadedBoolean=!1,Info.prototype.property="",Info.prototype.spaceSeparated=!1,Info.prototype.space=void 0;let O=0,T=_(),L=_(),M=_(),F=_(),N=_(),R=_(),j=_();function _(){return 2**++O}let z=Object.keys(b);let DefinedInfo=class DefinedInfo extends Info{constructor(e,t,n,r){var i,l,o,a,s;let u=-1;if(super(e,t),i=this,(l=r)&&(i.space=l),"number"==typeof n)for(;++u<z.length;){let e=z[u];o=this,a=z[u],(s=(n&b[e])===b[e])&&(o[a]=s)}}};function H(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let l=new DefinedInfo(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[P(r)]=r,n[P(l.attribute)]=r}return new Schema(t,n,e.space)}DefinedInfo.prototype.defined=!0;let q=H({properties:{ariaActiveDescendant:null,ariaAtomic:L,ariaAutoComplete:null,ariaBusy:L,ariaChecked:L,ariaColCount:F,ariaColIndex:F,ariaColSpan:F,ariaControls:N,ariaCurrent:null,ariaDescribedBy:N,ariaDetails:null,ariaDisabled:L,ariaDropEffect:N,ariaErrorMessage:null,ariaExpanded:L,ariaFlowTo:N,ariaGrabbed:L,ariaHasPopup:null,ariaHidden:L,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:N,ariaLevel:F,ariaLive:null,ariaModal:L,ariaMultiLine:L,ariaMultiSelectable:L,ariaOrientation:null,ariaOwns:N,ariaPlaceholder:null,ariaPosInSet:F,ariaPressed:L,ariaReadOnly:L,ariaRelevant:null,ariaRequired:L,ariaRoleDescription:N,ariaRowCount:F,ariaRowIndex:F,ariaRowSpan:F,ariaSelected:L,ariaSetSize:F,ariaSort:null,ariaValueMax:F,ariaValueMin:F,ariaValueNow:F,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function U(e,t){return t in e?e[t]:t}function B(e,t){return U(e,t.toLowerCase())}let V=H({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:R,acceptCharset:N,accessKey:N,action:null,allow:null,allowFullScreen:T,allowPaymentRequest:T,allowUserMedia:T,alt:null,as:null,async:T,autoCapitalize:null,autoComplete:N,autoFocus:T,autoPlay:T,blocking:N,capture:null,charSet:null,checked:T,cite:null,className:N,cols:F,colSpan:null,content:null,contentEditable:L,controls:T,controlsList:N,coords:F|R,crossOrigin:null,data:null,dateTime:null,decoding:null,default:T,defer:T,dir:null,dirName:null,disabled:T,download:M,draggable:L,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:T,formTarget:null,headers:N,height:F,hidden:M,high:F,href:null,hrefLang:null,htmlFor:N,httpEquiv:N,id:null,imageSizes:null,imageSrcSet:null,inert:T,inputMode:null,integrity:null,is:null,isMap:T,itemId:null,itemProp:N,itemRef:N,itemScope:T,itemType:N,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:T,low:F,manifest:null,max:null,maxLength:F,media:null,method:null,min:null,minLength:F,multiple:T,muted:T,name:null,nonce:null,noModule:T,noValidate:T,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:T,optimum:F,pattern:null,ping:N,placeholder:null,playsInline:T,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:T,referrerPolicy:null,rel:N,required:T,reversed:T,rows:F,rowSpan:F,sandbox:N,scope:null,scoped:T,seamless:T,selected:T,shadowRootClonable:T,shadowRootDelegatesFocus:T,shadowRootMode:null,shape:null,size:F,sizes:null,slot:null,span:F,spellCheck:L,src:null,srcDoc:null,srcLang:null,srcSet:null,start:F,step:null,style:null,tabIndex:F,target:null,title:null,translate:null,type:null,typeMustMatch:T,useMap:null,value:L,width:F,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:N,axis:null,background:null,bgColor:null,border:F,borderColor:null,bottomMargin:F,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:T,declare:T,event:null,face:null,frame:null,frameBorder:null,hSpace:F,leftMargin:F,link:null,longDesc:null,lowSrc:null,marginHeight:F,marginWidth:F,noResize:T,noHref:T,noShade:T,noWrap:T,object:null,profile:null,prompt:null,rev:null,rightMargin:F,rules:null,scheme:null,scrolling:L,standby:null,summary:null,text:null,topMargin:F,valueType:null,version:null,vAlign:null,vLink:null,vSpace:F,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:T,disableRemotePlayback:T,prefix:null,property:null,results:F,security:null,unselectable:null},space:"html",transform:B}),$=H({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:j,accentHeight:F,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:F,amplitude:F,arabicForm:null,ascent:F,attributeName:null,attributeType:null,azimuth:F,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:F,by:null,calcMode:null,capHeight:F,className:N,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:F,diffuseConstant:F,direction:null,display:null,dur:null,divisor:F,dominantBaseline:null,download:T,dx:null,dy:null,edgeMode:null,editable:null,elevation:F,enableBackground:null,end:null,event:null,exponent:F,externalResourcesRequired:null,fill:null,fillOpacity:F,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:R,g2:R,glyphName:R,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:F,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:F,horizOriginX:F,horizOriginY:F,id:null,ideographic:F,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:F,k:F,k1:F,k2:F,k3:F,k4:F,kernelMatrix:j,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:F,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:F,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:F,overlineThickness:F,paintOrder:null,panose1:null,path:null,pathLength:F,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:N,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:F,pointsAtY:F,pointsAtZ:F,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:j,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:j,rev:j,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:j,requiredFeatures:j,requiredFonts:j,requiredFormats:j,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:F,specularExponent:F,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:F,strikethroughThickness:F,string:null,stroke:null,strokeDashArray:j,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:F,strokeOpacity:F,strokeWidth:null,style:null,surfaceScale:F,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:j,tabIndex:F,tableValues:null,target:null,targetX:F,targetY:F,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:j,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:F,underlineThickness:F,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:F,values:null,vAlphabetic:F,vMathematical:F,vectorEffect:null,vHanging:F,vIdeographic:F,version:null,vertAdvY:F,vertOriginX:F,vertOriginY:F,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:F,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:U}),Z=H({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),W=H({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:B}),Q=H({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),G=D([q,V,Z,W,Q],"html"),K=D([q,$,Z,W,Q],"svg"),Y=/[A-Z]/g,J=/-[a-z]/g,X=/^data[-\w.:]+$/i;function ee(e){return"-"+e.toLowerCase()}function et(e){return e.charAt(1).toUpperCase()}let en={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var er=n(35229);let ei=eo("end"),el=eo("start");function eo(e){return function(t){let n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function ea(e){return e&&"object"==typeof e?"position"in e||"type"in e?eu(e.position):"start"in e||"end"in e?eu(e):"line"in e||"column"in e?es(e):"":""}function es(e){return ec(e&&e.line)+":"+ec(e&&e.column)}function eu(e){return es(e&&e.start)+"-"+es(e&&e.end)}function ec(e){return e&&"number"==typeof e?e:1}let VFileMessage=class VFileMessage extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},l=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(l=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){let e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=o?o.line:void 0,this.name=ea(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=l&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual,this.expected,this.note,this.url}};VFileMessage.prototype.file="",VFileMessage.prototype.name="",VFileMessage.prototype.reason="",VFileMessage.prototype.message="",VFileMessage.prototype.stack="",VFileMessage.prototype.column=void 0,VFileMessage.prototype.line=void 0,VFileMessage.prototype.ancestors=void 0,VFileMessage.prototype.cause=void 0,VFileMessage.prototype.fatal=void 0,VFileMessage.prototype.place=void 0,VFileMessage.prototype.ruleId=void 0,VFileMessage.prototype.source=void 0;let ef={}.hasOwnProperty,ep=new Map,ed=/[A-Z]/g,eh=new Set(["table","tbody","thead","tfoot","tr"]),em=new Set(["td","th"]),eg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ey(e,t,n){var r,i,l,o,a,s,u,c,f;let p,d,h,m,g,y,v,b,k,x,w;return"element"===t.type?(r=e,i=t,l=n,d=p=r.schema,"svg"===i.tagName.toLowerCase()&&"html"===p.space&&(r.schema=K),r.ancestors.push(i),h=ex(r,i.tagName,!1),m=function(e,t){let n,r,i={};for(r in t.properties)if("children"!==r&&ef.call(t.properties,r)){let l=function(e,t,n){let r=function(e,t){let n=P(t),r=t,i=Info;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&X.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(J,et);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!J.test(e)){let n=e.replace(Y,ee);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=DefinedInfo}return new i(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){var i;let t;if(Array.isArray(n)&&(n=r.commaSeparated?(t={},(""===(i=n)[i.length-1]?[...i,""]:i).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return er(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let t=new VFileMessage("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=eg+"#cannot-parse-style-attribute",t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){let t,n={};for(t in e)ef.call(e,t)&&(n[function(e){let t=e.replace(ed,eE);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return n}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?en[r.property]||r.property:r.attribute,n]}}(e,r,t.properties[r]);if(l){let[r,o]=l;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof o&&em.has(t.tagName)?n=o:i[r]=o}}return n&&((i.style||(i.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n),i}(r,i),g=ek(r,i),eh.has(i.tagName)&&(g=g.filter(function(e){return"string"!=typeof e||!("object"==typeof e?"text"===e.type&&A(e.value):A(e))})),ev(r,m,h,i),eb(m,g),r.ancestors.pop(),r.schema=p,r.create(i,h,m,l)):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}ew(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?(o=e,a=t,s=n,v=y=o.schema,"svg"===a.name&&"html"===y.space&&(o.schema=K),o.ancestors.push(a),b=null===a.name?o.Fragment:ex(o,a.name,!0),k=function(e,t){let n={};for(let r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let l=i.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ew(e,t.position);else{let i,l=r.name;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,i=e.evaluater.evaluateExpression(t.expression)}else ew(e,t.position);else i=null===r.value||r.value;n[l]=i}return n}(o,a),x=ek(o,a),ev(o,k,b,a),eb(k,x),o.ancestors.pop(),o.schema=y,o.create(a,b,k,s)):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ew(e,t.position)}(e,t):"root"===t.type?(u=e,c=t,f=n,eb(w={},ek(u,c)),u.create(c,u.Fragment,w,f)):"text"===t.type?t.value:void 0}function ev(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function eb(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function ek(e,t){let n=[],r=-1,i=e.passKeys?new Map:ep;for(;++r<t.children.length;){let l,o=t.children[r];if(e.passKeys){let e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){let t=i.get(e)||0;l=e+"-"+t,i.set(e,t+1)}}let a=ey(e,o,l);void 0!==a&&n.push(a)}return n}function ex(e,t,n){let r;if(n)if(t.includes(".")){let e,n=t.split("."),i=-1;for(;++i<n.length;){let t=C(n[i])?{type:"Identifier",name:n[i]}:{type:"Literal",value:n[i]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(i&&"Literal"===t.type),optional:!1}:t}r=e}else r=C(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){let t=r.value;return ef.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);ew(e)}function ew(e,t){let n=new VFileMessage("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=eg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function eE(e){return"-"+e.toLowerCase()}let eS={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};var eC=n(74848);let eI={};function eA(e,t){let n=t||eI;return eD(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function eD(e,t,n){var r;if((r=e)&&"object"==typeof r){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return eP(e.children,t,n)}return Array.isArray(e)?eP(e,t,n):""}function eP(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=eD(e[i],t,n);return r.join("")}function eO(e,t,n,r){let i,l=e.length,o=0;if(t=t<0?-t>l?0:l+t:t>l?l:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);o<r.length;)(i=r.slice(o,o+1e4)).unshift(t,0),e.splice(...i),o+=1e4,t+=1e4}function eT(e,t){return e.length>0?(eO(e,e.length,0,t),e):t}let SpliceBuffer=class SpliceBuffer{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=null==t?1/0:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-(t||0),1/0);return n&&eL(this.left,n),r.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),eL(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),eL(this.right,e.reverse())}setCursor(e){if(e!==this.left.length&&(!(e>this.left.length)||0!==this.right.length)&&(!(e<0)||0!==this.left.length))if(e<this.left.length){let t=this.left.splice(e,1/0);eL(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);eL(this.left,t.reverse())}}};function eL(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function eM(e){let t,n,r,i,l,o,a,s={},u=-1,c=new SpliceBuffer(e);for(;++u<c.length;){for(;u in s;)u=s[u];if(t=c.get(u),u&&"chunkFlow"===t[1].type&&"listItemPrefix"===c.get(u-1)[1].type&&((r=0)<(o=t[1]._tokenizer.events).length&&"lineEndingBlank"===o[r][1].type&&(r+=2),r<o.length&&"content"===o[r][1].type))for(;++r<o.length&&"content"!==o[r][1].type;)"chunkText"===o[r][1].type&&(o[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(s,function(e,t){let n,r,i=e.get(t)[1],l=e.get(t)[2],o=t-1,a=[],s=i._tokenizer;!s&&(s=l.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let u=s.events,c=[],f={},p=-1,d=i,h=0,m=0,g=[0];for(;d;){for(;e.get(++o)[1]!==d;);a.push(o),!d._tokenizer&&(n=l.sliceStream(d),d.next||n.push(null),r&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(n),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),r=d,d=d.next}for(d=i;++p<u.length;)"exit"===u[p][0]&&"enter"===u[p-1][0]&&u[p][1].type===u[p-1][1].type&&u[p][1].start.line!==u[p][1].end.line&&(m=p+1,g.push(m),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):g.pop(),p=g.length;p--;){let t=u.slice(g[p],g[p+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),p=-1;++p<c.length;)f[h+c[p][0]]=h+c[p][1],h+=c[p][1]-c[p][0]-1;return f}(c,u)),u=s[u],a=!0);else if(t[1]._container){for(r=u,n=void 0;r--;)if("lineEnding"===(i=c.get(r))[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(n&&(c.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);else if("linePrefix"===i[1].type||"listItemIndent"===i[1].type);else break;n&&(t[1].end={...c.get(n)[1].start},(l=c.slice(n,u)).unshift(t),c.splice(n,u-n+1,l))}}return eO(e,0,1/0,c.slice(0)),!a}let eF={}.hasOwnProperty;function eN(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let r,i=(eF.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];if(l)for(r in l){eF.call(i,r)||(i[r]=[]);let e=l[r];!function(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);eO(e,0,0,r)}(i[r],Array.isArray(e)?e:e?[e]:[])}}}(t,e[n]);return t}let eR=eQ(/[A-Za-z]/),ej=eQ(/[\dA-Za-z]/),e_=eQ(/[#-'*+\--9=?A-Z^-~]/);function ez(e){return null!==e&&(e<32||127===e)}let eH=eQ(/\d/),eq=eQ(/[\dA-Fa-f]/),eU=eQ(/[!-/:-@[-`{-~]/);function eB(e){return null!==e&&e<-2}function eV(e){return null!==e&&(e<0||32===e)}function e$(e){return -2===e||-1===e||32===e}let eZ=eQ(/\p{P}|\p{S}/u),eW=eQ(/\s/);function eQ(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function eG(e,t,n,r){let i=r?r-1:1/0,l=0;return function(r){return e$(r)?(e.enter(n),function r(o){return e$(o)&&l++<i?(e.consume(o),r):(e.exit(n),t(o))}(r)):t(r)}}let eK={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eG(e,n,"linePrefix"))},function(n){return e.enter("paragraph"),function n(r){let i=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=i),t=i,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return eB(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},eY={tokenize:function(e){let t,n,r,i=this,l=[],o=0;return a;function a(t){if(o<l.length){let n=l[o];return i.containerState=n[1],e.attempt(n[0].continuation,s,u)(t)}return u(t)}function s(e){if(o++,i.containerState._closeFlow){let n;i.containerState._closeFlow=void 0,t&&y();let r=i.events.length,l=r;for(;l--;)if("exit"===i.events[l][0]&&"chunkFlow"===i.events[l][1].type){n=i.events[l][1].end;break}g(o);let a=r;for(;a<i.events.length;)i.events[a][1].end={...n},a++;return eO(i.events,l+1,0,i.events.slice(r)),i.events.length=a,u(e)}return a(e)}function u(n){if(o===l.length){if(!t)return p(n);if(t.currentConstruct&&t.currentConstruct.concrete)return h(n);i.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(eJ,c,f)(n)}function c(e){return t&&y(),g(o),p(e)}function f(e){return i.parser.lazy[i.now().line]=o!==l.length,r=i.now().offset,h(e)}function p(t){return i.containerState={},e.attempt(eJ,d,h)(t)}function d(e){return o++,l.push([i.currentConstruct,i.containerState]),p(e)}function h(r){if(null===r){t&&y(),g(0),e.consume(r);return}return t=t||i.parser.flow(i.now()),e.enter("chunkFlow",{_tokenizer:t,contentType:"flow",previous:n}),function t(n){if(null===n){m(e.exit("chunkFlow"),!0),g(0),e.consume(n);return}return eB(n)?(e.consume(n),m(e.exit("chunkFlow")),o=0,i.interrupt=void 0,a):(e.consume(n),t)}(r)}function m(e,l){let a=i.sliceStream(e);if(l&&a.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(a),i.parser.lazy[e.start.line]){let e,n,l=t.events.length;for(;l--;)if(t.events[l][1].start.offset<r&&(!t.events[l][1].end||t.events[l][1].end.offset>r))return;let a=i.events.length,s=a;for(;s--;)if("exit"===i.events[s][0]&&"chunkFlow"===i.events[s][1].type){if(e){n=i.events[s][1].end;break}e=!0}for(g(o),l=a;l<i.events.length;)i.events[l][1].end={...n},l++;eO(i.events,s+1,0,i.events.slice(a)),i.events.length=l}}function g(t){let n=l.length;for(;n-- >t;){let t=l[n];i.containerState=t[1],t[0].exit.call(i,e)}l.length=t}function y(){t.write([null]),n=void 0,t=void 0,i.containerState._closeFlow=void 0}}},eJ={tokenize:function(e,t,n){return eG(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},eX={partial:!0,tokenize:function(e,t,n){return function(t){return e$(t)?eG(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||eB(e)?t(e):n(e)}}},e0={resolve:function(e){return eM(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):eB(t)?e.check(e1,l,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function l(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},e1={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eG(e,i,"linePrefix")};function i(i){if(null===i||eB(i))return n(i);let l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&"linePrefix"===l[1].type&&l[2].sliceSerialize(l[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}},e2={tokenize:function(e){let t=this,n=e.attempt(eX,function(r){return null===r?void e.consume(r):(e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,eG(e,e.attempt(this.parser.constructs.flow,r,e.attempt(e0,r)),"linePrefix")));return n;function r(r){return null===r?void e.consume(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n)}}},e4={resolveAll:e7()},e3=e6("string"),e5=e6("text");function e6(e){return{resolveAll:e7("text"===e?e9:void 0),tokenize:function(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,l,o);return l;function l(e){return s(e)?i(e):o(e)}function o(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),a)}function a(e){return s(e)?(t.exit("data"),i(e)):(t.consume(e),a)}function s(e){if(null===e)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function e7(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function e9(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,i=e[n-1][1],l=t.sliceStream(i),o=l.length,a=-1,s=0;for(;o--;){let e=l[o];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===e)r=!0,s++;else if(-1===e);else{o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let l={type:n===e.length||r||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:i.start._bufferIndex+a,_index:i.start._index+o,line:i.end.line,column:i.end.column-s,offset:i.end.offset-s},end:{...i.end}};i.end={...l.start},i.start.offset===i.end.offset?Object.assign(i,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}let e8={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(l){var o;return e.enter("thematicBreak"),r=o=l,function l(o){return o===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),i++,t):(e.exit("thematicBreakSequence"),e$(n)?eG(e,l,"whitespace")(n):l(n))}(o)):i>=3&&(null===o||eB(o))?(e.exit("thematicBreak"),t(o)):n(o)}(o)}}},te={continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(eX,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,eG(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!e$(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(tn,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,eG(e,e.attempt(te,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){let r=this,i=r.events[r.events.length-1],l=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){let i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:eH(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(e8,n,a)(t):a(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(i){return eH(i)&&++o<10?(e.consume(i),t):(!r.interrupt||o<2)&&(r.containerState.marker?i===r.containerState.marker:41===i||46===i)?(e.exit("listItemValue"),a(i)):n(i)}(t)}return n(t)};function a(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(eX,r.interrupt?n:s,e.attempt(tt,c,u))}function s(e){return r.containerState.initialBlankLine=!0,l++,c(e)}function u(t){return e$(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),c):n(t)}function c(n){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},tt={partial:!0,tokenize:function(e,t,n){let r=this;return eG(e,function(e){let i=r.events[r.events.length-1];return!e$(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},tn={partial:!0,tokenize:function(e,t,n){let r=this;return eG(e,function(e){let i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},tr={continuation:{tokenize:function(e,t,n){let r=this;return function(t){return e$(t)?eG(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(tr,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return e$(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};function ti(e,t,n,r,i,l,o,a,s){let u=s||1/0,c=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(l),e.consume(t),e.exit(l),f):null===t||32===t||41===t||ez(t)?n(t):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),h(t))};function f(n){return 62===n?(e.enter(l),e.consume(n),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(a),f(t)):null===t||60===t||eB(t)?n(t):(e.consume(t),92===t?d:p)}function d(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(i){return!c&&(null===i||41===i||eV(i))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(i)):c<u&&40===i?(e.consume(i),c++,h):41===i?(e.consume(i),c--,h):null===i||32===i||40===i||ez(i)?n(i):(e.consume(i),92===i?m:h)}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function tl(e,t,n,r,i,l){let o,a=this,s=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(l),u};function u(f){return s>999||null===f||91===f||93===f&&!o||94===f&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):93===f?(e.exit(l),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):eB(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(t){return null===t||91===t||93===t||eB(t)||s++>999?(e.exit("chunkString"),u(t)):(e.consume(t),o||(o=!e$(t)),92===t?f:c)}function f(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function to(e,t,n,r,i,l){let o;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,a):n(t)};function a(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(l),s(n))}function s(t){return t===o?(e.exit(l),a(o)):null===t?n(t):eB(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eG(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===o||null===t||eB(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:u)}function c(t){return t===o||92===t?(e.consume(t),u):u(t)}}function ta(e,t){let n;return function r(i){return eB(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):e$(i)?eG(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function ts(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let tu={partial:!0,tokenize:function(e,t,n){return function(t){return eV(t)?ta(e,r)(t):n(t)};function r(t){return to(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return e$(t)?eG(e,l,"whitespace")(t):l(t)}function l(e){return null===e||eB(e)?t(e):n(e)}}},tc={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),eG(e,i,"linePrefix",5)(t)};function i(t){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?function t(n){return null===n?l(n):eB(n)?e.attempt(tf,t,l)(n):(e.enter("codeFlowValue"),function n(r){return null===r||eB(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function l(n){return e.exit("codeIndented"),t(n)}}},tf={partial:!0,tokenize:function(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):eB(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):eG(e,l,"linePrefix",5)(t)}function l(e){let l=r.events[r.events.length-1];return l&&"linePrefix"===l[1].type&&l[2].sliceSerialize(l[1],!0).length>=4?t(e):eB(e)?i(e):n(e)}}},tp={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,l=e.length;for(;l--;)if("enter"===e[l][0]){if("content"===e[l][1].type){n=l;break}"paragraph"===e[l][1].type&&(r=l)}else"content"===e[l][1].type&&e.splice(l,1),i||"definition"!==e[l][1].type||(i=l);let o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",o,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=o,e.push(["exit",o,t]),e},tokenize:function(e,t,n){let r,i=this;return function(t){var o;let a,s=i.events.length;for(;s--;)if("lineEnding"!==i.events[s][1].type&&"linePrefix"!==i.events[s][1].type&&"content"!==i.events[s][1].type){a="paragraph"===i.events[s][1].type;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||a)?(e.enter("setextHeadingLine"),r=t,o=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),e$(n)?eG(e,l,"lineSuffix")(n):l(n))}(o)):n(t)};function l(r){return null===r||eB(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}},td=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],th=["pre","script","style","textarea"],tm={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(eX,t,n)}}},tg={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return eB(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},ty={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},tv={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){let r,i=this,l={partial:!0,tokenize:function(e,t,n){let l=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(t){return e.enter("codeFencedFence"),e$(t)?eG(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(i){return i===r?(l++,e.consume(i),t):l>=a?(e.exit("codeFencedFenceSequence"),e$(i)?eG(e,u,"whitespace")(i):u(i)):n(i)}(t)):n(t)}function u(r){return null===r||eB(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}},o=0,a=0;return function(t){var l;let u;return l=t,o=(u=i.events[i.events.length-1])&&"linePrefix"===u[1].type?u[2].sliceSerialize(u[1],!0).length:0,r=l,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(i){return i===r?(a++,e.consume(i),t):a<3?n(i):(e.exit("codeFencedFenceSequence"),e$(i)?eG(e,s,"whitespace")(i):s(i))}(l)};function s(l){return null===l||eB(l)?(e.exit("codeFencedFence"),i.interrupt?t(l):e.check(ty,c,h)(l)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||eB(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(i)):e$(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),eG(e,u,"whitespace")(i)):96===i&&i===r?n(i):(e.consume(i),t)}(l))}function u(t){return null===t||eB(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||eB(i)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(i)):96===i&&i===r?n(i):(e.consume(i),t)}(t))}function c(t){return e.attempt(l,h,f)(t)}function f(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),p}function p(t){return o>0&&e$(t)?eG(e,d,"linePrefix",o+1)(t):d(t)}function d(t){return null===t||eB(t)?e.check(ty,c,h)(t):(e.enter("codeFlowValue"),function t(n){return null===n||eB(n)?(e.exit("codeFlowValue"),d(n)):(e.consume(n),t)}(t))}function h(n){return e.exit("codeFenced"),t(n)}}},tb=document.createElement("i");function tk(e){let t="&"+e+";";tb.innerHTML=t;let n=tb.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}let tx={name:"characterReference",tokenize:function(e,t,n){let r,i,l=this,o=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),r=31,i=ej,u(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=eq,u):(e.enter("characterReferenceValue"),r=7,i=eH,u(t))}function u(a){if(59===a&&o){let r=e.exit("characterReferenceValue");return i!==ej||tk(l.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&o++<r?(e.consume(a),u):n(a)}}},tw={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return eU(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},tE={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),eG(e,t,"linePrefix")}}};function tS(e,t,n){let r=[],i=-1;for(;++i<e.length;){let l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}let tC={name:"labelEnd",resolveAll:function(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){let e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&eO(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,l,o=e.length,a=0;for(;o--;)if(n=e[o][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[o][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[o][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=o,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(i=o);let s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},c={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[i-2][1].start}};return l=eT(l=[["enter",s,t],["enter",u,t]],e.slice(r+1,r+a+3)),l=eT(l,[["enter",c,t]]),l=eT(l,tS(t.parser.constructs.insideSpan.null,e.slice(r+a+4,i-3),t)),l=eT(l,[["exit",c,t],e[i-2],e[i-1],["exit",u,t]]),l=eT(l,e.slice(i+1)),l=eT(l,[["exit",s,t]]),eO(e,r,e.length,l),e},tokenize:function(e,t,n){let r,i,l=this,o=l.events.length;for(;o--;)if(("labelImage"===l.events[o][1].type||"labelLink"===l.events[o][1].type)&&!l.events[o][1]._balanced){r=l.events[o][1];break}return function(t){return r?r._inactive?c(t):(i=l.parser.defined.includes(ts(l.sliceSerialize({start:r.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(tI,u,i?u:c)(t):91===t?e.attempt(tA,u,i?s:c)(t):i?u(t):c(t)}function s(t){return e.attempt(tD,u,c)(t)}function u(e){return t(e)}function c(e){return r._balanced=!0,n(e)}}},tI={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return eV(t)?ta(e,i)(t):i(t)}function i(t){return 41===t?u(t):ti(e,l,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function l(t){return eV(t)?ta(e,a)(t):u(t)}function o(e){return n(e)}function a(t){return 34===t||39===t||40===t?to(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function s(t){return eV(t)?ta(e,u)(t):u(t)}function u(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},tA={tokenize:function(e,t,n){let r=this;return function(t){return tl.call(r,e,i,l,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(ts(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function l(e){return n(e)}}},tD={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},tP={name:"labelStartImage",resolveAll:tC.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),l):n(t)}function l(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};function tO(e){return null===e||eV(e)||eW(e)?1:eZ(e)?2:void 0}let tT={name:"attention",resolveAll:function(e,t){let n,r,i,l,o,a,s,u,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close){for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;let f={...e[n][1].end},p={...e[c][1].start};tL(f,-a),tL(p,a),l={type:a>1?"strongSequence":"emphasisSequence",start:f,end:{...e[n][1].end}},o={type:a>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:p},i={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:a>1?"strong":"emphasis",start:{...l.start},end:{...o.end}},e[n][1].end={...l.start},e[c][1].start={...o.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=eT(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=eT(s,[["enter",r,t],["enter",l,t],["exit",l,t],["enter",i,t]]),s=eT(s,tS(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=eT(s,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(u=2,s=eT(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):u=0,eO(e,n-1,c-n+3,s),c=n+s.length-u-2;break}}for(c=-1;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,i=this.previous,l=tO(i);return function(o){return n=o,e.enter("attentionSequence"),function o(a){if(a===n)return e.consume(a),o;let s=e.exit("attentionSequence"),u=tO(a),c=!u||2===u&&l||r.includes(a),f=!l||2===l&&u||r.includes(i);return s._open=!!(42===n?c:c&&(l||!f)),s._close=!!(42===n?f:f&&(u||!c)),t(a)}(o)}}};function tL(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let tM={name:"labelStartLink",resolveAll:tC.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},tF={42:te,43:te,45:te,48:te,49:te,50:te,51:te,52:te,53:te,54:te,55:te,56:te,57:te,62:tr},tN={91:{name:"definition",tokenize:function(e,t,n){let r,i=this;return function(t){var r;return e.enter("definition"),r=t,tl.call(i,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function l(t){return(r=ts(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):n(t)}function o(t){return eV(t)?ta(e,a)(t):a(t)}function a(t){return ti(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(tu,u,u)(t)}function u(t){return e$(t)?eG(e,c,"whitespace")(t):c(t)}function c(l){return null===l||eB(l)?(e.exit("definition"),i.parser.defined.push(r),t(l)):n(l)}}}},tR={[-2]:tc,[-1]:tc,32:tc},tj={35:{name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,l=3;return"whitespace"===e[3][1].type&&(l+=2),i-2>l&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(l===i-1||i-4>l&&"whitespace"===e[i-2][1].type)&&(i-=l+1===i?2:4),i>l&&(n={type:"atxHeadingText",start:e[l][1].start,end:e[i][1].end},r={type:"chunkText",start:e[l][1].start,end:e[i][1].end,contentType:"text"},eO(e,l,i-l+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(i){var l;return e.enter("atxHeading"),l=i,e.enter("atxHeadingSequence"),function i(l){return 35===l&&r++<6?(e.consume(l),i):null===l||eV(l)?(e.exit("atxHeadingSequence"),function n(r){return 35===r?(e.enter("atxHeadingSequence"),function t(r){return 35===r?(e.consume(r),t):(e.exit("atxHeadingSequence"),n(r))}(r)):null===r||eB(r)?(e.exit("atxHeading"),t(r)):e$(r)?eG(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||eV(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(l)):n(l)}(l)}}},42:e8,45:[tp,e8],60:{concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){let r,i,l,o,a,s=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),u};function u(o){return 33===o?(e.consume(o),c):47===o?(e.consume(o),i=!0,d):63===o?(e.consume(o),r=3,s.interrupt?t:L):eR(o)?(e.consume(o),l=String.fromCharCode(o),h):n(o)}function c(i){return 45===i?(e.consume(i),r=2,f):91===i?(e.consume(i),r=5,o=0,p):eR(i)?(e.consume(i),r=4,s.interrupt?t:L):n(i)}function f(r){return 45===r?(e.consume(r),s.interrupt?t:L):n(r)}function p(r){let i="CDATA[";return r===i.charCodeAt(o++)?(e.consume(r),o===i.length)?s.interrupt?t:S:p:n(r)}function d(t){return eR(t)?(e.consume(t),l=String.fromCharCode(t),h):n(t)}function h(o){if(null===o||47===o||62===o||eV(o)){let a=47===o,u=l.toLowerCase();return!a&&!i&&th.includes(u)?(r=1,s.interrupt?t(o):S(o)):td.includes(l.toLowerCase())?(r=6,a)?(e.consume(o),m):s.interrupt?t(o):S(o):(r=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(o):i?function t(n){return e$(n)?(e.consume(n),t):w(n)}(o):g(o))}return 45===o||ej(o)?(e.consume(o),l+=String.fromCharCode(o),h):n(o)}function m(r){return 62===r?(e.consume(r),s.interrupt?t:S):n(r)}function g(t){return 47===t?(e.consume(t),w):58===t||95===t||eR(t)?(e.consume(t),y):e$(t)?(e.consume(t),g):w(t)}function y(t){return 45===t||46===t||58===t||95===t||ej(t)?(e.consume(t),y):v(t)}function v(t){return 61===t?(e.consume(t),b):e$(t)?(e.consume(t),v):g(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,k):e$(t)?(e.consume(t),b):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||eV(n)?v(n):(e.consume(n),t)}(t)}function k(t){return t===a?(e.consume(t),a=null,x):null===t||eB(t)?n(t):(e.consume(t),k)}function x(e){return 47===e||62===e||e$(e)?g(e):n(e)}function w(t){return 62===t?(e.consume(t),E):n(t)}function E(t){return null===t||eB(t)?S(t):e$(t)?(e.consume(t),E):n(t)}function S(t){return 45===t&&2===r?(e.consume(t),D):60===t&&1===r?(e.consume(t),P):62===t&&4===r?(e.consume(t),M):63===t&&3===r?(e.consume(t),L):93===t&&5===r?(e.consume(t),T):eB(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(tm,F,C)(t)):null===t||eB(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),S)}function C(t){return e.check(tg,I,F)(t)}function I(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return null===t||eB(t)?C(t):(e.enter("htmlFlowData"),S(t))}function D(t){return 45===t?(e.consume(t),L):S(t)}function P(t){return 47===t?(e.consume(t),l="",O):S(t)}function O(t){if(62===t){let n=l.toLowerCase();return th.includes(n)?(e.consume(t),M):S(t)}return eR(t)&&l.length<8?(e.consume(t),l+=String.fromCharCode(t),O):S(t)}function T(t){return 93===t?(e.consume(t),L):S(t)}function L(t){return 62===t?(e.consume(t),M):45===t&&2===r?(e.consume(t),L):S(t)}function M(t){return null===t||eB(t)?(e.exit("htmlFlowData"),F(t)):(e.consume(t),M)}function F(n){return e.exit("htmlFlow"),t(n)}}},61:tp,95:e8,96:tv,126:tv},t_={38:tx,92:tw},tz={[-5]:tE,[-4]:tE,[-3]:tE,33:tP,38:tx,42:tT,60:[{name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return eR(t)?(e.consume(t),l):64===t?n(t):a(t)}function l(t){return 43===t||45===t||46===t||ej(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,o):(43===n||45===n||46===n||ej(n))&&r++<32?(e.consume(n),t):(r=0,a(n))}(t)):a(t)}function o(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||ez(r)?n(r):(e.consume(r),o)}function a(t){return 64===t?(e.consume(t),s):e_(t)?(e.consume(t),a):n(t)}function s(i){return ej(i)?function i(l){return 46===l?(e.consume(l),r=0,s):62===l?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(l),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(l){if((45===l||ej(l))&&r++<63){let n=45===l?t:i;return e.consume(l),n}return n(l)}(l)}(i):n(i)}}},{name:"htmlText",tokenize:function(e,t,n){let r,i,l,o=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),k):63===t?(e.consume(t),v):eR(t)?(e.consume(t),w):n(t)}function s(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),i=0,d):eR(t)?(e.consume(t),y):n(t)}function u(t){return 45===t?(e.consume(t),p):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),f):eB(t)?(l=c,O(t)):(e.consume(t),c)}function f(t){return 45===t?(e.consume(t),p):c(t)}function p(e){return 62===e?P(e):45===e?f(e):c(e)}function d(t){let r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),i===r.length?h:d):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):eB(t)?(l=h,O(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?P(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?P(t):eB(t)?(l=y,O(t)):(e.consume(t),y)}function v(t){return null===t?n(t):63===t?(e.consume(t),b):eB(t)?(l=v,O(t)):(e.consume(t),v)}function b(e){return 62===e?P(e):v(e)}function k(t){return eR(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||ej(t)?(e.consume(t),x):function t(n){return eB(n)?(l=t,O(n)):e$(n)?(e.consume(n),t):P(n)}(t)}function w(t){return 45===t||ej(t)?(e.consume(t),w):47===t||62===t||eV(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),P):58===t||95===t||eR(t)?(e.consume(t),S):eB(t)?(l=E,O(t)):e$(t)?(e.consume(t),E):P(t)}function S(t){return 45===t||46===t||58===t||95===t||ej(t)?(e.consume(t),S):function t(n){return 61===n?(e.consume(n),C):eB(n)?(l=t,O(n)):e$(n)?(e.consume(n),t):E(n)}(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,I):eB(t)?(l=C,O(t)):e$(t)?(e.consume(t),C):(e.consume(t),A)}function I(t){return t===r?(e.consume(t),r=void 0,D):null===t?n(t):eB(t)?(l=I,O(t)):(e.consume(t),I)}function A(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||eV(t)?E(t):(e.consume(t),A)}function D(e){return 47===e||62===e||eV(e)?E(e):n(e)}function P(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function O(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),T}function T(t){return e$(t)?eG(e,L,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),l(t)}}}],91:tM,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return eB(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},tw],93:tC,95:tT,96:{name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(("lineEnding"===e[3][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,l=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),l++,t):(e.exit("codeTextSequence"),o(n))}(t)};function o(s){return null===s?n(s):32===s?(e.enter("space"),e.consume(s),e.exit("space"),o):96===s?(i=e.enter("codeTextSequence"),r=0,function n(o){return 96===o?(e.consume(o),r++,n):r===l?(e.exit("codeTextSequence"),e.exit("codeText"),t(o)):(i.type="codeTextData",a(o))}(s)):eB(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):(e.enter("codeTextData"),a(s))}function a(t){return null===t||32===t||96===t||eB(t)?(e.exit("codeTextData"),o(t)):(e.consume(t),a)}}}},tH={null:[tT,e4]},tq={null:[42,95]},tU={null:[]},tB=/[\0\t\n\r]/g;function tV(e,t){let n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(65535&n)==65535||(65535&n)==65534||n>1114111?"�":String.fromCodePoint(n)}let t$=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tZ(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return tV(n.slice(t?2:1),t?16:10)}return tk(n)||e}let tW={}.hasOwnProperty;function tQ(e){return{line:e.line,column:e.column,offset:e.offset}}function tG(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+ea({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ea({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+ea({start:t.start,end:t.end})+") is still open")}function tK(e){let t=this;t.parser=function(n){var r,i;let l,o,a,s;return"string"!=typeof(r={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(i=r,r=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(y),autolinkProtocol:u,autolinkEmail:u,atxHeading:r(h),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:u,characterReference:u,codeFenced:r(d),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:r(d,i),codeText:r(function(){return{type:"inlineCode",value:""}},i),codeTextData:u,data:u,codeFlowValue:u,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(m),hardBreakTrailing:r(m),htmlFlow:r(g,i),htmlFlowData:u,htmlText:r(g,i),htmlTextData:u,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:i,link:r(y),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(v,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(v),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:r(h),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:o(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:o(),autolinkEmail:function(e){c.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){c.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:o(),characterEscapeValue:c,characterReferenceMarkerHexadecimal:p,characterReferenceMarkerNumeric:p,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=tV(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=tk(n);let i=this.stack[this.stack.length-1];i.value+=t},characterReference:function(e){this.stack.pop().position.end=tQ(e.end)},codeFenced:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:c,codeIndented:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:c,data:c,definition:o(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ts(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:o(),hardBreakEscape:o(f),hardBreakTrailing:o(f),htmlFlow:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:c,htmlText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:c,image:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=t.replace(t$,tZ),n.identifier=ts(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=tQ(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(u.call(this,e),c.call(this,e))},link:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ts(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:o(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:o(),thematicBreak:o()}};!function e(t,n){let r=-1;for(;++r<n.length;){let i=n[r];Array.isArray(i)?e(t,i):function(e,t){let n;for(n in t)if(tW.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,i)}}(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},o={stack:[r],tokenStack:[],config:t,enter:l,exit:a,buffer:i,resume:s,data:n},u=[],c=-1;for(;++c<e.length;)("listOrdered"===e[c][1].type||"listUnordered"===e[c][1].type)&&("enter"===e[c][0]?u.push(c):c=function(e,t,n){let r,i,l,o,a=t-1,s=-1,u=!1;for(;++a<=n;){let t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||o||s||l||(l=a),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let o=a;for(i=void 0;o--;){let t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=o}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}l&&(!i||l<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){let i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(a,0,["enter",i,t[2]]),a++,n++,l=void 0,o=!0}}}return e[t][1]._spread=u,n}(e,u.pop(),c));for(c=-1;++c<e.length;){let n=t[e[c][0]];tW.call(n,e[c][1].type)&&n[e[c][1].type].call(Object.assign({sliceSerialize:e[c][2].sliceSerialize},o),e[c][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||tG).call(o,void 0,e[0])}for(r.position={start:tQ(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:tQ(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},c=-1;++c<t.transforms.length;)r=t.transforms[c](r)||r;return r};function r(e,t){return function(n){l.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function l(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:tQ(t.start),end:void 0}}function o(e){return function(t){e&&e.call(this,t),a.call(this,t)}}function a(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||tG).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+ea({start:e.start,end:e.end})+"): it’s not open");n.position.end=tQ(e.end)}function s(){return eA(this.stack.pop())}function u(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:tQ(e.start),end:void 0},t.push(n)),this.stack.push(n)}function c(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=tQ(e.end)}function f(){this.data.atHardBreak=!0}function p(e){this.data.characterReferenceType=e.type}function d(){return{type:"code",lang:null,meta:null,value:""}}function h(){return{type:"heading",depth:0,children:[]}}function m(){return{type:"break"}}function g(){return{type:"html",value:""}}function y(){return{type:"link",title:null,url:"",children:[]}}function v(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(i)(function(e){for(;!eM(e););return e}((function(e){let t={constructs:eN([k,...(e||{}).extensions||[]]),content:n(eK),defined:[],document:n(eY),flow:n(e2),lazy:{},string:n(e3),text:n(e5)};return t;function n(e){return function(n){return function(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},l=[],o=[],a=[],s={attempt:h(function(e,t){m(e,t.from)}),check:h(d),consume:function(e){eB(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,g()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=p(),u.events.push(["enter",n,u]),a.push(n),n},exit:function(e){let t=a.pop();return t.end=p(),u.events.push(["exit",t,u]),t},interrupt:h(d,{interrupt:!0})},u={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,g()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,i=[];for(;++r<e.length;){let l,o=e[r];if("string"==typeof o)l=o;else switch(o){case -5:l="\r";break;case -4:l="\n";break;case -3:l="\r\n";break;case -2:l=t?" ":" ";break;case -1:if(!t&&n)continue;l=" ";break;default:l=String.fromCharCode(o)}n=-2===o,i.push(l)}return i.join("")}(f(e),t)},sliceStream:f,write:function(e){return(o=eT(o,e),function(){let e;for(;r._index<o.length;){let n=o[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),c=c(t)}else c=c(n)}}(),null!==o[o.length-1])?[]:(m(t,0),u.events=tS(l,u.events,u),u.events)}},c=t.tokenize.call(u,s);return t.resolveAll&&l.push(t),u;function f(e){return function(e,t){let n,r=t.start._index,i=t.start._bufferIndex,l=t.end._index,o=t.end._bufferIndex;if(r===l)n=[e[r].slice(i,o)];else{if(n=e.slice(r,l),i>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(i):n.shift()}o>0&&n.push(e[l].slice(0,o))}return n}(o,e)}function p(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:l}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:l}}function d(e,t){t.restore()}function h(e,t){return function(n,i,l){var o;let c,f,d,h;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):(o=n,function(e){let t=null!==e&&o[e],n=null!==e&&o.null;return m([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function m(e){return(c=e,f=0,0===e.length)?l:y(e[f])}function y(e){return function(n){let i,l,o,c,f;return(i=p(),l=u.previous,o=u.currentConstruct,c=u.events.length,f=Array.from(a),h={from:c,restore:function(){r=i,u.previous=l,u.currentConstruct=o,u.events.length=c,a=f,g()}},d=e,e.partial||(u.currentConstruct=e),e.name&&u.parser.constructs.disable.null.includes(e.name))?b(n):e.tokenize.call(t?Object.assign(Object.create(u),t):u,s,v,b)(n)}}function v(t){return e(d,h),i}function b(e){return(h.restore(),++f<c.length)?y(c[f]):l}}}function m(e,t){e.resolveAll&&!l.includes(e)&&l.push(e),e.resolve&&eO(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function g(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}(t,e,n)}}})(i).document().write((o=1,a="",s=!0,function(e,t,n){let r,i,u,c,f,p=[];for(e=a+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),u=0,a="",s&&(65279===e.charCodeAt(0)&&u++,s=void 0);u<e.length;){if(tB.lastIndex=u,c=(r=tB.exec(e))&&void 0!==r.index?r.index:e.length,f=e.charCodeAt(c),!r){a=e.slice(u);break}if(10===f&&u===c&&l)p.push(-3),l=void 0;else switch(l&&(p.push(-5),l=void 0),u<c&&(p.push(e.slice(u,c)),o+=c-u),f){case 0:p.push(65533),o++;break;case 9:for(i=4*Math.ceil(o/4),p.push(-2);o++<i;)p.push(-1);break;case 10:p.push(-4),o=1;break;default:l=!0,o=1}u=c+1}return n&&(l&&p.push(-5),a&&p.push(a),p.push(null)),p})(n,r,!0))))}}let tY="object"==typeof self?self:globalThis,tJ=e=>{var t;let n,r;return(t=new Map,n=(e,n)=>(t.set(n,e),e),r=i=>{if(t.has(i))return t.get(i);let[l,o]=e[i];switch(l){case 0:case -1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new tY[e](t),i)}case 8:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new tY[l](o),i)})(0)},{toString:tX}={},{keys:t0}=Object,t1=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=tX.call(e).slice(8,-1);switch(n){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},t2=([e,t])=>0===e&&("function"===t||"symbol"===t),t4=(e,{json:t,lossy:n}={})=>{var r,i,l;let o,a,s=[];return(r=!(t||n),i=!!t,l=new Map,o=(e,t)=>{let n=s.push(e)-1;return l.set(t,n),n},a=e=>{if(l.has(e))return l.get(e);let[t,n]=t1(e);switch(t){case 0:{let i=e;switch(n){case"bigint":t=8,i=e.toString();break;case"function":case"symbol":if(r)throw TypeError("unable to serialize "+n);i=null;break;case"undefined":return o([-1],e)}return o([t,i],e)}case 1:{if(n){let t=e;return"DataView"===n?t=new Uint8Array(e.buffer):"ArrayBuffer"===n&&(t=new Uint8Array(e)),o([n,[...t]],e)}let r=[],i=o([t,r],e);for(let t of e)r.push(a(t));return i}case 2:{if(n)switch(n){case"BigInt":return o([n,e.toString()],e);case"Boolean":case"Number":case"String":return o([n,e.valueOf()],e)}if(i&&"toJSON"in e)return a(e.toJSON());let l=[],s=o([t,l],e);for(let t of t0(e))(r||!t2(t1(e[t])))&&l.push([a(t),a(e[t])]);return s}case 3:return o([t,e.toISOString()],e);case 4:{let{source:n,flags:r}=e;return o([t,{source:n,flags:r}],e)}case 5:{let n=[],i=o([t,n],e);for(let[t,i]of e)(r||!(t2(t1(t))||t2(t1(i))))&&n.push([a(t),a(i)]);return i}case 6:{let n=[],i=o([t,n],e);for(let t of e)(r||!t2(t1(t)))&&n.push(a(t));return i}}let{message:s}=e;return o([t,{name:n,message:s}],e)})(e),s},t3="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?tJ(t4(e,t)):structuredClone(e):(e,t)=>tJ(t4(e,t));function t5(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let l=e.charCodeAt(n),o="";if(37===l&&ej(e.charCodeAt(n+1))&&ej(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){let t=e.charCodeAt(n+1);l<56320&&t>56319&&t<57344?(o=String.fromCharCode(l,t),i=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function t6(e,t){let n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function t7(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}let t9=function(e){var t,n;if(null==e)return ne;if("function"==typeof e)return t8(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=t9(e[n]);return t8(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):(t=e,t8(function(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}))}if("string"==typeof e){return n=e,t8(function(e){return e&&e.type===n})}throw Error("Expected function, string, or object as test")};function t8(e){return function(t,n,r){return!!(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function ne(){return!0}let nt=[];function nn(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;let l=t9(i),o=r?-1:1;(function e(i,a,s){let u=i&&"object"==typeof i?i:{};if("string"==typeof u.type){let e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(c,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return c;function c(){var u;let c,f,p,d=nt;if((!t||l(i,a,s[s.length-1]||void 0))&&!1===(d=Array.isArray(u=n(i,s))?u:"number"==typeof u?[!0,u]:null==u?nt:[u])[0])return d;if("children"in i&&i.children&&i.children&&"skip"!==d[0])for(f=(r?i.children.length:-1)+o,p=s.concat(i);f>-1&&f<i.children.length;){if(!1===(c=e(i.children[f],f,p)())[0])return c;f="number"==typeof c[1]?c[1]:f+o}return d}})(e,void 0,[])()}function nr(e,t,n,r){let i,l,o;"function"==typeof t&&"function"!=typeof n?(l=void 0,o=t,i=n):(l=t,o=n,i=r),nn(e,l,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)},i)}function ni(e,t){let n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];let i=e.all(t),l=i[0];l&&"text"===l.type?l.value="["+l.value:i.unshift({type:"text",value:"["});let o=i[i.length-1];return o&&"text"===o.type?o.value+=r:i.push({type:"text",value:r}),i}function nl(e){let t=e.spread;return null==t?e.children.length>1:t}function no(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}let na={blockquote:function(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l={type:"element",tagName:"pre",properties:{},children:[l=e.applyData(t,l)]},e.patch(t,l),l},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){let n,r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),l=t5(i.toLowerCase()),o=e.footnoteOrder.indexOf(i),a=e.footnoteCounts.get(i);void 0===a?(a=0,e.footnoteOrder.push(i),n=e.footnoteOrder.length):n=o+1,a+=1,e.footnoteCounts.set(i,a);let s={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,s);let u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)},heading:function(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ni(e,t);let i={src:t5(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);let l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)},image:function(e,t){let n={src:t5(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ni(e,t);let i={href:t5(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);let l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)},link:function(e,t){let n={href:t5(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){let r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=nl(n[r])}return t}(n):nl(t),l={},o=[];if("boolean"==typeof t.checked){let e,n=r[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},r.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a<r.length;){let e=r[a];(i||0!==a||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?o.push(e):o.push(...e.children)}let s=r[r.length-1];s&&(i||"element"!==s.type||"p"!==s.tagName)&&o.push({type:"text",value:"\n"});let u={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,u),e.applyData(t,u)},list:function(e,t){let n={},r=e.all(t),i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){let e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)},paragraph:function(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=el(t.children[1]),o=ei(t.children[t.children.length-1]);l&&o&&(r.position={start:l,end:o}),i.push(r)}let l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",l=n&&"table"===n.type?n.align:void 0,o=l?l.length:t.children.length,a=-1,s=[];for(;++a<o;){let n=t.children[a],r={},o=l?l[a]:void 0;o&&(r.align=o);let u={type:"element",tagName:i,properties:r,children:[]};n&&(u.children=e.all(n),e.patch(n,u),u=e.applyData(n,u)),s.push(u)}let u={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,u),e.applyData(t,u)},text:function(e,t){let n={type:"text",value:function(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,l=[];for(;r;)l.push(no(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(no(t.slice(i),i>0,!1)),l.join("")}(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:ns,yaml:ns,definition:ns,footnoteDefinition:ns};function ns(){}let nu={}.hasOwnProperty,nc={};function nf(e,t){e.position&&(t.position=function(e){let t=el(e),n=ei(e);if(t&&n)return{start:t,end:n}}(e))}function np(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&i&&Object.assign(n.properties,t3(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function nd(e,t){let n=[],r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function nh(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function nm(e,t){let n,r,i,l,o=(n=t||nc,r=new Map,i=new Map,l={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let i=l.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=nh(i.value)),!Array.isArray(i)&&"element"===i.type)){let e=i.children[0];e&&"text"===e.type&&(e.value=nh(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:np,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...na,...n.handlers},one:function(e,t){let n=e.type,r=l.handlers[n];if(nu.call(l.handlers,n)&&r)return r(l,e,t);if(l.options.passThrough&&l.options.passThrough.includes(n)){if("children"in e){let{children:t,...n}=e,r=t3(n);return r.children=l.all(e),r}return t3(e)}return(l.options.unknownHandler||function(e,t){let n=t.data||{},r="value"in t&&!(nu.call(n,"hProperties")||nu.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)})(l,e,t)},options:n,patch:nf,wrap:nd},nr(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),l),a=o.one(e,void 0),s=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||t6,r=e.options.footnoteBackLabel||t7,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[],s=-1;for(;++s<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[s]);if(!i)continue;let l=e.all(i),o=String(i.identifier).toUpperCase(),u=t5(o.toLowerCase()),c=0,f=[],p=e.footnoteCounts.get(o);for(;void 0!==p&&++c<=p;){f.length>0&&f.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,c);"string"==typeof e&&(e={type:"text",value:e}),f.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+u+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let d=l[l.length-1];if(d&&"element"===d.type&&"p"===d.tagName){let e=d.children[d.children.length-1];e&&"text"===e.type?e.value+=" ":d.children.push({type:"text",value:" "}),d.children.push(...f)}else l.push(...f);let h={type:"element",tagName:"li",properties:{id:t+"fn-"+u},children:e.wrap(l,!0)};e.patch(i,h),a.push(h)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...t3(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(o),u=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&u.children.push({type:"text",value:"\n"},s),u}function ng(e,t){return e&&"run"in e?async function(n,r){let i=nm(n,{file:r,...t});await e.run(i,r)}:function(n,r){return nm(n,{file:r,...e||t})}}function ny(e){if(e)throw e}var nv=n(92849);function nb(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}let nk=function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');nS(e);let r=0,i=-1,l=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;l--;)if(47===e.codePointAt(l)){if(n){r=l+1;break}}else i<0&&(n=!0,i=l+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let o=-1,a=t.length-1;for(;l--;)if(47===e.codePointAt(l)){if(n){r=l+1;break}}else o<0&&(n=!0,o=l+1),a>-1&&(e.codePointAt(l)===t.codePointAt(a--)?a<0&&(i=l):(a=-1,i=o));return r===i?i=o:i<0&&(i=e.length),e.slice(r,i)},nx=function(e){let t;if(nS(e),0===e.length)return".";let n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},nw=function(e){let t;nS(e);let n=e.length,r=-1,i=0,l=-1,o=0;for(;n--;){let a=e.codePointAt(n);if(47===a){if(t){i=n+1;break}continue}r<0&&(t=!0,r=n+1),46===a?l<0?l=n:1!==o&&(o=1):l>-1&&(o=-1)}return l<0||r<0||0===o||1===o&&l===r-1&&l===i+1?"":e.slice(l,r)},nE=function(...e){var t;let n,r,i,l=-1;for(;++l<e.length;)nS(e[l]),e[l]&&(i=void 0===i?e[l]:i+"/"+e[l]);return void 0===i?".":(nS(t=i),n=47===t.codePointAt(0),0!==(r=function(e,t){let n,r,i="",l=0,o=-1,a=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else if(47===n)break;else n=47;if(47===n){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(i.length<2||2!==l||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2)){if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",l=0):l=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),o=s,a=0;continue}}else if(i.length>0){i="",l=0,o=s,a=0;continue}}t&&(i=i.length>0?i+"/..":"..",l=2)}else i.length>0?i+="/"+e.slice(o+1,s):i=e.slice(o+1,s),l=s-o-1;o=s,a=0}else 46===n&&a>-1?a++:a=-1}return i}(t,!n)).length||n||(r="."),r.length>0&&47===t.codePointAt(t.length-1)&&(r+="/"),n?"/"+r:r)};function nS(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function nC(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let nI=["history","path","basename","stem","extname","dirname"];let VFile=class VFile{constructor(e){var t;let n,r;n=e?nC(e)?{path:e}:"string"==typeof e||(t=e)&&"object"==typeof t&&"byteLength"in t&&"byteOffset"in t?{value:e}:e:{},this.cwd="cwd"in n?"":"/",this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<nI.length;){let e=nI[i];e in n&&void 0!==n[e]&&null!==n[e]&&(this[e]="history"===e?[...n[e]]:n[e])}for(r in n)nI.includes(r)||(this[r]=n[r])}get basename(){return"string"==typeof this.path?nk(this.path):void 0}set basename(e){nD(e,"basename"),nA(e,"basename"),this.path=nE(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?nx(this.path):void 0}set dirname(e){nP(this.basename,"dirname"),this.path=nE(e||"",this.basename)}get extname(){return"string"==typeof this.path?nw(this.path):void 0}set extname(e){if(nA(e,"extname"),nP(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=nE(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){nC(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!nC(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){let e=t.codePointAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),nD(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?nk(this.path,this.extname):void 0}set stem(e){nD(e,"stem"),nA(e,"stem"),this.path=nE(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new VFileMessage(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}};function nA(e,t){if(e&&e.includes("/"))throw Error("`"+t+"` cannot be a path: did not expect `/`")}function nD(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function nP(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let nO=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},nT={}.hasOwnProperty;let Processor=class Processor extends nO{constructor(){let e,t;super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=(e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw TypeError("Expected function as last argument, not "+r);!function i(l,...o){let a=e[++n],s=-1;if(l)return void r(l);for(;++s<t.length;)(null===o[s]||void 0===o[s])&&(o[s]=t[s]);t=o,a?(function(e,t){let n;return function(...t){let l,o=e.length>t.length;o&&t.push(r);try{l=e.apply(this,t)}catch(e){if(o&&n)throw e;return r(e)}o||(l&&l.then&&"function"==typeof l.then?l.then(i,r):l instanceof Error?r(l):i(l))};function r(e,...i){n||(n=!0,t(e,...i))}function i(e){r(null,e)}})(a,i)(...o):r(null,...o)}(null,...t)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}})}copy(){let e=new Processor,t=-1;for(;++t<this.attachers.length;){let n=this.attachers[t];e.use(...n)}return e.data(nv(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2==arguments.length?(nN("data",this.frozen),this.namespace[e]=t,this):nT.call(this.namespace,e)&&this.namespace[e]||void 0:e?(nN("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let n=e.call(this,...t);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=n_(e),n=this.parser||this.Parser;return nM("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),nM("process",this.parser||this.Parser),nF("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let l=n_(e),o=n.parse(l);function a(e,n){e||!n?i(e):r?r(n):t(void 0,n)}n.run(o,l,function(e,t,r){var i,l;if(e||!t||!r)return a(e);let o=n.stringify(t,r);"string"==typeof(i=o)||(l=i)&&"object"==typeof l&&"byteLength"in l&&"byteOffset"in l?r.value=o:r.result=o,a(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),nM("processSync",this.parser||this.Parser),nF("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,ny(e),t=r}),nj("processSync","process",n),t}run(e,t,n){nR(e),this.freeze();let r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,l){let o=n_(t);r.run(e,o,function(t,r,o){let a=r||e;t?l(t):i?i(a):n(void 0,a,o)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){ny(e),n=t,r=!0}),nj("runSync","run",r),n}stringify(e,t){this.freeze();let n=n_(t),r=this.compiler||this.Compiler;return nF("stringify",r),nR(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(nN("use",this.frozen),null==e);else if("function"==typeof e)o(e,t);else if("object"==typeof e)Array.isArray(e)?l(e):i(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(!("plugins"in e)&&!("settings"in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(e.plugins),e.settings&&(r.settings=nv(!0,r.settings,e.settings))}function l(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;)!function(e){if("function"==typeof e)o(e,[]);else if("object"==typeof e)if(Array.isArray(e)){let[t,...n]=e;o(t,n)}else i(e);else throw TypeError("Expected usable value, not `"+e+"`")}(e[t]);else throw TypeError("Expected a list of plugins, not `"+e+"`")}function o(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(-1===i)n.push([e,...t]);else if(t.length>0){let[r,...l]=t,o=n[i][1];nb(o)&&nb(r)&&(r=nv(!0,o,r)),n[i]=[e,r,...l]}}}};let nL=new Processor().freeze();function nM(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function nF(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function nN(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nR(e){if(!nb(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function nj(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function n_(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new VFile(e)}let nz=[],nH={allowDangerousHtml:!0},nq=/^(https?|ircs?|mailto|xmpp)$/i,nU=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function nB(e){var t;let n,r,i,l,o,a=(n=(t=e).rehypePlugins||nz,r=t.remarkPlugins||nz,i=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...nH}:nH,nL().use(tK).use(r).use(ng,i).use(n)),s=(l=e.children||"",o=new VFile,"string"==typeof l&&(o.value=l),o);return function(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,s=t.urlTransform||nV;for(let e of nU)Object.hasOwn(t,e.from)&&(e.from,e.to&&e.to,e.id);return nr(e,function(e,t,i){if("raw"===e.type&&i&&"number"==typeof t)return o?i.children.splice(t,1):i.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in eS)if(Object.hasOwn(eS,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=eS[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=s(String(n||""),t,e))}}if("element"===e.type){let o=n?!n.includes(e.tagName):!!l&&l.includes(e.tagName);if(!o&&r&&"number"==typeof t&&(o=!r(e,t,i)),o&&i&&"number"==typeof t)return a&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}),function(e,t){var n,r,i,l;let o;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let a=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");n=a,r=t.jsxDEV,o=function(e,t,i,l){let o=Array.isArray(i.children),a=el(e);return r(t,i,l,o,{columnNumber:a?a.column-1:void 0,fileName:n,lineNumber:a?a.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");i=t.jsx,l=t.jsxs,o=function(e,t,n,r){let o=Array.isArray(n.children)?l:i;return r?o(t,n,r):o(t,n)}}let s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?K:G,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},u=ey(s,e,void 0);return u&&"string"!=typeof u?u:s.create(e,s.Fragment,{children:u||void 0},void 0)}(e,{Fragment:eC.Fragment,components:i,ignoreInvalidStyle:!0,jsx:eC.jsx,jsxs:eC.jsxs,passKeys:!0,passNode:!0})}(a.runSync(a.parse(s),s),e)}function nV(e){let t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return -1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||nq.test(e.slice(0,t))?e:""}function n$(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}let nZ="phrasing",nW=["autolink","link","image","label"];function nQ(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function nG(e){this.config.enter.autolinkProtocol.call(this,e)}function nK(e){this.config.exit.autolinkProtocol.call(this,e)}function nY(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function nJ(e){this.config.exit.autolinkEmail.call(this,e)}function nX(e){this.exit(e)}function n0(e){!function(e,t,n){let r=t9((n||{}).ignore||[]),i=function(e){let t=[];if(!Array.isArray(e))throw TypeError("Expected find and replace tuple or list of tuples");let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){var i;let e=n[r];t.push(["string"==typeof(i=e[0])?RegExp(function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(i),"g"):i,function(e){return"function"==typeof e?e:function(){return e}}(e[1])])}return t}(t),l=-1;for(;++l<i.length;)nn(e,"text",o);function o(e,t){let n,o=-1;for(;++o<t.length;){let e=t[o],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){let n=t[t.length-1],r=i[l][0],o=i[l][1],a=0,s=n.children.indexOf(e),u=!1,c=[];r.lastIndex=0;let f=r.exec(e.value);for(;f;){let n=f.index,i={index:f.index,input:f.input,stack:[...t,e]},l=o(...f,i);if("string"==typeof l&&(l=l.length>0?{type:"text",value:l}:void 0),!1===l?r.lastIndex=n+1:(a!==n&&c.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(l)?c.push(...l):l&&c.push(l),a=n+f[0].length,u=!0),!r.global)break;f=r.exec(e.value)}return u?(a<e.value.length&&c.push({type:"text",value:e.value.slice(a)}),n.children.splice(s,1,...c)):c=[e],s+c.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,n1],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,n2]],{ignore:["link","linkReference"]})}function n1(e,t,n,r,i){let l,o="";if(!n4(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),(l=n.split(".")).length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[a-zA-Z\d]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[a-zA-Z\d]/.test(l[l.length-2])))return!1;let a=function(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")"),i=n$(e,"("),l=n$(e,")");for(;-1!==r&&i>l;)e+=n.slice(0,r+1),r=(n=n.slice(r+1)).indexOf(")"),l++;return[e,n]}(n+r);if(!a[0])return!1;let s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function n2(e,t,n,r){return!(!n4(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function n4(e,t){let n=e.input.charCodeAt(e.index-1);return(0===e.index||eW(n)||eZ(n))&&(!t||47!==n)}function n3(){this.buffer()}function n5(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function n6(){this.buffer()}function n7(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function n9(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ts(this.sliceSerialize(e)).toLowerCase(),n.label=t}function n8(e){this.exit(e)}function re(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ts(this.sliceSerialize(e)).toLowerCase(),n.label=t}function rt(e){this.exit(e)}function rn(e,t,n,r){let i=n.createTracker(r),l=i.move("[^"),o=n.enter("footnoteReference"),a=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),a(),o(),l+=i.move("]")}function rr(e,t,n){return 0===t?e:ri(e,t,n)}function ri(e,t,n){return(n?"":" ")+e}rn.peek=function(){return"["};let rl=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function ro(e){this.enter({type:"delete",children:[]},e)}function ra(e){this.exit(e)}function rs(e,t,n,r){let i=n.createTracker(r),l=n.enter("strikethrough"),o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),l(),o}function ru(e){return e.length}function rc(e){let t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:114*(82===t||114===t)}rs.peek=function(){return"~"};function rf(e,t,n){let r=e.value||"",i="`",l=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){let e,t=n.unsafe[l],i=n.compilePattern(t);if(t.atBreak)for(;e=i.exec(r);){let t=e.index;10===r.charCodeAt(t)&&13===r.charCodeAt(t-1)&&t--,r=r.slice(0,t)+" "+r.slice(e.index+1)}}return i+r+i}rf.peek=function(){return"`"};t9(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);let rp=function(e,t,n,r){let i=function(e){let t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n),l=n.bulletCurrent||function(e){let t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(n);t&&"list"===t.type&&t.ordered&&(l=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+l);let o=l.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(o=4*Math.ceil(o/4));let a=n.createTracker(r);a.move(l+" ".repeat(o-l.length)),a.shift(o);let s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),function(e,t,n){return t?(n?"":" ".repeat(o))+e:(n?l:l+" ".repeat(o-l.length))+e});return s(),u};function rd(e){let t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function rh(e){this.exit(e),this.data.inTable=void 0}function rm(e){this.enter({type:"tableRow",children:[]},e)}function rg(e){this.exit(e)}function ry(e){this.enter({type:"tableCell",children:[]},e)}function rv(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,rb));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function rb(e,t){return"|"===t?t:e}function rk(e){let t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function rx(e){let t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&"text"===n.type){let r,i=t.children,l=-1;for(;++l<i.length;){let e=i[l];if("paragraph"===e.type){r=e;break}}r===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function rw(e,t,n,r){let i=e.children[0],l="boolean"==typeof e.checked&&i&&"paragraph"===i.type,o="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);l&&a.move(o);let s=rp(e,t,n,{...r,...a.current()});return l&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+o})),s}let rE={tokenize:function(e,t,n){let r=0;return function t(l){return(87===l||119===l)&&r<3?(r++,e.consume(l),t):46===l&&3===r?(e.consume(l),i):n(l)};function i(e){return null===e?n(e):t(e)}},partial:!0},rS={tokenize:function(e,t,n){let r,i,l;return o;function o(t){return 46===t||95===t?e.check(rI,s,a)(t):null===t||eV(t)||eW(t)||45!==t&&eZ(t)?s(t):(l=!0,e.consume(t),o)}function a(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),o}function s(e){return i||r||!l?n(e):t(e)}},partial:!0},rC={tokenize:function(e,t){let n=0,r=0;return i;function i(o){return 40===o?(n++,e.consume(o),i):41===o&&r<n?l(o):33===o||34===o||38===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||60===o||63===o||93===o||95===o||126===o?e.check(rI,t,l)(o):null===o||eV(o)||eW(o)?t(o):(e.consume(o),i)}function l(t){return 41===t&&r++,e.consume(t),i}},partial:!0},rI={tokenize:function(e,t,n){return r;function r(o){return 33===o||34===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||63===o||95===o||126===o?(e.consume(o),r):38===o?(e.consume(o),l):93===o?(e.consume(o),i):60===o||null===o||eV(o)||eW(o)?t(o):n(o)}function i(e){return null===e||40===e||91===e||eV(e)||eW(e)?t(e):r(e)}function l(t){return eR(t)?function t(i){return 59===i?(e.consume(i),r):eR(i)?(e.consume(i),t):n(i)}(t):n(t)}},partial:!0},rA={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return ej(e)?n(e):t(e)}},partial:!0},rD={name:"wwwAutolink",tokenize:function(e,t,n){let r=this;return function(t){return 87!==t&&119!==t||!rM.call(r,r.previous)||rj(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(rE,e.attempt(rS,e.attempt(rC,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:rM},rP={name:"protocolAutolink",tokenize:function(e,t,n){let r=this,i="",l=!1;return function(t){return(72===t||104===t)&&rF.call(r,r.previous)&&!rj(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),o):n(t)};function o(t){if(eR(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),o;if(58===t){let n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),a}return n(t)}function a(t){return 47===t?(e.consume(t),l)?s:(l=!0,a):n(t)}function s(t){return null===t||ez(t)||eV(t)||eW(t)||eZ(t)?n(t):e.attempt(rS,e.attempt(rC,u),n)(t)}function u(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:rF},rO={name:"emailAutolink",tokenize:function(e,t,n){let r,i,l=this;return function(t){return!rR(t)||!rN.call(l,l.previous)||rj(l.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),function t(r){return rR(r)?(e.consume(r),t):64===r?(e.consume(r),o):n(r)}(t))};function o(t){return 46===t?e.check(rA,s,a)(t):45===t||95===t||ej(t)?(i=!0,e.consume(t),o):s(t)}function a(t){return e.consume(t),r=!0,o}function s(o){return i&&r&&eR(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(o)):n(o)}},previous:rN},rT={},rL=48;for(;rL<123;)rT[rL]=rO,58==++rL?rL=65:91===rL&&(rL=97);function rM(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||eV(e)}function rF(e){return!eR(e)}function rN(e){return!(47===e||rR(e))}function rR(e){return 43===e||45===e||46===e||95===e||ej(e)}function rj(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}rT[43]=rO,rT[45]=rO,rT[46]=rO,rT[95]=rO,rT[72]=[rO,rP],rT[104]=[rO,rP],rT[87]=[rO,rD],rT[119]=[rO,rD];let r_={tokenize:function(e,t,n){let r=this;return eG(e,function(e){let i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function rz(e,t,n){let r,i=this,l=i.events.length,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);for(;l--;){let e=i.events[l][1];if("labelImage"===e.type){r=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(l){if(!r||!r._balanced)return n(l);let a=ts(i.sliceSerialize({start:r.end,end:i.now()}));return 94===a.codePointAt(0)&&o.includes(a.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l)):n(l)}}function rH(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function rq(e,t,n){let r,i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),o=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),a};function a(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(a){if(o>999||93===a&&!r||null===a||91===a||eV(a))return n(a);if(93===a){e.exit("chunkString");let r=e.exit("gfmFootnoteCallString");return l.includes(ts(i.sliceSerialize(r)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(a)}return eV(a)||(r=!0),o++,e.consume(a),92===a?u:s}function u(t){return 91===t||92===t||93===t?(e.consume(t),o++,s):s(t)}}function rU(e,t,n){let r,i,l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]),a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),s};function s(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(t)}function u(t){if(a>999||93===t&&!i||null===t||91===t||eV(t))return n(t);if(93===t){e.exit("chunkString");let n=e.exit("gfmFootnoteDefinitionLabelString");return r=ts(l.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return eV(t)||(i=!0),a++,e.consume(t),92===t?c:u}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,u):u(t)}function f(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(r)||o.push(r),eG(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function rB(e,t,n){return e.check(eX,t,e.attempt(r_,t,n))}function rV(e){e.exit("gfmFootnoteDefinition")}let EditMap=class EditMap{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let i=0;if(0!==n||0!==r.length){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length,n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function r$(e,t,n){let r,i=this,l=0,o=0;return function(e){let t=i.events.length-1;for(;t>-1;){let e=i.events[t][1].type;if("lineEnding"===e||"linePrefix"===e)t--;else break}let r=t>-1?i.events[t][1].type:null,l="tableHead"===r||"tableRow"===r?v:a;return l===v&&i.parser.lazy[i.now().line]?n(e):l(e)};function a(t){var n;return e.enter("tableHead"),e.enter("tableRow"),124===(n=t)||(r=!0,o+=1),s(n)}function s(t){return null===t?n(t):eB(t)?o>1?(o=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f):n(t):e$(t)?eG(e,s,"whitespace")(t):(o+=1,r&&(r=!1,l+=1),124===t)?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,s):(e.enter("data"),u(t))}function u(t){return null===t||124===t||eV(t)?(e.exit("data"),s(t)):(e.consume(t),92===t?c:u)}function c(t){return 92===t||124===t?(e.consume(t),u):u(t)}function f(t){return(i.interrupt=!1,i.parser.lazy[i.now().line])?n(t):(e.enter("tableDelimiterRow"),r=!1,e$(t))?eG(e,p,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t)}function p(t){return 45===t||58===t?h(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),d):n(t)}function d(t){return e$(t)?eG(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(o+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(o+=1,m(t)):null===t||eB(t)?y(t):n(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),function t(n){return 45===n?(e.consume(n),t):58===n?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(n),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(n))}(t)):n(t)}function g(t){return e$(t)?eG(e,y,"whitespace")(t):y(t)}function y(i){if(124===i)return p(i);if(null===i||eB(i))return r&&l===o?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(i)):n(i);return n(i)}function v(t){return e.enter("tableRow"),b(t)}function b(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),b):null===n||eB(n)?(e.exit("tableRow"),t(n)):e$(n)?eG(e,b,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||eV(t)?(e.exit("data"),b(t)):(e.consume(t),92===t?x:k)}function x(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function rZ(e,t){let n,r,i,l=-1,o=!0,a=0,s=[0,0,0,0],u=[0,0,0,0],c=!1,f=0,p=new EditMap;for(;++l<e.length;){let d=e[l],h=d[1];"enter"===d[0]?"tableHead"===h.type?(c=!1,0!==f&&(rQ(p,t,f,n,r),r=void 0,f=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(l,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(o=!0,i=void 0,s=[0,0,0,0],u=[0,l+1,0,0],c&&(c=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(l,0,[["enter",r,t]])),a="tableDelimiterRow"===h.type?2:r?3:1):a&&("data"===h.type||"tableDelimiterMarker"===h.type||"tableDelimiterFiller"===h.type)?(o=!1,0===u[2]&&(0!==s[1]&&(u[0]=u[1],i=rW(p,t,s,a,void 0,i),s=[0,0,0,0]),u[2]=l)):"tableCellDivider"===h.type&&(o?o=!1:(0!==s[1]&&(u[0]=u[1],i=rW(p,t,s,a,void 0,i)),u=[(s=u)[1],l,0,0])):"tableHead"===h.type?(c=!0,f=l):"tableRow"===h.type||"tableDelimiterRow"===h.type?(f=l,0!==s[1]?(u[0]=u[1],i=rW(p,t,s,a,l,i)):0!==u[1]&&(i=rW(p,t,u,a,l,i)),a=0):a&&("data"===h.type||"tableDelimiterMarker"===h.type||"tableDelimiterFiller"===h.type)&&(u[3]=l)}for(0!==f&&rQ(p,t,f,n,r),p.consume(t.events),l=-1;++l<t.events.length;){let e=t.events[l];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=function(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){let e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}(t.events,l))}return e}function rW(e,t,n,r,i,l){0!==n[0]&&(l.end=Object.assign({},rG(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));let o=rG(t.events,n[1]);if(l={type:1===r?"tableHeader":2===r?"tableDelimiter":"tableData",start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",l,t]]),0!==n[2]){let i=rG(t.events,n[2]),l=rG(t.events,n[3]),o={type:"tableContent",start:Object.assign({},i),end:Object.assign({},l)};if(e.add(n[2],0,[["enter",o,t]]),2!==r){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",o,t]])}return void 0!==i&&(l.end=Object.assign({},rG(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function rQ(e,t,n,r,i){let l=[],o=rG(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function rG(e,t){let n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}let rK={name:"tasklistCheck",tokenize:function(e,t,n){let r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return eV(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),l):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),l):n(t)}function l(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(t)}function o(r){return eB(r)?t(r):e$(r)?e.check({tokenize:rY},t,n)(r):n(r)}}};function rY(e,t,n){return eG(e,function(e){return null===e?n(e):t(e)},"whitespace")}let rJ={};function rX(e){let t,n,r,i=e||rJ,l=this.data(),o=l.micromarkExtensions||(l.micromarkExtensions=[]),a=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),s=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);o.push(eN([{text:rT},{document:{91:{name:"gfmFootnoteDefinition",tokenize:rU,continuation:{tokenize:rB},exit:rV}},text:{91:{name:"gfmFootnoteCall",tokenize:rq},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:rz,resolveTo:rH}}},(t=(i||{}).singleTilde,n={name:"strikethrough",tokenize:function(e,n,r){let i=this.previous,l=this.events,o=0;return function(a){return 126===i&&"characterEscape"!==l[l.length-1][1].type?r(a):(e.enter("strikethroughSequenceTemporary"),function l(a){let s=tO(i);if(126===a)return o>1?r(a):(e.consume(a),o++,l);if(o<2&&!t)return r(a);let u=e.exit("strikethroughSequenceTemporary"),c=tO(a);return u._open=!c||2===c&&!!s,u._close=!s||2===s&&!!c,n(a)}(a))}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";let i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},l={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",l,t]],a=t.parser.constructs.insideSpan.null;a&&eO(o,o.length,0,tS(a,e.slice(r+1,n),t)),eO(o,o.length,0,[["exit",l,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),eO(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}},null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}),{flow:{null:{name:"table",tokenize:r$,resolveAll:rZ}}},{text:{91:rK}}])),a.push([{transforms:[n0],enter:{literalAutolink:nQ,literalAutolinkEmail:nG,literalAutolinkHttp:nG,literalAutolinkWww:nG},exit:{literalAutolink:nX,literalAutolinkEmail:nJ,literalAutolinkHttp:nK,literalAutolinkWww:nY}},{enter:{gfmFootnoteCallString:n3,gfmFootnoteCall:n5,gfmFootnoteDefinitionLabelString:n6,gfmFootnoteDefinition:n7},exit:{gfmFootnoteCallString:n9,gfmFootnoteCall:n8,gfmFootnoteDefinitionLabelString:re,gfmFootnoteDefinition:rt}},{canContainEols:["delete"],enter:{strikethrough:ro},exit:{strikethrough:ra}},{enter:{table:rd,tableData:ry,tableHeader:ry,tableRow:rm},exit:{codeText:rv,table:rh,tableData:rg,tableHeader:rg,tableRow:rg}},{exit:{taskListCheckValueChecked:rk,taskListCheckValueUnchecked:rk,paragraph:rx}}]),s.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:nZ,notInConstruct:nW},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:nZ,notInConstruct:nW},{character:":",before:"[ps]",after:"\\/",inConstruct:nZ,notInConstruct:nW}]},(r=!1,i&&i.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:function(e,t,n,i){let l=n.createTracker(i),o=l.move("[^"),a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=l.move(n.safe(n.associationId(e),{before:o,after:"]"})),s(),o+=l.move("]:"),e.children&&e.children.length>0&&(l.shift(4),o+=l.move((r?"\n":" ")+n.indentLines(n.containerFlow(e,l.current()),r?ri:rr))),a(),o},footnoteReference:rn},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rl}],handlers:{delete:rs}},function(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=rf(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return a(function(e,t,n){let r=e.children,i=-1,l=[],o=t.enter("table");for(;++i<r.length;)l[i]=s(r[i],t,n);return o(),l}(e,n,r),e.align)},tableCell:o,tableRow:function(e,t,n,r){let i=a([s(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function o(e,t,n,r){let i=n.enter("tableCell"),o=n.enter("phrasing"),a=n.containerPhrasing(e,{...r,before:l,after:l});return o(),i(),a}function a(e,t){return function(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||ru,l=[],o=[],a=[],s=[],u=0,c=-1;for(;++c<e.length;){let t=[],r=[],l=-1;for(e[c].length>u&&(u=e[c].length);++l<e[c].length;){var f;let o=null==(f=e[c][l])?"":String(f);if(!1!==n.alignDelimiters){let e=i(o);r[l]=e,(void 0===s[l]||e>s[l])&&(s[l]=e)}t.push(o)}o[c]=t,a[c]=r}let p=-1;if("object"==typeof r&&"length"in r)for(;++p<u;)l[p]=rc(r[p]);else{let e=rc(r);for(;++p<u;)l[p]=e}p=-1;let d=[],h=[];for(;++p<u;){let e=l[p],t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let i=!1===n.alignDelimiters?1:Math.max(1,s[p]-t.length-r.length),o=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&((i=t.length+i+r.length)>s[p]&&(s[p]=i),h[p]=i),d[p]=o}o.splice(1,0,d),a.splice(1,0,h),c=-1;let m=[];for(;++c<o.length;){let e=o[c],t=a[c];p=-1;let r=[];for(;++p<u;){let i=e[p]||"",o="",a="";if(!1!==n.alignDelimiters){let e=s[p]-(t[p]||0),n=l[p];114===n?o=" ".repeat(e):99===n?e%2?(o=" ".repeat(e/2+.5),a=" ".repeat(e/2-.5)):a=o=" ".repeat(e/2):a=" ".repeat(e)}!1===n.delimiterStart||p||r.push("|"),!1!==n.padding&&(!1!==n.alignDelimiters||""!==i)&&(!1!==n.delimiterStart||p)&&r.push(" "),!1!==n.alignDelimiters&&r.push(o),r.push(i),!1!==n.alignDelimiters&&r.push(a),!1!==n.padding&&r.push(" "),(!1!==n.delimiterEnd||p!==u-1)&&r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function s(e,t,n){let r=e.children,i=-1,l=[],a=t.enter("tableRow");for(;++i<r.length;)l[i]=o(r[i],e,t,n);return a(),l}}(i),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rw}}]})}var r0=n(3322),r1=function(e,t){if(!(this instanceof r1))return new r1(e,t);this.url=e,t=t||{},this.headers=t.headers||{},this.payload=void 0!==t.payload?t.payload:"",this.method=t.method||this.payload&&"POST"||"GET",this.withCredentials=!!t.withCredentials,this.debug=!!t.debug,this.autoReconnect=void 0!==t.autoReconnect&&t.autoReconnect,this.reconnectDelay=void 0!==t.reconnectDelay?t.reconnectDelay:3e3,this.maxRetries=void 0!==t.maxRetries?t.maxRetries:null,this.retryCount=0,this.reconnectTimer=null,this.useLastEventId=void 0===t.useLastEventId||t.useLastEventId,this.FIELD_SEPARATOR=":",this.listeners={},this.xhr=null,this.readyState=r1.INITIALIZING,this.progress=0,this.chunk="",this.lastEventId="",this.addEventListener=function(e,t){void 0===this.listeners[e]&&(this.listeners[e]=[]),-1===this.listeners[e].indexOf(t)&&this.listeners[e].push(t)},this.removeEventListener=function(e,t){if(void 0===this.listeners[e])return;let n=[];this.listeners[e].forEach(function(e){e!==t&&n.push(e)}),0===n.length?delete this.listeners[e]:this.listeners[e]=n},this.dispatchEvent=function(e){if(!e)return!0;this.debug&&console.debug(e),e.source=this;let t="on"+e.type;return(!this.hasOwnProperty(t)||(this[t].call(this,e),!e.defaultPrevented))&&(!this.listeners[e.type]||this.listeners[e.type].every(function(t){return t(e),!e.defaultPrevented}))},this._markClosed=function(){if(this.xhr=null,this.progress=0,this.chunk="",this._setReadyState(r1.CLOSED),this.autoReconnect){if(null!==this.maxRetries&&this.retryCount>=this.maxRetries){this.debug&&console.debug(`SSE max retries (${this.maxRetries}) reached, stopping reconnection attempts`),this.autoReconnect=!1,this.close();return}this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.debug&&console.debug(`SSE will attempt to reconnect in ${this.reconnectDelay}ms (attempt ${this.retryCount+1}${this.maxRetries?"/"+this.maxRetries:""})`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.retryCount++,this.stream()},this.reconnectDelay)}},this._setReadyState=function(e){let t=new CustomEvent("readystatechange");t.readyState=e,this.readyState=e,this.dispatchEvent(t)},this._onStreamFailure=function(e){let t=new CustomEvent("error");t.responseCode=e.currentTarget.status,t.data=e.currentTarget.response,this.dispatchEvent(t),this._markClosed()},this._onStreamAbort=function(){this.dispatchEvent(new CustomEvent("abort")),this._markClosed()},this._onStreamProgress=function(e){if(!this.xhr)return;if(this.xhr.status<200||this.xhr.status>=300)return void this._onStreamFailure(e);this.retryCount=0;let t=this.xhr.responseText.substring(this.progress);this.progress+=t.length;let n=(this.chunk+t).split(/(\r\n\r\n|\r\r|\n\n)/g),r=n.pop();n.forEach((function(e){e.trim().length>0&&this.dispatchEvent(this._parseEventChunk(e))}).bind(this)),this.chunk=r},this._onStreamLoaded=function(e){this._onStreamProgress(e),this.dispatchEvent(this._parseEventChunk(this.chunk)),this.chunk="",this._markClosed()},this._parseEventChunk=function(e){if(!e||0===e.length)return null;this.debug&&console.debug(e);let t={id:null,retry:null,data:null,event:null};if(e.split(/\n|\r\n|\r/).forEach((function(e){let n,r,i=e.indexOf(this.FIELD_SEPARATOR);if(i>0){let t=" "===e[i+1]?2:1;n=e.substring(0,i),r=e.substring(i+t)}else{if(!(i<0))return;n=e,r=""}n in t&&("data"===n&&null!==t[n]?t.data+="\n"+r:t[n]=r)}).bind(this)),null===t.data)return null;null!==t.id&&(this.lastEventId=t.id);let n=new CustomEvent(t.event||"message");return n.id=t.id,n.data=t.data||"",n.lastEventId=this.lastEventId,n},this._onReadyStateChange=function(){if(this.xhr&&this.xhr.readyState===XMLHttpRequest.HEADERS_RECEIVED){let e={};for(let t of this.xhr.getAllResponseHeaders().trim().split("\r\n")){let[n,...r]=t.split(":"),i=r.join(":").trim();e[n.trim().toLowerCase()]=e[n.trim().toLowerCase()]||[],e[n.trim().toLowerCase()].push(i)}let t=new CustomEvent("open");t.responseCode=this.xhr.status,t.headers=e,this.dispatchEvent(t),this._setReadyState(r1.OPEN)}},this.stream=function(){if(!this.xhr){for(let e in this._setReadyState(r1.CONNECTING),this.xhr=new XMLHttpRequest,this.xhr.addEventListener("progress",this._onStreamProgress.bind(this)),this.xhr.addEventListener("load",this._onStreamLoaded.bind(this)),this.xhr.addEventListener("readystatechange",this._onReadyStateChange.bind(this)),this.xhr.addEventListener("error",this._onStreamFailure.bind(this)),this.xhr.addEventListener("abort",this._onStreamAbort.bind(this)),this.xhr.open(this.method,this.url),this.headers)this.xhr.setRequestHeader(e,this.headers[e]);this.useLastEventId&&this.lastEventId.length>0&&this.xhr.setRequestHeader("Last-Event-ID",this.lastEventId),this.xhr.withCredentials=this.withCredentials,this.xhr.send(this.payload)}},this.close=function(){this.readyState!==r1.CLOSED&&(this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.autoReconnect=!1,this.xhr.abort())},(void 0===t.start||t.start)&&this.stream()};r1.INITIALIZING=-1,r1.CONNECTING=0,r1.OPEN=1,r1.CLOSED=2,"u">typeof exports&&(exports.SSE=r1);var r2=n(60973),r4=n(92177),r3=n(2181),r5=n(1086),r6=n(96052),r7="I'm sorry, but I can't",r9="Searching for MDN content…",r8="Generating your answer…",ie=n(92547);function it(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ir(e){if(Array.isArray(e))return e}function ii(e,t,n,r,i,l,o){try{var a=e[l](o),s=a.value}catch(e){n(e);return}a.done?t(s):Promise.resolve(s).then(r,i)}function il(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var l=e.apply(t,n);function o(e){ii(l,r,i,o,a,"next",e)}function a(e){ii(l,r,i,o,a,"throw",e)}o(void 0)})}}function io(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ia(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function is(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function iu(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function ic(e,t){return ir(e)||function(e,t){var n,r,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var l=[],o=!0,a=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(l.push(n.value),!t||l.length!==t);o=!0);}catch(e){a=!0,r=e}finally{try{o||null==i.return||i.return()}finally{if(a)throw r}}return l}}(e,t)||ih(e,t)||ia()}function ip(e){return ir(e)||io(e)||ih(e)||ia()}function id(e){return function(e){if(Array.isArray(e))return it(e)}(e)||io(e)||ih(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ih(e,t){if(e){if("string"==typeof e)return it(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return it(e,t)}}function im(e,t){var n,r,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(o,"next",{value:s(0)}),a(o,"throw",{value:s(1)}),a(o,"return",{value:s(2)}),"function"==typeof Symbol&&a(o,Symbol.iterator,{value:function(){return this}}),o;function s(a){return function(s){var u=[a,s];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(l=0)),l;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return l.label++,{value:u[1],done:!1};case 5:l.label++,r=u[1],u=[0];continue;case 7:u=l.ops.pop(),l.trys.pop();continue;default:if(!(i=(i=l.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){l=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){l.label=u[1];break}if(6===u[0]&&l.label<i[1]){l.label=i[1],i=u;break}if(i&&l.label<i[2]){l.label=i[2],l.ops.push(u);break}i[2]&&l.ops.pop(),l.trys.pop();continue}u=t.call(e,l)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var ig=((r={}).User="user",r.Assistant="assistant",r),iy=((i={}).Pending="pending",i.InProgress="in-progress",i.Complete="complete",i.Stopped="stopped",i.Errored="errored",i);function iv(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=ip(t||[]),i=r[0],l=void 0===i?n?0:null:i,o=r.slice(1);return e.root.length&&null!==l?function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=ip(n),l=i[0],o=void 0===l?r?0:null:l,a=i.slice(1);return t?t.children.length&&null!==o?[t.request,t.response].concat(id(e(t.children[o],a,r))):[t.request,t.response]:[]}(e.root[l],o,n):[]}function ib(e,t){for(var n=t,r=e.nodes[n].parentId,i=[],l=Object.keys(e.nodes).length,o=0,a=function(e){return e.messageId===n};o<l;){o++;var s,u,c="string"!=typeof r,f=c?e.root:null==(u=e.nodes[r])?void 0:u.children,p=null!=(s=null==f?void 0:f.findIndex(a))?s:-1;if(p<0)return[];if(i.push(p),c)break;n=r,r=e.nodes[r].parentId}return i.reverse()}function ik(e,t){var n=structuredClone(e),r=t.type;switch(r){case"new":var i=t.response,l=t.request,o=t.parentId,a=o&&n.nodes[o],s={parentId:o,request:l,response:i,children:[]};a?a.children.push(s):n.root.push(s),n.currentNode=s;break;case"update":var u,c=t.message,f=null==(u=n.currentNode)?void 0:u.messageId;f&&(n.nodes[f].response=is({},n.nodes[f].response,c));break;case"append-content":var p,d=t.content,h=null==(p=n.currentNode)?void 0:p.messageId;h&&(n.nodes[h].response=iu(is({},n.nodes[h].response),{content:n.nodes[h].response.content+d}));break;case"set-metadata":var m=t.sources,g=t.messageId,y=t.parentId,v=t.chatId;n.currentNode&&(Object.assign(n.currentNode,{messageId:g,parentId:y,response:iu(is({},n.currentNode.response),{messageId:g,parentId:y,chatId:v,sources:m}),request:iu(is({},n.currentNode.request),{messageId:g,parentId:y,chatId:v})}),n.nodes[g]=n.currentNode);break;case"set-state":n=t.treeState;break;case"reset":n={root:[],nodes:{}};break;default:throw Error("Unknown message action '".concat(r,"'"))}return n}var ix=function(){"use strict";var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function")}return e=[{key:"getMessages",value:function(e){return il(function(){var t,n;return im(this,function(r){switch(r.label){case 0:return[4,fetch("/api/v1/plus/ai/help/history/".concat(e))];case 1:if(!(t=r.sent()).ok)throw Error("".concat(t.status,": ").concat(t.statusText));return[4,t.json()];case 2:if(!(n=r.sent()).chat_id)throw Error("no chat id");return[2,function(e,t){var n=[],r={},i=!0,l=!1,o=void 0;try{for(var a,s=(e.messages||[])[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u,c=a.value,f={messageId:c.metadata.message_id,parentId:c.metadata.parent_id,request:{role:"user",content:c.user.content,status:"complete",chatId:c.metadata.chat_id,messageId:c.metadata.message_id,parentId:c.metadata.parent_id},response:{role:"assistant",content:(null==(u=c.assistant)?void 0:u.content)||"",status:c.assistant?"complete":Date.now()-Date.parse(c.metadata.created_at)>6e4?"errored":"in-progress",sources:c.metadata.sources,chatId:c.metadata.chat_id,messageId:c.metadata.message_id,parentId:c.metadata.parent_id},children:[]};c.metadata.parent_id?r[c.metadata.parent_id].children.push(f):n.push(f),r[f.messageId]=f}}catch(e){l=!0,o=e}finally{try{i||null==s.return||s.return()}finally{if(l)throw o}}return{chatId:t,treeState:{root:n,nodes:r}}}(n,e)]}})})()}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t,e),t}(),iw=n(7408),iE=n(99848),iS=n(85743);n(60405);var iC=n(24826),iI=n(96540);function iA(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.isDisabled,n=(0,iS.P_)(),r=(0,x.useMemo)(function(){return(0,iC.dz)(n)},[n]);return iI.createElement("div",{className:"ai-help-banner ".concat(void 0!==t&&t?"disabled":"")},iI.createElement("p",null,iI.createElement(iw.I,{name:"bell-ring"}),iI.createElement("strong",null,r?"GPT-4o-powered AI Help.":"Supercharge your AI Help experience with our paid subscriptions.")),iI.createElement("p",null,r?"Now with chat history, enhanced context, and optimized prompts.":"Upgrade to MDN Plus 5 or Supporter 10 to unlock the full potential of GPT-4o-powered AI Help."),!r&&iI.createElement(iE.$,{gleanContext:"".concat(r5.v2,": upsell-banner"),toPlans:!0}))}function iD(e){var t=e.limit;return iI.createElement("div",{className:"login-banner"},iI.createElement("span",null,iI.createElement("span",null,"You have reached the limit of ",t," questions per day."),iI.createElement("br",null),iI.createElement("span",null,iI.createElement("strong",null,"Want to ask more?")," Upgrade to MDN Plus 5 or MDN Supporter 10.")),iI.createElement("ul",{className:"auth-container"},iI.createElement("li",null,iI.createElement(iE.$,{gleanContext:"".concat(r5.v2,": upsell-button"),toPlans:!0}))))}var iP=n(53108),iO=n(86638),iT=n(5438),iL=n(97478),iM=n(43304),iF=n(49351),iN=n(69756),iR=n(16969),ij=n(70661),i_=n(90326),iz=n(49136),iH=n(74954),iq=n(31256),iU=n(62074),iB=n(96540);function iV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i$(e,t,n,r,i,l,o){try{var a=e[l](o),s=a.value}catch(e){n(e);return}a.done?t(s):Promise.resolve(s).then(r,i)}function iZ(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var l=e.apply(t,n);function o(e){i$(l,r,i,o,a,"next",e)}function a(e){i$(l,r,i,o,a,"throw",e)}o(void 0)})}}function iW(e,t){var n,r,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(o,"next",{value:s(0)}),a(o,"throw",{value:s(1)}),a(o,"return",{value:s(2)}),"function"==typeof Symbol&&a(o,Symbol.iterator,{value:function(){return this}}),o;function s(a){return function(s){var u=[a,s];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(l=0)),l;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return l.label++,{value:u[1],done:!1};case 5:l.label++,r=u[1],u=[0];continue;case 7:u=l.ops.pop(),l.trys.pop();continue;default:if(!(i=(i=l.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){l=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){l.label=u[1];break}if(6===u[0]&&l.label<i[1]){l.label=i[1],i=u;break}if(i&&l.label<i[2]){l.label=i[2],l.ops.push(u);break}i[2]&&l.ops.pop(),l.trys.pop();continue}u=t.call(e,l)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var iQ="New Topic";function iG(e){var t,n=e.currentChatId,r=e.entries,i=e.mutate,l=(t=(0,r0.ok)(),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var l=[],o=!0,a=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(l.push(n.value),2!==l.length);o=!0);}catch(e){a=!0,r=e}finally{try{o||null==i.return||i.return()}finally{if(a)throw r}}return l}}(t,2)||function(e,t){if(e){if("string"==typeof e)return iV(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iV(e,2)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1],o=(0,r3.db)();return iB.createElement(iB.Fragment,null,iB.createElement("time",null,r.label),iB.createElement("ol",null,r.entries.map(function(e,t){var r=e.chat_id,a=(e.last,e.label);return iB.createElement("li",{key:t,className:"".concat(r===n?"ai-help-history-active":"")},iB.createElement("a",{href:"./ai-help?c=".concat(r),title:a||iQ,onClick:function(e){e.preventDefault(),o("".concat(r5.v2,": history item -> ").concat(r)),l(function(e){var t=new URLSearchParams(e);return t.set("c",r),t})}},a||iQ),r===n&&iB.createElement(iF.$,{type:"action",icon:"trash",onClickHandler:function(){return iZ(function(){var e;return iW(this,function(t){switch(t.label){case 0:if(e=window.confirm("Do you want to permanently delete this topic?"),o("".concat(r5.v2,": history delete -> ").concat(Number(e))),!e)return[3,2];return[4,fetch("/api/v1/plus/ai/help/history/".concat(r),{method:"DELETE"})];case 1:t.sent(),i(),l(function(e){var t=new URLSearchParams(e);return t.delete("c"),t.append("d","1"),t}),t.label=2;case 2:return[2]}})})()}}))})))}function iK(e){var t=(0,r6.U)().isHistoryEnabled;return iB.createElement("aside",{className:"ai-help-history",tabIndex:-1},t?iB.createElement(iY,e):iB.createElement(iJ,null))}function iY(e){var t,n=e.currentChatId,r=e.lastUpdate,i=e.isFinished,l=e.messageId,o=(0,r3.db)(),a=(0,r4.Ay)("/api/v1/plus/ai/help/history/list",function(e){return iZ(function(){var t;return iW(this,function(n){switch(n.label){case 0:return[4,fetch(e)];case 1:return[4,n.sent().json()];case 2:return[2,Array.isArray(t=n.sent())?t:[]]}})})()},{fallbackData:[]}),s=a.data,u=a.mutate,c=(null!=(t=s.find(function(e){return e.chat_id===n}))?t:{}).label,f=void 0===c?"":c;return(0,x.useEffect)(function(){i&&l&&""===f&&iZ(function(){var e;return iW(this,function(t){switch(t.label){case 0:return[4,fetch("/api/v1/plus/ai/help/history/summary/".concat(l),{method:"POST"})];case 1:if(!(e=t.sent()).ok)return[3,3];return[4,e.json()];case 2:t.sent(),u(),t.label=3;case 3:return[2]}})})()},[u,i,n,l,f]),(0,x.useEffect)(function(){u()},[r,u]),iB.createElement(iB.Fragment,null,iB.createElement("input",{id:"ai-help-history-toggle",onChange:function(e){return o("".concat(r5.v2,": history toggle"))},type:"checkbox",className:"ai-help-history-details"}),iB.createElement("div",{className:"ai-help-history-toggle"},iB.createElement("label",{className:"button action has-icon",htmlFor:"ai-help-history-toggle"},iB.createElement("span",{className:"button-wrap"},iB.createElement("span",{className:"icon icon-sidebar"}),iB.createElement("span",{className:"show-history"},"Show History"),iB.createElement("span",{className:"hide-history"},"Hide History")))),iB.createElement("ol",null,(function(e){var t=new Date(new Date().toDateString()),n=new Date(structuredClone(t).setDate(t.getDate()-1)),r=new Date(structuredClone(t).setDate(t.getDate()-7)),i=[{label:"Last 30 Days",d:new Date(structuredClone(t).setDate(t.getDate()-30))},{label:"Last 7 Days",d:r},{label:"Yesterday",d:n},{label:"Today",d:t}],l=[],o=i.pop()||{},a=o.label,s=void 0===a?"unknown":a,u=o.d,c={label:s,entries:[]},f=!0,p=!1,d=void 0;try{for(var h,m=e[Symbol.iterator]();!(f=(h=m.next()).done);f=!0){for(var g,y,v=h.value,b=new Date(v.last);!u||b<u;){if(u){if(b<u){y=(g=i.pop()||{}).label,s=void 0===y?"unknown":y,u=g.d;continue}}else s=b.toLocaleString(void 0,{month:"short",year:"numeric"});break}c.label!==s?(l.push(c),c={label:s,entries:[v]}):c.entries.push(v)}}catch(e){p=!0,d=e}finally{try{f||null==m.return||m.return()}finally{if(p)throw d}}return c.entries.length&&l.push(c),l})(s).map(function(e,t){return(null==e?void 0:e.entries.length)?iB.createElement("li",{key:t},iB.createElement(iG,{entries:e,currentChatId:n,mutate:u})):null})))}function iJ(){var e=(0,iT.Ym)(),t=(0,r3.db)();return iB.createElement("section",{className:"ai-help-history-activation"},iB.createElement("figure",null,iB.createElement(iw.v,{name:"history"}),iB.createElement("figcaption",null,iB.createElement("p",null,iB.createElement("strong",null,"Answer History")),iB.createElement("p",null,iB.createElement("span",{className:"teaser"},"You can now effortlessly revisit and continue past conversations")),iB.createElement("p",null,iB.createElement(iF.$,{type:"link",href:"/".concat(e,"/plus/settings#ai-help--history-enable"),onClickHandler:function(){return t("".concat(r5.v2,": history enable"))}},"Enable History")))))}var iX=n(79428),i0=n(44171),i1=n(1908);function i2(){return(i2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let i4=(0,x.forwardRef)(({title:e,titleId:t,...n},r)=>x.createElement("svg",i2({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 64 64",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,l||(l=x.createElement("path",{fill:"#DFBD0A",d:"M56.273 21.59a.5.5 0 0 1 .5-.5H61.5a.5.5 0 0 1 .5.5v2.82a.5.5 0 0 1-.5.5h-4.727a.5.5 0 0 1-.5-.5v-2.82ZM20 21.59a.5.5 0 0 1 .5-.5h4.727a.5.5 0 0 1 .5.5v2.82a.5.5 0 0 1-.5.5H20.5a.5.5 0 0 1-.5-.5v-2.82ZM42.41 2a.5.5 0 0 1 .5.5v4.727a.5.5 0 0 1-.5.5h-2.82a.5.5 0 0 1-.5-.5V2.5a.5.5 0 0 1 .5-.5h2.82ZM27.13 7.13a.5.5 0 0 1 .708 0l3.359 3.373a.5.5 0 0 1-.002.708L29.192 13.2a.5.5 0 0 1-.705 0l-3.36-3.345a.5.5 0 0 1-.002-.707l2.004-2.018Zm23.673 4.062a.5.5 0 0 1-.001-.707l3.342-3.357a.5.5 0 0 1 .708 0l2.02 2.02a.5.5 0 0 1 0 .708l-3.358 3.342a.5.5 0 0 1-.706 0l-2.005-2.006Zm-6.485 28.99a.5.5 0 0 1 .5.5v1.409A1.91 1.91 0 0 1 42.91 44h-3.818a1.909 1.909 0 0 1-1.91-1.91v-1.408a.5.5 0 0 1 .5-.5h6.637Zm-5.227-6.227a.5.5 0 0 0 .5.5h2.818a.5.5 0 0 0 .5-.5v-3.178c0-.229.156-.427.374-.494A7.622 7.622 0 0 0 48.636 23a7.636 7.636 0 0 0-15.272 0 7.622 7.622 0 0 0 5.353 7.283.523.523 0 0 1 .374.494v3.178Z"})),o||(o=x.createElement("path",{fill:"#347A3F",d:"M45.35 36.304h-9.143v-7.257h9.143v7.257Z"})),a||(a=x.createElement("ellipse",{cx:40.78,cy:22.697,fill:"#347A3F",rx:10.058,ry:9.978})),s||(s=x.createElement("path",{fill:"currentColor",d:"M19.722 44.278h8.861l-8.86-8.861v8.86ZM5.222 33h16.111L31 42.667v16.11A3.222 3.222 0 0 1 27.778 62H5.222A3.221 3.221 0 0 1 2 58.778V36.222A3.211 3.211 0 0 1 5.222 33Zm0 3.222v22.556h22.556V47.5H16.5V36.222H5.222Z"}))));function i3(){return(i3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let i5=(0,x.forwardRef)(({title:e,titleId:t,...n},r)=>x.createElement("svg",i3({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 64 64",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,u||(u=x.createElement("mask",{id:"a",fill:"#fff"},x.createElement("path",{fillRule:"evenodd",d:"M23.642 62.177c12.029.372 20.52-6.63 20.52-17.104 0-10.473-6.43-18.624-18.75-20.822-9.824-1.753-23.35 5.887-23.35 16.36-.572 5.817 2.853 11.633 7.693 15.757.093.559.3 2.015.133 3.003-.197 1.164-1.103 2.797-1.103 2.797s2.632.1 3.89-.565c.779-.412 1.65-1.304 2.124-1.827 2.912 1.516 5.99 2.401 8.843 2.401Z",clipRule:"evenodd"}))),c||(c=x.createElement("path",{fill:"currentColor",d:"m23.642 62.177.093-2.998-.046-.002h-.047v3Zm1.77-37.926.527-2.954-.527 2.954ZM2.062 40.61l2.986.294.014-.147v-.147h-3Zm7.693 15.757 2.96-.49-.18-1.082-.834-.711-1.946 2.283Zm.133 3.003-2.958-.5 2.958.5Zm-1.103 2.797-2.623-1.456-2.37 4.268 4.878.186.115-2.998Zm3.89-.565-1.402-2.652 1.403 2.652Zm2.124-1.827 1.385-2.66-2.055-1.07-1.554 1.717 2.224 2.013Zm26.363-14.703c0 4.366-1.742 7.882-4.667 10.312-2.962 2.462-7.336 3.961-12.76 3.794l-.185 5.997c6.604.204 12.49-1.612 16.78-5.177 4.328-3.597 6.832-8.819 6.832-14.926h-6ZM24.885 27.204c5.61 1.001 9.636 3.307 12.257 6.323 2.616 3.01 4.02 6.941 4.02 11.546h6c0-5.868-1.812-11.25-5.491-15.482-3.674-4.228-9.023-7.097-15.732-8.294l-1.054 5.907ZM5.062 40.611c0-3.866 2.52-7.577 6.628-10.25 4.1-2.669 9.173-3.874 13.195-3.157l1.053-5.907c-5.802-1.035-12.403.703-17.521 4.035-5.112 3.327-9.355 8.673-9.355 15.28h6Zm6.639 13.474c-4.438-3.78-7.092-8.718-6.653-13.18l-5.971-.588c-.706 7.172 3.49 13.867 8.733 18.335l3.89-4.567Zm1.145 5.787c.263-1.555-.048-3.49-.131-3.995l-5.92.982c.039.23.1.64.133 1.078.037.483.024.804.002.934l5.916 1Zm-4.061 2.296a1337.723 1337.723 0 0 0 2.623 1.455l.001-.001.002-.003.004-.008.013-.023a10.822 10.822 0 0 0 .17-.321c.104-.204.246-.49.396-.821.27-.596.685-1.59.852-2.574L6.93 58.87c-.03.179-.167.584-.4 1.096a12.841 12.841 0 0 1-.37.75v-.002l.001-.002 2.624 1.455Zm2.488-3.217c.051-.027-.03.02-.32.079-.263.052-.578.09-.908.113a12.688 12.688 0 0 1-1.151.027h.004l-.113 2.998-.114 2.998h.02l.036.002.115.003c.095.001.226.003.385.002.315 0 .753-.01 1.245-.045.828-.06 2.369-.219 3.607-.873l-2.806-5.304Zm1.302-1.188c-.198.218-.463.495-.74.747-.305.276-.5.408-.562.441l2.806 5.304c1.3-.689 2.488-1.962 2.944-2.465l-4.448-4.027Zm11.067 1.414c-2.26 0-4.861-.71-7.458-2.062l-2.77 5.322c3.228 1.68 6.78 2.74 10.228 2.74v-6Z",mask:"url(#a)"})),f||(f=x.createElement("path",{fill:"#347A3F",fillRule:"evenodd",d:"M44.468 32.24c-9.66.3-16.34-5.279-16.138-13.627.202-8.348 3.525-16.6 15.45-16.605 7.998-.003 18.627 4.685 18.424 13.033.353 4.713-2.608 9.426-6.674 12.724-.049.544-.101 1.5.051 2.163.21.914 1.008 2.156 1.008 2.156s-2.102.25-3.138-.199c-.758-.328-1.652-1.184-1.965-1.498-2.329 1.17-4.768 1.852-7.018 1.852Z",clipRule:"evenodd"})),p||(p=x.createElement("path",{fill:"#DFBD0A",stroke:"#DFBD0A",d:"M44.27 18.9c-.839-1.154-2.498-2.02-2.498-2.02s2.495 1.023 3.301.29c.638-.578.662-2.161.662-2.161l1.676 2.308 2.623 1.012-1.5 1.008.444 2.74-1.944-1.733-4.23 2.448s2.42-2.578 1.465-3.892Z"})),d||(d=x.createElement("path",{stroke:"#DFBD0A",d:"M23.698 34.291c3.661-3.543 4.591-6.916 9.375-9.074m-10.237 17.58c7.465-5.14 9.324-13.4 17.535-16.275M32.17 41.94s1.938-2.583 3.153-4.457c1.215-1.873 4.99-4.186 4.99-4.186"}))));function i6(){return(i6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let i7=(0,x.forwardRef)(({title:e,titleId:t,...n},r)=>x.createElement("svg",i6({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 64 64",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,h||(h=x.createElement("path",{fill:"#347A3F",d:"M44.777 41.95a8.109 8.109 0 0 0 .748-2.307 8.026 8.026 0 0 0-.333-3.943c-.87-2.56-2.965-4.396-5.49-4.813a6.693 6.693 0 0 0-1.509-.075 7.124 7.124 0 0 0-2.05-2.248 6.661 6.661 0 0 0-2.752-1.13l-.044-.008-.017-.002c-3.06-.505-6.122 1.168-7.577 4.137a6.84 6.84 0 0 0-2.908.831 7.439 7.439 0 0 0-2.355 2.034 8.123 8.123 0 0 0-1.58 3.645c-.31 1.877.04 3.794.983 5.38a8.109 8.109 0 0 0-.748 2.307 8.027 8.027 0 0 0 .333 3.943c.515 1.515 1.47 2.804 2.728 3.683a6.702 6.702 0 0 0 4.27 1.205 7.125 7.125 0 0 0 2.051 2.248 6.662 6.662 0 0 0 2.752 1.13l.044.008.018.002c3.061.505 6.123-1.168 7.579-4.14 1.009-.054 2-.337 2.908-.831a7.44 7.44 0 0 0 2.355-2.034 8.11 8.11 0 0 0 1.578-3.642c.31-1.877-.042-3.794-.984-5.38ZM31.65 56.01l-.007-.002a5.093 5.093 0 0 1-3.137-1.856c.061-.023.122-.048.182-.074l6.145-2.539a.955.955 0 0 0 .394-.3c.105-.136.176-.298.204-.47l1.392-8.445 2.116 1.85c.011.008.02.02.026.033a.095.095 0 0 1 .008.043l-1.152 6.99c-.515 3.106-3.276 5.24-6.171 4.77Zm-10.421-7.03a6.024 6.024 0 0 1-.24-2.928 6.16 6.16 0 0 1 .236-.95c.037.034.101.093.148.133l5.005 4.377a.872.872 0 0 0 .916.151l7.502-3.098-.482 2.922v.005a.097.097 0 0 1-.046.067l-6.212 2.565a5.051 5.051 0 0 1-2.745.32 5.047 5.047 0 0 1-2.5-1.186 5.537 5.537 0 0 1-1.582-2.377Zm.688-13.31c.8-1.04 1.911-1.756 3.138-2.02-.008.052-.026.143-.037.206l-1.14 6.916v.006c-.03.171-.015.347.041.509a.955.955 0 0 0 .276.411l6.111 5.342-2.597 1.072a.081.081 0 0 1-.08-.005l-5.06-4.426a5.538 5.538 0 0 1-1.579-2.38 6.045 6.045 0 0 1-.237-2.933 6.052 6.052 0 0 1 1.164-2.698Zm18.562 8.03-6.11-5.342 2.597-1.072a.08.08 0 0 1 .08.005l5.06 4.423a5.534 5.534 0 0 1 1.58 2.38 6.04 6.04 0 0 1 .24 2.933c-.39 2.36-2.11 4.246-4.307 4.721l1.174-7.122.002-.008a1.042 1.042 0 0 0-.041-.507.956.956 0 0 0-.275-.411Zm2.97-3.404a8.439 8.439 0 0 0-.148-.133l-5.005-4.377a.874.874 0 0 0-.915-.151l-7.503 3.098.482-2.922v-.005a.094.094 0 0 1 .047-.067l6.211-2.562a5.041 5.041 0 0 1 2.746-.321c2.897.477 4.831 3.388 4.318 6.5-.052.319-.13.634-.232.94Zm-15.602 2.777-2.116-1.85a.087.087 0 0 1-.027-.033.095.095 0 0 1-.008-.043l1.153-6.99c.514-3.109 3.28-5.242 6.176-4.765a5.105 5.105 0 0 1 3.142 1.858l-.182.073-6.145 2.539a.955.955 0 0 0-.394.301 1.042 1.042 0 0 0-.204.469v.006l-1.395 8.435Zm1.768-2.752 3.342-1.38 2.722 2.378-.62 3.76-3.341 1.378-2.722-2.378.62-3.758Z"})),m||(m=x.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M32.182 2.004c8.898.12 17.51 3.11 24.56 8.511a.981.981 0 0 1 .16 1.397l-.455.564a1.021 1.021 0 0 1-1.431.149 37.447 37.447 0 0 0-23.392-8.159 37.44 37.44 0 0 0-22.568 7.521 1.021 1.021 0 0 1-1.426-.188l-.426-.56a.982.982 0 0 1 .197-1.391 41.306 41.306 0 0 1 24.781-7.844Z",clipRule:"evenodd"})),g||(g=x.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M32.5 11.862a25.894 25.894 0 0 1 15.097 5.11c.443.33.51.961.164 1.391l-.137.17c-.346.43-.972.496-1.417.171a22.708 22.708 0 0 0-13.442-4.379 22.71 22.71 0 0 0-13.68 4.557c-.454.34-1.103.267-1.447-.184l-.57-.75a.97.97 0 0 1 .2-1.386 25.894 25.894 0 0 1 15.231-4.7Z",clipRule:"evenodd"})),y||(y=x.createElement("g",{clipPath:"url(#a)"},x.createElement("path",{fill:"#DFBD0A",d:"m59.666 19.664-.84 1.833-1.827.834 1.827.84.84 1.826.833-1.826 1.834-.84-1.834-.834m-7.5.167-1.666 3.667-3.667 1.666 3.667 1.667 1.666 3.667 1.667-3.667 3.667-1.667-3.667-1.666m5 3.666-.84 1.827-1.827.84 1.827.833.84 1.834.833-1.834 1.834-.833-1.834-.84"}))),v||(v=x.createElement("defs",null,x.createElement("clipPath",{id:"a"},x.createElement("path",{fill:"#fff",d:"M47 19h16v16H47z"})))))),i9=n.p+"ai-help_dark.046ff33d604ca485.png";var i8=n(35703),le=n(96540);function lt(){return le.createElement("div",{className:"ai-help-landing"},le.createElement(iP.A,{extraClasses:"ai-help-landing-top"},le.createElement("div",null,le.createElement("h1",null,"Utilize AI Help to ",le.createElement("em",null,"boost")," your productivity"),le.createElement("p",null,"Receive MDN-sourced answers complete with consulted links"),le.createElement(ln,{placement:"top"})),le.createElement("figure",null,le.createElement(i0.A,{srcDark:i9,srcLight:i8,alt:"Screenshot of AI Help"}))),le.createElement("div",{className:"ai-help-landing-features"},le.createElement(iP.A,null,le.createElement("h2",null,"New Additions"),le.createElement("div",{className:"ai-help-new-additions"},le.createElement("figure",null,le.createElement(i5,{role:"none"}),le.createElement("figcaption",null,le.createElement("h3",null,"History"),le.createElement("p",null,"Save your history to revisit your chats at anytime"))),le.createElement("figure",null,le.createElement(i4,{role:"none"}),le.createElement("figcaption",null,le.createElement("h3",null,"Enhanced Context"),le.createElement("p",null,"Ask queries about browser compatibility data"))),le.createElement("figure",null,le.createElement(i7,{role:"none"}),le.createElement("figcaption",null,le.createElement("h3",null,"GPT-4o-Powered"),le.createElement("p",null,"Unlock GPT-4o's full potential with our paid subscriptions")))))),le.createElement(iP.A,{extraClasses:"ai-help-landing-bottom"},le.createElement("h2",null,"Boost Your Productivity with AI-Assisted Help on MDN"),le.createElement("ul",{className:"highlights"},le.createElement("li",null,le.createElement("em",null,"Direct Access to Information"),": We provide the verified links checked by AI for your answers, enabling you to dive directly into them at your preferred pace for a comprehensive understanding."),le.createElement("li",null,le.createElement("em",null,"Summarized Insights"),": We provide quick, concise summary of your questions, making it easy to grasp key points without extensive reading."),le.createElement("li",null,le.createElement("em",null,"Interactive Learning"),": We've integrated this with our Playground feature, allowing you to directly experiment with the code provided, verify solutions, and enhance your understanding through practical application.")),le.createElement(ln,{placement:"bottom"})))}function ln(e){var t=e.placement;return le.createElement(i1._,{logInGleanContext:"".concat(r5.v2,": banner-login ").concat(t),signUpGleanContext:"".concat(r5.v2,": banner-signup ").concat(t)})}var lr=n(62225),li=n(91554);function ll(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function la(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function ls(e,t){if(null==e)return{};var n,r,i,l={};if("u">typeof Reflect&&Reflect.ownKeys){for(i=0,n=Reflect.ownKeys(e);i<n.length;i++)r=n[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r]);return l}if(l=function(e,t){if(null==e)return{};var n,r,i={},l=Object.getOwnPropertyNames(e);for(r=0;r<l.length;r++)n=l[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(e,t),Object.getOwnPropertySymbols)for(i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r=n[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r]);return l}function lu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var l=[],o=!0,a=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(l.push(n.value),!t||l.length!==t);o=!0);}catch(e){a=!0,r=e}finally{try{o||null==i.return||i.return()}finally{if(a)throw r}}return l}}(e,t)||lf(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lc(e){return function(e){if(Array.isArray(e))return ll(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||lf(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lf(e,t){if(e){if("string"==typeof e)return ll(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ll(e,t)}}var lp=[{category:"css",query:"How to center a div with CSS?"},{category:"html",query:"How do I create a form in HTML?"},{category:"js",query:"How can I sort an Array in JavaScript?"},{category:"apis",query:"How can I use the Fetch API to make HTTP requests in JavaScript?"},{category:"http",query:"How can I redirect using HTTP?"},{category:"learn",query:"What are some accessibility best practices?"}];function ld(){document.title="AI Help | ".concat(iO.U6),(0,iT.bs)();var e=(0,iS.P_)(),t=(0,iT.Ju)().setViewed;return(0,x.useEffect)(function(){return t(iO.mQ.PLUS_AI_HELP)}),x.createElement("div",{className:"ai-help"},(null==e?void 0:e.isAuthenticated)?x.createElement(lh,null):x.createElement(lt,null))}function lh(){var e=(0,r3.db)();return x.createElement("div",{className:"ai-help-main with-ai-help-history"},x.createElement(iP.A,{extraClasses:"ai-help-header"},x.createElement("h1",null,x.createElement("span",null,"AI Help")),x.createElement("p",null,"Get answers using generative AI based on MDN content."),x.createElement("p",null,x.createElement("a",{href:"https://survey.alchemer.com/s3/7418589/MDN-AI-Help-Feedback",target:"_blank",rel:"noreferrer noopener",className:"feedback-link",onClick:function(){return e("".concat(r5.v2,": report feedback"))}},"Report Feedback"))),x.createElement(lv,null))}function lm(e){var t=e.message,n=e.canEdit,r=e.submit,i=e.nextPrev,l=e.siblingCount,o=(0,r3.db)(),a=lu((0,x.useState)(!1),2),s=a[0],u=a[1],c=lu((0,x.useState)(t.content),2),f=c[0],p=c[1],d=(0,x.useRef)(null),h=l(t.messageId),m=h.pos,g=h.total;return(0,x.useEffect)(function(){p(t.content)},[t.content]),s?x.createElement("form",{className:"ai-help-input-form",onSubmit:function(e){e.preventDefault(),n&&(null==f?void 0:f.trim())&&(o("".concat(r5.v2,": edit submit")),u(!1),r(f,t.chatId,t.parentId,t.messageId))}},x.createElement(iH.A,{ref:d,maxLength:25e3,enterKeyHint:"send",onKeyDown:function(e){"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),n&&(null==f?void 0:f.trim())&&(o("".concat(r5.v2,": edit submit")),u(!1),r(f,t.chatId,t.parentId,t.messageId)))},onChange:function(e){return p(e.target.value)},value:f,rows:1}),x.createElement("div",{className:"ai-help-input-actions"},n&&x.createElement(x.Fragment,null,f&&x.createElement(iF.$,{type:"action",icon:"cancel",buttonType:"reset",title:"Clear question",onClickHandler:function(){o("".concat(r5.v2,": edit clear")),p("")}},x.createElement("span",{className:"visually-hidden"},"Clear question")),x.createElement(iF.$,{type:"action",icon:"send",buttonType:"submit",title:"Submit question",isDisabled:!f.trim()},x.createElement("span",{className:"visually-hidden"},"Submit question"))),x.createElement(iF.$,{type:"action",icon:"return",title:"Undo editing",onClickHandler:function(){o("".concat(r5.v2,": edit cancel")),u(!1),p(t.content)}},x.createElement("span",{className:"visually-hidden"},"Undo editing")))):x.createElement("div",{className:"ai-help-message-content role-user"},g>1&&x.createElement("nav",{className:"ai-help-message-nav"},x.createElement(iF.$,{icon:"previous",type:"action",isDisabled:1===m,onClickHandler:function(){o("".concat(r5.v2,": question prev")),i(t.messageId,"prev")}},x.createElement("span",{className:"visually-hidden"},"Previous Question")),x.createElement("span",null,m," / ",g),x.createElement(iF.$,{isDisabled:m===g,icon:"next",type:"action",onClickHandler:function(){o("".concat(r5.v2,": question next")),i(t.messageId,"next")}},x.createElement("span",{className:"visually-hidden"},"Next Question"))),x.createElement("div",{className:"ai-help-user-message"},t.content),n&&x.createElement(iF.$,{type:"action",icon:"edit-filled",onClickHandler:function(){o("".concat(r5.v2,": edit start")),u(!0)}}))}function lg(e){var t,n=e.message,r=e.queuedExamples,i=e.setQueue,l=e.messages,o=e.retryLastQuestion,a=(0,r3.db)(),s=(0,iT.Ym)(),u=(0,iX.Ed)().highlightedQueueExample,c=0,f=n.role===ig.Assistant&&((null==(t=n.content)?void 0:t.startsWith(r7))||n.status===iy.Complete&&r7.startsWith(n.content));return f&&(n=la(lo({},n),{content:"I'm sorry, but I can't answer questions outside web development.",sources:[]})),x.createElement(x.Fragment,null,!f&&x.createElement(ly,{message:n}),!f&&(n.content||n.status===iy.InProgress||n.status===iy.Errored)&&x.createElement("div",{className:["ai-help-message-progress",n.status===iy.InProgress&&"active",n.status===iy.Complete&&"complete",n.status===iy.Errored&&"errored",n.status===iy.Stopped&&"stopped"].filter(Boolean).join(" ")},function(e){switch(e){case iy.Errored:return x.createElement(x.Fragment,null,"Error generating your answer!"," Please"," ",x.createElement(iF.$,{type:"link",onClickHandler:o},"try again"),".");case iy.Stopped:return"Answer (stopped):";case iy.InProgress:return r8;default:return"Answer:"}}(n.status)),n.content&&x.createElement("div",{className:["ai-help-message-content",!n.content&&"empty","role-".concat(n.role)].filter(Boolean).join(" ")},x.createElement(nB,{remarkPlugins:[rX],components:{a:function(e){e.node;var t,n,r=ls(e,["node"]);(null==(n=r.href)?void 0:n.startsWith("https://developer.mozilla.org/"))&&(r.href=r.href.replace("https://developer.mozilla.org",""));var i=(0,r6.t)(null!=(t=r.href)?t:"");return i&&(r.className="external",r.rel="noopener noreferrer"),r.onClick=function(){return a("".concat(r5.v2,": link ").concat(i?"external":"internal"," -> ").concat(r.href))},r.target="_blank",x.createElement("a",r)},pre:function(e){e.node;var t=e.className,l=e.children,o=ls(e,["node","className","children"]),f=x.Children.toArray(l).map(function(e){var t,n;return null==(t=/language-(\w+)/.exec((null==e||null==(n=e.props)?void 0:n.className)||""))?void 0:t[1]}).find(Boolean);if(!f)return x.createElement("pre",la(lo({},o),{className:t}),l);var p=c,d="".concat(n.messageId,"--").concat(p),h=r.has(d);return c+=1,x.createElement("div",{className:"code-example"},x.createElement("div",{className:"example-header play-collect ".concat(u===d?"active":"")},x.createElement("span",{className:"language-name"},f),n.status===iy.Complete&&["html","js","javascript","css"].includes(f.toLowerCase())&&x.createElement("div",{className:"playlist"},x.createElement("input",{type:"checkbox",checked:h,onChange:function(){a("".concat(r5.v2,": example ").concat(h?"dequeue":"queue"," -> ").concat(d)),i(function(e){return e.some(function(e){return e.id===d})?lc(e).filter(function(e){return e.id!==d}):lc(e).concat([(0,iU.G)(d)]).sort(function(e,t){return e.key-t.key})})},id:d}),x.createElement("label",{htmlFor:d},h?"queued":"queue"),x.createElement("button",{type:"button",className:"play-button",title:"Open in Playground",onClick:function(e){a("".concat(r5.v2,": example play -> ").concat(d));var t,n,r=null==(t=e.target.previousElementSibling)?void 0:t.previousElementSibling,i=(0,iL.cb)(r);sessionStorage.setItem(iq.FX,JSON.stringify(i));var l=new URL(null==(n=window)?void 0:n.location.href);l.pathname="/".concat(s,"/play"),l.hash="",l.search="",!0===e.shiftKey?window.location.href=l.href:window.open(l,"_blank")}},"play"))),x.createElement("pre",{className:"brush: ".concat(f)},l))},code:function(e){var t=e.className,n=e.children,r=ls(e,["className","children"]),i=/language-(\w+)/.exec(t||""),l=null==i?void 0:i[1];return x.createElement(li.n,lo({language:l,className:t},r),n)}}},n.content),"stopped"===n.status&&x.createElement("section",{className:"stopped-message"},"■\xa0Stopped answering"),("complete"===n.status||f)&&x.createElement(x.Fragment,null,x.createElement("section",{className:"ai-help-feedback"},!f&&x.createElement(iN.T,{feature:"ai-help-answer",featureKey:n.messageId,question:"Was this answer useful?",upLabel:"Yes, this answer was useful.",downLabel:"No, this answer was not useful."}),x.createElement(lk,{messages:l,currentMessage:n},"Report an issue with this answer on GitHub")))))}function ly(e){var t=e.message,n=(0,r3.db)();return x.createElement(x.Fragment,null,x.createElement("div",{className:["ai-help-message-progress",t.status===iy.Pending?"active":"complete"].filter(Boolean).join(" ")},t.status===iy.Pending?r9:"Consulted MDN content:"),t.sources&&t.sources.length>0&&x.createElement("ul",{className:"ai-help-message-sources"},t.sources.map(function(e,t){var r=e.url,i=e.title;return x.createElement("li",{key:t},x.createElement(lr.A,{to:r,onClick:function(){return n("".concat(r5.v2,": link source -> ").concat(r))},target:"_blank"},i))})))}function lv(){var e,t,n,r,i,l,o,a,s,u,c,f=(0,x.useRef)(null),p=(0,x.useRef)(null),d=(0,x.useRef)(null),h=(0,x.useRef)(null),m=lu((0,x.useState)(""),2),g=m[0],y=m[1],v=lu((0,x.useState)(!1),2),b=v[0],k=v[1],w=(0,iX.Ed)(),E=w.queuedExamples,S=w.setQueue,C=w.setHighlightedQueueExample,I=(0,r0.zy)().hash,A=(0,r3.db)(),D=(0,iS.P_)(),P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.messageTemplate,n=void 0===t?function(e){return e}:t,r=(0,r3.db)(),i=(0,x.useRef)(),l=ic((0,r0.ok)(),2),o=l[0],a=l[1],s=ic((0,x.useState)("idle"),2),u=s[0],c=s[1],f=(0,r6.U)().isHistoryEnabled,p="loading"===u,d="responding"===u,h="failed"===u,m="finished"===u,g=ic((0,x.useState)(!0),2),y=g[0],v=g[1],b=ic((0,x.useState)(!1),2),k=b[0],w=b[1],E=ic((0,x.useState)(),2),S=E[0],C=E[1],I=ic((0,x.useState)(new Date),2),A=I[0],D=I[1],P=ic((0,x.useReducer)(function(e,t){return null===t?[]:id(e).concat([t])},[]),2),O=P[0],T=P[1],L=ic((0,x.useState)(),2),M=L[0],F=L[1],N=ic((0,x.useState)(),2),R=N[0],j=N[1],_=ic((0,x.useState)(),2),z=_[0],H=_[1],q=ic((0,x.useState)([]),2),U=q[0],B=q[1],V=ic((0,x.useReducer)(ik,void 0,function(){return{root:[],nodes:{}}}),2),$=V[0],Z=V[1],W=ic((0,x.useState)([]),2),Q=W[0],G=W[1],K=ic((0,x.useState)(void 0),2),Y=K[0],J=K[1],X=(0,r4.Ay)(ie.i9,function(e){return il(function(){var t,n;return im(this,function(r){switch(r.label){case 0:return[4,fetch(e)];case 1:if((t=r.sent()).ok)return[3,3];return[4,t.text()];case 2:throw n=r.sent(),Error("".concat(t.status," on ").concat(e,": ").concat(n));case 3:return[4,t.json()];case 4:return[2,r.sent().quota]}})})()}).data,ee=(0,x.useRef)(),et=(0,x.useCallback)(function(e){var t;r("".concat(r5.v2,": error")),null==(t=i.current)||t.close(),i.current=void 0,c("failed"),(0,r2.j)(ie.i9),console.error(e)},[r]),en=(0,x.useCallback)(function(){j(M),F(void 0),eo(),a(function(e){return e.delete("c"),e.delete("d"),e}),B([]),G([]),Z({type:"reset"})},[a,M]),er=(0,x.useCallback)(function(){a(function(e){return e.delete("c"),e},{replace:!0})},[a]);(0,x.useEffect)(function(){if(!f)return void er();var e,t=o.get("c");if(t&&t!==M){w(!0);var n=function(){};(n=function(){return il(function(){var r,i,l;return im(this,function(a){switch(a.label){case 0:if(eo(),!(r=o.get("c"))||r!==t)return[2,window.clearTimeout(e)];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,ix.getMessages(t)];case 2:if(i=a.sent().treeState)window.clearTimeout(e),Object.values(i.nodes).some(function(e){return"in-progress"===e.response.status})?(c("responding"),e=window.setTimeout(function(){return n()},1e4)):c("finished"),j(void 0),F(t),B([]),Z({type:"set-state",treeState:i});else throw Error("no treeState");return[3,4];case 3:var s;return(l=a.sent(),j(void 0),B([]),Z({type:"reset"}),(null!=(s=Error)&&"u">typeof Symbol&&s[Symbol.hasInstance]?!!s[Symbol.hasInstance](l):l instanceof s)&&l.message.startsWith("404"))?(F(void 0),er()):(F(t),et(l)),[3,4];case 4:return w(!1),[2]}})})()})()}"1"===o.get("d")&&en()},[f,er,o,M,en,et]),(0,x.useEffect)(function(){void 0!==X&&J(X)},[X]),(0,x.useEffect)(function(){if("responding"===u){var e=window.setTimeout(function(){r("".concat(r5.v2,": timeout")),et("AI Help response timed out.")},15e3);return function(){return window.clearTimeout(e)}}},[S,u,et,r]);var ei=(0,x.useCallback)(function(e){try{if(C(new Date),T(e),"metadata"===e.type){var t,n=e.sources,r=void 0===n?void 0:n,i=e.quota,l=void 0===i?void 0:i,o=e.chat_id,a=e.message_id,s=e.parent_id;if(j(void 0),F(o),H(a),D(new Date),Array.isArray(r)){var u=function(e){Z({type:"set-metadata",sources:e,chatId:o,messageId:a,parentId:s})},f=0,p=[];r.forEach(function(e,t){var n=function(){return u(r.slice(0,t+1))};if(0===t)n();else{f+=250+750*Math.random();var i=window.setTimeout(n,f);p.push(i)}}),ee.current=function(){p.forEach(function(e){return window.clearTimeout(e)}),u(r),ee.current=void 0}}void 0!==l&&J(l);return}if(c("responding"),null==(t=ee.current)||t.call(ee),Z({type:"update",messageId:z,message:{status:"in-progress"}}),!e.id)return void console.warn("Received unsupported message",{data:e});var d=ic(e.choices,1)[0],h=d.delta.content,m=d.finish_reason;h&&Z({type:"append-content",messageId:z,content:h}),m&&("stop"!==m&&console.warn("Got unexpected finish_reason",{finish_reason:m}),c("finished"),D(new Date),Z({type:"update",messageId:z,message:{status:"stop"===m?"complete":"stopped"}}))}catch(e){et(e)}},[et,z]),el=(0,x.useCallback)(function(e,t,l,o){var a=o?function(e,t){if(!t||!e.nodes[t].parentId)return[e.root.length];var n=e.nodes[t].parentId,r=e.nodes[n].children.length,i=ib(e,n);return i.push(r),i}($,o):l?id(ib($,l)).concat([0]):[0];B(a),r("".concat(r5.v2,": submit question ").concat(a.length)),Z({type:"new",chatId:t,parentId:l,request:{status:"complete",role:"user",content:e,chatId:t,parentId:l},response:{status:"pending",role:"assistant",content:"",chatId:t,parentId:l}}),c("loading");var s=new r1("/api/v1/plus/ai/help",{headers:{"Content-Type":"application/json"},withCredentials:!0,payload:JSON.stringify({messages:iv($,a.slice(0,-1)).filter(function(e){return"complete"===e.status}).map(function(e){return{role:e.role,content:e.content}}).concat({role:"user",content:n(e)}),chat_id:t,parent_id:l})});s.addEventListener("error",et),s.addEventListener("message",function(e){ei(JSON.parse(e.data))}),s.stream(),i.current=s},[$,r,n,et,ei]);function eo(){var e;null==(e=i.current)||e.close(),i.current=void 0,c("idle"),T(null)}(0,x.useEffect)(function(){var e=iv($,U,!0);G(e),e.length&&v(!1)},[$,U,G]);var ea=(0,x.useCallback)(function(){R&&a(function(e){var t=new URLSearchParams(e);return t.set("c",R),t})},[a,R]),es=(0,x.useCallback)(function(e,t){var n=$.nodes[e],r=n.parentId?$.nodes[n.parentId].children:$.root,i=r.findIndex(function(t){return t.messageId===e});return"next"===t&&i<r.length-1?B(ib($,r[i+1].messageId||e)):"prev"===t&&i>0?B(ib($,r[i-1].messageId||e)):void 0},[$]),eu=(0,x.useCallback)(function(e){if(!e)return{pos:1,total:1};var t=$.nodes[e];if(!t)return{pos:1,total:1};var n=t.parentId?$.nodes[t.parentId].children:$.root;return{pos:n.findIndex(function(t){return t.messageId===e})+1,total:n.length}},[$]);return{submit:el,datas:O,stop:function(){eo(),Z({type:"update",message:{status:"stopped"}})},reset:en,unReset:ea,messages:Q,state:$,path:U,isFinished:m,isLoading:p,isHistoryLoading:k,isResponding:d,isInitializing:y,hasError:h,quota:Y,chatId:M,previousChatId:R,nextPrev:es,siblingCount:eu,lastUpdate:A}}(),O=P.isFinished,T=P.isLoading,L=P.isHistoryLoading,M=P.isResponding,F=P.isInitializing,N=P.hasError,R=P.datas,j=P.messages,_=P.quota,z=P.reset,H=P.unReset,q=P.stop,U=P.submit,B=P.chatId,V=P.previousChatId,$=P.nextPrev,Z=P.siblingCount,W=P.lastUpdate,Q=void 0===_,G=!Q&&null!==_,K=j.length>0,Y=(0,iC.dz)(D)?"GPT-4o":"GPT-4o mini";function J(e){return!!e&&e.remaining<=0}var X=(e=j,n=(t={bodyRef:d,footerRef:h}).bodyRef,r=t.footerRef,l=(i=lu((0,x.useState)(!1),2))[0],o=i[1],a=(0,x.useRef)(0),s=(0,x.useRef)(0),(0,x.useEffect)(function(){var e,t,i=null!=(e=n.current)?e:n.current=document.querySelector(".ai-help-body"),u=null!=(t=r.current)?t:r.current=document.querySelector(".ai-help-footer");if(i&&u){window.setTimeout(function(){var e=i.offsetTop,t=i.offsetHeight,n=e+t+u.offsetHeight-window.innerHeight,r=s.current<t&&a.current<n;s.current=t,a.current=window.scrollY,l&&r&&window.scrollTo(0,n)});var c=function(){var e=i.offsetTop,t=i.offsetHeight,n=window.innerHeight,r=window.scrollY,s=e+t+u.offsetHeight,c=r<=s&&s<=r+n,f=r-a.current;l&&f<0&&!c?o(!1):!l&&f>0&&c&&o(!0),a.current=r};return window.addEventListener("scroll",c),function(){return window.removeEventListener("scroll",c)}}},[l,n,e,r]),{autoScroll:l,setAutoScroll:o}),ee=X.autoScroll,et=X.setAutoScroll;(0,x.useEffect)(function(){var e=p.current;!e||F||K||window.setTimeout(function(){return e.focus()})},[Q,K,F]),(0,x.useEffect)(function(){var e=new Set(j.map(function(e){return e.messageId}));S(function(t){return lc(t).filter(function(t){var n=t.id;return e.has(n.split("--")[0])})})},[j,S]);var en=function(e){g.trim()&&(U(g.trim(),B,e),y(""),et(!0))},er=(0,x.useMemo)(function(){return j.filter(function(e){return"user"===e.role}).at(-1)},[j]),ei=(0,x.useCallback)(function(){er&&U(er.content,er.chatId,er.parentId,er.messageId)},[er,U]);return x.createElement(x.Fragment,null,x.createElement(iU._,{gleanContext:r5.v2}),x.createElement(iK,{currentChatId:B,lastUpdate:W,isFinished:O,messageId:2===j.length?null==(c=j[0])?void 0:c.messageId:void 0}),x.createElement(iP.A,null,x.createElement(iA,{isDisabled:J(_)}),Q||L?x.createElement(ij.R,null):x.createElement("section",{className:"ai-help-inner"},x.createElement("div",{ref:d,className:"ai-help-body"},K&&x.createElement("ul",{className:"ai-help-messages"},j.map(function(e,t){return x.createElement("li",{key:t,className:["ai-help-message","role-".concat(e.role),"status-".concat(e.status)].join(" ")},x.createElement("div",{className:"ai-help-message-role"},x.createElement(lb,{role:e.role})),"user"===e.role?x.createElement(lm,{message:e,submit:U,canEdit:!J(_),nextPrev:$,siblingCount:Z}):x.createElement(lg,{message:e,queuedExamples:E,setQueue:S,messages:j,retryLastQuestion:ei}))}))),N&&x.createElement(iR.A,{extraClasses:"ai-help-error",type:"error"},x.createElement("h4",null,"Error"),x.createElement("p",null,"An error occurred."," ",er&&x.createElement(x.Fragment,null,"Please"," ",x.createElement(iF.$,{type:"link",onClickHandler:ei},"try again"),"."))),x.createElement("div",{ref:h,className:"ai-help-footer"},(T||M)&&x.createElement("div",{className:"ai-help-footer-actions"},x.createElement(iF.$,{type:"action",isDisabled:!M,extraClasses:"ai-help-stop-button",onClickHandler:function(){A("".concat(r5.v2,": stop")),q()}},"■ Stop answering"),x.createElement(iF.$,{type:"action",isDisabled:ee,extraClasses:"ai-help-scroll-button",onClickHandler:function(){return et(!0)}},"↓ Enable auto-scroll")),J(_)?x.createElement(iD,{limit:_.limit}):x.createElement(x.Fragment,null,x.createElement("div",{className:"ai-help-refine-or-new"},K&&x.createElement(iF.$,{type:"action",icon:"new-topic",isDisabled:T||M||J(_),extraClasses:"ai-help-new-question-button",onClickHandler:function(){A("".concat(r5.v2,": topic new")),y(""),S([]),C(null),z(),window.setTimeout(function(){return window.scrollTo(0,0)})}},"New Topic"),x.createElement("form",{ref:f,className:"ai-help-input-form",onSubmit:function(e){var t;e.preventDefault(),en(null==(t=j.at(-1))?void 0:t.messageId)}},x.createElement(iH.A,{ref:p,maxLength:25e3,autoFocus:!0,disabled:T||M,enterKeyHint:"send",onKeyDown:function(e){if("Enter"===e.key&&!e.shiftKey){var t;e.preventDefault(),en(null==(t=j.at(-1))?void 0:t.messageId)}},onChange:function(e){return y(e.target.value)},value:g,rows:1,placeholder:(u=T?r9:M?r8:K?"Ask your follow up question":"Ask your question",G?"".concat(u," (").concat(_.remaining," ").concat(1===_.remaining?"question":"questions"," remaining today)"):u)}),x.createElement("div",{className:"ai-help-input-actions"},g||K?g?x.createElement(iF.$,{type:"action",icon:"cancel",buttonType:"reset",title:"Clear question",onClickHandler:function(){A("".concat(r5.v2,": clear")),y("")}},x.createElement("span",{className:"visually-hidden"},"Reset question")):null:x.createElement(iF.$,{type:"action",icon:V?"return":"cancel",buttonType:"reset",title:V?"Return to previous question":"Cancel",isDisabled:!V,onClickHandler:function(){A("".concat(r5.v2,": ").concat(V?"topic return":"cancel")),H()}},x.createElement("span",{className:"visually-hidden"},"Previous question")),x.createElement(iF.$,{type:"action",icon:"send",buttonType:"submit",title:"Submit question",isDisabled:!g.trim()},x.createElement("span",{className:"visually-hidden"},"Submit question"))))),x.createElement("div",{className:"ai-help-footer-text"},x.createElement("span",null,"Results based on MDN's most recent documentation and powered by ",Y,", an LLM by"," ",x.createElement("a",{href:"https://platform.openai.com/docs/api-reference/models",className:"external",target:"_blank",rel:"noreferrer noopener"},"OpenAI"),". Please verify information independently as LLM responses may not be 100% accurate. Read our"," ",x.createElement(iF.$,{type:"link",onClickHandler:function(){return k(!0)}},"full guidance")," ","for more details."),x.createElement(i_.A,{isOpen:b,onRequestClose:function(){return k(!1)}},x.createElement("header",{className:"modal-header"},x.createElement("h2",{className:"modal-heading"},"AI Help Usage Guidance"),x.createElement(iF.$,{onClickHandler:function(){return k(!1)},type:"action",icon:"cancel",extraClasses:"close-button"})),x.createElement("div",{className:"modal-body"},x.createElement("p",null,"Our AI Help feature integrates GPT-4o mini for MDN Plus free users and GPT-4o for paying subscribers, leveraging Large Language Models (LLMs) developed by"," ",x.createElement("a",{href:"https://platform.openai.com/docs/api-reference/models",className:"external",target:"_blank",rel:"noreferrer noopener"},"OpenAI"),". This tool is designed to enhance your experience by providing relevant insights from MDN's extensive documentation. However, given the nature of LLMs, it's crucial to approach the generated information with a discerning eye, especially for complex or critical subjects."),x.createElement("p",null,"We encourage users to verify the AI Help's output. For convenience and accuracy, links for further reading and verification are provided at the beginning of responses, directing you to the relevant MDN documentation. This ensures immediate access to deeper insights and broader context."),x.createElement("p",null,"Remember, while AI Help aims to be a valuable resource, its responses, influenced by the complexities of AI, might not always hit the mark with absolute precision. We invite you to explore this feature, designed to complement your MDN exploration. Your feedback is invaluable as we continue to refine AI Help to better serve your needs.")))))),!K&&!g&&!J(_)&&x.createElement("section",{className:"ai-help-examples"},x.createElement("header",null,"Examples"),lp.map(function(e,t){var n=e.category,r=e.query;return x.createElement("button",{key:t,type:"button",className:["ai-help-example","category-".concat(n)].join(" "),onClick:function(){var e;A("".concat(r5.v2,": example ").concat(1+t)),y(r),null==(e=p.current)||e.focus(),window.setTimeout(function(){return window.scrollTo(0,0)})}},r)})),"#debug"===I&&x.createElement("pre",null,JSON.stringify({datas:R,messages:j,quota:_},null,2)))))}function lb(e){var t=e.role,n=(0,iS.P_)();switch(t){case"user":return x.createElement(iM.e,{userData:n});case"assistant":return x.createElement(iw.I,{name:"chatgpt"})}}function lk(e){var t,n=e.messages,r=e.currentMessage,i=e.children,l=(0,iS.P_)(),o=(0,x.useMemo)(function(){return(0,iC.dz)(l)},[l]),a=(0,r3.db)(),s=n.indexOf(r),u=n.slice(0,s).filter(function(e){return e.role===ig.User}).map(function(e){return e.content}),c=u.at(-1),f=new URL("https://github.com/");f.pathname="/".concat(iz.WI,"/issues/new");var p=new URLSearchParams;return p.set("title","[AI Help] Question: ".concat(c)),p.set("questions",u.map(function(e){return"1. ".concat(e)}).join("\n")),p.set("answer",r.content),p.set("sources",(null==(t=r.sources)?void 0:t.map(function(e){return"- [".concat(e.title,"](https://developer.mozilla.org").concat(e.url,")")}).join("\n"))||"(None)"),p.set("model",o?"gpt-4o":"gpt-4o mini"),p.set("template","ai-help-answer.yml"),f.search=p.toString(),x.createElement("a",{href:f.href,className:"external",title:"This will take you to GitHub to file a new issue.",target:"_blank",rel:"noopener noreferrer",onClick:function(){return a("".concat(r5.v2,": report issue"))}},i)}},60405(e,t,n){n.d(t,{W:()=>a});var r=n(2181),i=n(1908),l=n(72185),o=n(96540);function a(e){var t=e.children,n=e.className,a=e.gleanPrefix,s=(0,l.B)(),u=(0,r.db)();return o.createElement("div",{className:void 0===n?"login-banner":n},o.createElement("span",null,o.createElement("span",null,t)," ",o.createElement("strong",null,"Upgrade to"," ",o.createElement("a",{className:"plus-link",href:s,onClick:function(){return u("".concat(a,": banner-link"))}},"MDN Plus")," ","for free.")),o.createElement(i._,{logInGleanContext:"".concat(a,": banner-login"),signUpGleanContext:"".concat(a,": banner-signup")}))}},43304(e,t,n){n.d(t,{e:()=>i});var r=n(96540),i=function(e){var t=e.userData;return r.createElement("div",{className:(null==t?void 0:t.isSubscriber)?"avatar-wrap is-subscriber":"avatar-wrap","aria-hidden":"true"},r.createElement("img",{alt:"",className:"avatar",src:(null==t?void 0:t.avatarUrl)||"/assets/avatar.png"}))}},53108(e,t,n){n.d(t,{A:()=>i});var r=n(96540);function i(e){var t=e.children,n=e.extraClasses,i=e.optional;return r.createElement(r.Fragment,null,!0===i?r.createElement(r.Fragment,null,t):r.createElement("div",{className:"container ".concat(n||"")},t))}},44171(e,t,n){n.d(t,{A:()=>l});var r=n(5438),i=n(96540);function l(e){var t=e.srcLight,n=e.srcDark,l=e.alt,o=function(e,t){if(null==e)return{};var n,r,i,l={};if("u">typeof Reflect&&Reflect.ownKeys){for(i=0,n=Reflect.ownKeys(e);i<n.length;i++)r=n[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r]);return l}if(l=function(e,t){if(null==e)return{};var n,r,i={},l=Object.getOwnPropertyNames(e);for(r=0;r<l.length;r++)n=l[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(e,t),Object.getOwnPropertySymbols)for(i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r=n[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r]);return l}(e,["srcLight","srcDark","alt"]),a=(0,r.DP)();return i.createElement("picture",null,"os-default"===a&&i.createElement(i.Fragment,null,i.createElement("source",{srcSet:t,media:"(prefers-color-scheme: light)"}),i.createElement("source",{srcSet:n,media:"(prefers-color-scheme: dark)"})),i.createElement("img",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({src:"dark"===a?n:t,alt:l},o)))}},1908(e,t,n){n.d(t,{_:()=>o});var r=n(73511),i=n(99848),l=n(96540),o=function(e){var t=e.logInGleanContext,n=e.signUpGleanContext;return l.createElement("ul",{className:"auth-container"},l.createElement("li",null,l.createElement(r.A,{gleanContext:t})),l.createElement("li",null,l.createElement(i.$,{gleanContext:n})))}}};
3
- //# sourceMappingURL=6786.d37ed4aa6d7a5c1a.js.map
1
+ /*! For license information please see 6786.c180a40232e02d98.js.LICENSE.txt */
2
+ export const __rspack_esm_id="6786";export const __rspack_esm_ids=["6786"];export const __webpack_modules__={92849(e){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},o=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),l=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!l)return!1;for(r in e);return void 0===r||t.call(e,r)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;else if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,f=arguments[0],p=1,d=arguments.length,h=!1;for("boolean"==typeof f&&(h=f,f=arguments[1]||{},p=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});p<d;++p)if(t=arguments[p],null!=t)for(n in t)r=s(f,n),f!==(i=s(t,n))&&(h&&i&&(o(i)||(u=l(i)))?(u?(u=!1,c=r&&l(r)?r:[]):c=r&&o(r)?r:{},a(f,{name:n,newValue:e(h,c,i)})):void 0!==i&&a(f,{name:n,newValue:i}));return f}},19788(e){var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g;function u(e){return e?e.replace(s,""):""}e.exports=function(e,s){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];s=s||{};var c=1,f=1;function p(e){var t=e.match(n);t&&(c+=t.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function d(){var e={line:c,column:f};return function(t){return t.position=new h(e),y(r),t}}function h(e){this.start=e,this.end={line:c,column:f},this.source=s.source}h.prototype.content=e;var m=[];function g(t){var n=Error(s.source+":"+c+":"+f+": "+t);if(n.reason=t,n.filename=s.source,n.line=c,n.column=f,n.source=e,s.silent)m.push(n);else throw n}function y(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function v(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=d();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return f+=2,p(r),e=e.slice(n),f+=2,t({type:"comment",comment:r})}}y(r);var k,x=[];for(v(x);k=function(){var e=d(),n=y(i);if(n){if(b(),!y(l))return g("property missing ':'");var r=y(o),s=e({type:"declaration",property:u(n[0].replace(t,"")),value:r?u(r[0].replace(t,"")):""});return y(a),s}}();)!1!==k&&(x.push(k),v(x));return x}},29698(e,t){var n=Symbol.for("react.transitional.element");function r(e,t,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),"key"in t)for(var l in r={},t)"key"!==l&&(r[l]=t[l]);else r=t;return{$$typeof:n,type:e,key:i,ref:void 0!==(t=r.ref)?t:null,props:r}}t.Fragment=Symbol.for("react.fragment"),t.jsx=r,t.jsxs=r},74848(e,t,n){e.exports=n(29698)},35229(e,t,n){var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(51133)),i=n(98917);function l(e,t){var n={};return e&&"string"==typeof e&&(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}l.default=l,e.exports=l},98917(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,i=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){var u;return(void 0===t&&(t={}),!(u=e)||i.test(u)||n.test(u))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(o,s):e.replace(l,s)).replace(r,a))}},51133(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,i.default)(e),l="function"==typeof t;return r.forEach(function(e){if("declaration"===e.type){var r=e.property,i=e.value;l?t(r,i,e):i&&((n=n||{})[r]=i)}}),n};var i=r(n(19788))},62074(e,t,n){n.d(t,{G:()=>v,_:()=>m});var r=n(96540),i=n(97478),l=n(31256),o=n(5438),a=n(49351),s=n(79428),u=n(1086),c=n(2181),f=n(96540);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return p(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){var t=e.gleanContext,n=e.item,r=n.id,i=n.key,l=n.lang,o=e.unqueue,u=(0,c.db)(),p=(0,s.Ed)().setHighlightedQueueExample,d=function(){var e,t=document.getElementById(r);return null==t||null==(e=t.parentElement)?void 0:e.parentElement},h=function(e){p&&(e?p(r):p(null))},m=function(){var e=d(),t=((null==e?void 0:e.getBoundingClientRect().top)||0)+window.scrollY-130;window.scrollTo({top:t,behavior:"smooth"})};return f.createElement("li",{key:i,onMouseEnter:function(){return h(!0)},onMouseLeave:function(){return h(!1)}},f.createElement("button",{className:"queue-ref",onClick:function(){u("".concat(t,": queue item -> ").concat(r)),m()}},"Example ",i+1),f.createElement("code",null,l),f.createElement(a.$,{type:"action",buttonType:"reset",icon:"trash",onClickHandler:function(){u("".concat(t,": queue dequeue -> ").concat(r)),o()}}))}function m(e){var t=e.gleanContext,n=void 0===t?u.aE:t,p=e.standalone,m=(0,o.Ym)(),y=(0,o.hX)(),b=(0,c.db)(),k=(0,s.Ed)(),x=k.queue,w=k.setQueue,E=(0,r.useCallback)(function(){var e=g();w(e.filter(function(e){return e.checked}).map(function(t){return v(t,e)}))},[w]);return(0,r.useEffect)(function(){var e=x.map(function(e){return e.id}),t=d(document.querySelectorAll(".playlist > input:checked")),n=!0,r=!1,i=void 0;try{for(var l,o=t[Symbol.iterator]();!(n=(l=o.next()).done);n=!0){var a=l.value;a.checked=e.includes(a.id)}}catch(e){r=!0,i=e}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}},[x]),(0,r.useEffect)(function(){y||(window.playQueue=E)},[E,y]),x.length?f.createElement("div",{className:"play-queue-container ".concat(void 0!==p&&p?"standalone":"")},f.createElement("aside",null,f.createElement("details",{className:"play-queue",open:!0},f.createElement("summary",null,f.createElement("div",null,"Queue")),f.createElement("div",{className:"play-queue-inner"},f.createElement("ul",null,x.map(function(e){return f.createElement(h,{gleanContext:n,key:e.key,item:e,unqueue:function(){return w(function(t){return t.filter(function(t){return t.id!==e.id})})}})})),f.createElement(a.$,{type:"secondary",extraClasses:"play-button",onClickHandler:function(e){b("".concat(n,": queue play ").concat(x.length));var t,r=(0,i.cb)();sessionStorage.setItem(l.FX,JSON.stringify(r));var o=new URL(null==(t=window)?void 0:t.location.href);o.pathname="/".concat(m,"/play"),o.hash="",o.search="",window.open(o,"_blank")}},"Play"))))):null}function g(){return d(document.querySelectorAll(".playlist > input"))}var y={javascript:"js"};function v(e,t){var n,r,i,l,o,a,s=(null!=(n=HTMLInputElement)&&"u">typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](e):e instanceof n)?e:document.getElementById(e);null!=t||(t=g());var u=t.indexOf(s),c=s.id,f=null!=(r=null==s||null==(a=s.closest(".example-header"))||null==(o=a.querySelector(".language-name"))||null==(l=o.textContent)?void 0:l.toLowerCase())?r:"";return{key:u,id:c,lang:null!=(i=y[f])?i:f}}},73215(e,t,n){n.r(t),n.d(t,{AIHelpInner:()=>lv,RoleIcon:()=>lb,default:()=>ld});var r,i,l,o,a,s,u,c,f,p,d,h,m,g,y,v,b={};n.r(b),n.d(b,{boolean:()=>T,booleanish:()=>L,commaOrSpaceSeparated:()=>j,commaSeparated:()=>R,number:()=>F,overloadedBoolean:()=>M,spaceSeparated:()=>N});var k={};n.r(k),n.d(k,{attentionMarkers:()=>tq,contentInitial:()=>tN,disable:()=>tU,document:()=>tF,flow:()=>tj,flowInitial:()=>tR,insideSpan:()=>tH,string:()=>t_,text:()=>tz});var x=n(96540);let w=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,E=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,S={};function C(e,t){return((t||S).jsx?E:w).test(e)}let I=/[ \t\n\f\r]/g;function A(e){return""===e.replace(I,"")}let Schema=class Schema{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};function D(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Schema(n,r,t)}function P(e){return e.toLowerCase()}Schema.prototype.normal={},Schema.prototype.property={},Schema.prototype.space=void 0;let Info=class Info{constructor(e,t){this.attribute=t,this.property=e}};Info.prototype.attribute="",Info.prototype.booleanish=!1,Info.prototype.boolean=!1,Info.prototype.commaOrSpaceSeparated=!1,Info.prototype.commaSeparated=!1,Info.prototype.defined=!1,Info.prototype.mustUseProperty=!1,Info.prototype.number=!1,Info.prototype.overloadedBoolean=!1,Info.prototype.property="",Info.prototype.spaceSeparated=!1,Info.prototype.space=void 0;let O=0,T=_(),L=_(),M=_(),F=_(),N=_(),R=_(),j=_();function _(){return 2**++O}let z=Object.keys(b);let DefinedInfo=class DefinedInfo extends Info{constructor(e,t,n,r){var i,l,o,a,s;let u=-1;if(super(e,t),i=this,(l=r)&&(i.space=l),"number"==typeof n)for(;++u<z.length;){let e=z[u];o=this,a=z[u],(s=(n&b[e])===b[e])&&(o[a]=s)}}};function H(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let l=new DefinedInfo(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[P(r)]=r,n[P(l.attribute)]=r}return new Schema(t,n,e.space)}DefinedInfo.prototype.defined=!0;let q=H({properties:{ariaActiveDescendant:null,ariaAtomic:L,ariaAutoComplete:null,ariaBusy:L,ariaChecked:L,ariaColCount:F,ariaColIndex:F,ariaColSpan:F,ariaControls:N,ariaCurrent:null,ariaDescribedBy:N,ariaDetails:null,ariaDisabled:L,ariaDropEffect:N,ariaErrorMessage:null,ariaExpanded:L,ariaFlowTo:N,ariaGrabbed:L,ariaHasPopup:null,ariaHidden:L,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:N,ariaLevel:F,ariaLive:null,ariaModal:L,ariaMultiLine:L,ariaMultiSelectable:L,ariaOrientation:null,ariaOwns:N,ariaPlaceholder:null,ariaPosInSet:F,ariaPressed:L,ariaReadOnly:L,ariaRelevant:null,ariaRequired:L,ariaRoleDescription:N,ariaRowCount:F,ariaRowIndex:F,ariaRowSpan:F,ariaSelected:L,ariaSetSize:F,ariaSort:null,ariaValueMax:F,ariaValueMin:F,ariaValueNow:F,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function U(e,t){return t in e?e[t]:t}function B(e,t){return U(e,t.toLowerCase())}let V=H({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:R,acceptCharset:N,accessKey:N,action:null,allow:null,allowFullScreen:T,allowPaymentRequest:T,allowUserMedia:T,alt:null,as:null,async:T,autoCapitalize:null,autoComplete:N,autoFocus:T,autoPlay:T,blocking:N,capture:null,charSet:null,checked:T,cite:null,className:N,cols:F,colSpan:null,content:null,contentEditable:L,controls:T,controlsList:N,coords:F|R,crossOrigin:null,data:null,dateTime:null,decoding:null,default:T,defer:T,dir:null,dirName:null,disabled:T,download:M,draggable:L,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:T,formTarget:null,headers:N,height:F,hidden:M,high:F,href:null,hrefLang:null,htmlFor:N,httpEquiv:N,id:null,imageSizes:null,imageSrcSet:null,inert:T,inputMode:null,integrity:null,is:null,isMap:T,itemId:null,itemProp:N,itemRef:N,itemScope:T,itemType:N,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:T,low:F,manifest:null,max:null,maxLength:F,media:null,method:null,min:null,minLength:F,multiple:T,muted:T,name:null,nonce:null,noModule:T,noValidate:T,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:T,optimum:F,pattern:null,ping:N,placeholder:null,playsInline:T,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:T,referrerPolicy:null,rel:N,required:T,reversed:T,rows:F,rowSpan:F,sandbox:N,scope:null,scoped:T,seamless:T,selected:T,shadowRootClonable:T,shadowRootDelegatesFocus:T,shadowRootMode:null,shape:null,size:F,sizes:null,slot:null,span:F,spellCheck:L,src:null,srcDoc:null,srcLang:null,srcSet:null,start:F,step:null,style:null,tabIndex:F,target:null,title:null,translate:null,type:null,typeMustMatch:T,useMap:null,value:L,width:F,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:N,axis:null,background:null,bgColor:null,border:F,borderColor:null,bottomMargin:F,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:T,declare:T,event:null,face:null,frame:null,frameBorder:null,hSpace:F,leftMargin:F,link:null,longDesc:null,lowSrc:null,marginHeight:F,marginWidth:F,noResize:T,noHref:T,noShade:T,noWrap:T,object:null,profile:null,prompt:null,rev:null,rightMargin:F,rules:null,scheme:null,scrolling:L,standby:null,summary:null,text:null,topMargin:F,valueType:null,version:null,vAlign:null,vLink:null,vSpace:F,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:T,disableRemotePlayback:T,prefix:null,property:null,results:F,security:null,unselectable:null},space:"html",transform:B}),$=H({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:j,accentHeight:F,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:F,amplitude:F,arabicForm:null,ascent:F,attributeName:null,attributeType:null,azimuth:F,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:F,by:null,calcMode:null,capHeight:F,className:N,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:F,diffuseConstant:F,direction:null,display:null,dur:null,divisor:F,dominantBaseline:null,download:T,dx:null,dy:null,edgeMode:null,editable:null,elevation:F,enableBackground:null,end:null,event:null,exponent:F,externalResourcesRequired:null,fill:null,fillOpacity:F,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:R,g2:R,glyphName:R,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:F,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:F,horizOriginX:F,horizOriginY:F,id:null,ideographic:F,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:F,k:F,k1:F,k2:F,k3:F,k4:F,kernelMatrix:j,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:F,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:F,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:F,overlineThickness:F,paintOrder:null,panose1:null,path:null,pathLength:F,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:N,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:F,pointsAtY:F,pointsAtZ:F,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:j,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:j,rev:j,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:j,requiredFeatures:j,requiredFonts:j,requiredFormats:j,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:F,specularExponent:F,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:F,strikethroughThickness:F,string:null,stroke:null,strokeDashArray:j,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:F,strokeOpacity:F,strokeWidth:null,style:null,surfaceScale:F,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:j,tabIndex:F,tableValues:null,target:null,targetX:F,targetY:F,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:j,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:F,underlineThickness:F,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:F,values:null,vAlphabetic:F,vMathematical:F,vectorEffect:null,vHanging:F,vIdeographic:F,version:null,vertAdvY:F,vertOriginX:F,vertOriginY:F,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:F,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:U}),Z=H({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),W=H({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:B}),Q=H({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),G=D([q,V,Z,W,Q],"html"),K=D([q,$,Z,W,Q],"svg"),Y=/[A-Z]/g,J=/-[a-z]/g,X=/^data[-\w.:]+$/i;function ee(e){return"-"+e.toLowerCase()}function et(e){return e.charAt(1).toUpperCase()}let en={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var er=n(35229);let ei=eo("end"),el=eo("start");function eo(e){return function(t){let n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function ea(e){return e&&"object"==typeof e?"position"in e||"type"in e?eu(e.position):"start"in e||"end"in e?eu(e):"line"in e||"column"in e?es(e):"":""}function es(e){return ec(e&&e.line)+":"+ec(e&&e.column)}function eu(e){return es(e&&e.start)+"-"+es(e&&e.end)}function ec(e){return e&&"number"==typeof e?e:1}let VFileMessage=class VFileMessage extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},l=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(l=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){let e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=o?o.line:void 0,this.name=ea(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=l&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual,this.expected,this.note,this.url}};VFileMessage.prototype.file="",VFileMessage.prototype.name="",VFileMessage.prototype.reason="",VFileMessage.prototype.message="",VFileMessage.prototype.stack="",VFileMessage.prototype.column=void 0,VFileMessage.prototype.line=void 0,VFileMessage.prototype.ancestors=void 0,VFileMessage.prototype.cause=void 0,VFileMessage.prototype.fatal=void 0,VFileMessage.prototype.place=void 0,VFileMessage.prototype.ruleId=void 0,VFileMessage.prototype.source=void 0;let ef={}.hasOwnProperty,ep=new Map,ed=/[A-Z]/g,eh=new Set(["table","tbody","thead","tfoot","tr"]),em=new Set(["td","th"]),eg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ey(e,t,n){var r,i,l,o,a,s,u,c,f;let p,d,h,m,g,y,v,b,k,x,w;return"element"===t.type?(r=e,i=t,l=n,d=p=r.schema,"svg"===i.tagName.toLowerCase()&&"html"===p.space&&(r.schema=K),r.ancestors.push(i),h=ex(r,i.tagName,!1),m=function(e,t){let n,r,i={};for(r in t.properties)if("children"!==r&&ef.call(t.properties,r)){let l=function(e,t,n){let r=function(e,t){let n=P(t),r=t,i=Info;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&X.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(J,et);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!J.test(e)){let n=e.replace(Y,ee);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=DefinedInfo}return new i(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){var i;let t;if(Array.isArray(n)&&(n=r.commaSeparated?(t={},(""===(i=n)[i.length-1]?[...i,""]:i).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return er(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let t=new VFileMessage("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=eg+"#cannot-parse-style-attribute",t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){let t,n={};for(t in e)ef.call(e,t)&&(n[function(e){let t=e.replace(ed,eE);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return n}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?en[r.property]||r.property:r.attribute,n]}}(e,r,t.properties[r]);if(l){let[r,o]=l;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof o&&em.has(t.tagName)?n=o:i[r]=o}}return n&&((i.style||(i.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n),i}(r,i),g=ek(r,i),eh.has(i.tagName)&&(g=g.filter(function(e){return"string"!=typeof e||!("object"==typeof e?"text"===e.type&&A(e.value):A(e))})),ev(r,m,h,i),eb(m,g),r.ancestors.pop(),r.schema=p,r.create(i,h,m,l)):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}ew(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?(o=e,a=t,s=n,v=y=o.schema,"svg"===a.name&&"html"===y.space&&(o.schema=K),o.ancestors.push(a),b=null===a.name?o.Fragment:ex(o,a.name,!0),k=function(e,t){let n={};for(let r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let l=i.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ew(e,t.position);else{let i,l=r.name;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,i=e.evaluater.evaluateExpression(t.expression)}else ew(e,t.position);else i=null===r.value||r.value;n[l]=i}return n}(o,a),x=ek(o,a),ev(o,k,b,a),eb(k,x),o.ancestors.pop(),o.schema=y,o.create(a,b,k,s)):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ew(e,t.position)}(e,t):"root"===t.type?(u=e,c=t,f=n,eb(w={},ek(u,c)),u.create(c,u.Fragment,w,f)):"text"===t.type?t.value:void 0}function ev(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function eb(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function ek(e,t){let n=[],r=-1,i=e.passKeys?new Map:ep;for(;++r<t.children.length;){let l,o=t.children[r];if(e.passKeys){let e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){let t=i.get(e)||0;l=e+"-"+t,i.set(e,t+1)}}let a=ey(e,o,l);void 0!==a&&n.push(a)}return n}function ex(e,t,n){let r;if(n)if(t.includes(".")){let e,n=t.split("."),i=-1;for(;++i<n.length;){let t=C(n[i])?{type:"Identifier",name:n[i]}:{type:"Literal",value:n[i]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(i&&"Literal"===t.type),optional:!1}:t}r=e}else r=C(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){let t=r.value;return ef.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);ew(e)}function ew(e,t){let n=new VFileMessage("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=eg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function eE(e){return"-"+e.toLowerCase()}let eS={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};var eC=n(74848);let eI={};function eA(e,t){let n=t||eI;return eD(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function eD(e,t,n){var r;if((r=e)&&"object"==typeof r){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return eP(e.children,t,n)}return Array.isArray(e)?eP(e,t,n):""}function eP(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=eD(e[i],t,n);return r.join("")}function eO(e,t,n,r){let i,l=e.length,o=0;if(t=t<0?-t>l?0:l+t:t>l?l:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);o<r.length;)(i=r.slice(o,o+1e4)).unshift(t,0),e.splice(...i),o+=1e4,t+=1e4}function eT(e,t){return e.length>0?(eO(e,e.length,0,t),e):t}let SpliceBuffer=class SpliceBuffer{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=null==t?1/0:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-(t||0),1/0);return n&&eL(this.left,n),r.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),eL(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),eL(this.right,e.reverse())}setCursor(e){if(e!==this.left.length&&(!(e>this.left.length)||0!==this.right.length)&&(!(e<0)||0!==this.left.length))if(e<this.left.length){let t=this.left.splice(e,1/0);eL(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);eL(this.left,t.reverse())}}};function eL(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function eM(e){let t,n,r,i,l,o,a,s={},u=-1,c=new SpliceBuffer(e);for(;++u<c.length;){for(;u in s;)u=s[u];if(t=c.get(u),u&&"chunkFlow"===t[1].type&&"listItemPrefix"===c.get(u-1)[1].type&&((r=0)<(o=t[1]._tokenizer.events).length&&"lineEndingBlank"===o[r][1].type&&(r+=2),r<o.length&&"content"===o[r][1].type))for(;++r<o.length&&"content"!==o[r][1].type;)"chunkText"===o[r][1].type&&(o[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(s,function(e,t){let n,r,i=e.get(t)[1],l=e.get(t)[2],o=t-1,a=[],s=i._tokenizer;!s&&(s=l.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let u=s.events,c=[],f={},p=-1,d=i,h=0,m=0,g=[0];for(;d;){for(;e.get(++o)[1]!==d;);a.push(o),!d._tokenizer&&(n=l.sliceStream(d),d.next||n.push(null),r&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(n),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),r=d,d=d.next}for(d=i;++p<u.length;)"exit"===u[p][0]&&"enter"===u[p-1][0]&&u[p][1].type===u[p-1][1].type&&u[p][1].start.line!==u[p][1].end.line&&(m=p+1,g.push(m),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):g.pop(),p=g.length;p--;){let t=u.slice(g[p],g[p+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),p=-1;++p<c.length;)f[h+c[p][0]]=h+c[p][1],h+=c[p][1]-c[p][0]-1;return f}(c,u)),u=s[u],a=!0);else if(t[1]._container){for(r=u,n=void 0;r--;)if("lineEnding"===(i=c.get(r))[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(n&&(c.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);else if("linePrefix"===i[1].type||"listItemIndent"===i[1].type);else break;n&&(t[1].end={...c.get(n)[1].start},(l=c.slice(n,u)).unshift(t),c.splice(n,u-n+1,l))}}return eO(e,0,1/0,c.slice(0)),!a}let eF={}.hasOwnProperty;function eN(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let r,i=(eF.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];if(l)for(r in l){eF.call(i,r)||(i[r]=[]);let e=l[r];!function(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);eO(e,0,0,r)}(i[r],Array.isArray(e)?e:e?[e]:[])}}}(t,e[n]);return t}let eR=eQ(/[A-Za-z]/),ej=eQ(/[\dA-Za-z]/),e_=eQ(/[#-'*+\--9=?A-Z^-~]/);function ez(e){return null!==e&&(e<32||127===e)}let eH=eQ(/\d/),eq=eQ(/[\dA-Fa-f]/),eU=eQ(/[!-/:-@[-`{-~]/);function eB(e){return null!==e&&e<-2}function eV(e){return null!==e&&(e<0||32===e)}function e$(e){return -2===e||-1===e||32===e}let eZ=eQ(/\p{P}|\p{S}/u),eW=eQ(/\s/);function eQ(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function eG(e,t,n,r){let i=r?r-1:1/0,l=0;return function(r){return e$(r)?(e.enter(n),function r(o){return e$(o)&&l++<i?(e.consume(o),r):(e.exit(n),t(o))}(r)):t(r)}}let eK={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eG(e,n,"linePrefix"))},function(n){return e.enter("paragraph"),function n(r){let i=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=i),t=i,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return eB(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},eY={tokenize:function(e){let t,n,r,i=this,l=[],o=0;return a;function a(t){if(o<l.length){let n=l[o];return i.containerState=n[1],e.attempt(n[0].continuation,s,u)(t)}return u(t)}function s(e){if(o++,i.containerState._closeFlow){let n;i.containerState._closeFlow=void 0,t&&y();let r=i.events.length,l=r;for(;l--;)if("exit"===i.events[l][0]&&"chunkFlow"===i.events[l][1].type){n=i.events[l][1].end;break}g(o);let a=r;for(;a<i.events.length;)i.events[a][1].end={...n},a++;return eO(i.events,l+1,0,i.events.slice(r)),i.events.length=a,u(e)}return a(e)}function u(n){if(o===l.length){if(!t)return p(n);if(t.currentConstruct&&t.currentConstruct.concrete)return h(n);i.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(eJ,c,f)(n)}function c(e){return t&&y(),g(o),p(e)}function f(e){return i.parser.lazy[i.now().line]=o!==l.length,r=i.now().offset,h(e)}function p(t){return i.containerState={},e.attempt(eJ,d,h)(t)}function d(e){return o++,l.push([i.currentConstruct,i.containerState]),p(e)}function h(r){if(null===r){t&&y(),g(0),e.consume(r);return}return t=t||i.parser.flow(i.now()),e.enter("chunkFlow",{_tokenizer:t,contentType:"flow",previous:n}),function t(n){if(null===n){m(e.exit("chunkFlow"),!0),g(0),e.consume(n);return}return eB(n)?(e.consume(n),m(e.exit("chunkFlow")),o=0,i.interrupt=void 0,a):(e.consume(n),t)}(r)}function m(e,l){let a=i.sliceStream(e);if(l&&a.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(a),i.parser.lazy[e.start.line]){let e,n,l=t.events.length;for(;l--;)if(t.events[l][1].start.offset<r&&(!t.events[l][1].end||t.events[l][1].end.offset>r))return;let a=i.events.length,s=a;for(;s--;)if("exit"===i.events[s][0]&&"chunkFlow"===i.events[s][1].type){if(e){n=i.events[s][1].end;break}e=!0}for(g(o),l=a;l<i.events.length;)i.events[l][1].end={...n},l++;eO(i.events,s+1,0,i.events.slice(a)),i.events.length=l}}function g(t){let n=l.length;for(;n-- >t;){let t=l[n];i.containerState=t[1],t[0].exit.call(i,e)}l.length=t}function y(){t.write([null]),n=void 0,t=void 0,i.containerState._closeFlow=void 0}}},eJ={tokenize:function(e,t,n){return eG(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},eX={partial:!0,tokenize:function(e,t,n){return function(t){return e$(t)?eG(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||eB(e)?t(e):n(e)}}},e0={resolve:function(e){return eM(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):eB(t)?e.check(e1,l,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function l(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},e1={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eG(e,i,"linePrefix")};function i(i){if(null===i||eB(i))return n(i);let l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&"linePrefix"===l[1].type&&l[2].sliceSerialize(l[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}},e2={tokenize:function(e){let t=this,n=e.attempt(eX,function(r){return null===r?void e.consume(r):(e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,eG(e,e.attempt(this.parser.constructs.flow,r,e.attempt(e0,r)),"linePrefix")));return n;function r(r){return null===r?void e.consume(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n)}}},e4={resolveAll:e7()},e3=e6("string"),e5=e6("text");function e6(e){return{resolveAll:e7("text"===e?e9:void 0),tokenize:function(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,l,o);return l;function l(e){return s(e)?i(e):o(e)}function o(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),a)}function a(e){return s(e)?(t.exit("data"),i(e)):(t.consume(e),a)}function s(e){if(null===e)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function e7(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function e9(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,i=e[n-1][1],l=t.sliceStream(i),o=l.length,a=-1,s=0;for(;o--;){let e=l[o];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===e)r=!0,s++;else if(-1===e);else{o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let l={type:n===e.length||r||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:i.start._bufferIndex+a,_index:i.start._index+o,line:i.end.line,column:i.end.column-s,offset:i.end.offset-s},end:{...i.end}};i.end={...l.start},i.start.offset===i.end.offset?Object.assign(i,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}let e8={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(l){var o;return e.enter("thematicBreak"),r=o=l,function l(o){return o===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),i++,t):(e.exit("thematicBreakSequence"),e$(n)?eG(e,l,"whitespace")(n):l(n))}(o)):i>=3&&(null===o||eB(o))?(e.exit("thematicBreak"),t(o)):n(o)}(o)}}},te={continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(eX,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,eG(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!e$(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(tn,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,eG(e,e.attempt(te,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){let r=this,i=r.events[r.events.length-1],l=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){let i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:eH(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(e8,n,a)(t):a(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(i){return eH(i)&&++o<10?(e.consume(i),t):(!r.interrupt||o<2)&&(r.containerState.marker?i===r.containerState.marker:41===i||46===i)?(e.exit("listItemValue"),a(i)):n(i)}(t)}return n(t)};function a(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(eX,r.interrupt?n:s,e.attempt(tt,c,u))}function s(e){return r.containerState.initialBlankLine=!0,l++,c(e)}function u(t){return e$(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),c):n(t)}function c(n){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},tt={partial:!0,tokenize:function(e,t,n){let r=this;return eG(e,function(e){let i=r.events[r.events.length-1];return!e$(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},tn={partial:!0,tokenize:function(e,t,n){let r=this;return eG(e,function(e){let i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},tr={continuation:{tokenize:function(e,t,n){let r=this;return function(t){return e$(t)?eG(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(tr,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return e$(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};function ti(e,t,n,r,i,l,o,a,s){let u=s||1/0,c=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(l),e.consume(t),e.exit(l),f):null===t||32===t||41===t||ez(t)?n(t):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),h(t))};function f(n){return 62===n?(e.enter(l),e.consume(n),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(a),f(t)):null===t||60===t||eB(t)?n(t):(e.consume(t),92===t?d:p)}function d(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(i){return!c&&(null===i||41===i||eV(i))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(i)):c<u&&40===i?(e.consume(i),c++,h):41===i?(e.consume(i),c--,h):null===i||32===i||40===i||ez(i)?n(i):(e.consume(i),92===i?m:h)}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function tl(e,t,n,r,i,l){let o,a=this,s=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(l),u};function u(f){return s>999||null===f||91===f||93===f&&!o||94===f&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):93===f?(e.exit(l),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):eB(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(t){return null===t||91===t||93===t||eB(t)||s++>999?(e.exit("chunkString"),u(t)):(e.consume(t),o||(o=!e$(t)),92===t?f:c)}function f(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function to(e,t,n,r,i,l){let o;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,a):n(t)};function a(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(l),s(n))}function s(t){return t===o?(e.exit(l),a(o)):null===t?n(t):eB(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eG(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===o||null===t||eB(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:u)}function c(t){return t===o||92===t?(e.consume(t),u):u(t)}}function ta(e,t){let n;return function r(i){return eB(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):e$(i)?eG(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function ts(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let tu={partial:!0,tokenize:function(e,t,n){return function(t){return eV(t)?ta(e,r)(t):n(t)};function r(t){return to(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return e$(t)?eG(e,l,"whitespace")(t):l(t)}function l(e){return null===e||eB(e)?t(e):n(e)}}},tc={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),eG(e,i,"linePrefix",5)(t)};function i(t){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?function t(n){return null===n?l(n):eB(n)?e.attempt(tf,t,l)(n):(e.enter("codeFlowValue"),function n(r){return null===r||eB(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function l(n){return e.exit("codeIndented"),t(n)}}},tf={partial:!0,tokenize:function(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):eB(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):eG(e,l,"linePrefix",5)(t)}function l(e){let l=r.events[r.events.length-1];return l&&"linePrefix"===l[1].type&&l[2].sliceSerialize(l[1],!0).length>=4?t(e):eB(e)?i(e):n(e)}}},tp={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,l=e.length;for(;l--;)if("enter"===e[l][0]){if("content"===e[l][1].type){n=l;break}"paragraph"===e[l][1].type&&(r=l)}else"content"===e[l][1].type&&e.splice(l,1),i||"definition"!==e[l][1].type||(i=l);let o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",o,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=o,e.push(["exit",o,t]),e},tokenize:function(e,t,n){let r,i=this;return function(t){var o;let a,s=i.events.length;for(;s--;)if("lineEnding"!==i.events[s][1].type&&"linePrefix"!==i.events[s][1].type&&"content"!==i.events[s][1].type){a="paragraph"===i.events[s][1].type;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||a)?(e.enter("setextHeadingLine"),r=t,o=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),e$(n)?eG(e,l,"lineSuffix")(n):l(n))}(o)):n(t)};function l(r){return null===r||eB(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}},td=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],th=["pre","script","style","textarea"],tm={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(eX,t,n)}}},tg={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return eB(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},ty={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},tv={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){let r,i=this,l={partial:!0,tokenize:function(e,t,n){let l=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(t){return e.enter("codeFencedFence"),e$(t)?eG(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(i){return i===r?(l++,e.consume(i),t):l>=a?(e.exit("codeFencedFenceSequence"),e$(i)?eG(e,u,"whitespace")(i):u(i)):n(i)}(t)):n(t)}function u(r){return null===r||eB(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}},o=0,a=0;return function(t){var l;let u;return l=t,o=(u=i.events[i.events.length-1])&&"linePrefix"===u[1].type?u[2].sliceSerialize(u[1],!0).length:0,r=l,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(i){return i===r?(a++,e.consume(i),t):a<3?n(i):(e.exit("codeFencedFenceSequence"),e$(i)?eG(e,s,"whitespace")(i):s(i))}(l)};function s(l){return null===l||eB(l)?(e.exit("codeFencedFence"),i.interrupt?t(l):e.check(ty,c,h)(l)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||eB(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(i)):e$(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),eG(e,u,"whitespace")(i)):96===i&&i===r?n(i):(e.consume(i),t)}(l))}function u(t){return null===t||eB(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||eB(i)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(i)):96===i&&i===r?n(i):(e.consume(i),t)}(t))}function c(t){return e.attempt(l,h,f)(t)}function f(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),p}function p(t){return o>0&&e$(t)?eG(e,d,"linePrefix",o+1)(t):d(t)}function d(t){return null===t||eB(t)?e.check(ty,c,h)(t):(e.enter("codeFlowValue"),function t(n){return null===n||eB(n)?(e.exit("codeFlowValue"),d(n)):(e.consume(n),t)}(t))}function h(n){return e.exit("codeFenced"),t(n)}}},tb=document.createElement("i");function tk(e){let t="&"+e+";";tb.innerHTML=t;let n=tb.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}let tx={name:"characterReference",tokenize:function(e,t,n){let r,i,l=this,o=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),r=31,i=ej,u(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=eq,u):(e.enter("characterReferenceValue"),r=7,i=eH,u(t))}function u(a){if(59===a&&o){let r=e.exit("characterReferenceValue");return i!==ej||tk(l.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&o++<r?(e.consume(a),u):n(a)}}},tw={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return eU(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},tE={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),eG(e,t,"linePrefix")}}};function tS(e,t,n){let r=[],i=-1;for(;++i<e.length;){let l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}let tC={name:"labelEnd",resolveAll:function(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){let e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&eO(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,l,o=e.length,a=0;for(;o--;)if(n=e[o][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[o][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[o][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=o,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(i=o);let s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},c={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[i-2][1].start}};return l=eT(l=[["enter",s,t],["enter",u,t]],e.slice(r+1,r+a+3)),l=eT(l,[["enter",c,t]]),l=eT(l,tS(t.parser.constructs.insideSpan.null,e.slice(r+a+4,i-3),t)),l=eT(l,[["exit",c,t],e[i-2],e[i-1],["exit",u,t]]),l=eT(l,e.slice(i+1)),l=eT(l,[["exit",s,t]]),eO(e,r,e.length,l),e},tokenize:function(e,t,n){let r,i,l=this,o=l.events.length;for(;o--;)if(("labelImage"===l.events[o][1].type||"labelLink"===l.events[o][1].type)&&!l.events[o][1]._balanced){r=l.events[o][1];break}return function(t){return r?r._inactive?c(t):(i=l.parser.defined.includes(ts(l.sliceSerialize({start:r.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(tI,u,i?u:c)(t):91===t?e.attempt(tA,u,i?s:c)(t):i?u(t):c(t)}function s(t){return e.attempt(tD,u,c)(t)}function u(e){return t(e)}function c(e){return r._balanced=!0,n(e)}}},tI={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return eV(t)?ta(e,i)(t):i(t)}function i(t){return 41===t?u(t):ti(e,l,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function l(t){return eV(t)?ta(e,a)(t):u(t)}function o(e){return n(e)}function a(t){return 34===t||39===t||40===t?to(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function s(t){return eV(t)?ta(e,u)(t):u(t)}function u(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},tA={tokenize:function(e,t,n){let r=this;return function(t){return tl.call(r,e,i,l,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(ts(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function l(e){return n(e)}}},tD={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},tP={name:"labelStartImage",resolveAll:tC.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),l):n(t)}function l(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};function tO(e){return null===e||eV(e)||eW(e)?1:eZ(e)?2:void 0}let tT={name:"attention",resolveAll:function(e,t){let n,r,i,l,o,a,s,u,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close){for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;let f={...e[n][1].end},p={...e[c][1].start};tL(f,-a),tL(p,a),l={type:a>1?"strongSequence":"emphasisSequence",start:f,end:{...e[n][1].end}},o={type:a>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:p},i={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:a>1?"strong":"emphasis",start:{...l.start},end:{...o.end}},e[n][1].end={...l.start},e[c][1].start={...o.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=eT(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=eT(s,[["enter",r,t],["enter",l,t],["exit",l,t],["enter",i,t]]),s=eT(s,tS(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=eT(s,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(u=2,s=eT(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):u=0,eO(e,n-1,c-n+3,s),c=n+s.length-u-2;break}}for(c=-1;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,i=this.previous,l=tO(i);return function(o){return n=o,e.enter("attentionSequence"),function o(a){if(a===n)return e.consume(a),o;let s=e.exit("attentionSequence"),u=tO(a),c=!u||2===u&&l||r.includes(a),f=!l||2===l&&u||r.includes(i);return s._open=!!(42===n?c:c&&(l||!f)),s._close=!!(42===n?f:f&&(u||!c)),t(a)}(o)}}};function tL(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let tM={name:"labelStartLink",resolveAll:tC.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},tF={42:te,43:te,45:te,48:te,49:te,50:te,51:te,52:te,53:te,54:te,55:te,56:te,57:te,62:tr},tN={91:{name:"definition",tokenize:function(e,t,n){let r,i=this;return function(t){var r;return e.enter("definition"),r=t,tl.call(i,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function l(t){return(r=ts(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):n(t)}function o(t){return eV(t)?ta(e,a)(t):a(t)}function a(t){return ti(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(tu,u,u)(t)}function u(t){return e$(t)?eG(e,c,"whitespace")(t):c(t)}function c(l){return null===l||eB(l)?(e.exit("definition"),i.parser.defined.push(r),t(l)):n(l)}}}},tR={[-2]:tc,[-1]:tc,32:tc},tj={35:{name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,l=3;return"whitespace"===e[3][1].type&&(l+=2),i-2>l&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(l===i-1||i-4>l&&"whitespace"===e[i-2][1].type)&&(i-=l+1===i?2:4),i>l&&(n={type:"atxHeadingText",start:e[l][1].start,end:e[i][1].end},r={type:"chunkText",start:e[l][1].start,end:e[i][1].end,contentType:"text"},eO(e,l,i-l+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(i){var l;return e.enter("atxHeading"),l=i,e.enter("atxHeadingSequence"),function i(l){return 35===l&&r++<6?(e.consume(l),i):null===l||eV(l)?(e.exit("atxHeadingSequence"),function n(r){return 35===r?(e.enter("atxHeadingSequence"),function t(r){return 35===r?(e.consume(r),t):(e.exit("atxHeadingSequence"),n(r))}(r)):null===r||eB(r)?(e.exit("atxHeading"),t(r)):e$(r)?eG(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||eV(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(l)):n(l)}(l)}}},42:e8,45:[tp,e8],60:{concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){let r,i,l,o,a,s=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),u};function u(o){return 33===o?(e.consume(o),c):47===o?(e.consume(o),i=!0,d):63===o?(e.consume(o),r=3,s.interrupt?t:L):eR(o)?(e.consume(o),l=String.fromCharCode(o),h):n(o)}function c(i){return 45===i?(e.consume(i),r=2,f):91===i?(e.consume(i),r=5,o=0,p):eR(i)?(e.consume(i),r=4,s.interrupt?t:L):n(i)}function f(r){return 45===r?(e.consume(r),s.interrupt?t:L):n(r)}function p(r){let i="CDATA[";return r===i.charCodeAt(o++)?(e.consume(r),o===i.length)?s.interrupt?t:S:p:n(r)}function d(t){return eR(t)?(e.consume(t),l=String.fromCharCode(t),h):n(t)}function h(o){if(null===o||47===o||62===o||eV(o)){let a=47===o,u=l.toLowerCase();return!a&&!i&&th.includes(u)?(r=1,s.interrupt?t(o):S(o)):td.includes(l.toLowerCase())?(r=6,a)?(e.consume(o),m):s.interrupt?t(o):S(o):(r=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(o):i?function t(n){return e$(n)?(e.consume(n),t):w(n)}(o):g(o))}return 45===o||ej(o)?(e.consume(o),l+=String.fromCharCode(o),h):n(o)}function m(r){return 62===r?(e.consume(r),s.interrupt?t:S):n(r)}function g(t){return 47===t?(e.consume(t),w):58===t||95===t||eR(t)?(e.consume(t),y):e$(t)?(e.consume(t),g):w(t)}function y(t){return 45===t||46===t||58===t||95===t||ej(t)?(e.consume(t),y):v(t)}function v(t){return 61===t?(e.consume(t),b):e$(t)?(e.consume(t),v):g(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,k):e$(t)?(e.consume(t),b):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||eV(n)?v(n):(e.consume(n),t)}(t)}function k(t){return t===a?(e.consume(t),a=null,x):null===t||eB(t)?n(t):(e.consume(t),k)}function x(e){return 47===e||62===e||e$(e)?g(e):n(e)}function w(t){return 62===t?(e.consume(t),E):n(t)}function E(t){return null===t||eB(t)?S(t):e$(t)?(e.consume(t),E):n(t)}function S(t){return 45===t&&2===r?(e.consume(t),D):60===t&&1===r?(e.consume(t),P):62===t&&4===r?(e.consume(t),M):63===t&&3===r?(e.consume(t),L):93===t&&5===r?(e.consume(t),T):eB(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(tm,F,C)(t)):null===t||eB(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),S)}function C(t){return e.check(tg,I,F)(t)}function I(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return null===t||eB(t)?C(t):(e.enter("htmlFlowData"),S(t))}function D(t){return 45===t?(e.consume(t),L):S(t)}function P(t){return 47===t?(e.consume(t),l="",O):S(t)}function O(t){if(62===t){let n=l.toLowerCase();return th.includes(n)?(e.consume(t),M):S(t)}return eR(t)&&l.length<8?(e.consume(t),l+=String.fromCharCode(t),O):S(t)}function T(t){return 93===t?(e.consume(t),L):S(t)}function L(t){return 62===t?(e.consume(t),M):45===t&&2===r?(e.consume(t),L):S(t)}function M(t){return null===t||eB(t)?(e.exit("htmlFlowData"),F(t)):(e.consume(t),M)}function F(n){return e.exit("htmlFlow"),t(n)}}},61:tp,95:e8,96:tv,126:tv},t_={38:tx,92:tw},tz={[-5]:tE,[-4]:tE,[-3]:tE,33:tP,38:tx,42:tT,60:[{name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return eR(t)?(e.consume(t),l):64===t?n(t):a(t)}function l(t){return 43===t||45===t||46===t||ej(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,o):(43===n||45===n||46===n||ej(n))&&r++<32?(e.consume(n),t):(r=0,a(n))}(t)):a(t)}function o(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||ez(r)?n(r):(e.consume(r),o)}function a(t){return 64===t?(e.consume(t),s):e_(t)?(e.consume(t),a):n(t)}function s(i){return ej(i)?function i(l){return 46===l?(e.consume(l),r=0,s):62===l?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(l),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(l){if((45===l||ej(l))&&r++<63){let n=45===l?t:i;return e.consume(l),n}return n(l)}(l)}(i):n(i)}}},{name:"htmlText",tokenize:function(e,t,n){let r,i,l,o=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),k):63===t?(e.consume(t),v):eR(t)?(e.consume(t),w):n(t)}function s(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),i=0,d):eR(t)?(e.consume(t),y):n(t)}function u(t){return 45===t?(e.consume(t),p):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),f):eB(t)?(l=c,O(t)):(e.consume(t),c)}function f(t){return 45===t?(e.consume(t),p):c(t)}function p(e){return 62===e?P(e):45===e?f(e):c(e)}function d(t){let r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),i===r.length?h:d):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):eB(t)?(l=h,O(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?P(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?P(t):eB(t)?(l=y,O(t)):(e.consume(t),y)}function v(t){return null===t?n(t):63===t?(e.consume(t),b):eB(t)?(l=v,O(t)):(e.consume(t),v)}function b(e){return 62===e?P(e):v(e)}function k(t){return eR(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||ej(t)?(e.consume(t),x):function t(n){return eB(n)?(l=t,O(n)):e$(n)?(e.consume(n),t):P(n)}(t)}function w(t){return 45===t||ej(t)?(e.consume(t),w):47===t||62===t||eV(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),P):58===t||95===t||eR(t)?(e.consume(t),S):eB(t)?(l=E,O(t)):e$(t)?(e.consume(t),E):P(t)}function S(t){return 45===t||46===t||58===t||95===t||ej(t)?(e.consume(t),S):function t(n){return 61===n?(e.consume(n),C):eB(n)?(l=t,O(n)):e$(n)?(e.consume(n),t):E(n)}(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,I):eB(t)?(l=C,O(t)):e$(t)?(e.consume(t),C):(e.consume(t),A)}function I(t){return t===r?(e.consume(t),r=void 0,D):null===t?n(t):eB(t)?(l=I,O(t)):(e.consume(t),I)}function A(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||eV(t)?E(t):(e.consume(t),A)}function D(e){return 47===e||62===e||eV(e)?E(e):n(e)}function P(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function O(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),T}function T(t){return e$(t)?eG(e,L,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),l(t)}}}],91:tM,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return eB(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},tw],93:tC,95:tT,96:{name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(("lineEnding"===e[3][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,l=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),l++,t):(e.exit("codeTextSequence"),o(n))}(t)};function o(s){return null===s?n(s):32===s?(e.enter("space"),e.consume(s),e.exit("space"),o):96===s?(i=e.enter("codeTextSequence"),r=0,function n(o){return 96===o?(e.consume(o),r++,n):r===l?(e.exit("codeTextSequence"),e.exit("codeText"),t(o)):(i.type="codeTextData",a(o))}(s)):eB(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):(e.enter("codeTextData"),a(s))}function a(t){return null===t||32===t||96===t||eB(t)?(e.exit("codeTextData"),o(t)):(e.consume(t),a)}}}},tH={null:[tT,e4]},tq={null:[42,95]},tU={null:[]},tB=/[\0\t\n\r]/g;function tV(e,t){let n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(65535&n)==65535||(65535&n)==65534||n>1114111?"�":String.fromCodePoint(n)}let t$=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tZ(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return tV(n.slice(t?2:1),t?16:10)}return tk(n)||e}let tW={}.hasOwnProperty;function tQ(e){return{line:e.line,column:e.column,offset:e.offset}}function tG(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+ea({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ea({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+ea({start:t.start,end:t.end})+") is still open")}function tK(e){let t=this;t.parser=function(n){var r,i;let l,o,a,s;return"string"!=typeof(r={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(i=r,r=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(y),autolinkProtocol:u,autolinkEmail:u,atxHeading:r(h),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:u,characterReference:u,codeFenced:r(d),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:r(d,i),codeText:r(function(){return{type:"inlineCode",value:""}},i),codeTextData:u,data:u,codeFlowValue:u,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(m),hardBreakTrailing:r(m),htmlFlow:r(g,i),htmlFlowData:u,htmlText:r(g,i),htmlTextData:u,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:i,link:r(y),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(v,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(v),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:r(h),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:o(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:o(),autolinkEmail:function(e){c.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){c.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:o(),characterEscapeValue:c,characterReferenceMarkerHexadecimal:p,characterReferenceMarkerNumeric:p,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=tV(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=tk(n);let i=this.stack[this.stack.length-1];i.value+=t},characterReference:function(e){this.stack.pop().position.end=tQ(e.end)},codeFenced:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:c,codeIndented:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:c,data:c,definition:o(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ts(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:o(),hardBreakEscape:o(f),hardBreakTrailing:o(f),htmlFlow:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:c,htmlText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:c,image:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=t.replace(t$,tZ),n.identifier=ts(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=tQ(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(u.call(this,e),c.call(this,e))},link:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ts(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:o(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:o(),thematicBreak:o()}};!function e(t,n){let r=-1;for(;++r<n.length;){let i=n[r];Array.isArray(i)?e(t,i):function(e,t){let n;for(n in t)if(tW.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,i)}}(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},o={stack:[r],tokenStack:[],config:t,enter:l,exit:a,buffer:i,resume:s,data:n},u=[],c=-1;for(;++c<e.length;)("listOrdered"===e[c][1].type||"listUnordered"===e[c][1].type)&&("enter"===e[c][0]?u.push(c):c=function(e,t,n){let r,i,l,o,a=t-1,s=-1,u=!1;for(;++a<=n;){let t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||o||s||l||(l=a),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let o=a;for(i=void 0;o--;){let t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=o}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}l&&(!i||l<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){let i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(a,0,["enter",i,t[2]]),a++,n++,l=void 0,o=!0}}}return e[t][1]._spread=u,n}(e,u.pop(),c));for(c=-1;++c<e.length;){let n=t[e[c][0]];tW.call(n,e[c][1].type)&&n[e[c][1].type].call(Object.assign({sliceSerialize:e[c][2].sliceSerialize},o),e[c][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||tG).call(o,void 0,e[0])}for(r.position={start:tQ(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:tQ(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},c=-1;++c<t.transforms.length;)r=t.transforms[c](r)||r;return r};function r(e,t){return function(n){l.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function l(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:tQ(t.start),end:void 0}}function o(e){return function(t){e&&e.call(this,t),a.call(this,t)}}function a(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||tG).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+ea({start:e.start,end:e.end})+"): it’s not open");n.position.end=tQ(e.end)}function s(){return eA(this.stack.pop())}function u(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:tQ(e.start),end:void 0},t.push(n)),this.stack.push(n)}function c(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=tQ(e.end)}function f(){this.data.atHardBreak=!0}function p(e){this.data.characterReferenceType=e.type}function d(){return{type:"code",lang:null,meta:null,value:""}}function h(){return{type:"heading",depth:0,children:[]}}function m(){return{type:"break"}}function g(){return{type:"html",value:""}}function y(){return{type:"link",title:null,url:"",children:[]}}function v(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(i)(function(e){for(;!eM(e););return e}((function(e){let t={constructs:eN([k,...(e||{}).extensions||[]]),content:n(eK),defined:[],document:n(eY),flow:n(e2),lazy:{},string:n(e3),text:n(e5)};return t;function n(e){return function(n){return function(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},l=[],o=[],a=[],s={attempt:h(function(e,t){m(e,t.from)}),check:h(d),consume:function(e){eB(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,g()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=p(),u.events.push(["enter",n,u]),a.push(n),n},exit:function(e){let t=a.pop();return t.end=p(),u.events.push(["exit",t,u]),t},interrupt:h(d,{interrupt:!0})},u={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,g()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,i=[];for(;++r<e.length;){let l,o=e[r];if("string"==typeof o)l=o;else switch(o){case -5:l="\r";break;case -4:l="\n";break;case -3:l="\r\n";break;case -2:l=t?" ":" ";break;case -1:if(!t&&n)continue;l=" ";break;default:l=String.fromCharCode(o)}n=-2===o,i.push(l)}return i.join("")}(f(e),t)},sliceStream:f,write:function(e){return(o=eT(o,e),function(){let e;for(;r._index<o.length;){let n=o[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),c=c(t)}else c=c(n)}}(),null!==o[o.length-1])?[]:(m(t,0),u.events=tS(l,u.events,u),u.events)}},c=t.tokenize.call(u,s);return t.resolveAll&&l.push(t),u;function f(e){return function(e,t){let n,r=t.start._index,i=t.start._bufferIndex,l=t.end._index,o=t.end._bufferIndex;if(r===l)n=[e[r].slice(i,o)];else{if(n=e.slice(r,l),i>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(i):n.shift()}o>0&&n.push(e[l].slice(0,o))}return n}(o,e)}function p(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:l}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:l}}function d(e,t){t.restore()}function h(e,t){return function(n,i,l){var o;let c,f,d,h;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):(o=n,function(e){let t=null!==e&&o[e],n=null!==e&&o.null;return m([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function m(e){return(c=e,f=0,0===e.length)?l:y(e[f])}function y(e){return function(n){let i,l,o,c,f;return(i=p(),l=u.previous,o=u.currentConstruct,c=u.events.length,f=Array.from(a),h={from:c,restore:function(){r=i,u.previous=l,u.currentConstruct=o,u.events.length=c,a=f,g()}},d=e,e.partial||(u.currentConstruct=e),e.name&&u.parser.constructs.disable.null.includes(e.name))?b(n):e.tokenize.call(t?Object.assign(Object.create(u),t):u,s,v,b)(n)}}function v(t){return e(d,h),i}function b(e){return(h.restore(),++f<c.length)?y(c[f]):l}}}function m(e,t){e.resolveAll&&!l.includes(e)&&l.push(e),e.resolve&&eO(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function g(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}(t,e,n)}}})(i).document().write((o=1,a="",s=!0,function(e,t,n){let r,i,u,c,f,p=[];for(e=a+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),u=0,a="",s&&(65279===e.charCodeAt(0)&&u++,s=void 0);u<e.length;){if(tB.lastIndex=u,c=(r=tB.exec(e))&&void 0!==r.index?r.index:e.length,f=e.charCodeAt(c),!r){a=e.slice(u);break}if(10===f&&u===c&&l)p.push(-3),l=void 0;else switch(l&&(p.push(-5),l=void 0),u<c&&(p.push(e.slice(u,c)),o+=c-u),f){case 0:p.push(65533),o++;break;case 9:for(i=4*Math.ceil(o/4),p.push(-2);o++<i;)p.push(-1);break;case 10:p.push(-4),o=1;break;default:l=!0,o=1}u=c+1}return n&&(l&&p.push(-5),a&&p.push(a),p.push(null)),p})(n,r,!0))))}}let tY="object"==typeof self?self:globalThis,tJ=e=>{var t;let n,r;return(t=new Map,n=(e,n)=>(t.set(n,e),e),r=i=>{if(t.has(i))return t.get(i);let[l,o]=e[i];switch(l){case 0:case -1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new tY[e](t),i)}case 8:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new tY[l](o),i)})(0)},{toString:tX}={},{keys:t0}=Object,t1=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=tX.call(e).slice(8,-1);switch(n){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},t2=([e,t])=>0===e&&("function"===t||"symbol"===t),t4=(e,{json:t,lossy:n}={})=>{var r,i,l;let o,a,s=[];return(r=!(t||n),i=!!t,l=new Map,o=(e,t)=>{let n=s.push(e)-1;return l.set(t,n),n},a=e=>{if(l.has(e))return l.get(e);let[t,n]=t1(e);switch(t){case 0:{let i=e;switch(n){case"bigint":t=8,i=e.toString();break;case"function":case"symbol":if(r)throw TypeError("unable to serialize "+n);i=null;break;case"undefined":return o([-1],e)}return o([t,i],e)}case 1:{if(n){let t=e;return"DataView"===n?t=new Uint8Array(e.buffer):"ArrayBuffer"===n&&(t=new Uint8Array(e)),o([n,[...t]],e)}let r=[],i=o([t,r],e);for(let t of e)r.push(a(t));return i}case 2:{if(n)switch(n){case"BigInt":return o([n,e.toString()],e);case"Boolean":case"Number":case"String":return o([n,e.valueOf()],e)}if(i&&"toJSON"in e)return a(e.toJSON());let l=[],s=o([t,l],e);for(let t of t0(e))(r||!t2(t1(e[t])))&&l.push([a(t),a(e[t])]);return s}case 3:return o([t,e.toISOString()],e);case 4:{let{source:n,flags:r}=e;return o([t,{source:n,flags:r}],e)}case 5:{let n=[],i=o([t,n],e);for(let[t,i]of e)(r||!(t2(t1(t))||t2(t1(i))))&&n.push([a(t),a(i)]);return i}case 6:{let n=[],i=o([t,n],e);for(let t of e)(r||!t2(t1(t)))&&n.push(a(t));return i}}let{message:s}=e;return o([t,{name:n,message:s}],e)})(e),s},t3="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?tJ(t4(e,t)):structuredClone(e):(e,t)=>tJ(t4(e,t));function t5(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let l=e.charCodeAt(n),o="";if(37===l&&ej(e.charCodeAt(n+1))&&ej(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){let t=e.charCodeAt(n+1);l<56320&&t>56319&&t<57344?(o=String.fromCharCode(l,t),i=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function t6(e,t){let n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function t7(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}let t9=function(e){var t,n;if(null==e)return ne;if("function"==typeof e)return t8(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=t9(e[n]);return t8(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):(t=e,t8(function(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}))}if("string"==typeof e){return n=e,t8(function(e){return e&&e.type===n})}throw Error("Expected function, string, or object as test")};function t8(e){return function(t,n,r){return!!(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function ne(){return!0}let nt=[];function nn(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;let l=t9(i),o=r?-1:1;(function e(i,a,s){let u=i&&"object"==typeof i?i:{};if("string"==typeof u.type){let e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(c,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return c;function c(){var u;let c,f,p,d=nt;if((!t||l(i,a,s[s.length-1]||void 0))&&!1===(d=Array.isArray(u=n(i,s))?u:"number"==typeof u?[!0,u]:null==u?nt:[u])[0])return d;if("children"in i&&i.children&&i.children&&"skip"!==d[0])for(f=(r?i.children.length:-1)+o,p=s.concat(i);f>-1&&f<i.children.length;){if(!1===(c=e(i.children[f],f,p)())[0])return c;f="number"==typeof c[1]?c[1]:f+o}return d}})(e,void 0,[])()}function nr(e,t,n,r){let i,l,o;"function"==typeof t&&"function"!=typeof n?(l=void 0,o=t,i=n):(l=t,o=n,i=r),nn(e,l,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)},i)}function ni(e,t){let n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];let i=e.all(t),l=i[0];l&&"text"===l.type?l.value="["+l.value:i.unshift({type:"text",value:"["});let o=i[i.length-1];return o&&"text"===o.type?o.value+=r:i.push({type:"text",value:r}),i}function nl(e){let t=e.spread;return null==t?e.children.length>1:t}function no(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}let na={blockquote:function(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l={type:"element",tagName:"pre",properties:{},children:[l=e.applyData(t,l)]},e.patch(t,l),l},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){let n,r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),l=t5(i.toLowerCase()),o=e.footnoteOrder.indexOf(i),a=e.footnoteCounts.get(i);void 0===a?(a=0,e.footnoteOrder.push(i),n=e.footnoteOrder.length):n=o+1,a+=1,e.footnoteCounts.set(i,a);let s={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,s);let u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)},heading:function(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ni(e,t);let i={src:t5(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);let l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)},image:function(e,t){let n={src:t5(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ni(e,t);let i={href:t5(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);let l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)},link:function(e,t){let n={href:t5(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){let r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=nl(n[r])}return t}(n):nl(t),l={},o=[];if("boolean"==typeof t.checked){let e,n=r[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},r.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a<r.length;){let e=r[a];(i||0!==a||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?o.push(e):o.push(...e.children)}let s=r[r.length-1];s&&(i||"element"!==s.type||"p"!==s.tagName)&&o.push({type:"text",value:"\n"});let u={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,u),e.applyData(t,u)},list:function(e,t){let n={},r=e.all(t),i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){let e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)},paragraph:function(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=el(t.children[1]),o=ei(t.children[t.children.length-1]);l&&o&&(r.position={start:l,end:o}),i.push(r)}let l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",l=n&&"table"===n.type?n.align:void 0,o=l?l.length:t.children.length,a=-1,s=[];for(;++a<o;){let n=t.children[a],r={},o=l?l[a]:void 0;o&&(r.align=o);let u={type:"element",tagName:i,properties:r,children:[]};n&&(u.children=e.all(n),e.patch(n,u),u=e.applyData(n,u)),s.push(u)}let u={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,u),e.applyData(t,u)},text:function(e,t){let n={type:"text",value:function(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,l=[];for(;r;)l.push(no(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(no(t.slice(i),i>0,!1)),l.join("")}(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:ns,yaml:ns,definition:ns,footnoteDefinition:ns};function ns(){}let nu={}.hasOwnProperty,nc={};function nf(e,t){e.position&&(t.position=function(e){let t=el(e),n=ei(e);if(t&&n)return{start:t,end:n}}(e))}function np(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&i&&Object.assign(n.properties,t3(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function nd(e,t){let n=[],r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function nh(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function nm(e,t){let n,r,i,l,o=(n=t||nc,r=new Map,i=new Map,l={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let i=l.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=nh(i.value)),!Array.isArray(i)&&"element"===i.type)){let e=i.children[0];e&&"text"===e.type&&(e.value=nh(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:np,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...na,...n.handlers},one:function(e,t){let n=e.type,r=l.handlers[n];if(nu.call(l.handlers,n)&&r)return r(l,e,t);if(l.options.passThrough&&l.options.passThrough.includes(n)){if("children"in e){let{children:t,...n}=e,r=t3(n);return r.children=l.all(e),r}return t3(e)}return(l.options.unknownHandler||function(e,t){let n=t.data||{},r="value"in t&&!(nu.call(n,"hProperties")||nu.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)})(l,e,t)},options:n,patch:nf,wrap:nd},nr(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),l),a=o.one(e,void 0),s=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||t6,r=e.options.footnoteBackLabel||t7,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[],s=-1;for(;++s<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[s]);if(!i)continue;let l=e.all(i),o=String(i.identifier).toUpperCase(),u=t5(o.toLowerCase()),c=0,f=[],p=e.footnoteCounts.get(o);for(;void 0!==p&&++c<=p;){f.length>0&&f.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,c);"string"==typeof e&&(e={type:"text",value:e}),f.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+u+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let d=l[l.length-1];if(d&&"element"===d.type&&"p"===d.tagName){let e=d.children[d.children.length-1];e&&"text"===e.type?e.value+=" ":d.children.push({type:"text",value:" "}),d.children.push(...f)}else l.push(...f);let h={type:"element",tagName:"li",properties:{id:t+"fn-"+u},children:e.wrap(l,!0)};e.patch(i,h),a.push(h)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...t3(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(o),u=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&u.children.push({type:"text",value:"\n"},s),u}function ng(e,t){return e&&"run"in e?async function(n,r){let i=nm(n,{file:r,...t});await e.run(i,r)}:function(n,r){return nm(n,{file:r,...e||t})}}function ny(e){if(e)throw e}var nv=n(92849);function nb(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}let nk=function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');nS(e);let r=0,i=-1,l=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;l--;)if(47===e.codePointAt(l)){if(n){r=l+1;break}}else i<0&&(n=!0,i=l+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let o=-1,a=t.length-1;for(;l--;)if(47===e.codePointAt(l)){if(n){r=l+1;break}}else o<0&&(n=!0,o=l+1),a>-1&&(e.codePointAt(l)===t.codePointAt(a--)?a<0&&(i=l):(a=-1,i=o));return r===i?i=o:i<0&&(i=e.length),e.slice(r,i)},nx=function(e){let t;if(nS(e),0===e.length)return".";let n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},nw=function(e){let t;nS(e);let n=e.length,r=-1,i=0,l=-1,o=0;for(;n--;){let a=e.codePointAt(n);if(47===a){if(t){i=n+1;break}continue}r<0&&(t=!0,r=n+1),46===a?l<0?l=n:1!==o&&(o=1):l>-1&&(o=-1)}return l<0||r<0||0===o||1===o&&l===r-1&&l===i+1?"":e.slice(l,r)},nE=function(...e){var t;let n,r,i,l=-1;for(;++l<e.length;)nS(e[l]),e[l]&&(i=void 0===i?e[l]:i+"/"+e[l]);return void 0===i?".":(nS(t=i),n=47===t.codePointAt(0),0!==(r=function(e,t){let n,r,i="",l=0,o=-1,a=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else if(47===n)break;else n=47;if(47===n){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(i.length<2||2!==l||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2)){if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",l=0):l=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),o=s,a=0;continue}}else if(i.length>0){i="",l=0,o=s,a=0;continue}}t&&(i=i.length>0?i+"/..":"..",l=2)}else i.length>0?i+="/"+e.slice(o+1,s):i=e.slice(o+1,s),l=s-o-1;o=s,a=0}else 46===n&&a>-1?a++:a=-1}return i}(t,!n)).length||n||(r="."),r.length>0&&47===t.codePointAt(t.length-1)&&(r+="/"),n?"/"+r:r)};function nS(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function nC(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let nI=["history","path","basename","stem","extname","dirname"];let VFile=class VFile{constructor(e){var t;let n,r;n=e?nC(e)?{path:e}:"string"==typeof e||(t=e)&&"object"==typeof t&&"byteLength"in t&&"byteOffset"in t?{value:e}:e:{},this.cwd="cwd"in n?"":"/",this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<nI.length;){let e=nI[i];e in n&&void 0!==n[e]&&null!==n[e]&&(this[e]="history"===e?[...n[e]]:n[e])}for(r in n)nI.includes(r)||(this[r]=n[r])}get basename(){return"string"==typeof this.path?nk(this.path):void 0}set basename(e){nD(e,"basename"),nA(e,"basename"),this.path=nE(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?nx(this.path):void 0}set dirname(e){nP(this.basename,"dirname"),this.path=nE(e||"",this.basename)}get extname(){return"string"==typeof this.path?nw(this.path):void 0}set extname(e){if(nA(e,"extname"),nP(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=nE(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){nC(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!nC(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){let e=t.codePointAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),nD(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?nk(this.path,this.extname):void 0}set stem(e){nD(e,"stem"),nA(e,"stem"),this.path=nE(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new VFileMessage(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}};function nA(e,t){if(e&&e.includes("/"))throw Error("`"+t+"` cannot be a path: did not expect `/`")}function nD(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function nP(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let nO=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},nT={}.hasOwnProperty;let Processor=class Processor extends nO{constructor(){let e,t;super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=(e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw TypeError("Expected function as last argument, not "+r);!function i(l,...o){let a=e[++n],s=-1;if(l)return void r(l);for(;++s<t.length;)(null===o[s]||void 0===o[s])&&(o[s]=t[s]);t=o,a?(function(e,t){let n;return function(...t){let l,o=e.length>t.length;o&&t.push(r);try{l=e.apply(this,t)}catch(e){if(o&&n)throw e;return r(e)}o||(l&&l.then&&"function"==typeof l.then?l.then(i,r):l instanceof Error?r(l):i(l))};function r(e,...i){n||(n=!0,t(e,...i))}function i(e){r(null,e)}})(a,i)(...o):r(null,...o)}(null,...t)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}})}copy(){let e=new Processor,t=-1;for(;++t<this.attachers.length;){let n=this.attachers[t];e.use(...n)}return e.data(nv(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2==arguments.length?(nN("data",this.frozen),this.namespace[e]=t,this):nT.call(this.namespace,e)&&this.namespace[e]||void 0:e?(nN("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let n=e.call(this,...t);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=n_(e),n=this.parser||this.Parser;return nM("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),nM("process",this.parser||this.Parser),nF("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let l=n_(e),o=n.parse(l);function a(e,n){e||!n?i(e):r?r(n):t(void 0,n)}n.run(o,l,function(e,t,r){var i,l;if(e||!t||!r)return a(e);let o=n.stringify(t,r);"string"==typeof(i=o)||(l=i)&&"object"==typeof l&&"byteLength"in l&&"byteOffset"in l?r.value=o:r.result=o,a(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),nM("processSync",this.parser||this.Parser),nF("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,ny(e),t=r}),nj("processSync","process",n),t}run(e,t,n){nR(e),this.freeze();let r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,l){let o=n_(t);r.run(e,o,function(t,r,o){let a=r||e;t?l(t):i?i(a):n(void 0,a,o)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){ny(e),n=t,r=!0}),nj("runSync","run",r),n}stringify(e,t){this.freeze();let n=n_(t),r=this.compiler||this.Compiler;return nF("stringify",r),nR(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(nN("use",this.frozen),null==e);else if("function"==typeof e)o(e,t);else if("object"==typeof e)Array.isArray(e)?l(e):i(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(!("plugins"in e)&&!("settings"in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(e.plugins),e.settings&&(r.settings=nv(!0,r.settings,e.settings))}function l(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;)!function(e){if("function"==typeof e)o(e,[]);else if("object"==typeof e)if(Array.isArray(e)){let[t,...n]=e;o(t,n)}else i(e);else throw TypeError("Expected usable value, not `"+e+"`")}(e[t]);else throw TypeError("Expected a list of plugins, not `"+e+"`")}function o(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(-1===i)n.push([e,...t]);else if(t.length>0){let[r,...l]=t,o=n[i][1];nb(o)&&nb(r)&&(r=nv(!0,o,r)),n[i]=[e,r,...l]}}}};let nL=new Processor().freeze();function nM(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function nF(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function nN(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nR(e){if(!nb(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function nj(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function n_(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new VFile(e)}let nz=[],nH={allowDangerousHtml:!0},nq=/^(https?|ircs?|mailto|xmpp)$/i,nU=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function nB(e){var t;let n,r,i,l,o,a=(n=(t=e).rehypePlugins||nz,r=t.remarkPlugins||nz,i=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...nH}:nH,nL().use(tK).use(r).use(ng,i).use(n)),s=(l=e.children||"",o=new VFile,"string"==typeof l&&(o.value=l),o);return function(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,s=t.urlTransform||nV;for(let e of nU)Object.hasOwn(t,e.from)&&(e.from,e.to&&e.to,e.id);return nr(e,function(e,t,i){if("raw"===e.type&&i&&"number"==typeof t)return o?i.children.splice(t,1):i.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in eS)if(Object.hasOwn(eS,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=eS[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=s(String(n||""),t,e))}}if("element"===e.type){let o=n?!n.includes(e.tagName):!!l&&l.includes(e.tagName);if(!o&&r&&"number"==typeof t&&(o=!r(e,t,i)),o&&i&&"number"==typeof t)return a&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}),function(e,t){var n,r,i,l;let o;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let a=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");n=a,r=t.jsxDEV,o=function(e,t,i,l){let o=Array.isArray(i.children),a=el(e);return r(t,i,l,o,{columnNumber:a?a.column-1:void 0,fileName:n,lineNumber:a?a.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");i=t.jsx,l=t.jsxs,o=function(e,t,n,r){let o=Array.isArray(n.children)?l:i;return r?o(t,n,r):o(t,n)}}let s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?K:G,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},u=ey(s,e,void 0);return u&&"string"!=typeof u?u:s.create(e,s.Fragment,{children:u||void 0},void 0)}(e,{Fragment:eC.Fragment,components:i,ignoreInvalidStyle:!0,jsx:eC.jsx,jsxs:eC.jsxs,passKeys:!0,passNode:!0})}(a.runSync(a.parse(s),s),e)}function nV(e){let t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return -1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||nq.test(e.slice(0,t))?e:""}function n$(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}let nZ="phrasing",nW=["autolink","link","image","label"];function nQ(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function nG(e){this.config.enter.autolinkProtocol.call(this,e)}function nK(e){this.config.exit.autolinkProtocol.call(this,e)}function nY(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function nJ(e){this.config.exit.autolinkEmail.call(this,e)}function nX(e){this.exit(e)}function n0(e){!function(e,t,n){let r=t9((n||{}).ignore||[]),i=function(e){let t=[];if(!Array.isArray(e))throw TypeError("Expected find and replace tuple or list of tuples");let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){var i;let e=n[r];t.push(["string"==typeof(i=e[0])?RegExp(function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(i),"g"):i,function(e){return"function"==typeof e?e:function(){return e}}(e[1])])}return t}(t),l=-1;for(;++l<i.length;)nn(e,"text",o);function o(e,t){let n,o=-1;for(;++o<t.length;){let e=t[o],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){let n=t[t.length-1],r=i[l][0],o=i[l][1],a=0,s=n.children.indexOf(e),u=!1,c=[];r.lastIndex=0;let f=r.exec(e.value);for(;f;){let n=f.index,i={index:f.index,input:f.input,stack:[...t,e]},l=o(...f,i);if("string"==typeof l&&(l=l.length>0?{type:"text",value:l}:void 0),!1===l?r.lastIndex=n+1:(a!==n&&c.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(l)?c.push(...l):l&&c.push(l),a=n+f[0].length,u=!0),!r.global)break;f=r.exec(e.value)}return u?(a<e.value.length&&c.push({type:"text",value:e.value.slice(a)}),n.children.splice(s,1,...c)):c=[e],s+c.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,n1],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,n2]],{ignore:["link","linkReference"]})}function n1(e,t,n,r,i){let l,o="";if(!n4(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),(l=n.split(".")).length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[a-zA-Z\d]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[a-zA-Z\d]/.test(l[l.length-2])))return!1;let a=function(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")"),i=n$(e,"("),l=n$(e,")");for(;-1!==r&&i>l;)e+=n.slice(0,r+1),r=(n=n.slice(r+1)).indexOf(")"),l++;return[e,n]}(n+r);if(!a[0])return!1;let s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function n2(e,t,n,r){return!(!n4(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function n4(e,t){let n=e.input.charCodeAt(e.index-1);return(0===e.index||eW(n)||eZ(n))&&(!t||47!==n)}function n3(){this.buffer()}function n5(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function n6(){this.buffer()}function n7(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function n9(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ts(this.sliceSerialize(e)).toLowerCase(),n.label=t}function n8(e){this.exit(e)}function re(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ts(this.sliceSerialize(e)).toLowerCase(),n.label=t}function rt(e){this.exit(e)}function rn(e,t,n,r){let i=n.createTracker(r),l=i.move("[^"),o=n.enter("footnoteReference"),a=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),a(),o(),l+=i.move("]")}function rr(e,t,n){return 0===t?e:ri(e,t,n)}function ri(e,t,n){return(n?"":" ")+e}rn.peek=function(){return"["};let rl=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function ro(e){this.enter({type:"delete",children:[]},e)}function ra(e){this.exit(e)}function rs(e,t,n,r){let i=n.createTracker(r),l=n.enter("strikethrough"),o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),l(),o}function ru(e){return e.length}function rc(e){let t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:114*(82===t||114===t)}rs.peek=function(){return"~"};function rf(e,t,n){let r=e.value||"",i="`",l=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){let e,t=n.unsafe[l],i=n.compilePattern(t);if(t.atBreak)for(;e=i.exec(r);){let t=e.index;10===r.charCodeAt(t)&&13===r.charCodeAt(t-1)&&t--,r=r.slice(0,t)+" "+r.slice(e.index+1)}}return i+r+i}rf.peek=function(){return"`"};t9(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);let rp=function(e,t,n,r){let i=function(e){let t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n),l=n.bulletCurrent||function(e){let t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(n);t&&"list"===t.type&&t.ordered&&(l=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+l);let o=l.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(o=4*Math.ceil(o/4));let a=n.createTracker(r);a.move(l+" ".repeat(o-l.length)),a.shift(o);let s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),function(e,t,n){return t?(n?"":" ".repeat(o))+e:(n?l:l+" ".repeat(o-l.length))+e});return s(),u};function rd(e){let t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function rh(e){this.exit(e),this.data.inTable=void 0}function rm(e){this.enter({type:"tableRow",children:[]},e)}function rg(e){this.exit(e)}function ry(e){this.enter({type:"tableCell",children:[]},e)}function rv(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,rb));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function rb(e,t){return"|"===t?t:e}function rk(e){let t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function rx(e){let t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&"text"===n.type){let r,i=t.children,l=-1;for(;++l<i.length;){let e=i[l];if("paragraph"===e.type){r=e;break}}r===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function rw(e,t,n,r){let i=e.children[0],l="boolean"==typeof e.checked&&i&&"paragraph"===i.type,o="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);l&&a.move(o);let s=rp(e,t,n,{...r,...a.current()});return l&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+o})),s}let rE={tokenize:function(e,t,n){let r=0;return function t(l){return(87===l||119===l)&&r<3?(r++,e.consume(l),t):46===l&&3===r?(e.consume(l),i):n(l)};function i(e){return null===e?n(e):t(e)}},partial:!0},rS={tokenize:function(e,t,n){let r,i,l;return o;function o(t){return 46===t||95===t?e.check(rI,s,a)(t):null===t||eV(t)||eW(t)||45!==t&&eZ(t)?s(t):(l=!0,e.consume(t),o)}function a(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),o}function s(e){return i||r||!l?n(e):t(e)}},partial:!0},rC={tokenize:function(e,t){let n=0,r=0;return i;function i(o){return 40===o?(n++,e.consume(o),i):41===o&&r<n?l(o):33===o||34===o||38===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||60===o||63===o||93===o||95===o||126===o?e.check(rI,t,l)(o):null===o||eV(o)||eW(o)?t(o):(e.consume(o),i)}function l(t){return 41===t&&r++,e.consume(t),i}},partial:!0},rI={tokenize:function(e,t,n){return r;function r(o){return 33===o||34===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||63===o||95===o||126===o?(e.consume(o),r):38===o?(e.consume(o),l):93===o?(e.consume(o),i):60===o||null===o||eV(o)||eW(o)?t(o):n(o)}function i(e){return null===e||40===e||91===e||eV(e)||eW(e)?t(e):r(e)}function l(t){return eR(t)?function t(i){return 59===i?(e.consume(i),r):eR(i)?(e.consume(i),t):n(i)}(t):n(t)}},partial:!0},rA={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return ej(e)?n(e):t(e)}},partial:!0},rD={name:"wwwAutolink",tokenize:function(e,t,n){let r=this;return function(t){return 87!==t&&119!==t||!rM.call(r,r.previous)||rj(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(rE,e.attempt(rS,e.attempt(rC,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:rM},rP={name:"protocolAutolink",tokenize:function(e,t,n){let r=this,i="",l=!1;return function(t){return(72===t||104===t)&&rF.call(r,r.previous)&&!rj(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),o):n(t)};function o(t){if(eR(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),o;if(58===t){let n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),a}return n(t)}function a(t){return 47===t?(e.consume(t),l)?s:(l=!0,a):n(t)}function s(t){return null===t||ez(t)||eV(t)||eW(t)||eZ(t)?n(t):e.attempt(rS,e.attempt(rC,u),n)(t)}function u(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:rF},rO={name:"emailAutolink",tokenize:function(e,t,n){let r,i,l=this;return function(t){return!rR(t)||!rN.call(l,l.previous)||rj(l.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),function t(r){return rR(r)?(e.consume(r),t):64===r?(e.consume(r),o):n(r)}(t))};function o(t){return 46===t?e.check(rA,s,a)(t):45===t||95===t||ej(t)?(i=!0,e.consume(t),o):s(t)}function a(t){return e.consume(t),r=!0,o}function s(o){return i&&r&&eR(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(o)):n(o)}},previous:rN},rT={},rL=48;for(;rL<123;)rT[rL]=rO,58==++rL?rL=65:91===rL&&(rL=97);function rM(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||eV(e)}function rF(e){return!eR(e)}function rN(e){return!(47===e||rR(e))}function rR(e){return 43===e||45===e||46===e||95===e||ej(e)}function rj(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}rT[43]=rO,rT[45]=rO,rT[46]=rO,rT[95]=rO,rT[72]=[rO,rP],rT[104]=[rO,rP],rT[87]=[rO,rD],rT[119]=[rO,rD];let r_={tokenize:function(e,t,n){let r=this;return eG(e,function(e){let i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function rz(e,t,n){let r,i=this,l=i.events.length,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);for(;l--;){let e=i.events[l][1];if("labelImage"===e.type){r=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(l){if(!r||!r._balanced)return n(l);let a=ts(i.sliceSerialize({start:r.end,end:i.now()}));return 94===a.codePointAt(0)&&o.includes(a.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l)):n(l)}}function rH(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function rq(e,t,n){let r,i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),o=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),a};function a(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(a){if(o>999||93===a&&!r||null===a||91===a||eV(a))return n(a);if(93===a){e.exit("chunkString");let r=e.exit("gfmFootnoteCallString");return l.includes(ts(i.sliceSerialize(r)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(a)}return eV(a)||(r=!0),o++,e.consume(a),92===a?u:s}function u(t){return 91===t||92===t||93===t?(e.consume(t),o++,s):s(t)}}function rU(e,t,n){let r,i,l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]),a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),s};function s(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(t)}function u(t){if(a>999||93===t&&!i||null===t||91===t||eV(t))return n(t);if(93===t){e.exit("chunkString");let n=e.exit("gfmFootnoteDefinitionLabelString");return r=ts(l.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return eV(t)||(i=!0),a++,e.consume(t),92===t?c:u}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,u):u(t)}function f(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(r)||o.push(r),eG(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function rB(e,t,n){return e.check(eX,t,e.attempt(r_,t,n))}function rV(e){e.exit("gfmFootnoteDefinition")}let EditMap=class EditMap{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let i=0;if(0!==n||0!==r.length){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length,n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function r$(e,t,n){let r,i=this,l=0,o=0;return function(e){let t=i.events.length-1;for(;t>-1;){let e=i.events[t][1].type;if("lineEnding"===e||"linePrefix"===e)t--;else break}let r=t>-1?i.events[t][1].type:null,l="tableHead"===r||"tableRow"===r?v:a;return l===v&&i.parser.lazy[i.now().line]?n(e):l(e)};function a(t){var n;return e.enter("tableHead"),e.enter("tableRow"),124===(n=t)||(r=!0,o+=1),s(n)}function s(t){return null===t?n(t):eB(t)?o>1?(o=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f):n(t):e$(t)?eG(e,s,"whitespace")(t):(o+=1,r&&(r=!1,l+=1),124===t)?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,s):(e.enter("data"),u(t))}function u(t){return null===t||124===t||eV(t)?(e.exit("data"),s(t)):(e.consume(t),92===t?c:u)}function c(t){return 92===t||124===t?(e.consume(t),u):u(t)}function f(t){return(i.interrupt=!1,i.parser.lazy[i.now().line])?n(t):(e.enter("tableDelimiterRow"),r=!1,e$(t))?eG(e,p,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t)}function p(t){return 45===t||58===t?h(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),d):n(t)}function d(t){return e$(t)?eG(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(o+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(o+=1,m(t)):null===t||eB(t)?y(t):n(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),function t(n){return 45===n?(e.consume(n),t):58===n?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(n),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(n))}(t)):n(t)}function g(t){return e$(t)?eG(e,y,"whitespace")(t):y(t)}function y(i){if(124===i)return p(i);if(null===i||eB(i))return r&&l===o?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(i)):n(i);return n(i)}function v(t){return e.enter("tableRow"),b(t)}function b(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),b):null===n||eB(n)?(e.exit("tableRow"),t(n)):e$(n)?eG(e,b,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||eV(t)?(e.exit("data"),b(t)):(e.consume(t),92===t?x:k)}function x(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function rZ(e,t){let n,r,i,l=-1,o=!0,a=0,s=[0,0,0,0],u=[0,0,0,0],c=!1,f=0,p=new EditMap;for(;++l<e.length;){let d=e[l],h=d[1];"enter"===d[0]?"tableHead"===h.type?(c=!1,0!==f&&(rQ(p,t,f,n,r),r=void 0,f=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(l,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(o=!0,i=void 0,s=[0,0,0,0],u=[0,l+1,0,0],c&&(c=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(l,0,[["enter",r,t]])),a="tableDelimiterRow"===h.type?2:r?3:1):a&&("data"===h.type||"tableDelimiterMarker"===h.type||"tableDelimiterFiller"===h.type)?(o=!1,0===u[2]&&(0!==s[1]&&(u[0]=u[1],i=rW(p,t,s,a,void 0,i),s=[0,0,0,0]),u[2]=l)):"tableCellDivider"===h.type&&(o?o=!1:(0!==s[1]&&(u[0]=u[1],i=rW(p,t,s,a,void 0,i)),u=[(s=u)[1],l,0,0])):"tableHead"===h.type?(c=!0,f=l):"tableRow"===h.type||"tableDelimiterRow"===h.type?(f=l,0!==s[1]?(u[0]=u[1],i=rW(p,t,s,a,l,i)):0!==u[1]&&(i=rW(p,t,u,a,l,i)),a=0):a&&("data"===h.type||"tableDelimiterMarker"===h.type||"tableDelimiterFiller"===h.type)&&(u[3]=l)}for(0!==f&&rQ(p,t,f,n,r),p.consume(t.events),l=-1;++l<t.events.length;){let e=t.events[l];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=function(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){let e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}(t.events,l))}return e}function rW(e,t,n,r,i,l){0!==n[0]&&(l.end=Object.assign({},rG(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));let o=rG(t.events,n[1]);if(l={type:1===r?"tableHeader":2===r?"tableDelimiter":"tableData",start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",l,t]]),0!==n[2]){let i=rG(t.events,n[2]),l=rG(t.events,n[3]),o={type:"tableContent",start:Object.assign({},i),end:Object.assign({},l)};if(e.add(n[2],0,[["enter",o,t]]),2!==r){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",o,t]])}return void 0!==i&&(l.end=Object.assign({},rG(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function rQ(e,t,n,r,i){let l=[],o=rG(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function rG(e,t){let n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}let rK={name:"tasklistCheck",tokenize:function(e,t,n){let r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return eV(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),l):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),l):n(t)}function l(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(t)}function o(r){return eB(r)?t(r):e$(r)?e.check({tokenize:rY},t,n)(r):n(r)}}};function rY(e,t,n){return eG(e,function(e){return null===e?n(e):t(e)},"whitespace")}let rJ={};function rX(e){let t,n,r,i=e||rJ,l=this.data(),o=l.micromarkExtensions||(l.micromarkExtensions=[]),a=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),s=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);o.push(eN([{text:rT},{document:{91:{name:"gfmFootnoteDefinition",tokenize:rU,continuation:{tokenize:rB},exit:rV}},text:{91:{name:"gfmFootnoteCall",tokenize:rq},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:rz,resolveTo:rH}}},(t=(i||{}).singleTilde,n={name:"strikethrough",tokenize:function(e,n,r){let i=this.previous,l=this.events,o=0;return function(a){return 126===i&&"characterEscape"!==l[l.length-1][1].type?r(a):(e.enter("strikethroughSequenceTemporary"),function l(a){let s=tO(i);if(126===a)return o>1?r(a):(e.consume(a),o++,l);if(o<2&&!t)return r(a);let u=e.exit("strikethroughSequenceTemporary"),c=tO(a);return u._open=!c||2===c&&!!s,u._close=!s||2===s&&!!c,n(a)}(a))}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";let i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},l={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",l,t]],a=t.parser.constructs.insideSpan.null;a&&eO(o,o.length,0,tS(a,e.slice(r+1,n),t)),eO(o,o.length,0,[["exit",l,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),eO(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}},null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}),{flow:{null:{name:"table",tokenize:r$,resolveAll:rZ}}},{text:{91:rK}}])),a.push([{transforms:[n0],enter:{literalAutolink:nQ,literalAutolinkEmail:nG,literalAutolinkHttp:nG,literalAutolinkWww:nG},exit:{literalAutolink:nX,literalAutolinkEmail:nJ,literalAutolinkHttp:nK,literalAutolinkWww:nY}},{enter:{gfmFootnoteCallString:n3,gfmFootnoteCall:n5,gfmFootnoteDefinitionLabelString:n6,gfmFootnoteDefinition:n7},exit:{gfmFootnoteCallString:n9,gfmFootnoteCall:n8,gfmFootnoteDefinitionLabelString:re,gfmFootnoteDefinition:rt}},{canContainEols:["delete"],enter:{strikethrough:ro},exit:{strikethrough:ra}},{enter:{table:rd,tableData:ry,tableHeader:ry,tableRow:rm},exit:{codeText:rv,table:rh,tableData:rg,tableHeader:rg,tableRow:rg}},{exit:{taskListCheckValueChecked:rk,taskListCheckValueUnchecked:rk,paragraph:rx}}]),s.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:nZ,notInConstruct:nW},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:nZ,notInConstruct:nW},{character:":",before:"[ps]",after:"\\/",inConstruct:nZ,notInConstruct:nW}]},(r=!1,i&&i.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:function(e,t,n,i){let l=n.createTracker(i),o=l.move("[^"),a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=l.move(n.safe(n.associationId(e),{before:o,after:"]"})),s(),o+=l.move("]:"),e.children&&e.children.length>0&&(l.shift(4),o+=l.move((r?"\n":" ")+n.indentLines(n.containerFlow(e,l.current()),r?ri:rr))),a(),o},footnoteReference:rn},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rl}],handlers:{delete:rs}},function(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=rf(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return a(function(e,t,n){let r=e.children,i=-1,l=[],o=t.enter("table");for(;++i<r.length;)l[i]=s(r[i],t,n);return o(),l}(e,n,r),e.align)},tableCell:o,tableRow:function(e,t,n,r){let i=a([s(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function o(e,t,n,r){let i=n.enter("tableCell"),o=n.enter("phrasing"),a=n.containerPhrasing(e,{...r,before:l,after:l});return o(),i(),a}function a(e,t){return function(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||ru,l=[],o=[],a=[],s=[],u=0,c=-1;for(;++c<e.length;){let t=[],r=[],l=-1;for(e[c].length>u&&(u=e[c].length);++l<e[c].length;){var f;let o=null==(f=e[c][l])?"":String(f);if(!1!==n.alignDelimiters){let e=i(o);r[l]=e,(void 0===s[l]||e>s[l])&&(s[l]=e)}t.push(o)}o[c]=t,a[c]=r}let p=-1;if("object"==typeof r&&"length"in r)for(;++p<u;)l[p]=rc(r[p]);else{let e=rc(r);for(;++p<u;)l[p]=e}p=-1;let d=[],h=[];for(;++p<u;){let e=l[p],t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let i=!1===n.alignDelimiters?1:Math.max(1,s[p]-t.length-r.length),o=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&((i=t.length+i+r.length)>s[p]&&(s[p]=i),h[p]=i),d[p]=o}o.splice(1,0,d),a.splice(1,0,h),c=-1;let m=[];for(;++c<o.length;){let e=o[c],t=a[c];p=-1;let r=[];for(;++p<u;){let i=e[p]||"",o="",a="";if(!1!==n.alignDelimiters){let e=s[p]-(t[p]||0),n=l[p];114===n?o=" ".repeat(e):99===n?e%2?(o=" ".repeat(e/2+.5),a=" ".repeat(e/2-.5)):a=o=" ".repeat(e/2):a=" ".repeat(e)}!1===n.delimiterStart||p||r.push("|"),!1!==n.padding&&(!1!==n.alignDelimiters||""!==i)&&(!1!==n.delimiterStart||p)&&r.push(" "),!1!==n.alignDelimiters&&r.push(o),r.push(i),!1!==n.alignDelimiters&&r.push(a),!1!==n.padding&&r.push(" "),(!1!==n.delimiterEnd||p!==u-1)&&r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function s(e,t,n){let r=e.children,i=-1,l=[],a=t.enter("tableRow");for(;++i<r.length;)l[i]=o(r[i],e,t,n);return a(),l}}(i),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rw}}]})}var r0=n(3433),r1=function(e,t){if(!(this instanceof r1))return new r1(e,t);this.url=e,t=t||{},this.headers=t.headers||{},this.payload=void 0!==t.payload?t.payload:"",this.method=t.method||this.payload&&"POST"||"GET",this.withCredentials=!!t.withCredentials,this.debug=!!t.debug,this.autoReconnect=void 0!==t.autoReconnect&&t.autoReconnect,this.reconnectDelay=void 0!==t.reconnectDelay?t.reconnectDelay:3e3,this.maxRetries=void 0!==t.maxRetries?t.maxRetries:null,this.retryCount=0,this.reconnectTimer=null,this.useLastEventId=void 0===t.useLastEventId||t.useLastEventId,this.FIELD_SEPARATOR=":",this.listeners={},this.xhr=null,this.readyState=r1.INITIALIZING,this.progress=0,this.chunk="",this.lastEventId="",this.addEventListener=function(e,t){void 0===this.listeners[e]&&(this.listeners[e]=[]),-1===this.listeners[e].indexOf(t)&&this.listeners[e].push(t)},this.removeEventListener=function(e,t){if(void 0===this.listeners[e])return;let n=[];this.listeners[e].forEach(function(e){e!==t&&n.push(e)}),0===n.length?delete this.listeners[e]:this.listeners[e]=n},this.dispatchEvent=function(e){if(!e)return!0;this.debug&&console.debug(e),e.source=this;let t="on"+e.type;return(!this.hasOwnProperty(t)||(this[t].call(this,e),!e.defaultPrevented))&&(!this.listeners[e.type]||this.listeners[e.type].every(function(t){return t(e),!e.defaultPrevented}))},this._markClosed=function(){if(this.xhr=null,this.progress=0,this.chunk="",this._setReadyState(r1.CLOSED),this.autoReconnect){if(null!==this.maxRetries&&this.retryCount>=this.maxRetries){this.debug&&console.debug(`SSE max retries (${this.maxRetries}) reached, stopping reconnection attempts`),this.autoReconnect=!1,this.close();return}this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.debug&&console.debug(`SSE will attempt to reconnect in ${this.reconnectDelay}ms (attempt ${this.retryCount+1}${this.maxRetries?"/"+this.maxRetries:""})`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.retryCount++,this.stream()},this.reconnectDelay)}},this._setReadyState=function(e){let t=new CustomEvent("readystatechange");t.readyState=e,this.readyState=e,this.dispatchEvent(t)},this._onStreamFailure=function(e){let t=new CustomEvent("error");t.responseCode=e.currentTarget.status,t.data=e.currentTarget.response,this.dispatchEvent(t),this._markClosed()},this._onStreamAbort=function(){this.dispatchEvent(new CustomEvent("abort")),this._markClosed()},this._onStreamProgress=function(e){if(!this.xhr)return;if(this.xhr.status<200||this.xhr.status>=300)return void this._onStreamFailure(e);this.retryCount=0;let t=this.xhr.responseText.substring(this.progress);this.progress+=t.length;let n=(this.chunk+t).split(/(\r\n\r\n|\r\r|\n\n)/g),r=n.pop();n.forEach((function(e){e.trim().length>0&&this.dispatchEvent(this._parseEventChunk(e))}).bind(this)),this.chunk=r},this._onStreamLoaded=function(e){this._onStreamProgress(e),this.dispatchEvent(this._parseEventChunk(this.chunk)),this.chunk="",this._markClosed()},this._parseEventChunk=function(e){if(!e||0===e.length)return null;this.debug&&console.debug(e);let t={id:null,retry:null,data:null,event:null};if(e.split(/\n|\r\n|\r/).forEach((function(e){let n,r,i=e.indexOf(this.FIELD_SEPARATOR);if(i>0){let t=" "===e[i+1]?2:1;n=e.substring(0,i),r=e.substring(i+t)}else{if(!(i<0))return;n=e,r=""}n in t&&("data"===n&&null!==t[n]?t.data+="\n"+r:t[n]=r)}).bind(this)),null===t.data)return null;null!==t.id&&(this.lastEventId=t.id);let n=new CustomEvent(t.event||"message");return n.id=t.id,n.data=t.data||"",n.lastEventId=this.lastEventId,n},this._onReadyStateChange=function(){if(this.xhr&&this.xhr.readyState===XMLHttpRequest.HEADERS_RECEIVED){let e={};for(let t of this.xhr.getAllResponseHeaders().trim().split("\r\n")){let[n,...r]=t.split(":"),i=r.join(":").trim();e[n.trim().toLowerCase()]=e[n.trim().toLowerCase()]||[],e[n.trim().toLowerCase()].push(i)}let t=new CustomEvent("open");t.responseCode=this.xhr.status,t.headers=e,this.dispatchEvent(t),this._setReadyState(r1.OPEN)}},this.stream=function(){if(!this.xhr){for(let e in this._setReadyState(r1.CONNECTING),this.xhr=new XMLHttpRequest,this.xhr.addEventListener("progress",this._onStreamProgress.bind(this)),this.xhr.addEventListener("load",this._onStreamLoaded.bind(this)),this.xhr.addEventListener("readystatechange",this._onReadyStateChange.bind(this)),this.xhr.addEventListener("error",this._onStreamFailure.bind(this)),this.xhr.addEventListener("abort",this._onStreamAbort.bind(this)),this.xhr.open(this.method,this.url),this.headers)this.xhr.setRequestHeader(e,this.headers[e]);this.useLastEventId&&this.lastEventId.length>0&&this.xhr.setRequestHeader("Last-Event-ID",this.lastEventId),this.xhr.withCredentials=this.withCredentials,this.xhr.send(this.payload)}},this.close=function(){this.readyState!==r1.CLOSED&&(this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.autoReconnect=!1,this.xhr.abort())},(void 0===t.start||t.start)&&this.stream()};r1.INITIALIZING=-1,r1.CONNECTING=0,r1.OPEN=1,r1.CLOSED=2,"u">typeof exports&&(exports.SSE=r1);var r2=n(60973),r4=n(92177),r3=n(2181),r5=n(1086),r6=n(96052),r7="I'm sorry, but I can't",r9="Searching for MDN content…",r8="Generating your answer…",ie=n(92547);function it(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ir(e){if(Array.isArray(e))return e}function ii(e,t,n,r,i,l,o){try{var a=e[l](o),s=a.value}catch(e){n(e);return}a.done?t(s):Promise.resolve(s).then(r,i)}function il(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var l=e.apply(t,n);function o(e){ii(l,r,i,o,a,"next",e)}function a(e){ii(l,r,i,o,a,"throw",e)}o(void 0)})}}function io(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ia(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function is(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function iu(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function ic(e,t){return ir(e)||function(e,t){var n,r,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var l=[],o=!0,a=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(l.push(n.value),!t||l.length!==t);o=!0);}catch(e){a=!0,r=e}finally{try{o||null==i.return||i.return()}finally{if(a)throw r}}return l}}(e,t)||ih(e,t)||ia()}function ip(e){return ir(e)||io(e)||ih(e)||ia()}function id(e){return function(e){if(Array.isArray(e))return it(e)}(e)||io(e)||ih(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ih(e,t){if(e){if("string"==typeof e)return it(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return it(e,t)}}function im(e,t){var n,r,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(o,"next",{value:s(0)}),a(o,"throw",{value:s(1)}),a(o,"return",{value:s(2)}),"function"==typeof Symbol&&a(o,Symbol.iterator,{value:function(){return this}}),o;function s(a){return function(s){var u=[a,s];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(l=0)),l;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return l.label++,{value:u[1],done:!1};case 5:l.label++,r=u[1],u=[0];continue;case 7:u=l.ops.pop(),l.trys.pop();continue;default:if(!(i=(i=l.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){l=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){l.label=u[1];break}if(6===u[0]&&l.label<i[1]){l.label=i[1],i=u;break}if(i&&l.label<i[2]){l.label=i[2],l.ops.push(u);break}i[2]&&l.ops.pop(),l.trys.pop();continue}u=t.call(e,l)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var ig=((r={}).User="user",r.Assistant="assistant",r),iy=((i={}).Pending="pending",i.InProgress="in-progress",i.Complete="complete",i.Stopped="stopped",i.Errored="errored",i);function iv(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=ip(t||[]),i=r[0],l=void 0===i?n?0:null:i,o=r.slice(1);return e.root.length&&null!==l?function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=ip(n),l=i[0],o=void 0===l?r?0:null:l,a=i.slice(1);return t?t.children.length&&null!==o?[t.request,t.response].concat(id(e(t.children[o],a,r))):[t.request,t.response]:[]}(e.root[l],o,n):[]}function ib(e,t){for(var n=t,r=e.nodes[n].parentId,i=[],l=Object.keys(e.nodes).length,o=0,a=function(e){return e.messageId===n};o<l;){o++;var s,u,c="string"!=typeof r,f=c?e.root:null==(u=e.nodes[r])?void 0:u.children,p=null!=(s=null==f?void 0:f.findIndex(a))?s:-1;if(p<0)return[];if(i.push(p),c)break;n=r,r=e.nodes[r].parentId}return i.reverse()}function ik(e,t){var n=structuredClone(e),r=t.type;switch(r){case"new":var i=t.response,l=t.request,o=t.parentId,a=o&&n.nodes[o],s={parentId:o,request:l,response:i,children:[]};a?a.children.push(s):n.root.push(s),n.currentNode=s;break;case"update":var u,c=t.message,f=null==(u=n.currentNode)?void 0:u.messageId;f&&(n.nodes[f].response=is({},n.nodes[f].response,c));break;case"append-content":var p,d=t.content,h=null==(p=n.currentNode)?void 0:p.messageId;h&&(n.nodes[h].response=iu(is({},n.nodes[h].response),{content:n.nodes[h].response.content+d}));break;case"set-metadata":var m=t.sources,g=t.messageId,y=t.parentId,v=t.chatId;n.currentNode&&(Object.assign(n.currentNode,{messageId:g,parentId:y,response:iu(is({},n.currentNode.response),{messageId:g,parentId:y,chatId:v,sources:m}),request:iu(is({},n.currentNode.request),{messageId:g,parentId:y,chatId:v})}),n.nodes[g]=n.currentNode);break;case"set-state":n=t.treeState;break;case"reset":n={root:[],nodes:{}};break;default:throw Error("Unknown message action '".concat(r,"'"))}return n}var ix=function(){"use strict";var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function")}return e=[{key:"getMessages",value:function(e){return il(function(){var t,n;return im(this,function(r){switch(r.label){case 0:return[4,fetch("/api/v1/plus/ai/help/history/".concat(e))];case 1:if(!(t=r.sent()).ok)throw Error("".concat(t.status,": ").concat(t.statusText));return[4,t.json()];case 2:if(!(n=r.sent()).chat_id)throw Error("no chat id");return[2,function(e,t){var n=[],r={},i=!0,l=!1,o=void 0;try{for(var a,s=(e.messages||[])[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u,c=a.value,f={messageId:c.metadata.message_id,parentId:c.metadata.parent_id,request:{role:"user",content:c.user.content,status:"complete",chatId:c.metadata.chat_id,messageId:c.metadata.message_id,parentId:c.metadata.parent_id},response:{role:"assistant",content:(null==(u=c.assistant)?void 0:u.content)||"",status:c.assistant?"complete":Date.now()-Date.parse(c.metadata.created_at)>6e4?"errored":"in-progress",sources:c.metadata.sources,chatId:c.metadata.chat_id,messageId:c.metadata.message_id,parentId:c.metadata.parent_id},children:[]};c.metadata.parent_id?r[c.metadata.parent_id].children.push(f):n.push(f),r[f.messageId]=f}}catch(e){l=!0,o=e}finally{try{i||null==s.return||s.return()}finally{if(l)throw o}}return{chatId:t,treeState:{root:n,nodes:r}}}(n,e)]}})})()}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t,e),t}(),iw=n(7408),iE=n(99848),iS=n(85743);n(60405);var iC=n(24826),iI=n(96540);function iA(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.isDisabled,n=(0,iS.P_)(),r=(0,x.useMemo)(function(){return(0,iC.dz)(n)},[n]);return iI.createElement("div",{className:"ai-help-banner ".concat(void 0!==t&&t?"disabled":"")},iI.createElement("p",null,iI.createElement(iw.I,{name:"bell-ring"}),iI.createElement("strong",null,r?"GPT-4o-powered AI Help.":"Supercharge your AI Help experience with our paid subscriptions.")),iI.createElement("p",null,r?"Now with chat history, enhanced context, and optimized prompts.":"Upgrade to MDN Plus 5 or Supporter 10 to unlock the full potential of GPT-4o-powered AI Help."),!r&&iI.createElement(iE.$,{gleanContext:"".concat(r5.v2,": upsell-banner"),toPlans:!0}))}function iD(e){var t=e.limit;return iI.createElement("div",{className:"login-banner"},iI.createElement("span",null,iI.createElement("span",null,"You have reached the limit of ",t," questions per day."),iI.createElement("br",null),iI.createElement("span",null,iI.createElement("strong",null,"Want to ask more?")," Upgrade to MDN Plus 5 or MDN Supporter 10.")),iI.createElement("ul",{className:"auth-container"},iI.createElement("li",null,iI.createElement(iE.$,{gleanContext:"".concat(r5.v2,": upsell-button"),toPlans:!0}))))}var iP=n(53108),iO=n(86638),iT=n(5438),iL=n(97478),iM=n(43304),iF=n(49351),iN=n(69756),iR=n(16969),ij=n(70661),i_=n(90326),iz=n(49136),iH=n(74954),iq=n(31256),iU=n(62074),iB=n(96540);function iV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i$(e,t,n,r,i,l,o){try{var a=e[l](o),s=a.value}catch(e){n(e);return}a.done?t(s):Promise.resolve(s).then(r,i)}function iZ(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var l=e.apply(t,n);function o(e){i$(l,r,i,o,a,"next",e)}function a(e){i$(l,r,i,o,a,"throw",e)}o(void 0)})}}function iW(e,t){var n,r,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(o,"next",{value:s(0)}),a(o,"throw",{value:s(1)}),a(o,"return",{value:s(2)}),"function"==typeof Symbol&&a(o,Symbol.iterator,{value:function(){return this}}),o;function s(a){return function(s){var u=[a,s];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(l=0)),l;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return l.label++,{value:u[1],done:!1};case 5:l.label++,r=u[1],u=[0];continue;case 7:u=l.ops.pop(),l.trys.pop();continue;default:if(!(i=(i=l.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){l=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){l.label=u[1];break}if(6===u[0]&&l.label<i[1]){l.label=i[1],i=u;break}if(i&&l.label<i[2]){l.label=i[2],l.ops.push(u);break}i[2]&&l.ops.pop(),l.trys.pop();continue}u=t.call(e,l)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var iQ="New Topic";function iG(e){var t,n=e.currentChatId,r=e.entries,i=e.mutate,l=(t=(0,r0.ok)(),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var l=[],o=!0,a=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(l.push(n.value),2!==l.length);o=!0);}catch(e){a=!0,r=e}finally{try{o||null==i.return||i.return()}finally{if(a)throw r}}return l}}(t,2)||function(e,t){if(e){if("string"==typeof e)return iV(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iV(e,2)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1],o=(0,r3.db)();return iB.createElement(iB.Fragment,null,iB.createElement("time",null,r.label),iB.createElement("ol",null,r.entries.map(function(e,t){var r=e.chat_id,a=(e.last,e.label);return iB.createElement("li",{key:t,className:"".concat(r===n?"ai-help-history-active":"")},iB.createElement("a",{href:"./ai-help?c=".concat(r),title:a||iQ,onClick:function(e){e.preventDefault(),o("".concat(r5.v2,": history item -> ").concat(r)),l(function(e){var t=new URLSearchParams(e);return t.set("c",r),t})}},a||iQ),r===n&&iB.createElement(iF.$,{type:"action",icon:"trash",onClickHandler:function(){return iZ(function(){var e;return iW(this,function(t){switch(t.label){case 0:if(e=window.confirm("Do you want to permanently delete this topic?"),o("".concat(r5.v2,": history delete -> ").concat(Number(e))),!e)return[3,2];return[4,fetch("/api/v1/plus/ai/help/history/".concat(r),{method:"DELETE"})];case 1:t.sent(),i(),l(function(e){var t=new URLSearchParams(e);return t.delete("c"),t.append("d","1"),t}),t.label=2;case 2:return[2]}})})()}}))})))}function iK(e){var t=(0,r6.U)().isHistoryEnabled;return iB.createElement("aside",{className:"ai-help-history",tabIndex:-1},t?iB.createElement(iY,e):iB.createElement(iJ,null))}function iY(e){var t,n=e.currentChatId,r=e.lastUpdate,i=e.isFinished,l=e.messageId,o=(0,r3.db)(),a=(0,r4.Ay)("/api/v1/plus/ai/help/history/list",function(e){return iZ(function(){var t;return iW(this,function(n){switch(n.label){case 0:return[4,fetch(e)];case 1:return[4,n.sent().json()];case 2:return[2,Array.isArray(t=n.sent())?t:[]]}})})()},{fallbackData:[]}),s=a.data,u=a.mutate,c=(null!=(t=s.find(function(e){return e.chat_id===n}))?t:{}).label,f=void 0===c?"":c;return(0,x.useEffect)(function(){i&&l&&""===f&&iZ(function(){var e;return iW(this,function(t){switch(t.label){case 0:return[4,fetch("/api/v1/plus/ai/help/history/summary/".concat(l),{method:"POST"})];case 1:if(!(e=t.sent()).ok)return[3,3];return[4,e.json()];case 2:t.sent(),u(),t.label=3;case 3:return[2]}})})()},[u,i,n,l,f]),(0,x.useEffect)(function(){u()},[r,u]),iB.createElement(iB.Fragment,null,iB.createElement("input",{id:"ai-help-history-toggle",onChange:function(e){return o("".concat(r5.v2,": history toggle"))},type:"checkbox",className:"ai-help-history-details"}),iB.createElement("div",{className:"ai-help-history-toggle"},iB.createElement("label",{className:"button action has-icon",htmlFor:"ai-help-history-toggle"},iB.createElement("span",{className:"button-wrap"},iB.createElement("span",{className:"icon icon-sidebar"}),iB.createElement("span",{className:"show-history"},"Show History"),iB.createElement("span",{className:"hide-history"},"Hide History")))),iB.createElement("ol",null,(function(e){var t=new Date(new Date().toDateString()),n=new Date(structuredClone(t).setDate(t.getDate()-1)),r=new Date(structuredClone(t).setDate(t.getDate()-7)),i=[{label:"Last 30 Days",d:new Date(structuredClone(t).setDate(t.getDate()-30))},{label:"Last 7 Days",d:r},{label:"Yesterday",d:n},{label:"Today",d:t}],l=[],o=i.pop()||{},a=o.label,s=void 0===a?"unknown":a,u=o.d,c={label:s,entries:[]},f=!0,p=!1,d=void 0;try{for(var h,m=e[Symbol.iterator]();!(f=(h=m.next()).done);f=!0){for(var g,y,v=h.value,b=new Date(v.last);!u||b<u;){if(u){if(b<u){y=(g=i.pop()||{}).label,s=void 0===y?"unknown":y,u=g.d;continue}}else s=b.toLocaleString(void 0,{month:"short",year:"numeric"});break}c.label!==s?(l.push(c),c={label:s,entries:[v]}):c.entries.push(v)}}catch(e){p=!0,d=e}finally{try{f||null==m.return||m.return()}finally{if(p)throw d}}return c.entries.length&&l.push(c),l})(s).map(function(e,t){return(null==e?void 0:e.entries.length)?iB.createElement("li",{key:t},iB.createElement(iG,{entries:e,currentChatId:n,mutate:u})):null})))}function iJ(){var e=(0,iT.Ym)(),t=(0,r3.db)();return iB.createElement("section",{className:"ai-help-history-activation"},iB.createElement("figure",null,iB.createElement(iw.v,{name:"history"}),iB.createElement("figcaption",null,iB.createElement("p",null,iB.createElement("strong",null,"Answer History")),iB.createElement("p",null,iB.createElement("span",{className:"teaser"},"You can now effortlessly revisit and continue past conversations")),iB.createElement("p",null,iB.createElement(iF.$,{type:"link",href:"/".concat(e,"/plus/settings#ai-help--history-enable"),onClickHandler:function(){return t("".concat(r5.v2,": history enable"))}},"Enable History")))))}var iX=n(79428),i0=n(44171),i1=n(1908);function i2(){return(i2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let i4=(0,x.forwardRef)(({title:e,titleId:t,...n},r)=>x.createElement("svg",i2({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 64 64",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,l||(l=x.createElement("path",{fill:"#DFBD0A",d:"M56.273 21.59a.5.5 0 0 1 .5-.5H61.5a.5.5 0 0 1 .5.5v2.82a.5.5 0 0 1-.5.5h-4.727a.5.5 0 0 1-.5-.5v-2.82ZM20 21.59a.5.5 0 0 1 .5-.5h4.727a.5.5 0 0 1 .5.5v2.82a.5.5 0 0 1-.5.5H20.5a.5.5 0 0 1-.5-.5v-2.82ZM42.41 2a.5.5 0 0 1 .5.5v4.727a.5.5 0 0 1-.5.5h-2.82a.5.5 0 0 1-.5-.5V2.5a.5.5 0 0 1 .5-.5h2.82ZM27.13 7.13a.5.5 0 0 1 .708 0l3.359 3.373a.5.5 0 0 1-.002.708L29.192 13.2a.5.5 0 0 1-.705 0l-3.36-3.345a.5.5 0 0 1-.002-.707l2.004-2.018Zm23.673 4.062a.5.5 0 0 1-.001-.707l3.342-3.357a.5.5 0 0 1 .708 0l2.02 2.02a.5.5 0 0 1 0 .708l-3.358 3.342a.5.5 0 0 1-.706 0l-2.005-2.006Zm-6.485 28.99a.5.5 0 0 1 .5.5v1.409A1.91 1.91 0 0 1 42.91 44h-3.818a1.909 1.909 0 0 1-1.91-1.91v-1.408a.5.5 0 0 1 .5-.5h6.637Zm-5.227-6.227a.5.5 0 0 0 .5.5h2.818a.5.5 0 0 0 .5-.5v-3.178c0-.229.156-.427.374-.494A7.622 7.622 0 0 0 48.636 23a7.636 7.636 0 0 0-15.272 0 7.622 7.622 0 0 0 5.353 7.283.523.523 0 0 1 .374.494v3.178Z"})),o||(o=x.createElement("path",{fill:"#347A3F",d:"M45.35 36.304h-9.143v-7.257h9.143v7.257Z"})),a||(a=x.createElement("ellipse",{cx:40.78,cy:22.697,fill:"#347A3F",rx:10.058,ry:9.978})),s||(s=x.createElement("path",{fill:"currentColor",d:"M19.722 44.278h8.861l-8.86-8.861v8.86ZM5.222 33h16.111L31 42.667v16.11A3.222 3.222 0 0 1 27.778 62H5.222A3.221 3.221 0 0 1 2 58.778V36.222A3.211 3.211 0 0 1 5.222 33Zm0 3.222v22.556h22.556V47.5H16.5V36.222H5.222Z"}))));function i3(){return(i3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let i5=(0,x.forwardRef)(({title:e,titleId:t,...n},r)=>x.createElement("svg",i3({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 64 64",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,u||(u=x.createElement("mask",{id:"a",fill:"#fff"},x.createElement("path",{fillRule:"evenodd",d:"M23.642 62.177c12.029.372 20.52-6.63 20.52-17.104 0-10.473-6.43-18.624-18.75-20.822-9.824-1.753-23.35 5.887-23.35 16.36-.572 5.817 2.853 11.633 7.693 15.757.093.559.3 2.015.133 3.003-.197 1.164-1.103 2.797-1.103 2.797s2.632.1 3.89-.565c.779-.412 1.65-1.304 2.124-1.827 2.912 1.516 5.99 2.401 8.843 2.401Z",clipRule:"evenodd"}))),c||(c=x.createElement("path",{fill:"currentColor",d:"m23.642 62.177.093-2.998-.046-.002h-.047v3Zm1.77-37.926.527-2.954-.527 2.954ZM2.062 40.61l2.986.294.014-.147v-.147h-3Zm7.693 15.757 2.96-.49-.18-1.082-.834-.711-1.946 2.283Zm.133 3.003-2.958-.5 2.958.5Zm-1.103 2.797-2.623-1.456-2.37 4.268 4.878.186.115-2.998Zm3.89-.565-1.402-2.652 1.403 2.652Zm2.124-1.827 1.385-2.66-2.055-1.07-1.554 1.717 2.224 2.013Zm26.363-14.703c0 4.366-1.742 7.882-4.667 10.312-2.962 2.462-7.336 3.961-12.76 3.794l-.185 5.997c6.604.204 12.49-1.612 16.78-5.177 4.328-3.597 6.832-8.819 6.832-14.926h-6ZM24.885 27.204c5.61 1.001 9.636 3.307 12.257 6.323 2.616 3.01 4.02 6.941 4.02 11.546h6c0-5.868-1.812-11.25-5.491-15.482-3.674-4.228-9.023-7.097-15.732-8.294l-1.054 5.907ZM5.062 40.611c0-3.866 2.52-7.577 6.628-10.25 4.1-2.669 9.173-3.874 13.195-3.157l1.053-5.907c-5.802-1.035-12.403.703-17.521 4.035-5.112 3.327-9.355 8.673-9.355 15.28h6Zm6.639 13.474c-4.438-3.78-7.092-8.718-6.653-13.18l-5.971-.588c-.706 7.172 3.49 13.867 8.733 18.335l3.89-4.567Zm1.145 5.787c.263-1.555-.048-3.49-.131-3.995l-5.92.982c.039.23.1.64.133 1.078.037.483.024.804.002.934l5.916 1Zm-4.061 2.296a1337.723 1337.723 0 0 0 2.623 1.455l.001-.001.002-.003.004-.008.013-.023a10.822 10.822 0 0 0 .17-.321c.104-.204.246-.49.396-.821.27-.596.685-1.59.852-2.574L6.93 58.87c-.03.179-.167.584-.4 1.096a12.841 12.841 0 0 1-.37.75v-.002l.001-.002 2.624 1.455Zm2.488-3.217c.051-.027-.03.02-.32.079-.263.052-.578.09-.908.113a12.688 12.688 0 0 1-1.151.027h.004l-.113 2.998-.114 2.998h.02l.036.002.115.003c.095.001.226.003.385.002.315 0 .753-.01 1.245-.045.828-.06 2.369-.219 3.607-.873l-2.806-5.304Zm1.302-1.188c-.198.218-.463.495-.74.747-.305.276-.5.408-.562.441l2.806 5.304c1.3-.689 2.488-1.962 2.944-2.465l-4.448-4.027Zm11.067 1.414c-2.26 0-4.861-.71-7.458-2.062l-2.77 5.322c3.228 1.68 6.78 2.74 10.228 2.74v-6Z",mask:"url(#a)"})),f||(f=x.createElement("path",{fill:"#347A3F",fillRule:"evenodd",d:"M44.468 32.24c-9.66.3-16.34-5.279-16.138-13.627.202-8.348 3.525-16.6 15.45-16.605 7.998-.003 18.627 4.685 18.424 13.033.353 4.713-2.608 9.426-6.674 12.724-.049.544-.101 1.5.051 2.163.21.914 1.008 2.156 1.008 2.156s-2.102.25-3.138-.199c-.758-.328-1.652-1.184-1.965-1.498-2.329 1.17-4.768 1.852-7.018 1.852Z",clipRule:"evenodd"})),p||(p=x.createElement("path",{fill:"#DFBD0A",stroke:"#DFBD0A",d:"M44.27 18.9c-.839-1.154-2.498-2.02-2.498-2.02s2.495 1.023 3.301.29c.638-.578.662-2.161.662-2.161l1.676 2.308 2.623 1.012-1.5 1.008.444 2.74-1.944-1.733-4.23 2.448s2.42-2.578 1.465-3.892Z"})),d||(d=x.createElement("path",{stroke:"#DFBD0A",d:"M23.698 34.291c3.661-3.543 4.591-6.916 9.375-9.074m-10.237 17.58c7.465-5.14 9.324-13.4 17.535-16.275M32.17 41.94s1.938-2.583 3.153-4.457c1.215-1.873 4.99-4.186 4.99-4.186"}))));function i6(){return(i6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let i7=(0,x.forwardRef)(({title:e,titleId:t,...n},r)=>x.createElement("svg",i6({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 64 64",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,h||(h=x.createElement("path",{fill:"#347A3F",d:"M44.777 41.95a8.109 8.109 0 0 0 .748-2.307 8.026 8.026 0 0 0-.333-3.943c-.87-2.56-2.965-4.396-5.49-4.813a6.693 6.693 0 0 0-1.509-.075 7.124 7.124 0 0 0-2.05-2.248 6.661 6.661 0 0 0-2.752-1.13l-.044-.008-.017-.002c-3.06-.505-6.122 1.168-7.577 4.137a6.84 6.84 0 0 0-2.908.831 7.439 7.439 0 0 0-2.355 2.034 8.123 8.123 0 0 0-1.58 3.645c-.31 1.877.04 3.794.983 5.38a8.109 8.109 0 0 0-.748 2.307 8.027 8.027 0 0 0 .333 3.943c.515 1.515 1.47 2.804 2.728 3.683a6.702 6.702 0 0 0 4.27 1.205 7.125 7.125 0 0 0 2.051 2.248 6.662 6.662 0 0 0 2.752 1.13l.044.008.018.002c3.061.505 6.123-1.168 7.579-4.14 1.009-.054 2-.337 2.908-.831a7.44 7.44 0 0 0 2.355-2.034 8.11 8.11 0 0 0 1.578-3.642c.31-1.877-.042-3.794-.984-5.38ZM31.65 56.01l-.007-.002a5.093 5.093 0 0 1-3.137-1.856c.061-.023.122-.048.182-.074l6.145-2.539a.955.955 0 0 0 .394-.3c.105-.136.176-.298.204-.47l1.392-8.445 2.116 1.85c.011.008.02.02.026.033a.095.095 0 0 1 .008.043l-1.152 6.99c-.515 3.106-3.276 5.24-6.171 4.77Zm-10.421-7.03a6.024 6.024 0 0 1-.24-2.928 6.16 6.16 0 0 1 .236-.95c.037.034.101.093.148.133l5.005 4.377a.872.872 0 0 0 .916.151l7.502-3.098-.482 2.922v.005a.097.097 0 0 1-.046.067l-6.212 2.565a5.051 5.051 0 0 1-2.745.32 5.047 5.047 0 0 1-2.5-1.186 5.537 5.537 0 0 1-1.582-2.377Zm.688-13.31c.8-1.04 1.911-1.756 3.138-2.02-.008.052-.026.143-.037.206l-1.14 6.916v.006c-.03.171-.015.347.041.509a.955.955 0 0 0 .276.411l6.111 5.342-2.597 1.072a.081.081 0 0 1-.08-.005l-5.06-4.426a5.538 5.538 0 0 1-1.579-2.38 6.045 6.045 0 0 1-.237-2.933 6.052 6.052 0 0 1 1.164-2.698Zm18.562 8.03-6.11-5.342 2.597-1.072a.08.08 0 0 1 .08.005l5.06 4.423a5.534 5.534 0 0 1 1.58 2.38 6.04 6.04 0 0 1 .24 2.933c-.39 2.36-2.11 4.246-4.307 4.721l1.174-7.122.002-.008a1.042 1.042 0 0 0-.041-.507.956.956 0 0 0-.275-.411Zm2.97-3.404a8.439 8.439 0 0 0-.148-.133l-5.005-4.377a.874.874 0 0 0-.915-.151l-7.503 3.098.482-2.922v-.005a.094.094 0 0 1 .047-.067l6.211-2.562a5.041 5.041 0 0 1 2.746-.321c2.897.477 4.831 3.388 4.318 6.5-.052.319-.13.634-.232.94Zm-15.602 2.777-2.116-1.85a.087.087 0 0 1-.027-.033.095.095 0 0 1-.008-.043l1.153-6.99c.514-3.109 3.28-5.242 6.176-4.765a5.105 5.105 0 0 1 3.142 1.858l-.182.073-6.145 2.539a.955.955 0 0 0-.394.301 1.042 1.042 0 0 0-.204.469v.006l-1.395 8.435Zm1.768-2.752 3.342-1.38 2.722 2.378-.62 3.76-3.341 1.378-2.722-2.378.62-3.758Z"})),m||(m=x.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M32.182 2.004c8.898.12 17.51 3.11 24.56 8.511a.981.981 0 0 1 .16 1.397l-.455.564a1.021 1.021 0 0 1-1.431.149 37.447 37.447 0 0 0-23.392-8.159 37.44 37.44 0 0 0-22.568 7.521 1.021 1.021 0 0 1-1.426-.188l-.426-.56a.982.982 0 0 1 .197-1.391 41.306 41.306 0 0 1 24.781-7.844Z",clipRule:"evenodd"})),g||(g=x.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M32.5 11.862a25.894 25.894 0 0 1 15.097 5.11c.443.33.51.961.164 1.391l-.137.17c-.346.43-.972.496-1.417.171a22.708 22.708 0 0 0-13.442-4.379 22.71 22.71 0 0 0-13.68 4.557c-.454.34-1.103.267-1.447-.184l-.57-.75a.97.97 0 0 1 .2-1.386 25.894 25.894 0 0 1 15.231-4.7Z",clipRule:"evenodd"})),y||(y=x.createElement("g",{clipPath:"url(#a)"},x.createElement("path",{fill:"#DFBD0A",d:"m59.666 19.664-.84 1.833-1.827.834 1.827.84.84 1.826.833-1.826 1.834-.84-1.834-.834m-7.5.167-1.666 3.667-3.667 1.666 3.667 1.667 1.666 3.667 1.667-3.667 3.667-1.667-3.667-1.666m5 3.666-.84 1.827-1.827.84 1.827.833.84 1.834.833-1.834 1.834-.833-1.834-.84"}))),v||(v=x.createElement("defs",null,x.createElement("clipPath",{id:"a"},x.createElement("path",{fill:"#fff",d:"M47 19h16v16H47z"})))))),i9=n.p+"ai-help_dark.046ff33d604ca485.png";var i8=n(35703),le=n(96540);function lt(){return le.createElement("div",{className:"ai-help-landing"},le.createElement(iP.A,{extraClasses:"ai-help-landing-top"},le.createElement("div",null,le.createElement("h1",null,"Utilize AI Help to ",le.createElement("em",null,"boost")," your productivity"),le.createElement("p",null,"Receive MDN-sourced answers complete with consulted links"),le.createElement(ln,{placement:"top"})),le.createElement("figure",null,le.createElement(i0.A,{srcDark:i9,srcLight:i8,alt:"Screenshot of AI Help"}))),le.createElement("div",{className:"ai-help-landing-features"},le.createElement(iP.A,null,le.createElement("h2",null,"New Additions"),le.createElement("div",{className:"ai-help-new-additions"},le.createElement("figure",null,le.createElement(i5,{role:"none"}),le.createElement("figcaption",null,le.createElement("h3",null,"History"),le.createElement("p",null,"Save your history to revisit your chats at anytime"))),le.createElement("figure",null,le.createElement(i4,{role:"none"}),le.createElement("figcaption",null,le.createElement("h3",null,"Enhanced Context"),le.createElement("p",null,"Ask queries about browser compatibility data"))),le.createElement("figure",null,le.createElement(i7,{role:"none"}),le.createElement("figcaption",null,le.createElement("h3",null,"GPT-4o-Powered"),le.createElement("p",null,"Unlock GPT-4o's full potential with our paid subscriptions")))))),le.createElement(iP.A,{extraClasses:"ai-help-landing-bottom"},le.createElement("h2",null,"Boost Your Productivity with AI-Assisted Help on MDN"),le.createElement("ul",{className:"highlights"},le.createElement("li",null,le.createElement("em",null,"Direct Access to Information"),": We provide the verified links checked by AI for your answers, enabling you to dive directly into them at your preferred pace for a comprehensive understanding."),le.createElement("li",null,le.createElement("em",null,"Summarized Insights"),": We provide quick, concise summary of your questions, making it easy to grasp key points without extensive reading."),le.createElement("li",null,le.createElement("em",null,"Interactive Learning"),": We've integrated this with our Playground feature, allowing you to directly experiment with the code provided, verify solutions, and enhance your understanding through practical application.")),le.createElement(ln,{placement:"bottom"})))}function ln(e){var t=e.placement;return le.createElement(i1._,{logInGleanContext:"".concat(r5.v2,": banner-login ").concat(t),signUpGleanContext:"".concat(r5.v2,": banner-signup ").concat(t)})}var lr=n(62225),li=n(91554);function ll(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function la(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function ls(e,t){if(null==e)return{};var n,r,i,l={};if("u">typeof Reflect&&Reflect.ownKeys){for(i=0,n=Reflect.ownKeys(e);i<n.length;i++)r=n[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r]);return l}if(l=function(e,t){if(null==e)return{};var n,r,i={},l=Object.getOwnPropertyNames(e);for(r=0;r<l.length;r++)n=l[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(e,t),Object.getOwnPropertySymbols)for(i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r=n[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r]);return l}function lu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var l=[],o=!0,a=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(l.push(n.value),!t||l.length!==t);o=!0);}catch(e){a=!0,r=e}finally{try{o||null==i.return||i.return()}finally{if(a)throw r}}return l}}(e,t)||lf(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lc(e){return function(e){if(Array.isArray(e))return ll(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||lf(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lf(e,t){if(e){if("string"==typeof e)return ll(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ll(e,t)}}var lp=[{category:"css",query:"How to center a div with CSS?"},{category:"html",query:"How do I create a form in HTML?"},{category:"js",query:"How can I sort an Array in JavaScript?"},{category:"apis",query:"How can I use the Fetch API to make HTTP requests in JavaScript?"},{category:"http",query:"How can I redirect using HTTP?"},{category:"learn",query:"What are some accessibility best practices?"}];function ld(){document.title="AI Help | ".concat(iO.U6),(0,iT.bs)();var e=(0,iS.P_)(),t=(0,iT.Ju)().setViewed;return(0,x.useEffect)(function(){return t(iO.mQ.PLUS_AI_HELP)}),x.createElement("div",{className:"ai-help"},(null==e?void 0:e.isAuthenticated)?x.createElement(lh,null):x.createElement(lt,null))}function lh(){var e=(0,r3.db)();return x.createElement("div",{className:"ai-help-main with-ai-help-history"},x.createElement(iP.A,{extraClasses:"ai-help-header"},x.createElement("h1",null,x.createElement("span",null,"AI Help")),x.createElement("p",null,"Get answers using generative AI based on MDN content."),x.createElement("p",null,x.createElement("a",{href:"https://survey.alchemer.com/s3/7418589/MDN-AI-Help-Feedback",target:"_blank",rel:"noreferrer noopener",className:"feedback-link",onClick:function(){return e("".concat(r5.v2,": report feedback"))}},"Report Feedback"))),x.createElement(lv,null))}function lm(e){var t=e.message,n=e.canEdit,r=e.submit,i=e.nextPrev,l=e.siblingCount,o=(0,r3.db)(),a=lu((0,x.useState)(!1),2),s=a[0],u=a[1],c=lu((0,x.useState)(t.content),2),f=c[0],p=c[1],d=(0,x.useRef)(null),h=l(t.messageId),m=h.pos,g=h.total;return(0,x.useEffect)(function(){p(t.content)},[t.content]),s?x.createElement("form",{className:"ai-help-input-form",onSubmit:function(e){e.preventDefault(),n&&(null==f?void 0:f.trim())&&(o("".concat(r5.v2,": edit submit")),u(!1),r(f,t.chatId,t.parentId,t.messageId))}},x.createElement(iH.A,{ref:d,maxLength:25e3,enterKeyHint:"send",onKeyDown:function(e){"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),n&&(null==f?void 0:f.trim())&&(o("".concat(r5.v2,": edit submit")),u(!1),r(f,t.chatId,t.parentId,t.messageId)))},onChange:function(e){return p(e.target.value)},value:f,rows:1}),x.createElement("div",{className:"ai-help-input-actions"},n&&x.createElement(x.Fragment,null,f&&x.createElement(iF.$,{type:"action",icon:"cancel",buttonType:"reset",title:"Clear question",onClickHandler:function(){o("".concat(r5.v2,": edit clear")),p("")}},x.createElement("span",{className:"visually-hidden"},"Clear question")),x.createElement(iF.$,{type:"action",icon:"send",buttonType:"submit",title:"Submit question",isDisabled:!f.trim()},x.createElement("span",{className:"visually-hidden"},"Submit question"))),x.createElement(iF.$,{type:"action",icon:"return",title:"Undo editing",onClickHandler:function(){o("".concat(r5.v2,": edit cancel")),u(!1),p(t.content)}},x.createElement("span",{className:"visually-hidden"},"Undo editing")))):x.createElement("div",{className:"ai-help-message-content role-user"},g>1&&x.createElement("nav",{className:"ai-help-message-nav"},x.createElement(iF.$,{icon:"previous",type:"action",isDisabled:1===m,onClickHandler:function(){o("".concat(r5.v2,": question prev")),i(t.messageId,"prev")}},x.createElement("span",{className:"visually-hidden"},"Previous Question")),x.createElement("span",null,m," / ",g),x.createElement(iF.$,{isDisabled:m===g,icon:"next",type:"action",onClickHandler:function(){o("".concat(r5.v2,": question next")),i(t.messageId,"next")}},x.createElement("span",{className:"visually-hidden"},"Next Question"))),x.createElement("div",{className:"ai-help-user-message"},t.content),n&&x.createElement(iF.$,{type:"action",icon:"edit-filled",onClickHandler:function(){o("".concat(r5.v2,": edit start")),u(!0)}}))}function lg(e){var t,n=e.message,r=e.queuedExamples,i=e.setQueue,l=e.messages,o=e.retryLastQuestion,a=(0,r3.db)(),s=(0,iT.Ym)(),u=(0,iX.Ed)().highlightedQueueExample,c=0,f=n.role===ig.Assistant&&((null==(t=n.content)?void 0:t.startsWith(r7))||n.status===iy.Complete&&r7.startsWith(n.content));return f&&(n=la(lo({},n),{content:"I'm sorry, but I can't answer questions outside web development.",sources:[]})),x.createElement(x.Fragment,null,!f&&x.createElement(ly,{message:n}),!f&&(n.content||n.status===iy.InProgress||n.status===iy.Errored)&&x.createElement("div",{className:["ai-help-message-progress",n.status===iy.InProgress&&"active",n.status===iy.Complete&&"complete",n.status===iy.Errored&&"errored",n.status===iy.Stopped&&"stopped"].filter(Boolean).join(" ")},function(e){switch(e){case iy.Errored:return x.createElement(x.Fragment,null,"Error generating your answer!"," Please"," ",x.createElement(iF.$,{type:"link",onClickHandler:o},"try again"),".");case iy.Stopped:return"Answer (stopped):";case iy.InProgress:return r8;default:return"Answer:"}}(n.status)),n.content&&x.createElement("div",{className:["ai-help-message-content",!n.content&&"empty","role-".concat(n.role)].filter(Boolean).join(" ")},x.createElement(nB,{remarkPlugins:[rX],components:{a:function(e){e.node;var t,n,r=ls(e,["node"]);(null==(n=r.href)?void 0:n.startsWith("https://developer.mozilla.org/"))&&(r.href=r.href.replace("https://developer.mozilla.org",""));var i=(0,r6.t)(null!=(t=r.href)?t:"");return i&&(r.className="external",r.rel="noopener noreferrer"),r.onClick=function(){return a("".concat(r5.v2,": link ").concat(i?"external":"internal"," -> ").concat(r.href))},r.target="_blank",x.createElement("a",r)},pre:function(e){e.node;var t=e.className,l=e.children,o=ls(e,["node","className","children"]),f=x.Children.toArray(l).map(function(e){var t,n;return null==(t=/language-(\w+)/.exec((null==e||null==(n=e.props)?void 0:n.className)||""))?void 0:t[1]}).find(Boolean);if(!f)return x.createElement("pre",la(lo({},o),{className:t}),l);var p=c,d="".concat(n.messageId,"--").concat(p),h=r.has(d);return c+=1,x.createElement("div",{className:"code-example"},x.createElement("div",{className:"example-header play-collect ".concat(u===d?"active":"")},x.createElement("span",{className:"language-name"},f),n.status===iy.Complete&&["html","js","javascript","css"].includes(f.toLowerCase())&&x.createElement("div",{className:"playlist"},x.createElement("input",{type:"checkbox",checked:h,onChange:function(){a("".concat(r5.v2,": example ").concat(h?"dequeue":"queue"," -> ").concat(d)),i(function(e){return e.some(function(e){return e.id===d})?lc(e).filter(function(e){return e.id!==d}):lc(e).concat([(0,iU.G)(d)]).sort(function(e,t){return e.key-t.key})})},id:d}),x.createElement("label",{htmlFor:d},h?"queued":"queue"),x.createElement("button",{type:"button",className:"play-button",title:"Open in Playground",onClick:function(e){a("".concat(r5.v2,": example play -> ").concat(d));var t,n,r=null==(t=e.target.previousElementSibling)?void 0:t.previousElementSibling,i=(0,iL.cb)(r);sessionStorage.setItem(iq.FX,JSON.stringify(i));var l=new URL(null==(n=window)?void 0:n.location.href);l.pathname="/".concat(s,"/play"),l.hash="",l.search="",!0===e.shiftKey?window.location.href=l.href:window.open(l,"_blank")}},"play"))),x.createElement("pre",{className:"brush: ".concat(f)},l))},code:function(e){var t=e.className,n=e.children,r=ls(e,["className","children"]),i=/language-(\w+)/.exec(t||""),l=null==i?void 0:i[1];return x.createElement(li.n,lo({language:l,className:t},r),n)}}},n.content),"stopped"===n.status&&x.createElement("section",{className:"stopped-message"},"■\xa0Stopped answering"),("complete"===n.status||f)&&x.createElement(x.Fragment,null,x.createElement("section",{className:"ai-help-feedback"},!f&&x.createElement(iN.T,{feature:"ai-help-answer",featureKey:n.messageId,question:"Was this answer useful?",upLabel:"Yes, this answer was useful.",downLabel:"No, this answer was not useful."}),x.createElement(lk,{messages:l,currentMessage:n},"Report an issue with this answer on GitHub")))))}function ly(e){var t=e.message,n=(0,r3.db)();return x.createElement(x.Fragment,null,x.createElement("div",{className:["ai-help-message-progress",t.status===iy.Pending?"active":"complete"].filter(Boolean).join(" ")},t.status===iy.Pending?r9:"Consulted MDN content:"),t.sources&&t.sources.length>0&&x.createElement("ul",{className:"ai-help-message-sources"},t.sources.map(function(e,t){var r=e.url,i=e.title;return x.createElement("li",{key:t},x.createElement(lr.A,{to:r,onClick:function(){return n("".concat(r5.v2,": link source -> ").concat(r))},target:"_blank"},i))})))}function lv(){var e,t,n,r,i,l,o,a,s,u,c,f=(0,x.useRef)(null),p=(0,x.useRef)(null),d=(0,x.useRef)(null),h=(0,x.useRef)(null),m=lu((0,x.useState)(""),2),g=m[0],y=m[1],v=lu((0,x.useState)(!1),2),b=v[0],k=v[1],w=(0,iX.Ed)(),E=w.queuedExamples,S=w.setQueue,C=w.setHighlightedQueueExample,I=(0,r0.zy)().hash,A=(0,r3.db)(),D=(0,iS.P_)(),P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.messageTemplate,n=void 0===t?function(e){return e}:t,r=(0,r3.db)(),i=(0,x.useRef)(),l=ic((0,r0.ok)(),2),o=l[0],a=l[1],s=ic((0,x.useState)("idle"),2),u=s[0],c=s[1],f=(0,r6.U)().isHistoryEnabled,p="loading"===u,d="responding"===u,h="failed"===u,m="finished"===u,g=ic((0,x.useState)(!0),2),y=g[0],v=g[1],b=ic((0,x.useState)(!1),2),k=b[0],w=b[1],E=ic((0,x.useState)(),2),S=E[0],C=E[1],I=ic((0,x.useState)(new Date),2),A=I[0],D=I[1],P=ic((0,x.useReducer)(function(e,t){return null===t?[]:id(e).concat([t])},[]),2),O=P[0],T=P[1],L=ic((0,x.useState)(),2),M=L[0],F=L[1],N=ic((0,x.useState)(),2),R=N[0],j=N[1],_=ic((0,x.useState)(),2),z=_[0],H=_[1],q=ic((0,x.useState)([]),2),U=q[0],B=q[1],V=ic((0,x.useReducer)(ik,void 0,function(){return{root:[],nodes:{}}}),2),$=V[0],Z=V[1],W=ic((0,x.useState)([]),2),Q=W[0],G=W[1],K=ic((0,x.useState)(void 0),2),Y=K[0],J=K[1],X=(0,r4.Ay)(ie.i9,function(e){return il(function(){var t,n;return im(this,function(r){switch(r.label){case 0:return[4,fetch(e)];case 1:if((t=r.sent()).ok)return[3,3];return[4,t.text()];case 2:throw n=r.sent(),Error("".concat(t.status," on ").concat(e,": ").concat(n));case 3:return[4,t.json()];case 4:return[2,r.sent().quota]}})})()}).data,ee=(0,x.useRef)(),et=(0,x.useCallback)(function(e){var t;r("".concat(r5.v2,": error")),null==(t=i.current)||t.close(),i.current=void 0,c("failed"),(0,r2.j)(ie.i9),console.error(e)},[r]),en=(0,x.useCallback)(function(){j(M),F(void 0),eo(),a(function(e){return e.delete("c"),e.delete("d"),e}),B([]),G([]),Z({type:"reset"})},[a,M]),er=(0,x.useCallback)(function(){a(function(e){return e.delete("c"),e},{replace:!0})},[a]);(0,x.useEffect)(function(){if(!f)return void er();var e,t=o.get("c");if(t&&t!==M){w(!0);var n=function(){};(n=function(){return il(function(){var r,i,l;return im(this,function(a){switch(a.label){case 0:if(eo(),!(r=o.get("c"))||r!==t)return[2,window.clearTimeout(e)];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,ix.getMessages(t)];case 2:if(i=a.sent().treeState)window.clearTimeout(e),Object.values(i.nodes).some(function(e){return"in-progress"===e.response.status})?(c("responding"),e=window.setTimeout(function(){return n()},1e4)):c("finished"),j(void 0),F(t),B([]),Z({type:"set-state",treeState:i});else throw Error("no treeState");return[3,4];case 3:var s;return(l=a.sent(),j(void 0),B([]),Z({type:"reset"}),(null!=(s=Error)&&"u">typeof Symbol&&s[Symbol.hasInstance]?!!s[Symbol.hasInstance](l):l instanceof s)&&l.message.startsWith("404"))?(F(void 0),er()):(F(t),et(l)),[3,4];case 4:return w(!1),[2]}})})()})()}"1"===o.get("d")&&en()},[f,er,o,M,en,et]),(0,x.useEffect)(function(){void 0!==X&&J(X)},[X]),(0,x.useEffect)(function(){if("responding"===u){var e=window.setTimeout(function(){r("".concat(r5.v2,": timeout")),et("AI Help response timed out.")},15e3);return function(){return window.clearTimeout(e)}}},[S,u,et,r]);var ei=(0,x.useCallback)(function(e){try{if(C(new Date),T(e),"metadata"===e.type){var t,n=e.sources,r=void 0===n?void 0:n,i=e.quota,l=void 0===i?void 0:i,o=e.chat_id,a=e.message_id,s=e.parent_id;if(j(void 0),F(o),H(a),D(new Date),Array.isArray(r)){var u=function(e){Z({type:"set-metadata",sources:e,chatId:o,messageId:a,parentId:s})},f=0,p=[];r.forEach(function(e,t){var n=function(){return u(r.slice(0,t+1))};if(0===t)n();else{f+=250+750*Math.random();var i=window.setTimeout(n,f);p.push(i)}}),ee.current=function(){p.forEach(function(e){return window.clearTimeout(e)}),u(r),ee.current=void 0}}void 0!==l&&J(l);return}if(c("responding"),null==(t=ee.current)||t.call(ee),Z({type:"update",messageId:z,message:{status:"in-progress"}}),!e.id)return void console.warn("Received unsupported message",{data:e});var d=ic(e.choices,1)[0],h=d.delta.content,m=d.finish_reason;h&&Z({type:"append-content",messageId:z,content:h}),m&&("stop"!==m&&console.warn("Got unexpected finish_reason",{finish_reason:m}),c("finished"),D(new Date),Z({type:"update",messageId:z,message:{status:"stop"===m?"complete":"stopped"}}))}catch(e){et(e)}},[et,z]),el=(0,x.useCallback)(function(e,t,l,o){var a=o?function(e,t){if(!t||!e.nodes[t].parentId)return[e.root.length];var n=e.nodes[t].parentId,r=e.nodes[n].children.length,i=ib(e,n);return i.push(r),i}($,o):l?id(ib($,l)).concat([0]):[0];B(a),r("".concat(r5.v2,": submit question ").concat(a.length)),Z({type:"new",chatId:t,parentId:l,request:{status:"complete",role:"user",content:e,chatId:t,parentId:l},response:{status:"pending",role:"assistant",content:"",chatId:t,parentId:l}}),c("loading");var s=new r1("/api/v1/plus/ai/help",{headers:{"Content-Type":"application/json"},withCredentials:!0,payload:JSON.stringify({messages:iv($,a.slice(0,-1)).filter(function(e){return"complete"===e.status}).map(function(e){return{role:e.role,content:e.content}}).concat({role:"user",content:n(e)}),chat_id:t,parent_id:l})});s.addEventListener("error",et),s.addEventListener("message",function(e){ei(JSON.parse(e.data))}),s.stream(),i.current=s},[$,r,n,et,ei]);function eo(){var e;null==(e=i.current)||e.close(),i.current=void 0,c("idle"),T(null)}(0,x.useEffect)(function(){var e=iv($,U,!0);G(e),e.length&&v(!1)},[$,U,G]);var ea=(0,x.useCallback)(function(){R&&a(function(e){var t=new URLSearchParams(e);return t.set("c",R),t})},[a,R]),es=(0,x.useCallback)(function(e,t){var n=$.nodes[e],r=n.parentId?$.nodes[n.parentId].children:$.root,i=r.findIndex(function(t){return t.messageId===e});return"next"===t&&i<r.length-1?B(ib($,r[i+1].messageId||e)):"prev"===t&&i>0?B(ib($,r[i-1].messageId||e)):void 0},[$]),eu=(0,x.useCallback)(function(e){if(!e)return{pos:1,total:1};var t=$.nodes[e];if(!t)return{pos:1,total:1};var n=t.parentId?$.nodes[t.parentId].children:$.root;return{pos:n.findIndex(function(t){return t.messageId===e})+1,total:n.length}},[$]);return{submit:el,datas:O,stop:function(){eo(),Z({type:"update",message:{status:"stopped"}})},reset:en,unReset:ea,messages:Q,state:$,path:U,isFinished:m,isLoading:p,isHistoryLoading:k,isResponding:d,isInitializing:y,hasError:h,quota:Y,chatId:M,previousChatId:R,nextPrev:es,siblingCount:eu,lastUpdate:A}}(),O=P.isFinished,T=P.isLoading,L=P.isHistoryLoading,M=P.isResponding,F=P.isInitializing,N=P.hasError,R=P.datas,j=P.messages,_=P.quota,z=P.reset,H=P.unReset,q=P.stop,U=P.submit,B=P.chatId,V=P.previousChatId,$=P.nextPrev,Z=P.siblingCount,W=P.lastUpdate,Q=void 0===_,G=!Q&&null!==_,K=j.length>0,Y=(0,iC.dz)(D)?"GPT-4o":"GPT-4o mini";function J(e){return!!e&&e.remaining<=0}var X=(e=j,n=(t={bodyRef:d,footerRef:h}).bodyRef,r=t.footerRef,l=(i=lu((0,x.useState)(!1),2))[0],o=i[1],a=(0,x.useRef)(0),s=(0,x.useRef)(0),(0,x.useEffect)(function(){var e,t,i=null!=(e=n.current)?e:n.current=document.querySelector(".ai-help-body"),u=null!=(t=r.current)?t:r.current=document.querySelector(".ai-help-footer");if(i&&u){window.setTimeout(function(){var e=i.offsetTop,t=i.offsetHeight,n=e+t+u.offsetHeight-window.innerHeight,r=s.current<t&&a.current<n;s.current=t,a.current=window.scrollY,l&&r&&window.scrollTo(0,n)});var c=function(){var e=i.offsetTop,t=i.offsetHeight,n=window.innerHeight,r=window.scrollY,s=e+t+u.offsetHeight,c=r<=s&&s<=r+n,f=r-a.current;l&&f<0&&!c?o(!1):!l&&f>0&&c&&o(!0),a.current=r};return window.addEventListener("scroll",c),function(){return window.removeEventListener("scroll",c)}}},[l,n,e,r]),{autoScroll:l,setAutoScroll:o}),ee=X.autoScroll,et=X.setAutoScroll;(0,x.useEffect)(function(){var e=p.current;!e||F||K||window.setTimeout(function(){return e.focus()})},[Q,K,F]),(0,x.useEffect)(function(){var e=new Set(j.map(function(e){return e.messageId}));S(function(t){return lc(t).filter(function(t){var n=t.id;return e.has(n.split("--")[0])})})},[j,S]);var en=function(e){g.trim()&&(U(g.trim(),B,e),y(""),et(!0))},er=(0,x.useMemo)(function(){return j.filter(function(e){return"user"===e.role}).at(-1)},[j]),ei=(0,x.useCallback)(function(){er&&U(er.content,er.chatId,er.parentId,er.messageId)},[er,U]);return x.createElement(x.Fragment,null,x.createElement(iU._,{gleanContext:r5.v2}),x.createElement(iK,{currentChatId:B,lastUpdate:W,isFinished:O,messageId:2===j.length?null==(c=j[0])?void 0:c.messageId:void 0}),x.createElement(iP.A,null,x.createElement(iA,{isDisabled:J(_)}),Q||L?x.createElement(ij.R,null):x.createElement("section",{className:"ai-help-inner"},x.createElement("div",{ref:d,className:"ai-help-body"},K&&x.createElement("ul",{className:"ai-help-messages"},j.map(function(e,t){return x.createElement("li",{key:t,className:["ai-help-message","role-".concat(e.role),"status-".concat(e.status)].join(" ")},x.createElement("div",{className:"ai-help-message-role"},x.createElement(lb,{role:e.role})),"user"===e.role?x.createElement(lm,{message:e,submit:U,canEdit:!J(_),nextPrev:$,siblingCount:Z}):x.createElement(lg,{message:e,queuedExamples:E,setQueue:S,messages:j,retryLastQuestion:ei}))}))),N&&x.createElement(iR.A,{extraClasses:"ai-help-error",type:"error"},x.createElement("h4",null,"Error"),x.createElement("p",null,"An error occurred."," ",er&&x.createElement(x.Fragment,null,"Please"," ",x.createElement(iF.$,{type:"link",onClickHandler:ei},"try again"),"."))),x.createElement("div",{ref:h,className:"ai-help-footer"},(T||M)&&x.createElement("div",{className:"ai-help-footer-actions"},x.createElement(iF.$,{type:"action",isDisabled:!M,extraClasses:"ai-help-stop-button",onClickHandler:function(){A("".concat(r5.v2,": stop")),q()}},"■ Stop answering"),x.createElement(iF.$,{type:"action",isDisabled:ee,extraClasses:"ai-help-scroll-button",onClickHandler:function(){return et(!0)}},"↓ Enable auto-scroll")),J(_)?x.createElement(iD,{limit:_.limit}):x.createElement(x.Fragment,null,x.createElement("div",{className:"ai-help-refine-or-new"},K&&x.createElement(iF.$,{type:"action",icon:"new-topic",isDisabled:T||M||J(_),extraClasses:"ai-help-new-question-button",onClickHandler:function(){A("".concat(r5.v2,": topic new")),y(""),S([]),C(null),z(),window.setTimeout(function(){return window.scrollTo(0,0)})}},"New Topic"),x.createElement("form",{ref:f,className:"ai-help-input-form",onSubmit:function(e){var t;e.preventDefault(),en(null==(t=j.at(-1))?void 0:t.messageId)}},x.createElement(iH.A,{ref:p,maxLength:25e3,autoFocus:!0,disabled:T||M,enterKeyHint:"send",onKeyDown:function(e){if("Enter"===e.key&&!e.shiftKey){var t;e.preventDefault(),en(null==(t=j.at(-1))?void 0:t.messageId)}},onChange:function(e){return y(e.target.value)},value:g,rows:1,placeholder:(u=T?r9:M?r8:K?"Ask your follow up question":"Ask your question",G?"".concat(u," (").concat(_.remaining," ").concat(1===_.remaining?"question":"questions"," remaining today)"):u)}),x.createElement("div",{className:"ai-help-input-actions"},g||K?g?x.createElement(iF.$,{type:"action",icon:"cancel",buttonType:"reset",title:"Clear question",onClickHandler:function(){A("".concat(r5.v2,": clear")),y("")}},x.createElement("span",{className:"visually-hidden"},"Reset question")):null:x.createElement(iF.$,{type:"action",icon:V?"return":"cancel",buttonType:"reset",title:V?"Return to previous question":"Cancel",isDisabled:!V,onClickHandler:function(){A("".concat(r5.v2,": ").concat(V?"topic return":"cancel")),H()}},x.createElement("span",{className:"visually-hidden"},"Previous question")),x.createElement(iF.$,{type:"action",icon:"send",buttonType:"submit",title:"Submit question",isDisabled:!g.trim()},x.createElement("span",{className:"visually-hidden"},"Submit question"))))),x.createElement("div",{className:"ai-help-footer-text"},x.createElement("span",null,"Results based on MDN's most recent documentation and powered by ",Y,", an LLM by"," ",x.createElement("a",{href:"https://platform.openai.com/docs/api-reference/models",className:"external",target:"_blank",rel:"noreferrer noopener"},"OpenAI"),". Please verify information independently as LLM responses may not be 100% accurate. Read our"," ",x.createElement(iF.$,{type:"link",onClickHandler:function(){return k(!0)}},"full guidance")," ","for more details."),x.createElement(i_.A,{isOpen:b,onRequestClose:function(){return k(!1)}},x.createElement("header",{className:"modal-header"},x.createElement("h2",{className:"modal-heading"},"AI Help Usage Guidance"),x.createElement(iF.$,{onClickHandler:function(){return k(!1)},type:"action",icon:"cancel",extraClasses:"close-button"})),x.createElement("div",{className:"modal-body"},x.createElement("p",null,"Our AI Help feature integrates GPT-4o mini for MDN Plus free users and GPT-4o for paying subscribers, leveraging Large Language Models (LLMs) developed by"," ",x.createElement("a",{href:"https://platform.openai.com/docs/api-reference/models",className:"external",target:"_blank",rel:"noreferrer noopener"},"OpenAI"),". This tool is designed to enhance your experience by providing relevant insights from MDN's extensive documentation. However, given the nature of LLMs, it's crucial to approach the generated information with a discerning eye, especially for complex or critical subjects."),x.createElement("p",null,"We encourage users to verify the AI Help's output. For convenience and accuracy, links for further reading and verification are provided at the beginning of responses, directing you to the relevant MDN documentation. This ensures immediate access to deeper insights and broader context."),x.createElement("p",null,"Remember, while AI Help aims to be a valuable resource, its responses, influenced by the complexities of AI, might not always hit the mark with absolute precision. We invite you to explore this feature, designed to complement your MDN exploration. Your feedback is invaluable as we continue to refine AI Help to better serve your needs.")))))),!K&&!g&&!J(_)&&x.createElement("section",{className:"ai-help-examples"},x.createElement("header",null,"Examples"),lp.map(function(e,t){var n=e.category,r=e.query;return x.createElement("button",{key:t,type:"button",className:["ai-help-example","category-".concat(n)].join(" "),onClick:function(){var e;A("".concat(r5.v2,": example ").concat(1+t)),y(r),null==(e=p.current)||e.focus(),window.setTimeout(function(){return window.scrollTo(0,0)})}},r)})),"#debug"===I&&x.createElement("pre",null,JSON.stringify({datas:R,messages:j,quota:_},null,2)))))}function lb(e){var t=e.role,n=(0,iS.P_)();switch(t){case"user":return x.createElement(iM.e,{userData:n});case"assistant":return x.createElement(iw.I,{name:"chatgpt"})}}function lk(e){var t,n=e.messages,r=e.currentMessage,i=e.children,l=(0,iS.P_)(),o=(0,x.useMemo)(function(){return(0,iC.dz)(l)},[l]),a=(0,r3.db)(),s=n.indexOf(r),u=n.slice(0,s).filter(function(e){return e.role===ig.User}).map(function(e){return e.content}),c=u.at(-1),f=new URL("https://github.com/");f.pathname="/".concat(iz.WI,"/issues/new");var p=new URLSearchParams;return p.set("title","[AI Help] Question: ".concat(c)),p.set("questions",u.map(function(e){return"1. ".concat(e)}).join("\n")),p.set("answer",r.content),p.set("sources",(null==(t=r.sources)?void 0:t.map(function(e){return"- [".concat(e.title,"](https://developer.mozilla.org").concat(e.url,")")}).join("\n"))||"(None)"),p.set("model",o?"gpt-4o":"gpt-4o mini"),p.set("template","ai-help-answer.yml"),f.search=p.toString(),x.createElement("a",{href:f.href,className:"external",title:"This will take you to GitHub to file a new issue.",target:"_blank",rel:"noopener noreferrer",onClick:function(){return a("".concat(r5.v2,": report issue"))}},i)}},60405(e,t,n){n.d(t,{W:()=>a});var r=n(2181),i=n(1908),l=n(72185),o=n(96540);function a(e){var t=e.children,n=e.className,a=e.gleanPrefix,s=(0,l.B)(),u=(0,r.db)();return o.createElement("div",{className:void 0===n?"login-banner":n},o.createElement("span",null,o.createElement("span",null,t)," ",o.createElement("strong",null,"Upgrade to"," ",o.createElement("a",{className:"plus-link",href:s,onClick:function(){return u("".concat(a,": banner-link"))}},"MDN Plus")," ","for free.")),o.createElement(i._,{logInGleanContext:"".concat(a,": banner-login"),signUpGleanContext:"".concat(a,": banner-signup")}))}},43304(e,t,n){n.d(t,{e:()=>i});var r=n(96540),i=function(e){var t=e.userData;return r.createElement("div",{className:(null==t?void 0:t.isSubscriber)?"avatar-wrap is-subscriber":"avatar-wrap","aria-hidden":"true"},r.createElement("img",{alt:"",className:"avatar",src:(null==t?void 0:t.avatarUrl)||"/assets/avatar.png"}))}},53108(e,t,n){n.d(t,{A:()=>i});var r=n(96540);function i(e){var t=e.children,n=e.extraClasses,i=e.optional;return r.createElement(r.Fragment,null,!0===i?r.createElement(r.Fragment,null,t):r.createElement("div",{className:"container ".concat(n||"")},t))}},44171(e,t,n){n.d(t,{A:()=>l});var r=n(5438),i=n(96540);function l(e){var t=e.srcLight,n=e.srcDark,l=e.alt,o=function(e,t){if(null==e)return{};var n,r,i,l={};if("u">typeof Reflect&&Reflect.ownKeys){for(i=0,n=Reflect.ownKeys(e);i<n.length;i++)r=n[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r]);return l}if(l=function(e,t){if(null==e)return{};var n,r,i={},l=Object.getOwnPropertyNames(e);for(r=0;r<l.length;r++)n=l[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}(e,t),Object.getOwnPropertySymbols)for(i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)r=n[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r]);return l}(e,["srcLight","srcDark","alt"]),a=(0,r.DP)();return i.createElement("picture",null,"os-default"===a&&i.createElement(i.Fragment,null,i.createElement("source",{srcSet:t,media:"(prefers-color-scheme: light)"}),i.createElement("source",{srcSet:n,media:"(prefers-color-scheme: dark)"})),i.createElement("img",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({src:"dark"===a?n:t,alt:l},o)))}},1908(e,t,n){n.d(t,{_:()=>o});var r=n(73511),i=n(99848),l=n(96540),o=function(e){var t=e.logInGleanContext,n=e.signUpGleanContext;return l.createElement("ul",{className:"auth-container"},l.createElement("li",null,l.createElement(r.A,{gleanContext:t})),l.createElement("li",null,l.createElement(i.$,{gleanContext:n})))}}};
3
+ //# sourceMappingURL=6786.c180a40232e02d98.js.map